diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 000000000..c9364f124 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,2 @@ +# code reformat after spotless enabled +bacaf1cc15b1dc5e13b52c7d82c0058464d9e676 \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..b76b89570 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "maven" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 000000000..652bd55d1 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,5 @@ +_extends: .github +# plexus-pom uses a single version number +version-template: '$MAJOR' +name-template: '$NEXT_MAJOR_VERSION' +tag-template: 'plexus-$NEXT_MAJOR_VERSION' diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 000000000..09feae474 --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,31 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: GitHub CI + +on: [push, pull_request] + +jobs: + build: + name: Build it + uses: codehaus-plexus/.github/.github/workflows/maven.yml@master + + deploy: + name: Deploy + needs: build + uses: codehaus-plexus/.github/.github/workflows/maven-deploy.yml@master + secrets: inherit diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 000000000..4c09c8a70 --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,12 @@ +name: Release Drafter +on: + push: + branches: + - master +jobs: + update_release_draft: + runs-on: ubuntu-latest + steps: + - uses: release-drafter/release-drafter@v6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..50281e7c7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +target/ +.project +.classpath +.settings/ +bin +*.iml +.idea +.DS_Store diff --git a/README.md b/README.md new file mode 100644 index 000000000..fe3c96bdc --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +Plexus Parent POM +================= + +[![Maven Central](https://img.shields.io/maven-central/v/org.codehaus.plexus/plexus.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.codehaus.plexus/plexus) + +The current master is now at https://github.com/codehaus-plexus/plexus-pom diff --git a/plexus-appserver/plexus-appserver-host/pom.xml b/plexus-appserver/plexus-appserver-host/pom.xml deleted file mode 100644 index 431cbff2b..000000000 --- a/plexus-appserver/plexus-appserver-host/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - org.codehaus.plexus - plexus-appserver - 2.0-alpha-4-SNAPSHOT - - 4.0.0 - plexus-appserver-host - Plexus Application Server Host - - - - mx4j - mx4j - 3.0.1 - - - mx4j - mx4j-remote - 3.0.1 - - - org.livetribe - livetribe-slp - 1.0.2 - - - - - - - org.codehaus.plexus - plexus-maven-plugin - - - generate - - descriptor - - - - merge - - ${project.build.outputDirectory}/META-INF/plexus/components.xml - - ${project.build.directory}/generated-resources/plexus/META-INF/plexus/components.xml - src/main/plexus/components.xml - - - - merge-descriptors - - - - - - - diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/AppDescriptor.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/AppDescriptor.java deleted file mode 100644 index 90b1e53ce..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/AppDescriptor.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.codehaus.plexus.appserver; - -import java.io.File; - -/** - * @author Jason van Zyl - */ -public class AppDescriptor -{ - /** - * Application id - */ - private String id; - - /** - * Application name - */ - private String name; - - /** - * Plexus Application Archive - */ - private File par; - - /** - * Application deployment directory - */ - private File appDirectory; - - public AppDescriptor( String id, String name, File par, File appDirectory ) - { - this.id = id; - this.name = name; - this.par = par; - this.appDirectory = appDirectory; - } - - public String getId() - { - return id; - } - - public String getName() - { - return name; - } - - public File getPar() - { - return par; - } - - public File getAppDirectory() - { - return appDirectory; - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/AppServerObject.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/AppServerObject.java deleted file mode 100644 index 014413904..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/AppServerObject.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.codehaus.plexus.appserver; - -import org.codehaus.plexus.appserver.deploy.DeploymentException; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.util.Expand; - -import java.io.File; - -/** - * @author Jason van Zyl - */ -public abstract class AppServerObject - extends AbstractLogEnabled -{ - protected void expand( File source, File outputDirectory, boolean overwrite ) - throws DeploymentException - { - Expand expander = new Expand(); - - expander.setDest( outputDirectory ); - - expander.setOverwrite( overwrite ); - - expander.setSrc( source ); - - try - { - expander.execute(); - } - catch ( Exception e ) - { - throw new DeploymentException( "Unable to extract " + source + " to " + outputDirectory + ".", e ); - } - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/ApplicationServer.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/ApplicationServer.java deleted file mode 100644 index d95d6cd18..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/ApplicationServer.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.codehaus.plexus.appserver; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.appserver.application.profile.AppRuntimeProfile; - -import java.io.File; - -/** - * @author Trygve Laugstøl - * @author Jason van Zyl - * @version $Id$ - */ -public interface ApplicationServer -{ - String ROLE = ApplicationServer.class.getName(); - - AppRuntimeProfile getApplicationRuntimeProfile( String applicationId ) - throws ApplicationServerException; - - void deploy( String id, File location ) - throws ApplicationServerException; - - void redeploy( String id ) - throws ApplicationServerException; - - void undeploy( String id ) - throws ApplicationServerException; - - void addAppDescriptor( AppDescriptor appDescriptor ); - - AppDescriptor getAppDescriptor( String appName ); -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/ApplicationServerException.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/ApplicationServerException.java deleted file mode 100644 index 54c06632f..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/ApplicationServerException.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.codehaus.plexus.appserver; - -/* - * Copyright 2004-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class ApplicationServerException - extends Exception -{ - public ApplicationServerException( String message ) - { - super( message ); - } - - public ApplicationServerException( String message, Throwable cause ) - { - super( message, cause ); - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/DefaultApplicationServer.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/DefaultApplicationServer.java deleted file mode 100644 index 93391a36a..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/DefaultApplicationServer.java +++ /dev/null @@ -1,185 +0,0 @@ -package org.codehaus.plexus.appserver; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.appserver.application.deploy.ApplicationDeployer; -import org.codehaus.plexus.appserver.application.profile.AppRuntimeProfile; -import org.codehaus.plexus.appserver.lifecycle.AppServerContext; -import org.codehaus.plexus.appserver.lifecycle.AppServerLifecycleException; -import org.codehaus.plexus.appserver.lifecycle.phase.AppServerPhase; -import org.codehaus.plexus.appserver.service.deploy.ServiceDeployer; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.context.Context; -import org.codehaus.plexus.context.ContextException; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException; -import org.codehaus.plexus.util.FileUtils; - -import java.io.File; -import java.util.Collection; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -/** - * @author Jason van Zyl - * @author bob mcwhirter - * @author Trygve Laugstøl - * @version $Id$ - */ - -//- the containers aren't quite right. the appserver container is in the service which might not be correct -//- the container is not initialized - -public class DefaultApplicationServer - extends AbstractLogEnabled - implements ApplicationServer, Initializable, Contextualizable, Startable -{ - private PlexusContainer container; - - private ApplicationDeployer applicationDeployer; - - private ServiceDeployer serviceDeployer; - - //todo: cdc doing configurations - private List phases; - - private Map appDescriptors; - - // ---------------------------------------------------------------------- - // Application Facade - // ---------------------------------------------------------------------- - - public AppRuntimeProfile getApplicationRuntimeProfile( String applicationId ) - throws ApplicationServerException - { - return applicationDeployer.getApplicationRuntimeProfile( applicationId ); - } - - // ---------------------------------------------------------------------------- - // Delegation to the appserver deploy - // ---------------------------------------------------------------------------- - - public void deploy( String id, File location ) - throws ApplicationServerException - { - applicationDeployer.deploy( id, location ); - } - - public void redeploy( String id ) - throws ApplicationServerException - { - applicationDeployer.redeploy( id ); - } - - public void undeploy( String id ) - throws ApplicationServerException - { - applicationDeployer.undeploy( id ); - } - - public void addAppDescriptor( AppDescriptor appDescriptor ) - { - appDescriptors.put( appDescriptor.getId(), appDescriptor ); - } - - public AppDescriptor getAppDescriptor( String appId ) - { - return (AppDescriptor) appDescriptors.get( appId ); - } - - public Collection getAppDescriptors() - { - return appDescriptors.values(); - } - - // ---------------------------------------------------------------------- - // Component Lifecycle - // ---------------------------------------------------------------------- - - public void contextualize( Context context ) - throws ContextException - { - container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY ); - - container.addContextValue( "plexus.appserver", this ); - } - - public void initialize() - throws InitializationException - { - appDescriptors = new LinkedHashMap(); - } - - public void start() - throws StartingException - { - // ---------------------------------------------------------------------- - // Register the deployers inside the directory supervisor so applications - // and services will be deployed. - // ---------------------------------------------------------------------- - - File appServerHome = FileUtils.resolveFile( new File( "." ), System.getProperty( "plexus.home" ) ); - - AppServerContext appServerContext = new AppServerContext( this, appServerHome ); - - for ( Iterator i = phases.iterator(); i.hasNext(); ) - { - String appServerPhaseId = (String) i.next(); - - try - { - AppServerPhase appServerPhase = - (AppServerPhase) container.lookup( AppServerPhase.ROLE, appServerPhaseId ); - - appServerPhase.execute( appServerContext ); - } - catch ( ComponentLookupException e ) - { - throw new StartingException( - "The requested app server lifecycle phase cannot be found: " + appServerPhaseId, e ); - } - catch ( AppServerLifecycleException e ) - { - throw new StartingException( "Error in the app server lifecycle " + appServerPhaseId + " phase.", e ); - } - } - - getLogger().info( "The appserver server has been initialized." ); - } - - public void stop() - { - // 1. should shut down all the apps and services properly - // 2. serialize any configurations - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/PlexusApplicationConstants.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/PlexusApplicationConstants.java deleted file mode 100644 index 1bfbc9207..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/PlexusApplicationConstants.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.codehaus.plexus.appserver; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class PlexusApplicationConstants -{ - public static final String CONF_DIRECTORY = "conf"; - - public static final String CONFIGURATION_FILE = "application.xml"; - - public static final String LIB_DIRECTORY = "lib"; - - public static final String METADATA_FILE = "META-INF/plexus/application.xml"; -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/PlexusApplicationHost.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/PlexusApplicationHost.java deleted file mode 100644 index 182c98dff..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/PlexusApplicationHost.java +++ /dev/null @@ -1,285 +0,0 @@ -package org.codehaus.plexus.appserver; - -/* - * Copyright (c) 2004, Codehaus.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.classworlds.ClassWorld; -import org.codehaus.plexus.DefaultPlexusContainer; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.logging.Logger; -import org.codehaus.plexus.logging.LoggerManager; -import org.codehaus.plexus.util.FileUtils; - -import java.io.File; -import java.io.FileReader; - -// Container host plexus container is configured and initialized -// The appserver component is looked up - -/** - * A ContainerHost. - * - * @author Jason van Zyl - * @author bob mcwhirter - * @author Trygve Laugstøl - * @version $Id$ - */ -public class PlexusApplicationHost - implements Runnable -{ - private DefaultPlexusContainer container; - - private boolean shouldStop; - - private boolean isStopped; - - private static final Object waitObj = new Object(); - - private ApplicationServer applicationServer; - - private ClassWorld classWorld; - - private String configurationResource; - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - public PlexusContainer getContainer() - { - return container; - } - - public ApplicationServer getApplicationServer() - { - return applicationServer; - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - public void start( ClassWorld classWorld, String configurationResource ) - throws Exception - { - this.classWorld = classWorld; - - this.configurationResource = configurationResource; - - container = new DefaultPlexusContainer(); - - container.setClassWorld( classWorld ); - - container.setConfigurationResource( new FileReader( configurationResource ) ); - - container.addContextValue( "plexus.home", System.getProperty( "plexus.home" ) ); - - container.addContextValue( "plexus.work", - System.getProperty( "plexus.home" ) + "/" + PlexusRuntimeConstants.WORK_DIRECTORY ); - - container.addContextValue( "plexus.temp", - System.getProperty( "plexus.home" ) + "/" + PlexusRuntimeConstants.TEMP_DIRECTORY ); - - container.addContextValue( "plexus.logs", - System.getProperty( "plexus.home" ) + "/" + PlexusRuntimeConstants.LOGS_DIRECTORY ); - - File plexusLogs = FileUtils.resolveFile( new File( "." ), System.getProperty( "plexus.home" ) + "/" + - PlexusRuntimeConstants.LOGS_DIRECTORY ); - - if ( !plexusLogs.exists() ) - { - plexusLogs.mkdirs(); - } - - container.initialize(); - - container.start(); - - LoggerManager loggerManager = (LoggerManager) container.lookup( LoggerManager.ROLE ); - - loggerManager.setThreshold( Logger.LEVEL_DEBUG ); - - final Logger logger = loggerManager.getLoggerForComponent( this.getClass().getName() ); - - // ---------------------------------------------------------------------- - // This lookup will start the appserver server - // ---------------------------------------------------------------------- - - applicationServer = (ApplicationServer) container.lookup( ApplicationServer.ROLE ); - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - // TODO: Add timing. - logger.info( "The appserver server has started." ); - - Thread thread = new Thread( this ); - - thread.setDaemon( false ); - - Runtime.getRuntime().addShutdownHook( new Thread( new Runnable() - { - public void run() - { - try - { - logger.info( "Shutting down the appserver container." ); - - shutdown(); - } - catch ( Exception e ) - { - // do nothing. - } - } - } ) ); - - thread.start(); - } - - /** - * Asynchronous hosting component loop. - */ - public void run() - { - synchronized ( this ) - { - while ( !shouldStop ) - { - try - { - wait(); - } - catch ( InterruptedException e ) - { - //ignore - } - } - } - - synchronized ( this ) - { - isStopped = true; - - notifyAll(); - } - } - - public void restart() - throws Exception - { - shutdown(); - - start( classWorld, configurationResource ); - } - - // ---------------------------------------------------------------------- - // Startup - // ---------------------------------------------------------------------- - - /** - * Shutdown this container. - * - * @throws java.lang.Exception If an error occurs while shutting down the container. - */ - public void shutdown() - throws Exception - { - synchronized ( this ) - { - shouldStop = true; - - container.release( applicationServer ); - - container.dispose(); - - notifyAll(); - } - - synchronized ( this ) - { - while ( !isStopped ) - { - try - { - wait(); - } - catch ( InterruptedException e ) - { - //ignore - } - } - - synchronized ( waitObj ) - { - waitObj.notifyAll(); - } - } - } - - private boolean isStopped() - { - return isStopped; - } - - // ---------------------------------------------------------------------- - // Main: used by org.codehaus.classworlds.Launcher - // ---------------------------------------------------------------------- - - public static void main( String[] args, ClassWorld classWorld ) - { - if ( args.length != 1 ) - { - System.err.println( "usage: plexus " ); - - System.exit( 1 ); - } - - try - { - PlexusApplicationHost host = new PlexusApplicationHost(); - - host.start( classWorld, args[0] ); - - while ( !host.isStopped() ) - { - try - { - synchronized ( waitObj ) - { - waitObj.wait(); - } - } - catch ( InterruptedException e ) - { - } - } - } - catch ( Exception e ) - { - e.printStackTrace(); - - System.exit( 2 ); - } - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/PlexusRuntimeConstants.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/PlexusRuntimeConstants.java deleted file mode 100644 index 590acd92c..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/PlexusRuntimeConstants.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.codehaus.plexus.appserver; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class PlexusRuntimeConstants -{ - public final static String APPLICATIONS_DIRECTORY = "apps"; - - public final static String BIN_DIRECTORY = "bin"; - - public final static String BOOT_DIRECTORY = "core/boot"; - - public final static String CONF_DIRECTORY = "conf"; - - public final static String CORE_DIRECTORY = "core"; - - public final static String LOGS_DIRECTORY = "logs"; - - public final static String LIB_DIRECTORY = "lib"; - - public final static String TEMP_DIRECTORY = "temp"; - - public final static String WORK_DIRECTORY = "work"; - - public final static String SERVICES_DIRECTORY = "services"; - - public static final String CONFIGURATION_FILE = "plexus.xml"; -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/PlexusServiceConstants.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/PlexusServiceConstants.java deleted file mode 100644 index 4680c93b2..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/PlexusServiceConstants.java +++ /dev/null @@ -1,64 +0,0 @@ -package org.codehaus.plexus.appserver; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class PlexusServiceConstants -{ - public static final String CONF_DIRECTORY = "conf"; - - public static final String CONFIGURATION_FILE = "service.xml"; - - public static final String LIB_DIRECTORY = "lib"; - - public static final String CLASSES_DIRECTORY = "classes"; -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/ApplicationDeployer.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/ApplicationDeployer.java deleted file mode 100644 index 4b173a582..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/ApplicationDeployer.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.codehaus.plexus.appserver.application.deploy; - -/* - * Copyright (c) 2004, Codehaus.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.appserver.ApplicationServerException; -import org.codehaus.plexus.appserver.application.event.ApplicationListener; -import org.codehaus.plexus.appserver.application.profile.AppRuntimeProfile; -import org.codehaus.plexus.appserver.deploy.Deployer; - -/** - * @author Peter Donald - * @author Jason van Zyl - */ -public interface ApplicationDeployer - extends Deployer -{ - String ROLE = ApplicationDeployer.class.getName(); - - void addApplicationListener( ApplicationListener listener ); - - void removeApplicationListener( ApplicationListener listener ); - - AppRuntimeProfile getApplicationRuntimeProfile( String applicationName ) - throws ApplicationServerException; -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/DefaultApplicationDeployer.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/DefaultApplicationDeployer.java deleted file mode 100644 index d9d124a5e..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/DefaultApplicationDeployer.java +++ /dev/null @@ -1,288 +0,0 @@ -package org.codehaus.plexus.appserver.application.deploy; - -/* - * Copyright (c) 2004, Codehausv.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.classworlds.ClassRealm; -import org.codehaus.classworlds.NoSuchRealmException; -import org.codehaus.plexus.DefaultPlexusContainer; -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.appserver.ApplicationServer; -import org.codehaus.plexus.appserver.ApplicationServerException; -import org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentContext; -import org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentException; -import org.codehaus.plexus.appserver.application.deploy.lifecycle.phase.AppDeploymentPhase; -import org.codehaus.plexus.appserver.application.event.ApplicationListener; -import org.codehaus.plexus.appserver.application.event.DefaultDeployEvent; -import org.codehaus.plexus.appserver.application.profile.AppRuntimeProfile; -import org.codehaus.plexus.appserver.deploy.AbstractDeployer; -import org.codehaus.plexus.appserver.service.PlexusService; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.context.Context; -import org.codehaus.plexus.context.ContextException; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; - -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -/** - * @author Dan Diephouse - * @author Jason van Zyl - * @since Mar 19, 2004 - */ -public class DefaultApplicationDeployer - extends AbstractDeployer - implements ApplicationDeployer, Contextualizable, Initializable, Disposable -{ - private Map deployments; - - private DefaultPlexusContainer appServerContainer; - - private List applicationListeners; - - // ---------------------------------------------------------------------- - // Configuration - // ---------------------------------------------------------------------- - - private File applicationsDirectory; - - private List phases; - - // ---------------------------------------------------------------------- - // Deployment - // ---------------------------------------------------------------------- - - public void deploy( String appId, File par ) - throws ApplicationServerException - { - deployJar( appId, par, true ); - } - - private void deployJar( String appId, File file, boolean expandPar ) - throws ApplicationServerException - { - AppDeploymentContext context = new AppDeploymentContext( file, applicationsDirectory, deployments, - appServerContainer, getAppServer(), expandPar ); - - for ( Iterator i = phases.iterator(); i.hasNext(); ) - { - String id = (String) i.next(); - - try - { - AppDeploymentPhase phase = - (AppDeploymentPhase) appServerContainer.lookup( AppDeploymentPhase.ROLE, id ); - - phase.execute( context ); - } - catch ( ComponentLookupException e ) - { - throw new ApplicationServerException( "The requested app server lifecycle phase cannot be found: " + id, - e ); - } - catch ( AppDeploymentException e ) - { - throw new ApplicationServerException( "Error in the app server lifecycle " + id + " phase.", e ); - } - } - } - - // ---------------------------------------------------------------------- - // Redeploy - // ---------------------------------------------------------------------- - - public void redeploy( String id ) - throws ApplicationServerException - { - AppRuntimeProfile profile = getApplicationRuntimeProfile( id ); - - undeploy( id ); - - File file = getAppServer().getAppDescriptor( id ).getPar(); - - deployJar( id, file, false ); - - DefaultDeployEvent event = createDeployEvent( profile ); - - for ( Iterator itr = applicationListeners.iterator(); itr.hasNext(); ) - { - ApplicationListener listener = (ApplicationListener) itr.next(); - - listener.redeployedApplication( event ); - } - } - - // ---------------------------------------------------------------------- - // Undeploy - // ---------------------------------------------------------------------- - - public void undeploy( String name ) - throws ApplicationServerException - { - getLogger().info( "Undeploying '" + name + "'." ); - - AppRuntimeProfile profile = getApplicationRuntimeProfile( name ); - - deployments.remove( name ); - - DefaultPlexusContainer app = profile.getApplicationContainer(); - - try - { - stopApplicationServices( profile ); - } - catch (Exception ex) - { - getLogger().info( "Can not stop services attached to application ", ex ); - } - - app.dispose(); - -/* Don't dispose since the appserver container realm = the app container realm at present - ClassRealm realm = app.getContainerRealm(); - - try - { - realm.getWorld().disposeRealm( realm.getId() ); - } - catch ( NoSuchRealmException e ) - { - getLogger().warn( "Error while disposing appserver realm '" + realm.getId() + "'" ); - } -*/ - - DefaultDeployEvent event = createDeployEvent( profile ); - - for ( Iterator itr = applicationListeners.iterator(); itr.hasNext(); ) - { - ApplicationListener listener = (ApplicationListener) itr.next(); - - listener.undeployedApplication( event ); - } - } - - private void stopApplicationServices( AppRuntimeProfile runtimeProfile ) - throws Exception - { - if (runtimeProfile.getServices() != null) - { - PlexusService service; - - for (Iterator serviceIterator = runtimeProfile.getServices().iterator(); serviceIterator.hasNext();) - { - service = (PlexusService) serviceIterator.next(); - service.applicationStop( runtimeProfile ); - } - } - } - - // ---------------------------------------------------------------------- - // Events - // ---------------------------------------------------------------------- - - private DefaultDeployEvent createDeployEvent( AppRuntimeProfile runtimeProfile ) - { - return new DefaultDeployEvent( runtimeProfile ); - } - - public AppRuntimeProfile getApplicationRuntimeProfile( String applicationName ) - throws ApplicationServerException - { - AppRuntimeProfile profile = (AppRuntimeProfile) deployments.get( applicationName ); - - if ( profile == null ) - { - throw new ApplicationServerException( "No such appserver: '" + applicationName + "'." ); - } - - return profile; - } - - public void addApplicationListener( ApplicationListener listener ) - { - applicationListeners.add( listener ); - } - - public void removeApplicationListener( ApplicationListener listener ) - { - applicationListeners.remove( listener ); - } - - // ---------------------------------------------------------------------- - // Lifecycle - // ---------------------------------------------------------------------- - - public void contextualize( Context context ) - throws ContextException - { - appServerContainer = (DefaultPlexusContainer) context.get( PlexusConstants.PLEXUS_KEY ); - } - - public void initialize() - throws InitializationException - { - deployments = new HashMap(); - - applicationListeners = new ArrayList(); - - getLogger().info( "Applications will be deployed in: '" + applicationsDirectory + "'." ); - } - - public void dispose() - { - List names = new ArrayList( deployments.keySet() ); - - for ( Iterator it = names.iterator(); it.hasNext(); ) - { - String name = (String) it.next(); - - try - { - undeploy( name ); - } - catch ( Exception e ) - { - getLogger().warn( "Error while undeploying appserver '" + name + "'.", e ); - } - } - } - - private ApplicationServer getAppServer() - throws ApplicationServerException - { - try - { - return (ApplicationServer) appServerContainer.getContext().get( "plexus.appserver" ); - } - catch ( ContextException e ) - { - throw new ApplicationServerException( "Cannot retrieve app server from context.", e ); - } - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/AppDeploymentContext.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/AppDeploymentContext.java deleted file mode 100644 index 21e16e439..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/AppDeploymentContext.java +++ /dev/null @@ -1,174 +0,0 @@ -package org.codehaus.plexus.appserver.application.deploy.lifecycle; - -import org.codehaus.plexus.DefaultPlexusContainer; -import org.codehaus.plexus.appserver.ApplicationServer; -import org.codehaus.plexus.appserver.application.profile.AppRuntimeProfile; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -import java.io.File; -import java.util.Map; -import java.util.Properties; - -/** - * @author Jason van Zyl - */ -public class AppDeploymentContext -{ - private File par; - - private File applicationsDirectory; - - private Map deployments; - - private DefaultPlexusContainer appServerContainer; - - private Properties context; - - // - - private String applicationId; - - private PlexusConfiguration appConfiguration; - - private AppRuntimeProfile appRuntimeProfile; - - private DefaultPlexusContainer applicationContainer; - - private File appConfigurationFile; - - private File appDir; - - // app.home/lib used for populating the class realm. - private File appLibDirectory; - - private ApplicationServer appServer; - - private boolean expandPar; - - public AppDeploymentContext( File par, File applicationsDirectory, Map deployments, - DefaultPlexusContainer appServerContainer, ApplicationServer appServer, - boolean expandPar ) - { - this.par = par; - this.applicationsDirectory = applicationsDirectory; - this.deployments = deployments; - this.appServerContainer = appServerContainer; - this.appServer = appServer; - this.expandPar = expandPar; - } - - // Read-only - - public File getPar() - { - return par; - } - - public File getApplicationsDirectory() - { - return applicationsDirectory; - } - - public Map getDeployments() - { - return deployments; - } - - public DefaultPlexusContainer getAppServerContainer() - { - return appServerContainer; - } - - // Properties - - public Properties getContext() - { - return context; - } - - public void setContext( Properties context ) - { - this.context = context; - } - - public String getApplicationId() - { - return applicationId; - } - - public void setApplicationId( String applicationId ) - { - this.applicationId = applicationId; - } - - public PlexusConfiguration getAppConfiguration() - { - return appConfiguration; - } - - public void setAppConfiguration( PlexusConfiguration appConfiguration ) - { - this.appConfiguration = appConfiguration; - } - - public AppRuntimeProfile getAppRuntimeProfile() - { - return appRuntimeProfile; - } - - public void setAppRuntimeProfile( AppRuntimeProfile appRuntimeProfile ) - { - this.appRuntimeProfile = appRuntimeProfile; - } - - public DefaultPlexusContainer getApplicationContainer() - { - return applicationContainer; - } - - public void setApplicationContainer( DefaultPlexusContainer applicationContainer ) - { - this.applicationContainer = applicationContainer; - } - - public File getAppConfigurationFile() - { - return appConfigurationFile; - } - - public void setAppConfigurationFile( File appConfigurationFile ) - { - this.appConfigurationFile = appConfigurationFile; - } - - public File getAppLibDirectory() - { - return appLibDirectory; - } - - public void setAppLibDirectory( File appLibDirectory ) - { - this.appLibDirectory = appLibDirectory; - } - - public File getAppDir() - { - return appDir; - } - - public void setAppDir( File appDir ) - { - this.appDir = appDir; - } - - public ApplicationServer getAppServer() - { - return appServer; - } - - public boolean isExpandPar() - { - return expandPar; - } -} - diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/AppDeploymentException.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/AppDeploymentException.java deleted file mode 100644 index cbf86720a..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/AppDeploymentException.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.codehaus.plexus.appserver.application.deploy.lifecycle; - -/** - * @author Jason van Zyl - */ -public class AppDeploymentException - extends Exception -{ - public AppDeploymentException( String string ) - { - super( string ); - } - - public AppDeploymentException( String string, Throwable throwable ) - { - super( string, throwable ); - } - - public AppDeploymentException( Throwable throwable ) - { - super( throwable ); - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/AbstractAppDeploymentPhase.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/AbstractAppDeploymentPhase.java deleted file mode 100644 index 86dbf9914..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/AbstractAppDeploymentPhase.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.codehaus.plexus.appserver.application.deploy.lifecycle.phase; - -import org.codehaus.plexus.appserver.AppServerObject; - -/** - * @author Jason van Zyl - */ -public abstract class AbstractAppDeploymentPhase - extends AppServerObject - implements AppDeploymentPhase -{ -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/AfterAppStartServiceSetupPhase.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/AfterAppStartServiceSetupPhase.java deleted file mode 100644 index e99d9a60b..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/AfterAppStartServiceSetupPhase.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.plexus.appserver.application.deploy.lifecycle.phase; - -import org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentContext; -import org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentException; -import org.codehaus.plexus.appserver.application.profile.AppRuntimeProfile; -import org.codehaus.plexus.appserver.service.PlexusService; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * @author Jason van Zyl - */ -public class AfterAppStartServiceSetupPhase - extends AbstractAppDeploymentPhase -{ - public void execute( AppDeploymentContext context ) - throws AppDeploymentException - { - AppRuntimeProfile profile = context.getAppRuntimeProfile(); - - for ( int i = 0; i < profile.getServices().size(); i++ ) - { - PlexusService service = (PlexusService) profile.getServices().get( i ); - - PlexusConfiguration configuration = (PlexusConfiguration) profile.getServiceConfigurations().get( i ); - - try - { - service.afterApplicationStart( profile, configuration ); - } - catch ( Exception e ) - { - throw new AppDeploymentException( "Error calling service in pre-app init phase.", e ); - } - } - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/AppDeploymentPhase.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/AppDeploymentPhase.java deleted file mode 100644 index 1ffae49a1..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/AppDeploymentPhase.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.codehaus.plexus.appserver.application.deploy.lifecycle.phase; - -import org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentContext; -import org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentException; - -/** - * @author Jason van Zyl - */ -public interface AppDeploymentPhase -{ - String ROLE = AppDeploymentPhase.class.getName(); - - void execute( AppDeploymentContext context ) - throws AppDeploymentException; -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/AppInitializationPhase.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/AppInitializationPhase.java deleted file mode 100644 index 5ccb50858..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/AppInitializationPhase.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.codehaus.plexus.appserver.application.deploy.lifecycle.phase; - -import org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentContext; -import org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentException; - -/** - * @author Jason van Zyl - */ -public class AppInitializationPhase - extends AbstractAppDeploymentPhase -{ - public void execute( AppDeploymentContext context ) - throws AppDeploymentException - { - try - { - context.getApplicationContainer().initialize(); - - context.getApplicationContainer().start(); - } - catch ( Exception e ) - { - throw new AppDeploymentException( "Error starting Plexus.", e ); - } - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/BeforeAppStartServiceSetupPhase.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/BeforeAppStartServiceSetupPhase.java deleted file mode 100644 index 154c0bda3..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/BeforeAppStartServiceSetupPhase.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.codehaus.plexus.appserver.application.deploy.lifecycle.phase; - -import org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentContext; -import org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentException; -import org.codehaus.plexus.appserver.service.PlexusService; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.util.StringUtils; - -/** - * @author Jason van Zyl - */ -public class BeforeAppStartServiceSetupPhase - extends AbstractAppDeploymentPhase -{ - public void execute( AppDeploymentContext context ) - throws AppDeploymentException - { - PlexusConfiguration[] services = context.getAppConfiguration().getChild( "services" ).getChildren( "service" ); - - for ( int i = 0; i < services.length; i++ ) - { - PlexusConfiguration serviceConfiguration = services[i]; - - String id = serviceConfiguration.getChild( "id" ).getValue( "" ); - - if ( StringUtils.isEmpty( id ) ) - { - throw new AppDeploymentException( "Missing child element 'id' in 'service'." ); - } - - PlexusService service; - - try - { - service = (PlexusService) context.getAppServerContainer().lookup( PlexusService.ROLE, id ); - } - catch ( ComponentLookupException e ) - { - throw new AppDeploymentException( "Error looking up service for pre app init call.", e ); - } - - PlexusConfiguration conf = serviceConfiguration.getChild( "configuration" ); - - context.getAppRuntimeProfile().addService( id, service, conf ); - - try - { - service.beforeApplicationStart( context.getAppRuntimeProfile(), conf ); - } - catch ( Exception e ) - { - throw new AppDeploymentException( "Error executing service.", e ); - } - } - - context.getDeployments().put( context.getApplicationId(), context.getAppRuntimeProfile() ); - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/CreateAppContainerPhase.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/CreateAppContainerPhase.java deleted file mode 100644 index 61b6bc88b..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/CreateAppContainerPhase.java +++ /dev/null @@ -1,276 +0,0 @@ -package org.codehaus.plexus.appserver.application.deploy.lifecycle.phase; - -import org.codehaus.classworlds.ClassRealm; -import org.codehaus.classworlds.ClassWorld; -import org.codehaus.classworlds.DuplicateRealmException; -import org.codehaus.plexus.DefaultPlexusContainer; -import org.codehaus.plexus.PlexusContainerException; -import org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentContext; -import org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentException; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration; -import org.codehaus.plexus.context.ContextException; -import org.codehaus.plexus.context.ContextMapAdapter; -import org.codehaus.plexus.util.InterpolationFilterReader; -import org.codehaus.plexus.util.xml.Xpp3Dom; -import org.codehaus.plexus.util.xml.Xpp3DomBuilder; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.net.URL; -import java.net.URLClassLoader; -import java.util.Enumeration; -import java.util.Iterator; -import java.util.Map; -import java.util.Properties; - -/** - * @author Jason van Zyl - */ -public class CreateAppContainerPhase - extends AbstractAppDeploymentPhase -{ - public void execute( AppDeploymentContext context ) - throws AppDeploymentException - { - DefaultPlexusContainer appServerContainer = context.getAppServerContainer(); - - String name = "plexus.application." + context.getApplicationId(); - - getLogger().info( "Using appDir = " + context.getAppDir() ); - - DefaultPlexusContainer applicationContainer = null; - - try - { - applicationContainer = - new DefaultPlexusContainer( name, appServerContainer.getClassWorld(), appServerContainer ); - } - catch ( PlexusContainerException e ) - { - throw new AppDeploymentException( "Error starting container.", e ); - } - - try - { - InputStream stream = new FileInputStream( context.getAppConfigurationFile() ); - - Reader r = new InputStreamReader( stream ); - - applicationContainer.setConfigurationResource( r ); - } - catch ( Exception e ) - { - throw new AppDeploymentException( "Error processing application configurator.", e ); - } - - Properties contextValues = context.getContext(); - - if ( contextValues != null ) - { - for ( Iterator i = contextValues.keySet().iterator(); i.hasNext(); ) - { - String contextName = (String) i.next(); - - applicationContainer.addContextValue( contextName, contextValues.getProperty( contextName ) ); - } - } - - // ---------------------------------------------------------------------- - // We want to set ${app.home} and we want to create a new realm for the - // appserver. Need to think about how to really separate the apps - // from the parent container. - // ---------------------------------------------------------------------- - - try - { - String plexusHome = (String) context.getAppServerContainer().getContext().get( "plexus.home" ); - - applicationContainer.addContextValue( "appserver.home", new File( plexusHome ).getCanonicalPath() ); - } - catch ( Exception e ) - { - // Won't happen - } - - // ---------------------------------------------------------------------------- - // Make the application's home directory available in the context - // ---------------------------------------------------------------------------- - applicationContainer.addContextValue( "plexus.home", context.getAppDir().getAbsolutePath() ); - - applicationContainer.addContextValue( "app.home", context.getAppDir().getAbsolutePath() ); - - // ---------------------------------------------------------------------------- - // Make the user's home directory available in the context - // ---------------------------------------------------------------------------- - applicationContainer.addContextValue( "user.home", System.getProperty( "user.home" ) ); - - Object appserver = null; - - try - { - appserver = appServerContainer.getContext().get( "plexus.appserver" ); - } - catch ( ContextException e ) - { - // won't happen. - } - - applicationContainer.addContextValue( "plexus.appserver", appserver ); - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - Map ctx = new ContextMapAdapter( applicationContainer.getContext() ); - - Xpp3Dom dom; - - try - { - Reader configurationReader = - new InterpolationFilterReader( new FileReader( context.getAppConfigurationFile() ), ctx ); - - dom = Xpp3DomBuilder.build( configurationReader ); - } - catch ( Exception e ) - { - throw new AppDeploymentException( "Error processing application configurator.", e ); - } - - PlexusConfiguration applicationConfiguration = new XmlPlexusConfiguration( dom ); - - context.setAppConfiguration( applicationConfiguration ); - - context.setApplicationContainer( applicationContainer ); - } - - // ---------------------------------------------------------------------------- - // These were specifically made so that a WAR file deploy with Jetty in a - // standard way would work properly. The relationship that ClassWorlds sets - // up among classloaders doesn't appear to work in standard situations - // which is bad. - // ---------------------------------------------------------------------------- - - class SimpleClassLoader - extends URLClassLoader - { - public SimpleClassLoader( ClassLoader classLoader ) - { - super( new URL[0], classLoader ); - } - - public void addURL( URL url ) - { - super.addURL( url ); - } - } - - class SimpleClassRealm - implements ClassRealm - { - private String id; - - private ClassWorld world; - - SimpleClassLoader classLoader; - - public SimpleClassRealm( String id, SimpleClassLoader classLoader, ClassWorld world ) - { - this.id = id; - this.classLoader = classLoader; - this.world = world; - } - - public String getId() - { - return id; - } - - public void addConstituent( URL url ) - { - classLoader.addURL( url ); - } - - public ClassRealm locateSourceRealm( String a ) - { - throw new UnsupportedOperationException(); - } - - public ClassLoader getClassLoader() - { - return classLoader; - } - - public URL[] getConstituents() - { - return classLoader.getURLs(); - } - - public Class loadClass( String name ) - throws ClassNotFoundException - { - return classLoader.loadClass( name ); - } - - public URL getResource( String name ) - { - return classLoader.getResource( name ); - } - - public Enumeration findResources( String name ) - throws IOException - { - return classLoader.findResources( name ); - } - - // ---------------------------------------------------------------------------- - // Things we don't care about, we'll use normal classloader semantics. - // ---------------------------------------------------------------------------- - - public ClassWorld getWorld() - { - return world; - } - - public void importFrom( String a, String b ) - { - throw new UnsupportedOperationException(); - } - - public void setParent( ClassRealm c ) - { - } - - public InputStream getResourceAsStream( String name ) - { - return classLoader.getResourceAsStream( name ); - } - - public ClassRealm getParent() - { - throw new UnsupportedOperationException(); - } - - public ClassRealm createChildRealm( String id ) - throws DuplicateRealmException - { - throw new UnsupportedOperationException(); - } - - public void display() - { - URL[] urls = classLoader.getURLs(); - - for ( int i = 0; i < urls.length; i++ ) - { - System.out.println( "url = " + urls[i] ); - } - } - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/CreateAppRuntimeProfilePhase.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/CreateAppRuntimeProfilePhase.java deleted file mode 100644 index 0d76167c0..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/CreateAppRuntimeProfilePhase.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.codehaus.plexus.appserver.application.deploy.lifecycle.phase; - -import org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentContext; -import org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentException; -import org.codehaus.plexus.appserver.application.profile.AppRuntimeProfile; - -/** - * @author Jason van Zyl - */ -public class CreateAppRuntimeProfilePhase - extends AbstractAppDeploymentPhase -{ - public void execute( AppDeploymentContext context ) - throws AppDeploymentException - { - AppRuntimeProfile profile = new AppRuntimeProfile( context.getApplicationId(), - context.getApplicationsDirectory(), context.getPar(), - context.getApplicationContainer(), - context.getAppServerContainer(), - context.getAppConfiguration() ); - - context.setAppRuntimeProfile( profile ); - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/CreateApplicationDescriptorPhase.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/CreateApplicationDescriptorPhase.java deleted file mode 100644 index 90e69f620..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/CreateApplicationDescriptorPhase.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.codehaus.plexus.appserver.application.deploy.lifecycle.phase; - -import org.codehaus.plexus.appserver.AppDescriptor; -import org.codehaus.plexus.appserver.AppServerObject; -import org.codehaus.plexus.appserver.ApplicationServer; -import org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentContext; -import org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentException; - -/** - * @author Jason van Zyl - */ -public class CreateApplicationDescriptorPhase - extends AppServerObject - implements AppDeploymentPhase -{ - public void execute( AppDeploymentContext context ) - throws AppDeploymentException - { - ApplicationServer appServer = context.getAppServer(); - - AppDescriptor appDescriptor = new AppDescriptor( context.getApplicationId(), context.getApplicationId(), - context.getPar(), context.getAppDir() ); - - appServer.addAppDescriptor( appDescriptor ); - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/ExpandAppPhase.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/ExpandAppPhase.java deleted file mode 100644 index 157b09a7f..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/ExpandAppPhase.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.codehaus.plexus.appserver.application.deploy.lifecycle.phase; - -import org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentContext; -import org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentException; -import org.codehaus.plexus.appserver.deploy.DeploymentException; -import org.codehaus.plexus.util.FileUtils; - -import java.io.File; - -/** - * @author Jason van Zyl - */ -public class ExpandAppPhase - extends AbstractAppDeploymentPhase -{ - public void execute( AppDeploymentContext context ) - throws AppDeploymentException - { - String appId = context.getApplicationId(); - - File directory = context.getApplicationsDirectory(); - - File file = context.getPar(); - - File location = FileUtils.resolveFile( directory, appId ); - - // Don't extract if it has been extracted before. - if ( location.exists() ) - { - getLogger().info( "Application '" + appId + "' already extracted." ); - } - else - { - getLogger().info( "Extracting " + file + " to '" + location.getAbsolutePath() + "'." ); - - try - { - expand( file, location, false ); - } - catch ( DeploymentException e ) - { - throw new AppDeploymentException( "Could not deploy the JAR", e ); - } - } - - getLogger().info( "Deploying application '" + appId + "' at '" + location.getAbsolutePath() + "'." ); - - if ( context.getDeployments().containsKey( appId ) ) - { - throw new AppDeploymentException( - "A appserver with the specified appId ('" + appId + "') already exists." ); - } - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/ProcessAppMetadataPhase.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/ProcessAppMetadataPhase.java deleted file mode 100644 index d764c833f..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/ProcessAppMetadataPhase.java +++ /dev/null @@ -1,79 +0,0 @@ -package org.codehaus.plexus.appserver.application.deploy.lifecycle.phase; - -import org.codehaus.plexus.appserver.PlexusApplicationConstants; -import org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentContext; -import org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentException; -import org.codehaus.plexus.util.StringUtils; -import org.codehaus.plexus.util.xml.Xpp3Dom; -import org.codehaus.plexus.util.xml.Xpp3DomBuilder; -import org.codehaus.plexus.util.xml.pull.XmlPullParserException; - -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.Reader; -import java.util.jar.JarFile; -import java.util.zip.ZipEntry; - -/** - * @author Jason van Zyl - */ -public class ProcessAppMetadataPhase - extends AbstractAppDeploymentPhase -{ - public void execute( AppDeploymentContext context ) - throws AppDeploymentException - { - Reader reader; - - JarFile jarFile = null; - - try - { - jarFile = new JarFile( context.getPar() ); - - ZipEntry entry = jarFile.getEntry( PlexusApplicationConstants.METADATA_FILE ); - - if ( entry == null ) - { - throw new AppDeploymentException( "The Plexus appserver jar is missing it's metadata file '" + - PlexusApplicationConstants.METADATA_FILE + "'." ); - } - - reader = new InputStreamReader( jarFile.getInputStream( entry ) ); - } - catch ( IOException e ) - { - throw new AppDeploymentException( "Error reading application JAR file: " + jarFile, e ); - } - - Xpp3Dom dom; - - try - { - dom = Xpp3DomBuilder.build( reader ); - } - catch ( XmlPullParserException e ) - { - throw new AppDeploymentException( "Error parsing application configurator file.", e ); - } - catch ( IOException e ) - { - throw new AppDeploymentException( "Error reading application configurator file.", e ); - } - - String appId = dom.getChild( "name" ).getValue(); - - if ( StringUtils.isEmpty( appId ) ) - { - throw new AppDeploymentException( "Missing 'name' element in the application metadata file." ); - } - - File appDir = new File( context.getApplicationsDirectory(), appId ); - - context.setAppDir( appDir ); - - // Put the found application id into the context. - context.setApplicationId( appId ); - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/ValidateAppPhase.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/ValidateAppPhase.java deleted file mode 100644 index 0f019b63f..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/deploy/lifecycle/phase/ValidateAppPhase.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.codehaus.plexus.appserver.application.deploy.lifecycle.phase; - -import org.codehaus.plexus.appserver.PlexusApplicationConstants; -import org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentContext; -import org.codehaus.plexus.appserver.application.deploy.lifecycle.AppDeploymentException; - -import java.io.File; - -/** - * @author Jason van Zyl - */ -public class ValidateAppPhase - extends AbstractAppDeploymentPhase -{ - public void execute( AppDeploymentContext context ) - throws AppDeploymentException - { - // ---------------------------------------------------------------------- - // We need to make sure that we have the basic requirements covered - // when deploying an appserver. The PAR may be incomplete or corrupt - // or a directory copied over just may not be intact. - // - // -> ${app}/conf/plexus.conf - // -> ${app}/lib - // ---------------------------------------------------------------------- - - File appDir = context.getAppDir(); - - String appId = context.getApplicationId(); - - File applicationConfigurationFile = new File( new File( appDir, PlexusApplicationConstants.CONF_DIRECTORY ), - PlexusApplicationConstants.CONFIGURATION_FILE ); - - if ( !applicationConfigurationFile.exists() ) - { - throw new AppDeploymentException( "The application '" + appId + "' does not have a valid " + - "configurator: " + applicationConfigurationFile + " does not exist!" ); - } - - context.setAppConfigurationFile( applicationConfigurationFile ); - - getLogger().info( "Using application configurator file " + applicationConfigurationFile + "." ); - - File applicationLibrary = new File( appDir, PlexusApplicationConstants.LIB_DIRECTORY ); - - if ( !applicationLibrary.exists() ) - { - throw new AppDeploymentException( "The appication '" + appId + "' does not have a valid library: " + - applicationLibrary + " does not exist!" ); - } - - context.setAppLibDirectory( applicationLibrary ); - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/event/ApplicationListener.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/event/ApplicationListener.java deleted file mode 100644 index 856e09941..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/event/ApplicationListener.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.codehaus.plexus.appserver.application.event; - -/* - * Copyright (c) 2004, Codehaus.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * Listens for appserver events. - * - * @author Dan Diephouse - * @since Jul 17, 2004 - */ -public interface ApplicationListener -{ - void deployedApplication( DeployEvent event ); - - void undeployedApplication( DeployEvent event ); - - void redeployedApplication( DeployEvent event ); -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/event/DefaultDeployEvent.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/event/DefaultDeployEvent.java deleted file mode 100644 index e4025b8bb..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/event/DefaultDeployEvent.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.codehaus.plexus.appserver.application.event; - -/* - * Copyright (c) 2004, Codehaus.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.appserver.application.profile.AppRuntimeProfile; - -/** - * Signals an (un/re)deployment event; - * - * @author Dan Diephouse - * @since Jul 17, 2004 - */ -public class DefaultDeployEvent - implements DeployEvent -{ - private AppRuntimeProfile runtimeProfile; - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - public DefaultDeployEvent( AppRuntimeProfile runtimeProfile ) - { - this.runtimeProfile = runtimeProfile; - } - - public AppRuntimeProfile getRuntimeProfile() - { - return runtimeProfile; - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/event/DeployEvent.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/event/DeployEvent.java deleted file mode 100644 index 087d7e5ae..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/event/DeployEvent.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.plexus.appserver.application.event; - -/* - * Copyright (c) 2004, Codehaus.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.appserver.application.profile.AppRuntimeProfile; - -/** - * Signals an (un/re)deployment event; - * - * @author Dan Diephouse - * @since Jul 17, 2004 - */ -public interface DeployEvent -{ - AppRuntimeProfile getRuntimeProfile(); -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/profile/AppRuntimeProfile.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/profile/AppRuntimeProfile.java deleted file mode 100644 index 4836723cb..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/application/profile/AppRuntimeProfile.java +++ /dev/null @@ -1,169 +0,0 @@ -package org.codehaus.plexus.appserver.application.profile; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.DefaultPlexusContainer; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.appserver.service.PlexusService; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -import java.io.File; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class AppRuntimeProfile -{ - private String name; - - private File home; - - private File lib; - - private DefaultPlexusContainer applicationContainer; - - private PlexusContainer applicationServerContainer; - - private PlexusConfiguration applicationConfiguration; - - /** - * @deprecated - */ - private List services; - - /** - * @deprecated - */ - private List serviceConfigurations; - - private Map serviceMap; - - private Map plexusConfigurationMap; - - private Map serviceConfigurationMap; - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - public AppRuntimeProfile( String name, File home, File lib, DefaultPlexusContainer applicationContainer, - PlexusContainer applicationServerContainer, PlexusConfiguration applicationConfiguration ) - { - this.name = name; - - this.home = home; - - this.lib = lib; - - this.applicationContainer = applicationContainer; - - this.applicationServerContainer = applicationServerContainer; - - this.applicationConfiguration = applicationConfiguration; - - this.services = new ArrayList(); - - this.serviceConfigurations = new ArrayList(); - - serviceMap = new HashMap(); - - plexusConfigurationMap = new HashMap(); - - serviceConfigurationMap = new HashMap(); - } - - public String getName() - { - return name; - } - - public File getHome() - { - return home; - } - - public File getLib() - { - return lib; - } - - public DefaultPlexusContainer getApplicationContainer() - { - return applicationContainer; - } - - public PlexusContainer getApplicationServerContainer() - { - return applicationServerContainer; - } - - public PlexusConfiguration getApplicationConfiguration() - { - return applicationConfiguration; - } - - public List getServices() - { - return Collections.unmodifiableList( new ArrayList( plexusConfigurationMap.keySet() ) ); - } - - public List getServiceConfigurations() - { - return Collections.unmodifiableList( new ArrayList ( plexusConfigurationMap.values() ) ); - } - - public PlexusService getService( String id ) - { - return (PlexusService) serviceMap.get( id ); - } - - public PlexusConfiguration getPlexusConfiguration( PlexusService service ) - { - return (PlexusConfiguration) plexusConfigurationMap.get( service ); - } - - public void addService( String id, PlexusService service, PlexusConfiguration configuration ) - { - plexusConfigurationMap.put( service, configuration ); - - serviceMap.put( id, service ); - } - - public Object getServiceConfiguration( PlexusService service ) - { - return serviceConfigurationMap.get( service ); - } - - public void addServiceConfiguration( PlexusService service, Object configuration ) - { - serviceConfigurationMap.put( service, configuration ); - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/deploy/AbstractDeployer.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/deploy/AbstractDeployer.java deleted file mode 100644 index fffd7feda..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/deploy/AbstractDeployer.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.codehaus.plexus.appserver.deploy; - -import org.codehaus.plexus.appserver.AppServerObject; - -/** - * @author Jason van Zyl - */ -public abstract class AbstractDeployer - extends AppServerObject - implements Deployer -{ -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/deploy/Deployer.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/deploy/Deployer.java deleted file mode 100644 index 53e7d23d1..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/deploy/Deployer.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.codehaus.plexus.appserver.deploy; - -import org.codehaus.plexus.appserver.ApplicationServerException; - -import java.io.File; - -/** - * @author Jason van Zyl - */ -public interface Deployer -{ - String ROLE = Deployer.class.getName(); - - void deploy( String id, File location ) - throws ApplicationServerException; - - void redeploy( String id ) - throws ApplicationServerException; - - void undeploy( String id ) - throws ApplicationServerException; - -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/deploy/DeploymentException.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/deploy/DeploymentException.java deleted file mode 100644 index 16ea9795d..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/deploy/DeploymentException.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.codehaus.plexus.appserver.deploy; - -/** - * @author Jason van Zyl - */ -public class DeploymentException - extends Exception -{ - public DeploymentException( String string ) - { - super( string ); - } - - public DeploymentException( String string, Throwable throwable ) - { - super( string, throwable ); - } - - public DeploymentException( Throwable throwable ) - { - super( throwable ); - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/lifecycle/AppServerContext.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/lifecycle/AppServerContext.java deleted file mode 100644 index 032b4c821..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/lifecycle/AppServerContext.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.codehaus.plexus.appserver.lifecycle; - -import org.codehaus.plexus.appserver.ApplicationServer; - -import java.io.File; - -/** - * @author Jason van Zyl - */ -public class AppServerContext -{ - private ApplicationServer appServer; - - private File appServerHome; - - public AppServerContext( ApplicationServer appServer, File appServerHome ) - { - this.appServer = appServer; - this.appServerHome = appServerHome; - } - - public ApplicationServer getAppServer() - { - return appServer; - } - - public File getAppServerHome() - { - return appServerHome; - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/lifecycle/AppServerLifecycleException.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/lifecycle/AppServerLifecycleException.java deleted file mode 100644 index 1ffe1a738..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/lifecycle/AppServerLifecycleException.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.codehaus.plexus.appserver.lifecycle; - -/** - * @author Jason van Zyl - */ -public class AppServerLifecycleException - extends Exception -{ - public AppServerLifecycleException( String string ) - { - super( string ); - } - - public AppServerLifecycleException( String string, Throwable throwable ) - { - super( string, throwable ); - } - - public AppServerLifecycleException( Throwable throwable ) - { - super( throwable ); - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/lifecycle/phase/AbstractAppServerPhase.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/lifecycle/phase/AbstractAppServerPhase.java deleted file mode 100644 index 9c5b87865..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/lifecycle/phase/AbstractAppServerPhase.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.codehaus.plexus.appserver.lifecycle.phase; - -import org.codehaus.plexus.logging.AbstractLogEnabled; - -/** - * @author Jason van Zyl - */ -public abstract class AbstractAppServerPhase - extends AbstractLogEnabled - implements AppServerPhase -{ -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/lifecycle/phase/AppServerPhase.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/lifecycle/phase/AppServerPhase.java deleted file mode 100644 index 1093292b3..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/lifecycle/phase/AppServerPhase.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.codehaus.plexus.appserver.lifecycle.phase; - -import org.codehaus.plexus.appserver.lifecycle.AppServerContext; -import org.codehaus.plexus.appserver.lifecycle.AppServerLifecycleException; - -/** - * @author Jason van Zyl - */ -public interface AppServerPhase -{ - String ROLE = AppServerPhase.class.getName(); - - void execute( AppServerContext context ) - throws AppServerLifecycleException; -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/lifecycle/phase/ApplicationDeploymentPhase.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/lifecycle/phase/ApplicationDeploymentPhase.java deleted file mode 100644 index c73e87f36..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/lifecycle/phase/ApplicationDeploymentPhase.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.codehaus.plexus.appserver.lifecycle.phase; - -import org.codehaus.plexus.appserver.application.deploy.ApplicationDeployer; -import org.codehaus.plexus.appserver.lifecycle.AppServerContext; -import org.codehaus.plexus.appserver.lifecycle.AppServerLifecycleException; -import org.codehaus.plexus.appserver.supervisor.Supervisor; -import org.codehaus.plexus.appserver.supervisor.SupervisorException; -import org.codehaus.plexus.appserver.supervisor.SupervisorListener; - -import java.io.File; - -/** - * @author Jason van Zyl - */ -public class ApplicationDeploymentPhase - extends AbstractAppServerPhase -{ - private ApplicationDeployer applicationDeployer; - - private Supervisor applicationSupervisor; - - public void execute( AppServerContext context ) - throws AppServerLifecycleException - { - try - { - applicationSupervisor.addDirectory( new File( context.getAppServerHome(), "apps" ), new SupervisorListener() - { - public void onJarDiscovered( File jar ) - { - String name = jar.getName(); - - try - { - String appName = name.substring( 0, name.length() - 4 ); - - getLogger().info( applicationSupervisor.getName() + " is deploying " + appName + "." ); - - applicationDeployer.deploy( appName, jar ); - } - catch ( Exception e ) - { - getLogger().error( "Error while deploying appserver " + name + ".", e ); - } - } - } ); - - applicationSupervisor.scan(); - } - catch ( SupervisorException e ) - { - throw new AppServerLifecycleException( "Error deploying applications in the app server.", e ); - } - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/lifecycle/phase/ServiceDeploymentPhase.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/lifecycle/phase/ServiceDeploymentPhase.java deleted file mode 100644 index 46f2317b4..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/lifecycle/phase/ServiceDeploymentPhase.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.codehaus.plexus.appserver.lifecycle.phase; - -import org.codehaus.plexus.appserver.lifecycle.AppServerContext; -import org.codehaus.plexus.appserver.lifecycle.AppServerLifecycleException; -import org.codehaus.plexus.appserver.service.deploy.ServiceDeployer; -import org.codehaus.plexus.appserver.supervisor.Supervisor; -import org.codehaus.plexus.appserver.supervisor.SupervisorException; -import org.codehaus.plexus.appserver.supervisor.SupervisorListener; - -import java.io.File; - -/** - * @author Jason van Zyl - */ -public class ServiceDeploymentPhase - extends AbstractAppServerPhase -{ - private ServiceDeployer serviceDeployer; - - private Supervisor serviceSupervisor; - - public void execute( AppServerContext context ) - throws AppServerLifecycleException - { - try - { - serviceSupervisor.addDirectory( new File( context.getAppServerHome(), "services" ), new SupervisorListener() - { - public void onJarDiscovered( File jar ) - { - String name = jar.getName(); - - try - { - String serviceName = name.substring( 0, name.length() - 4 ); - - getLogger().info( serviceSupervisor.getName() + " is deploying " + serviceName + "." ); - - serviceDeployer.deploy( serviceName, jar ); - } - catch ( Exception e ) - { - getLogger().error( "Error while deploying service " + name + ".", e ); - } - } - } ); - - serviceSupervisor.scan(); - } - catch ( SupervisorException e ) - { - throw new AppServerLifecycleException( "Error deploying services in the app server.", e ); - } - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/management/AbstractMBean.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/management/AbstractMBean.java deleted file mode 100644 index 4008619fc..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/management/AbstractMBean.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.codehaus.plexus.appserver.management; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * @author Emmanuel Venisse - * @version $Id$ - */ -public abstract class AbstractMBean - implements MBean -{ - public String getDomain() - { - return "PlexusAppServer"; - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/management/Agent.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/management/Agent.java deleted file mode 100644 index 5d143abc7..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/management/Agent.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.codehaus.plexus.appserver.management; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * @author Emmanuel Venisse - * @version $Id$ - */ -public interface Agent -{ - static final String ROLE = Agent.class.getName(); -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/management/ApplicationServerMBean.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/management/ApplicationServerMBean.java deleted file mode 100644 index f7e8380e1..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/management/ApplicationServerMBean.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.codehaus.plexus.appserver.management; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.appserver.ApplicationServer; -import org.codehaus.plexus.appserver.ApplicationServerException; - -import java.io.File; - -/** - * @author Emmanuel Venisse - * @version $Id$ - * @plexus.component role="org.codehaus.plexus.appserver.management.MBean" role-hint="applicationServer" - */ -public class ApplicationServerMBean - extends AbstractMBean - implements ApplicationServerMBeanMBean -{ - /** - * @plexus.requirement - */ - ApplicationServer appserver; - - public String getName() - { - return "ApplicationServer"; - } - - public void deploy( String id, File location ) - throws ApplicationServerException - { - appserver.deploy( id, location ); - } - - public void redeploy( String id ) - throws ApplicationServerException - { - appserver.redeploy( id ); - } - - public void undeploy( String id ) - throws ApplicationServerException - { - appserver.undeploy( id ); - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/management/ApplicationServerMBeanMBean.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/management/ApplicationServerMBeanMBean.java deleted file mode 100644 index e5e1d3c27..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/management/ApplicationServerMBeanMBean.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.codehaus.plexus.appserver.management; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.appserver.ApplicationServerException; - -import java.io.File; - -/** - * @author Emmanuel Venisse - * @version $Id$ - */ -public interface ApplicationServerMBeanMBean - extends MBean -{ - void deploy( String id, File location ) - throws ApplicationServerException; - - void redeploy( String id ) - throws ApplicationServerException; - - void undeploy( String id ) - throws ApplicationServerException; -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/management/DefaultAgent.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/management/DefaultAgent.java deleted file mode 100644 index 72370cd0d..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/management/DefaultAgent.java +++ /dev/null @@ -1,148 +0,0 @@ -package org.codehaus.plexus.appserver.management; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.context.Context; -import org.codehaus.plexus.context.ContextException; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; -import org.codehaus.plexus.util.FileUtils; -import org.livetribe.slp.Attributes; -import org.livetribe.slp.Scopes; -import org.livetribe.slp.ServiceInfo; -import org.livetribe.slp.ServiceURL; -import org.livetribe.slp.api.sa.StandardServiceAgent; - -import javax.management.MBeanServer; -import javax.management.MBeanServerFactory; -import javax.management.ObjectName; -import javax.management.remote.JMXConnectorServer; -import javax.management.remote.JMXConnectorServerFactory; -import javax.management.remote.JMXServiceURL; -import java.io.File; -import java.io.FileOutputStream; -import java.util.Iterator; -import java.util.List; -import java.util.Locale; -import java.util.Properties; - -/** - * @author Emmanuel Venisse - * @version $Id$ - */ -public class DefaultAgent - extends AbstractLogEnabled - implements Agent, Initializable, Contextualizable -{ - /** - * @plexus.requirement role="org.codehaus.plexus.appserver.management.MBean" - */ - private List mbeans; - - /** - * @plexus.configuration default-value="service:jmx:rmi:///" - */ - private String serviceUrl; - - /** - * @plexus.configuration default-value="3427" - */ - private int slpPort; - - private MBeanServer mbeanServer; - - private JMXServiceURL jmxServiceURL; - - private String tempDirectory; - - public void initialize() - throws InitializationException - { - try - { - mbeanServer = MBeanServerFactory.createMBeanServer(); - - // Register mbeans - if ( mbeans != null ) - { - for ( Iterator i = mbeans.iterator(); i.hasNext(); ) - { - MBean mbean = (MBean) i.next(); - mbeanServer.registerMBean( mbean, - new ObjectName( mbean.getDomain() + ":name=" + mbean.getName() ) ); - } - } - - // Attach a JMXConnectorServer to the platform MBeanServer - jmxServiceURL = new JMXServiceURL( serviceUrl ); - - JMXConnectorServer connectorServer = - JMXConnectorServerFactory.newJMXConnectorServer( jmxServiceURL, null, mbeanServer ); - connectorServer.start(); - - // Refresh the JMXServiceURL after the JMXConnectorServer has started - jmxServiceURL = connectorServer.getAddress(); - - // Now advertise the JMXConnectorServer service via SLP - - // Convert JMXServiceURL (JMX) to ServiceURL (SLP) - ServiceURL serviceURL = new ServiceURL( jmxServiceURL.toString() ); - Scopes scopes = Scopes.DEFAULT; - Attributes attributes = null; - String language = Locale.ENGLISH.getLanguage(); - ServiceInfo serviceInfo = new ServiceInfo( serviceURL, scopes, attributes, language ); - - // Create the SLP ServiceAgent that advertises the JMX service - StandardServiceAgent serviceAgent = new StandardServiceAgent(); - // Allow this code to be run by non-root users on Linux/Unix - serviceAgent.setPort( slpPort ); - // Register the service and start the SLP ServiceAgent - serviceAgent.register( serviceInfo ); - serviceAgent.start(); - - File serviceFile = new File( tempDirectory, "agent.properties" ); - Properties props = new Properties(); - props.put( "jmxServiceUrl", jmxServiceURL.toString() ); - props.put( "slpPort", String.valueOf( slpPort ) ); - props.store( new FileOutputStream( serviceFile ), null ); - FileUtils.forceDeleteOnExit( serviceFile ); - - getLogger().info( "JMX manager agent is up and running (" + jmxServiceURL + ")." ); - getLogger().info( "JMX agent is registered in SLP service on port " + slpPort ); - } - catch ( Exception e ) - { - throw new InitializationException( "Can't load JMX agent.", e ); - } - } - - public void contextualize( Context context ) - throws ContextException - { - tempDirectory = (String) context.get( "plexus.temp" ); - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/management/MBean.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/management/MBean.java deleted file mode 100644 index e3f089957..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/management/MBean.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.codehaus.plexus.appserver.management; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * @author Emmanuel Venisse - * @version $Id$ - */ -public interface MBean -{ - static final String ROLE = MBean.class.getName(); - - String getDomain(); - - String getName(); -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/AbstractPlexusService.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/AbstractPlexusService.java deleted file mode 100644 index e636e73f7..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/AbstractPlexusService.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.codehaus.plexus.appserver.service; - -import org.codehaus.plexus.appserver.AppServerObject; - -/** - * @author Jason van Zyl - */ -public abstract class AbstractPlexusService - extends AppServerObject - implements PlexusService -{ -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/PlexusService.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/PlexusService.java deleted file mode 100644 index 29b185e53..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/PlexusService.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.codehaus.plexus.appserver.service; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.appserver.application.profile.AppRuntimeProfile; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public interface PlexusService -{ - String ROLE = PlexusService.class.getName(); - - void beforeApplicationStart( AppRuntimeProfile appRuntimeProfile, PlexusConfiguration serviceConfiguration ) - throws Exception; - - void afterApplicationStart( AppRuntimeProfile appRuntimeProfile, PlexusConfiguration serviceConfiguration ) - throws Exception; - - void applicationStop( AppRuntimeProfile runtimeProfile ) - throws Exception; -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/ServiceBuilder.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/ServiceBuilder.java deleted file mode 100644 index be3a1cb49..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/ServiceBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.codehaus.plexus.appserver.service; - -/* - * Copyright (c) 2004, Codehaus.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * A bean which builds services. - * - * @author Dan Diephouse - * @since Jul 17, 2004 - */ -public class ServiceBuilder -{ - private String userConfig; - - private String targetDirectory; - - private String targetJar; -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/configurator/DefaultServiceConfigurator.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/configurator/DefaultServiceConfigurator.java deleted file mode 100644 index 939c5342f..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/configurator/DefaultServiceConfigurator.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.codehaus.plexus.appserver.service.configurator; - -import org.codehaus.classworlds.ClassRealm; -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.ComponentConfigurator; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.logging.AbstractLogEnabled; - -/** - * @author Jason van Zyl - * @version $Id$ - */ -public class DefaultServiceConfigurator - extends AbstractLogEnabled - implements ServiceConfigurator -{ - private ComponentConfigurator configurator; - - public Object configure( Object serviceConfiguration, PlexusConfiguration configuration, ClassRealm realm ) - throws ComponentConfigurationException - { - configurator.configureComponent( serviceConfiguration, configuration, realm ); - - return serviceConfiguration; - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/configurator/ServiceConfigurator.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/configurator/ServiceConfigurator.java deleted file mode 100644 index f7989e1ce..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/configurator/ServiceConfigurator.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.codehaus.plexus.appserver.service.configurator; - -import org.codehaus.classworlds.ClassRealm; -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * @author Jason van Zyl - * @version $Id$ - */ -public interface ServiceConfigurator -{ - String ROLE = ServiceConfigurator.class.getName(); - - Object configure( Object configurationObject, PlexusConfiguration serviceConfiguration, ClassRealm realm ) - throws ComponentConfigurationException; -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/DefaultServiceDeployer.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/DefaultServiceDeployer.java deleted file mode 100644 index 5f9c47aa3..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/DefaultServiceDeployer.java +++ /dev/null @@ -1,121 +0,0 @@ -package org.codehaus.plexus.appserver.service.deploy; - -/* - * Copyright (c) 2004, Codehaus.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.DefaultPlexusContainer; -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.appserver.ApplicationServerException; -import org.codehaus.plexus.appserver.deploy.AbstractDeployer; -import org.codehaus.plexus.appserver.service.deploy.lifecycle.ServiceDeploymentContext; -import org.codehaus.plexus.appserver.service.deploy.lifecycle.ServiceDeploymentException; -import org.codehaus.plexus.appserver.service.deploy.lifecycle.phase.ServiceDeploymentPhase; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.context.Context; -import org.codehaus.plexus.context.ContextException; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; - -import java.io.File; -import java.util.Iterator; -import java.util.List; - -/** - * @author Dan Diephouse - * @author Jason van Zyl - * @since Jul 17, 2004 - */ -public class DefaultServiceDeployer - extends AbstractDeployer - implements ServiceDeployer, Initializable, Contextualizable -{ - private File servicesDirectory; - - private DefaultPlexusContainer container; - - private List phases; - - // ---------------------------------------------------------------------- - // ServiceDeployer Implementation - // ---------------------------------------------------------------------- - - public void deploy( String serviceId, File location ) - throws ApplicationServerException - { - deploy( serviceId, location, true ); - } - - private void deploy( String id, File sar, boolean expandSar ) - throws ApplicationServerException - { - ServiceDeploymentContext context = new ServiceDeploymentContext( id, sar, servicesDirectory, container ); - - for ( Iterator i = phases.iterator(); i.hasNext(); ) - { - String phaseId = (String) i.next(); - - try - { - ServiceDeploymentPhase phase = - (ServiceDeploymentPhase) container.lookup( ServiceDeploymentPhase.ROLE, phaseId ); - - phase.execute( context ); - } - catch ( ComponentLookupException e ) - { - throw new ApplicationServerException( - "The requested app server lifecycle phase cannot be found: " + phaseId, e ); - } - catch ( ServiceDeploymentException e ) - { - throw new ApplicationServerException( "Error executing service deployment id.", e ); - } - } - } - - public void redeploy( String id ) - throws ApplicationServerException - { - } - - public void undeploy( String id ) - throws ApplicationServerException - { - } - - // ---------------------------------------------------------------------- - // Component Lifecycle - // ---------------------------------------------------------------------- - - public void initialize() - throws InitializationException - { - getLogger().info( "Services will be deployed in: '" + servicesDirectory + "'." ); - } - - public void contextualize( Context context ) - throws ContextException - { - container = (DefaultPlexusContainer) context.get( PlexusConstants.PLEXUS_KEY ); - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/ServiceDeployer.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/ServiceDeployer.java deleted file mode 100644 index 6d3b2128f..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/ServiceDeployer.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.plexus.appserver.service.deploy; - -import org.codehaus.plexus.appserver.deploy.Deployer; - -/* - * Copyright (c) 2004, Codehaus.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * @author Dan Diephouse - * @author Jason van Zyl - * @since Jul 17, 2004 - */ -public interface ServiceDeployer - extends Deployer -{ - String ROLE = ServiceDeployer.class.getName(); -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/ServiceDeploymentContext.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/ServiceDeploymentContext.java deleted file mode 100644 index 53caaff33..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/ServiceDeploymentContext.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.codehaus.plexus.appserver.service.deploy.lifecycle; - -import org.codehaus.plexus.DefaultPlexusContainer; - -import java.io.File; - -/** - * @author Jason van Zyl - */ -public class ServiceDeploymentContext -{ - String serviceId; - - File sar; - - File servicesDirectory; - - DefaultPlexusContainer container; - - // ---------------------------------------------------------------------------- - // - // ---------------------------------------------------------------------------- - - File serviceDirectory; - - public ServiceDeploymentContext( String serviceId, File sar, File servicesDirectory, - DefaultPlexusContainer container ) - { - this.serviceId = serviceId; - this.sar = sar; - this.servicesDirectory = servicesDirectory; - this.container = container; - } - - public String getServiceId() - { - return serviceId; - } - - public File getSar() - { - return sar; - } - - public File getServicesDirectory() - { - return servicesDirectory; - } - - public DefaultPlexusContainer getContainer() - { - return container; - } - - // ---------------------------------------------------------------------------- - // - // ---------------------------------------------------------------------------- - - public void setServiceDirectory( File serviceDirectory ) - { - this.serviceDirectory = serviceDirectory; - } - - public File getServiceDirectory() - { - return serviceDirectory; - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/ServiceDeploymentException.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/ServiceDeploymentException.java deleted file mode 100644 index 8f948c69e..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/ServiceDeploymentException.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.codehaus.plexus.appserver.service.deploy.lifecycle; - -/** - * @author Jason van Zyl - */ -public class ServiceDeploymentException - extends Exception -{ - public ServiceDeploymentException( String string ) - { - super( string ); - } - - public ServiceDeploymentException( String string, Throwable throwable ) - { - super( string, throwable ); - } - - public ServiceDeploymentException( Throwable throwable ) - { - super( throwable ); - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/phase/AbstractServiceDeploymentPhase.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/phase/AbstractServiceDeploymentPhase.java deleted file mode 100644 index 28fe3cd77..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/phase/AbstractServiceDeploymentPhase.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.codehaus.plexus.appserver.service.deploy.lifecycle.phase; - -import org.codehaus.plexus.appserver.AppServerObject; - -/** - * @author Jason van Zyl - */ -public abstract class AbstractServiceDeploymentPhase - extends AppServerObject - implements ServiceDeploymentPhase -{ -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/phase/AddServiceLibrariesPhase.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/phase/AddServiceLibrariesPhase.java deleted file mode 100644 index 48ae2881c..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/phase/AddServiceLibrariesPhase.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.codehaus.plexus.appserver.service.deploy.lifecycle.phase; - -import org.codehaus.plexus.appserver.service.deploy.lifecycle.ServiceDeploymentContext; -import org.codehaus.plexus.appserver.service.deploy.lifecycle.ServiceDeploymentException; - -import java.io.File; - -/** - * @author Jason van Zyl - */ -public class AddServiceLibrariesPhase - extends AbstractServiceDeploymentPhase -{ - public void execute( ServiceDeploymentContext context ) - throws ServiceDeploymentException - { - File libDir = new File( context.getServiceDirectory(), "lib" ); - - if ( !libDir.exists() ) - { - throw new ServiceDeploymentException( "The service must have a /lib directory." ); - } - - context.getContainer().addJarRepository( libDir ); - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/phase/DiscoverServiceComponentsPhase.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/phase/DiscoverServiceComponentsPhase.java deleted file mode 100644 index a5afb8b78..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/phase/DiscoverServiceComponentsPhase.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.codehaus.plexus.appserver.service.deploy.lifecycle.phase; - -import org.codehaus.plexus.appserver.service.deploy.lifecycle.ServiceDeploymentContext; -import org.codehaus.plexus.appserver.service.deploy.lifecycle.ServiceDeploymentException; -import org.codehaus.plexus.component.repository.exception.ComponentRepositoryException; -import org.codehaus.plexus.configuration.PlexusConfigurationException; - -/** - * @author Jason van Zyl - */ -public class DiscoverServiceComponentsPhase - extends AbstractServiceDeploymentPhase -{ - public void execute( ServiceDeploymentContext context ) - throws ServiceDeploymentException - { - try - { - context.getContainer().discoverComponents( context.getContainer().getContainerRealm() ); - } - catch ( PlexusConfigurationException e ) - { - throw new ServiceDeploymentException( "Error while looking for new service components.", e ); - } - catch ( ComponentRepositoryException e ) - { - throw new ServiceDeploymentException( "Error discovering components.", e ); - } - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/phase/ExpandServicePhase.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/phase/ExpandServicePhase.java deleted file mode 100644 index 64b2aaf31..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/phase/ExpandServicePhase.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.codehaus.plexus.appserver.service.deploy.lifecycle.phase; - -import org.codehaus.plexus.appserver.deploy.DeploymentException; -import org.codehaus.plexus.appserver.service.deploy.lifecycle.ServiceDeploymentContext; -import org.codehaus.plexus.appserver.service.deploy.lifecycle.ServiceDeploymentException; -import org.codehaus.plexus.util.FileUtils; - -import java.io.File; -import java.io.IOException; - -/** - * @author Jason van Zyl - */ -public class ExpandServicePhase - extends AbstractServiceDeploymentPhase -{ - public void execute( ServiceDeploymentContext context ) - throws ServiceDeploymentException - { - File serviceDir = new File( context.getServicesDirectory(), context.getServiceId() ); - - context.setServiceDirectory( serviceDir ); - - if ( serviceDir.exists() ) - { - getLogger().info( "Removing old service." ); - - try - { - FileUtils.deleteDirectory( serviceDir ); - } - catch ( IOException e ) - { - throw new ServiceDeploymentException( "Cannot delete old service deployment in " + serviceDir, e ); - } - } - - try - { - expand( context.getSar(), serviceDir, false ); - } - catch ( DeploymentException e ) - { - throw new ServiceDeploymentException( "Error expanding service archive.", e ); - } - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/phase/ProcessServiceConfigurationPhase.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/phase/ProcessServiceConfigurationPhase.java deleted file mode 100644 index 4f6d49653..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/phase/ProcessServiceConfigurationPhase.java +++ /dev/null @@ -1,95 +0,0 @@ -package org.codehaus.plexus.appserver.service.deploy.lifecycle.phase; - -import org.codehaus.plexus.DefaultPlexusContainer; -import org.codehaus.plexus.appserver.PlexusServiceConstants; -import org.codehaus.plexus.appserver.service.deploy.lifecycle.ServiceDeploymentContext; -import org.codehaus.plexus.appserver.service.deploy.lifecycle.ServiceDeploymentException; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.component.repository.io.PlexusTools; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.PlexusConfigurationException; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.Reader; - -/** - * @author Jason van Zyl - */ -public class ProcessServiceConfigurationPhase - extends AbstractServiceDeploymentPhase -{ - public void execute( ServiceDeploymentContext context ) - throws ServiceDeploymentException - { - File config = new File( new File( context.getServiceDirectory(), PlexusServiceConstants.CONF_DIRECTORY ), - PlexusServiceConstants.CONFIGURATION_FILE ); - - /** - * The first time the configurator runs, we don't care - * what the user configurator is, so only use the components.xml - * files. However, we still need to load on start components. - */ - - try - { - Reader reader = new FileReader( config ); - - PlexusConfiguration serviceConfig = PlexusTools.buildConfiguration( config.getPath(), reader ); - - startComponents( serviceConfig, context.getContainer() ); - } - catch ( FileNotFoundException e ) - { - throw new ServiceDeploymentException( "Cannot find configuration file.", e ); - } - catch ( PlexusConfigurationException e ) - { - throw new ServiceDeploymentException( "Error reading service configuration.", e ); - } - catch ( ComponentLookupException e ) - { - throw new ServiceDeploymentException( "Error starting service.", e ); - } - } - - private void startComponents( PlexusConfiguration serviceConfig, DefaultPlexusContainer container ) - throws PlexusConfigurationException, ComponentLookupException - { - PlexusConfiguration[] loadOnStartComponents = - serviceConfig.getChild( "load-on-start" ).getChildren( "component" ); - - getLogger().debug( "Found " + loadOnStartComponents.length + " components to load on start" ); - - for ( int i = 0; i < loadOnStartComponents.length; i++ ) - { - String role = loadOnStartComponents[i].getChild( "role" ).getValue( null ); - - String roleHint = loadOnStartComponents[i].getChild( "role-hint" ).getValue(); - - if ( role == null ) - { - throw new PlexusConfigurationException( "Missing 'role' element from load-on-start." ); - } - - if ( roleHint == null ) - { - getLogger().info( "Loading on start [role]: " + "[" + role + "]" ); - } - else - { - getLogger().info( "Loading on start [role,roleHint]: " + "[" + role + "," + roleHint + "]" ); - } - - if ( roleHint == null ) - { - container.lookup( role ); - } - else - { - container.lookup( role, roleHint ); - } - } - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/phase/ServiceDeploymentPhase.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/phase/ServiceDeploymentPhase.java deleted file mode 100644 index e9b88f73c..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/service/deploy/lifecycle/phase/ServiceDeploymentPhase.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.codehaus.plexus.appserver.service.deploy.lifecycle.phase; - -import org.codehaus.plexus.appserver.service.deploy.lifecycle.ServiceDeploymentContext; -import org.codehaus.plexus.appserver.service.deploy.lifecycle.ServiceDeploymentException; - -/** - * @author Jason van Zyl - */ -public interface ServiceDeploymentPhase -{ - String ROLE = ServiceDeploymentPhase.class.getName(); - - void execute( ServiceDeploymentContext context ) - throws ServiceDeploymentException; -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/supervisor/DefaultSupervisor.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/supervisor/DefaultSupervisor.java deleted file mode 100644 index 075d676cb..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/supervisor/DefaultSupervisor.java +++ /dev/null @@ -1,103 +0,0 @@ -package org.codehaus.plexus.appserver.supervisor; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.io.File; -import java.io.FileFilter; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class DefaultSupervisor - implements Supervisor -{ - private List directories = new ArrayList(); - - private String name; - - private String extension; - - // ---------------------------------------------------------------------- - // Supervisor Implementation - // ---------------------------------------------------------------------- - - public void addDirectory( File directory, SupervisorListener listener ) - throws SupervisorException - { - if ( !directory.isDirectory() ) - { - throw new SupervisorException( - "The specified directory doesn't exists or isn't a directory: '" + directory.getAbsolutePath() + "'." ); - } - - directories.add( new SupervisedDirectory( directory, listener ) ); - } - - public void scan() - throws SupervisorException - { - for ( Iterator it = directories.iterator(); it.hasNext(); ) - { - SupervisedDirectory directory = (SupervisedDirectory) it.next(); - - File dir = directory.getDirectory(); - - SupervisorListener listener = directory.getListener(); - - scanDirectory( dir, listener ); - } - } - - public String getName() - { - return name; - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - private void scanDirectory( File dir, SupervisorListener listener ) - { - File[] files = dir.listFiles( new FileFilter() - { - public boolean accept( File file ) - { - return file.isFile() && file.getName().endsWith( extension ); - } - } ); - - for ( int i = 0; i < files.length; i++ ) - { - File file = files[i]; - - listener.onJarDiscovered( file ); - } - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/supervisor/SupervisedDirectory.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/supervisor/SupervisedDirectory.java deleted file mode 100644 index abafce695..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/supervisor/SupervisedDirectory.java +++ /dev/null @@ -1,62 +0,0 @@ -package org.codehaus.plexus.appserver.supervisor; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.io.File; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class SupervisedDirectory -{ - private File directory; - - private SupervisorListener listener; - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - public SupervisedDirectory( File directory, SupervisorListener listener ) - { - this.directory = directory; - this.listener = listener; - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - public File getDirectory() - { - return directory; - } - - public SupervisorListener getListener() - { - return listener; - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/supervisor/Supervisor.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/supervisor/Supervisor.java deleted file mode 100644 index c2f89f367..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/supervisor/Supervisor.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.codehaus.plexus.appserver.supervisor; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.io.File; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public interface Supervisor -{ - String ROLE = Supervisor.class.getName(); - - void addDirectory( File directory, SupervisorListener listener ) - throws SupervisorException; - - void scan() - throws SupervisorException; - - String getName(); -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/supervisor/SupervisorException.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/supervisor/SupervisorException.java deleted file mode 100644 index cdf954114..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/supervisor/SupervisorException.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.codehaus.plexus.appserver.supervisor; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class SupervisorException - extends Exception -{ - public SupervisorException( String message ) - { - super( message ); - } - - public SupervisorException( String message, Throwable cause ) - { - super( message, cause ); - } -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/supervisor/SupervisorListener.java b/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/supervisor/SupervisorListener.java deleted file mode 100644 index 4af0528ca..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/java/org/codehaus/plexus/appserver/supervisor/SupervisorListener.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.plexus.appserver.supervisor; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.io.File; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public interface SupervisorListener -{ - void onJarDiscovered( File jar ); -} diff --git a/plexus-appserver/plexus-appserver-host/src/main/plexus/components.xml b/plexus-appserver/plexus-appserver-host/src/main/plexus/components.xml deleted file mode 100644 index 5d5e7892a..000000000 --- a/plexus-appserver/plexus-appserver-host/src/main/plexus/components.xml +++ /dev/null @@ -1,194 +0,0 @@ - - - - - org.codehaus.plexus.appserver.ApplicationServer - org.codehaus.plexus.appserver.DefaultApplicationServer - - - org.codehaus.plexus.appserver.service.deploy.ServiceDeployer - - - org.codehaus.plexus.appserver.application.deploy.ApplicationDeployer - - - - - deploy-services - deploy-apps - - - - - - - org.codehaus.plexus.appserver.lifecycle.phase.AppServerPhase - deploy-apps - org.codehaus.plexus.appserver.lifecycle.phase.ApplicationDeploymentPhase - - - org.codehaus.plexus.appserver.application.deploy.ApplicationDeployer - - - org.codehaus.plexus.appserver.supervisor.Supervisor - application-supervisor - - - - - - org.codehaus.plexus.appserver.lifecycle.phase.AppServerPhase - deploy-services - org.codehaus.plexus.appserver.lifecycle.phase.ServiceDeploymentPhase - - - org.codehaus.plexus.appserver.service.deploy.ServiceDeployer - - - org.codehaus.plexus.appserver.supervisor.Supervisor - service-supervisor - - - - - - - - org.codehaus.plexus.appserver.application.deploy.ApplicationDeployer - org.codehaus.plexus.appserver.application.deploy.DefaultApplicationDeployer - - ${plexus.home}/apps - - process-app-metadata - expand-app - validate-app - create-app-container - create-app-runtime-profile - pre-app-container-init-service-call - app-init - post-app-container-init-service-call - create-app-descriptor - - - - - - - - org.codehaus.plexus.appserver.application.deploy.lifecycle.phase.AppDeploymentPhase - process-app-metadata - org.codehaus.plexus.appserver.application.deploy.lifecycle.phase.ProcessAppMetadataPhase - - - - org.codehaus.plexus.appserver.application.deploy.lifecycle.phase.AppDeploymentPhase - expand-app - org.codehaus.plexus.appserver.application.deploy.lifecycle.phase.ExpandAppPhase - - - - org.codehaus.plexus.appserver.application.deploy.lifecycle.phase.AppDeploymentPhase - validate-app - org.codehaus.plexus.appserver.application.deploy.lifecycle.phase.ValidateAppPhase - - - - org.codehaus.plexus.appserver.application.deploy.lifecycle.phase.AppDeploymentPhase - create-app-container - org.codehaus.plexus.appserver.application.deploy.lifecycle.phase.CreateAppContainerPhase - - - - org.codehaus.plexus.appserver.application.deploy.lifecycle.phase.AppDeploymentPhase - create-app-runtime-profile - org.codehaus.plexus.appserver.application.deploy.lifecycle.phase.CreateAppRuntimeProfilePhase - - - - org.codehaus.plexus.appserver.application.deploy.lifecycle.phase.AppDeploymentPhase - pre-app-container-init-service-call - org.codehaus.plexus.appserver.application.deploy.lifecycle.phase.BeforeAppStartServiceSetupPhase - - - - org.codehaus.plexus.appserver.application.deploy.lifecycle.phase.AppDeploymentPhase - app-init - org.codehaus.plexus.appserver.application.deploy.lifecycle.phase.AppInitializationPhase - - - - org.codehaus.plexus.appserver.application.deploy.lifecycle.phase.AppDeploymentPhase - post-app-container-init-service-call - org.codehaus.plexus.appserver.application.deploy.lifecycle.phase.AfterAppStartServiceSetupPhase - - - - org.codehaus.plexus.appserver.application.deploy.lifecycle.phase.AppDeploymentPhase - create-app-descriptor - org.codehaus.plexus.appserver.application.deploy.lifecycle.phase.CreateApplicationDescriptorPhase - - - - - - org.codehaus.plexus.appserver.service.deploy.ServiceDeployer - org.codehaus.plexus.appserver.service.deploy.DefaultServiceDeployer - - ${plexus.home}/services - - expand-service - add-service-libraries - discover-service-components - process-service-configuration - - - - - - org.codehaus.plexus.appserver.service.deploy.lifecycle.phase.ServiceDeploymentPhase - expand-service - org.codehaus.plexus.appserver.service.deploy.lifecycle.phase.ExpandServicePhase - - - - org.codehaus.plexus.appserver.service.deploy.lifecycle.phase.ServiceDeploymentPhase - add-service-libraries - org.codehaus.plexus.appserver.service.deploy.lifecycle.phase.AddServiceLibrariesPhase - - - - org.codehaus.plexus.appserver.service.deploy.lifecycle.phase.ServiceDeploymentPhase - discover-service-components - org.codehaus.plexus.appserver.service.deploy.lifecycle.phase.DiscoverServiceComponentsPhase - - - - org.codehaus.plexus.appserver.service.deploy.lifecycle.phase.ServiceDeploymentPhase - process-service-configuration - org.codehaus.plexus.appserver.service.deploy.lifecycle.phase.ProcessServiceConfigurationPhase - - - - - - org.codehaus.plexus.appserver.supervisor.Supervisor - application-supervisor - org.codehaus.plexus.appserver.supervisor.DefaultSupervisor - - Application Supervisor - jar - - - - - org.codehaus.plexus.appserver.supervisor.Supervisor - service-supervisor - org.codehaus.plexus.appserver.supervisor.DefaultSupervisor - - Service Supervisor - sar - - - - - diff --git a/plexus-appserver/plexus-appserver-maven-plugin/pom.xml b/plexus-appserver/plexus-appserver-maven-plugin/pom.xml deleted file mode 100644 index 0babb4001..000000000 --- a/plexus-appserver/plexus-appserver-maven-plugin/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - org.codehaus.plexus - plexus-appserver - 2.0-alpha-4-SNAPSHOT - - 4.0.0 - plexus-appserver-maven-plugin - maven-plugin - Plexus App Server Maven Plugin - - - org.apache.maven - maven-plugin-api - 2.0 - - - org.codehaus.plexus - plexus-appserver-runtime-builder - 2.0-alpha-4-SNAPSHOT - - - diff --git a/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/AbstractAppServerMojo.java b/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/AbstractAppServerMojo.java deleted file mode 100644 index 814ada479..000000000 --- a/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/AbstractAppServerMojo.java +++ /dev/null @@ -1,74 +0,0 @@ -package org.codehaus.plexus.maven.plugin; - -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.project.MavenProject; -import org.codehaus.plexus.builder.runtime.PlexusRuntimeBuilder; - -import java.io.File; -import java.util.List; -import java.util.Set; - -/** - * @author Jason van Zyl - */ -public abstract class AbstractAppServerMojo - extends AbstractMojo -{ - /** - * @parameter expression="${basedir}" - * @required - */ - protected File basedir; - - /** - * @parameter expression="${project.build.directory}" - * @required - */ - protected File target; - - /** - * @parameter expression="${project.build.finalName}" - * @required - */ - protected String finalName; - - /** - * @parameter expression="${project}" - * @required - * @readonly - */ - protected MavenProject project; - - /** - * @parameter expression="${project.remoteArtifactRepositories}" - * @required - */ - protected List remoteRepositories; - - /** - * @parameter expression="${localRepository}" - * @required - */ - protected ArtifactRepository localRepository; - - /** - * @parameter expression="${project.artifacts}" - * @readonly - * @required - */ - protected Set projectArtifacts; - - /** - * @parameter expression="${component.org.codehaus.plexus.builder.runtime.PlexusRuntimeBuilder}" - * @required - * @readonly - */ - protected PlexusRuntimeBuilder runtimeBuilder; - - /** - * @parameter expression="${project.build.directory}/plexus-test-runtime" - * @required - */ - protected File runtimePath; -} diff --git a/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/application/AbstractAppServerApplicationMojo.java b/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/application/AbstractAppServerApplicationMojo.java deleted file mode 100644 index 23d514eb2..000000000 --- a/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/application/AbstractAppServerApplicationMojo.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.plexus.maven.plugin.application; - -import org.codehaus.plexus.builder.application.ApplicationBuilder; -import org.codehaus.plexus.maven.plugin.AbstractAppServerMojo; - -import java.io.File; - -/** - * @author Jason van Zyl - */ -public abstract class AbstractAppServerApplicationMojo - extends AbstractAppServerMojo -{ - /** - * @parameter expression="${project.build.directory}/plexus-application" - * @required - */ - protected File applicationAssemblyDirectory; - - /** - * @parameter expression="${component.org.codehaus.plexus.builder.application.ApplicationBuilder}" - * @required - */ - protected ApplicationBuilder applicationBuilder; -} diff --git a/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/application/ApplicationAssemblerMojo.java b/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/application/ApplicationAssemblerMojo.java deleted file mode 100644 index 883b34ff2..000000000 --- a/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/application/ApplicationAssemblerMojo.java +++ /dev/null @@ -1,133 +0,0 @@ -package org.codehaus.plexus.maven.plugin.application; - -/* - * Copyright (c) 2004, Codehaus.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.apache.maven.artifact.Artifact; -import org.apache.maven.plugin.MojoExecutionException; -import org.codehaus.plexus.builder.application.ApplicationBuilderException; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Properties; -import java.util.Set; - -/** - * @author Trygve Laugstøl - * @author Jason van Zyl - * @version $Id$ - * @goal assemble-app - * @requiresDependencyResolution - * @description Assemble a Plexus application. - * @phase package - */ -public class ApplicationAssemblerMojo - extends AbstractAppServerApplicationMojo -{ - /** - * @parameter expression="${applicationConfiguration}" - * @required - */ - private File applicationConfiguration; - - /** - * @parameter expression="${configurationsDirectory}" - */ - private File configurationsDirectory; - - /** - * @parameter expression="${configurationProperties}" - */ - private File configurationProperties; - - /** - * @parameter expression="${applicationName}" - * @required - */ - private String applicationName; - - /** - * @parameter expression="${additionalCoreArtifacts}" - */ - private HashSet additionalCoreArtifacts; - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - public void execute() - throws MojoExecutionException - { - // ---------------------------------------------------------------------- - // Find all services - // ---------------------------------------------------------------------- - - Set services = new HashSet(); - - for ( Iterator it = projectArtifacts.iterator(); it.hasNext(); ) - { - Artifact artifact = (Artifact) it.next(); - - if ( artifact.getType().equals( "plexus-service" ) ) - { - services.add( artifact ); - } - } - - // ---------------------------------------------------------------------- - // Build the appserver - // ---------------------------------------------------------------------- - - getLog().debug( "Building the appserver '" + applicationName + "' into '" + - applicationAssemblyDirectory.getAbsolutePath() + "'." ); - - Properties interpolationProperties = new Properties(); - - if ( configurationProperties != null ) - { - try - { - interpolationProperties.load( new FileInputStream( configurationProperties ) ); - } - catch ( IOException e ) - { - throw new MojoExecutionException( "Cannot load configuration properties file.", e ); - } - } - - interpolationProperties.putAll( project.getProperties() ); - - try - { - applicationBuilder.assemble( applicationName, applicationAssemblyDirectory, remoteRepositories, - localRepository, projectArtifacts, additionalCoreArtifacts, services, - applicationConfiguration, configurationsDirectory, interpolationProperties ); - } - catch ( ApplicationBuilderException e ) - { - throw new MojoExecutionException( "Error while assembling the appserver.", e ); - } - } -} diff --git a/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/application/ApplicationPackagerMojo.java b/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/application/ApplicationPackagerMojo.java deleted file mode 100644 index 45a0960df..000000000 --- a/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/application/ApplicationPackagerMojo.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.codehaus.plexus.maven.plugin.application; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.apache.maven.plugin.MojoExecutionException; -import org.codehaus.plexus.builder.application.ApplicationBuilderException; - -import java.io.File; - -/** - * @author Trygve Laugstøl - * @author Jason van Zyl - * @version $Id$ - * @goal package-app - * @requiresDependencyResolution - * @description Packages a Plexus application into a Plexus application archive. - * @phase package - */ -public class ApplicationPackagerMojo - extends AbstractAppServerApplicationMojo -{ - public void execute() - throws MojoExecutionException - { - try - { - File outputFile = new File( target, finalName + ".jar" ); - - applicationBuilder.bundle( outputFile, applicationAssemblyDirectory ); - - // TODO: m2 needs a better way to deal with this - project.getArtifact().setFile( outputFile ); - } - catch ( ApplicationBuilderException e ) - { - throw new MojoExecutionException( "Error while bundling appserver.", e ); - } - } -} diff --git a/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/application/ApplicationRuntimePopulatorMojo.java b/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/application/ApplicationRuntimePopulatorMojo.java deleted file mode 100644 index 1b349ca1a..000000000 --- a/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/application/ApplicationRuntimePopulatorMojo.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.codehaus.plexus.maven.plugin.application; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.apache.maven.plugin.MojoExecutionException; -import org.codehaus.plexus.maven.plugin.AbstractAppServerMojo; - -import java.io.File; - -/** - * @author Trygve Laugstøl - * @author Jason van Zyl - * @version $Id$ - * @goal add-app - * @requiresDependencyResolution - * @phase package - * @description Adds the Plexus appliction created from this build to a Plexus runtime. This is used - * when your Plexus runtime is housing the Plexus application created from this build. You - * typically create the Plexus runtime and the Plexus application in this build. If you are - * creating a Plexus runtime that houses many applications then you will want to use the add-apps - * goal. - */ -public class ApplicationRuntimePopulatorMojo - extends AbstractAppServerMojo -{ - public void execute() - throws MojoExecutionException - { - File applicationJarFile = new File( target, finalName + ".jar" ); - - if ( !applicationJarFile.canRead() ) - { - throw new MojoExecutionException( - "Can't read Plexus application artifact '" + applicationJarFile.getAbsolutePath() + "'." ); - } - - try - { - runtimeBuilder.addPlexusApplication( applicationJarFile, runtimePath ); - } - catch ( Exception e ) - { - throw new MojoExecutionException( "Error while building test runtimePath.", e ); - } - } -} diff --git a/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/application/ApplicationsRuntimePopulatorMojo.java b/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/application/ApplicationsRuntimePopulatorMojo.java deleted file mode 100644 index c4f86ee57..000000000 --- a/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/application/ApplicationsRuntimePopulatorMojo.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.codehaus.plexus.maven.plugin.application; - -import org.apache.maven.artifact.Artifact; -import org.apache.maven.plugin.MojoExecutionException; -import org.codehaus.plexus.maven.plugin.AbstractAppServerMojo; - -import java.util.Iterator; - -/** - * @author Trygve Laugstøl - * @author Jason van Zyl - * @version $Id$ - * @goal add-apps - * @requiresDependencyResolution - * @phase package - * @description Adds all Plexus applications in the dependencies to the Plexus runtime. This is used when - * you are generating a Plexus runtime which houses several Plexus applications. - */ -public class ApplicationsRuntimePopulatorMojo - extends AbstractAppServerMojo -{ - public void execute() - throws MojoExecutionException - { - try - { - for ( Iterator it = projectArtifacts.iterator(); it.hasNext(); ) - { - Artifact artifact = (Artifact) it.next(); - - if ( artifact.getType().equals( "plexus-application" ) ) - { - runtimeBuilder.addPlexusApplication( artifact.getFile(), runtimePath ); - } - } - } - catch ( Exception e ) - { - throw new MojoExecutionException( "Error while building test runtimePath.", e ); - } - } -} diff --git a/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/runtime/RuntimeAssemblerMojo.java b/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/runtime/RuntimeAssemblerMojo.java deleted file mode 100644 index 31ad730ee..000000000 --- a/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/runtime/RuntimeAssemblerMojo.java +++ /dev/null @@ -1,103 +0,0 @@ -package org.codehaus.plexus.maven.plugin.runtime; - -/* - * Copyright (c) 2004, Codehaus.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.apache.maven.plugin.MojoExecutionException; -import org.codehaus.plexus.builder.runtime.PlexusRuntimeBuilderException; -import org.codehaus.plexus.maven.plugin.AbstractAppServerMojo; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.util.HashSet; -import java.util.Properties; - -/** - * @author Trygve Laugstøl - * @author Jason van Zyl - * @version $Id$ - * @goal assemble-runtime - * @requiresDependencyResolution - * @phase package - * @description Builds plexus containers. - */ -public class RuntimeAssemblerMojo - extends AbstractAppServerMojo -{ - /** - * @parameter expression="${runtimeConfiguration}" - * @required - */ - private File runtimeConfiguration; - - /** - * @parameter expression="${runtimeConfigurationProperties}" - * @required - */ - private File runtimeConfigurationProperties; - - /** - * @parameter expression="${additionalCoreArtifacts}" - */ - private HashSet additionalCoreArtifacts; - - /** - * @parameter expression="${addManagementAgent}" - */ - private boolean addManagementAgent; - - public void execute() - throws MojoExecutionException - { - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - Properties interpolationProperties = new Properties(); - - if ( runtimeConfigurationProperties != null ) - { - try - { - interpolationProperties.load( new FileInputStream( runtimeConfigurationProperties ) ); - } - catch ( IOException e ) - { - throw new MojoExecutionException( "Cannot load configuration properties file.", e ); - } - } - - interpolationProperties.putAll( project.getProperties() ); - - try - { - runtimeBuilder.build( runtimePath, remoteRepositories, localRepository, projectArtifacts, - additionalCoreArtifacts, runtimeConfiguration, interpolationProperties, - addManagementAgent ); - } - catch ( PlexusRuntimeBuilderException e ) - { - throw new MojoExecutionException( "Error while building runtime.", e ); - } - } -} diff --git a/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/service/AbstractAppServerServiceMojo.java b/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/service/AbstractAppServerServiceMojo.java deleted file mode 100644 index a6780c90b..000000000 --- a/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/service/AbstractAppServerServiceMojo.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.codehaus.plexus.maven.plugin.service; - -import org.codehaus.plexus.builder.service.ServiceBuilder; -import org.codehaus.plexus.maven.plugin.AbstractAppServerMojo; - -import java.io.File; - -/** - * @author Jason van Zyl - */ -public abstract class AbstractAppServerServiceMojo - extends AbstractAppServerMojo -{ - /** - * @parameter expression="${project.build.directory}/plexus-service" - * @required - */ - protected File serviceAssemblyDirectory; - - /** - * @parameter expression="${component.org.codehaus.plexus.builder.service.ServiceBuilder}" - * @required - */ - protected ServiceBuilder builder; - -} diff --git a/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/service/ServiceAssemblerMojo.java b/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/service/ServiceAssemblerMojo.java deleted file mode 100644 index e9acbdf91..000000000 --- a/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/service/ServiceAssemblerMojo.java +++ /dev/null @@ -1,115 +0,0 @@ -package org.codehaus.plexus.maven.plugin.service; - -/* - * Copyright (c) 2004, Codehaus.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.apache.maven.plugin.MojoExecutionException; -import org.codehaus.plexus.builder.service.ServiceBuilderException; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.util.Properties; - -/** - * @author Trygve Laugstøl - * @author Jason van Zyl - * @version $Id$ - * @goal assemble-service - * @requiresDependencyResolution - * @requiresProject - * @description Assembled and bundles a Plexus service. - * @phase package - */ -public class ServiceAssemblerMojo - extends AbstractAppServerServiceMojo -{ - /** - * @parameter expression="${serviceName}" - * @required - */ - private String serviceName; - - /** - * @parameter expression="${serviceConfiguration}" - * @required - */ - private File serviceConfiguration; - - /** - * @parameter expression="${configurationsDirectory}" - */ - private File configurationsDirectory; - - /** - * @parameter expression="${configurationProperties}" - */ - private File configurationProperties; - - public void execute() - throws MojoExecutionException - { - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - File outputFile = new File( target, finalName + ".sar" ); - - File serviceJar = new File( target, finalName + ".jar" ); - - // ---------------------------------------------------------------------- - // Build the service - // ---------------------------------------------------------------------- - - Properties interpolationProperties = new Properties(); - - if ( configurationProperties != null ) - { - try - { - interpolationProperties.load( new FileInputStream( configurationProperties ) ); - } - catch ( IOException e ) - { - throw new MojoExecutionException( "Cannot load configuration properties file.", e ); - } - } - - try - { - builder.build( serviceName, serviceAssemblyDirectory, serviceJar, remoteRepositories, localRepository, - projectArtifacts, serviceConfiguration, configurationsDirectory, interpolationProperties ); - - // ---------------------------------------------------------------------- - // Bundle the service - // ---------------------------------------------------------------------- - - builder.bundle( outputFile, serviceAssemblyDirectory ); - } - catch ( ServiceBuilderException e ) - { - throw new MojoExecutionException( "Error while making service.", e ); - } - - project.getArtifact().setFile( outputFile ); - } -} diff --git a/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/service/ServicePackagerMojo.java b/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/service/ServicePackagerMojo.java deleted file mode 100644 index ced9d7f19..000000000 --- a/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/service/ServicePackagerMojo.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.codehaus.plexus.maven.plugin.service; - -import org.apache.maven.plugin.MojoExecutionException; -import org.codehaus.plexus.builder.service.ServiceBuilderException; - -import java.io.File; - -/** - * @author Trygve Laugstøl - * @author Jason van Zyl - * @version $Id$ - * @goal package-service - * @requiresDependencyResolution - * @requiresProject - * @description Assembled and bundles a Plexus service. - * @phase package - */ -public class ServicePackagerMojo - extends AbstractAppServerServiceMojo -{ - public void execute() - throws MojoExecutionException - { - File outputFile = new File( target, finalName + ".sar" ); - - try - { - builder.bundle( outputFile, serviceAssemblyDirectory ); - } - catch ( ServiceBuilderException e ) - { - throw new MojoExecutionException( "Error while making service.", e ); - } - - project.getArtifact().setFile( outputFile ); - } -} diff --git a/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/service/ServicesRuntimePopulatorMojo.java b/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/service/ServicesRuntimePopulatorMojo.java deleted file mode 100644 index f3739a9a5..000000000 --- a/plexus-appserver/plexus-appserver-maven-plugin/src/main/java/org/codehaus/plexus/maven/plugin/service/ServicesRuntimePopulatorMojo.java +++ /dev/null @@ -1,64 +0,0 @@ -package org.codehaus.plexus.maven.plugin.service; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.apache.maven.artifact.Artifact; -import org.apache.maven.plugin.MojoExecutionException; - -import java.util.Iterator; - -/** - * @author Trygve Laugstøl - * @author Jason van Zyl - * @version $Id$ - * @goal add-services - * @requiresDependencyResolution - * @phase package - * @description Adds all Plexus services in the artifact list to the runtime - */ -public class ServicesRuntimePopulatorMojo - extends AbstractAppServerServiceMojo -{ - public void execute() - throws MojoExecutionException - { - try - { - for ( Iterator it = projectArtifacts.iterator(); it.hasNext(); ) - { - Artifact artifact = (Artifact) it.next(); - - if ( artifact.getType().equals( "plexus-service" ) ) - { - runtimeBuilder.addPlexusService( artifact.getFile(), runtimePath ); - } - } - } - catch ( Exception e ) - { - throw new MojoExecutionException( "Error while building test runtimePath.", e ); - } - } -} diff --git a/plexus-appserver/plexus-appserver-maven-plugin/src/main/resources/META-INF/plexus/components.xml b/plexus-appserver/plexus-appserver-maven-plugin/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index be832ab4b..000000000 --- a/plexus-appserver/plexus-appserver-maven-plugin/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - org.apache.maven.lifecycle.mapping.LifecycleMapping - plexus-application - org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping - - - - - org.codehaus.plexus:plexus-appserver-maven-plugin:assemble-app, - org.codehaus.plexus:plexus-appserver-maven-plugin:package-app - org.apache.maven.plugins:maven-install-plugin:install - org.apache.maven.plugins:maven-deploy-plugin:deploy - - - - - - - org.apache.maven.lifecycle.mapping.LifecycleMapping - plexus-service - org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping - - - - org.apache.maven.plugins:maven-resources-plugin:resources - org.apache.maven.plugins:maven-compiler-plugin:compile - org.apache.maven.plugins:maven-resources-plugin:testResources - org.apache.maven.plugins:maven-compiler-plugin:testCompile - org.apache.maven.plugins:maven-surefire-plugin:test - - org.apache.maven.plugins:maven-jar-plugin:jar, - org.codehaus.plexus:plexus-appserver-maven-plugin:assemble-service, - org.codehaus.plexus:plexus-appserver-maven-plugin:package-service, - - org.apache.maven.plugins:maven-install-plugin:install - org.apache.maven.plugins:maven-deploy-plugin:deploy - - - - - - - - org.apache.maven.artifact.handler.ArtifactHandler - plexus-service - org.apache.maven.artifact.handler.DefaultArtifactHandler - - plexus-service - sar - plexus-service - - - - - org.apache.maven.artifact.handler.ArtifactHandler - plexus-application - org.apache.maven.artifact.handler.DefaultArtifactHandler - - plexus-application - jar - plexus-application - - - - diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-common/pom.xml b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-common/pom.xml deleted file mode 100644 index 4922bd05c..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-common/pom.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - org.codehaus.plexus - plexus-appserver-runtime-booters - 2.0-alpha-3-SNAPSHOT - - 4.0.0 - plexus-appserver-runtime-booter-common - Plexus App Server Common Runtime Booter - diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-common/src/main/java/org/codehaus/plexus/builder/runtime/AbstractPlexusRuntimeBootloaderGenerator.java b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-common/src/main/java/org/codehaus/plexus/builder/runtime/AbstractPlexusRuntimeBootloaderGenerator.java deleted file mode 100644 index 02960517f..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-common/src/main/java/org/codehaus/plexus/builder/runtime/AbstractPlexusRuntimeBootloaderGenerator.java +++ /dev/null @@ -1,316 +0,0 @@ -package org.codehaus.plexus.builder.runtime; - -/* - * Copyright (c) 2004, Codehaus.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.apache.velocity.VelocityContext; -import org.apache.velocity.exception.ResourceNotFoundException; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.util.FileUtils; -import org.codehaus.plexus.util.IOUtil; -import org.codehaus.plexus.util.InterpolationFilterReader; -import org.codehaus.plexus.util.Os; -import org.codehaus.plexus.util.StringUtils; -import org.codehaus.plexus.util.cli.CommandLineException; -import org.codehaus.plexus.util.cli.Commandline; -import org.codehaus.plexus.velocity.VelocityComponent; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import java.io.Writer; -import java.io.FileNotFoundException; -import java.util.Map; -import java.util.Properties; - -/** - * @author Jason van Zyl - * @version $Id$ - */ -public abstract class AbstractPlexusRuntimeBootloaderGenerator - extends AbstractLogEnabled - implements PlexusRuntimeBootloaderGenerator -{ - private final static String CLASSWORLDS_TEMPLATE = "org/codehaus/plexus/builder/templates/classworlds.vm"; - - private static final String PROPERTY_APP_NAME = "app.name"; - - private static final String PROPERTY_APP_LONG_NAME = "app.long.name"; - - private static final String PROPERTY_APP_DESCRIPTION = "app.description"; - - /** - * @requirement - */ - protected VelocityComponent velocity; - - protected void executable( File file ) - throws PlexusRuntimeBootloaderGeneratorException - { - if ( Os.isFamily( "unix" ) ) - { - Commandline cli = new Commandline(); - - cli.setExecutable( "chmod" ); - - cli.createArgument().setValue( "+x" ); - - cli.createArgument().setValue( file.getAbsolutePath() ); - - try - { - cli.execute(); - } - catch ( CommandLineException e ) - { - throw new PlexusRuntimeBootloaderGeneratorException( "Error executing command line.", e ); - } - } - } - - protected File mkdirs( File directory ) - throws PlexusRuntimeBootloaderGeneratorException - { - if ( !directory.exists() ) - { - if ( !directory.mkdirs() ) - { - throw new PlexusRuntimeBootloaderGeneratorException( - "Could not make directories '" + directory.getAbsolutePath() + "'." ); - } - } - - return directory; - } - - protected InputStream getResourceAsStream( String resource ) - throws PlexusRuntimeBootloaderGeneratorException - { - InputStream is = getClass().getClassLoader().getResourceAsStream( resource ); - - if ( is == null ) - { - throw new PlexusRuntimeBootloaderGeneratorException( "Could not find resource '" + resource + "'." ); - } - - return is; - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - protected void filterCopy( File in, - File out, - Map map ) - throws PlexusRuntimeBootloaderGeneratorException - { - try - { - filterCopy( new FileReader( in ), out, map ); - } - catch ( FileNotFoundException e ) - { - throw new PlexusRuntimeBootloaderGeneratorException( "Error copying resource.", e ); - } - } - - protected void filterCopy( InputStream in, - File out, - Map map ) - throws PlexusRuntimeBootloaderGeneratorException - { - filterCopy( new InputStreamReader( in ), out, map ); - } - - protected void filterCopy( Reader in, - File out, - Map map ) - throws PlexusRuntimeBootloaderGeneratorException - { - InterpolationFilterReader reader = new InterpolationFilterReader( in, map, "@", "@" ); - - try - { - Writer writer = new FileWriter( out ); - - IOUtil.copy( reader, writer ); - - writer.close(); - } - catch ( IOException e ) - { - throw new PlexusRuntimeBootloaderGeneratorException( "Error copying resource.", e ); - } - } - - protected void copyResource( String filename, - String resource, - boolean makeExecutable, - File basedir ) - throws PlexusRuntimeBootloaderGeneratorException - { - File target = new File( basedir, filename ); - - try - { - copyResourceToFile( resource, target ); - - if ( makeExecutable ) - { - executable( target ); - } - } - catch ( Exception e ) - { - throw new PlexusRuntimeBootloaderGeneratorException( "Error copying resource.", e ); - } - } - - protected void copyResourceToFile( String resource, - File target ) - throws PlexusRuntimeBootloaderGeneratorException - { - try - { - InputStream is = getResourceAsStream( resource ); - - mkdirs( target.getParentFile() ); - - OutputStream os = new FileOutputStream( target ); - - IOUtil.copy( is, os ); - - IOUtil.close( is ); - - IOUtil.close( os ); - } - catch ( Exception e ) - { - throw new PlexusRuntimeBootloaderGeneratorException( "Error copying resource.", e ); - } - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - private Properties loadConfigurationProperties( File configurationPropertiesFile ) - throws IOException, PlexusRuntimeBootloaderGeneratorException - { - Properties properties = new Properties(); - - if ( configurationPropertiesFile == null ) - { - throw new PlexusRuntimeBootloaderGeneratorException( - "The runtime builder requires a configurator properties file." ); - } - - properties.load( new FileInputStream( configurationPropertiesFile ) ); - - // ---------------------------------------------------------------------- - // Validate that some required properties are present - // ---------------------------------------------------------------------- - - assertHasProperty( properties, PROPERTY_APP_NAME ); - - assertHasProperty( properties, PROPERTY_APP_LONG_NAME ); - - assertHasProperty( properties, PROPERTY_APP_DESCRIPTION ); - - return properties; - } - - private void assertHasProperty( Properties properties, - String key ) - throws PlexusRuntimeBootloaderGeneratorException - { - if ( StringUtils.isEmpty( properties.getProperty( key ) ) ) - { - throw new PlexusRuntimeBootloaderGeneratorException( "Missing configurator property '" + key + "'." ); - } - } - - // ---------------------------------------------------------------------- - // Velocity methods - // ---------------------------------------------------------------------- - - protected void mergeTemplate( String templateName, - File outputFileName, - boolean dos ) - throws PlexusRuntimeBootloaderGeneratorException - { - StringWriter buffer = new StringWriter( 100 * FileUtils.ONE_KB ); - - try - { - velocity.getEngine().mergeTemplate( templateName, new VelocityContext(), buffer ); - } - catch ( ResourceNotFoundException ex ) - { - throw new PlexusRuntimeBootloaderGeneratorException( "Missing Velocity template: '" + templateName + "'.", - ex ); - } - catch ( Exception ex ) - { - throw new PlexusRuntimeBootloaderGeneratorException( "Exception merging the velocity template.", ex ); - } - - try - { - - FileOutputStream output = new FileOutputStream( outputFileName ); - - BufferedReader reader = new BufferedReader( new StringReader( buffer.toString() ) ); - - String line; - - while ( ( line = reader.readLine() ) != null ) - { - output.write( line.getBytes() ); - - if ( dos ) - { - output.write( '\r' ); - } - - output.write( '\n' ); - } - - output.close(); - } - catch ( IOException e ) - { - throw new PlexusRuntimeBootloaderGeneratorException( "Error merging template.", e ); - } - } -} diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-common/src/main/java/org/codehaus/plexus/builder/runtime/PlexusRuntimeBootloaderGenerator.java b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-common/src/main/java/org/codehaus/plexus/builder/runtime/PlexusRuntimeBootloaderGenerator.java deleted file mode 100644 index 0fa579ab1..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-common/src/main/java/org/codehaus/plexus/builder/runtime/PlexusRuntimeBootloaderGenerator.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.codehaus.plexus.builder.runtime; - -/* - * Copyright (c) 2004, Codehaus.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.io.File; -import java.util.Properties; - -/** - * @author Jason van Zyl - * @version $Id$ - */ -public interface PlexusRuntimeBootloaderGenerator -{ - String ROLE = PlexusRuntimeBootloaderGenerator.class.getName(); - - void generate( File outputDirectory, Properties configurationProperties ) - throws PlexusRuntimeBootloaderGeneratorException; -} diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-common/src/main/java/org/codehaus/plexus/builder/runtime/PlexusRuntimeBootloaderGeneratorException.java b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-common/src/main/java/org/codehaus/plexus/builder/runtime/PlexusRuntimeBootloaderGeneratorException.java deleted file mode 100644 index 6a3a76214..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-common/src/main/java/org/codehaus/plexus/builder/runtime/PlexusRuntimeBootloaderGeneratorException.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.codehaus.plexus.builder.runtime; - -/* - * Copyright (c) 2004, Codehaus.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * @author Jason van Zyl - * @author Trygve Laugstøl - * @version $Id$ - */ -public class PlexusRuntimeBootloaderGeneratorException - extends Exception -{ - public PlexusRuntimeBootloaderGeneratorException( String msg ) - { - super( msg ); - } - - public PlexusRuntimeBootloaderGeneratorException( String msg, Throwable cause ) - { - super( msg, cause ); - } -} diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/pom.xml b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/pom.xml deleted file mode 100644 index 9a65c6eb4..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - org.codehaus.plexus - plexus-appserver-runtime-booters - 2.0-alpha-3-SNAPSHOT - - 4.0.0 - plexus-appserver-runtime-booter-jsw - Plexus App Server JSW Booter - Plexus App Server Tools for creating application bundles, services bundles and server runtimes. - - - - org.codehaus.plexus - plexus-appserver-runtime-booter-common - - - diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/java/org/codehaus/plexus/builder/runtime/JswPlexusRuntimeBootloaderGenerator.java b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/java/org/codehaus/plexus/builder/runtime/JswPlexusRuntimeBootloaderGenerator.java deleted file mode 100644 index 851cf7a23..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/java/org/codehaus/plexus/builder/runtime/JswPlexusRuntimeBootloaderGenerator.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.codehaus.plexus.builder.runtime; - -/* - * Copyright (c) 2004, Codehaus.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.builder.runtime.platform.PlatformGenerator; - -import java.io.File; -import java.util.Map; -import java.util.Properties; - -/** - * @author Jason van Zyl - * @author Trygve Laugstøl - */ -public class JswPlexusRuntimeBootloaderGenerator - extends AbstractPlexusRuntimeBootloaderGenerator -{ - private static String JSW = "jsw"; - - private Map platformGenerators; - - public void generate( File outputDirectory, Properties configurationProperties ) - throws PlexusRuntimeBootloaderGeneratorException - { - // ---------------------------------------------------------------------------- - // Look up the appropriate generator - // ---------------------------------------------------------------------------- - - //TODO will need a generator context as i need more then properties. - - PlatformGenerator generator = (PlatformGenerator) platformGenerators.get( "" ); - - // ---------------------------------------------------------------------------- - // The wrapper.jar and wrapper.conf can be dealt with here because these - // two bits are common to all the JSW runtime booters. - // ---------------------------------------------------------------------------- - - copyResourceToFile( JSW + "/wrapper.jar", new File( outputDirectory, "boot/wrapper.jar" ) ); - } -} diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/META-INF/plexus/components.xml b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index 84e2a60a2..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - org.codehaus.plexus.builder.runtime.PlexusRuntimeBootloaderGenerator - jsw - org.codehaus.plexus.builder.runtime.JswPlexusRuntimeBootloaderGenerator - - - diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/README.txt b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/README.txt deleted file mode 100644 index b93af0051..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/README.txt +++ /dev/null @@ -1,5 +0,0 @@ -The directory structures here are copies verbatim of the tarballs/zips -provided by the project. I would eventually like to be able to pull them from -the repository. The only change here is putting the common platform -independent files in a commons directory. Eventually this will be a -platform neutral mechanism but is specific to plexus right now. diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-common-32-3.2.0/src/bin/sh.script.in b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-common-32-3.2.0/src/bin/sh.script.in deleted file mode 100644 index 754dab646..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-common-32-3.2.0/src/bin/sh.script.in +++ /dev/null @@ -1,530 +0,0 @@ -#! /bin/sh - -# -# Copyright (c) 1999, 2006 Tanuki Software Inc. -# -# Java Service Wrapper sh script. Suitable for starting and stopping -# wrapped Java applications on UNIX platforms. -# - -#----------------------------------------------------------------------------- -# These settings can be modified to fit the needs of your application - -# Application -APP_NAME="@app.name@" -APP_LONG_NAME="@app.long.name@" - -# Wrapper -WRAPPER_CMD="./wrapper" -WRAPPER_CONF="../conf/wrapper.conf" - -# Priority at which to run the wrapper. See "man nice" for valid priorities. -# nice is only used if a priority is specified. -PRIORITY= - -# Location of the pid file. -PIDDIR="." - -# If uncommented, causes the Wrapper to be shutdown using an anchor file. -# When launched with the 'start' command, it will also ignore all INT and -# TERM signals. -#IGNORE_SIGNALS=true - -# If specified, the Wrapper will be run as the specified user. -# IMPORTANT - Make sure that the user has the required privileges to write -# the PID file and wrapper.log files. Failure to be able to write the log -# file will cause the Wrapper to exit without any way to write out an error -# message. -# NOTE - This will set the user which is used to run the Wrapper as well as -# the JVM and is not useful in situations where a privileged resource or -# port needs to be allocated prior to the user being changed. -#RUN_AS_USER= - -# The following two lines are used by the chkconfig command. Change as is -# appropriate for your application. They should remain commented. -# chkconfig: 2345 20 80 -# description: @app.long.name@ - -# Do not modify anything beyond this point -#----------------------------------------------------------------------------- - -# Get the fully qualified path to the script -case $0 in - /*) - SCRIPT="$0" - ;; - *) - PWD=`pwd` - SCRIPT="$PWD/$0" - ;; -esac - -# Resolve the true real path without any sym links. -CHANGED=true -while [ "X$CHANGED" != "X" ] -do - # Change spaces to ":" so the tokens can be parsed. - SCRIPT=`echo $SCRIPT | sed -e 's; ;:;g'` - # Get the real path to this script, resolving any symbolic links - TOKENS=`echo $SCRIPT | sed -e 's;/; ;g'` - REALPATH= - for C in $TOKENS; do - REALPATH="$REALPATH/$C" - while [ -h "$REALPATH" ] ; do - LS="`ls -ld "$REALPATH"`" - LINK="`expr "$LS" : '.*-> \(.*\)$'`" - if expr "$LINK" : '/.*' > /dev/null; then - REALPATH="$LINK" - else - REALPATH="`dirname "$REALPATH"`""/$LINK" - fi - done - done - # Change ":" chars back to spaces. - REALPATH=`echo $REALPATH | sed -e 's;:; ;g'` - - if [ "$REALPATH" = "$SCRIPT" ] - then - CHANGED="" - else - SCRIPT="$REALPATH" - fi -done - -# Change the current directory to the location of the script -cd "`dirname "$REALPATH"`" -REALDIR=`pwd` - -# If the PIDDIR is relative, set its value relative to the full REALPATH to avoid problems if -# the working directory is later changed. -FIRST_CHAR=`echo $PIDDIR | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - PIDDIR=$REALDIR/$PIDDIR -fi -# Same test for WRAPPER_CMD -FIRST_CHAR=`echo $WRAPPER_CMD | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - WRAPPER_CMD=$REALDIR/$WRAPPER_CMD -fi -# Same test for WRAPPER_CONF -FIRST_CHAR=`echo $WRAPPER_CONF | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - WRAPPER_CONF=$REALDIR/$WRAPPER_CONF -fi - -# Process ID -ANCHORFILE="$PIDDIR/$APP_NAME.anchor" -PIDFILE="$PIDDIR/$APP_NAME.pid" -LOCKDIR="/var/lock/subsys" -LOCKFILE="$LOCKDIR/$APP_NAME" -pid="" - -# Resolve the location of the 'ps' command -PSEXE="/usr/bin/ps" -if [ ! -x $PSEXE ] -then - PSEXE="/bin/ps" - if [ ! -x $PSEXE ] - then - echo "Unable to locate 'ps'." - echo "Please report this message along with the location of the command on your system." - exit 1 - fi -fi - -# Resolve the os -DIST_OS=`uname -s | tr [:upper:] [:lower:] | tr -d [:blank:]` -case "$DIST_OS" in - 'sunos') - DIST_OS="solaris" - ;; - 'hp-ux' | 'hp-ux64') - DIST_OS="hpux" - ;; - 'darwin') - DIST_OS="macosx" - ;; - 'unix_sv') - DIST_OS="unixware" - ;; -esac - -# Resolve the architecture -DIST_ARCH=`uname -p | tr [:upper:] [:lower:] | tr -d [:blank:]` -if [ "$DIST_ARCH" = "unknown" ] -then - DIST_ARCH=`uname -m | tr [:upper:] [:lower:] | tr -d [:blank:]` -fi -case "$DIST_ARCH" in - 'amd64' | 'ia32' | 'ia64' | 'i386' | 'i486' | 'i586' | 'i686' | 'x86_64') - DIST_ARCH="x86" - ;; - 'ip27') - DIST_ARCH="mips" - ;; - 'power' | 'powerpc' | 'power_pc' | 'ppc64') - DIST_ARCH="ppc" - ;; - 'pa_risc' | 'pa-risc') - DIST_ARCH="parisc" - ;; - 'sun4u' | 'sparcv9') - DIST_ARCH="sparc" - ;; - '9000/800') - DIST_ARCH="parisc" - ;; -esac - -# Decide on the wrapper binary to use. -# If a 32-bit wrapper binary exists then it will work on 32 or 64 bit -# platforms, if the 64-bit binary exists then the distribution most -# likely wants to use long names. Otherwise, look for the default. -# For macosx, we also want to look for universal binaries. -WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" -if [ -x $WRAPPER_TEST_CMD ] -then - WRAPPER_CMD="$WRAPPER_TEST_CMD" -else - if [ "$DIST_OS" = "macosx" ] - then - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-32" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - if [ ! -x $WRAPPER_CMD ] - then - echo "Unable to locate any of the following binaries:" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" - echo " $WRAPPER_CMD-$DIST_OS-universal-32" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - echo " $WRAPPER_CMD-$DIST_OS-universal-64" - echo " $WRAPPER_CMD" - exit 1 - fi - fi - fi - fi - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - if [ ! -x $WRAPPER_CMD ] - then - echo "Unable to locate any of the following binaries:" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - echo " $WRAPPER_CMD" - exit 1 - fi - fi - fi -fi - -# Build the nice clause -if [ "X$PRIORITY" = "X" ] -then - CMDNICE="" -else - CMDNICE="nice -$PRIORITY" -fi - -# Build the anchor file clause. -if [ "X$IGNORE_SIGNALS" = "X" ] -then - ANCHORPROP= - IGNOREPROP= -else - ANCHORPROP=wrapper.anchorfile=$ANCHORFILE - IGNOREPROP=wrapper.ignore_signals=TRUE -fi - -# Build the lock file clause. Only create a lock file if the lock directory exists on this platform. -if [ -d $LOCKDIR ] -then - LOCKPROP=wrapper.lockfile=$LOCKFILE -else - LOCKPROP= -fi - -checkUser() { - # Check the configured user. If necessary rerun this script as the desired user. - if [ "X$RUN_AS_USER" != "X" ] - then - # Resolve the location of the 'id' command - IDEXE="/usr/xpg4/bin/id" - if [ ! -x $IDEXE ] - then - IDEXE="/usr/bin/id" - if [ ! -x $IDEXE ] - then - echo "Unable to locate 'id'." - echo "Please report this message along with the location of the command on your system." - exit 1 - fi - fi - - if [ "`$IDEXE -u -n`" = "$RUN_AS_USER" ] - then - # Already running as the configured user. Avoid password prompts by not calling su. - RUN_AS_USER="" - fi - fi - if [ "X$RUN_AS_USER" != "X" ] - then - # If LOCKPROP and $RUN_AS_USER are defined then the new user will most likely not be - # able to create the lock file. The Wrapper will be able to update this file once it - # is created but will not be able to delete it on shutdown. If $2 is defined then - # the lock file should be created for the current command - if [ "X$LOCKPROP" != "X" ] - then - if [ "X$2" != "X" ] - then - # Resolve the primary group - RUN_AS_GROUP=`groups $RUN_AS_USER | awk '{print $3}' | tail -1` - if [ "X$RUN_AS_GROUP" = "X" ] - then - RUN_AS_GROUP=RUN_AS_USER - fi - touch $LOCKFILE - chown $RUN_AS_USER:$RUN_AS_GROUP $LOCKFILE - fi - fi - - # Still want to change users, recurse. This means that the user will only be - # prompted for a password once. - su -m $RUN_AS_USER -c "$REALPATH $1" - - # Now that we are the original user again, we may need to clean up the lock file. - if [ "X$LOCKPROP" != "X" ] - then - getpid - if [ "X$pid" = "X" ] - then - # Wrapper is not running so make sure the lock file is deleted. - if [ -f $LOCKFILE ] - then - rm $LOCKFILE - fi - fi - fi - - exit 0 - fi -} - -getpid() { - if [ -f $PIDFILE ] - then - if [ -r $PIDFILE ] - then - pid=`cat $PIDFILE` - if [ "X$pid" != "X" ] - then - # It is possible that 'a' process with the pid exists but that it is not the - # correct process. This can happen in a number of cases, but the most - # common is during system startup after an unclean shutdown. - # The ps statement below looks for the specific wrapper command running as - # the pid. If it is not found then the pid file is considered to be stale. - pidtest=`$PSEXE -p $pid -o args | grep $WRAPPER_CMD | tail -1` - if [ "X$pidtest" = "X" ] - then - # This is a stale pid file. - rm -f $PIDFILE - echo "Removed stale pid file: $PIDFILE" - pid="" - fi - fi - else - echo "Cannot read $PIDFILE." - exit 1 - fi - fi -} - -testpid() { - pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1` - if [ "X$pid" = "X" ] - then - # Process is gone so remove the pid file. - rm -f $PIDFILE - pid="" - fi -} - -console() { - echo "Running $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE $ANCHORPROP $LOCKPROP" - exec $COMMAND_LINE - else - echo "$APP_LONG_NAME is already running." - exit 1 - fi -} - -start() { - echo "Starting $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $LOCKPROP" - exec $COMMAND_LINE - else - echo "$APP_LONG_NAME is already running." - exit 1 - fi -} - -stopit() { - echo "Stopping $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME was not running." - else - if [ "X$IGNORE_SIGNALS" = "X" ] - then - # Running so try to stop it. - kill $pid - if [ $? -ne 0 ] - then - # An explanation for the failure should have been given - echo "Unable to stop $APP_LONG_NAME." - exit 1 - fi - else - rm -f $ANCHORFILE - if [ -f $ANCHORFILE ] - then - # An explanation for the failure should have been given - echo "Unable to stop $APP_LONG_NAME." - exit 1 - fi - fi - - # We can not predict how long it will take for the wrapper to - # actually stop as it depends on settings in wrapper.conf. - # Loop until it does. - savepid=$pid - CNT=0 - TOTCNT=0 - while [ "X$pid" != "X" ] - do - # Show a waiting message every 5 seconds. - if [ "$CNT" -lt "5" ] - then - CNT=`expr $CNT + 1` - else - echo "Waiting for $APP_LONG_NAME to exit..." - CNT=0 - fi - TOTCNT=`expr $TOTCNT + 1` - - sleep 1 - - testpid - done - - pid=$savepid - testpid - if [ "X$pid" != "X" ] - then - echo "Failed to stop $APP_LONG_NAME." - exit 1 - else - echo "Stopped $APP_LONG_NAME." - fi - fi -} - -status() { - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME is not running." - exit 1 - else - echo "$APP_LONG_NAME is running ($pid)." - exit 0 - fi -} - -dump() { - echo "Dumping $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME was not running." - - else - kill -3 $pid - - if [ $? -ne 0 ] - then - echo "Failed to dump $APP_LONG_NAME." - exit 1 - else - echo "Dumped $APP_LONG_NAME." - fi - fi -} - -case "$1" in - - 'console') - checkUser $1 touchlock - console - ;; - - 'start') - checkUser $1 touchlock - start - ;; - - 'stop') - checkUser $1 - stopit - ;; - - 'restart') - checkUser $1 touchlock - stopit - start - ;; - - 'status') - checkUser $1 - status - ;; - - 'dump') - checkUser $1 - dump - ;; - - *) - echo "Usage: $0 { console | start | stop | restart | status | dump }" - exit 1 - ;; -esac - -exit 0 diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-common-32-3.2.0/src/conf/wrapper.conf.in b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-common-32-3.2.0/src/conf/wrapper.conf.in deleted file mode 100644 index 76f46e63b..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-common-32-3.2.0/src/conf/wrapper.conf.in +++ /dev/null @@ -1,94 +0,0 @@ -#******************************************************************** -# Wrapper Properties -#******************************************************************** -# Java Application -wrapper.java.command=java - -# Java Main class. This class must implement the WrapperListener interface -# or guarantee that the WrapperManager class is initialized. Helper -# classes are provided to do this for you. See the Integration section -# of the documentation for details. -wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp - -# Java Classpath (include wrapper.jar) Add class path elements as -# needed starting from 1 -wrapper.java.classpath.1=../lib/wrapper.jar - -# Java Library Path (location of Wrapper.DLL or libwrapper.so) -wrapper.java.library.path.1=../lib - -# Java Additional Parameters -#wrapper.java.additional.1= - -# Initial Java Heap Size (in MB) -#wrapper.java.initmemory=3 - -# Maximum Java Heap Size (in MB) -#wrapper.java.maxmemory=64 - -# Application parameters. Add parameters as needed starting from 1 -wrapper.app.parameter.1= - -#******************************************************************** -# Wrapper Logging Properties -#******************************************************************** -# Format of output for the console. (See docs for formats) -wrapper.console.format=PM - -# Log Level for console output. (See docs for log levels) -wrapper.console.loglevel=INFO - -# Log file to use for wrapper output logging. -wrapper.logfile=../logs/wrapper.log - -# Format of output for the log file. (See docs for formats) -wrapper.logfile.format=LPTM - -# Log Level for log file output. (See docs for log levels) -wrapper.logfile.loglevel=INFO - -# Maximum size that the log file will be allowed to grow to before -# the log is rolled. Size is specified in bytes. The default value -# of 0, disables log rolling. May abbreviate with the 'k' (kb) or -# 'm' (mb) suffix. For example: 10m = 10 megabytes. -wrapper.logfile.maxsize=0 - -# Maximum number of rolled log files which will be allowed before old -# files are deleted. The default value of 0 implies no limit. -wrapper.logfile.maxfiles=0 - -# Log Level for sys/event log output. (See docs for log levels) -wrapper.syslog.loglevel=NONE - -#******************************************************************** -# Wrapper Windows Properties -#******************************************************************** -# Title to use when running as a console -wrapper.console.title=@app.long.name@ - -#******************************************************************** -# Wrapper Windows NT/2000/XP Service Properties -#******************************************************************** -# WARNING - Do not modify any of these properties when an application -# using this configuration file has been installed as a service. -# Please uninstall the service before modifying this section. The -# service can then be reinstalled. - -# Name of the service -wrapper.ntservice.name=@app.name@ - -# Display name of the service -wrapper.ntservice.displayname=@app.long.name@ - -# Description of the service -wrapper.ntservice.description=@app.description@ - -# Service dependencies. Add dependencies as needed starting from 1 -wrapper.ntservice.dependency.1= - -# Mode in which the service is installed. AUTO_START or DEMAND_START -wrapper.ntservice.starttype=AUTO_START - -# Allow the service to interact with the desktop. -wrapper.ntservice.interactive=false - diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-freebsd-x86-32-3.2.0/bin/testwrapper b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-freebsd-x86-32-3.2.0/bin/testwrapper deleted file mode 100755 index 1dfc5c100..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-freebsd-x86-32-3.2.0/bin/testwrapper +++ /dev/null @@ -1,530 +0,0 @@ -#! /bin/sh - -# -# Copyright (c) 1999, 2006 Tanuki Software Inc. -# -# Java Service Wrapper sh script. Suitable for starting and stopping -# wrapped Java applications on UNIX platforms. -# - -#----------------------------------------------------------------------------- -# These settings can be modified to fit the needs of your application - -# Application -APP_NAME="testwrapper" -APP_LONG_NAME="Test Wrapper Sample Application" - -# Wrapper -WRAPPER_CMD="./wrapper" -WRAPPER_CONF="../conf/wrapper.conf" - -# Priority at which to run the wrapper. See "man nice" for valid priorities. -# nice is only used if a priority is specified. -PRIORITY= - -# Location of the pid file. -PIDDIR="." - -# If uncommented, causes the Wrapper to be shutdown using an anchor file. -# When launched with the 'start' command, it will also ignore all INT and -# TERM signals. -#IGNORE_SIGNALS=true - -# If specified, the Wrapper will be run as the specified user. -# IMPORTANT - Make sure that the user has the required privileges to write -# the PID file and wrapper.log files. Failure to be able to write the log -# file will cause the Wrapper to exit without any way to write out an error -# message. -# NOTE - This will set the user which is used to run the Wrapper as well as -# the JVM and is not useful in situations where a privileged resource or -# port needs to be allocated prior to the user being changed. -#RUN_AS_USER= - -# The following two lines are used by the chkconfig command. Change as is -# appropriate for your application. They should remain commented. -# chkconfig: 2345 20 80 -# description: Test Wrapper Sample Application - -# Do not modify anything beyond this point -#----------------------------------------------------------------------------- - -# Get the fully qualified path to the script -case $0 in - /*) - SCRIPT="$0" - ;; - *) - PWD=`pwd` - SCRIPT="$PWD/$0" - ;; -esac - -# Resolve the true real path without any sym links. -CHANGED=true -while [ "X$CHANGED" != "X" ] -do - # Change spaces to ":" so the tokens can be parsed. - SCRIPT=`echo $SCRIPT | sed -e 's; ;:;g'` - # Get the real path to this script, resolving any symbolic links - TOKENS=`echo $SCRIPT | sed -e 's;/; ;g'` - REALPATH= - for C in $TOKENS; do - REALPATH="$REALPATH/$C" - while [ -h "$REALPATH" ] ; do - LS="`ls -ld "$REALPATH"`" - LINK="`expr "$LS" : '.*-> \(.*\)$'`" - if expr "$LINK" : '/.*' > /dev/null; then - REALPATH="$LINK" - else - REALPATH="`dirname "$REALPATH"`""/$LINK" - fi - done - done - # Change ":" chars back to spaces. - REALPATH=`echo $REALPATH | sed -e 's;:; ;g'` - - if [ "$REALPATH" = "$SCRIPT" ] - then - CHANGED="" - else - SCRIPT="$REALPATH" - fi -done - -# Change the current directory to the location of the script -cd "`dirname "$REALPATH"`" -REALDIR=`pwd` - -# If the PIDDIR is relative, set its value relative to the full REALPATH to avoid problems if -# the working directory is later changed. -FIRST_CHAR=`echo $PIDDIR | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - PIDDIR=$REALDIR/$PIDDIR -fi -# Same test for WRAPPER_CMD -FIRST_CHAR=`echo $WRAPPER_CMD | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - WRAPPER_CMD=$REALDIR/$WRAPPER_CMD -fi -# Same test for WRAPPER_CONF -FIRST_CHAR=`echo $WRAPPER_CONF | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - WRAPPER_CONF=$REALDIR/$WRAPPER_CONF -fi - -# Process ID -ANCHORFILE="$PIDDIR/$APP_NAME.anchor" -PIDFILE="$PIDDIR/$APP_NAME.pid" -LOCKDIR="/var/lock/subsys" -LOCKFILE="$LOCKDIR/$APP_NAME" -pid="" - -# Resolve the location of the 'ps' command -PSEXE="/usr/bin/ps" -if [ ! -x $PSEXE ] -then - PSEXE="/bin/ps" - if [ ! -x $PSEXE ] - then - echo "Unable to locate 'ps'." - echo "Please report this message along with the location of the command on your system." - exit 1 - fi -fi - -# Resolve the os -DIST_OS=`uname -s | tr [:upper:] [:lower:] | tr -d [:blank:]` -case "$DIST_OS" in - 'sunos') - DIST_OS="solaris" - ;; - 'hp-ux' | 'hp-ux64') - DIST_OS="hpux" - ;; - 'darwin') - DIST_OS="macosx" - ;; - 'unix_sv') - DIST_OS="unixware" - ;; -esac - -# Resolve the architecture -DIST_ARCH=`uname -p | tr [:upper:] [:lower:] | tr -d [:blank:]` -if [ "$DIST_ARCH" = "unknown" ] -then - DIST_ARCH=`uname -m | tr [:upper:] [:lower:] | tr -d [:blank:]` -fi -case "$DIST_ARCH" in - 'amd64' | 'ia32' | 'ia64' | 'i386' | 'i486' | 'i586' | 'i686' | 'x86_64') - DIST_ARCH="x86" - ;; - 'ip27') - DIST_ARCH="mips" - ;; - 'power' | 'powerpc' | 'power_pc' | 'ppc64') - DIST_ARCH="ppc" - ;; - 'pa_risc' | 'pa-risc') - DIST_ARCH="parisc" - ;; - 'sun4u' | 'sparcv9') - DIST_ARCH="sparc" - ;; - '9000/800') - DIST_ARCH="parisc" - ;; -esac - -# Decide on the wrapper binary to use. -# If a 32-bit wrapper binary exists then it will work on 32 or 64 bit -# platforms, if the 64-bit binary exists then the distribution most -# likely wants to use long names. Otherwise, look for the default. -# For macosx, we also want to look for universal binaries. -WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" -if [ -x $WRAPPER_TEST_CMD ] -then - WRAPPER_CMD="$WRAPPER_TEST_CMD" -else - if [ "$DIST_OS" = "macosx" ] - then - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-32" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - if [ ! -x $WRAPPER_CMD ] - then - echo "Unable to locate any of the following binaries:" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" - echo " $WRAPPER_CMD-$DIST_OS-universal-32" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - echo " $WRAPPER_CMD-$DIST_OS-universal-64" - echo " $WRAPPER_CMD" - exit 1 - fi - fi - fi - fi - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - if [ ! -x $WRAPPER_CMD ] - then - echo "Unable to locate any of the following binaries:" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - echo " $WRAPPER_CMD" - exit 1 - fi - fi - fi -fi - -# Build the nice clause -if [ "X$PRIORITY" = "X" ] -then - CMDNICE="" -else - CMDNICE="nice -$PRIORITY" -fi - -# Build the anchor file clause. -if [ "X$IGNORE_SIGNALS" = "X" ] -then - ANCHORPROP= - IGNOREPROP= -else - ANCHORPROP=wrapper.anchorfile=$ANCHORFILE - IGNOREPROP=wrapper.ignore_signals=TRUE -fi - -# Build the lock file clause. Only create a lock file if the lock directory exists on this platform. -if [ -d $LOCKDIR ] -then - LOCKPROP=wrapper.lockfile=$LOCKFILE -else - LOCKPROP= -fi - -checkUser() { - # Check the configured user. If necessary rerun this script as the desired user. - if [ "X$RUN_AS_USER" != "X" ] - then - # Resolve the location of the 'id' command - IDEXE="/usr/xpg4/bin/id" - if [ ! -x $IDEXE ] - then - IDEXE="/usr/bin/id" - if [ ! -x $IDEXE ] - then - echo "Unable to locate 'id'." - echo "Please report this message along with the location of the command on your system." - exit 1 - fi - fi - - if [ "`$IDEXE -u -n`" = "$RUN_AS_USER" ] - then - # Already running as the configured user. Avoid password prompts by not calling su. - RUN_AS_USER="" - fi - fi - if [ "X$RUN_AS_USER" != "X" ] - then - # If LOCKPROP and $RUN_AS_USER are defined then the new user will most likely not be - # able to create the lock file. The Wrapper will be able to update this file once it - # is created but will not be able to delete it on shutdown. If $2 is defined then - # the lock file should be created for the current command - if [ "X$LOCKPROP" != "X" ] - then - if [ "X$2" != "X" ] - then - # Resolve the primary group - RUN_AS_GROUP=`groups $RUN_AS_USER | awk '{print $3}' | tail -1` - if [ "X$RUN_AS_GROUP" = "X" ] - then - RUN_AS_GROUP=RUN_AS_USER - fi - touch $LOCKFILE - chown $RUN_AS_USER:$RUN_AS_GROUP $LOCKFILE - fi - fi - - # Still want to change users, recurse. This means that the user will only be - # prompted for a password once. - su -m $RUN_AS_USER -c "$REALPATH $1" - - # Now that we are the original user again, we may need to clean up the lock file. - if [ "X$LOCKPROP" != "X" ] - then - getpid - if [ "X$pid" = "X" ] - then - # Wrapper is not running so make sure the lock file is deleted. - if [ -f $LOCKFILE ] - then - rm $LOCKFILE - fi - fi - fi - - exit 0 - fi -} - -getpid() { - if [ -f $PIDFILE ] - then - if [ -r $PIDFILE ] - then - pid=`cat $PIDFILE` - if [ "X$pid" != "X" ] - then - # It is possible that 'a' process with the pid exists but that it is not the - # correct process. This can happen in a number of cases, but the most - # common is during system startup after an unclean shutdown. - # The ps statement below looks for the specific wrapper command running as - # the pid. If it is not found then the pid file is considered to be stale. - pidtest=`$PSEXE -p $pid -o args | grep $WRAPPER_CMD | tail -1` - if [ "X$pidtest" = "X" ] - then - # This is a stale pid file. - rm -f $PIDFILE - echo "Removed stale pid file: $PIDFILE" - pid="" - fi - fi - else - echo "Cannot read $PIDFILE." - exit 1 - fi - fi -} - -testpid() { - pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1` - if [ "X$pid" = "X" ] - then - # Process is gone so remove the pid file. - rm -f $PIDFILE - pid="" - fi -} - -console() { - echo "Running $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE $ANCHORPROP $LOCKPROP" - exec $COMMAND_LINE - else - echo "$APP_LONG_NAME is already running." - exit 1 - fi -} - -start() { - echo "Starting $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $LOCKPROP" - exec $COMMAND_LINE - else - echo "$APP_LONG_NAME is already running." - exit 1 - fi -} - -stopit() { - echo "Stopping $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME was not running." - else - if [ "X$IGNORE_SIGNALS" = "X" ] - then - # Running so try to stop it. - kill $pid - if [ $? -ne 0 ] - then - # An explanation for the failure should have been given - echo "Unable to stop $APP_LONG_NAME." - exit 1 - fi - else - rm -f $ANCHORFILE - if [ -f $ANCHORFILE ] - then - # An explanation for the failure should have been given - echo "Unable to stop $APP_LONG_NAME." - exit 1 - fi - fi - - # We can not predict how long it will take for the wrapper to - # actually stop as it depends on settings in wrapper.conf. - # Loop until it does. - savepid=$pid - CNT=0 - TOTCNT=0 - while [ "X$pid" != "X" ] - do - # Show a waiting message every 5 seconds. - if [ "$CNT" -lt "5" ] - then - CNT=`expr $CNT + 1` - else - echo "Waiting for $APP_LONG_NAME to exit..." - CNT=0 - fi - TOTCNT=`expr $TOTCNT + 1` - - sleep 1 - - testpid - done - - pid=$savepid - testpid - if [ "X$pid" != "X" ] - then - echo "Failed to stop $APP_LONG_NAME." - exit 1 - else - echo "Stopped $APP_LONG_NAME." - fi - fi -} - -status() { - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME is not running." - exit 1 - else - echo "$APP_LONG_NAME is running ($pid)." - exit 0 - fi -} - -dump() { - echo "Dumping $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME was not running." - - else - kill -3 $pid - - if [ $? -ne 0 ] - then - echo "Failed to dump $APP_LONG_NAME." - exit 1 - else - echo "Dumped $APP_LONG_NAME." - fi - fi -} - -case "$1" in - - 'console') - checkUser $1 touchlock - console - ;; - - 'start') - checkUser $1 touchlock - start - ;; - - 'stop') - checkUser $1 - stopit - ;; - - 'restart') - checkUser $1 touchlock - stopit - start - ;; - - 'status') - checkUser $1 - status - ;; - - 'dump') - checkUser $1 - dump - ;; - - *) - echo "Usage: $0 { console | start | stop | restart | status | dump }" - exit 1 - ;; -esac - -exit 0 diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-freebsd-x86-32-3.2.0/bin/wrapper b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-freebsd-x86-32-3.2.0/bin/wrapper deleted file mode 100755 index 466cbacd3..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-freebsd-x86-32-3.2.0/bin/wrapper and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-freebsd-x86-32-3.2.0/lib/libwrapper.so b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-freebsd-x86-32-3.2.0/lib/libwrapper.so deleted file mode 100755 index f325d52f1..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-freebsd-x86-32-3.2.0/lib/libwrapper.so and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-freebsd-x86-32-3.2.0/lib/wrapper.jar b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-freebsd-x86-32-3.2.0/lib/wrapper.jar deleted file mode 100644 index c76640599..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-freebsd-x86-32-3.2.0/lib/wrapper.jar and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-freebsd-x86-32-3.2.0/lib/wrappertest.jar b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-freebsd-x86-32-3.2.0/lib/wrappertest.jar deleted file mode 100644 index 10e009322..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-freebsd-x86-32-3.2.0/lib/wrappertest.jar and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-32-3.2.0/bin/testwrapper b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-32-3.2.0/bin/testwrapper deleted file mode 100755 index 1dfc5c100..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-32-3.2.0/bin/testwrapper +++ /dev/null @@ -1,530 +0,0 @@ -#! /bin/sh - -# -# Copyright (c) 1999, 2006 Tanuki Software Inc. -# -# Java Service Wrapper sh script. Suitable for starting and stopping -# wrapped Java applications on UNIX platforms. -# - -#----------------------------------------------------------------------------- -# These settings can be modified to fit the needs of your application - -# Application -APP_NAME="testwrapper" -APP_LONG_NAME="Test Wrapper Sample Application" - -# Wrapper -WRAPPER_CMD="./wrapper" -WRAPPER_CONF="../conf/wrapper.conf" - -# Priority at which to run the wrapper. See "man nice" for valid priorities. -# nice is only used if a priority is specified. -PRIORITY= - -# Location of the pid file. -PIDDIR="." - -# If uncommented, causes the Wrapper to be shutdown using an anchor file. -# When launched with the 'start' command, it will also ignore all INT and -# TERM signals. -#IGNORE_SIGNALS=true - -# If specified, the Wrapper will be run as the specified user. -# IMPORTANT - Make sure that the user has the required privileges to write -# the PID file and wrapper.log files. Failure to be able to write the log -# file will cause the Wrapper to exit without any way to write out an error -# message. -# NOTE - This will set the user which is used to run the Wrapper as well as -# the JVM and is not useful in situations where a privileged resource or -# port needs to be allocated prior to the user being changed. -#RUN_AS_USER= - -# The following two lines are used by the chkconfig command. Change as is -# appropriate for your application. They should remain commented. -# chkconfig: 2345 20 80 -# description: Test Wrapper Sample Application - -# Do not modify anything beyond this point -#----------------------------------------------------------------------------- - -# Get the fully qualified path to the script -case $0 in - /*) - SCRIPT="$0" - ;; - *) - PWD=`pwd` - SCRIPT="$PWD/$0" - ;; -esac - -# Resolve the true real path without any sym links. -CHANGED=true -while [ "X$CHANGED" != "X" ] -do - # Change spaces to ":" so the tokens can be parsed. - SCRIPT=`echo $SCRIPT | sed -e 's; ;:;g'` - # Get the real path to this script, resolving any symbolic links - TOKENS=`echo $SCRIPT | sed -e 's;/; ;g'` - REALPATH= - for C in $TOKENS; do - REALPATH="$REALPATH/$C" - while [ -h "$REALPATH" ] ; do - LS="`ls -ld "$REALPATH"`" - LINK="`expr "$LS" : '.*-> \(.*\)$'`" - if expr "$LINK" : '/.*' > /dev/null; then - REALPATH="$LINK" - else - REALPATH="`dirname "$REALPATH"`""/$LINK" - fi - done - done - # Change ":" chars back to spaces. - REALPATH=`echo $REALPATH | sed -e 's;:; ;g'` - - if [ "$REALPATH" = "$SCRIPT" ] - then - CHANGED="" - else - SCRIPT="$REALPATH" - fi -done - -# Change the current directory to the location of the script -cd "`dirname "$REALPATH"`" -REALDIR=`pwd` - -# If the PIDDIR is relative, set its value relative to the full REALPATH to avoid problems if -# the working directory is later changed. -FIRST_CHAR=`echo $PIDDIR | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - PIDDIR=$REALDIR/$PIDDIR -fi -# Same test for WRAPPER_CMD -FIRST_CHAR=`echo $WRAPPER_CMD | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - WRAPPER_CMD=$REALDIR/$WRAPPER_CMD -fi -# Same test for WRAPPER_CONF -FIRST_CHAR=`echo $WRAPPER_CONF | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - WRAPPER_CONF=$REALDIR/$WRAPPER_CONF -fi - -# Process ID -ANCHORFILE="$PIDDIR/$APP_NAME.anchor" -PIDFILE="$PIDDIR/$APP_NAME.pid" -LOCKDIR="/var/lock/subsys" -LOCKFILE="$LOCKDIR/$APP_NAME" -pid="" - -# Resolve the location of the 'ps' command -PSEXE="/usr/bin/ps" -if [ ! -x $PSEXE ] -then - PSEXE="/bin/ps" - if [ ! -x $PSEXE ] - then - echo "Unable to locate 'ps'." - echo "Please report this message along with the location of the command on your system." - exit 1 - fi -fi - -# Resolve the os -DIST_OS=`uname -s | tr [:upper:] [:lower:] | tr -d [:blank:]` -case "$DIST_OS" in - 'sunos') - DIST_OS="solaris" - ;; - 'hp-ux' | 'hp-ux64') - DIST_OS="hpux" - ;; - 'darwin') - DIST_OS="macosx" - ;; - 'unix_sv') - DIST_OS="unixware" - ;; -esac - -# Resolve the architecture -DIST_ARCH=`uname -p | tr [:upper:] [:lower:] | tr -d [:blank:]` -if [ "$DIST_ARCH" = "unknown" ] -then - DIST_ARCH=`uname -m | tr [:upper:] [:lower:] | tr -d [:blank:]` -fi -case "$DIST_ARCH" in - 'amd64' | 'ia32' | 'ia64' | 'i386' | 'i486' | 'i586' | 'i686' | 'x86_64') - DIST_ARCH="x86" - ;; - 'ip27') - DIST_ARCH="mips" - ;; - 'power' | 'powerpc' | 'power_pc' | 'ppc64') - DIST_ARCH="ppc" - ;; - 'pa_risc' | 'pa-risc') - DIST_ARCH="parisc" - ;; - 'sun4u' | 'sparcv9') - DIST_ARCH="sparc" - ;; - '9000/800') - DIST_ARCH="parisc" - ;; -esac - -# Decide on the wrapper binary to use. -# If a 32-bit wrapper binary exists then it will work on 32 or 64 bit -# platforms, if the 64-bit binary exists then the distribution most -# likely wants to use long names. Otherwise, look for the default. -# For macosx, we also want to look for universal binaries. -WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" -if [ -x $WRAPPER_TEST_CMD ] -then - WRAPPER_CMD="$WRAPPER_TEST_CMD" -else - if [ "$DIST_OS" = "macosx" ] - then - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-32" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - if [ ! -x $WRAPPER_CMD ] - then - echo "Unable to locate any of the following binaries:" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" - echo " $WRAPPER_CMD-$DIST_OS-universal-32" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - echo " $WRAPPER_CMD-$DIST_OS-universal-64" - echo " $WRAPPER_CMD" - exit 1 - fi - fi - fi - fi - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - if [ ! -x $WRAPPER_CMD ] - then - echo "Unable to locate any of the following binaries:" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - echo " $WRAPPER_CMD" - exit 1 - fi - fi - fi -fi - -# Build the nice clause -if [ "X$PRIORITY" = "X" ] -then - CMDNICE="" -else - CMDNICE="nice -$PRIORITY" -fi - -# Build the anchor file clause. -if [ "X$IGNORE_SIGNALS" = "X" ] -then - ANCHORPROP= - IGNOREPROP= -else - ANCHORPROP=wrapper.anchorfile=$ANCHORFILE - IGNOREPROP=wrapper.ignore_signals=TRUE -fi - -# Build the lock file clause. Only create a lock file if the lock directory exists on this platform. -if [ -d $LOCKDIR ] -then - LOCKPROP=wrapper.lockfile=$LOCKFILE -else - LOCKPROP= -fi - -checkUser() { - # Check the configured user. If necessary rerun this script as the desired user. - if [ "X$RUN_AS_USER" != "X" ] - then - # Resolve the location of the 'id' command - IDEXE="/usr/xpg4/bin/id" - if [ ! -x $IDEXE ] - then - IDEXE="/usr/bin/id" - if [ ! -x $IDEXE ] - then - echo "Unable to locate 'id'." - echo "Please report this message along with the location of the command on your system." - exit 1 - fi - fi - - if [ "`$IDEXE -u -n`" = "$RUN_AS_USER" ] - then - # Already running as the configured user. Avoid password prompts by not calling su. - RUN_AS_USER="" - fi - fi - if [ "X$RUN_AS_USER" != "X" ] - then - # If LOCKPROP and $RUN_AS_USER are defined then the new user will most likely not be - # able to create the lock file. The Wrapper will be able to update this file once it - # is created but will not be able to delete it on shutdown. If $2 is defined then - # the lock file should be created for the current command - if [ "X$LOCKPROP" != "X" ] - then - if [ "X$2" != "X" ] - then - # Resolve the primary group - RUN_AS_GROUP=`groups $RUN_AS_USER | awk '{print $3}' | tail -1` - if [ "X$RUN_AS_GROUP" = "X" ] - then - RUN_AS_GROUP=RUN_AS_USER - fi - touch $LOCKFILE - chown $RUN_AS_USER:$RUN_AS_GROUP $LOCKFILE - fi - fi - - # Still want to change users, recurse. This means that the user will only be - # prompted for a password once. - su -m $RUN_AS_USER -c "$REALPATH $1" - - # Now that we are the original user again, we may need to clean up the lock file. - if [ "X$LOCKPROP" != "X" ] - then - getpid - if [ "X$pid" = "X" ] - then - # Wrapper is not running so make sure the lock file is deleted. - if [ -f $LOCKFILE ] - then - rm $LOCKFILE - fi - fi - fi - - exit 0 - fi -} - -getpid() { - if [ -f $PIDFILE ] - then - if [ -r $PIDFILE ] - then - pid=`cat $PIDFILE` - if [ "X$pid" != "X" ] - then - # It is possible that 'a' process with the pid exists but that it is not the - # correct process. This can happen in a number of cases, but the most - # common is during system startup after an unclean shutdown. - # The ps statement below looks for the specific wrapper command running as - # the pid. If it is not found then the pid file is considered to be stale. - pidtest=`$PSEXE -p $pid -o args | grep $WRAPPER_CMD | tail -1` - if [ "X$pidtest" = "X" ] - then - # This is a stale pid file. - rm -f $PIDFILE - echo "Removed stale pid file: $PIDFILE" - pid="" - fi - fi - else - echo "Cannot read $PIDFILE." - exit 1 - fi - fi -} - -testpid() { - pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1` - if [ "X$pid" = "X" ] - then - # Process is gone so remove the pid file. - rm -f $PIDFILE - pid="" - fi -} - -console() { - echo "Running $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE $ANCHORPROP $LOCKPROP" - exec $COMMAND_LINE - else - echo "$APP_LONG_NAME is already running." - exit 1 - fi -} - -start() { - echo "Starting $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $LOCKPROP" - exec $COMMAND_LINE - else - echo "$APP_LONG_NAME is already running." - exit 1 - fi -} - -stopit() { - echo "Stopping $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME was not running." - else - if [ "X$IGNORE_SIGNALS" = "X" ] - then - # Running so try to stop it. - kill $pid - if [ $? -ne 0 ] - then - # An explanation for the failure should have been given - echo "Unable to stop $APP_LONG_NAME." - exit 1 - fi - else - rm -f $ANCHORFILE - if [ -f $ANCHORFILE ] - then - # An explanation for the failure should have been given - echo "Unable to stop $APP_LONG_NAME." - exit 1 - fi - fi - - # We can not predict how long it will take for the wrapper to - # actually stop as it depends on settings in wrapper.conf. - # Loop until it does. - savepid=$pid - CNT=0 - TOTCNT=0 - while [ "X$pid" != "X" ] - do - # Show a waiting message every 5 seconds. - if [ "$CNT" -lt "5" ] - then - CNT=`expr $CNT + 1` - else - echo "Waiting for $APP_LONG_NAME to exit..." - CNT=0 - fi - TOTCNT=`expr $TOTCNT + 1` - - sleep 1 - - testpid - done - - pid=$savepid - testpid - if [ "X$pid" != "X" ] - then - echo "Failed to stop $APP_LONG_NAME." - exit 1 - else - echo "Stopped $APP_LONG_NAME." - fi - fi -} - -status() { - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME is not running." - exit 1 - else - echo "$APP_LONG_NAME is running ($pid)." - exit 0 - fi -} - -dump() { - echo "Dumping $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME was not running." - - else - kill -3 $pid - - if [ $? -ne 0 ] - then - echo "Failed to dump $APP_LONG_NAME." - exit 1 - else - echo "Dumped $APP_LONG_NAME." - fi - fi -} - -case "$1" in - - 'console') - checkUser $1 touchlock - console - ;; - - 'start') - checkUser $1 touchlock - start - ;; - - 'stop') - checkUser $1 - stopit - ;; - - 'restart') - checkUser $1 touchlock - stopit - start - ;; - - 'status') - checkUser $1 - status - ;; - - 'dump') - checkUser $1 - dump - ;; - - *) - echo "Usage: $0 { console | start | stop | restart | status | dump }" - exit 1 - ;; -esac - -exit 0 diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-32-3.2.0/bin/wrapper b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-32-3.2.0/bin/wrapper deleted file mode 100755 index c58d4f768..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-32-3.2.0/bin/wrapper and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-32-3.2.0/lib/libwrapper.so b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-32-3.2.0/lib/libwrapper.so deleted file mode 100755 index df25ec65e..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-32-3.2.0/lib/libwrapper.so and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-32-3.2.0/lib/wrapper.jar b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-32-3.2.0/lib/wrapper.jar deleted file mode 100644 index c76640599..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-32-3.2.0/lib/wrapper.jar and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-32-3.2.0/lib/wrappertest.jar b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-32-3.2.0/lib/wrappertest.jar deleted file mode 100644 index 10e009322..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-32-3.2.0/lib/wrappertest.jar and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-64-3.2.0/bin/testwrapper b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-64-3.2.0/bin/testwrapper deleted file mode 100755 index 1dfc5c100..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-64-3.2.0/bin/testwrapper +++ /dev/null @@ -1,530 +0,0 @@ -#! /bin/sh - -# -# Copyright (c) 1999, 2006 Tanuki Software Inc. -# -# Java Service Wrapper sh script. Suitable for starting and stopping -# wrapped Java applications on UNIX platforms. -# - -#----------------------------------------------------------------------------- -# These settings can be modified to fit the needs of your application - -# Application -APP_NAME="testwrapper" -APP_LONG_NAME="Test Wrapper Sample Application" - -# Wrapper -WRAPPER_CMD="./wrapper" -WRAPPER_CONF="../conf/wrapper.conf" - -# Priority at which to run the wrapper. See "man nice" for valid priorities. -# nice is only used if a priority is specified. -PRIORITY= - -# Location of the pid file. -PIDDIR="." - -# If uncommented, causes the Wrapper to be shutdown using an anchor file. -# When launched with the 'start' command, it will also ignore all INT and -# TERM signals. -#IGNORE_SIGNALS=true - -# If specified, the Wrapper will be run as the specified user. -# IMPORTANT - Make sure that the user has the required privileges to write -# the PID file and wrapper.log files. Failure to be able to write the log -# file will cause the Wrapper to exit without any way to write out an error -# message. -# NOTE - This will set the user which is used to run the Wrapper as well as -# the JVM and is not useful in situations where a privileged resource or -# port needs to be allocated prior to the user being changed. -#RUN_AS_USER= - -# The following two lines are used by the chkconfig command. Change as is -# appropriate for your application. They should remain commented. -# chkconfig: 2345 20 80 -# description: Test Wrapper Sample Application - -# Do not modify anything beyond this point -#----------------------------------------------------------------------------- - -# Get the fully qualified path to the script -case $0 in - /*) - SCRIPT="$0" - ;; - *) - PWD=`pwd` - SCRIPT="$PWD/$0" - ;; -esac - -# Resolve the true real path without any sym links. -CHANGED=true -while [ "X$CHANGED" != "X" ] -do - # Change spaces to ":" so the tokens can be parsed. - SCRIPT=`echo $SCRIPT | sed -e 's; ;:;g'` - # Get the real path to this script, resolving any symbolic links - TOKENS=`echo $SCRIPT | sed -e 's;/; ;g'` - REALPATH= - for C in $TOKENS; do - REALPATH="$REALPATH/$C" - while [ -h "$REALPATH" ] ; do - LS="`ls -ld "$REALPATH"`" - LINK="`expr "$LS" : '.*-> \(.*\)$'`" - if expr "$LINK" : '/.*' > /dev/null; then - REALPATH="$LINK" - else - REALPATH="`dirname "$REALPATH"`""/$LINK" - fi - done - done - # Change ":" chars back to spaces. - REALPATH=`echo $REALPATH | sed -e 's;:; ;g'` - - if [ "$REALPATH" = "$SCRIPT" ] - then - CHANGED="" - else - SCRIPT="$REALPATH" - fi -done - -# Change the current directory to the location of the script -cd "`dirname "$REALPATH"`" -REALDIR=`pwd` - -# If the PIDDIR is relative, set its value relative to the full REALPATH to avoid problems if -# the working directory is later changed. -FIRST_CHAR=`echo $PIDDIR | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - PIDDIR=$REALDIR/$PIDDIR -fi -# Same test for WRAPPER_CMD -FIRST_CHAR=`echo $WRAPPER_CMD | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - WRAPPER_CMD=$REALDIR/$WRAPPER_CMD -fi -# Same test for WRAPPER_CONF -FIRST_CHAR=`echo $WRAPPER_CONF | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - WRAPPER_CONF=$REALDIR/$WRAPPER_CONF -fi - -# Process ID -ANCHORFILE="$PIDDIR/$APP_NAME.anchor" -PIDFILE="$PIDDIR/$APP_NAME.pid" -LOCKDIR="/var/lock/subsys" -LOCKFILE="$LOCKDIR/$APP_NAME" -pid="" - -# Resolve the location of the 'ps' command -PSEXE="/usr/bin/ps" -if [ ! -x $PSEXE ] -then - PSEXE="/bin/ps" - if [ ! -x $PSEXE ] - then - echo "Unable to locate 'ps'." - echo "Please report this message along with the location of the command on your system." - exit 1 - fi -fi - -# Resolve the os -DIST_OS=`uname -s | tr [:upper:] [:lower:] | tr -d [:blank:]` -case "$DIST_OS" in - 'sunos') - DIST_OS="solaris" - ;; - 'hp-ux' | 'hp-ux64') - DIST_OS="hpux" - ;; - 'darwin') - DIST_OS="macosx" - ;; - 'unix_sv') - DIST_OS="unixware" - ;; -esac - -# Resolve the architecture -DIST_ARCH=`uname -p | tr [:upper:] [:lower:] | tr -d [:blank:]` -if [ "$DIST_ARCH" = "unknown" ] -then - DIST_ARCH=`uname -m | tr [:upper:] [:lower:] | tr -d [:blank:]` -fi -case "$DIST_ARCH" in - 'amd64' | 'ia32' | 'ia64' | 'i386' | 'i486' | 'i586' | 'i686' | 'x86_64') - DIST_ARCH="x86" - ;; - 'ip27') - DIST_ARCH="mips" - ;; - 'power' | 'powerpc' | 'power_pc' | 'ppc64') - DIST_ARCH="ppc" - ;; - 'pa_risc' | 'pa-risc') - DIST_ARCH="parisc" - ;; - 'sun4u' | 'sparcv9') - DIST_ARCH="sparc" - ;; - '9000/800') - DIST_ARCH="parisc" - ;; -esac - -# Decide on the wrapper binary to use. -# If a 32-bit wrapper binary exists then it will work on 32 or 64 bit -# platforms, if the 64-bit binary exists then the distribution most -# likely wants to use long names. Otherwise, look for the default. -# For macosx, we also want to look for universal binaries. -WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" -if [ -x $WRAPPER_TEST_CMD ] -then - WRAPPER_CMD="$WRAPPER_TEST_CMD" -else - if [ "$DIST_OS" = "macosx" ] - then - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-32" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - if [ ! -x $WRAPPER_CMD ] - then - echo "Unable to locate any of the following binaries:" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" - echo " $WRAPPER_CMD-$DIST_OS-universal-32" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - echo " $WRAPPER_CMD-$DIST_OS-universal-64" - echo " $WRAPPER_CMD" - exit 1 - fi - fi - fi - fi - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - if [ ! -x $WRAPPER_CMD ] - then - echo "Unable to locate any of the following binaries:" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - echo " $WRAPPER_CMD" - exit 1 - fi - fi - fi -fi - -# Build the nice clause -if [ "X$PRIORITY" = "X" ] -then - CMDNICE="" -else - CMDNICE="nice -$PRIORITY" -fi - -# Build the anchor file clause. -if [ "X$IGNORE_SIGNALS" = "X" ] -then - ANCHORPROP= - IGNOREPROP= -else - ANCHORPROP=wrapper.anchorfile=$ANCHORFILE - IGNOREPROP=wrapper.ignore_signals=TRUE -fi - -# Build the lock file clause. Only create a lock file if the lock directory exists on this platform. -if [ -d $LOCKDIR ] -then - LOCKPROP=wrapper.lockfile=$LOCKFILE -else - LOCKPROP= -fi - -checkUser() { - # Check the configured user. If necessary rerun this script as the desired user. - if [ "X$RUN_AS_USER" != "X" ] - then - # Resolve the location of the 'id' command - IDEXE="/usr/xpg4/bin/id" - if [ ! -x $IDEXE ] - then - IDEXE="/usr/bin/id" - if [ ! -x $IDEXE ] - then - echo "Unable to locate 'id'." - echo "Please report this message along with the location of the command on your system." - exit 1 - fi - fi - - if [ "`$IDEXE -u -n`" = "$RUN_AS_USER" ] - then - # Already running as the configured user. Avoid password prompts by not calling su. - RUN_AS_USER="" - fi - fi - if [ "X$RUN_AS_USER" != "X" ] - then - # If LOCKPROP and $RUN_AS_USER are defined then the new user will most likely not be - # able to create the lock file. The Wrapper will be able to update this file once it - # is created but will not be able to delete it on shutdown. If $2 is defined then - # the lock file should be created for the current command - if [ "X$LOCKPROP" != "X" ] - then - if [ "X$2" != "X" ] - then - # Resolve the primary group - RUN_AS_GROUP=`groups $RUN_AS_USER | awk '{print $3}' | tail -1` - if [ "X$RUN_AS_GROUP" = "X" ] - then - RUN_AS_GROUP=RUN_AS_USER - fi - touch $LOCKFILE - chown $RUN_AS_USER:$RUN_AS_GROUP $LOCKFILE - fi - fi - - # Still want to change users, recurse. This means that the user will only be - # prompted for a password once. - su -m $RUN_AS_USER -c "$REALPATH $1" - - # Now that we are the original user again, we may need to clean up the lock file. - if [ "X$LOCKPROP" != "X" ] - then - getpid - if [ "X$pid" = "X" ] - then - # Wrapper is not running so make sure the lock file is deleted. - if [ -f $LOCKFILE ] - then - rm $LOCKFILE - fi - fi - fi - - exit 0 - fi -} - -getpid() { - if [ -f $PIDFILE ] - then - if [ -r $PIDFILE ] - then - pid=`cat $PIDFILE` - if [ "X$pid" != "X" ] - then - # It is possible that 'a' process with the pid exists but that it is not the - # correct process. This can happen in a number of cases, but the most - # common is during system startup after an unclean shutdown. - # The ps statement below looks for the specific wrapper command running as - # the pid. If it is not found then the pid file is considered to be stale. - pidtest=`$PSEXE -p $pid -o args | grep $WRAPPER_CMD | tail -1` - if [ "X$pidtest" = "X" ] - then - # This is a stale pid file. - rm -f $PIDFILE - echo "Removed stale pid file: $PIDFILE" - pid="" - fi - fi - else - echo "Cannot read $PIDFILE." - exit 1 - fi - fi -} - -testpid() { - pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1` - if [ "X$pid" = "X" ] - then - # Process is gone so remove the pid file. - rm -f $PIDFILE - pid="" - fi -} - -console() { - echo "Running $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE $ANCHORPROP $LOCKPROP" - exec $COMMAND_LINE - else - echo "$APP_LONG_NAME is already running." - exit 1 - fi -} - -start() { - echo "Starting $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $LOCKPROP" - exec $COMMAND_LINE - else - echo "$APP_LONG_NAME is already running." - exit 1 - fi -} - -stopit() { - echo "Stopping $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME was not running." - else - if [ "X$IGNORE_SIGNALS" = "X" ] - then - # Running so try to stop it. - kill $pid - if [ $? -ne 0 ] - then - # An explanation for the failure should have been given - echo "Unable to stop $APP_LONG_NAME." - exit 1 - fi - else - rm -f $ANCHORFILE - if [ -f $ANCHORFILE ] - then - # An explanation for the failure should have been given - echo "Unable to stop $APP_LONG_NAME." - exit 1 - fi - fi - - # We can not predict how long it will take for the wrapper to - # actually stop as it depends on settings in wrapper.conf. - # Loop until it does. - savepid=$pid - CNT=0 - TOTCNT=0 - while [ "X$pid" != "X" ] - do - # Show a waiting message every 5 seconds. - if [ "$CNT" -lt "5" ] - then - CNT=`expr $CNT + 1` - else - echo "Waiting for $APP_LONG_NAME to exit..." - CNT=0 - fi - TOTCNT=`expr $TOTCNT + 1` - - sleep 1 - - testpid - done - - pid=$savepid - testpid - if [ "X$pid" != "X" ] - then - echo "Failed to stop $APP_LONG_NAME." - exit 1 - else - echo "Stopped $APP_LONG_NAME." - fi - fi -} - -status() { - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME is not running." - exit 1 - else - echo "$APP_LONG_NAME is running ($pid)." - exit 0 - fi -} - -dump() { - echo "Dumping $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME was not running." - - else - kill -3 $pid - - if [ $? -ne 0 ] - then - echo "Failed to dump $APP_LONG_NAME." - exit 1 - else - echo "Dumped $APP_LONG_NAME." - fi - fi -} - -case "$1" in - - 'console') - checkUser $1 touchlock - console - ;; - - 'start') - checkUser $1 touchlock - start - ;; - - 'stop') - checkUser $1 - stopit - ;; - - 'restart') - checkUser $1 touchlock - stopit - start - ;; - - 'status') - checkUser $1 - status - ;; - - 'dump') - checkUser $1 - dump - ;; - - *) - echo "Usage: $0 { console | start | stop | restart | status | dump }" - exit 1 - ;; -esac - -exit 0 diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-64-3.2.0/bin/wrapper b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-64-3.2.0/bin/wrapper deleted file mode 100755 index d6b4fe9b4..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-64-3.2.0/bin/wrapper and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-64-3.2.0/lib/libwrapper.so b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-64-3.2.0/lib/libwrapper.so deleted file mode 100755 index 6825bcda5..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-64-3.2.0/lib/libwrapper.so and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-64-3.2.0/lib/wrapper.jar b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-64-3.2.0/lib/wrapper.jar deleted file mode 100644 index c76640599..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-64-3.2.0/lib/wrapper.jar and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-64-3.2.0/lib/wrappertest.jar b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-64-3.2.0/lib/wrappertest.jar deleted file mode 100644 index 10e009322..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-linux-x86-64-3.2.0/lib/wrappertest.jar and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-macosx-universal-32-3.2.0/bin/testwrapper b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-macosx-universal-32-3.2.0/bin/testwrapper deleted file mode 100755 index 1dfc5c100..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-macosx-universal-32-3.2.0/bin/testwrapper +++ /dev/null @@ -1,530 +0,0 @@ -#! /bin/sh - -# -# Copyright (c) 1999, 2006 Tanuki Software Inc. -# -# Java Service Wrapper sh script. Suitable for starting and stopping -# wrapped Java applications on UNIX platforms. -# - -#----------------------------------------------------------------------------- -# These settings can be modified to fit the needs of your application - -# Application -APP_NAME="testwrapper" -APP_LONG_NAME="Test Wrapper Sample Application" - -# Wrapper -WRAPPER_CMD="./wrapper" -WRAPPER_CONF="../conf/wrapper.conf" - -# Priority at which to run the wrapper. See "man nice" for valid priorities. -# nice is only used if a priority is specified. -PRIORITY= - -# Location of the pid file. -PIDDIR="." - -# If uncommented, causes the Wrapper to be shutdown using an anchor file. -# When launched with the 'start' command, it will also ignore all INT and -# TERM signals. -#IGNORE_SIGNALS=true - -# If specified, the Wrapper will be run as the specified user. -# IMPORTANT - Make sure that the user has the required privileges to write -# the PID file and wrapper.log files. Failure to be able to write the log -# file will cause the Wrapper to exit without any way to write out an error -# message. -# NOTE - This will set the user which is used to run the Wrapper as well as -# the JVM and is not useful in situations where a privileged resource or -# port needs to be allocated prior to the user being changed. -#RUN_AS_USER= - -# The following two lines are used by the chkconfig command. Change as is -# appropriate for your application. They should remain commented. -# chkconfig: 2345 20 80 -# description: Test Wrapper Sample Application - -# Do not modify anything beyond this point -#----------------------------------------------------------------------------- - -# Get the fully qualified path to the script -case $0 in - /*) - SCRIPT="$0" - ;; - *) - PWD=`pwd` - SCRIPT="$PWD/$0" - ;; -esac - -# Resolve the true real path without any sym links. -CHANGED=true -while [ "X$CHANGED" != "X" ] -do - # Change spaces to ":" so the tokens can be parsed. - SCRIPT=`echo $SCRIPT | sed -e 's; ;:;g'` - # Get the real path to this script, resolving any symbolic links - TOKENS=`echo $SCRIPT | sed -e 's;/; ;g'` - REALPATH= - for C in $TOKENS; do - REALPATH="$REALPATH/$C" - while [ -h "$REALPATH" ] ; do - LS="`ls -ld "$REALPATH"`" - LINK="`expr "$LS" : '.*-> \(.*\)$'`" - if expr "$LINK" : '/.*' > /dev/null; then - REALPATH="$LINK" - else - REALPATH="`dirname "$REALPATH"`""/$LINK" - fi - done - done - # Change ":" chars back to spaces. - REALPATH=`echo $REALPATH | sed -e 's;:; ;g'` - - if [ "$REALPATH" = "$SCRIPT" ] - then - CHANGED="" - else - SCRIPT="$REALPATH" - fi -done - -# Change the current directory to the location of the script -cd "`dirname "$REALPATH"`" -REALDIR=`pwd` - -# If the PIDDIR is relative, set its value relative to the full REALPATH to avoid problems if -# the working directory is later changed. -FIRST_CHAR=`echo $PIDDIR | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - PIDDIR=$REALDIR/$PIDDIR -fi -# Same test for WRAPPER_CMD -FIRST_CHAR=`echo $WRAPPER_CMD | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - WRAPPER_CMD=$REALDIR/$WRAPPER_CMD -fi -# Same test for WRAPPER_CONF -FIRST_CHAR=`echo $WRAPPER_CONF | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - WRAPPER_CONF=$REALDIR/$WRAPPER_CONF -fi - -# Process ID -ANCHORFILE="$PIDDIR/$APP_NAME.anchor" -PIDFILE="$PIDDIR/$APP_NAME.pid" -LOCKDIR="/var/lock/subsys" -LOCKFILE="$LOCKDIR/$APP_NAME" -pid="" - -# Resolve the location of the 'ps' command -PSEXE="/usr/bin/ps" -if [ ! -x $PSEXE ] -then - PSEXE="/bin/ps" - if [ ! -x $PSEXE ] - then - echo "Unable to locate 'ps'." - echo "Please report this message along with the location of the command on your system." - exit 1 - fi -fi - -# Resolve the os -DIST_OS=`uname -s | tr [:upper:] [:lower:] | tr -d [:blank:]` -case "$DIST_OS" in - 'sunos') - DIST_OS="solaris" - ;; - 'hp-ux' | 'hp-ux64') - DIST_OS="hpux" - ;; - 'darwin') - DIST_OS="macosx" - ;; - 'unix_sv') - DIST_OS="unixware" - ;; -esac - -# Resolve the architecture -DIST_ARCH=`uname -p | tr [:upper:] [:lower:] | tr -d [:blank:]` -if [ "$DIST_ARCH" = "unknown" ] -then - DIST_ARCH=`uname -m | tr [:upper:] [:lower:] | tr -d [:blank:]` -fi -case "$DIST_ARCH" in - 'amd64' | 'ia32' | 'ia64' | 'i386' | 'i486' | 'i586' | 'i686' | 'x86_64') - DIST_ARCH="x86" - ;; - 'ip27') - DIST_ARCH="mips" - ;; - 'power' | 'powerpc' | 'power_pc' | 'ppc64') - DIST_ARCH="ppc" - ;; - 'pa_risc' | 'pa-risc') - DIST_ARCH="parisc" - ;; - 'sun4u' | 'sparcv9') - DIST_ARCH="sparc" - ;; - '9000/800') - DIST_ARCH="parisc" - ;; -esac - -# Decide on the wrapper binary to use. -# If a 32-bit wrapper binary exists then it will work on 32 or 64 bit -# platforms, if the 64-bit binary exists then the distribution most -# likely wants to use long names. Otherwise, look for the default. -# For macosx, we also want to look for universal binaries. -WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" -if [ -x $WRAPPER_TEST_CMD ] -then - WRAPPER_CMD="$WRAPPER_TEST_CMD" -else - if [ "$DIST_OS" = "macosx" ] - then - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-32" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - if [ ! -x $WRAPPER_CMD ] - then - echo "Unable to locate any of the following binaries:" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" - echo " $WRAPPER_CMD-$DIST_OS-universal-32" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - echo " $WRAPPER_CMD-$DIST_OS-universal-64" - echo " $WRAPPER_CMD" - exit 1 - fi - fi - fi - fi - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - if [ ! -x $WRAPPER_CMD ] - then - echo "Unable to locate any of the following binaries:" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - echo " $WRAPPER_CMD" - exit 1 - fi - fi - fi -fi - -# Build the nice clause -if [ "X$PRIORITY" = "X" ] -then - CMDNICE="" -else - CMDNICE="nice -$PRIORITY" -fi - -# Build the anchor file clause. -if [ "X$IGNORE_SIGNALS" = "X" ] -then - ANCHORPROP= - IGNOREPROP= -else - ANCHORPROP=wrapper.anchorfile=$ANCHORFILE - IGNOREPROP=wrapper.ignore_signals=TRUE -fi - -# Build the lock file clause. Only create a lock file if the lock directory exists on this platform. -if [ -d $LOCKDIR ] -then - LOCKPROP=wrapper.lockfile=$LOCKFILE -else - LOCKPROP= -fi - -checkUser() { - # Check the configured user. If necessary rerun this script as the desired user. - if [ "X$RUN_AS_USER" != "X" ] - then - # Resolve the location of the 'id' command - IDEXE="/usr/xpg4/bin/id" - if [ ! -x $IDEXE ] - then - IDEXE="/usr/bin/id" - if [ ! -x $IDEXE ] - then - echo "Unable to locate 'id'." - echo "Please report this message along with the location of the command on your system." - exit 1 - fi - fi - - if [ "`$IDEXE -u -n`" = "$RUN_AS_USER" ] - then - # Already running as the configured user. Avoid password prompts by not calling su. - RUN_AS_USER="" - fi - fi - if [ "X$RUN_AS_USER" != "X" ] - then - # If LOCKPROP and $RUN_AS_USER are defined then the new user will most likely not be - # able to create the lock file. The Wrapper will be able to update this file once it - # is created but will not be able to delete it on shutdown. If $2 is defined then - # the lock file should be created for the current command - if [ "X$LOCKPROP" != "X" ] - then - if [ "X$2" != "X" ] - then - # Resolve the primary group - RUN_AS_GROUP=`groups $RUN_AS_USER | awk '{print $3}' | tail -1` - if [ "X$RUN_AS_GROUP" = "X" ] - then - RUN_AS_GROUP=RUN_AS_USER - fi - touch $LOCKFILE - chown $RUN_AS_USER:$RUN_AS_GROUP $LOCKFILE - fi - fi - - # Still want to change users, recurse. This means that the user will only be - # prompted for a password once. - su -m $RUN_AS_USER -c "$REALPATH $1" - - # Now that we are the original user again, we may need to clean up the lock file. - if [ "X$LOCKPROP" != "X" ] - then - getpid - if [ "X$pid" = "X" ] - then - # Wrapper is not running so make sure the lock file is deleted. - if [ -f $LOCKFILE ] - then - rm $LOCKFILE - fi - fi - fi - - exit 0 - fi -} - -getpid() { - if [ -f $PIDFILE ] - then - if [ -r $PIDFILE ] - then - pid=`cat $PIDFILE` - if [ "X$pid" != "X" ] - then - # It is possible that 'a' process with the pid exists but that it is not the - # correct process. This can happen in a number of cases, but the most - # common is during system startup after an unclean shutdown. - # The ps statement below looks for the specific wrapper command running as - # the pid. If it is not found then the pid file is considered to be stale. - pidtest=`$PSEXE -p $pid -o args | grep $WRAPPER_CMD | tail -1` - if [ "X$pidtest" = "X" ] - then - # This is a stale pid file. - rm -f $PIDFILE - echo "Removed stale pid file: $PIDFILE" - pid="" - fi - fi - else - echo "Cannot read $PIDFILE." - exit 1 - fi - fi -} - -testpid() { - pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1` - if [ "X$pid" = "X" ] - then - # Process is gone so remove the pid file. - rm -f $PIDFILE - pid="" - fi -} - -console() { - echo "Running $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE $ANCHORPROP $LOCKPROP" - exec $COMMAND_LINE - else - echo "$APP_LONG_NAME is already running." - exit 1 - fi -} - -start() { - echo "Starting $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $LOCKPROP" - exec $COMMAND_LINE - else - echo "$APP_LONG_NAME is already running." - exit 1 - fi -} - -stopit() { - echo "Stopping $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME was not running." - else - if [ "X$IGNORE_SIGNALS" = "X" ] - then - # Running so try to stop it. - kill $pid - if [ $? -ne 0 ] - then - # An explanation for the failure should have been given - echo "Unable to stop $APP_LONG_NAME." - exit 1 - fi - else - rm -f $ANCHORFILE - if [ -f $ANCHORFILE ] - then - # An explanation for the failure should have been given - echo "Unable to stop $APP_LONG_NAME." - exit 1 - fi - fi - - # We can not predict how long it will take for the wrapper to - # actually stop as it depends on settings in wrapper.conf. - # Loop until it does. - savepid=$pid - CNT=0 - TOTCNT=0 - while [ "X$pid" != "X" ] - do - # Show a waiting message every 5 seconds. - if [ "$CNT" -lt "5" ] - then - CNT=`expr $CNT + 1` - else - echo "Waiting for $APP_LONG_NAME to exit..." - CNT=0 - fi - TOTCNT=`expr $TOTCNT + 1` - - sleep 1 - - testpid - done - - pid=$savepid - testpid - if [ "X$pid" != "X" ] - then - echo "Failed to stop $APP_LONG_NAME." - exit 1 - else - echo "Stopped $APP_LONG_NAME." - fi - fi -} - -status() { - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME is not running." - exit 1 - else - echo "$APP_LONG_NAME is running ($pid)." - exit 0 - fi -} - -dump() { - echo "Dumping $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME was not running." - - else - kill -3 $pid - - if [ $? -ne 0 ] - then - echo "Failed to dump $APP_LONG_NAME." - exit 1 - else - echo "Dumped $APP_LONG_NAME." - fi - fi -} - -case "$1" in - - 'console') - checkUser $1 touchlock - console - ;; - - 'start') - checkUser $1 touchlock - start - ;; - - 'stop') - checkUser $1 - stopit - ;; - - 'restart') - checkUser $1 touchlock - stopit - start - ;; - - 'status') - checkUser $1 - status - ;; - - 'dump') - checkUser $1 - dump - ;; - - *) - echo "Usage: $0 { console | start | stop | restart | status | dump }" - exit 1 - ;; -esac - -exit 0 diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-macosx-universal-32-3.2.0/bin/wrapper b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-macosx-universal-32-3.2.0/bin/wrapper deleted file mode 100755 index 8c281b950..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-macosx-universal-32-3.2.0/bin/wrapper and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-macosx-universal-32-3.2.0/lib/libwrapper.jnilib b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-macosx-universal-32-3.2.0/lib/libwrapper.jnilib deleted file mode 100755 index ae5a14e2d..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-macosx-universal-32-3.2.0/lib/libwrapper.jnilib and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-macosx-universal-32-3.2.0/lib/wrapper.jar b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-macosx-universal-32-3.2.0/lib/wrapper.jar deleted file mode 100644 index c76640599..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-macosx-universal-32-3.2.0/lib/wrapper.jar and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-macosx-universal-32-3.2.0/lib/wrappertest.jar b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-macosx-universal-32-3.2.0/lib/wrappertest.jar deleted file mode 100644 index 10e009322..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-macosx-universal-32-3.2.0/lib/wrappertest.jar and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-32-3.2.0/bin/testwrapper b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-32-3.2.0/bin/testwrapper deleted file mode 100755 index 1dfc5c100..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-32-3.2.0/bin/testwrapper +++ /dev/null @@ -1,530 +0,0 @@ -#! /bin/sh - -# -# Copyright (c) 1999, 2006 Tanuki Software Inc. -# -# Java Service Wrapper sh script. Suitable for starting and stopping -# wrapped Java applications on UNIX platforms. -# - -#----------------------------------------------------------------------------- -# These settings can be modified to fit the needs of your application - -# Application -APP_NAME="testwrapper" -APP_LONG_NAME="Test Wrapper Sample Application" - -# Wrapper -WRAPPER_CMD="./wrapper" -WRAPPER_CONF="../conf/wrapper.conf" - -# Priority at which to run the wrapper. See "man nice" for valid priorities. -# nice is only used if a priority is specified. -PRIORITY= - -# Location of the pid file. -PIDDIR="." - -# If uncommented, causes the Wrapper to be shutdown using an anchor file. -# When launched with the 'start' command, it will also ignore all INT and -# TERM signals. -#IGNORE_SIGNALS=true - -# If specified, the Wrapper will be run as the specified user. -# IMPORTANT - Make sure that the user has the required privileges to write -# the PID file and wrapper.log files. Failure to be able to write the log -# file will cause the Wrapper to exit without any way to write out an error -# message. -# NOTE - This will set the user which is used to run the Wrapper as well as -# the JVM and is not useful in situations where a privileged resource or -# port needs to be allocated prior to the user being changed. -#RUN_AS_USER= - -# The following two lines are used by the chkconfig command. Change as is -# appropriate for your application. They should remain commented. -# chkconfig: 2345 20 80 -# description: Test Wrapper Sample Application - -# Do not modify anything beyond this point -#----------------------------------------------------------------------------- - -# Get the fully qualified path to the script -case $0 in - /*) - SCRIPT="$0" - ;; - *) - PWD=`pwd` - SCRIPT="$PWD/$0" - ;; -esac - -# Resolve the true real path without any sym links. -CHANGED=true -while [ "X$CHANGED" != "X" ] -do - # Change spaces to ":" so the tokens can be parsed. - SCRIPT=`echo $SCRIPT | sed -e 's; ;:;g'` - # Get the real path to this script, resolving any symbolic links - TOKENS=`echo $SCRIPT | sed -e 's;/; ;g'` - REALPATH= - for C in $TOKENS; do - REALPATH="$REALPATH/$C" - while [ -h "$REALPATH" ] ; do - LS="`ls -ld "$REALPATH"`" - LINK="`expr "$LS" : '.*-> \(.*\)$'`" - if expr "$LINK" : '/.*' > /dev/null; then - REALPATH="$LINK" - else - REALPATH="`dirname "$REALPATH"`""/$LINK" - fi - done - done - # Change ":" chars back to spaces. - REALPATH=`echo $REALPATH | sed -e 's;:; ;g'` - - if [ "$REALPATH" = "$SCRIPT" ] - then - CHANGED="" - else - SCRIPT="$REALPATH" - fi -done - -# Change the current directory to the location of the script -cd "`dirname "$REALPATH"`" -REALDIR=`pwd` - -# If the PIDDIR is relative, set its value relative to the full REALPATH to avoid problems if -# the working directory is later changed. -FIRST_CHAR=`echo $PIDDIR | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - PIDDIR=$REALDIR/$PIDDIR -fi -# Same test for WRAPPER_CMD -FIRST_CHAR=`echo $WRAPPER_CMD | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - WRAPPER_CMD=$REALDIR/$WRAPPER_CMD -fi -# Same test for WRAPPER_CONF -FIRST_CHAR=`echo $WRAPPER_CONF | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - WRAPPER_CONF=$REALDIR/$WRAPPER_CONF -fi - -# Process ID -ANCHORFILE="$PIDDIR/$APP_NAME.anchor" -PIDFILE="$PIDDIR/$APP_NAME.pid" -LOCKDIR="/var/lock/subsys" -LOCKFILE="$LOCKDIR/$APP_NAME" -pid="" - -# Resolve the location of the 'ps' command -PSEXE="/usr/bin/ps" -if [ ! -x $PSEXE ] -then - PSEXE="/bin/ps" - if [ ! -x $PSEXE ] - then - echo "Unable to locate 'ps'." - echo "Please report this message along with the location of the command on your system." - exit 1 - fi -fi - -# Resolve the os -DIST_OS=`uname -s | tr [:upper:] [:lower:] | tr -d [:blank:]` -case "$DIST_OS" in - 'sunos') - DIST_OS="solaris" - ;; - 'hp-ux' | 'hp-ux64') - DIST_OS="hpux" - ;; - 'darwin') - DIST_OS="macosx" - ;; - 'unix_sv') - DIST_OS="unixware" - ;; -esac - -# Resolve the architecture -DIST_ARCH=`uname -p | tr [:upper:] [:lower:] | tr -d [:blank:]` -if [ "$DIST_ARCH" = "unknown" ] -then - DIST_ARCH=`uname -m | tr [:upper:] [:lower:] | tr -d [:blank:]` -fi -case "$DIST_ARCH" in - 'amd64' | 'ia32' | 'ia64' | 'i386' | 'i486' | 'i586' | 'i686' | 'x86_64') - DIST_ARCH="x86" - ;; - 'ip27') - DIST_ARCH="mips" - ;; - 'power' | 'powerpc' | 'power_pc' | 'ppc64') - DIST_ARCH="ppc" - ;; - 'pa_risc' | 'pa-risc') - DIST_ARCH="parisc" - ;; - 'sun4u' | 'sparcv9') - DIST_ARCH="sparc" - ;; - '9000/800') - DIST_ARCH="parisc" - ;; -esac - -# Decide on the wrapper binary to use. -# If a 32-bit wrapper binary exists then it will work on 32 or 64 bit -# platforms, if the 64-bit binary exists then the distribution most -# likely wants to use long names. Otherwise, look for the default. -# For macosx, we also want to look for universal binaries. -WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" -if [ -x $WRAPPER_TEST_CMD ] -then - WRAPPER_CMD="$WRAPPER_TEST_CMD" -else - if [ "$DIST_OS" = "macosx" ] - then - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-32" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - if [ ! -x $WRAPPER_CMD ] - then - echo "Unable to locate any of the following binaries:" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" - echo " $WRAPPER_CMD-$DIST_OS-universal-32" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - echo " $WRAPPER_CMD-$DIST_OS-universal-64" - echo " $WRAPPER_CMD" - exit 1 - fi - fi - fi - fi - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - if [ ! -x $WRAPPER_CMD ] - then - echo "Unable to locate any of the following binaries:" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - echo " $WRAPPER_CMD" - exit 1 - fi - fi - fi -fi - -# Build the nice clause -if [ "X$PRIORITY" = "X" ] -then - CMDNICE="" -else - CMDNICE="nice -$PRIORITY" -fi - -# Build the anchor file clause. -if [ "X$IGNORE_SIGNALS" = "X" ] -then - ANCHORPROP= - IGNOREPROP= -else - ANCHORPROP=wrapper.anchorfile=$ANCHORFILE - IGNOREPROP=wrapper.ignore_signals=TRUE -fi - -# Build the lock file clause. Only create a lock file if the lock directory exists on this platform. -if [ -d $LOCKDIR ] -then - LOCKPROP=wrapper.lockfile=$LOCKFILE -else - LOCKPROP= -fi - -checkUser() { - # Check the configured user. If necessary rerun this script as the desired user. - if [ "X$RUN_AS_USER" != "X" ] - then - # Resolve the location of the 'id' command - IDEXE="/usr/xpg4/bin/id" - if [ ! -x $IDEXE ] - then - IDEXE="/usr/bin/id" - if [ ! -x $IDEXE ] - then - echo "Unable to locate 'id'." - echo "Please report this message along with the location of the command on your system." - exit 1 - fi - fi - - if [ "`$IDEXE -u -n`" = "$RUN_AS_USER" ] - then - # Already running as the configured user. Avoid password prompts by not calling su. - RUN_AS_USER="" - fi - fi - if [ "X$RUN_AS_USER" != "X" ] - then - # If LOCKPROP and $RUN_AS_USER are defined then the new user will most likely not be - # able to create the lock file. The Wrapper will be able to update this file once it - # is created but will not be able to delete it on shutdown. If $2 is defined then - # the lock file should be created for the current command - if [ "X$LOCKPROP" != "X" ] - then - if [ "X$2" != "X" ] - then - # Resolve the primary group - RUN_AS_GROUP=`groups $RUN_AS_USER | awk '{print $3}' | tail -1` - if [ "X$RUN_AS_GROUP" = "X" ] - then - RUN_AS_GROUP=RUN_AS_USER - fi - touch $LOCKFILE - chown $RUN_AS_USER:$RUN_AS_GROUP $LOCKFILE - fi - fi - - # Still want to change users, recurse. This means that the user will only be - # prompted for a password once. - su -m $RUN_AS_USER -c "$REALPATH $1" - - # Now that we are the original user again, we may need to clean up the lock file. - if [ "X$LOCKPROP" != "X" ] - then - getpid - if [ "X$pid" = "X" ] - then - # Wrapper is not running so make sure the lock file is deleted. - if [ -f $LOCKFILE ] - then - rm $LOCKFILE - fi - fi - fi - - exit 0 - fi -} - -getpid() { - if [ -f $PIDFILE ] - then - if [ -r $PIDFILE ] - then - pid=`cat $PIDFILE` - if [ "X$pid" != "X" ] - then - # It is possible that 'a' process with the pid exists but that it is not the - # correct process. This can happen in a number of cases, but the most - # common is during system startup after an unclean shutdown. - # The ps statement below looks for the specific wrapper command running as - # the pid. If it is not found then the pid file is considered to be stale. - pidtest=`$PSEXE -p $pid -o args | grep $WRAPPER_CMD | tail -1` - if [ "X$pidtest" = "X" ] - then - # This is a stale pid file. - rm -f $PIDFILE - echo "Removed stale pid file: $PIDFILE" - pid="" - fi - fi - else - echo "Cannot read $PIDFILE." - exit 1 - fi - fi -} - -testpid() { - pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1` - if [ "X$pid" = "X" ] - then - # Process is gone so remove the pid file. - rm -f $PIDFILE - pid="" - fi -} - -console() { - echo "Running $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE $ANCHORPROP $LOCKPROP" - exec $COMMAND_LINE - else - echo "$APP_LONG_NAME is already running." - exit 1 - fi -} - -start() { - echo "Starting $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $LOCKPROP" - exec $COMMAND_LINE - else - echo "$APP_LONG_NAME is already running." - exit 1 - fi -} - -stopit() { - echo "Stopping $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME was not running." - else - if [ "X$IGNORE_SIGNALS" = "X" ] - then - # Running so try to stop it. - kill $pid - if [ $? -ne 0 ] - then - # An explanation for the failure should have been given - echo "Unable to stop $APP_LONG_NAME." - exit 1 - fi - else - rm -f $ANCHORFILE - if [ -f $ANCHORFILE ] - then - # An explanation for the failure should have been given - echo "Unable to stop $APP_LONG_NAME." - exit 1 - fi - fi - - # We can not predict how long it will take for the wrapper to - # actually stop as it depends on settings in wrapper.conf. - # Loop until it does. - savepid=$pid - CNT=0 - TOTCNT=0 - while [ "X$pid" != "X" ] - do - # Show a waiting message every 5 seconds. - if [ "$CNT" -lt "5" ] - then - CNT=`expr $CNT + 1` - else - echo "Waiting for $APP_LONG_NAME to exit..." - CNT=0 - fi - TOTCNT=`expr $TOTCNT + 1` - - sleep 1 - - testpid - done - - pid=$savepid - testpid - if [ "X$pid" != "X" ] - then - echo "Failed to stop $APP_LONG_NAME." - exit 1 - else - echo "Stopped $APP_LONG_NAME." - fi - fi -} - -status() { - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME is not running." - exit 1 - else - echo "$APP_LONG_NAME is running ($pid)." - exit 0 - fi -} - -dump() { - echo "Dumping $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME was not running." - - else - kill -3 $pid - - if [ $? -ne 0 ] - then - echo "Failed to dump $APP_LONG_NAME." - exit 1 - else - echo "Dumped $APP_LONG_NAME." - fi - fi -} - -case "$1" in - - 'console') - checkUser $1 touchlock - console - ;; - - 'start') - checkUser $1 touchlock - start - ;; - - 'stop') - checkUser $1 - stopit - ;; - - 'restart') - checkUser $1 touchlock - stopit - start - ;; - - 'status') - checkUser $1 - status - ;; - - 'dump') - checkUser $1 - dump - ;; - - *) - echo "Usage: $0 { console | start | stop | restart | status | dump }" - exit 1 - ;; -esac - -exit 0 diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-32-3.2.0/bin/wrapper b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-32-3.2.0/bin/wrapper deleted file mode 100755 index f3b355c59..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-32-3.2.0/bin/wrapper and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-32-3.2.0/lib/libwrapper.so b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-32-3.2.0/lib/libwrapper.so deleted file mode 100755 index 1bbfd73dd..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-32-3.2.0/lib/libwrapper.so and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-32-3.2.0/lib/wrapper.jar b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-32-3.2.0/lib/wrapper.jar deleted file mode 100644 index c76640599..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-32-3.2.0/lib/wrapper.jar and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-32-3.2.0/lib/wrappertest.jar b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-32-3.2.0/lib/wrappertest.jar deleted file mode 100644 index 10e009322..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-32-3.2.0/lib/wrappertest.jar and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-64-3.2.0/bin/testwrapper b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-64-3.2.0/bin/testwrapper deleted file mode 100755 index 1dfc5c100..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-64-3.2.0/bin/testwrapper +++ /dev/null @@ -1,530 +0,0 @@ -#! /bin/sh - -# -# Copyright (c) 1999, 2006 Tanuki Software Inc. -# -# Java Service Wrapper sh script. Suitable for starting and stopping -# wrapped Java applications on UNIX platforms. -# - -#----------------------------------------------------------------------------- -# These settings can be modified to fit the needs of your application - -# Application -APP_NAME="testwrapper" -APP_LONG_NAME="Test Wrapper Sample Application" - -# Wrapper -WRAPPER_CMD="./wrapper" -WRAPPER_CONF="../conf/wrapper.conf" - -# Priority at which to run the wrapper. See "man nice" for valid priorities. -# nice is only used if a priority is specified. -PRIORITY= - -# Location of the pid file. -PIDDIR="." - -# If uncommented, causes the Wrapper to be shutdown using an anchor file. -# When launched with the 'start' command, it will also ignore all INT and -# TERM signals. -#IGNORE_SIGNALS=true - -# If specified, the Wrapper will be run as the specified user. -# IMPORTANT - Make sure that the user has the required privileges to write -# the PID file and wrapper.log files. Failure to be able to write the log -# file will cause the Wrapper to exit without any way to write out an error -# message. -# NOTE - This will set the user which is used to run the Wrapper as well as -# the JVM and is not useful in situations where a privileged resource or -# port needs to be allocated prior to the user being changed. -#RUN_AS_USER= - -# The following two lines are used by the chkconfig command. Change as is -# appropriate for your application. They should remain commented. -# chkconfig: 2345 20 80 -# description: Test Wrapper Sample Application - -# Do not modify anything beyond this point -#----------------------------------------------------------------------------- - -# Get the fully qualified path to the script -case $0 in - /*) - SCRIPT="$0" - ;; - *) - PWD=`pwd` - SCRIPT="$PWD/$0" - ;; -esac - -# Resolve the true real path without any sym links. -CHANGED=true -while [ "X$CHANGED" != "X" ] -do - # Change spaces to ":" so the tokens can be parsed. - SCRIPT=`echo $SCRIPT | sed -e 's; ;:;g'` - # Get the real path to this script, resolving any symbolic links - TOKENS=`echo $SCRIPT | sed -e 's;/; ;g'` - REALPATH= - for C in $TOKENS; do - REALPATH="$REALPATH/$C" - while [ -h "$REALPATH" ] ; do - LS="`ls -ld "$REALPATH"`" - LINK="`expr "$LS" : '.*-> \(.*\)$'`" - if expr "$LINK" : '/.*' > /dev/null; then - REALPATH="$LINK" - else - REALPATH="`dirname "$REALPATH"`""/$LINK" - fi - done - done - # Change ":" chars back to spaces. - REALPATH=`echo $REALPATH | sed -e 's;:; ;g'` - - if [ "$REALPATH" = "$SCRIPT" ] - then - CHANGED="" - else - SCRIPT="$REALPATH" - fi -done - -# Change the current directory to the location of the script -cd "`dirname "$REALPATH"`" -REALDIR=`pwd` - -# If the PIDDIR is relative, set its value relative to the full REALPATH to avoid problems if -# the working directory is later changed. -FIRST_CHAR=`echo $PIDDIR | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - PIDDIR=$REALDIR/$PIDDIR -fi -# Same test for WRAPPER_CMD -FIRST_CHAR=`echo $WRAPPER_CMD | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - WRAPPER_CMD=$REALDIR/$WRAPPER_CMD -fi -# Same test for WRAPPER_CONF -FIRST_CHAR=`echo $WRAPPER_CONF | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - WRAPPER_CONF=$REALDIR/$WRAPPER_CONF -fi - -# Process ID -ANCHORFILE="$PIDDIR/$APP_NAME.anchor" -PIDFILE="$PIDDIR/$APP_NAME.pid" -LOCKDIR="/var/lock/subsys" -LOCKFILE="$LOCKDIR/$APP_NAME" -pid="" - -# Resolve the location of the 'ps' command -PSEXE="/usr/bin/ps" -if [ ! -x $PSEXE ] -then - PSEXE="/bin/ps" - if [ ! -x $PSEXE ] - then - echo "Unable to locate 'ps'." - echo "Please report this message along with the location of the command on your system." - exit 1 - fi -fi - -# Resolve the os -DIST_OS=`uname -s | tr [:upper:] [:lower:] | tr -d [:blank:]` -case "$DIST_OS" in - 'sunos') - DIST_OS="solaris" - ;; - 'hp-ux' | 'hp-ux64') - DIST_OS="hpux" - ;; - 'darwin') - DIST_OS="macosx" - ;; - 'unix_sv') - DIST_OS="unixware" - ;; -esac - -# Resolve the architecture -DIST_ARCH=`uname -p | tr [:upper:] [:lower:] | tr -d [:blank:]` -if [ "$DIST_ARCH" = "unknown" ] -then - DIST_ARCH=`uname -m | tr [:upper:] [:lower:] | tr -d [:blank:]` -fi -case "$DIST_ARCH" in - 'amd64' | 'ia32' | 'ia64' | 'i386' | 'i486' | 'i586' | 'i686' | 'x86_64') - DIST_ARCH="x86" - ;; - 'ip27') - DIST_ARCH="mips" - ;; - 'power' | 'powerpc' | 'power_pc' | 'ppc64') - DIST_ARCH="ppc" - ;; - 'pa_risc' | 'pa-risc') - DIST_ARCH="parisc" - ;; - 'sun4u' | 'sparcv9') - DIST_ARCH="sparc" - ;; - '9000/800') - DIST_ARCH="parisc" - ;; -esac - -# Decide on the wrapper binary to use. -# If a 32-bit wrapper binary exists then it will work on 32 or 64 bit -# platforms, if the 64-bit binary exists then the distribution most -# likely wants to use long names. Otherwise, look for the default. -# For macosx, we also want to look for universal binaries. -WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" -if [ -x $WRAPPER_TEST_CMD ] -then - WRAPPER_CMD="$WRAPPER_TEST_CMD" -else - if [ "$DIST_OS" = "macosx" ] - then - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-32" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - if [ ! -x $WRAPPER_CMD ] - then - echo "Unable to locate any of the following binaries:" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" - echo " $WRAPPER_CMD-$DIST_OS-universal-32" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - echo " $WRAPPER_CMD-$DIST_OS-universal-64" - echo " $WRAPPER_CMD" - exit 1 - fi - fi - fi - fi - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - if [ ! -x $WRAPPER_CMD ] - then - echo "Unable to locate any of the following binaries:" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - echo " $WRAPPER_CMD" - exit 1 - fi - fi - fi -fi - -# Build the nice clause -if [ "X$PRIORITY" = "X" ] -then - CMDNICE="" -else - CMDNICE="nice -$PRIORITY" -fi - -# Build the anchor file clause. -if [ "X$IGNORE_SIGNALS" = "X" ] -then - ANCHORPROP= - IGNOREPROP= -else - ANCHORPROP=wrapper.anchorfile=$ANCHORFILE - IGNOREPROP=wrapper.ignore_signals=TRUE -fi - -# Build the lock file clause. Only create a lock file if the lock directory exists on this platform. -if [ -d $LOCKDIR ] -then - LOCKPROP=wrapper.lockfile=$LOCKFILE -else - LOCKPROP= -fi - -checkUser() { - # Check the configured user. If necessary rerun this script as the desired user. - if [ "X$RUN_AS_USER" != "X" ] - then - # Resolve the location of the 'id' command - IDEXE="/usr/xpg4/bin/id" - if [ ! -x $IDEXE ] - then - IDEXE="/usr/bin/id" - if [ ! -x $IDEXE ] - then - echo "Unable to locate 'id'." - echo "Please report this message along with the location of the command on your system." - exit 1 - fi - fi - - if [ "`$IDEXE -u -n`" = "$RUN_AS_USER" ] - then - # Already running as the configured user. Avoid password prompts by not calling su. - RUN_AS_USER="" - fi - fi - if [ "X$RUN_AS_USER" != "X" ] - then - # If LOCKPROP and $RUN_AS_USER are defined then the new user will most likely not be - # able to create the lock file. The Wrapper will be able to update this file once it - # is created but will not be able to delete it on shutdown. If $2 is defined then - # the lock file should be created for the current command - if [ "X$LOCKPROP" != "X" ] - then - if [ "X$2" != "X" ] - then - # Resolve the primary group - RUN_AS_GROUP=`groups $RUN_AS_USER | awk '{print $3}' | tail -1` - if [ "X$RUN_AS_GROUP" = "X" ] - then - RUN_AS_GROUP=RUN_AS_USER - fi - touch $LOCKFILE - chown $RUN_AS_USER:$RUN_AS_GROUP $LOCKFILE - fi - fi - - # Still want to change users, recurse. This means that the user will only be - # prompted for a password once. - su -m $RUN_AS_USER -c "$REALPATH $1" - - # Now that we are the original user again, we may need to clean up the lock file. - if [ "X$LOCKPROP" != "X" ] - then - getpid - if [ "X$pid" = "X" ] - then - # Wrapper is not running so make sure the lock file is deleted. - if [ -f $LOCKFILE ] - then - rm $LOCKFILE - fi - fi - fi - - exit 0 - fi -} - -getpid() { - if [ -f $PIDFILE ] - then - if [ -r $PIDFILE ] - then - pid=`cat $PIDFILE` - if [ "X$pid" != "X" ] - then - # It is possible that 'a' process with the pid exists but that it is not the - # correct process. This can happen in a number of cases, but the most - # common is during system startup after an unclean shutdown. - # The ps statement below looks for the specific wrapper command running as - # the pid. If it is not found then the pid file is considered to be stale. - pidtest=`$PSEXE -p $pid -o args | grep $WRAPPER_CMD | tail -1` - if [ "X$pidtest" = "X" ] - then - # This is a stale pid file. - rm -f $PIDFILE - echo "Removed stale pid file: $PIDFILE" - pid="" - fi - fi - else - echo "Cannot read $PIDFILE." - exit 1 - fi - fi -} - -testpid() { - pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1` - if [ "X$pid" = "X" ] - then - # Process is gone so remove the pid file. - rm -f $PIDFILE - pid="" - fi -} - -console() { - echo "Running $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE $ANCHORPROP $LOCKPROP" - exec $COMMAND_LINE - else - echo "$APP_LONG_NAME is already running." - exit 1 - fi -} - -start() { - echo "Starting $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $LOCKPROP" - exec $COMMAND_LINE - else - echo "$APP_LONG_NAME is already running." - exit 1 - fi -} - -stopit() { - echo "Stopping $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME was not running." - else - if [ "X$IGNORE_SIGNALS" = "X" ] - then - # Running so try to stop it. - kill $pid - if [ $? -ne 0 ] - then - # An explanation for the failure should have been given - echo "Unable to stop $APP_LONG_NAME." - exit 1 - fi - else - rm -f $ANCHORFILE - if [ -f $ANCHORFILE ] - then - # An explanation for the failure should have been given - echo "Unable to stop $APP_LONG_NAME." - exit 1 - fi - fi - - # We can not predict how long it will take for the wrapper to - # actually stop as it depends on settings in wrapper.conf. - # Loop until it does. - savepid=$pid - CNT=0 - TOTCNT=0 - while [ "X$pid" != "X" ] - do - # Show a waiting message every 5 seconds. - if [ "$CNT" -lt "5" ] - then - CNT=`expr $CNT + 1` - else - echo "Waiting for $APP_LONG_NAME to exit..." - CNT=0 - fi - TOTCNT=`expr $TOTCNT + 1` - - sleep 1 - - testpid - done - - pid=$savepid - testpid - if [ "X$pid" != "X" ] - then - echo "Failed to stop $APP_LONG_NAME." - exit 1 - else - echo "Stopped $APP_LONG_NAME." - fi - fi -} - -status() { - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME is not running." - exit 1 - else - echo "$APP_LONG_NAME is running ($pid)." - exit 0 - fi -} - -dump() { - echo "Dumping $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME was not running." - - else - kill -3 $pid - - if [ $? -ne 0 ] - then - echo "Failed to dump $APP_LONG_NAME." - exit 1 - else - echo "Dumped $APP_LONG_NAME." - fi - fi -} - -case "$1" in - - 'console') - checkUser $1 touchlock - console - ;; - - 'start') - checkUser $1 touchlock - start - ;; - - 'stop') - checkUser $1 - stopit - ;; - - 'restart') - checkUser $1 touchlock - stopit - start - ;; - - 'status') - checkUser $1 - status - ;; - - 'dump') - checkUser $1 - dump - ;; - - *) - echo "Usage: $0 { console | start | stop | restart | status | dump }" - exit 1 - ;; -esac - -exit 0 diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-64-3.2.0/bin/wrapper b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-64-3.2.0/bin/wrapper deleted file mode 100755 index 0a0c02890..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-64-3.2.0/bin/wrapper and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-64-3.2.0/lib/libwrapper.so b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-64-3.2.0/lib/libwrapper.so deleted file mode 100755 index 6b0ab67fc..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-64-3.2.0/lib/libwrapper.so and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-64-3.2.0/lib/wrapper.jar b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-64-3.2.0/lib/wrapper.jar deleted file mode 100644 index c76640599..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-64-3.2.0/lib/wrapper.jar and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-64-3.2.0/lib/wrappertest.jar b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-64-3.2.0/lib/wrappertest.jar deleted file mode 100644 index 10e009322..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-sparc-64-3.2.0/lib/wrappertest.jar and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-x86-32-3.2.0/bin/testwrapper b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-x86-32-3.2.0/bin/testwrapper deleted file mode 100755 index 1dfc5c100..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-x86-32-3.2.0/bin/testwrapper +++ /dev/null @@ -1,530 +0,0 @@ -#! /bin/sh - -# -# Copyright (c) 1999, 2006 Tanuki Software Inc. -# -# Java Service Wrapper sh script. Suitable for starting and stopping -# wrapped Java applications on UNIX platforms. -# - -#----------------------------------------------------------------------------- -# These settings can be modified to fit the needs of your application - -# Application -APP_NAME="testwrapper" -APP_LONG_NAME="Test Wrapper Sample Application" - -# Wrapper -WRAPPER_CMD="./wrapper" -WRAPPER_CONF="../conf/wrapper.conf" - -# Priority at which to run the wrapper. See "man nice" for valid priorities. -# nice is only used if a priority is specified. -PRIORITY= - -# Location of the pid file. -PIDDIR="." - -# If uncommented, causes the Wrapper to be shutdown using an anchor file. -# When launched with the 'start' command, it will also ignore all INT and -# TERM signals. -#IGNORE_SIGNALS=true - -# If specified, the Wrapper will be run as the specified user. -# IMPORTANT - Make sure that the user has the required privileges to write -# the PID file and wrapper.log files. Failure to be able to write the log -# file will cause the Wrapper to exit without any way to write out an error -# message. -# NOTE - This will set the user which is used to run the Wrapper as well as -# the JVM and is not useful in situations where a privileged resource or -# port needs to be allocated prior to the user being changed. -#RUN_AS_USER= - -# The following two lines are used by the chkconfig command. Change as is -# appropriate for your application. They should remain commented. -# chkconfig: 2345 20 80 -# description: Test Wrapper Sample Application - -# Do not modify anything beyond this point -#----------------------------------------------------------------------------- - -# Get the fully qualified path to the script -case $0 in - /*) - SCRIPT="$0" - ;; - *) - PWD=`pwd` - SCRIPT="$PWD/$0" - ;; -esac - -# Resolve the true real path without any sym links. -CHANGED=true -while [ "X$CHANGED" != "X" ] -do - # Change spaces to ":" so the tokens can be parsed. - SCRIPT=`echo $SCRIPT | sed -e 's; ;:;g'` - # Get the real path to this script, resolving any symbolic links - TOKENS=`echo $SCRIPT | sed -e 's;/; ;g'` - REALPATH= - for C in $TOKENS; do - REALPATH="$REALPATH/$C" - while [ -h "$REALPATH" ] ; do - LS="`ls -ld "$REALPATH"`" - LINK="`expr "$LS" : '.*-> \(.*\)$'`" - if expr "$LINK" : '/.*' > /dev/null; then - REALPATH="$LINK" - else - REALPATH="`dirname "$REALPATH"`""/$LINK" - fi - done - done - # Change ":" chars back to spaces. - REALPATH=`echo $REALPATH | sed -e 's;:; ;g'` - - if [ "$REALPATH" = "$SCRIPT" ] - then - CHANGED="" - else - SCRIPT="$REALPATH" - fi -done - -# Change the current directory to the location of the script -cd "`dirname "$REALPATH"`" -REALDIR=`pwd` - -# If the PIDDIR is relative, set its value relative to the full REALPATH to avoid problems if -# the working directory is later changed. -FIRST_CHAR=`echo $PIDDIR | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - PIDDIR=$REALDIR/$PIDDIR -fi -# Same test for WRAPPER_CMD -FIRST_CHAR=`echo $WRAPPER_CMD | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - WRAPPER_CMD=$REALDIR/$WRAPPER_CMD -fi -# Same test for WRAPPER_CONF -FIRST_CHAR=`echo $WRAPPER_CONF | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - WRAPPER_CONF=$REALDIR/$WRAPPER_CONF -fi - -# Process ID -ANCHORFILE="$PIDDIR/$APP_NAME.anchor" -PIDFILE="$PIDDIR/$APP_NAME.pid" -LOCKDIR="/var/lock/subsys" -LOCKFILE="$LOCKDIR/$APP_NAME" -pid="" - -# Resolve the location of the 'ps' command -PSEXE="/usr/bin/ps" -if [ ! -x $PSEXE ] -then - PSEXE="/bin/ps" - if [ ! -x $PSEXE ] - then - echo "Unable to locate 'ps'." - echo "Please report this message along with the location of the command on your system." - exit 1 - fi -fi - -# Resolve the os -DIST_OS=`uname -s | tr [:upper:] [:lower:] | tr -d [:blank:]` -case "$DIST_OS" in - 'sunos') - DIST_OS="solaris" - ;; - 'hp-ux' | 'hp-ux64') - DIST_OS="hpux" - ;; - 'darwin') - DIST_OS="macosx" - ;; - 'unix_sv') - DIST_OS="unixware" - ;; -esac - -# Resolve the architecture -DIST_ARCH=`uname -p | tr [:upper:] [:lower:] | tr -d [:blank:]` -if [ "$DIST_ARCH" = "unknown" ] -then - DIST_ARCH=`uname -m | tr [:upper:] [:lower:] | tr -d [:blank:]` -fi -case "$DIST_ARCH" in - 'amd64' | 'ia32' | 'ia64' | 'i386' | 'i486' | 'i586' | 'i686' | 'x86_64') - DIST_ARCH="x86" - ;; - 'ip27') - DIST_ARCH="mips" - ;; - 'power' | 'powerpc' | 'power_pc' | 'ppc64') - DIST_ARCH="ppc" - ;; - 'pa_risc' | 'pa-risc') - DIST_ARCH="parisc" - ;; - 'sun4u' | 'sparcv9') - DIST_ARCH="sparc" - ;; - '9000/800') - DIST_ARCH="parisc" - ;; -esac - -# Decide on the wrapper binary to use. -# If a 32-bit wrapper binary exists then it will work on 32 or 64 bit -# platforms, if the 64-bit binary exists then the distribution most -# likely wants to use long names. Otherwise, look for the default. -# For macosx, we also want to look for universal binaries. -WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" -if [ -x $WRAPPER_TEST_CMD ] -then - WRAPPER_CMD="$WRAPPER_TEST_CMD" -else - if [ "$DIST_OS" = "macosx" ] - then - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-32" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - if [ ! -x $WRAPPER_CMD ] - then - echo "Unable to locate any of the following binaries:" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" - echo " $WRAPPER_CMD-$DIST_OS-universal-32" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - echo " $WRAPPER_CMD-$DIST_OS-universal-64" - echo " $WRAPPER_CMD" - exit 1 - fi - fi - fi - fi - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - if [ ! -x $WRAPPER_CMD ] - then - echo "Unable to locate any of the following binaries:" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - echo " $WRAPPER_CMD" - exit 1 - fi - fi - fi -fi - -# Build the nice clause -if [ "X$PRIORITY" = "X" ] -then - CMDNICE="" -else - CMDNICE="nice -$PRIORITY" -fi - -# Build the anchor file clause. -if [ "X$IGNORE_SIGNALS" = "X" ] -then - ANCHORPROP= - IGNOREPROP= -else - ANCHORPROP=wrapper.anchorfile=$ANCHORFILE - IGNOREPROP=wrapper.ignore_signals=TRUE -fi - -# Build the lock file clause. Only create a lock file if the lock directory exists on this platform. -if [ -d $LOCKDIR ] -then - LOCKPROP=wrapper.lockfile=$LOCKFILE -else - LOCKPROP= -fi - -checkUser() { - # Check the configured user. If necessary rerun this script as the desired user. - if [ "X$RUN_AS_USER" != "X" ] - then - # Resolve the location of the 'id' command - IDEXE="/usr/xpg4/bin/id" - if [ ! -x $IDEXE ] - then - IDEXE="/usr/bin/id" - if [ ! -x $IDEXE ] - then - echo "Unable to locate 'id'." - echo "Please report this message along with the location of the command on your system." - exit 1 - fi - fi - - if [ "`$IDEXE -u -n`" = "$RUN_AS_USER" ] - then - # Already running as the configured user. Avoid password prompts by not calling su. - RUN_AS_USER="" - fi - fi - if [ "X$RUN_AS_USER" != "X" ] - then - # If LOCKPROP and $RUN_AS_USER are defined then the new user will most likely not be - # able to create the lock file. The Wrapper will be able to update this file once it - # is created but will not be able to delete it on shutdown. If $2 is defined then - # the lock file should be created for the current command - if [ "X$LOCKPROP" != "X" ] - then - if [ "X$2" != "X" ] - then - # Resolve the primary group - RUN_AS_GROUP=`groups $RUN_AS_USER | awk '{print $3}' | tail -1` - if [ "X$RUN_AS_GROUP" = "X" ] - then - RUN_AS_GROUP=RUN_AS_USER - fi - touch $LOCKFILE - chown $RUN_AS_USER:$RUN_AS_GROUP $LOCKFILE - fi - fi - - # Still want to change users, recurse. This means that the user will only be - # prompted for a password once. - su -m $RUN_AS_USER -c "$REALPATH $1" - - # Now that we are the original user again, we may need to clean up the lock file. - if [ "X$LOCKPROP" != "X" ] - then - getpid - if [ "X$pid" = "X" ] - then - # Wrapper is not running so make sure the lock file is deleted. - if [ -f $LOCKFILE ] - then - rm $LOCKFILE - fi - fi - fi - - exit 0 - fi -} - -getpid() { - if [ -f $PIDFILE ] - then - if [ -r $PIDFILE ] - then - pid=`cat $PIDFILE` - if [ "X$pid" != "X" ] - then - # It is possible that 'a' process with the pid exists but that it is not the - # correct process. This can happen in a number of cases, but the most - # common is during system startup after an unclean shutdown. - # The ps statement below looks for the specific wrapper command running as - # the pid. If it is not found then the pid file is considered to be stale. - pidtest=`$PSEXE -p $pid -o args | grep $WRAPPER_CMD | tail -1` - if [ "X$pidtest" = "X" ] - then - # This is a stale pid file. - rm -f $PIDFILE - echo "Removed stale pid file: $PIDFILE" - pid="" - fi - fi - else - echo "Cannot read $PIDFILE." - exit 1 - fi - fi -} - -testpid() { - pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1` - if [ "X$pid" = "X" ] - then - # Process is gone so remove the pid file. - rm -f $PIDFILE - pid="" - fi -} - -console() { - echo "Running $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE $ANCHORPROP $LOCKPROP" - exec $COMMAND_LINE - else - echo "$APP_LONG_NAME is already running." - exit 1 - fi -} - -start() { - echo "Starting $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $LOCKPROP" - exec $COMMAND_LINE - else - echo "$APP_LONG_NAME is already running." - exit 1 - fi -} - -stopit() { - echo "Stopping $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME was not running." - else - if [ "X$IGNORE_SIGNALS" = "X" ] - then - # Running so try to stop it. - kill $pid - if [ $? -ne 0 ] - then - # An explanation for the failure should have been given - echo "Unable to stop $APP_LONG_NAME." - exit 1 - fi - else - rm -f $ANCHORFILE - if [ -f $ANCHORFILE ] - then - # An explanation for the failure should have been given - echo "Unable to stop $APP_LONG_NAME." - exit 1 - fi - fi - - # We can not predict how long it will take for the wrapper to - # actually stop as it depends on settings in wrapper.conf. - # Loop until it does. - savepid=$pid - CNT=0 - TOTCNT=0 - while [ "X$pid" != "X" ] - do - # Show a waiting message every 5 seconds. - if [ "$CNT" -lt "5" ] - then - CNT=`expr $CNT + 1` - else - echo "Waiting for $APP_LONG_NAME to exit..." - CNT=0 - fi - TOTCNT=`expr $TOTCNT + 1` - - sleep 1 - - testpid - done - - pid=$savepid - testpid - if [ "X$pid" != "X" ] - then - echo "Failed to stop $APP_LONG_NAME." - exit 1 - else - echo "Stopped $APP_LONG_NAME." - fi - fi -} - -status() { - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME is not running." - exit 1 - else - echo "$APP_LONG_NAME is running ($pid)." - exit 0 - fi -} - -dump() { - echo "Dumping $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME was not running." - - else - kill -3 $pid - - if [ $? -ne 0 ] - then - echo "Failed to dump $APP_LONG_NAME." - exit 1 - else - echo "Dumped $APP_LONG_NAME." - fi - fi -} - -case "$1" in - - 'console') - checkUser $1 touchlock - console - ;; - - 'start') - checkUser $1 touchlock - start - ;; - - 'stop') - checkUser $1 - stopit - ;; - - 'restart') - checkUser $1 touchlock - stopit - start - ;; - - 'status') - checkUser $1 - status - ;; - - 'dump') - checkUser $1 - dump - ;; - - *) - echo "Usage: $0 { console | start | stop | restart | status | dump }" - exit 1 - ;; -esac - -exit 0 diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-x86-32-3.2.0/bin/wrapper b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-x86-32-3.2.0/bin/wrapper deleted file mode 100755 index 35ad75895..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-x86-32-3.2.0/bin/wrapper and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-x86-32-3.2.0/lib/libwrapper.so b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-x86-32-3.2.0/lib/libwrapper.so deleted file mode 100755 index 3f310e70b..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-x86-32-3.2.0/lib/libwrapper.so and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-x86-32-3.2.0/lib/wrapper.jar b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-x86-32-3.2.0/lib/wrapper.jar deleted file mode 100644 index c76640599..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-x86-32-3.2.0/lib/wrapper.jar and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-x86-32-3.2.0/lib/wrappertest.jar b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-x86-32-3.2.0/lib/wrappertest.jar deleted file mode 100644 index 10e009322..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-solaris-x86-32-3.2.0/lib/wrappertest.jar and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/bin/InstallTestWrapper-NT.bat b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/bin/InstallTestWrapper-NT.bat deleted file mode 100644 index bd42e241f..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/bin/InstallTestWrapper-NT.bat +++ /dev/null @@ -1,50 +0,0 @@ -@echo off -setlocal - -rem Copyright (c) 1999, 2006 Tanuki Software Inc. -rem -rem Java Service Wrapper general NT service install script -rem - -if "%OS%"=="Windows_NT" goto nt -echo This script only works with NT-based versions of Windows. -goto :eof - -:nt -rem -rem Find the application home. -rem -rem %~dp0 is location of current script under NT -set _REALPATH=%~dp0 - -rem Decide on the wrapper binary. -set _WRAPPER_BASE=wrapper -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe -if exist %_WRAPPER_EXE% goto conf -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe -if exist %_WRAPPER_EXE% goto conf -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%.exe -if exist %_WRAPPER_EXE% goto conf -echo Unable to locate a Wrapper executable using any of the following names: -echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe -echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe -echo %_REALPATH%%_WRAPPER_BASE%.exe -pause -goto :eof - -rem -rem Find the wrapper.conf -rem -:conf -set _WRAPPER_CONF="%~f1" -if not %_WRAPPER_CONF%=="" goto startup -set _WRAPPER_CONF="%_REALPATH%..\conf\wrapper.conf" - -rem -rem Install the Wrapper as an NT service. -rem -:startup -"%_WRAPPER_EXE%" -i %_WRAPPER_CONF% -if not errorlevel 1 goto :eof -pause - diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/bin/StartTestWrapper-NT.bat b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/bin/StartTestWrapper-NT.bat deleted file mode 100644 index 2c7ad712c..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/bin/StartTestWrapper-NT.bat +++ /dev/null @@ -1,50 +0,0 @@ -@echo off -setlocal - -rem Copyright (c) 1999, 2006 Tanuki Software Inc. -rem -rem Java Service Wrapper general NT service start script -rem - -if "%OS%"=="Windows_NT" goto nt -echo This script only works with NT-based versions of Windows. -goto :eof - -:nt -rem -rem Find the application home. -rem -rem %~dp0 is location of current script under NT -set _REALPATH=%~dp0 - -rem Decide on the wrapper binary. -set _WRAPPER_BASE=wrapper -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe -if exist %_WRAPPER_EXE% goto conf -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe -if exist %_WRAPPER_EXE% goto conf -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%.exe -if exist %_WRAPPER_EXE% goto conf -echo Unable to locate a Wrapper executable using any of the following names: -echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe -echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe -echo %_REALPATH%%_WRAPPER_BASE%.exe -pause -goto :eof - -rem -rem Find the wrapper.conf -rem -:conf -set _WRAPPER_CONF="%~f1" -if not %_WRAPPER_CONF%=="" goto startup -set _WRAPPER_CONF="%_REALPATH%..\conf\wrapper.conf" - -rem -rem Start the Wrapper NT service. -rem -:startup -"%_WRAPPER_EXE%" -t %_WRAPPER_CONF% -if not errorlevel 1 goto :eof -pause - diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/bin/StopTestWrapper-NT.bat b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/bin/StopTestWrapper-NT.bat deleted file mode 100644 index a761533cd..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/bin/StopTestWrapper-NT.bat +++ /dev/null @@ -1,50 +0,0 @@ -@echo off -setlocal - -rem Copyright (c) 1999, 2006 Tanuki Software Inc. -rem -rem Java Service Wrapper general NT service stop script -rem - -if "%OS%"=="Windows_NT" goto nt -echo This script only works with NT-based versions of Windows. -goto :eof - -:nt -rem -rem Find the application home. -rem -rem %~dp0 is location of current script under NT -set _REALPATH=%~dp0 - -rem Decide on the wrapper binary. -set _WRAPPER_BASE=wrapper -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe -if exist %_WRAPPER_EXE% goto conf -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe -if exist %_WRAPPER_EXE% goto conf -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%.exe -if exist %_WRAPPER_EXE% goto conf -echo Unable to locate a Wrapper executable using any of the following names: -echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe -echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe -echo %_REALPATH%%_WRAPPER_BASE%.exe -pause -goto :eof - -rem -rem Find the wrapper.conf -rem -:conf -set _WRAPPER_CONF="%~f1" -if not %_WRAPPER_CONF%=="" goto startup -set _WRAPPER_CONF="%_REALPATH%..\conf\wrapper.conf" - -rem -rem Stop the Wrapper NT service. -rem -:startup -"%_WRAPPER_EXE%" -p %_WRAPPER_CONF% -if not errorlevel 1 goto :eof -pause - diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/bin/TestWrapper.bat b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/bin/TestWrapper.bat deleted file mode 100644 index 5a1223cc8..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/bin/TestWrapper.bat +++ /dev/null @@ -1,55 +0,0 @@ -@echo off -setlocal - -rem Copyright (c) 1999, 2006 Tanuki Software Inc. -rem -rem Java Service Wrapper general startup script -rem - -rem -rem Resolve the real path of the wrapper.exe -rem For non NT systems, the _REALPATH and _WRAPPER_CONF values -rem can be hard-coded below and the following test removed. -rem -if "%OS%"=="Windows_NT" goto nt -echo This script only works with NT-based versions of Windows. -goto :eof - -:nt -rem -rem Find the application home. -rem -rem %~dp0 is location of current script under NT -set _REALPATH=%~dp0 - -rem Decide on the wrapper binary. -set _WRAPPER_BASE=wrapper -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe -if exist %_WRAPPER_EXE% goto conf -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe -if exist %_WRAPPER_EXE% goto conf -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%.exe -if exist %_WRAPPER_EXE% goto conf -echo Unable to locate a Wrapper executable using any of the following names: -echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe -echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe -echo %_REALPATH%%_WRAPPER_BASE%.exe -pause -goto :eof - -rem -rem Find the wrapper.conf -rem -:conf -set _WRAPPER_CONF="%~f1" -if not %_WRAPPER_CONF%=="" goto startup -set _WRAPPER_CONF="%_REALPATH%..\conf\wrapper.conf" - -rem -rem Start the Wrapper -rem -:startup -"%_WRAPPER_EXE%" -c %_WRAPPER_CONF% -if not errorlevel 1 goto :eof -pause - diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/bin/TestWrapperNoWrapper.bat b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/bin/TestWrapperNoWrapper.bat deleted file mode 100644 index 15052ba5c..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/bin/TestWrapperNoWrapper.bat +++ /dev/null @@ -1,12 +0,0 @@ -rem Copyright (c) 1999, 2006 Tanuki Software Inc. -rem -rem This script is an example of how to run your application without the Wrapper, but with the -rem Wrapper helper classes. You can obtain the actual command generated by the wrapper for -rem your application by running the Wrapper with the wrapper.java.command.loglevel=INFO -rem property set. -rem -rem The wrapper.key property MUST be removed from the resulting command or it will fail to -rem run correctly. -rem -java -Xms16m -Xmx64m -Djava.library.path="../lib" -Djava.class.path="../lib/wrapper.jar;../lib/wrappertest.jar" -Dwrapper.native_library="wrapper" -Dwrapper.debug="TRUE" org.tanukisoftware.wrapper.test.Main - diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/bin/UninstallTestWrapper-NT.bat b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/bin/UninstallTestWrapper-NT.bat deleted file mode 100644 index 5adc5a9f1..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/bin/UninstallTestWrapper-NT.bat +++ /dev/null @@ -1,50 +0,0 @@ -@echo off -setlocal - -rem Copyright (c) 1999, 2006 Tanuki Software Inc. -rem -rem Java Service Wrapper general NT service uninstall script -rem - -if "%OS%"=="Windows_NT" goto nt -echo This script only works with NT-based versions of Windows. -goto :eof - -:nt -rem -rem Find the application home. -rem -rem %~dp0 is location of current script under NT -set _REALPATH=%~dp0 - -rem Decide on the wrapper binary. -set _WRAPPER_BASE=wrapper -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe -if exist %_WRAPPER_EXE% goto conf -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe -if exist %_WRAPPER_EXE% goto conf -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%.exe -if exist %_WRAPPER_EXE% goto conf -echo Unable to locate a Wrapper executable using any of the following names: -echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe -echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe -echo %_REALPATH%%_WRAPPER_BASE%.exe -pause -goto :eof - -rem -rem Find the wrapper.conf -rem -:conf -set _WRAPPER_CONF="%~f1" -if not %_WRAPPER_CONF%=="" goto startup -set _WRAPPER_CONF="%_REALPATH%..\conf\wrapper.conf" - -rem -rem Uninstall the Wrapper as an NT service. -rem -:startup -"%_WRAPPER_EXE%" -r %_WRAPPER_CONF% -if not errorlevel 1 goto :eof -pause - diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/bin/wrapper.exe b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/bin/wrapper.exe deleted file mode 100644 index a46a2ac24..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/bin/wrapper.exe and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/lib/wrapper.dll b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/lib/wrapper.dll deleted file mode 100644 index 37c4f3359..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/lib/wrapper.dll and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/lib/wrapper.jar b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/lib/wrapper.jar deleted file mode 100644 index c76640599..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/lib/wrapper.jar and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/lib/wrappertest.jar b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/lib/wrappertest.jar deleted file mode 100644 index 10e009322..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-jsw/src/main/resources/jsw/wrapper-windows-x86-32-3.2.0/lib/wrappertest.jar and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-manager/pom.xml b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-manager/pom.xml deleted file mode 100644 index 9a700f3df..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-manager/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - org.codehaus.plexus - plexus-appserver-runtime-booters - 2.0-alpha-3-SNAPSHOT - - 4.0.0 - plexus-appserver-runtime-booter-manager - Plexus App Server Shell Script Runtime Booter - Plexus App Server Tools for creating application bundles, services bundles and server runtimes. - - - - org.codehaus.plexus - plexus-appserver-runtime-booter-common - - - diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-manager/src/main/java/org/codehaus/plexus/builder/runtime/ShellScriptPlexusRuntimeBootloaderGenerator.java b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-manager/src/main/java/org/codehaus/plexus/builder/runtime/ShellScriptPlexusRuntimeBootloaderGenerator.java deleted file mode 100644 index bca794a39..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-manager/src/main/java/org/codehaus/plexus/builder/runtime/ShellScriptPlexusRuntimeBootloaderGenerator.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.codehaus.plexus.builder.runtime; - -import java.io.File; -import java.util.Properties; - -/** - * @author Jason van Zyl - * @author Trygve Laugstøl - */ -public class ShellScriptPlexusRuntimeBootloaderGenerator - extends AbstractPlexusRuntimeBootloaderGenerator -{ - private final static String UNIX_LAUNCHER_TEMPLATE = "shellscript/plexus.vm"; - - private final static String WINDOWS_LAUNCHER_TEMPLATE = "shellscript/plexus-bat.vm"; - - public void generate( File outputDirectory, Properties configurationProperties ) - throws PlexusRuntimeBootloaderGeneratorException - { - mkdirs( outputDirectory ); - - mergeTemplate( ShellScriptPlexusRuntimeBootloaderGenerator.UNIX_LAUNCHER_TEMPLATE, new File( outputDirectory, "plexus.sh" ), false ); - - mergeTemplate( ShellScriptPlexusRuntimeBootloaderGenerator.WINDOWS_LAUNCHER_TEMPLATE, new File( outputDirectory, "plexus.bat" ), true ); - - executable( new File( outputDirectory, "plexus.sh" ) ); - } -} diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-manager/src/main/resources/META-INF/plexus/components.xml b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-manager/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index 80466c101..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-manager/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - org.codehaus.plexus.builder.runtime.PlexusRuntimeBootloaderGenerator - shellscript - org.codehaus.plexus.builder.runtime.ShellScriptPlexusRuntimeBootloaderGenerator - - - org.codehaus.plexus.velocity.VelocityComponent - - - - - diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-manager/src/main/resources/shellscript/plexus-bat.vm b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-manager/src/main/resources/shellscript/plexus-bat.vm deleted file mode 100644 index 07d003f7c..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-manager/src/main/resources/shellscript/plexus-bat.vm +++ /dev/null @@ -1,136 +0,0 @@ -@REM ---------------------------------------------------------------------------- -@REM Plexus Start Up Batch script -@REM -@REM Required ENV vars: -@REM JAVA_HOME - location of a JDK home dir -@REM PLEXUS_HOME - location of Plexus installed home dir -@REM -@REM Optional ENV vars -@REM PLEXUS_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands -@REM PLEXUS_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending -@REM PLEXUS_OPTS - parameters passed to the Java VM when running Plexus -@REM e.g. to debug Plexus itself, use -@REM set PLEXUS_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -@REM ---------------------------------------------------------------------------- - -@echo off -@REM Begin all REM lines with '@' in case PLEXUS_BATCH_ECHO is 'on' -@REM enable echoing my setting PLEXUS_BATCH_ECHO to 'on' -@if "%PLEXUS_BATCH_ECHO%" == "on" echo %PLEXUS_BATCH_ECHO% - -@REM Execute a user defined script before this one -if exist "%HOME%\plexusrc_pre.bat" call "%HOME%\plexusrc_pre.bat" - -@REM set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" @setlocal - -@REM ==== START VALIDATION ==== -if not "%JAVA_HOME%" == "" goto OkJHome - -echo. -echo ERROR: JAVA_HOME not found in your environment. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation -echo. -goto end - -:OkJHome -if exist "%JAVA_HOME%\bin\java.exe" goto chkMHome - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory. -echo JAVA_HOME = %JAVA_HOME% -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation -echo. -goto end - -:chkMHome -if not "%PLEXUS_HOME%"=="" goto valMHome - -if "%OS%"=="Windows_NT" SET PLEXUS_HOME=%~dp0.. -if not "%PLEXUS_HOME%"=="" goto valMHome - -echo. -echo ERROR: PLEXUS_HOME not found in your environment. -echo Please set the PLEXUS_HOME variable in your environment to match the -echo location of the PLEXUS installation -echo. -goto end - -:valMHome -if exist "%PLEXUS_HOME%\bin\plexus.bat" goto init - -echo. -echo ERROR: PLEXUS_HOME is set to an invalid directory. -echo PLEXUS_HOME = %PLEXUS_HOME% -echo Please set the PLEXUS_HOME variable in your environment to match the -echo location of the PLEXUS installation -echo. -goto end -@REM ==== END VALIDATION ==== - -:init -@REM Decide how to startup depending on the version of windows - -@REM -- Win98ME -if NOT "%OS%"=="Windows_NT" goto Win9xArg - -@REM -- 4NT shell -if "%eval[2+2]" == "4" goto 4NTArgs - -@REM -- Regular WinNT shell -set PLEXUS_CMD_LINE_ARGS=%* -goto endInit - -@REM The 4NT Shell from jp software -:4NTArgs -set PLEXUS_CMD_LINE_ARGS=%$ -goto endInit - -:Win9xArg -@REM Slurp the command line arguments. This loop allows for an unlimited number -@REM of agruments (up to the command line limit, anyway). -set PLEXUS_CMD_LINE_ARGS= -:Win9xApp -if %1a==a goto endInit -set PLEXUS_CMD_LINE_ARGS=%PLEXUS_CMD_LINE_ARGS% %1 -shift -goto Win9xApp - -@REM Reaching here means variables are defined and arguments have been captured -:endInit -if "%PLEXUS_OPTS%"=="" SET PLEXUS_OPTS="-Xmx128m" -SET PLEXUS_JAVA_EXE="%JAVA_HOME%\bin\java.exe" -SET PLEXUS_CORE="%PLEXUS_HOME%\core" -SET PLEXUS_TMPDIR="%PLEXUS_HOME%\temp" -SET PLEXUS_CONF=%PLEXUS_HOME%\conf -SET CONF=%PLEXUS_CONF%\plexus.xml -SET PLEXUS_CMD_LINE_ARGS=%CONF% %PLEXUS_CMD_LINE_ARGS% -if exist %PLEXUS_TMPDIR% goto run -mkdir "%PLEXUS_TMPDIR%" - -:run -@REM Start Plexus -%PLEXUS_JAVA_EXE% %PLEXUS_OPTS% -classpath %PLEXUS_HOME%\core\boot\classworlds-*.jar "-Dclassworlds.conf=%PLEXUS_HOME%\conf\classworlds.conf" -Dplexus.core=%PLEXUS_CORE% -Dplexus.system.path="%PATH%" -Djava.io.tmpdir=%PLEXUS_TMPDIR% -Dplexus.home=%PLEXUS_HOME% org.codehaus.classworlds.Launcher %PLEXUS_CMD_LINE_ARGS% -goto end - -:end -@REM set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" goto endNT - -@REM For old DOS remove the set variables from ENV - we assume they were not set -@REM before we started - at least we don't leave any baggage around -set PLEXUS_JAVA_EXE= -SET PLEXUS_CORE= -set PLEXUS_CMD_LINE_ARGS= -SET PLEXUS_TMPDIR= -goto postExec - -:endNT -@endlocal - -:postExec -if exist "%HOME%\plexusrc_post.bat" call "%HOME%\plexusrc_post.bat" -@REM pause the batch file if PLEXUS_BATCH_PAUSE is set to 'on' -if "%PLEXUS_BATCH_PAUSE%" == "on" pause diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-manager/src/main/resources/shellscript/plexus.vm b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-manager/src/main/resources/shellscript/plexus.vm deleted file mode 100644 index b7783fcbf..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-manager/src/main/resources/shellscript/plexus.vm +++ /dev/null @@ -1,129 +0,0 @@ -#! /bin/sh - -PLEXUS_OPTS="$PLEXUS_OPTS -Xmx128m" - -# OS specific support. $var _must_ be set to either true or false. -cygwin=false -darwin=false; -case "`uname`" in -CYGWIN*) cygwin=true;; -Darwin*) darwin=true ;; -esac - -# resolve links - $0 may be a softlink -THIS_PROG="$0" - -while [ -h "$THIS_PROG" ]; do - ls=`ls -ld "$THIS_PROG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '.*/.*' > /dev/null; then - THIS_PROG="$link" - else - THIS_PROG=`dirname "$THIS_PROG"`/"$link" - fi -done - -# Get standard environment variables -PRGDIR=`dirname "$THIS_PROG"` -PLEXUS_HOME=`cd "$PRGDIR/.." ; pwd` -PLEXUS_CONF=`cd "$PLEXUS_HOME/conf" ; pwd` -unset THIS_PROG - -if [ -z "$JAVA_HOME" ] ; then - if [ -e /etc/gentoo-release ] ; then - JAVA_HOME=`java-config --jre-home` - fi -fi - - -# Checking for JAVA_HOME is required on *nix due -# to some distributions stupidly including kaffe in /usr/bin -if [ "$JAVA_HOME" = "" ] ; then - echo "ERROR: JAVA_HOME not found in your environment." - echo - echo "Please, set the JAVA_HOME variable in your environment to match the" - echo "location of the Java Virtual Machine you want to use." - exit 1 -fi - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "$PLEXUS_HOME" ] && - PLEXUS_HOME=`cygpath --unix "$PLEXUS_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --unix "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --unix "$CLASSPATH"` -fi - -if [ -z "$PLEXUS_TMPDIR" ] ; then - PLEXUS_TMPDIR="$PLEXUS_HOME"/temp - mkdir -p "$PLEXUS_TMPDIR" -fi - -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - else - JAVACMD=java - fi -fi - -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." - echo " We cannot execute $JAVACMD" - exit -fi - -if [ -z "$JAVA_HOME" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." - echo " If build fails because sun.* classes could not be found" - echo " you will need to set the JAVA_HOME environment variable" - echo " to the installation directory of java." -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - PLEXUS_HOME=`cygpath --path --windows "$PLEXUS_HOME"` - PLEXUS_CONF=`cygpath --path --windows "$PLEXUS_CONF"` - PLEXUS_TMPDIR=`cygpath --path --windows "$PLEXUS_TMPDIR"` - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` -fi - -# For Darwin, use classes.jar for TOOLS_JAR -TOOLS_JAR="${JAVA_HOME}/lib/tools.jar" -if $darwin; then - TOOLS_JAR="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/classes.jar" -fi - -# ----- Execute The Requested Command ----------------------------------------- - -echo "Using PLEXUS_HOME: $PLEXUS_HOME" -echo "Using PLEXUS_CONF: $PLEXUS_CONF" -echo "Using PLEXUS_TMPDIR: $PLEXUS_TMPDIR" -echo "Using JAVA_HOME: $JAVA_HOME" - -if [ "$1" = "" ] -then - CONF="${PLEXUS_CONF}/plexus.xml" -else - CONF="$1" -fi - -MAIN_CLASS=org.codehaus.classworlds.Launcher - -exec "$JAVACMD" \ - $PLEXUS_OPTS \ - -classpath "${PLEXUS_HOME}"/core/boot/classworlds-*.jar \ - -Dclassworlds.conf="${PLEXUS_HOME}/conf/classworlds.conf" \ - -Dplexus.core="${PLEXUS_HOME}/core" \ - -Dplexus.system.path="${PATH}" \ - -Djava.io.tmpdir="${PLEXUS_TMPDIR}" \ - -Dtools.jar="$TOOLS_JAR" \ - -Dplexus.home="${PLEXUS_HOME}" \ - $MAIN_CLASS ${CONF} diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-manager/src/test/java/org/codehaus/plexus/builder/runtime/ShellScriptRuntimeBooterGeneratorTest.java b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-manager/src/test/java/org/codehaus/plexus/builder/runtime/ShellScriptRuntimeBooterGeneratorTest.java deleted file mode 100644 index 05bc859e6..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-manager/src/test/java/org/codehaus/plexus/builder/runtime/ShellScriptRuntimeBooterGeneratorTest.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.codehaus.plexus.builder.runtime; - -import org.codehaus.plexus.PlexusTestCase; - -import java.io.File; -import java.util.Properties; - -/** - * @author Jason van Zyl - */ -public class ShellScriptRuntimeBooterGeneratorTest - extends PlexusTestCase -{ - public void testGenerator() - throws Exception - { - PlexusRuntimeBootloaderGenerator generator = - (PlexusRuntimeBootloaderGenerator) lookup( PlexusRuntimeBootloaderGenerator.ROLE, "shellscript" ); - - File outputDirectory = new File( System.getProperty( "basedir" ), "target/runtime" ); - - Properties p = new Properties(); - - generator.generate( outputDirectory, p ); - - assertTrue( new File( outputDirectory, "plexus.sh" ).exists() ); - - assertTrue( new File( outputDirectory, "plexus.bat" ).exists() ); - } -} diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-shellscript/pom.xml b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-shellscript/pom.xml deleted file mode 100644 index 7b08525bb..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-shellscript/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - org.codehaus.plexus - plexus-appserver-runtime-booters - 2.0-alpha-3-SNAPSHOT - - 4.0.0 - plexus-appserver-runtime-booter-shellscript - Plexus App Server Shell Script Runtime Booter - Plexus App Server Tools for creating application bundles, services bundles and server runtimes. - - - - org.codehaus.plexus - plexus-appserver-runtime-booter-common - - - diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-shellscript/src/main/java/org/codehaus/plexus/builder/runtime/ShellScriptPlexusRuntimeBootloaderGenerator.java b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-shellscript/src/main/java/org/codehaus/plexus/builder/runtime/ShellScriptPlexusRuntimeBootloaderGenerator.java deleted file mode 100644 index bca794a39..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-shellscript/src/main/java/org/codehaus/plexus/builder/runtime/ShellScriptPlexusRuntimeBootloaderGenerator.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.codehaus.plexus.builder.runtime; - -import java.io.File; -import java.util.Properties; - -/** - * @author Jason van Zyl - * @author Trygve Laugstøl - */ -public class ShellScriptPlexusRuntimeBootloaderGenerator - extends AbstractPlexusRuntimeBootloaderGenerator -{ - private final static String UNIX_LAUNCHER_TEMPLATE = "shellscript/plexus.vm"; - - private final static String WINDOWS_LAUNCHER_TEMPLATE = "shellscript/plexus-bat.vm"; - - public void generate( File outputDirectory, Properties configurationProperties ) - throws PlexusRuntimeBootloaderGeneratorException - { - mkdirs( outputDirectory ); - - mergeTemplate( ShellScriptPlexusRuntimeBootloaderGenerator.UNIX_LAUNCHER_TEMPLATE, new File( outputDirectory, "plexus.sh" ), false ); - - mergeTemplate( ShellScriptPlexusRuntimeBootloaderGenerator.WINDOWS_LAUNCHER_TEMPLATE, new File( outputDirectory, "plexus.bat" ), true ); - - executable( new File( outputDirectory, "plexus.sh" ) ); - } -} diff --git a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-shellscript/src/main/resources/META-INF/plexus/components.xml b/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-shellscript/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index 80466c101..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/plexus-appserver-runtime-booter-shellscript/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - org.codehaus.plexus.builder.runtime.PlexusRuntimeBootloaderGenerator - shellscript - org.codehaus.plexus.builder.runtime.ShellScriptPlexusRuntimeBootloaderGenerator - - - org.codehaus.plexus.velocity.VelocityComponent - - - - - diff --git a/plexus-appserver/plexus-appserver-runtime-booters/pom.xml b/plexus-appserver/plexus-appserver-runtime-booters/pom.xml deleted file mode 100644 index e03f0feaa..000000000 --- a/plexus-appserver/plexus-appserver-runtime-booters/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - 4.0.0 - - org.codehaus.plexus - plexus-appserver - 2.0-alpha-3-SNAPSHOT - - plexus-appserver-runtime-booters - pom - Plexus App Server Runtime Booters - - - - - org.codehaus.plexus - plexus-appserver-runtime-booter-common - ${pom.version} - - - - - - org.codehaus.plexus - plexus-appserver-runtime-builder - 2.0-alpha-3-SNAPSHOT - - - org.codehaus.plexus - plexus-velocity - 1.1.3 - - - velocity - velocity - 1.4 - - - - plexus-appserver-runtime-booter-common - plexus-appserver-runtime-booter-jsw - plexus-appserver-runtime-booter-shellscript - - diff --git a/plexus-appserver/plexus-appserver-runtime-builder/pom.xml b/plexus-appserver/plexus-appserver-runtime-builder/pom.xml deleted file mode 100644 index ff0256d52..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - org.codehaus.plexus - plexus-appserver - 2.0-alpha-4-SNAPSHOT - - 4.0.0 - plexus-appserver-runtime-builder - Plexus App Server Runtime Builder - Plexus App Server Tools for creating application bundles, services bundles and server runtimes. - - - - org.apache.maven - maven-project - 2.0-beta-1 - - - org.codehaus.plexus - plexus-archiver - 1.0-alpha-3 - - - org.apache.maven - maven-artifact-manager - 2.0-beta-1 - - - org.codehaus.plexus - plexus-velocity - 1.1.2 - - - velocity - velocity - 1.4 - - - org.codehaus.plexus - plexus-appserver-host - 2.0-alpha-4-SNAPSHOT - - - org.apache.maven - maven-artifact - 2.0-beta-1 - - - org.apache.maven.wagon - wagon-provider-api - 1.0-alpha-4 - - - dom4j - dom4j - 1.6.1 - - - jaxen - jaxen - 1.1-beta-8 - - - diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/AbstractBuilder.java b/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/AbstractBuilder.java deleted file mode 100644 index 70ade003b..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/AbstractBuilder.java +++ /dev/null @@ -1,393 +0,0 @@ -package org.codehaus.plexus.builder; - -/* - * Copyright (c) 2004, Codehaus.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.factory.ArtifactFactory; -import org.apache.maven.artifact.metadata.ArtifactMetadataSource; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.resolver.ArtifactResolutionException; -import org.apache.maven.artifact.resolver.ArtifactResolutionResult; -import org.apache.maven.artifact.resolver.ArtifactResolver; -import org.apache.maven.artifact.resolver.filter.ArtifactFilter; -import org.apache.maven.project.MavenProjectBuilder; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.util.FileUtils; -import org.codehaus.plexus.util.IOUtil; -import org.codehaus.plexus.util.InterpolationFilterReader; -import org.codehaus.plexus.util.Os; -import org.codehaus.plexus.util.StringUtils; -import org.codehaus.plexus.util.cli.CommandLineException; -import org.codehaus.plexus.util.cli.Commandline; - -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.io.Writer; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; - -/** - * @author Jason van Zyl - * @author Trygve Laugstøl - * @version $Id$ - */ -public abstract class AbstractBuilder - extends AbstractLogEnabled -{ - // ---------------------------------------------------------------------- - // Components - // ---------------------------------------------------------------------- - - /** - * @plexus.requirement - */ - private ArtifactResolver artifactResolver; - - /** - * @plexus.requirement - */ - private ArtifactFactory artifactFactory; - - /** - * @plexus.requirement - */ - private MavenProjectBuilder projectBuilder; - - /** - * @plexus.requirement - */ - private ArtifactMetadataSource metadata; - - // ---------------------------------------------------------------------- - // Utility methods - // ---------------------------------------------------------------------- - - protected void executable( File file ) - throws CommandLineException, IOException - { - if ( Os.isFamily( "unix" ) ) - { - Commandline cli = new Commandline(); - - cli.setExecutable( "chmod" ); - - cli.createArgument().setValue( "+x" ); - - cli.createArgument().setValue( file.getAbsolutePath() ); - - cli.execute(); - } - } - - protected File mkdirs( File directory ) - throws IOException - { - if ( !directory.exists() ) - { - if ( !directory.mkdirs() ) - { - throw new IOException( "Could not make directories '" + directory.getAbsolutePath() + "'." ); - } - } - - return directory; - } - - protected InputStream getResourceAsStream( String resource ) - throws IOException - { - InputStream is = getClass().getClassLoader().getResourceAsStream( resource ); - - if ( is == null ) - { - throw new IOException( "Could not find resource '" + resource + "'." ); - } - - return is; - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - protected void filterCopy( File in, File out, Map map ) - throws IOException - { - filterCopy( new FileReader( in ), out, map ); - } - - protected void filterCopy( File in, File out, Map map, String beginToken, String endToken ) - throws IOException - { - filterCopy( new FileReader( in ), out, map, beginToken, endToken ); - } - - protected void filterCopy( InputStream in, File out, Map map ) - throws IOException - { - filterCopy( new InputStreamReader( in ), out, map ); - } - - protected void filterCopy( InputStream in, File out, Map map, String beginToken, String endToken ) - throws IOException - { - filterCopy( new InputStreamReader( in ), out, map, beginToken, endToken ); - } - - protected void filterCopy( Reader in, File out, Map map ) - throws IOException - { - filterCopy( in, out, map, "@", "@" ); - } - - protected void filterCopy( Reader in, File out, Map map, String beginToken, String endToken ) - throws IOException - { - InterpolationFilterReader reader = new InterpolationFilterReader( in, map, beginToken, endToken ); - - Writer writer = new FileWriter( out ); - - IOUtil.copy( reader, writer ); - - writer.close(); - } - - // ---------------------------------------------------------------------- - // Artifact methods - // ---------------------------------------------------------------------- - - protected void copyArtifact( Artifact artifact, File outputDir, File destination ) - throws IOException - { - String dest = destination.getAbsolutePath().substring( outputDir.getAbsolutePath().length() + 1 ); - - getLogger().info( "Adding " + artifact.getId() + " to " + dest ); - - FileUtils.copyFileToDirectory( artifact.getFile(), destination ); - } - - protected void copyArtifacts( File outputDir, File dir, Set artifacts ) - throws IOException - { - for ( Iterator it = artifacts.iterator(); it.hasNext(); ) - { - Artifact artifact = (Artifact) it.next(); - - copyArtifact( artifact, outputDir, dir ); - } - } - - protected Set getBootArtifacts( Set projectArtifacts, List remoteRepositories, ArtifactRepository localRepository, - boolean ignoreIfMissing ) - throws ArtifactResolutionException - { - Set artifacts = new HashSet(); - - resolveVersion( "classworlds", "classworlds", projectArtifacts, ignoreIfMissing, artifacts ); - - artifacts = findArtifacts( remoteRepositories, localRepository, artifacts, false, null ); - - return artifacts; - } - - protected Set getCoreArtifacts( Set projectArtifacts, Set additionalCoreArtifacts, List remoteRepositories, - ArtifactRepository localRepository, boolean ignoreIfMissing ) - throws ArtifactResolutionException - { - Set artifacts = new HashSet(); - - resolveVersion( "org.codehaus.plexus", "plexus-container-default", projectArtifacts, ignoreIfMissing, - artifacts ); - - resolveVersion( "org.codehaus.plexus", "plexus-appserver-host", projectArtifacts, ignoreIfMissing, artifacts ); - - resolveVersion( "org.codehaus.plexus", "plexus-utils", projectArtifacts, ignoreIfMissing, artifacts ); - - for ( Iterator i = additionalCoreArtifacts.iterator(); i.hasNext(); ) - { - String additionalArtifact = (String) i.next(); - - String[] s = StringUtils.split( additionalArtifact, ":" ); - - resolveVersion( s[0], s[1], projectArtifacts, ignoreIfMissing, artifacts ); - } - - artifacts = findArtifacts( remoteRepositories, localRepository, artifacts, false, null ); - - return artifacts; - } - - protected Set getExcludedArtifacts( Set projectArtifacts, List remoteRepositories, - ArtifactRepository localRepository ) - throws ArtifactResolutionException - { - Set artifacts = new HashSet(); - - resolveVersion( "plexus", "plexus", projectArtifacts, true, artifacts ); - resolveVersion( "plexus", "plexus-container-default", projectArtifacts, true, artifacts ); - resolveVersion( "plexus", "plexus-appserver-host", projectArtifacts, true, artifacts ); - resolveVersion( "plexus", "plexus-utils", projectArtifacts, true, artifacts ); - - artifacts = findArtifacts( remoteRepositories, localRepository, artifacts, true, null ); - - return artifacts; - } - - protected Set findArtifacts( List remoteRepositories, ArtifactRepository localRepository, Set sourceArtifacts, - boolean resolveTransitively, ArtifactFilter artifactFilter ) - throws ArtifactResolutionException - { - ArtifactResolutionResult result; - - Set resolvedArtifacts; - - Artifact originatingArtifact = artifactFactory.createProjectArtifact( "dummy", "dummy", "dummy" ); - - if ( resolveTransitively ) - { - result = artifactResolver.resolveTransitively( sourceArtifacts, originatingArtifact, localRepository, - remoteRepositories, metadata, artifactFilter ); - // TODO: Assert that there wasn't any conflicts. - - resolvedArtifacts = result.getArtifacts(); - } - else - { - resolvedArtifacts = new HashSet(); - - for ( Iterator it = sourceArtifacts.iterator(); it.hasNext(); ) - { - Artifact artifact = (Artifact) it.next(); - - artifactResolver.resolve( artifact, remoteRepositories, localRepository ); - - resolvedArtifacts.add( artifact ); - } - } - - return resolvedArtifacts; - } - - protected String resolveVersion( String groupId, String artifactId, Set projectArtifacts, boolean ignoreIfMissing, - Set resolvedArtifacts ) - { - for ( Iterator it = projectArtifacts.iterator(); it.hasNext(); ) - { - Artifact artifact = (Artifact) it.next(); - - if ( artifact.getGroupId().equals( groupId ) && artifact.getArtifactId().equals( artifactId ) && - artifact.getType().equals( "jar" ) ) - { - resolvedArtifacts.add( artifact ); - - return artifact.getVersion(); - } - } - - if ( !ignoreIfMissing ) - { - throw new RuntimeException( "Could not version for artifact: " + groupId + ":" + artifactId + "." ); - } - - return null; - } - - // TODO: these filters belong in maven-artifact - they are generally useful - - public static class ScopeExcludeArtifactFilter - implements ArtifactFilter - { - private String scope; - - public ScopeExcludeArtifactFilter( String scope ) - { - this.scope = scope; - } - - public boolean include( Artifact artifact ) - { - if ( scope.equals( artifact.getScope() ) ) - { - return false; - } - - return true; - } - } - - public static class GroupArtifactTypeArtifactFilter - implements ArtifactFilter - { - private Set filteredArtifacts; - - public GroupArtifactTypeArtifactFilter( Set filteredArtifacts ) - { - this.filteredArtifacts = filteredArtifacts; - } - - public boolean include( Artifact candiateArtifact ) - { - for ( Iterator it = filteredArtifacts.iterator(); it.hasNext(); ) - { - Artifact artifact = (Artifact) it.next(); - - if ( candiateArtifact.getGroupId().equals( artifact.getGroupId() ) && - candiateArtifact.getArtifactId().equals( artifact.getArtifactId() ) && - candiateArtifact.getType().equals( artifact.getType() ) ) - { - return false; - } - } - - return true; - } - } - - public static class AndArtifactFilter - implements ArtifactFilter - { - private ArtifactFilter filterA; - - private ArtifactFilter filterB; - - public AndArtifactFilter( ArtifactFilter filterA, ArtifactFilter filterB ) - { - this.filterA = filterA; - - this.filterB = filterB; - } - - public boolean include( Artifact artifact ) - { - return filterA.include( artifact ) && filterB.include( artifact ); - } - } -} diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/application/ApplicationBuilder.java b/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/application/ApplicationBuilder.java deleted file mode 100644 index 41424f71f..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/application/ApplicationBuilder.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.codehaus.plexus.builder.application; - -/* - * Copyright (c) 2004, Codehaus.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.apache.maven.artifact.repository.ArtifactRepository; - -import java.io.File; -import java.util.List; -import java.util.Properties; -import java.util.Set; - -/** - * @author Jason van Zyl - * @author Trygve Laugstøl - * @version $Id$ - */ -public interface ApplicationBuilder -{ - String ROLE = ApplicationBuilder.class.getName(); - - void assemble( String applicationName, File workingDirectory, List remoteRepositories, - ArtifactRepository localRespository, Set projectArtifacts, Set additionalCoreArtifacts, - Set serviceArtifacts, File applicationConfiguration, File configurationsDirectory, - Properties configurationProperties ) - throws ApplicationBuilderException; - - void bundle( File outputFile, File workingDirectory ) - throws ApplicationBuilderException; -} diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/application/ApplicationBuilderException.java b/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/application/ApplicationBuilderException.java deleted file mode 100644 index f63c98dcf..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/application/ApplicationBuilderException.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.codehaus.plexus.builder.application; - -/* - * Copyright (c) 2004, Codehaus.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * @author Jason van Zyl - * @version $Id$ - */ -public class ApplicationBuilderException - extends Exception -{ - public ApplicationBuilderException( String message ) - { - super( message ); - } - - public ApplicationBuilderException( String message, Throwable cause ) - { - super( message, cause ); - } -} diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/application/DefaultApplicationBuilder.java b/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/application/DefaultApplicationBuilder.java deleted file mode 100644 index 18db2c538..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/application/DefaultApplicationBuilder.java +++ /dev/null @@ -1,282 +0,0 @@ -package org.codehaus.plexus.builder.application; - -/* - * Copyright (c) 2004, Codehaus.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.resolver.ArtifactResolutionException; -import org.apache.maven.artifact.resolver.filter.ArtifactFilter; -import org.codehaus.plexus.appserver.PlexusApplicationConstants; -import org.codehaus.plexus.archiver.Archiver; -import org.codehaus.plexus.archiver.jar.JarArchiver; -import org.codehaus.plexus.builder.AbstractBuilder; -import org.codehaus.plexus.util.DirectoryScanner; -import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter; -import org.codehaus.plexus.util.xml.XMLWriter; - -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Properties; -import java.util.Set; - -/** - * @author Jason van Zyl - * @author Trygve Laugstøl - * @version $Id$ - */ -public class DefaultApplicationBuilder - extends AbstractBuilder - implements ApplicationBuilder -{ - // ---------------------------------------------------------------------- - // ApplicationBuilder Implementation - // ---------------------------------------------------------------------- - - public void assemble( String applicationName, File workingDirectory, List remoteRepositories, - ArtifactRepository localRepository, Set projectArtifacts, Set additionalCoreArtifacts, - Set serviceArtifacts, File applicationConfiguration, File configurationsDirectory, - Properties configurationProperties ) - throws ApplicationBuilderException - { - // ---------------------------------------------------------------------- - // Check the parameters - // ---------------------------------------------------------------------- - - if ( applicationName == null || applicationName.trim().length() == 0 ) - { - throw new ApplicationBuilderException( "The appserver name must be set." ); - } - - if ( configurationsDirectory != null && !configurationsDirectory.isDirectory() ) - { - throw new ApplicationBuilderException( - "The configurations directory isn't a directory: '" + configurationsDirectory.getAbsolutePath() + "." ); - } - - if ( !applicationConfiguration.exists() ) - { - throw new ApplicationBuilderException( "The appserver configurator file doesn't exist: '" + - applicationConfiguration.getAbsolutePath() + "'." ); - } - - File libDir; - - try - { - // ---------------------------------------------------------------------- - // Create directory structure - // ---------------------------------------------------------------------- - - File confDir = mkdirs( new File( workingDirectory, PlexusApplicationConstants.CONF_DIRECTORY ) ); - - libDir = mkdirs( new File( workingDirectory, PlexusApplicationConstants.LIB_DIRECTORY ) ); - - File logsDir = mkdirs( new File( workingDirectory, "logs" ) ); - - mkdirs( new File( workingDirectory, "META-INF/plexus" ) ); - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - new FileWriter( new File( logsDir, "foo" ) ).close(); - - processConfigurations( confDir, applicationConfiguration, configurationProperties, - configurationsDirectory ); - } - catch ( IOException e ) - { - throw new ApplicationBuilderException( "Error while processing the configurations.", e ); - } - - // ---------------------------------------------------------------------- - // Find and filter the artifacts - // ---------------------------------------------------------------------- - - Set artifacts; - - try - { - Set excludedArtifacts = new HashSet(); - - excludedArtifacts.addAll( getBootArtifacts( projectArtifacts, remoteRepositories, localRepository, true ) ); - - excludedArtifacts.addAll( getCoreArtifacts( projectArtifacts, additionalCoreArtifacts, remoteRepositories, - localRepository, true ) ); - - serviceArtifacts = findArtifacts( remoteRepositories, localRepository, serviceArtifacts, true, null ); - - excludedArtifacts.addAll( serviceArtifacts ); - - excludedArtifacts.addAll( getExcludedArtifacts( projectArtifacts, remoteRepositories, localRepository ) ); - - ArtifactFilter filter = new AndArtifactFilter( new ScopeExcludeArtifactFilter( Artifact.SCOPE_TEST ), - new GroupArtifactTypeArtifactFilter( excludedArtifacts ) ); - - artifacts = findArtifacts( remoteRepositories, localRepository, projectArtifacts, true, filter ); - } - catch ( ArtifactResolutionException e ) - { - throw new ApplicationBuilderException( "Error while finding dependencies.", e ); - } - - // ---------------------------------------------------------------------- - // Copy the dependencies - // ---------------------------------------------------------------------- - - try - { - copyArtifacts( workingDirectory, libDir, artifacts ); - } - catch ( IOException e ) - { - throw new ApplicationBuilderException( "Error while copying dependencies.", e ); - } - - // ---------------------------------------------------------------------- - // Make the generated plexus descriptor - // ---------------------------------------------------------------------- - - try - { - File descriptor = new File( workingDirectory, PlexusApplicationConstants.METADATA_FILE ); - - FileWriter writer = new FileWriter( descriptor ); - - XMLWriter xmlWriter = new PrettyPrintXMLWriter( writer ); - - writer.write( System.getProperty( "line.separator" ) ); - - xmlWriter.startElement( "plexus-appserver" ); - - xmlWriter.startElement( "name" ); - - xmlWriter.writeText( applicationName ); - - xmlWriter.endElement(); // name - - // TODO: Add a list of all artifacts - - xmlWriter.endElement(); // plexus-appserver - - writer.write( System.getProperty( "line.separator" ) ); - - writer.close(); - } - catch ( IOException e ) - { - throw new ApplicationBuilderException( "Error while writing the appserver descriptor.", e ); - } - } - - public void bundle( File outputFile, File workingDirectory ) - throws ApplicationBuilderException - { - Archiver archiver = new JarArchiver(); - - try - { - archiver.addDirectory( workingDirectory ); - - archiver.setDestFile( outputFile ); - - archiver.createArchive(); - } - catch ( Exception e ) - { - throw new ApplicationBuilderException( "Error while creating the appserver archive.", e ); - } - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - private void processConfigurations( File confDir, File applicationConfiguration, Properties configurationProperties, - File configurationsDirectory ) - throws IOException, ApplicationBuilderException - { - System.out.println( "configurationProperties = " + configurationProperties ); - - // ---------------------------------------------------------------------- - // Process the configurations - // ---------------------------------------------------------------------- - - if ( configurationsDirectory != null ) - { - DirectoryScanner scanner = new DirectoryScanner(); - - scanner.setBasedir( configurationsDirectory ); - - List excludes = new ArrayList(); - - // TODO: centralize this list - excludes.add( "**/CVS/**" ); - - excludes.add( "**/.svn/**" ); - - /* - if ( configurationProperties != null ) - { - excludes.add( configurationProperties.getAbsolutePath() ); - } - */ - - scanner.setExcludes( (String[]) excludes.toArray( new String[excludes.size()] ) ); - - scanner.scan(); - - String[] files = scanner.getIncludedFiles(); - - for ( int i = 0; i < files.length; i++ ) - { - String file = files[i]; - - File in = new File( configurationsDirectory, file ); - - File out = new File( confDir, file ); - - File parent = out.getParentFile(); - - if ( !parent.isDirectory() && !parent.mkdirs() ) - { - throw new ApplicationBuilderException( - "Could not make parent directories for " + "'" + out.getAbsolutePath() + "'." ); - } - - filterCopy( in, out, configurationProperties ); - } - } - - // ---------------------------------------------------------------------- - // Copy the main appserver.xml - // ---------------------------------------------------------------------- - - filterCopy( applicationConfiguration, new File( confDir, PlexusApplicationConstants.CONFIGURATION_FILE ), - configurationProperties ); - } -} diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/runtime/DefaultPlexusRuntimeBuilder.java b/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/runtime/DefaultPlexusRuntimeBuilder.java deleted file mode 100644 index 62d922ee2..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/runtime/DefaultPlexusRuntimeBuilder.java +++ /dev/null @@ -1,626 +0,0 @@ -package org.codehaus.plexus.builder.runtime; - -/* - * Copyright (c) 2004, Codehaus.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.resolver.ArtifactResolutionException; -import org.apache.velocity.VelocityContext; -import org.apache.velocity.exception.ResourceNotFoundException; -import org.codehaus.plexus.appserver.PlexusRuntimeConstants; -import org.codehaus.plexus.archiver.Archiver; -import org.codehaus.plexus.archiver.jar.JarArchiver; -import org.codehaus.plexus.builder.AbstractBuilder; -import org.codehaus.plexus.util.FileUtils; -import org.codehaus.plexus.util.IOUtil; -import org.codehaus.plexus.util.StringUtils; -import org.codehaus.plexus.util.cli.CommandLineException; -import org.codehaus.plexus.velocity.VelocityComponent; -import org.dom4j.Document; -import org.dom4j.DocumentException; -import org.dom4j.Element; -import org.dom4j.io.OutputFormat; -import org.dom4j.io.SAXReader; -import org.dom4j.io.XMLWriter; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.FileWriter; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.StringReader; -import java.io.StringWriter; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Properties; -import java.util.Set; - -/** - * @author Jason van Zyl - * @author Trygve Laugstøl - */ -public class DefaultPlexusRuntimeBuilder - extends AbstractBuilder - implements PlexusRuntimeBuilder -{ - private static String JSW = "jsw"; - - private final static String CLASSWORLDS_TEMPLATE = "org/codehaus/plexus/builder/templates/classworlds.vm"; - - private final static String UNIX_LAUNCHER_TEMPLATE = "org/codehaus/plexus/builder/templates/plexus.vm"; - - private final static String WINDOWS_LAUNCHER_TEMPLATE = "org/codehaus/plexus/builder/templates/plexus-bat.vm"; - - // ---------------------------------------------------------------------- - // Properties in the configurator properties file - // ---------------------------------------------------------------------- - - private static final String PROPERTY_APP_NAME = "app.name"; - - private static final String PROPERTY_APP_LONG_NAME = "app.long.name"; - - private static final String PROPERTY_APP_DESCRIPTION = "app.description"; - - private static final String PROPERTY_CLASSWORLDS_VERSION = "classworlds.version"; - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - /** - * @requirement - */ - protected VelocityComponent velocity; - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - public void build( File workingDirectory, List remoteRepositories, ArtifactRepository localRepository, - Set projectArtifacts, Set additionalCoreArtifacts, File containerConfiguration, - Properties configurationProperties, boolean addManagementAgent ) - throws PlexusRuntimeBuilderException - { - try - { - // ---------------------------------------------------------------------- - // Assert the parameters - // ---------------------------------------------------------------------- - - if ( workingDirectory == null ) - { - throw new PlexusRuntimeBuilderException( "The output directory must be specified." ); - } - - if ( localRepository == null ) - { - throw new PlexusRuntimeBuilderException( "The local Maven repository must be specified." ); - } - - if ( containerConfiguration == null ) - { - throw new PlexusRuntimeBuilderException( "The plexus configurator file must be set." ); - } - - if ( !containerConfiguration.exists() ) - { - throw new PlexusRuntimeBuilderException( "The specified plexus configurator file " + "'" + - containerConfiguration.getAbsolutePath() + "'" + " doesn't exist." ); - } - - // ---------------------------------------------------------------------- - // Find the artifact lists. - // ---------------------------------------------------------------------- - - Set bootArtifacts; - - Set coreArtifacts; - - try - { - bootArtifacts = getBootArtifacts( projectArtifacts, remoteRepositories, localRepository, false ); - - Set newAdditionalCoreArtifacts = new HashSet(); - if ( additionalCoreArtifacts != null && !additionalCoreArtifacts.isEmpty() ) - { - newAdditionalCoreArtifacts.addAll( additionalCoreArtifacts ); - } - if ( addManagementAgent ) - { - newAdditionalCoreArtifacts.add( "mx4j:mx4j" ); - newAdditionalCoreArtifacts.add( "mx4j:mx4j-remote" ); - newAdditionalCoreArtifacts.add( "org.livetribe:livetribe-slp" ); - newAdditionalCoreArtifacts.add( "backport-util-concurrent:backport-util-concurrent" ); - } - - coreArtifacts = getCoreArtifacts( projectArtifacts, newAdditionalCoreArtifacts, remoteRepositories, - localRepository, false ); - } - catch ( ArtifactResolutionException e ) - { - throw new PlexusRuntimeBuilderException( "Could not resolve a artifact.", e ); - } - - // ---------------------------------------------------------------------- - // Find and put the classworlds version into the properties - // ---------------------------------------------------------------------- - - String classworldsVersion = - resolveVersion( "classworlds", "classworlds", projectArtifacts, false, new HashSet() ); - - configurationProperties.setProperty( PROPERTY_CLASSWORLDS_VERSION, classworldsVersion ); - - // add defaults - configurationProperties.setProperty( "app.max.memory", configurationProperties.getProperty( "app.max.memory", "128m" ) ); - - // ---------------------------------------------------------------------- - // Build the runtime - // ---------------------------------------------------------------------- - - mkdirs( workingDirectory ); - - getLogger().info( "Building runtime in " + workingDirectory.getAbsolutePath() ); - - // ---------------------------------------------------------------------- - // Set up the directory structure - // ---------------------------------------------------------------------- - - mkdirs( getAppsDirectory( workingDirectory ) ); - - File binDir = mkdirs( new File( workingDirectory, PlexusRuntimeConstants.BIN_DIRECTORY ) ); - - File confDir = mkdirs( new File( workingDirectory, PlexusRuntimeConstants.CONF_DIRECTORY ) ); - - File coreDir = mkdirs( new File( workingDirectory, PlexusRuntimeConstants.CORE_DIRECTORY ) ); - - File bootDir = mkdirs( new File( workingDirectory, PlexusRuntimeConstants.BOOT_DIRECTORY ) ); - - mkdirs( new File( workingDirectory, PlexusRuntimeConstants.LOGS_DIRECTORY ) ); - - mkdirs( new File( workingDirectory, PlexusRuntimeConstants.SERVICES_DIRECTORY ) ); - - mkdirs( new File( workingDirectory, PlexusRuntimeConstants.TEMP_DIRECTORY ) ); - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - copyArtifacts( workingDirectory, bootDir, bootArtifacts ); - - copyArtifacts( workingDirectory, coreDir, coreArtifacts ); - - // ---------------------------------------------------------------------- - // We need to separate between the container configurator that you want - // shared amongst the apps and the appserver configurator. - // ---------------------------------------------------------------------- - - processMainConfiguration( containerConfiguration, configurationProperties, confDir, addManagementAgent ); - - createSystemScripts( binDir, confDir, configurationProperties ); - - //processConfigurations(); - - javaServiceWrapper( binDir, coreDir, confDir, configurationProperties ); - } - catch ( PlexusRuntimeBuilderException ex ) - { - throw ex; - } - catch ( CommandLineException ex ) - { - throw new PlexusRuntimeBuilderException( "Exception while building the runtime.", ex ); - } - catch ( IOException ex ) - { - throw new PlexusRuntimeBuilderException( "Exception while building the runtime.", ex ); - } - } - - public void bundle( File outputFile, File workingDirectory ) - throws PlexusRuntimeBuilderException - { - Archiver archiver = new JarArchiver(); - - try - { - archiver.addDirectory( workingDirectory ); - - archiver.setDestFile( outputFile ); - - archiver.createArchive(); - } - catch ( Exception e ) - { - throw new PlexusRuntimeBuilderException( "Error while creating the archive.", e ); - } - } - - public void addPlexusApplication( File plexusApplication, File runtimeDirectory ) - throws PlexusRuntimeBuilderException - { - try - { - FileUtils.copyFileToDirectory( plexusApplication, getAppsDirectory( runtimeDirectory ) ); - } - catch ( IOException e ) - { - throw new PlexusRuntimeBuilderException( "Error while copying the appserver into the runtime.", e ); - } - } - - public void addPlexusService( File plexusService, File runtimeDirectory ) - throws PlexusRuntimeBuilderException - { - try - { - File dir = getServicesDirectory( runtimeDirectory ); - - String name = plexusService.getName(); - - FileUtils.copyFile( plexusService, new File( dir, name ) ); - } - catch ( IOException e ) - { - throw new PlexusRuntimeBuilderException( "Error while copying the appserver into the runtime.", e ); - } - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - private File getAppsDirectory( File workingDirectory ) - { - return new File( workingDirectory, PlexusRuntimeConstants.APPLICATIONS_DIRECTORY ); - } - - private File getServicesDirectory( File workingDirectory ) - { - return new File( workingDirectory, PlexusRuntimeConstants.SERVICES_DIRECTORY ); - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - private void createSystemScripts( File binDir, File confDir, Properties configurationProperties ) - throws PlexusRuntimeBuilderException, IOException, CommandLineException - { - ClassLoader old = Thread.currentThread().getContextClassLoader(); - - Thread.currentThread().setContextClassLoader( this.getClass().getClassLoader() ); - - createClassworldsConfiguration( confDir, configurationProperties ); - - createLauncherScripts( binDir, configurationProperties ); - - Thread.currentThread().setContextClassLoader( old ); - } - - private void createClassworldsConfiguration( File confDir, Properties configurationProperties ) - throws PlexusRuntimeBuilderException, IOException - { - mergeTemplate( CLASSWORLDS_TEMPLATE, new File( confDir, "classworlds.conf" ), true, configurationProperties ); - } - - private void createLauncherScripts( File binDir, Properties configurationProperties ) - throws PlexusRuntimeBuilderException, IOException, CommandLineException - { - mergeTemplate( UNIX_LAUNCHER_TEMPLATE, new File( binDir, "plexus.sh" ), false, configurationProperties ); - - mergeTemplate( WINDOWS_LAUNCHER_TEMPLATE, new File( binDir, "plexus.bat" ), true, configurationProperties ); - - executable( new File( binDir, "plexus.sh" ) ); - } - - private void processMainConfiguration( File containerConfiguration, Properties configurationProperties, - File confDir, boolean addManagementAgent ) - throws IOException - { - File out = new File( confDir, "plexus.xml" ); - - File conf = containerConfiguration; - - if ( addManagementAgent ) - { - Document doc; - try - { - SAXReader reader = new SAXReader(); - doc = reader.read( conf ); - Element loadOnStart = (Element) doc.selectSingleNode( "//plexus/load-on-start" ); - if ( loadOnStart == null ) - { - loadOnStart = doc.getRootElement().addElement( "load-on-start" ); - } - - loadOnStart.addElement( "component" ).addElement( "role" ).addText( - "org.codehaus.plexus.appserver.management.Agent" ); - - Element components = (Element) doc.selectSingleNode( "//plexus/components" ); - if ( components == null ) - { - components = doc.getRootElement().addElement( "components" ); - } - - Element component = components.addElement( "component" ); - component.addElement( "role" ).addText( "org.codehaus.plexus.appserver.management.Agent" ); - component.addElement( "implementation" ).addText( - "org.codehaus.plexus.appserver.management.DefaultAgent" ); - Element requirement = component.addElement( "requirements" ).addElement( "requirement" ); - requirement.addElement( "role" ).addText( "org.codehaus.plexus.appserver.management.MBean" ); - requirement.addElement( "field-name" ).addText( "mbeans" ); - Element configuration = component.addElement( "configuration" ); - configuration.addElement( "serviceUrl" ).addText( "service:jmx:rmi:///" ); - configuration.addElement( "slpPort" ).addText( "3427" ); - - OutputFormat format = OutputFormat.createPrettyPrint(); - format.setLineSeparator( System.getProperty( "line.separator" ) ); - conf = new File( "target/tmp/plexus.xml" ); - conf.getParentFile().mkdirs(); - XMLWriter writer = new XMLWriter( new FileWriter( conf ), format ); - writer.write( doc ); - writer.close(); - } - catch ( DocumentException e ) - { - getLogger().warn( "can't read " + conf.getCanonicalPath() ); - } - } - - filterCopy( conf, out, configurationProperties ); - } - - private void javaServiceWrapper( File binDir, File coreDir, File confDir, Properties configurationProperties ) - throws IOException, CommandLineException - { - File linux = new File( binDir, "linux" ); - - File win32 = new File( binDir, "win32" ); - - File macosx = new File( binDir, "macosx" ); - - File solaris = new File( binDir, "solaris" ); - - mkdirs( linux ); - - mkdirs( win32 ); - - mkdirs( macosx ); - - mkdirs( solaris ); - - // ---------------------------------------------------------------------- - // Generic parts - // ---------------------------------------------------------------------- - - copyResourceToFile( JSW + "/wrapper.jar", new File( coreDir, "boot/wrapper.jar" ) ); - - // ---------------------------------------------------------------------- - // Linux - // ---------------------------------------------------------------------- - - File runSh = new File( binDir, "linux/run.sh" ); - filterCopy( getResourceAsStream( JSW + "/run.sh" ), runSh, configurationProperties ); - executable( runSh ); - - copyResource( "linux/wrapper", "linux/wrapper", true, binDir ); - copyResource( "linux/libwrapper.so", "linux/libwrapper.so", false, binDir ); - Properties linuxProps = new Properties(); - linuxProps.setProperty( "library.path", "../../bin/linux" ); - linuxProps.setProperty( "extra.path", "" ); - copyWrapperConf( linux, configurationProperties, linuxProps ); - - // ---------------------------------------------------------------------- - // Windows - // ---------------------------------------------------------------------- - - copyResource( "win32/wrapper.exe", "win32/wrapper.exe", true, binDir ); - copyResource( "win32/wrapper.dll", "win32/wrapper.dll", false, binDir ); - copyResource( "win32/run.bat", "win32/run.bat", false, binDir ); - copyResource( "win32/InstallService.bat", "win32/InstallService.bat", false, binDir ); - copyResource( "win32/UninstallService.bat", "win32/UninstallService.bat", false, binDir ); - - Properties win32Props = new Properties(); - win32Props.setProperty( "library.path", "../../bin/win32" ); - win32Props.setProperty( "extra.path", ";" ); - copyWrapperConf( win32, configurationProperties, win32Props ); - - // ---------------------------------------------------------------------- - // OS X - // ---------------------------------------------------------------------- - - runSh = new File( binDir, "macosx/run.sh" ); - filterCopy( getResourceAsStream( JSW + "/run.sh" ), runSh, configurationProperties ); - executable( runSh ); - copyResource( "macosx/wrapper", "macosx/wrapper", true, binDir ); - copyResource( "macosx/libwrapper.jnilib", "macosx/libwrapper.jnilib", false, binDir ); - - Properties osxProps = new Properties(); - osxProps.setProperty( "library.path", "../../bin/macosx" ); - osxProps.setProperty( "extra.path", "" ); - copyWrapperConf( macosx, configurationProperties, osxProps ); - - // ---------------------------------------------------------------------- - // Solaris - // ---------------------------------------------------------------------- - - runSh = new File( binDir, "solaris/run.sh" ); - filterCopy( getResourceAsStream( JSW + "/run.sh" ), runSh, configurationProperties ); - executable( runSh ); - - copyResource( "solaris/wrapper", "solaris/wrapper", true, binDir ); - copyResource( "solaris/libwrapper.so", "solaris/libwrapper.so", false, binDir ); - - Properties solarisProps = new Properties(); - solarisProps.setProperty( "library.path", "../../bin/solaris" ); - solarisProps.setProperty( "extra.path", "" ); - copyWrapperConf( solaris, configurationProperties, solarisProps ); - } - - private void copyWrapperConf( File destDir, Properties configurationProperties, Properties additionalProperties ) - throws IOException - { - Properties props = new Properties(); - - if ( configurationProperties != null ) - { - for ( Iterator i = configurationProperties.keySet().iterator(); i.hasNext(); ) - { - String key = (String) i.next(); - - props.setProperty( key, configurationProperties.getProperty( key ) ); - } - } - - if ( additionalProperties != null ) - { - for ( Iterator i = additionalProperties.keySet().iterator(); i.hasNext(); ) - { - String key = (String) i.next(); - - props.setProperty( key, additionalProperties.getProperty( key ) ); - } - } - - filterCopy( getResourceAsStream( JSW + "/wrapper.conf" ), new File( destDir, "wrapper.conf" ), props ); - } - - protected void copyResource( String filename, String resource, boolean makeExecutable, File basedir ) - throws CommandLineException, IOException - { - File target = new File( basedir, filename ); - - copyResourceToFile( JSW + "/" + resource, target ); - - if ( makeExecutable ) - { - executable( target ); - } - } - - private void copyResourceToFile( String resource, File target ) - throws IOException - { - InputStream is = getResourceAsStream( resource ); - - mkdirs( target.getParentFile() ); - - OutputStream os = new FileOutputStream( target ); - - IOUtil.copy( is, os ); - - IOUtil.close( is ); - - IOUtil.close( os ); - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - private Properties loadConfigurationProperties( File configurationPropertiesFile ) - throws IOException, PlexusRuntimeBuilderException - { - Properties properties = new Properties(); - - if ( configurationPropertiesFile == null ) - { - throw new PlexusRuntimeBuilderException( "The runtime builder requires a configurator properties file." ); - } - - properties.load( new FileInputStream( configurationPropertiesFile ) ); - - // ---------------------------------------------------------------------- - // Validate that some required properties are present - // ---------------------------------------------------------------------- - - assertHasProperty( properties, PROPERTY_APP_NAME ); - - assertHasProperty( properties, PROPERTY_APP_LONG_NAME ); - - assertHasProperty( properties, PROPERTY_APP_DESCRIPTION ); - - return properties; - } - - private void assertHasProperty( Properties properties, String key ) - throws PlexusRuntimeBuilderException - { - if ( StringUtils.isEmpty( properties.getProperty( key ) ) ) - { - throw new PlexusRuntimeBuilderException( "Missing configurator property '" + key + "'." ); - } - } - - // ---------------------------------------------------------------------- - // Velocity methods - // ---------------------------------------------------------------------- - - protected void mergeTemplate( String templateName, File outputFileName, boolean dos, - Properties configurationProperties ) - throws IOException, PlexusRuntimeBuilderException - { - StringWriter buffer = new StringWriter( 100 * FileUtils.ONE_KB ); - - File tmpFile = File.createTempFile( outputFileName.getName(), null ); - - try - { - velocity.getEngine().mergeTemplate( templateName, new VelocityContext(), buffer ); - } - catch ( ResourceNotFoundException ex ) - { - throw new PlexusRuntimeBuilderException( "Missing Velocity template: '" + templateName + "'.", ex ); - } - catch ( Exception ex ) - { - throw new PlexusRuntimeBuilderException( "Exception merging the velocity template.", ex ); - } - - FileOutputStream output = new FileOutputStream( tmpFile ); - - BufferedReader reader = new BufferedReader( new StringReader( buffer.toString() ) ); - - String line; - - while ( ( line = reader.readLine() ) != null ) - { - output.write( line.getBytes() ); - - if ( dos ) - { - output.write( '\r' ); - } - - output.write( '\n' ); - } - - output.close(); - - filterCopy( tmpFile, outputFileName, configurationProperties, "@{", "}@" ); - } -} diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/runtime/PlexusRuntimeBuilder.java b/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/runtime/PlexusRuntimeBuilder.java deleted file mode 100644 index ec8412a8f..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/runtime/PlexusRuntimeBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.codehaus.plexus.builder.runtime; - -/* - * Copyright (c) 2004, Codehaus.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.apache.maven.artifact.repository.ArtifactRepository; - -import java.io.File; -import java.util.List; -import java.util.Properties; -import java.util.Set; - -/** - * @author Jason van Zyl - * @author Trygve Laugstøl - * @version $Id$ - */ -public interface PlexusRuntimeBuilder -{ - String ROLE = PlexusRuntimeBuilder.class.getName(); - - void build( File workingDirectory, List remoteRepositories, ArtifactRepository localRepository, - Set projectArtifacts, Set additionalCoreArtifacts, File containerConfiguration, - Properties configurationProperties, boolean addManagementAgent ) - throws PlexusRuntimeBuilderException; - - void bundle( File outputFile, File workingDirectory ) - throws PlexusRuntimeBuilderException; - - void addPlexusApplication( File plexusApplication, File runtimeDirectory ) - throws PlexusRuntimeBuilderException; - - void addPlexusService( File plexusService, File runtimeDirectory ) - throws PlexusRuntimeBuilderException; -} diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/runtime/PlexusRuntimeBuilderException.java b/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/runtime/PlexusRuntimeBuilderException.java deleted file mode 100644 index 6cb311b93..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/runtime/PlexusRuntimeBuilderException.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.codehaus.plexus.builder.runtime; - -/* - * Copyright (c) 2004, Codehaus.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * @author Jason van Zyl - * @author Trygve Laugstøl - * @version $Id$ - */ -public class PlexusRuntimeBuilderException - extends Exception -{ - public PlexusRuntimeBuilderException( String msg ) - { - super( msg ); - } - - public PlexusRuntimeBuilderException( String msg, Throwable cause ) - { - super( msg, cause ); - } -} diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/service/DefaultServiceBuilder.java b/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/service/DefaultServiceBuilder.java deleted file mode 100644 index 4894c1df4..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/service/DefaultServiceBuilder.java +++ /dev/null @@ -1,232 +0,0 @@ -package org.codehaus.plexus.builder.service; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.resolver.ArtifactResolutionException; -import org.apache.maven.artifact.resolver.filter.ArtifactFilter; -import org.codehaus.plexus.appserver.PlexusServiceConstants; -import org.codehaus.plexus.archiver.Archiver; -import org.codehaus.plexus.archiver.jar.JarArchiver; -import org.codehaus.plexus.builder.AbstractBuilder; -import org.codehaus.plexus.util.DirectoryScanner; -import org.codehaus.plexus.util.FileUtils; -import org.codehaus.plexus.util.StringUtils; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Properties; -import java.util.Set; - -/** - * @author Jason van Zyl - * @author Trygve Laugstøl - * @version $Id$ - */ -public class DefaultServiceBuilder - extends AbstractBuilder - implements ServiceBuilder -{ - // ---------------------------------------------------------------------- - // ServiceBuilder Implementation - // ---------------------------------------------------------------------- - - public void build( String serviceName, File outputDirectory, File serviceJar, List remoteRepositories, - ArtifactRepository localRepository, Set serviceArtifacts, File serviceConfiguration, - File configurationsDirectory, Properties configurationProperties ) - throws ServiceBuilderException - { - // ---------------------------------------------------------------------- - // Check the parameters - // ---------------------------------------------------------------------- - - if ( StringUtils.isEmpty( serviceName ) ) - { - throw new ServiceBuilderException( "The service name must be set." ); - } - - if ( configurationsDirectory != null && !configurationsDirectory.isDirectory() ) - { - throw new ServiceBuilderException( - "The configurations directory isn't a directory: '" + configurationsDirectory.getAbsolutePath() + "." ); - } - - File libDir; - - try - { - // ---------------------------------------------------------------------- - // Create directory structure - // ---------------------------------------------------------------------- - - File confDir = mkdirs( new File( outputDirectory, PlexusServiceConstants.CONF_DIRECTORY ) ); - - libDir = mkdirs( new File( outputDirectory, PlexusServiceConstants.LIB_DIRECTORY ) ); - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - processConfigurations( confDir, serviceConfiguration, configurationProperties, configurationsDirectory ); - } - catch ( IOException e ) - { - throw new ServiceBuilderException( "Error while processing the configurations." ); - } - - // ---------------------------------------------------------------------------- - // Copy in service JAR - // ---------------------------------------------------------------------------- - - try - { - FileUtils.copyFileToDirectory( serviceJar, libDir ); - } - catch ( IOException e ) - { - throw new ServiceBuilderException( "Error while copying service JAR into working directory.", e ); - } - - // ---------------------------------------------------------------------- - // Find the and filter the dependencies - // ---------------------------------------------------------------------- - - Set artifacts; - - try - { - Set excludedArtifacts = new HashSet(); - - excludedArtifacts.addAll( getBootArtifacts( serviceArtifacts, remoteRepositories, localRepository, true ) ); - - excludedArtifacts.addAll( getCoreArtifacts( serviceArtifacts, Collections.EMPTY_SET, remoteRepositories, - localRepository, true ) ); - - ArtifactFilter filter = new AndArtifactFilter( new ScopeExcludeArtifactFilter( Artifact.SCOPE_TEST ), - new GroupArtifactTypeArtifactFilter( excludedArtifacts ) ); - - artifacts = findArtifacts( remoteRepositories, localRepository, serviceArtifacts, true, filter ); - } - catch ( ArtifactResolutionException e ) - { - throw new ServiceBuilderException( "Error while finding dependencies.", e ); - } - - // ---------------------------------------------------------------------- - // Copy the dependencies - // ---------------------------------------------------------------------- - - try - { - copyArtifacts( outputDirectory, libDir, artifacts ); - } - catch ( IOException e ) - { - throw new ServiceBuilderException( "Error while copying dependencies.", e ); - } - - // TODO: Make a META-INF/MANIFEST.MF that includes references to all the jar files - // in /lib - } - - public void bundle( File outputFile, File workingDirectory ) - throws ServiceBuilderException - { - Archiver archiver = new JarArchiver(); - - try - { - archiver.addDirectory( workingDirectory ); - - archiver.setDestFile( outputFile ); - - archiver.createArchive(); - } - catch ( Exception e ) - { - throw new ServiceBuilderException( "Error while creating the service archive.", e ); - } - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - private void processConfigurations( File confDir, File plexusConfigurationFile, Properties configurationProperties, - File configurationsDirectory ) - throws ServiceBuilderException, IOException - { - // ---------------------------------------------------------------------- - // Copy the main plexus.xml - // ---------------------------------------------------------------------- - - if ( !plexusConfigurationFile.exists() ) - { - throw new ServiceBuilderException( - "The appserver configurator file doesn't exist: '" + plexusConfigurationFile.getAbsolutePath() + "'." ); - } - - FileUtils.copyFile( plexusConfigurationFile, new File( confDir, PlexusServiceConstants.CONFIGURATION_FILE ) ); - - // ---------------------------------------------------------------------- - // Process the configurations - // ---------------------------------------------------------------------- - - if ( configurationsDirectory == null ) - { - return; - } - - DirectoryScanner scanner = new DirectoryScanner(); - - scanner.setBasedir( configurationsDirectory ); - - List excludes = new ArrayList(); - - excludes.add( "**/CVS/**" ); - - scanner.setExcludes( (String[]) excludes.toArray( new String[excludes.size()] ) ); - - scanner.scan(); - - String[] files = scanner.getIncludedFiles(); - - for ( int i = 0; i < files.length; i++ ) - { - String file = files[i]; - - File in = new File( configurationsDirectory, file ); - - File out = new File( confDir, files[i] ); - - filterCopy( in, out, configurationProperties ); - } - } -} diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/service/ServiceBuilder.java b/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/service/ServiceBuilder.java deleted file mode 100644 index 8f83852ad..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/service/ServiceBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.codehaus.plexus.builder.service; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.apache.maven.artifact.repository.ArtifactRepository; - -import java.io.File; -import java.util.List; -import java.util.Properties; -import java.util.Set; - -/** - * @author Jason van Zyl - * @author Trygve Laugstøl - * @version $Id$ - */ -public interface ServiceBuilder -{ - String ROLE = ServiceBuilder.class.getName(); - - void build( String servicename, File outputDirectory, File classes, List remoteRepositories, - ArtifactRepository localRespository, Set serviceArtifacts, File plexusConfiguration, - File configurationsDirectory, Properties configurationProperties ) - throws ServiceBuilderException; - - void bundle( File outputFile, File workingDirectory ) - throws ServiceBuilderException; -} diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/service/ServiceBuilderException.java b/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/service/ServiceBuilderException.java deleted file mode 100644 index ad6f610a2..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/main/java/org/codehaus/plexus/builder/service/ServiceBuilderException.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.codehaus.plexus.builder.service; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class ServiceBuilderException - extends Exception -{ - public ServiceBuilderException( String message ) - { - super( message ); - } - - public ServiceBuilderException( String message, Throwable cause ) - { - super( message, cause ); - } -} diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/META-INF/plexus/components.xml b/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index 082e98fb6..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - org.codehaus.plexus.builder.runtime.PlexusRuntimeBuilder - org.codehaus.plexus.builder.runtime.DefaultPlexusRuntimeBuilder - - - org.apache.maven.artifact.resolver.ArtifactResolver - - - org.apache.maven.artifact.factory.ArtifactFactory - - - org.codehaus.plexus.velocity.VelocityComponent - - - org.apache.maven.project.MavenProjectBuilder - - - org.apache.maven.artifact.metadata.ArtifactMetadataSource - - - - - - - org.codehaus.plexus.builder.application.ApplicationBuilder - org.codehaus.plexus.builder.application.DefaultApplicationBuilder - - - org.apache.maven.artifact.resolver.ArtifactResolver - - - org.apache.maven.artifact.factory.ArtifactFactory - - - org.apache.maven.project.MavenProjectBuilder - - - org.apache.maven.artifact.metadata.ArtifactMetadataSource - - - - - - - - org.codehaus.plexus.builder.service.ServiceBuilder - org.codehaus.plexus.builder.service.DefaultServiceBuilder - - - org.apache.maven.artifact.resolver.ArtifactResolver - - - org.apache.maven.artifact.factory.ArtifactFactory - - - org.apache.maven.project.MavenProjectBuilder - - - org.apache.maven.artifact.metadata.ArtifactMetadataSource - - - - - diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/linux/libwrapper.so b/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/linux/libwrapper.so deleted file mode 100755 index 2e990b14d..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/linux/libwrapper.so and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/linux/wrapper b/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/linux/wrapper deleted file mode 100755 index a11cb3965..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/linux/wrapper and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/macosx/libwrapper.jnilib b/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/macosx/libwrapper.jnilib deleted file mode 100755 index 5d4c7b27b..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/macosx/libwrapper.jnilib and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/macosx/wrapper b/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/macosx/wrapper deleted file mode 100755 index 0e366d463..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/macosx/wrapper and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/run.sh b/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/run.sh deleted file mode 100644 index a05031aa2..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/run.sh +++ /dev/null @@ -1,352 +0,0 @@ -#! /bin/sh - -# -# Skeleton sh script suitable for starting and stopping -# wrapped Java apps on the Solaris platform. -# -# Make sure that PIDFILE points to the correct location, -# if you have changed the default location set in the -# wrapper configuration file. -# - -#----------------------------------------------------------------------------- -# These settings can be modified to fit the needs of your application - -# Application -APP_NAME="@app.name@" -APP_LONG_NAME="@app.long.name@" - -# Wrapper -WRAPPER_CMD="./wrapper" -WRAPPER_CONF="wrapper.conf" - -# Priority at which to run the wrapper. See "man nice" for valid priorities. -# nice is only used if a priority is specified. -PRIORITY= - -# Location of the pid file. -PIDDIR="." - -# If uncommented, causes the Wrapper to be shutdown using an anchor file. -# When launched with the 'start' command, it will also ignore all INT and -# TERM signals. -#IGNORE_SIGNALS=true - -# If specified, the Wrapper will be run as the specified user when the 'start' -# command is passed to this script. When running with the 'console' command -# the current user will be used. -# IMPORTANT - Make sure that the user has the required privileges to write -# the PID file and wrapper.log files. Failure to be able to write the log -# file will cause the Wrapper to exit without any way to write out an error -# message. -# NOTE - This will set the user which is used to run the Wrapper as well as -# the JVM and is not useful in situations where a privileged resource or -# port needs to be allocated prior to the user being changed. -#RUN_AS_USER= - -# Do not modify anything beyond this point -#----------------------------------------------------------------------------- - -# Get the fully qualified path to the script -case $0 in - /*) - SCRIPT="$0" - ;; - *) - PWD=`pwd` - SCRIPT="$PWD/$0" - ;; -esac - -# Change spaces to ":" so the tokens can be parsed. -SCRIPT=`echo $SCRIPT | sed -e 's; ;:;g'` -# Get the real path to this script, resolving any symbolic links -TOKENS=`echo $SCRIPT | sed -e 's;/; ;g'` -REALPATH= -for C in $TOKENS; do - REALPATH="$REALPATH/$C" - while [ -h "$REALPATH" ] ; do - LS="`ls -ld "$REALPATH"`" - LINK="`expr "$LS" : '.*-> \(.*\)$'`" - if expr "$LINK" : '/.*' > /dev/null; then - REALPATH="$LINK" - else - REALPATH="`dirname "$REALPATH"`""/$LINK" - fi - done -done -# Change ":" chars back to spaces. -REALPATH=`echo $REALPATH | sed -e 's;:; ;g'` - -# Change the current directory to the location of the script -cd "`dirname "$REALPATH"`" -TGTPATH="$PWD" - -# Process ID -ANCHORFILE="$PIDDIR/$APP_NAME.anchor" -PIDFILE="$PIDDIR/$APP_NAME.pid" -pid="" - -# Resolve the location of the 'ps' command -PSEXE="/usr/bin/ps" -if [ ! -x $PSEXE ] -then - PSEXE="/bin/ps" - if [ ! -x $PSEXE ] - then - echo "Unable to locate 'ps'." - echo "Please report this message along with the location of the command on your system." - exit 1 - fi -fi - -# Build the nice clause -if [ "X$PRIORITY" = "X" ] -then - CMDNICE="" -else - CMDNICE="nice -$PRIORITY" -fi - -# Check the configured user -if [ "X$RUN_AS_USER" != "X" ] -then - # Resolve the location of the 'id' command - IDEXE="/usr/xpg4/bin/id" - if [ ! -x $IDEXE ] - then - IDEXE="/usr/bin/id" - if [ ! -x $IDEXE ] - then - echo "Unable to locate 'id'." - echo "Please report this message along with the location of the command on your system." - exit 1 - fi - fi - - if [ "`$IDEXE -u -n`" = "$RUN_AS_USER" ] - then - # Already running as the configured user. Avoid password prompts by not calling su. - RUN_AS_USER="" - fi -fi - -getpid() { - if [ -f $PIDFILE ] - then - if [ -r $PIDFILE ] - then - pid=`cat $PIDFILE` - if [ "X$pid" != "X" ] - then - # Verify that a process with this pid is still running. - pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1` - if [ "X$pid" = "X" ] - then - # This is a stale pid file. - rm -f $PIDFILE - echo "Removed stale pid file: $PIDFILE" - fi - fi - else - echo "Cannot read $PIDFILE." - exit 1 - fi - fi -} - -testpid() { - pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1` - if [ "X$pid" = "X" ] - then - # Process is gone so remove the pid file. - rm -f $PIDFILE - fi -} - -console() { - echo "Running $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - if [ "X$IGNORE_SIGNALS" = "X" ] - then - exec $CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.pidfile=$PIDFILE - else - exec $CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.pidfile=$PIDFILE wrapper.anchorfile=$ANCHORFILE - fi - else - echo "$APP_LONG_NAME is already running." - exit 1 - fi -} - -start() { - echo "Starting $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - if [ "X$IGNORE_SIGNALS" = "X" ] - then - if [ "X$RUN_AS_USER" = "X" ] - then - exec $CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.pidfile=$PIDFILE wrapper.daemonize=TRUE - else - exec su - $RUN_AS_USER -c "cd $TGTPATH; exec $CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.pidfile=$PIDFILE wrapper.daemonize=TRUE" - fi - else - if [ "X$RUN_AS_USER" = "X" ] - then - exec $CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.pidfile=$PIDFILE wrapper.anchorfile=$ANCHORFILE wrapper.ignore_signals=TRUE wrapper.daemonize=TRUE - else - exec su - $RUN_AS_USER -c "cd $TGTPATH; exec $CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.pidfile=$PIDFILE wrapper.anchorfile=$ANCHORFILE wrapper.ignore_signals=TRUE wrapper.daemonize=TRUE" - fi - fi - else - echo "$APP_LONG_NAME is already running." - exit 1 - fi -} - -stopit() { - echo "Stopping $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME was not running." - else - if [ "X$IGNORE_SIGNALS" = "X" ] - then - # Running so try to stop it. - kill $pid - if [ $? -ne 0 ] - then - # An explanation for the failure should have been given - echo "Unable to stop $APP_LONG_NAME." - exit 1 - fi - else - rm -f $ANCHORFILE - if [ -f $ANCHORFILE ] - then - # An explanation for the failure should have been given - echo "Unable to stop $APP_LONG_NAME." - exit 1 - fi - fi - - # We can not predict how long it will take for the wrapper to - # actually stop as it depends on settings in wrapper.conf. - # Loop until it does. - savepid=$pid - CNT=0 - TOTCNT=0 - while [ "X$pid" != "X" ] - do - # Loop for up to 5 minutes - if [ "$TOTCNT" -lt "300" ] - then - if [ "$CNT" -lt "5" ] - then - CNT=`expr $CNT + 1` - else - echo "Waiting for $APP_LONG_NAME to exit..." - CNT=0 - fi - TOTCNT=`expr $TOTCNT + 1` - - sleep 1 - - testpid - else - pid= - fi - done - - pid=$savepid - testpid - if [ "X$pid" != "X" ] - then - echo "Timed out waiting for $APP_LONG_NAME to exit." - echo " Attempting a forced exit..." - kill -9 $pid - fi - - pid=$savepid - testpid - if [ "X$pid" != "X" ] - then - echo "Failed to stop $APP_LONG_NAME." - exit 1 - else - echo "Stopped $APP_LONG_NAME." - fi - fi -} - -status() { - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME is not running." - exit 1 - else - echo "$APP_LONG_NAME is running ($pid)." - exit 0 - fi -} - -dump() { - echo "Dumping $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME was not running." - - else - kill -3 $pid - - if [ $? -ne 0 ] - then - echo "Failed to dump $APP_LONG_NAME." - exit 1 - else - echo "Dumped $APP_LONG_NAME." - fi - fi -} - -case "$1" in - - 'console') - console - ;; - - 'start') - start - ;; - - 'stop') - stopit - ;; - - 'restart') - stopit - start - ;; - - 'status') - status - ;; - - 'dump') - dump - ;; - - *) - echo "Usage: $0 { console | start | stop | restart | status | dump }" - exit 1 - ;; -esac - -exit 0 diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/solaris/libwrapper.so b/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/solaris/libwrapper.so deleted file mode 100644 index f8ce31f94..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/solaris/libwrapper.so and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/solaris/wrapper b/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/solaris/wrapper deleted file mode 100644 index 39a8d4f3c..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/solaris/wrapper and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/win32/InstallService.bat b/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/win32/InstallService.bat deleted file mode 100644 index a1e337db8..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/win32/InstallService.bat +++ /dev/null @@ -1,13 +0,0 @@ -@echo off - -set _WRAPPER_CONF="%~f1" -if not %_WRAPPER_CONF%=="" goto startup -set _WRAPPER_CONF="wrapper.conf" - -:startup -"Wrapper.exe" -i %_WRAPPER_CONF% -if not errorlevel 1 goto end -pause - -:end -set _WRAPPER_CONF= \ No newline at end of file diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/win32/UninstallService.bat b/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/win32/UninstallService.bat deleted file mode 100644 index 26d154d71..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/win32/UninstallService.bat +++ /dev/null @@ -1,13 +0,0 @@ -@echo off - -set _WRAPPER_CONF="%~f1" -if not %_WRAPPER_CONF%=="" goto startup -set _WRAPPER_CONF="wrapper.conf" - -:startup -"Wrapper.exe" -r %_WRAPPER_CONF% -if not errorlevel 1 goto end -pause - -:end -set _WRAPPER_CONF= \ No newline at end of file diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/win32/run.bat b/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/win32/run.bat deleted file mode 100644 index c16776239..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/win32/run.bat +++ /dev/null @@ -1,38 +0,0 @@ -@echo off -rem -rem Find the application home. -rem -if "%OS%"=="Windows_NT" goto nt - -echo This is not NT, so please edit this script and set _APP_HOME manually -set _APP_HOME=.. - -goto conf - -:nt -rem %~dp0 is name of current script under NT -set _APP_HOME=%~dp0 -rem : operator works similar to make : operator -rem set _APP_HOME=%_APP_HOME:\bin\=% - - -rem -rem Find the wrapper.conf -rem -:conf -set _WRAPPER_CONF=wrapper.conf - - -rem -rem Run the application. -rem At runtime, the current directory will be that of Wrapper.exe -rem -:startup -"%_APP_HOME%wrapper.exe" -c %_WRAPPER_CONF% -if not errorlevel 1 goto end -pause - -:end -set _APP_HOME= -set _WRAPPER_CONF= - diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/win32/wrapper.dll b/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/win32/wrapper.dll deleted file mode 100644 index 38b7807cf..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/win32/wrapper.dll and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/win32/wrapper.exe b/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/win32/wrapper.exe deleted file mode 100644 index 4a31b0a81..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/win32/wrapper.exe and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/windows/run.bat b/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/windows/run.bat deleted file mode 100644 index e99c910c2..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/windows/run.bat +++ /dev/null @@ -1,40 +0,0 @@ -@echo off -rem -rem Find the application home. -rem -if "%OS%"=="Windows_NT" goto nt - -echo This is not NT, so please edit this script and set _APP_HOME manually -set _APP_HOME=.. - -goto conf - -:nt -rem %~dp0 is name of current script under NT -set _APP_HOME=%~dp0 -rem : operator works similar to make : operator -rem set _APP_HOME=%_APP_HOME:\bin\=% - - -rem -rem Find the wrapper.conf -rem -:conf -set _WRAPPER_CONF="%~f1" -if not %_WRAPPER_CONF%=="" goto startup -set _WRAPPER_CONF="%_APP_HOME%..\..\conf\wrapper.conf" - - -rem -rem Run the application. -rem At runtime, the current directory will be that of Wrapper.exe -rem -:startup -"%_APP_HOME%\Wrapper.exe" -c %_WRAPPER_CONF% -if not errorlevel 1 goto end -pause - -:end -set _APP_HOME= -set _WRAPPER_CONF= - diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/wrapper.conf b/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/wrapper.conf deleted file mode 100644 index b300ad3f0..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/wrapper.conf +++ /dev/null @@ -1,100 +0,0 @@ -#******************************************************************** -# Wrapper Properties -#******************************************************************** -# Java Application -wrapper.java.command=%JAVA_HOME%/bin/java - -# Java Main class. This class must implement the WrapperListener interface -# or guarantee that the WrapperManager class is initialized. Helper -# classes are provided to do this for you. See the Integration section -# of the documentation for details. -wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp - -# Java Classpath (include wrapper.jar) Add class path elements as -# needed starting from 1 -wrapper.java.classpath.1=../../core/boot/wrapper.jar -wrapper.java.classpath.2=../../core/boot/classworlds-@classworlds.version@.jar - -# Java Library Path (location of Wrapper.DLL or libwrapper.so) -wrapper.java.library.path.1=@library.path@ - -# Java Additional Parameters -wrapper.java.additional.1=-Dclassworlds.conf=../../conf/classworlds.conf -wrapper.java.additional.2=-Djava.io.temp=../../temp -wrapper.java.additional.3=-Dplexus.core=../../core -wrapper.java.additional.4=-Dplexus.home=../.. -wrapper.java.additional.5=-Dplexus.system.path="%PATH%@extra.path@" -wrapper.java.additional.5.stripquotes=TRUE - -# Initial Java Heap Size (in MB) -wrapper.java.initmemory=3 - -# Maximum Java Heap Size (in MB) -wrapper.java.maxmemory=128 - -# Application parameters. Add parameters as needed starting from 1 -wrapper.app.parameter.1=org.codehaus.classworlds.Launcher -wrapper.app.parameter.2=../../conf/plexus.xml - -#******************************************************************** -# Wrapper Logging Properties -#******************************************************************** -# Format of output for the console. (See docs for formats) -wrapper.console.format=PM - -# Log Level for console output. (See docs for log levels) -wrapper.console.loglevel=INFO - -# Log file to use for wrapper output logging. -wrapper.logfile=../../logs/wrapper.log - -# Format of output for the log file. (See docs for formats) -wrapper.logfile.format=LPTM - -# Log Level for log file output. (See docs for log levels) -wrapper.logfile.loglevel=INFO - -# Maximum size that the log file will be allowed to grow to before -# the log is rolled. Size is specified in bytes. The default value -# of 0, disables log rolling. May abbreviate with the 'k' (kb) or -# 'm' (mb) suffix. For example: 10m = 10 megabytes. -wrapper.logfile.maxsize=0 - -# Maximum number of rolled log files which will be allowed before old -# files are deleted. The default value of 0 implies no limit. -wrapper.logfile.maxfiles=0 - -# Log Level for sys/event log output. (See docs for log levels) -wrapper.syslog.loglevel=NONE - -#******************************************************************** -# Wrapper Windows Properties -#******************************************************************** -# Title to use when running as a console -wrapper.console.title=@app.long.name@ - -#******************************************************************** -# Wrapper Windows NT/2000/XP Service Properties -#******************************************************************** -# WARNING - Do not modify any of these properties when an application -# using this configuration file has been installed as a service. -# Please uninstall the service before modifying this section. The -# service can then be reinstalled. - -# Name of the service -wrapper.ntservice.name=@app.name@ - -# Display name of the service -wrapper.ntservice.displayname=@app.long.name@ - -# Description of the service -wrapper.ntservice.description=@app.description@ - -# Service dependencies. Add dependencies as needed starting from 1 -wrapper.ntservice.dependency.1= - -# Mode in which the service is installed. AUTO_START or DEMAND_START -wrapper.ntservice.starttype=AUTO_START - -# Allow the service to interact with the desktop. -wrapper.ntservice.interactive=false diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/wrapper.jar b/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/wrapper.jar deleted file mode 100644 index 0ee6011cf..000000000 Binary files a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/jsw/wrapper.jar and /dev/null differ diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/org/codehaus/plexus/builder/templates/classworlds.vm b/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/org/codehaus/plexus/builder/templates/classworlds.vm deleted file mode 100644 index 83c659f00..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/org/codehaus/plexus/builder/templates/classworlds.vm +++ /dev/null @@ -1,5 +0,0 @@ -main is org.codehaus.plexus.appserver.PlexusApplicationHost from plexus.core - -[plexus.core] -load ${plexus.core}/*.jar -load ${java.home}/../lib/tools.jar diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/org/codehaus/plexus/builder/templates/plexus-bat.vm b/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/org/codehaus/plexus/builder/templates/plexus-bat.vm deleted file mode 100644 index 5299072ef..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/org/codehaus/plexus/builder/templates/plexus-bat.vm +++ /dev/null @@ -1,136 +0,0 @@ -@REM ---------------------------------------------------------------------------- -@REM Plexus Start Up Batch script -@REM -@REM Required ENV vars: -@REM JAVA_HOME - location of a JDK home dir -@REM PLEXUS_HOME - location of Plexus installed home dir -@REM -@REM Optional ENV vars -@REM PLEXUS_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands -@REM PLEXUS_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending -@REM PLEXUS_OPTS - parameters passed to the Java VM when running Plexus -@REM e.g. to debug Plexus itself, use -@REM set PLEXUS_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -@REM ---------------------------------------------------------------------------- - -@echo off -@REM Begin all REM lines with '@' in case PLEXUS_BATCH_ECHO is 'on' -@REM enable echoing my setting PLEXUS_BATCH_ECHO to 'on' -@if "%PLEXUS_BATCH_ECHO%" == "on" echo %PLEXUS_BATCH_ECHO% - -@REM Execute a user defined script before this one -if exist "%HOME%\plexusrc_pre.bat" call "%HOME%\plexusrc_pre.bat" - -@REM set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" @setlocal - -@REM ==== START VALIDATION ==== -if not "%JAVA_HOME%" == "" goto OkJHome - -echo. -echo ERROR: JAVA_HOME not found in your environment. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation -echo. -goto end - -:OkJHome -if exist "%JAVA_HOME%\bin\java.exe" goto chkMHome - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory. -echo JAVA_HOME = %JAVA_HOME% -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation -echo. -goto end - -:chkMHome -if not "%PLEXUS_HOME%"=="" goto valMHome - -if "%OS%"=="Windows_NT" SET PLEXUS_HOME=%~dp0.. -if not "%PLEXUS_HOME%"=="" goto valMHome - -echo. -echo ERROR: PLEXUS_HOME not found in your environment. -echo Please set the PLEXUS_HOME variable in your environment to match the -echo location of the PLEXUS installation -echo. -goto end - -:valMHome -if exist "%PLEXUS_HOME%\bin\plexus.bat" goto init - -echo. -echo ERROR: PLEXUS_HOME is set to an invalid directory. -echo PLEXUS_HOME = %PLEXUS_HOME% -echo Please set the PLEXUS_HOME variable in your environment to match the -echo location of the PLEXUS installation -echo. -goto end -@REM ==== END VALIDATION ==== - -:init -@REM Decide how to startup depending on the version of windows - -@REM -- Win98ME -if NOT "%OS%"=="Windows_NT" goto Win9xArg - -@REM -- 4NT shell -if "%eval[2+2]" == "4" goto 4NTArgs - -@REM -- Regular WinNT shell -set PLEXUS_CMD_LINE_ARGS=%* -goto endInit - -@REM The 4NT Shell from jp software -:4NTArgs -set PLEXUS_CMD_LINE_ARGS=%$ -goto endInit - -:Win9xArg -@REM Slurp the command line arguments. This loop allows for an unlimited number -@REM of agruments (up to the command line limit, anyway). -set PLEXUS_CMD_LINE_ARGS= -:Win9xApp -if %1a==a goto endInit -set PLEXUS_CMD_LINE_ARGS=%PLEXUS_CMD_LINE_ARGS% %1 -shift -goto Win9xApp - -@REM Reaching here means variables are defined and arguments have been captured -:endInit -if "%PLEXUS_OPTS%"=="" SET PLEXUS_OPTS="-Xmx@{app.max.memory}@" -SET PLEXUS_JAVA_EXE="%JAVA_HOME%\bin\java.exe" -SET PLEXUS_CORE="%PLEXUS_HOME%\core" -SET PLEXUS_TMPDIR="%PLEXUS_HOME%\temp" -SET PLEXUS_CONF=%PLEXUS_HOME%\conf -SET CONF="%PLEXUS_CONF%\plexus.xml" -SET PLEXUS_CMD_LINE_ARGS=%CONF% %PLEXUS_CMD_LINE_ARGS% -if exist %PLEXUS_TMPDIR% goto run -mkdir "%PLEXUS_TMPDIR%" - -:run -@REM Start Plexus -%PLEXUS_JAVA_EXE% %PLEXUS_OPTS% -classpath "%PLEXUS_HOME%\core\boot\classworlds-@{classworlds.version}@.jar" -Dclassworlds.conf="%PLEXUS_HOME%\conf\classworlds.conf" -Dplexus.core=%PLEXUS_CORE% -Dplexus.system.path="%PATH%" -Djava.io.tmpdir=%PLEXUS_TMPDIR% -Dplexus.home="%PLEXUS_HOME%" org.codehaus.classworlds.Launcher %PLEXUS_CMD_LINE_ARGS% -goto end - -:end -@REM set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" goto endNT - -@REM For old DOS remove the set variables from ENV - we assume they were not set -@REM before we started - at least we don't leave any baggage around -set PLEXUS_JAVA_EXE= -SET PLEXUS_CORE= -set PLEXUS_CMD_LINE_ARGS= -SET PLEXUS_TMPDIR= -goto postExec - -:endNT -@endlocal - -:postExec -if exist "%HOME%\plexusrc_post.bat" call "%HOME%\plexusrc_post.bat" -@REM pause the batch file if PLEXUS_BATCH_PAUSE is set to 'on' -if "%PLEXUS_BATCH_PAUSE%" == "on" pause diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/org/codehaus/plexus/builder/templates/plexus.vm b/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/org/codehaus/plexus/builder/templates/plexus.vm deleted file mode 100644 index 6fd242fd5..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/main/resources/org/codehaus/plexus/builder/templates/plexus.vm +++ /dev/null @@ -1,129 +0,0 @@ -#! /bin/sh - -PLEXUS_OPTS="$PLEXUS_OPTS -Xmx@{app.max.memory}@" - -# OS specific support. $var _must_ be set to either true or false. -cygwin=false -darwin=false; -case "`uname`" in -CYGWIN*) cygwin=true;; -Darwin*) darwin=true ;; -esac - -# resolve links - $0 may be a softlink -THIS_PROG="$0" - -while [ -h "$THIS_PROG" ]; do - ls=`ls -ld "$THIS_PROG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '.*/.*' > /dev/null; then - THIS_PROG="$link" - else - THIS_PROG=`dirname "$THIS_PROG"`/"$link" - fi -done - -# Get standard environment variables -PRGDIR=`dirname "$THIS_PROG"` -PLEXUS_HOME=`cd "$PRGDIR/.." ; pwd` -PLEXUS_CONF=`cd "$PLEXUS_HOME/conf" ; pwd` -unset THIS_PROG - -if [ -z "$JAVA_HOME" ] ; then - if [ -e /etc/gentoo-release ] ; then - JAVA_HOME=`java-config --jre-home` - fi -fi - - -# Checking for JAVA_HOME is required on *nix due -# to some distributions stupidly including kaffe in /usr/bin -if [ "$JAVA_HOME" = "" ] ; then - echo "ERROR: JAVA_HOME not found in your environment." - echo - echo "Please, set the JAVA_HOME variable in your environment to match the" - echo "location of the Java Virtual Machine you want to use." - exit 1 -fi - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "$PLEXUS_HOME" ] && - PLEXUS_HOME=`cygpath --unix "$PLEXUS_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --unix "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --unix "$CLASSPATH"` -fi - -if [ -z "$PLEXUS_TMPDIR" ] ; then - PLEXUS_TMPDIR="$PLEXUS_HOME"/temp - mkdir -p "$PLEXUS_TMPDIR" -fi - -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - else - JAVACMD=java - fi -fi - -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." - echo " We cannot execute $JAVACMD" - exit -fi - -if [ -z "$JAVA_HOME" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." - echo " If build fails because sun.* classes could not be found" - echo " you will need to set the JAVA_HOME environment variable" - echo " to the installation directory of java." -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - PLEXUS_HOME=`cygpath --path --windows "$PLEXUS_HOME"` - PLEXUS_CONF=`cygpath --path --windows "$PLEXUS_CONF"` - PLEXUS_TMPDIR=`cygpath --path --windows "$PLEXUS_TMPDIR"` - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` -fi - -# For Darwin, use classes.jar for TOOLS_JAR -TOOLS_JAR="${JAVA_HOME}/lib/tools.jar" -if $darwin; then - TOOLS_JAR="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/classes.jar" -fi - -# ----- Execute The Requested Command ----------------------------------------- - -echo "Using PLEXUS_HOME: $PLEXUS_HOME" -echo "Using PLEXUS_CONF: $PLEXUS_CONF" -echo "Using PLEXUS_TMPDIR: $PLEXUS_TMPDIR" -echo "Using JAVA_HOME: $JAVA_HOME" - -if [ "$1" = "" ] -then - CONF="${PLEXUS_CONF}/plexus.xml" -else - CONF="$1" -fi - -MAIN_CLASS=org.codehaus.classworlds.Launcher - -exec "$JAVACMD" \ - $PLEXUS_OPTS \ - -classpath "${PLEXUS_HOME}"/core/boot/classworlds-*.jar \ - -Dclassworlds.conf="${PLEXUS_HOME}/conf/classworlds.conf" \ - -Dplexus.core="${PLEXUS_HOME}/core" \ - -Dplexus.system.path="${PATH}" \ - -Djava.io.tmpdir="${PLEXUS_TMPDIR}" \ - -Dtools.jar="$TOOLS_JAR" \ - -Dplexus.home="${PLEXUS_HOME}" \ - $MAIN_CLASS ${CONF} diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/expected-runtime/bin/plexus.bat b/plexus-appserver/plexus-appserver-runtime-builder/src/test/expected-runtime/bin/plexus.bat deleted file mode 100644 index 61fc9f009..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/expected-runtime/bin/plexus.bat +++ /dev/null @@ -1,154 +0,0 @@ -@REM ---------------------------------------------------------------------------- -@REM Plexus Start Up Batch script -@REM -@REM Required ENV vars: -@REM JAVA_HOME - location of a JDK home dir -@REM PLEXUS_HOME - location of Plexus installed home dir -@REM -@REM Optional ENV vars -@REM PLEXUS_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands -@REM PLEXUS_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending -@REM PLEXUS_OPTS - parameters passed to the Java VM when running Plexus -@REM e.g. to debug Plexus itself, use -@REM set PLEXUS_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -@REM -@REM Utility rquirements: -@REM Windows' find.exe -@REM Windows' cmd.exe (NT) OR command.com ( 98 or ME ) -@REM ---------------------------------------------------------------------------- -set PLEXUS_HOME= -set CLASSWORLDS_VERSION=1.1-SNAPSHOT -set MAIN_CLASS=org.codehaus.classworlds.Launcher -set PLEXUS_OPTS="-Xmx128m" - -@REM Begin all REM lines with '@' in case PLEXUS_BATCH_ECHO is 'on' -@REM echo on -@REM enable echoing my setting PLEXUS_BATCH_ECHO to 'on' -if "%PLEXUS_BATCH_ECHO%" == "on" echo %PLEXUS_BATCH_ECHO% - -@REM Execute a user defined script before this one -if exist "%HOME%\plexusrc_pre.bat" call "%HOME%\plexusrc_pre.bat" - -@REM set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" @setlocal - -@REM For Windows NT, use cmd.exe to execute the "CD" later -@REM For Win 98ME, use comand.com - if neither is found , default to use -@REM cmd.exe in the path and hope we'll hit a Win version of it -@REM FYI: Using command.com on Win NT causes "Parameter format not correct" error -set PLEXUS_COMMAND_COM="cmd.exe" -if exist "%SystemRoot%\system32\cmd.exe" set PLEXUS_COMMAND_COM="%SystemRoot%\system32\cmd.exe" -if exist "%SystemRoot%\command.com" set PLEXUS_COMMAND_COM="%SystemRoot%\command.com" - -@REM Use explicit find.exe to prevent cygwin and others find.exe from being -@REM used instead - we use this to test dir existance in a cross-win-platform way -set PLEXUS_FIND_EXE="find.exe" -if exist "%SystemRoot%\system32\find.exe" set PLEXUS_FIND_EXE="%SystemRoot%\system32\find.exe" -if exist "%SystemRoot%\command\find.exe" set PLEXUS_FIND_EXE="%SystemRoot%\command\find.exe" - -@REM ==== START VALIDATION ==== -if not "%JAVA_HOME%" == "" goto OkJHome - -echo. -echo ERROR: JAVA_HOME not found in your environment. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation -echo. -goto end - -:OkJHome -%PLEXUS_COMMAND_COM% /C DIR "%JAVA_HOME%" 2>&1 | %PLEXUS_FIND_EXE% /I /C "%JAVA_HOME%" >nul -if not errorlevel 1 goto chkMHome - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory. -echo JAVA_HOME = %JAVA_HOME% -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation -echo. -goto end - -:chkMHome -if not "%PLEXUS_HOME%"=="" goto valMHome - -echo. -echo ERROR: PLEXUS_HOME not found in your environment. -echo Please set the PLEXUS_HOME variable in your environment to match the -echo location of the Plexus installation -echo. -goto end - -:valMHome -%PLEXUS_COMMAND_COM% /C DIR "%PLEXUS_HOME%" 2>&1 | %PLEXUS_FIND_EXE% /I /C "%PLEXUS_HOME%" >nul -if not errorlevel 1 goto init - -echo. -echo ERROR: PLEXUS_HOME is set to an invalid directory. -echo PLEXUS_HOME = %PLEXUS_HOME% -echo Please set the PLEXUS_HOME variable in your environment to match the -echo location of the Plexus installation -echo. -goto end -@REM ==== END VALIDATION ==== - -:init -@REM Decide how to startup depending on the version of windows - -@REM -- Win98ME -if NOT "%OS%"=="Windows_NT" goto Win9xArg - -@REM -- 4NT shell -if "%eval[2+2]" == "4" goto 4NTArgs - -@REM -- Regular WinNT shell -set PLEXUS_CMD_LINE_ARGS=%* -goto endInit - -@REM The 4NT Shell from jp software -:4NTArgs -set PLEXUS_CMD_LINE_ARGS=%$ -goto endInit - -:Win9xArg -@REM Slurp the command line arguments. This loop allows for an unlimited number -@REM of agruments (up to the command line limit, anyway). -set PLEXUS_CMD_LINE_ARGS= -:Win9xApp -if %1a==a goto endInit -set PLEXUS_CMD_LINE_ARGS=%PLEXUS_CMD_LINE_ARGS% %1 -shift -goto Win9xApp - -@REM Reaching here means variables are defined and arguments have been captured -:endInit -SET PLEXUS_DEFAULT_OPTS="-Xmx160m" -SET PLEXUS_JAVA_EXE="%JAVA_HOME%\bin\java.exe" -SET PLEXUS_ENDORSED="-Djava.endorsed.dirs=%JAVA_HOME%\lib\endorsed;%PLEXUS_HOME%\lib\endorsed" - -@REM Start PLEXUS -%PLEXUS_JAVA_EXE% "-Dplexus.home=%PLEXUS_HOME%" "-Dtools.jar=%JAVA_HOME%\lib\tools.jar" %PLEXUS_DEFAULT_OPTS% %PLEXUS_OPTS% -classpath %PLEXUS_CLASSPATH% %PLEXUS_MAIN_CLASS% %PLEXUS_CMD_LINE_ARGS% $PLEXUS_OPTS -classpath %PLEXUS_HOME%\lib\classworlds-%CLASSWORLDS_VERSION%.jar -Dclassworlds.conf=%PLEXUS_HOME%\conf\classworlds.conf -Dplexus.core=%PLEXUS_HOME%\core -Dtools.jar=$TOOLS_JAR -Dplexus.home=%PLEXUS_HOME% org.codehaus.classworlds.Launcher %PLEXUS_HOME%\conf\plexus.conf - - -:end -@REM set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" goto endNT - -@REM For old DOS remove the set variables from ENV - we assume they were not set -@REM before we started - at least we don't leave any baggage around -set PLEXUS_COMMAND_COM= -set PLEXUS_FIND_EXE= -set PLEXUS_DEFAULT_OPTS= -set PLEXUS_JAVA_EXE= -set PLEXUS_CLASSPATH= -set PLEXUS_MAIN_CLASS= -set PLEXUS_CMD_LINE_ARGS= -SET PLEXUS_ENDORSED= -goto postExec - -:endNT -@endlocal - -:postExec -@REM if exist "%HOME%\plexusrc_post.bat" call "%HOME%\plexusrc_post.bat" -@REM pause the batch file if PLEXUS_BATCH_PAUSE is set to 'on' -@REM if "%PLEXUS_BATCH_PAUSE%" == "on" pause diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/expected-runtime/bin/plexus.sh b/plexus-appserver/plexus-appserver-runtime-builder/src/test/expected-runtime/bin/plexus.sh deleted file mode 100755 index 1935b6bb6..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/expected-runtime/bin/plexus.sh +++ /dev/null @@ -1,122 +0,0 @@ -#! /bin/sh - -PLEXUS_OPTS="-Xmx128m" - -# OS specific support. $var _must_ be set to either true or false. -cygwin=false -darwin=false; -case "`uname`" in -CYGWIN*) cygwin=true;; -Darwin*) darwin=true ;; -esac - -# resolve links - $0 may be a softlink -THIS_PROG="$0" - -while [ -h "$THIS_PROG" ]; do - ls=`ls -ld "$THIS_PROG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '.*/.*' > /dev/null; then - THIS_PROG="$link" - else - THIS_PROG=`dirname "$THIS_PROG"`/"$link" - fi -done - -# Get standard environment variables -PRGDIR=`dirname "$THIS_PROG"` -PLEXUS_HOME=`cd "$PRGDIR/.." ; pwd` -PLEXUS_CONF=`cd "$PLEXUS_HOME/conf" ; pwd` -unset THIS_PROG - - -# Checking for JAVA_HOME is required on *nix due -# to some distributions stupidly including kaffe in /usr/bin -if [ "$JAVA_HOME" = "" ] ; then - echo "ERROR: JAVA_HOME not found in your environment." - echo - echo "Please, set the JAVA_HOME variable in your environment to match the" - echo "location of the Java Virtual Machine you want to use." - exit 1 -fi - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "$PLEXUS_HOME" ] && - PLEXUS_HOME=`cygpath --unix "$PLEXUS_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --unix "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --unix "$CLASSPATH"` -fi - -if [ -z "$PLEXUS_TMPDIR" ] ; then - PLEXUS_TMPDIR="$PLEXUS_HOME"/temp - mkdir -p "$PLEXUS_TMPDIR" -fi - -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - else - JAVACMD=java - fi -fi - -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." - echo " We cannot execute $JAVACMD" - exit -fi - -if [ -z "$JAVA_HOME" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." - echo " If build fails because sun.* classes could not be found" - echo " you will need to set the JAVA_HOME environment variable" - echo " to the installation directory of java." -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - PLEXUS_HOME=`cygpath --path --windows "$PLEXUS_HOME"` - PLEXUS_CONF=`cygpath --path --windows "$PLEXUS_CONF"` - PLEXUS_TMPDIR=`cygpath --path --windows "$PLEXUS_TMPDIR"` - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` -fi - -# For Darwin, use classes.jar for TOOLS_JAR -TOOLS_JAR="${JAVA_HOME}/lib/tools.jar" -if $darwin; then - TOOLS_JAR="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/classes.jar" -fi - -# ----- Execute The Requested Command ----------------------------------------- - -echo "Using PLEXUS_HOME: $PLEXUS_HOME" -echo "Using PLEXUS_CONF: $PLEXUS_CONF" -echo "Using PLEXUS_TMPDIR: $PLEXUS_TMPDIR" -echo "Using JAVA_HOME: $JAVA_HOME" - -if [ "$1" = "" ] -then - CONF=${PLEXUS_CONF}/plexus.conf -else - CONF=$1 -fi - -MAIN_CLASS=org.codehaus.classworlds.Launcher - -$JAVACMD \ - $PLEXUS_OPTS \ - -classpath ${PLEXUS_HOME}/core/boot/classworlds-*.jar \ - -Dclassworlds.conf=${PLEXUS_HOME}/conf/classworlds.conf \ - -Dplexus.core=${PLEXUS_HOME}/core \ - -Djava.io.tmpdir=${PLEXUS_TMPDIR} \ - -Dtools.jar=$TOOLS_JAR \ - -Dplexus.home=${PLEXUS_HOME} \ - $MAIN_CLASS ${CONF} diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/expected-runtime/conf/classworlds.conf b/plexus-appserver/plexus-appserver-runtime-builder/src/test/expected-runtime/conf/classworlds.conf deleted file mode 100644 index 609db18d3..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/expected-runtime/conf/classworlds.conf +++ /dev/null @@ -1,4 +0,0 @@ -main is org.codehaus.plexus.PlexusContainerHost from plexus.core - -[plexus.core] - load ${plexus.core}/*.jar diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/expected-runtime/conf/plexus.conf b/plexus-appserver/plexus-appserver-runtime-builder/src/test/expected-runtime/conf/plexus.conf deleted file mode 100644 index 1e286015b..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/expected-runtime/conf/plexus.conf +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/expected-runtime/conf/wrapper.conf b/plexus-appserver/plexus-appserver-runtime-builder/src/test/expected-runtime/conf/wrapper.conf deleted file mode 100644 index f8db4244d..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/expected-runtime/conf/wrapper.conf +++ /dev/null @@ -1,82 +0,0 @@ -#******************************************************************** -# Wrapper Properties -#******************************************************************** -# Java Application -wrapper.java.command=java - -# Java Main class -wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp - -# Java Classpath (include wrapper.jar) Add class path elements as -# needed starting from 1 -wrapper.java.classpath.1=../../plexus-lib/wrapper.jar -wrapper.java.classpath.2=../../plexus-lib/classworlds-1.1-SNAPSHOT.jar - -# Java Library Path (location of Wrapper.DLL or libwrapper.so) -wrapper.java.library.path.1=. - -# Java Additional Parameters -wrapper.java.additional.1=-Dlib=../../plexus-lib -wrapper.java.additional.2=-Dplexus.home=../../ -wrapper.java.additional.3=-Dclassworlds.conf=../../conf/classworlds.conf - -# Initial Java Heap Size (in MB) -wrapper.java.initmemory=3 - -# Maximum Java Heap Size (in MB) -wrapper.java.maxmemory=64 - -# Application parameters. Add parameters as needed starting from 1 -wrapper.app.parameter.1=org.codehaus.classworlds.Launcher -wrapper.app.parameter.2=../../conf/plexus.conf - -# Port which the native wrapper code will attempt to connect to -wrapper.port=1777 - -#******************************************************************** -# Wrapper Logging Properties -#******************************************************************** -# Format of output for the console. (See docs for formats) -wrapper.console.format=PM - -# Log Level for console output. (See docs for log levels) -wrapper.console.loglevel=INFO - -# Log file to use for wrapper output logging. -wrapper.logfile=../../logs/wrapper.log - -# Format of output for the log file. (See docs for formats) -wrapper.logfile.format=LPTM - -# Log Level for log file output. (See docs for log levels) -wrapper.logfile.loglevel=INFO - -# Maximum size that the log file will be allowed to grow to before -# the log is rolled. Size is specified in bytes. The default value -# of 0, disables log rolling. May abbreviate with the 'k' (kb) or -# 'm' (mb) suffix. For example: 10m = 10 megabytes. -wrapper.logfile.maxsize=0 - -# Maximum number of rolled log files which will be allowed before old -# files are deleted. The default value of 0 implies no limit. -wrapper.logfile.maxfiles=0 - -# Log Level for sys/event log output. (See docs for log levels) -wrapper.syslog.loglevel=NONE - -#******************************************************************** -# Wrapper NT Service Properties -#******************************************************************** -# WARNING - Do not modify any of these properties when an application -# using this configuration file has been installed as a service. -# Please uninstall the service before modifying this section. The -# service can then be reinstalled. - -# Name of the service -wrapper.ntservice.name=@app.ntservice.name@ - -# Display name of the service -wrapper.ntservice.displayname=@app.ntservice.displayname@ - -# Description of the service -wrapper.ntservice.description=@app.ntservice.description@ \ No newline at end of file diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/java/org/codehaus/plexus/builder/runtime/PlexusRuntimeBuilderTest.java b/plexus-appserver/plexus-appserver-runtime-builder/src/test/java/org/codehaus/plexus/builder/runtime/PlexusRuntimeBuilderTest.java deleted file mode 100644 index f99df82e5..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/java/org/codehaus/plexus/builder/runtime/PlexusRuntimeBuilderTest.java +++ /dev/null @@ -1,124 +0,0 @@ -package org.codehaus.plexus.builder.runtime; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.factory.ArtifactFactory; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.repository.ArtifactRepositoryFactory; -import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.util.FileUtils; -import org.codehaus.plexus.util.PropertyUtils; - -import java.io.File; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Properties; -import java.util.Set; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class PlexusRuntimeBuilderTest - extends PlexusTestCase -{ - private ArtifactFactory artifactFactory; - - protected void setUp() - throws Exception - { - super.setUp(); - - artifactFactory = (ArtifactFactory) lookup( ArtifactFactory.ROLE ); - } - - public void testRuntimeBuilder() - throws Exception - { - PlexusRuntimeBuilder runtimeBuilder = (PlexusRuntimeBuilder) lookup( PlexusRuntimeBuilder.ROLE ); - - ArtifactRepositoryFactory artifactRepositoryFactory = - (ArtifactRepositoryFactory) lookup( ArtifactRepositoryFactory.ROLE ); - - // ---------------------------------------------------------------------- - // Clean the output directory - // ---------------------------------------------------------------------- - - File workingDirectory = getTestFile( "target/test-runtime" ); - - FileUtils.deleteDirectory( workingDirectory ); - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - List remoteRepositories = new ArrayList(); - - ArtifactRepositoryLayout repositoryLayout = - (ArtifactRepositoryLayout) lookup( ArtifactRepositoryLayout.ROLE, "legacy" ); - - ArtifactRepository localRepository = artifactRepositoryFactory.createArtifactRepository( "local", "file://" + - getTestFile( "src/test/repository" ).getAbsolutePath(), repositoryLayout ); - - Set projectArtifacts = new HashSet(); - - projectArtifacts.add( makeArtifact( "classworlds", "classworlds", "1.1-alpha-1" ) ); - projectArtifacts.add( makeArtifact( "org.codehaus.plexus", "plexus-container-default", "1.0-alpha-7" ) ); - projectArtifacts.add( makeArtifact( "plexus", "plexus-container-artifact", "1.0-alpha-2" ) ); - projectArtifacts.add( makeArtifact( "org.codehaus.plexus", "plexus-appserver-host", "1.0" ) ); - projectArtifacts.add( makeArtifact( "org.codehaus.plexus", "plexus-utils", "1.0.4" ) ); - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - File plexusConfiguration = getTestFile( "src/test/resources/conf/plexus.xml" ); - - File configurationPropertiesFile = getTestFile( "src/test/resources/configuration.properties" ); - - Properties configurationProperties = PropertyUtils.loadProperties( configurationPropertiesFile ); - - runtimeBuilder.build( workingDirectory, remoteRepositories, localRepository, projectArtifacts, - Collections.EMPTY_SET, plexusConfiguration, configurationProperties, false ); - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - private Artifact makeArtifact( String groupId, String artifactId, String version ) - { - Artifact artifact = artifactFactory.createBuildArtifact( groupId, artifactId, version, "jar" ); - - artifact.setFile( - getTestFile( "src/test/repository/" + groupId + "/jars/" + artifactId + "-" + version + ".jar" ) ); - - return artifact; - } -} diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/project/project.xml b/plexus-appserver/plexus-appserver-runtime-builder/src/test/project/project.xml deleted file mode 100644 index 5c2d62dc5..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/project/project.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - 4.0.0 - plexus - plexus-runtime-builder-test-project - Plexus Runtime Builder Test Project - 2.0-SNAPSHOT - - - plexus - plexus - 0.14-SNAPSHOT - - - group1 - artifact1 - 2.0 - - - group2 - artifact2 - 1.0 - - - diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/classworlds/jars/classworlds-1.1-alpha-1.jar b/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/classworlds/jars/classworlds-1.1-alpha-1.jar deleted file mode 100644 index fb541ac9b..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/classworlds/jars/classworlds-1.1-alpha-1.jar +++ /dev/null @@ -1 +0,0 @@ -classworlds-classworlds-1.1-SNAPSHOT diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/classworlds/jars/classworlds-1.1-alpha-2-SNAPSHOT.jar b/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/classworlds/jars/classworlds-1.1-alpha-2-SNAPSHOT.jar deleted file mode 100644 index fb541ac9b..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/classworlds/jars/classworlds-1.1-alpha-2-SNAPSHOT.jar +++ /dev/null @@ -1 +0,0 @@ -classworlds-classworlds-1.1-SNAPSHOT diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/classworlds/poms/classworlds-1.1-alpha-2-SNAPSHOT.pom b/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/classworlds/poms/classworlds-1.1-alpha-2-SNAPSHOT.pom deleted file mode 100644 index 6e8d38bb8..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/classworlds/poms/classworlds-1.1-alpha-2-SNAPSHOT.pom +++ /dev/null @@ -1,7 +0,0 @@ - - 4.0.0 - classworlds - classworlds - jar - 1.0 - \ No newline at end of file diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/group1/jars/artifact1-2.0.jar b/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/group1/jars/artifact1-2.0.jar deleted file mode 100644 index 1e9bd86ef..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/group1/jars/artifact1-2.0.jar +++ /dev/null @@ -1 +0,0 @@ -group1-artifact1-2.0 diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/group1/poms/artifact1-2.0.pom b/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/group1/poms/artifact1-2.0.pom deleted file mode 100644 index 0a7eb155b..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/group1/poms/artifact1-2.0.pom +++ /dev/null @@ -1,23 +0,0 @@ - - 4.0.0 - group1 - artifact1 - jar - 2.0 - - - plexus - plexus-container-default - 1.0-alpha-2-SNAPSHOT - jar - compile - - - group3 - artifact3 - 1.0 - jar - compile - - - \ No newline at end of file diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/group2/foos/artifact2-1.0.foo b/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/group2/foos/artifact2-1.0.foo deleted file mode 100644 index bec79cd1f..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/group2/foos/artifact2-1.0.foo +++ /dev/null @@ -1 +0,0 @@ -group2-artifact2-1.0 diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/group2/jars/artifact2-1.0.jar b/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/group2/jars/artifact2-1.0.jar deleted file mode 100644 index bec79cd1f..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/group2/jars/artifact2-1.0.jar +++ /dev/null @@ -1 +0,0 @@ -group2-artifact2-1.0 diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/group2/poms/artifact2-1.0.pom b/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/group2/poms/artifact2-1.0.pom deleted file mode 100644 index c6da3aaf3..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/group2/poms/artifact2-1.0.pom +++ /dev/null @@ -1,7 +0,0 @@ - - 4.0.0 - group2 - artifact2 - jar - 1.0 - \ No newline at end of file diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/group3/jars/artifact3-1.0.jar b/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/group3/jars/artifact3-1.0.jar deleted file mode 100644 index 4f8efe9bb..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/group3/jars/artifact3-1.0.jar +++ /dev/null @@ -1 +0,0 @@ -group3-artifact3-1.0 diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/group3/poms/artifact3-1.0.pom b/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/group3/poms/artifact3-1.0.pom deleted file mode 100644 index 40c8661c8..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/group3/poms/artifact3-1.0.pom +++ /dev/null @@ -1,7 +0,0 @@ - - 4.0.0 - group3 - artifact3 - jar - 1.0 - \ No newline at end of file diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/org.codehaus.plexus/jars/plexus-appserver-1.0-alpha-5-SNAPSHOT.jar b/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/org.codehaus.plexus/jars/plexus-appserver-1.0-alpha-5-SNAPSHOT.jar deleted file mode 100644 index 2985220e2..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/org.codehaus.plexus/jars/plexus-appserver-1.0-alpha-5-SNAPSHOT.jar +++ /dev/null @@ -1 +0,0 @@ -plexus-plexus-0.14-SNAPSHOT diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/org.codehaus.plexus/jars/plexus-appserver-host-1.0.jar b/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/org.codehaus.plexus/jars/plexus-appserver-host-1.0.jar deleted file mode 100644 index 2985220e2..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/org.codehaus.plexus/jars/plexus-appserver-host-1.0.jar +++ /dev/null @@ -1 +0,0 @@ -plexus-plexus-0.14-SNAPSHOT diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/org.codehaus.plexus/jars/plexus-container-default-1.0-alpha-7.jar b/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/org.codehaus.plexus/jars/plexus-container-default-1.0-alpha-7.jar deleted file mode 100644 index 2985220e2..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/org.codehaus.plexus/jars/plexus-container-default-1.0-alpha-7.jar +++ /dev/null @@ -1 +0,0 @@ -plexus-plexus-0.14-SNAPSHOT diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/org.codehaus.plexus/jars/plexus-utils-1.0.4.jar b/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/org.codehaus.plexus/jars/plexus-utils-1.0.4.jar deleted file mode 100644 index 2985220e2..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/org.codehaus.plexus/jars/plexus-utils-1.0.4.jar +++ /dev/null @@ -1 +0,0 @@ -plexus-plexus-0.14-SNAPSHOT diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/org.codehaus.plexus/poms/plexus-appserver-1.0-alpha-5-SNAPSHOT.pom b/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/org.codehaus.plexus/poms/plexus-appserver-1.0-alpha-5-SNAPSHOT.pom deleted file mode 100644 index 4081d711c..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/org.codehaus.plexus/poms/plexus-appserver-1.0-alpha-5-SNAPSHOT.pom +++ /dev/null @@ -1,24 +0,0 @@ - - 4.0.0 - plexus - plexus - jar - Plexus - 0.14-SNAPSHOT - - - plexus - plexus-dependency - 1.0 - jar - compile - - - classworlds - classworlds - 1.1-alpha-2-SNAPSHOT - jar - compile - - - \ No newline at end of file diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/org.codehaus.plexus/poms/plexus-container-default-1.0-alpha-7.pom b/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/org.codehaus.plexus/poms/plexus-container-default-1.0-alpha-7.pom deleted file mode 100644 index 1d64bc866..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/org.codehaus.plexus/poms/plexus-container-default-1.0-alpha-7.pom +++ /dev/null @@ -1,47 +0,0 @@ - - - plexus-containers - plexus - 1.0.2 - - 4.0.0 - org.codehaus.plexus - plexus-container-default - Default Plexus Container - 1.0-alpha-7 - - - - maven-surefire-plugin - 2.0-beta-1 - - - **/Test*.java - **/Abstract*.java - - - - - - - - junit - junit - 3.8.1 - compile - - - plexus - plexus-utils - 1.0.2 - - - classworlds - classworlds - 1.1-alpha-2 - - - - deployed - - \ No newline at end of file diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/org.codehaus.plexus/poms/plexus-utils-1.0.4.pom b/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/org.codehaus.plexus/poms/plexus-utils-1.0.4.pom deleted file mode 100644 index 4081d711c..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/org.codehaus.plexus/poms/plexus-utils-1.0.4.pom +++ /dev/null @@ -1,24 +0,0 @@ - - 4.0.0 - plexus - plexus - jar - Plexus - 0.14-SNAPSHOT - - - plexus - plexus-dependency - 1.0 - jar - compile - - - classworlds - classworlds - 1.1-alpha-2-SNAPSHOT - jar - compile - - - \ No newline at end of file diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/plexus/jars/plexus-container-artifact-1.0-alpha-2.jar b/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/plexus/jars/plexus-container-artifact-1.0-alpha-2.jar deleted file mode 100644 index 2985220e2..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/plexus/jars/plexus-container-artifact-1.0-alpha-2.jar +++ /dev/null @@ -1 +0,0 @@ -plexus-plexus-0.14-SNAPSHOT diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/plexus/jars/plexus-dependency-1.0.jar b/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/plexus/jars/plexus-dependency-1.0.jar deleted file mode 100644 index 036771eab..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/plexus/jars/plexus-dependency-1.0.jar +++ /dev/null @@ -1 +0,0 @@ -plexus-plexus-dependency-1.0 diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/plexus/jars/plexus-runtime-builder-test-project-2.0-SNAPSHOT.jar b/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/plexus/jars/plexus-runtime-builder-test-project-2.0-SNAPSHOT.jar deleted file mode 100644 index ba14ef40e..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/plexus/jars/plexus-runtime-builder-test-project-2.0-SNAPSHOT.jar +++ /dev/null @@ -1 +0,0 @@ -plexus-plexus-runtime-builder-test-project-2.0-SNAPSHOT diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/plexus/poms/plexus-container-artifact-1.0-alpha-2.pom b/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/plexus/poms/plexus-container-artifact-1.0-alpha-2.pom deleted file mode 100644 index 423a8e279..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/plexus/poms/plexus-container-artifact-1.0-alpha-2.pom +++ /dev/null @@ -1,24 +0,0 @@ - - 4.0.0 - plexus - plexus - jar - Plexus - 0.14-SNAPSHOT - - - plexus - plexus-dependency - 1.0 - jar - compile - - - classworlds - classworlds - 1.1-alpha-2-SNAPSHOT - jar - compile - - - \ No newline at end of file diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/plexus/poms/plexus-dependency-1.0.pom b/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/plexus/poms/plexus-dependency-1.0.pom deleted file mode 100644 index c0cc1b755..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/repository/plexus/poms/plexus-dependency-1.0.pom +++ /dev/null @@ -1,7 +0,0 @@ - - 4.0.0 - plexus - plexus-dependency - jar - 1.0 - \ No newline at end of file diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/resources/conf/plexus.xml b/plexus-appserver/plexus-appserver-runtime-builder/src/test/resources/conf/plexus.xml deleted file mode 100644 index 1e286015b..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/resources/conf/plexus.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/resources/configuration.properties b/plexus-appserver/plexus-appserver-runtime-builder/src/test/resources/configuration.properties deleted file mode 100644 index 7aeacaff1..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/resources/configuration.properties +++ /dev/null @@ -1,19 +0,0 @@ -role = printer - -host = localhost -port = 8080 - -password.file = ${ebxmlms.plexus.home}/conf/msh_password -hermes.url = http://localhost:8080/msh/ -transport.type = http - -xmlrpc.port = 9080 - -tpi = ${plexus.home}/conf/tpi.xml -id = 0 -san = 000-0000 -name = printer - -app.name=test app -app.long.name=Plexus Test Application -app.description=Hey yo! \ No newline at end of file diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/resources/plexus-component.manifest b/plexus-appserver/plexus-appserver-runtime-builder/src/test/resources/plexus-component.manifest deleted file mode 100644 index b2ad73ae7..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/resources/plexus-component.manifest +++ /dev/null @@ -1,12 +0,0 @@ -org.apache.plexus.velocity.DefaultVelocityComponent = plexus-velocity-1.0-alpha-5 -org.apache.plexus.summit.Summit = plexus-summit-1.0-alpha-5 -org.apache.plexus.summit.activity.DefaultActionEventService = plexus-activity-1.0-alpha-5 -org.apache.plexus.jcs.DefaultJCSComponent = plexus-jcs-1.0-alpha-5 -org.apache.plexus.jetty.JettyServletContainer = plexus-jetty-1.0-alpha-5 -org.apache.plexus.persister.OjbPersister = plexus-persister-1.0-alpha-5 -org.apache.plexus.summit.pull.DefaultPullService = plexus-pull-1.0-alpha-5 -org.apache.plexus.service.repository.factory.python.PythonComponentFactory = plexus-python-factory-1.0-alpha-5 -org.apache.plexus.scheduler.DefaultScheduler = plexus-scheduler-1.0-alpha-5 -org.apache.plexus.workflow.DefaultWfms = plexus-workflow-1.0-alpha-5 -org.apache.plexus.xmlrpc.DefaultXmlRpcComponent = plexus-xmlrpc-1.0-alpha-5 -org.apache.plexus.service.repository.factory.bsh.BshComponentFactory = plexus-bsh-factory-1.0-alpha-5 diff --git a/plexus-appserver/plexus-appserver-runtime-builder/src/test/resources/printer.properties b/plexus-appserver/plexus-appserver-runtime-builder/src/test/resources/printer.properties deleted file mode 100644 index 9b1162bf5..000000000 --- a/plexus-appserver/plexus-appserver-runtime-builder/src/test/resources/printer.properties +++ /dev/null @@ -1,15 +0,0 @@ -role = printer - -host = localhost -port = 8080 - -password.file = ${ebxmlms.plexus.home}/conf/msh_password -hermes.url = http://localhost:8080/msh/ -transport.type = http - -xmlrpc.port = 9080 - -tpi = ${plexus.home}/conf/tpi.xml -id = 0 -san = 000-0000 -name = printer diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/pom.xml b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/pom.xml deleted file mode 100644 index cf7552716..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/pom.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - plexus-appserver-services - org.codehaus.plexus - 2.0-alpha-4-SNAPSHOT - - 4.0.0 - plexus-appserver-service-jetty - plexus-service - Plexus Jetty Service - - - - org.codehaus.plexus - plexus-appserver-maven-plugin - true - - jetty - src/conf/plexus.xml - - - - - - - - ant - ant - 1.6.2 - - - jetty - org.mortbay.jetty - 5.1.10 - - - tomcat - jasper-compiler - 5.5.15 - - - tomcat - jasper-runtime - 5.5.15 - - - javax.servlet - servlet-api - 2.4 - - - javax.servlet - jsp-api - 2.0 - - - commons-el - commons-el - 1.0 - runtime - - - log4j - log4j - - - commons-logging - commons-logging - - - logkit - logkit - - - - - - jetty - org.mortbay.jetty.plus - 5.1.10 - - - commons-logging - commons-logging-api - 1.0.4 - test - - - org.apache.derby - derby - 10.1.3.1 - test - - - diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/conf/plexus.xml b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/conf/plexus.xml deleted file mode 100644 index 3c102197b..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/conf/plexus.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - org.codehaus.plexus.appserver.service.PlexusService - jetty - - - diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/AbstractJettyServletContainer.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/AbstractJettyServletContainer.java deleted file mode 100644 index 604fea365..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/AbstractJettyServletContainer.java +++ /dev/null @@ -1,549 +0,0 @@ -package org.codehaus.plexus.jetty; - -/* - * The MIT License - * - * Copyright (c) 2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable; -import org.codehaus.plexus.jetty.configuration.ProxyHttpListener; -import org.codehaus.plexus.jetty.configuration.Webapp; -import org.codehaus.plexus.jetty.configuration.WebContext; -import org.codehaus.plexus.jetty.configuration.ServletContext; -import org.codehaus.plexus.jetty.configuration.InitParameter; -import org.codehaus.plexus.DefaultPlexusContainer; -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.util.FileUtils; -import org.codehaus.classworlds.ClassRealm; -import org.mortbay.http.HttpContext; -import org.mortbay.http.HttpListener; -import org.mortbay.http.handler.ResourceHandler; -import org.mortbay.util.InetAddrPort; -import org.mortbay.jetty.servlet.ServletHttpContext; -import org.mortbay.jetty.servlet.ServletHolder; -import org.mortbay.jetty.servlet.WebApplicationContext; -import org.mortbay.jetty.Server; - -import java.io.File; -import java.io.IOException; -import java.net.UnknownHostException; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -/** - * @author Trygve Laugstøl - * @author Jason van Zyl - * @version $Id: JettyServletContainer.java 4167 2006-09-20 20:31:27Z evenisse $ - * @todo need to be able to deploy individual servlets - * @todo could we filter web.xml files via jetty somehow? - */ -public abstract class AbstractJettyServletContainer - extends AbstractLogEnabled - implements ServletContainer, Startable -{ - protected Server server; - - protected Map httpListeners = new HashMap(); - - private Map classLoaders = new HashMap(); - - private Map classRealms = new HashMap(); - - public boolean hasContext( String contextPath ) - { - HttpContext[] contexts = server.getContexts(); - - HttpContext context; - - for ( int i = 0; i < contexts.length; i++ ) - { - context = contexts[i]; - - if ( context.getContextPath().equals( contextPath ) ) - { - return true; - } - } - - return false; - } - - public void addListener( org.codehaus.plexus.jetty.configuration.HttpListener listener ) - throws ServletContainerException, UnknownHostException - { - if ( isPortRegistered( listener ) ) - { - updatePort( listener ); - } - else - { - InetAddrPort addrPort = new InetAddrPort( listener.getHost(), listener.getPort() ); - - try - { - HttpListener httpListener = server.addListener( addrPort ); - - registerPort( listener, httpListener ); - - httpListener.start(); - } - catch ( IOException e ) - { - throw new ServletContainerException( "Error while adding httpListener on address: '" + listener.getHost() + - "', port: " + listener.getPort() + ".", e ); - } - catch ( Exception e ) - { - throw new ServletContainerException( "Error while starting httpListener on address: '" + - listener.getHost() + "', port: " + listener.getPort() + ".", e ); - } - } - } - - public void addProxyListener( ProxyHttpListener listener ) - throws ServletContainerException, UnknownHostException - { - if ( isPortRegistered( listener ) ) - { - updatePort( listener ); - } - else - { - InetAddrPort addrPort = new InetAddrPort( listener.getHost(), listener.getPort() ); - - JettyProxyHttpListener proxyListener = new JettyProxyHttpListener( addrPort ); - - proxyListener.setForcedHost( listener.getProxyHost() + ":" + listener.getProxyPort() ); - - server.addListener( proxyListener ); - - registerPort( listener, proxyListener ); - - try - { - proxyListener.start(); - } - catch ( Exception e ) - { - throw new ServletContainerException( "Error while starting proxyListener on address: '" + - listener.getHost() + "', port: " + listener.getPort() + ".", e ); - } - } - } - - public void removeListener( org.codehaus.plexus.jetty.configuration.HttpListener listener ) - throws ServletContainerException - { - String port = Integer.toString( listener.getPort() ); - - if ( httpListeners.containsKey( port ) ) - { - HttpListenerReference httpListenerReference = ( HttpListenerReference ) httpListeners.get( port ); - - if ( httpListenerReference.decrement().getRefCount() <= 0 ) - { - ListenerStopThread stopThread = new ListenerStopThread( server, - httpListenerReference.getListener() ); - - try - { - httpListeners.remove( port ); - stopThread.start(); - } - catch ( Exception ex ) - { - getLogger().info( "Error Stopping Http Listener", ex ); - } - } - } - } - - public void deployWarDirectory( File directory, DefaultPlexusContainer container, Webapp webapp ) - throws ServletContainerException - { - deployWAR( directory, false, null, container, webapp ); - } - - public void startApplication( String contextPath ) - throws ServletContainerException - { - try - { - HttpContext context = getContext( contextPath ); - - getLogger().info( "Starting Jetty Context " + contextPath ); - - context.start(); - } - catch ( Exception e ) - { - throw new ServletContainerException( "Error while starting the context " + contextPath, e ); - } - } - - public void stopApplication( String contextPath ) - throws ServletContainerException - { - try - { - HttpContext context = getContext( contextPath ); - - getLogger().info( "Starting Jetty Context " + contextPath ); - - context.stop( true ); - } - catch ( Exception e ) - { - throw new ServletContainerException( "Error while stopping the context " + contextPath, e ); - } - } - - public void deployContext( WebContext webContext ) - throws ServletContainerException - { - if ( hasContext( webContext.getContext() ) ) - { - return; - } - - HttpContext context = new HttpContext(); - - context.setContextPath( webContext.getContext() ); - - context.setResourceBase( webContext.getPath() ); - - // This will setup a standard resource handler for document retrieval. If you want more - // functionality like POST, or WebDAV type stuff that will need to be configurable. - context.addHandler( new ResourceHandler() ); - - addContext( context ); - } - - public void deployServletContext( ServletContext servletContext ) - throws ServletContainerException - { - if ( hasContext( servletContext.getContext() ) ) - { - return; - } - - ServletHttpContext context = new ServletHttpContext(); - - context.setContextPath( servletContext.getContext() ); - - try - { - ServletHolder servletHolder = - context.addServlet( servletContext.getName(), servletContext.getPath(), servletContext.getServlet() ); - - // ---------------------------------------------------------------------------- - // Setup any init parameters - // ---------------------------------------------------------------------------- - - if ( servletContext.getInitParameters() != null ) - { - for ( Iterator i = servletContext.getInitParameters().iterator(); i.hasNext(); ) - { - InitParameter param = (InitParameter) i.next(); - - String name = param.getName(); - - String value = param.getValue(); - - getLogger().info( "Setting init-param [" + name + " = " + value + "]" ); - - String directive = param.getDirective(); - - if ( directive != null ) - { - if ( directive.equals( "create-directory" ) ) - { - FileUtils.mkdir( value ); - } - } - - servletHolder.setInitParameter( name, value ); - } - } - } - catch ( ClassNotFoundException e ) - { - throw new ServletContainerException( "Cannot find the servlet " + servletContext.getServlet(), e ); - } - catch ( InstantiationException e ) - { - throw new ServletContainerException( "Cannot instantiate the servlet " + servletContext.getServlet(), e ); - } - catch ( IllegalAccessException e ) - { - throw new ServletContainerException( - "Illegal access trying to use the servlet " + servletContext.getServlet(), e ); - } - - addContext( context ); - } - - private HttpContext getContext( String contextPath ) - throws ServletContainerException - { - HttpContext[] contexts = server.getContexts(); - - HttpContext context; - - for ( int i = 0; i < contexts.length; i++ ) - { - context = contexts[i]; - - if ( context.getContextPath().equals( contextPath ) ) - { - return context; - } - } - - throw new ServletContainerException( "No such context '" + contextPath + "'." ); - } - - private void deployWAR( File war, boolean extractWar, File extractionLocation, DefaultPlexusContainer container, - Webapp webapp ) - throws ServletContainerException - { - String context = webapp.getContext(); - - String virtualHost = webapp.getVirtualHost(); - - boolean standardWebappClassloader = webapp.isStandardWebappClassloader(); - - if ( war == null ) - { - throw new ServletContainerException( "Invalid parameter: 'war' cannot be null." ); - } - - if ( context == null ) - { - throw new ServletContainerException( "Invalid parameter: 'context' cannot be null." ); - } - - // ---------------------------------------------------------------------- - // Create the web appserver - // ---------------------------------------------------------------------- - - WebApplicationContext webappContext; - - if ( !hasContext( context ) ) - { - try - { - if ( virtualHost != null ) - { - webappContext = server.addWebApplication( virtualHost, context, war.getAbsolutePath() ); - } - else - { - webappContext = server.addWebApplication( context, war.getAbsolutePath() ); - } - } - catch ( IOException e ) - { - throw new ServletContainerException( "Error while deploying WAR.", e ); - } - - // ---------------------------------------------------------------------- - // Configure the appserver context - // ---------------------------------------------------------------------- - - webappContext.setExtractWAR( extractWar ); - - if ( extractionLocation != null ) - { - webappContext.setTempDirectory( extractionLocation ); - } - - if ( standardWebappClassloader ) - { - getLogger().info( "Using standard webapp classloader for webapp." ); - -/* try - { - // We need to start the context to trigger the unpacking so that we can - // create a realm. We need to create a realm so that we can discover all - // the components in the webapp. - - ClassRealm realm = container.getContainerRealm(); -*/ -// List jars = FileUtils.getFiles( war, "**/*.jar", null ); -/* - // The webapp directory needs to be unpacked before we can pick up the files - - for ( Iterator i = jars.iterator(); i.hasNext(); ) - { - File file = (File) i.next(); - - realm.addConstituent( file.toURL() ); - } - - File webInf = new File( war, "WEB-INF" ); - - realm.addConstituent( webInf.toURL() ); - - File classes = new File( war, "WEB-INF/classes" ); - - realm.addConstituent( classes.toURL() ); - - webappContext.setClassLoader( realm.getClassLoader() ); - - classRealms.put( webapp.getContext(), realm ); - } - catch ( Exception e ) - { - throw new ServletContainerException( "Error creating webapp classloader.", e ); - } -*/ - } - else - { - // Dirty hack, need better methods for classloaders because i can set the core realm but not get it, - // or get the container realm but not set it. blah! - webappContext.setClassLoader( container.getContainerRealm().getClassLoader() ); - } - - // Save the classloader for reloads - classLoaders.put( webapp.getContext(), webappContext.getClassLoader() ); - } - else - { - webappContext = (WebApplicationContext) getContext( webapp.getContext() ); - - // We only need to reset the classloader if we're doing standard webapp loading. The stopping - // of the Jetty context seems to whack the classloader so we need to reset it. If we are - // using Plexus classloading then the classloader appears to resist the whacking. Not sure - // what's happening here but classworlds is going to take a bath shortly anyway. - if ( standardWebappClassloader ) - { - - webappContext.setClassLoader( (ClassLoader) classLoaders.get( webapp.getContext() ) ); - ClassRealm cr = (ClassRealm) classRealms.get( webapp.getContext() ); - - container.setContainerRealm( cr ); - } - } - - webappContext.getServletContext().setAttribute( PlexusConstants.PLEXUS_KEY, container ); - } - - protected HttpContext addContext( HttpContext context ) - { - return server.addContext( context ); - } - - public void clearContexts() - { - HttpContext[] contexts = server.getContexts(); - - for ( int i = 0; i < contexts.length; i++ ) - { - HttpContext context = contexts[i]; - - getLogger().info( "Removing context " + context.getContextPath() ); - - server.removeContext( context ); - } - } - - public void stop() - { - if ( server != null && server.isStarted() ) - { - while ( true ) - { - try - { - server.stop( true ); - - break; - } - catch ( InterruptedException e ) - { - continue; - } - } - - server.destroy(); - } - } - - public boolean isPortRegistered( org.codehaus.plexus.jetty.configuration.HttpListener config ) - { - return httpListeners.containsKey( Integer.toString( config.getPort() ) ); - } - - private void registerPort( org.codehaus.plexus.jetty.configuration.HttpListener config, HttpListener httpListener ) - { - String port = Integer.toString( config.getPort() ); - - if ( !httpListeners.containsKey( port ) ) - { - HttpListenerReference httpRef = new HttpListenerReference( httpListener ); - - httpListeners.put( port, httpRef ); - } - } - - private void updatePort( org.codehaus.plexus.jetty.configuration.HttpListener config ) - { - String port = Integer.toString( config.getPort() ); - - if ( httpListeners.containsKey( port ) ) - { - HttpListenerReference httpRef = (HttpListenerReference) httpListeners.get( port ); - - httpRef.increment(); - } - } - - class ListenerStopThread extends Thread - { - Server server; - - HttpListener listener; - - public ListenerStopThread( Server _server, HttpListener _listener ) - { - server = _server; - listener = _listener; - } - - public void run() - { - try - { - Thread.sleep( 20000 ); - server.removeListener( listener ); - } - catch (Exception ex) - { - //TODO: - } - } - } -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/HttpListenerReference.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/HttpListenerReference.java deleted file mode 100644 index a39c8d615..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/HttpListenerReference.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.codehaus.plexus.jetty; - -/* - * The MIT License - * - * Copyright (c) 2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.mortbay.http.HttpListener; - -public class HttpListenerReference -{ - private HttpListener listener; - - private int references = 1; - - public HttpListenerReference( HttpListener _listener) - { - listener = _listener; - } - - synchronized public HttpListenerReference increment() - { - references++; - - return this; - } - - synchronized public HttpListenerReference decrement() - { - references--; - - return this; - } - - synchronized public int getRefCount() - { - return references; - } - - public HttpListener getListener() - { - return listener; - } -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/JettyPlusServletContainer.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/JettyPlusServletContainer.java deleted file mode 100644 index 75bee5b88..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/JettyPlusServletContainer.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.codehaus.plexus.jetty; - -import org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException; -import org.mortbay.jetty.plus.Server; -import org.mortbay.xml.XmlConfiguration; - -import java.io.File; - -public class JettyPlusServletContainer - extends AbstractJettyServletContainer -{ - private File jettyXmlFile; - - public void setJettyXmlFile( File jettyXmlFile ) - { - this.jettyXmlFile = jettyXmlFile; - } - - public File getJettyXmlFile() - { - return jettyXmlFile; - } - - public void applyJettyXml() - throws Exception - { - if ( jettyXmlFile == null ) - { - return; - } - - if ( jettyXmlFile.exists() ) - { - getLogger().info( "Configuring Jetty from xml configuration file = " + jettyXmlFile.getCanonicalPath() ); - XmlConfiguration xmlConfiguration = new XmlConfiguration( jettyXmlFile.getCanonicalFile().toURL() ); - xmlConfiguration.configure( server ); - } - } - - public void start() - throws StartingException - { - server = new Server(); - - try - { - applyJettyXml(); - - server.start(); - } - catch ( Exception e ) - { - throw new StartingException( "Error while starting Jetty", e ); - } - } -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/JettyProxyHttpListener.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/JettyProxyHttpListener.java deleted file mode 100644 index 6154ac3aa..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/JettyProxyHttpListener.java +++ /dev/null @@ -1,74 +0,0 @@ -package org.codehaus.plexus.jetty; - -/* - * Copyright 2004-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.mortbay.http.HttpFields; -import org.mortbay.http.HttpMessage; -import org.mortbay.http.HttpRequest; -import org.mortbay.http.SocketListener; -import org.mortbay.util.InetAddrPort; - -import java.net.Socket; - -/** - * Forced Host Listener - * this simple listener extention forces the host header to be set to a specific value. - * It is useful when deployed behind old apache mod_proxy implementations that - * lie about the real host used by the client. - */ -public class JettyProxyHttpListener - extends SocketListener -{ - String forcedHost; - - public JettyProxyHttpListener() - { - } - - public JettyProxyHttpListener( InetAddrPort address ) - { - super( address ); - } - - public String getForcedHost() - { - return forcedHost; - } - - public void setForcedHost( String host ) - { - forcedHost = host; - } - - protected void customizeRequest( Socket socket, HttpRequest request ) - { - request.setState( HttpMessage.__MSG_EDITABLE ); - - if ( forcedHost == null ) - { - request.removeField( HttpFields.__Host ); - } - else - { - request.setField( HttpFields.__Host, forcedHost ); - } - - request.setState( HttpMessage.__MSG_RECEIVED ); - - super.customizeRequest( socket, request ); - } -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/JettyServletContainer.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/JettyServletContainer.java deleted file mode 100644 index 31802c0d3..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/JettyServletContainer.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.codehaus.plexus.jetty; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException; -import org.mortbay.jetty.Server; - -public class JettyServletContainer - extends AbstractJettyServletContainer -{ - public void start() - throws StartingException - { - server = new Server(); - - try - { - server.start(); - } - catch ( Exception e ) - { - throw new StartingException( "Error while starting Jetty", e ); - } - } -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/ServletContainer.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/ServletContainer.java deleted file mode 100644 index 98a9ba7d6..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/ServletContainer.java +++ /dev/null @@ -1,79 +0,0 @@ -package org.codehaus.plexus.jetty; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.DefaultPlexusContainer; -import org.codehaus.plexus.jetty.configuration.HttpListener; -import org.codehaus.plexus.jetty.configuration.ProxyHttpListener; -import org.codehaus.plexus.jetty.configuration.ServletContext; -import org.codehaus.plexus.jetty.configuration.WebContext; -import org.codehaus.plexus.jetty.configuration.Webapp; - -import java.io.File; -import java.net.UnknownHostException; - -/** - * @author Trygve Laugstøl - * @author Jason van Zyl - * @version $Id$ - */ -public interface ServletContainer -{ - String ROLE = ServletContainer.class.getName(); - - boolean hasContext( String contextPath ); - - void addListener( HttpListener listener ) - throws ServletContainerException, UnknownHostException; - - void removeListener( HttpListener listener ) - throws ServletContainerException; - - void addProxyListener( ProxyHttpListener listener ) - throws ServletContainerException, UnknownHostException; - - void startApplication( String contextPath ) - throws ServletContainerException; - - void stopApplication( String contextPath ) - throws ServletContainerException; - - // ---------------------------------------------------------------------------- - // For simple document serving - // ---------------------------------------------------------------------------- - - void deployWarDirectory( File directory, DefaultPlexusContainer container, Webapp webapp ) - throws ServletContainerException; - - public void deployServletContext( ServletContext servletContext ) - throws ServletContainerException; - - void deployContext( WebContext webContext ) - throws ServletContainerException; - - void clearContexts(); - - boolean isPortRegistered( HttpListener listener ); -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/ServletContainerException.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/ServletContainerException.java deleted file mode 100644 index 1fc7cd3cb..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/ServletContainerException.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.codehaus.plexus.jetty; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class ServletContainerException - extends Exception -{ - public ServletContainerException( String message ) - { - super( message ); - } - - public ServletContainerException( String message, Throwable cause ) - { - super( message, cause ); - } -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/HttpListener.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/HttpListener.java deleted file mode 100644 index cf13f66a3..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/HttpListener.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.codehaus.plexus.jetty.configuration; - -/* - * Copyright 2004-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class HttpListener -{ - private String id; - - private String host; - - private int port; - - public String getId() - { - return id; - } - - public String getHost() - { - return host; - } - - public int getPort() - { - return port; - } -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/InitParameter.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/InitParameter.java deleted file mode 100644 index 4e6aa73fa..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/InitParameter.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.codehaus.plexus.jetty.configuration; - -/** - * @author Jason van Zyl - */ -public class InitParameter -{ - private String name; - - private String value; - - private String directive; - - public String getName() - { - return name; - } - - public String getValue() - { - return value; - } - - public String getDirective() - { - return directive; - } -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/ProxyHttpListener.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/ProxyHttpListener.java deleted file mode 100644 index 7a9ab0b0a..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/ProxyHttpListener.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.codehaus.plexus.jetty.configuration; - -/* - * Copyright 2004-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class ProxyHttpListener - extends HttpListener -{ - private String proxyHost; - - private int proxyPort; - - public String getProxyHost() - { - return proxyHost; - } - - public int getProxyPort() - { - return proxyPort; - } -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/ServiceConfiguration.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/ServiceConfiguration.java deleted file mode 100644 index d52a52c6e..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/ServiceConfiguration.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.codehaus.plexus.jetty.configuration; - -/* - * The MIT License - * - * Copyright (c) 2004-2005, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.util.ArrayList; -import java.util.List; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class ServiceConfiguration -{ - private List webapps = new ArrayList(); - - private List webContexts = new ArrayList(); - - private List servletContexts = new ArrayList(); - - public List getWebapps() - { - return webapps; - } - - public List getWebContexts() - { - return webContexts; - } - - public List getServletContexts() - { - return servletContexts; - } -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/ServletContext.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/ServletContext.java deleted file mode 100644 index 27260677d..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/ServletContext.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.codehaus.plexus.jetty.configuration; - -import java.util.List; - -/** - * @author Jason van Zyl - */ -public class ServletContext - extends WebContext -{ - private String name; - - private String path; - - private String servlet; - - private List initParameters; - - public String getName() - { - return name; - } - - public String getPath() - { - return path; - } - - public String getServlet() - { - return servlet; - } - - public List getInitParameters() - { - return initParameters; - } -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/WebContext.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/WebContext.java deleted file mode 100644 index 32d4755e7..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/WebContext.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.codehaus.plexus.jetty.configuration; - -import java.util.List; - -/** - * @author Trygve Laugstøl - * @author Jason van Zyl - * @version $Id$ - */ -public class WebContext -{ - private String path; - - private String context; - - private List listeners; - - private String virtualHost; - - private List initParameters; - - public String getPath() - { - return path; - } - - public String getContext() - { - return context; - } - - public String getVirtualHost() - { - return virtualHost; - } - - public List getListeners() - { - return listeners; - } -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/Webapp.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/Webapp.java deleted file mode 100644 index 58b172aeb..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/Webapp.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.codehaus.plexus.jetty.configuration; - -/* - * The MIT License - * - * Copyright (c) 2004-2005, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * @author Trygve Laugstøl - * @author Jason van Zyl - * @version $Id$ - */ -public class Webapp - extends WebContext -{ - private String file; - - private String extractionPath; - - private boolean standardWebappClassloader; - - public String getFile() - { - return file; - } - - public String getExtractionPath() - { - return extractionPath; - } - - public boolean isStandardWebappClassloader() - { - return standardWebappClassloader; - } -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/builder/DefaultServiceConfigurationBuilder.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/builder/DefaultServiceConfigurationBuilder.java deleted file mode 100644 index bb6bdd6d4..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/builder/DefaultServiceConfigurationBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.codehaus.plexus.jetty.configuration.builder; - -/* - * The MIT License - * - * Copyright (c) 2004-2005, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.classworlds.ClassRealm; -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.ComponentConfigurator; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.jetty.configuration.ServiceConfiguration; -import org.codehaus.plexus.logging.AbstractLogEnabled; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class DefaultServiceConfigurationBuilder - extends AbstractLogEnabled - implements ServiceConfigurationBuilder -{ - private ComponentConfigurator configurator; - - public ServiceConfiguration buildConfiguration( PlexusConfiguration serviceConfiguration, ClassRealm realm ) - throws ComponentConfigurationException - { - ServiceConfiguration configuration = new ServiceConfiguration(); - - configurator.configureComponent( configuration, serviceConfiguration, realm ); - - return configuration; - } -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/builder/ServiceConfigurationBuilder.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/builder/ServiceConfigurationBuilder.java deleted file mode 100644 index 94cc5d095..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/jetty/configuration/builder/ServiceConfigurationBuilder.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.codehaus.plexus.jetty.configuration.builder; - -/* - * The MIT License - * - * Copyright (c) 2004-2005, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.classworlds.ClassRealm; -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.jetty.configuration.ServiceConfiguration; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public interface ServiceConfigurationBuilder -{ - String ROLE = ServiceConfigurationBuilder.class.getName(); - - ServiceConfiguration buildConfiguration( PlexusConfiguration serviceConfiguration, ClassRealm realm ) - throws ComponentConfigurationException; -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/service/jetty/JettyPlexusService.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/service/jetty/JettyPlexusService.java deleted file mode 100644 index 1e7e6bc9d..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/service/jetty/JettyPlexusService.java +++ /dev/null @@ -1,319 +0,0 @@ -package org.codehaus.plexus.service.jetty; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.classworlds.ClassRealm; -import org.codehaus.plexus.DefaultPlexusContainer; -import org.codehaus.plexus.appserver.application.profile.AppRuntimeProfile; -import org.codehaus.plexus.appserver.service.AbstractPlexusService; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.jetty.ServletContainer; -import org.codehaus.plexus.jetty.ServletContainerException; -import org.codehaus.plexus.jetty.configuration.HttpListener; -import org.codehaus.plexus.jetty.configuration.ProxyHttpListener; -import org.codehaus.plexus.jetty.configuration.ServiceConfiguration; -import org.codehaus.plexus.jetty.configuration.ServletContext; -import org.codehaus.plexus.jetty.configuration.WebContext; -import org.codehaus.plexus.jetty.configuration.Webapp; -import org.codehaus.plexus.jetty.configuration.builder.ServiceConfigurationBuilder; -import org.codehaus.plexus.util.FileUtils; - -import java.io.File; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; - -/** - * @author Trygve Laugstøl - * @author Jason van Zyl - * @version $Id$ - * @todo how to make the servlet container here be the standard plexus-jetty, we shouldn't need to copy - * the component here to make it work as a service. - */ -public class JettyPlexusService - extends AbstractPlexusService -{ - /** - * @plexus.requirement - */ - private ServiceConfigurationBuilder configurationBuilder; - - /** - * @plexus.requirement - */ - private ServletContainer servletContainer; - - /** - * Set of ports to be activated. The port can only be used once. - * @deprecated - */ - private Set activePorts = new HashSet(); - - // ---------------------------------------------------------------------- - // PlexusService Implementation - // ---------------------------------------------------------------------- - - public void beforeApplicationStart( AppRuntimeProfile runtimeProfile, PlexusConfiguration serviceConfiguration ) - throws Exception - { - // We probably need to stop running contexts here ... - - ServiceConfiguration configuration = configurationBuilder.buildConfiguration( serviceConfiguration, - runtimeProfile.getApplicationServerContainer().getContainerRealm() ); - - runtimeProfile.addServiceConfiguration( this, configuration ); - - for ( Iterator it = configuration.getWebapps().iterator(); it.hasNext(); ) - { - Webapp webapp = (Webapp) it.next(); - - // Stop the webapp context if it is running. - - if ( servletContainer.hasContext( webapp.getContext() ) ) - { - servletContainer.stopApplication( webapp.getContext() ); - } - - File webAppDir; - - if ( webapp.getPath() == null ) - { - // ---------------------------------------------------------------------- - // Extract the jar - // ---------------------------------------------------------------------- - - expand( getFile( webapp.getFile() ), getFile( webapp.getExtractionPath() ), false ); - - webAppDir = getFile( webapp.getExtractionPath() ); - } - else - { - webAppDir = getFile( webapp.getPath() ); - } - - if ( !webAppDir.isDirectory() ) - { - throw new Exception( "The webapp isn't a directory: '" + webAppDir.getAbsolutePath() + "'." ); - } - - try - { - getLogger().info( "Deploying " + webAppDir + " with context path of " + webapp.getContext() ); - - servletContainer.deployWarDirectory( webAppDir, runtimeProfile.getApplicationContainer(), webapp ); - } - catch ( ServletContainerException e ) - { - getLogger().error( "Error while deploying WAR '" + webAppDir.getAbsolutePath() + "'.", e ); - } - } - - // ---------------------------------------------------------------------------- - // Web contexts - // ---------------------------------------------------------------------------- - - for ( Iterator i = configuration.getWebContexts().iterator(); i.hasNext(); ) - { - WebContext webContext = (WebContext) i.next(); - - getLogger().info( - "Deploying " + webContext.getPath() + " with context path of " + webContext.getContext() ); - - servletContainer.deployContext( webContext ); - } - - // ---------------------------------------------------------------------------- - // Servlet contexts - // ---------------------------------------------------------------------------- - - for ( Iterator i = configuration.getServletContexts().iterator(); i.hasNext(); ) - { - ServletContext servletContext = (ServletContext) i.next(); - - getLogger().info( "Deploying servlet " + servletContext.getName() + " with context path of " + - servletContext.getContext() ); - - servletContainer.deployServletContext( servletContext ); - } - } - - public void afterApplicationStart( AppRuntimeProfile appRuntimeProfile, PlexusConfiguration serviceConfiguration ) - throws Exception - { - ServiceConfiguration configuration = configurationBuilder.buildConfiguration( serviceConfiguration, - appRuntimeProfile.getApplicationServerContainer().getContainerRealm() ); - - for ( Iterator it = configuration.getWebapps().iterator(); it.hasNext(); ) - { - Webapp application = (Webapp) it.next(); - - processWebContextConfiguration( application, appRuntimeProfile ); - - //if ( !servletContainer.hasContext( application.getContext() ) ) - //{ - // ---------------------------------------------------------------------------- - // Now we need to find all the components that might be included in the webapp. - // We have to do this here because now the container is initialized which - // means discovery can occur. - // ---------------------------------------------------------------------------- - - DefaultPlexusContainer c = appRuntimeProfile.getApplicationContainer(); - - ClassRealm realm = c.getContainerRealm(); - - c.discoverComponents( realm ); - //} - - servletContainer.startApplication( application.getContext() ); - } - - for ( Iterator i = configuration.getWebContexts().iterator(); i.hasNext(); ) - { - WebContext webContext = (WebContext) i.next(); - - processWebContextConfiguration( webContext, appRuntimeProfile ); - - servletContainer.startApplication( webContext.getContext() ); - } - - for ( Iterator i = configuration.getServletContexts().iterator(); i.hasNext(); ) - { - ServletContext servletContext = (ServletContext) i.next(); - - processWebContextConfiguration( servletContext, appRuntimeProfile ); - - servletContainer.startApplication( servletContext.getContext() ); - } - } - - // ---------------------------------------------------------------------------- - // - // ---------------------------------------------------------------------------- - - private void processWebContextConfiguration( WebContext context, AppRuntimeProfile profile ) - throws Exception - { - if ( context.getVirtualHost() == null ) - { - getLogger().info( "Deploying appserver '" + profile.getName() + "'." ); - } - else - { - getLogger().info( "Deploying appserver '" + profile.getName() + "' " + "on virtual host '" + - context.getVirtualHost() + "'." ); - } - - HttpListener httpListener; - - String port; - - String listener; - - for ( Iterator j = context.getListeners().iterator(); j.hasNext(); ) - { - httpListener = (HttpListener) j.next(); - - port = Integer.toString( httpListener.getPort() ); - - listener = ( httpListener.getHost() != null ) ? httpListener.getHost() : "*"; - - listener += port; - - if ( httpListener instanceof ProxyHttpListener ) - { - ProxyHttpListener proxyHttpListener = (ProxyHttpListener) httpListener; - - String proxyListener = ( proxyHttpListener.getHost() != null ) ? proxyHttpListener.getHost() : "*"; - - proxyListener += port; - - getLogger().info( "Adding HTTP proxy listener on " + listener + " for " + proxyListener ); - - servletContainer.addProxyListener( proxyHttpListener ); - } - else - { - getLogger().info( "Adding HTTP listener on " + listener ); - - servletContainer.addListener( httpListener ); - } - } - } - - public void applicationStop( AppRuntimeProfile runtimeProfile ) - throws Exception - { - ServiceConfiguration configuration = (ServiceConfiguration) runtimeProfile.getServiceConfiguration( this ); - - removeContexts( configuration.getWebContexts() ); - - removeContexts( configuration.getServletContexts() ); - - Webapp webapp; - - for ( Iterator iterator = configuration.getWebapps().iterator(); iterator.hasNext(); ) - { - webapp = (Webapp) iterator.next(); - - if ( servletContainer.hasContext( webapp.getContext() ) ) - { - removeListeners( webapp.getListeners() ); - servletContainer.stopApplication( webapp.getContext() ); - } - } - } - - - private void removeContexts( List contexts ) - throws Exception - { - WebContext context; - - for (Iterator iterator = contexts.iterator(); iterator.hasNext(); ) - { - context = (WebContext) iterator.next(); - removeListeners( context.getListeners() ); - } - } - - private void removeListeners( List listeners ) - throws Exception - { - HttpListener listener; - - for (Iterator listenerIterator = listeners.iterator(); listenerIterator.hasNext(); ) - { - listener = ( HttpListener ) listenerIterator.next(); - - servletContainer.removeListener( listener ); - } - } - - private File getFile( String path ) - { - return FileUtils.resolveFile( new File( "." ), path ); - } -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/service/jetty/JettyPlexusServiceException.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/service/jetty/JettyPlexusServiceException.java deleted file mode 100644 index d5facd50c..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/java/org/codehaus/plexus/service/jetty/JettyPlexusServiceException.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.codehaus.plexus.service.jetty; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class JettyPlexusServiceException - extends Exception -{ - public JettyPlexusServiceException( String message ) - { - super( message ); - } - - public JettyPlexusServiceException( String message, Throwable cause ) - { - super( message, cause ); - } -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/resources/META-INF/plexus/components.xml b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index 47ef0e572..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - org.codehaus.plexus.appserver.service.PlexusService - jetty - org.codehaus.plexus.service.jetty.JettyPlexusService - - - org.codehaus.plexus.jetty.ServletContainer - jetty - - - org.codehaus.plexus.jetty.configuration.builder.ServiceConfigurationBuilder - - - - - org.codehaus.plexus.jetty.ServletContainer - jetty-plus - org.codehaus.plexus.jetty.JettyPlusServletContainer - - ${plexus.home}/conf/jetty.xml - - - - org.codehaus.plexus.jetty.ServletContainer - org.codehaus.plexus.jetty.JettyServletContainer - jetty - - - org.codehaus.plexus.jetty.configuration.builder.ServiceConfigurationBuilder - org.codehaus.plexus.jetty.configuration.builder.DefaultServiceConfigurationBuilder - - - org.codehaus.plexus.component.configurator.ComponentConfigurator - basic - - - - - diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/resources/jndi.properties b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/resources/jndi.properties deleted file mode 100644 index 63b57accb..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/main/resources/jndi.properties +++ /dev/null @@ -1 +0,0 @@ -java.naming.factory.initial=org.mortbay.jndi.InitialContextFactory diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/test/java/org/codehaus/plexus/jetty/JettyPlusServletContainerTest.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/test/java/org/codehaus/plexus/jetty/JettyPlusServletContainerTest.java deleted file mode 100644 index 1c0869fe5..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/test/java/org/codehaus/plexus/jetty/JettyPlusServletContainerTest.java +++ /dev/null @@ -1,64 +0,0 @@ -package org.codehaus.plexus.jetty; - -/* - * The MIT License - * - * Copyright (c) 2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.PlexusTestCase; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.sql.DataSource; -import java.sql.Connection; - -/** - * Test the JettyPlusServletContainer class. - */ -public class JettyPlusServletContainerTest - extends PlexusTestCase -{ - public void testJndi() - throws Exception - { - JettyPlusServletContainer container = (JettyPlusServletContainer) lookup( ServletContainer.ROLE, "jetty-plus" ); - container.setJettyXmlFile( getTestFile( "target/test-classes/jetty.xml" ) ); - - try - { - container.start(); - - Context ctx = new InitialContext(); - ctx = (Context) ctx.lookup( "java:comp/env" ); - - DataSource dataSource = (DataSource) ctx.lookup( "jdbc/testDS" ); - assertNotNull( dataSource ); - Connection conn = dataSource.getConnection(); - assertNotNull( conn ); - conn.close(); - } - finally - { - container.stop(); - } - } -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/test/java/org/codehaus/plexus/jetty/configuration/builder/DefaultServiceConfigurationBuilderTest.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/test/java/org/codehaus/plexus/jetty/configuration/builder/DefaultServiceConfigurationBuilderTest.java deleted file mode 100644 index 53b785779..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/test/java/org/codehaus/plexus/jetty/configuration/builder/DefaultServiceConfigurationBuilderTest.java +++ /dev/null @@ -1,166 +0,0 @@ -package org.codehaus.plexus.jetty.configuration.builder; - -/* - * The MIT License - * - * Copyright (c) 2004-2005, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration; -import org.codehaus.plexus.jetty.configuration.HttpListener; -import org.codehaus.plexus.jetty.configuration.ProxyHttpListener; -import org.codehaus.plexus.jetty.configuration.ServiceConfiguration; -import org.codehaus.plexus.jetty.configuration.WebContext; -import org.codehaus.plexus.jetty.configuration.Webapp; -import org.codehaus.plexus.util.xml.Xpp3Dom; -import org.codehaus.plexus.util.xml.Xpp3DomBuilder; - -import java.io.FileReader; -import java.util.List; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class DefaultServiceConfigurationBuilderTest - extends PlexusTestCase -{ - public void testBasic() - throws Exception - { - ServiceConfigurationBuilder configurationBuilder = - (ServiceConfigurationBuilder) lookup( ServiceConfigurationBuilder.ROLE ); - - Xpp3Dom dom = Xpp3DomBuilder.build( - new FileReader( getTestFile( "src/test/resources/full-configuration-example.xml" ) ) ); - - PlexusConfiguration plexusConfiguration = new XmlPlexusConfiguration( dom ); - - ServiceConfiguration configuration = - configurationBuilder.buildConfiguration( plexusConfiguration, getContainer().getContainerRealm() ); - - assertNotNull( configuration ); - - assertNotNull( configuration.getWebapps() ); - - assertEquals( 1, configuration.getWebapps().size() ); - - // ---------------------------------------------------------------------- - // Assert the Webapp - // ---------------------------------------------------------------------- - - Webapp webapp = (Webapp) configuration.getWebapps().get( 0 ); - - assertEquals( "/continuum", webapp.getContext() ); - - assertEquals( "${plexus.home}/webapp", webapp.getExtractionPath() ); - - assertEquals( "${plexus.home}/lib/continuum-web-1.0-alpha-3-SNAPSHOT.jar", webapp.getFile() ); - - assertNull( webapp.getPath() ); - - assertEquals( "www.foo.com", webapp.getVirtualHost() ); - - assertTrue( webapp.isStandardWebappClassloader() ); - - // ---------------------------------------------------------------------- - // Assert the listeners - // ---------------------------------------------------------------------- - - List listeners = webapp.getListeners(); - - assertNotNull( listeners ); - - assertEquals( 2, listeners.size() ); - - assertEquals( HttpListener.class, listeners.get( 0 ).getClass() ); - - HttpListener httpListener = (HttpListener) listeners.get( 0 ); - - assertNull( httpListener.getHost() ); - - assertEquals( 123, httpListener.getPort() ); - - assertEquals( ProxyHttpListener.class, listeners.get( 1 ).getClass() ); - - ProxyHttpListener proxyHttpListener = (ProxyHttpListener) listeners.get( 1 ); - - assertNull( proxyHttpListener.getHost() ); - - assertEquals( 8090, proxyHttpListener.getPort() ); - - assertEquals( "localhost", proxyHttpListener.getProxyHost() ); - - assertEquals( 80, proxyHttpListener.getProxyPort() ); - - // ---------------------------------------------------------------------------- - // Test the web contexts - // ---------------------------------------------------------------------------- - - assertNotNull( configuration.getWebContexts() ); - - assertEquals( 1, configuration.getWebContexts().size() ); - - // ---------------------------------------------------------------------- - // Assert the Webapp - // ---------------------------------------------------------------------- - - WebContext webContext = (WebContext) configuration.getWebContexts().get( 0 ); - - assertEquals( "/repository", webContext.getContext() ); - - assertEquals( "/path/to/repository", webContext.getPath() ); - - assertEquals( "www.foo.com", webContext.getVirtualHost() ); - - // ---------------------------------------------------------------------- - // Assert the listeners - // ---------------------------------------------------------------------- - - listeners = webContext.getListeners(); - - assertNotNull( listeners ); - - assertEquals( 2, listeners.size() ); - - assertEquals( HttpListener.class, listeners.get( 0 ).getClass() ); - - httpListener = (HttpListener) listeners.get( 0 ); - - assertNull( httpListener.getHost() ); - - assertEquals( 123, httpListener.getPort() ); - - assertEquals( ProxyHttpListener.class, listeners.get( 1 ).getClass() ); - - proxyHttpListener = (ProxyHttpListener) listeners.get( 1 ); - - assertNull( proxyHttpListener.getHost() ); - - assertEquals( 8090, proxyHttpListener.getPort() ); - - assertEquals( "localhost", proxyHttpListener.getProxyHost() ); - - assertEquals( 80, proxyHttpListener.getProxyPort() ); - } -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/test/java/org/codehaus/plexus/service/jetty/JettyServiceTest.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/test/java/org/codehaus/plexus/service/jetty/JettyServiceTest.java deleted file mode 100644 index f4fd61b81..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/test/java/org/codehaus/plexus/service/jetty/JettyServiceTest.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.codehaus.plexus.service.jetty; - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.DefaultPlexusContainer; -import org.codehaus.plexus.appserver.application.profile.AppRuntimeProfile; -import org.codehaus.plexus.appserver.service.PlexusService; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration; -import org.codehaus.plexus.util.xml.Xpp3Dom; -import org.codehaus.plexus.util.xml.Xpp3DomBuilder; - -import java.io.FileReader; - -public class JettyServiceTest - extends PlexusTestCase -{ - public void testJettyService() - throws Exception - { - PlexusService service = (PlexusService) lookup( PlexusService.ROLE, "jetty" ); - - DefaultPlexusContainer container = (DefaultPlexusContainer) getContainer(); - AppRuntimeProfile profile = new AppRuntimeProfile( "test", null, null, container, container, null ); - - Xpp3Dom dom = Xpp3DomBuilder.build( new FileReader( getTestFile( "src/test/resources/test-service.xml" ) ) ); - - PlexusConfiguration configuration = new XmlPlexusConfiguration( dom ); - - service.beforeApplicationStart( profile, configuration ); - - service.afterApplicationStart( profile, configuration ); - - } -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/test/resources/full-configuration-example.xml b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/test/resources/full-configuration-example.xml deleted file mode 100644 index 7ce41b74c..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/test/resources/full-configuration-example.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - ${plexus.home}/lib/continuum-web-1.0-alpha-3-SNAPSHOT.jar - /continuum - true - ${plexus.home}/webapp - www.foo.com - - - - 123 - - - 8090 - localhost - 80 - - - - - - - /repository - /path/to/repository - www.foo.com - - - - 123 - - - 8090 - localhost - 80 - - - - - diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/test/resources/jetty.xml b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/test/resources/jetty.xml deleted file mode 100644 index bf7dbb589..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/test/resources/jetty.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - DataSourceService - - - - java:comp/env/jdbc/testDS - - - target/database - sa - create - - - - - - - - diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/test/resources/test-service.xml b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/test/resources/test-service.xml deleted file mode 100644 index 2fd59c6f1..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/test/resources/test-service.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - / - src/test/webapp - - - localhost - 12345 - - - - - diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/test/webapp/WEB-INF/web.xml b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/test/webapp/WEB-INF/web.xml deleted file mode 100644 index 63d27096f..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-jetty/src/test/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - Test - - diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/pom.xml b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/pom.xml deleted file mode 100644 index cb278b5c2..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - plexus-appserver-services - org.codehaus.plexus - 2.0-alpha-4-SNAPSHOT - - 4.0.0 - plexus-appserver-service-xmlrpc - 2.0-alpha-5-SNAPSHOT - plexus-service - Plexus XMLRPC Service - - - - org.codehaus.plexus - plexus-appserver-maven-plugin - true - - xmlrpc - src/conf/plexus.xml - - - - - - - xmlrpc - xmlrpc - 1.2 - - - servletapi - servletapi - 2.3 - - - org.codehaus.plexus - plexus-xmlrpc - 1.0-beta-4 - - - diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/conf/plexus.xml b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/conf/plexus.xml deleted file mode 100644 index 3a74b789b..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/conf/plexus.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - org.codehaus.plexus.appserver.service.PlexusService - xml-rpc - - - diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/main/java/org/codehaus/plexus/service/xmlrpc/XmlRpcPlexusService.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/main/java/org/codehaus/plexus/service/xmlrpc/XmlRpcPlexusService.java deleted file mode 100644 index e2e6a6bbd..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/main/java/org/codehaus/plexus/service/xmlrpc/XmlRpcPlexusService.java +++ /dev/null @@ -1,193 +0,0 @@ -package org.codehaus.plexus.service.xmlrpc; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.apache.xmlrpc.XmlRpcException; -import org.codehaus.plexus.appserver.application.profile.AppRuntimeProfile; -import org.codehaus.plexus.appserver.service.PlexusService; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException; -import org.codehaus.plexus.service.xmlrpc.configuration.ServiceConfiguration; -import org.codehaus.plexus.service.xmlrpc.configuration.XmlRpcService; -import org.codehaus.plexus.service.xmlrpc.configuration.builder.ServiceConfigurationBuilder; -import org.codehaus.plexus.util.StringUtils; -import org.codehaus.plexus.xmlrpc.XmlRpcServer; - -import java.util.HashSet; -import java.util.Iterator; -import java.util.Set; - -/** - * @author Trygve Laugstøl - * @author Emmanuel VEnisse - * @version $Id$ - */ -public class XmlRpcPlexusService - extends AbstractLogEnabled - implements PlexusService, Startable -{ - /** - * @plexus.requirement - */ - private ServiceConfigurationBuilder configurationBuilder; - - /** - * @requirement - */ - private XmlRpcServer xmlRpcServer; - - /** - * port activity flag - */ - int port = -1; - - /** - * Set of ports to be activated. The port can only be used once. - */ - private Set activePorts = new HashSet(); - - // ---------------------------------------------------------------------- - // Component Lifecycle - // ---------------------------------------------------------------------- - - public void start() - throws StartingException - { - getLogger().info( "Starting XML-RPC service." ); - } - - public void stop() - { - getLogger().info( "Stopping XML-RPC service." ); - - if ( port == -1 ) - { - return; - } - - try - { - xmlRpcServer.removeListener( null, port ); - } - catch ( XmlRpcException e ) - { - getLogger().error( "Error while stopping the XML-RPC server.", e ); - } - } - - // ---------------------------------------------------------------------- - // PlexusService Implementation - // ---------------------------------------------------------------------- - - public void beforeApplicationStart( AppRuntimeProfile appRuntimeProfile, PlexusConfiguration serviceConfiguration ) - throws Exception - { - ServiceConfiguration configuration = configurationBuilder.buildConfiguration( serviceConfiguration ); - - for ( Iterator it = configuration.getXmlRpcServices().iterator(); it.hasNext(); ) - { - XmlRpcService service = (XmlRpcService) it.next(); - - try - { - String activePort = Integer.toString( service.getPort() ); - - if ( activePorts.contains( activePort ) ) - { - continue; - } - - activePorts.add( activePort ); - - xmlRpcServer.addListener( null, service.getPort(), false ); - - xmlRpcServer.startListener( null, service.getPort() ); - - port = service.getPort(); - } - catch ( XmlRpcException e ) - { - throw new StartingException( "Error while starting XML-RPC server on port " + service.getPort() + ".", - e ); - } - } - } - - public void afterApplicationStart( AppRuntimeProfile appRuntimeProfile, PlexusConfiguration serviceConfiguration ) - throws Exception - { - if ( port == -1 ) - { - return; - } - - PlexusConfiguration[] handlers = serviceConfiguration.getChild( "handlers" ).getChildren( "handler" ); - - for ( int i = 0; i < handlers.length; i++ ) - { - PlexusConfiguration handler = handlers[i]; - - String role = handler.getChild( "role" ).getValue(); - - String name = handler.getChild( "name" ).getValue(); - - if ( StringUtils.isEmpty( role ) ) - { - getLogger().error( "Error in configurator: Missing 'role' child element of 'handler' element." ); - - break; - } - - if ( StringUtils.isEmpty( name ) ) - { - getLogger().error( "Error in configurator: Missing 'name' child element of 'handler' element." ); - - break; - } - - if ( !appRuntimeProfile.getApplicationServerContainer().hasComponent( role ) ) - { - getLogger().error( "No component with the role '" + role + "' available." ); - - break; - } - - Object component = appRuntimeProfile.getApplicationServerContainer().lookup( role ); - - getLogger().info( "Adding XML-RPC handler for role '" + role + " to name '" + name + "'." ); - - xmlRpcServer.addHandler( null, name, port, component ); - } - } - - public void applicationStop( AppRuntimeProfile runtimeProfile ) - throws Exception - { - - } - -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/main/java/org/codehaus/plexus/service/xmlrpc/configuration/ServiceConfiguration.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/main/java/org/codehaus/plexus/service/xmlrpc/configuration/ServiceConfiguration.java deleted file mode 100644 index a94beaf13..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/main/java/org/codehaus/plexus/service/xmlrpc/configuration/ServiceConfiguration.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.codehaus.plexus.service.xmlrpc.configuration; - -/* - * The MIT License - * - * Copyright (c) 2004-2005, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.util.ArrayList; -import java.util.List; - -/** - * @author Emmanuel VEnisse - * @version $Id$ - */ -public class ServiceConfiguration -{ - private List xmlRpcServices = new ArrayList(); - - public void addXmlRpcService( XmlRpcService xmlRpcService ) - { - xmlRpcServices.add( xmlRpcService ); - } - - public List getXmlRpcServices() - { - return xmlRpcServices; - } -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/main/java/org/codehaus/plexus/service/xmlrpc/configuration/XmlRpcService.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/main/java/org/codehaus/plexus/service/xmlrpc/configuration/XmlRpcService.java deleted file mode 100644 index 61ce7b652..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/main/java/org/codehaus/plexus/service/xmlrpc/configuration/XmlRpcService.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.codehaus.plexus.service.xmlrpc.configuration; - -/* - * The MIT License - * - * Copyright (c) 2004-2005, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * @author Emmanuel VEnisse - * @version $Id$ - */ -public class XmlRpcService -{ - private int port; - - public XmlRpcService( int port ) - { - this.port = port; - } - - public int getPort() - { - return port; - } -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/main/java/org/codehaus/plexus/service/xmlrpc/configuration/builder/DefaultServiceConfigurationBuilder.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/main/java/org/codehaus/plexus/service/xmlrpc/configuration/builder/DefaultServiceConfigurationBuilder.java deleted file mode 100644 index b38c501e7..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/main/java/org/codehaus/plexus/service/xmlrpc/configuration/builder/DefaultServiceConfigurationBuilder.java +++ /dev/null @@ -1,81 +0,0 @@ -package org.codehaus.plexus.service.xmlrpc.configuration.builder; - -/* - * The MIT License - * - * Copyright (c) 2004-2005, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.service.xmlrpc.configuration.ServiceConfiguration; -import org.codehaus.plexus.service.xmlrpc.configuration.XmlRpcService; -import org.codehaus.plexus.util.StringUtils; - -/** - * @author Emmanuel VEnisse - * @version $Id$ - */ -public class DefaultServiceConfigurationBuilder - extends AbstractLogEnabled - implements ServiceConfigurationBuilder -{ - public ServiceConfiguration buildConfiguration( PlexusConfiguration serviceConfiguration ) - { - ServiceConfiguration configuration = new ServiceConfiguration(); - - PlexusConfiguration xmlrpc = serviceConfiguration.getChild( "xmlrpc" ); - - int port = getPort( xmlrpc ); - - if ( port != -1 ) - { - XmlRpcService xmlrpcService = new XmlRpcService( port ); - - configuration.addXmlRpcService( xmlrpcService ); - } - - return configuration; - } - - private int getPort( PlexusConfiguration xmlrpc ) - { - String portString = xmlrpc.getChild( "port" ).getValue( null ); - - if ( StringUtils.isEmpty( portString ) ) - { - getLogger().warn( "Error while deploying xml-rpc service: 'port' has to be a integer." ); - - return -1; - } - - try - { - return Integer.parseInt( portString ); - } - catch ( NumberFormatException e ) - { - getLogger().warn( "Error while deploying xml-rpc service: 'port' has to be a integer." ); - - return -1; - } - } -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/main/java/org/codehaus/plexus/service/xmlrpc/configuration/builder/ServiceConfigurationBuilder.java b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/main/java/org/codehaus/plexus/service/xmlrpc/configuration/builder/ServiceConfigurationBuilder.java deleted file mode 100644 index 427db1ab4..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/main/java/org/codehaus/plexus/service/xmlrpc/configuration/builder/ServiceConfigurationBuilder.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.codehaus.plexus.service.xmlrpc.configuration.builder; - -/* - * The MIT License - * - * Copyright (c) 2004-2005, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.service.xmlrpc.configuration.ServiceConfiguration; - -/** - * @author Emmanuel VEnisse - * @version $Id$ - */ -public interface ServiceConfigurationBuilder -{ - String ROLE = ServiceConfigurationBuilder.class.getName(); - - ServiceConfiguration buildConfiguration( PlexusConfiguration serviceConfiguration ); -} diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/main/resources/META-INF/plexus/components.xml b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index fbd33cf9e..000000000 --- a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - org.codehaus.plexus.appserver.service.PlexusService - xml-rpc - org.codehaus.plexus.service.xmlrpc.XmlRpcPlexusService - - - org.codehaus.plexus.xmlrpc.XmlRpcServer - - - org.codehaus.plexus.service.xmlrpc.configuration.builder.ServiceConfigurationBuilder - - - - - - org.codehaus.plexus.service.xmlrpc.configuration.builder.ServiceConfigurationBuilder - org.codehaus.plexus.service.xmlrpc.configuration.builder.DefaultServiceConfigurationBuilder - - - - diff --git a/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/plexus.properties b/plexus-appserver/plexus-appserver-services/plexus-appserver-service-xmlrpc/src/plexus.properties deleted file mode 100644 index e69de29bb..000000000 diff --git a/plexus-appserver/plexus-appserver-services/pom.xml b/plexus-appserver/plexus-appserver-services/pom.xml deleted file mode 100644 index c27af603d..000000000 --- a/plexus-appserver/plexus-appserver-services/pom.xml +++ /dev/null @@ -1,22 +0,0 @@ - - 4.0.0 - - org.codehaus.plexus - plexus-appserver - 2.0-alpha-4-SNAPSHOT - - plexus-appserver-services - pom - Plexus App Server Services - - - org.codehaus.plexus - plexus-appserver-host - 2.0-alpha-4-SNAPSHOT - - - - plexus-appserver-service-jetty - plexus-appserver-service-xmlrpc - - diff --git a/plexus-appserver/pom.xml b/plexus-appserver/pom.xml deleted file mode 100644 index 0fca1ca8d..000000000 --- a/plexus-appserver/pom.xml +++ /dev/null @@ -1,30 +0,0 @@ - - 4.0.0 - - plexus - org.codehaus.plexus - 1.0.8 - - plexus-appserver - 2.0-alpha-4-SNAPSHOT - Plexus Application Server - pom - - - org.codehaus.plexus - plexus-container-default - 1.0-alpha-10 - - - org.codehaus.plexus - plexus-utils - 1.3 - - - - plexus-appserver-host - plexus-appserver-maven-plugin - plexus-appserver-services - plexus-appserver-runtime-builder - - diff --git a/plexus-appserver/src/site/apt/appserver.apt b/plexus-appserver/src/site/apt/appserver.apt deleted file mode 100644 index 541c5ebc8..000000000 --- a/plexus-appserver/src/site/apt/appserver.apt +++ /dev/null @@ -1,14 +0,0 @@ - ----- - Plexus Appserver - ----- - Jason van Zyl - ----- - 26 April 2006 - ----- - -Plexus Appserver - -* Lifecycle - - services are processed - applications are deployed \ No newline at end of file diff --git a/plexus-appserver/src/site/apt/plexus-runtime.apt b/plexus-appserver/src/site/apt/plexus-runtime.apt deleted file mode 100644 index ec531667c..000000000 --- a/plexus-appserver/src/site/apt/plexus-runtime.apt +++ /dev/null @@ -1,43 +0,0 @@ - ----- - Plexus Runtime Builder - ----- - Jason van Zyl - ----- - 24 April 2006 - -Plexus Runtime Builder - ------ - - - - - org.codehaus.plexus - plexus-maven-plugin - true - - - - runtime - add-app - add-services - - - - - The app and runtime should really be configured separately! - - src/conf/application.xml - src/conf - src/plexus.properties - testapp - - src/conf/plexus.xml - src/plexus.properties - target/plexus-test-runtime - - - - - ------ \ No newline at end of file diff --git a/plexus-appserver/todo.txt b/plexus-appserver/todo.txt deleted file mode 100644 index 5f3f3e2e4..000000000 --- a/plexus-appserver/todo.txt +++ /dev/null @@ -1,12 +0,0 @@ -[ ] web console for app server -[ ] apps need to be shutdown and dispose called -[ ] xmlrpc interface to the app server -[ ] need to know the application class so that it can be shutdown, anything that started up must be shutdown -[ ] REST interface for the app server -[ ] Research the generation of xfire services for applications. -[ ] loggers in plexus should be able to have their threshold set -[ ] design the activity and action flows for plexus apps. use plexus -[ ] actions instead of xwork actions. use id for action exceptions. -[ ] integrate m2 plexus which i have lying around -[ ] general plugin framework - take out of maven and use in modello -[ ] using acegi in plexus \ No newline at end of file diff --git a/plexus-archetypes/plexus-application-view-web/pom.xml b/plexus-archetypes/plexus-application-view-web/pom.xml deleted file mode 100644 index 5c242df4b..000000000 --- a/plexus-archetypes/plexus-application-view-web/pom.xml +++ /dev/null @@ -1,11 +0,0 @@ - - 4.0.0 - - plexus-archetypes - org.codehaus.plexus - 1.0-alpha-1-SNAPSHOT - - plexus-application-view-web - 1.0-alpha-1-SNAPSHOT - Plexus Archetype View Web - diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/forms/addProjectPomUrl.xml b/plexus-archetypes/plexus-application-view-web/src/main/resources/forms/addProjectPomUrl.xml deleted file mode 100644 index f749f5827..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/forms/addProjectPomUrl.xml +++ /dev/null @@ -1,18 +0,0 @@ -
- addProjectPomUrl - - - addProject.pomUrl - default - addProject.pomUrl.message - addProject.pomUrl.label - addProject.pomUrl.error - text - - - - addProjectPomUrl.title - addProjectPomUrl - projectOverview.vm - -
diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/forms/addProjectScm.xml b/plexus-archetypes/plexus-application-view-web/src/main/resources/forms/addProjectScm.xml deleted file mode 100644 index 9c70fb673..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/forms/addProjectScm.xml +++ /dev/null @@ -1,18 +0,0 @@ -
- addProjectScm - - - addProject.scm - default - addProject.scm.message - addProject.scm.label - addProject.scm.error - text - - - - addProjectScm.title - addProjectScm - projectOverview.vm - -
diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/forms/addShellProjectPomUrl.xml b/plexus-archetypes/plexus-application-view-web/src/main/resources/forms/addShellProjectPomUrl.xml deleted file mode 100644 index 7f74b4cd0..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/forms/addShellProjectPomUrl.xml +++ /dev/null @@ -1,18 +0,0 @@ -
- addShellProjectPomUrl - - - addProject.pomUrl - default - addProject.pomUrl.message - addProject.pomUrl.label - addProject.pomUrl.error - text - - - - addProjectPomUrl.title - addShellBuilderProject - projectOverview.vm - -
diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/forms/login.xml b/plexus-archetypes/plexus-application-view-web/src/main/resources/forms/login.xml deleted file mode 100644 index 544613208..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/forms/login.xml +++ /dev/null @@ -1,26 +0,0 @@ -
- login - - - login.username - default - login.username.message - login.username.label - login.username.error - text - - - login.password - default - login.password.message - login.password.label - login.password.error - password - - - - login.title - login - Index.vm - -
diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/localization/Continuum.properties b/plexus-archetypes/plexus-application-view-web/src/main/resources/localization/Continuum.properties deleted file mode 100644 index 01034fc97..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/localization/Continuum.properties +++ /dev/null @@ -1,49 +0,0 @@ -// ---------------------------------------------------------------------- -// Form: Login -// ---------------------------------------------------------------------- - -login.title = Login -login.username.label = Login -login.username.message = Please enter your username -login.username.error = Field is invalid -login.password.label = Password -login.password.message = Please enter your password -login.password.error = Field is invalid - -// ---------------------------------------------------------------------- -// Form: addProject Scm/Url -// ---------------------------------------------------------------------- - -addProjectScm.title=Add Project - SCM -addProjectPomUrl.title=Add Project - POM URL - -addProject.name.label = Project Name -addProject.name.message = Please enter the project name. -addProject.name.error = The project name is invalid. - -addProject.scm.label = Scm Url -addProject.scm.message = Please enter the project's scm url. -addProject.scm.error = The scm url is invalid. - -addProject.nagEmailAddress.label = Nag email address -addProject.nagEmailAddress.message = Please enter the project's nag email address. -addProject.nagEmailAddress.error = The nag email address is invalid. - -addProject.version.label = Version -addProject.version.message = Please enter the project's version. -addProject.version.error = The version is invalid. - -addProject.pomUrl.label = Pom Url -addProject.pomUrl.message = Please enter a URL to the pom. -addProject.pomUrl.error = The pom url is invalid. - -// ---------------------------------------------------------------------- -// Project states -// ---------------------------------------------------------------------- - -org.codehaus.continuum.project.state.new=new -org.codehaus.continuum.project.state.ok=ok -org.codehaus.continuum.project.state.failed=failed -org.codehaus.continuum.project.state.error=error -org.codehaus.continuum.project.state.building=building -org.codehaus.continuum.project.state.signaled=build signaled diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/WEB-INF/web.xml b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/WEB-INF/web.xml deleted file mode 100644 index 471273e5f..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/WEB-INF/web.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - continuum - org.codehaus.plexus.summit.Summit - 5 - - - continuum - /continuum/* - - diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/css/inst.css b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/css/inst.css deleted file mode 100644 index 9929a3018..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/css/inst.css +++ /dev/null @@ -1,146 +0,0 @@ -/* $Id$ - -This file contains rules that extend or override the more basic formatting defined in tigris.css. Edit it to customize the look of applications using tigris.css (instances). You are responsible for maintaining your own set of (optional) deltas from tigris.css defaults; this file is intended as an example. - -*/ - -/* colors, backgrounds, borders, link indication */ -#cn { - background-image: url(../images/corporate_logo.gif); - display: block; - height: 17px; - width: 138px; -} - -#poweredby { - background-image: url(../images/poweredby_036.gif); - display: block; - height: 38px; - width: 102px; -} - -#sc { - background-image: url(../images/product_logo.gif); - display: block; - height: 25px; - width: 138px; -} - -#toptabs td, #toptabs th { - background-image: url(../images/nw_min_036.gif); -} - -.app h3, #banner, #banner td, #toptabs { - background-color: #036; - color: #fff; -} - -body #banner td a, .app h3 a, .app h4 a { - color: #fff !important; -} - -#banner { - border-top: 1px solid #369; -} - -#mytools .label, #projecttools .label, #admintools .label, #communitytools .label { - background-color: #ddd; - border: none; -} - -#mytools .body, #projecttools .body, #admintools .body, #communitytools .body { - background-color: #fff; - border-right: none; - border-bottom: none; - border-top: 1px solid #999; -} - -#mytools, #projecttools, #admintools, #communitytools { - background-color: #ddd; - border-right: 1px solid #666; - border-bottom: 1px solid #666; -} - -#helptext { - background-color: #ffc; -} - -#helptext .label { - border-bottom: 1px solid #996; - border-right: 1px solid #996; - background-color: #cc9; -} - -#helptext .body { - border-bottom: 1px solid #cc9; - border-right: 1px solid #cc9; -} - -#topmodule { - background-color: #ddd; - border-top: 1px solid #fff; - border-bottom: 1px solid #aaa; -} - -#topmodule #issueid { - border-right: 1px solid #aaa; -} - -#login a:link, #login a:visited { - color: white; - text-decoration: underline; -} - -#banner a:active, #banner a:hover { - color: #f90 !important; -} - -#toptabs td { - border-bottom: 1px solid #666; - border-right: 1px solid #333; - border-left: 1px solid #036; -} - -#toptabs th { - border-left: 1px solid #036; -} - -/* font and text properties, exclusive of link indication, alignment, text-indent */ -#bodycol h2 { - font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif; - font-size: 1.5em; - font-weight: normal; -} - -/* box properties (exclusive of borders), positioning, alignments, list types, text-indent */ -#toptabs { - margin: 0; - padding-top: .67em; - padding-left: 8px; -} - -#topmodule { - margin: -4px -4px 0 -4px; -} - -#topmodule td { - vertical-align: middle; - padding: 2px 8px; -} - -#navcolumn { - margin-right: -4px; -} - -#mytools .body, #projecttools .body, #admintools .body, #communitytools .body { - padding-top: .33em; -} - -#mytools, #projecttools, #admintools, #communitytools { - padding: 0 6px 6px 6px; - margin: -4px 0 6px -4px; -} - -#mytools .label, #projecttools .label, #admintools .label, #communitytools .label { - padding-left: 2px; -} diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/css/ns4_only.css b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/css/ns4_only.css deleted file mode 100644 index 274e0a397..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/css/ns4_only.css +++ /dev/null @@ -1,254 +0,0 @@ -/* $Id$ - -simple rules suitable for Netscape 4.x only; richer rules are in tigris.css. see */ - -/* colors, backgrounds, borders, link indication */ - -body { - background: #fff; - color: #000; - } -#leftcol a:link, #leftcol a:visited { - color: blue; - } -a:active, a:hover, #leftcol a:active, #leftcol a:hover { - color: #f30; - } -#login a:link, #login a:visited { - color: white; - text-decoration: underline; - } -#banner a:active, #banner a:hover { - color: #f90; - } -#leftcol a, #breadcrumbs a { - text-decoration: none; - } -#apphead h2 em { - color: #777 - } -.a td { - background: #ddd; - } -.b td { - background: #efefef; - } -.tabs th { - background-color: #ddd; - color: #fff; - } -.tabs td { - background-color: #666; - } -.tabs th, .tabs th a:link, .tabs th a:visited { - color: #333; - } -.tabs td, .tabs td a:link, .tabs td a:visited { - color: #fff; - } -.app th { - background-color: #bbb; - } -.app .axial th { - background-color: #ddd; - color: black - } -.alert { - color: #c00; - } -.confirm { - color: green; - } -.info { - color: blue; - } -.selection { - background: #ffc; - } -#login { - color: #fff; - } -#banner, #banner td { - background: #036; - color: #fff; - } -body #banner #login a { - color: white; - } -.cvsdiff, .cvsblame { - background-color: #ccc; - } -.cvsdiffadd { - background-color: #afa; - } -.cvsdiffremove { - background-color: #faa; - } -.cvsdiffchanges1 { - background-color: #ff7; - } -.cvsdiffchanges2 { - background-color: #ff7; - } -.band1 { - color: #fff; - background-color: #663; -} - -.band2 { - color: #fff; - background-color: #66C; -} - -.band3 { - background-color: #C99; -} - -.band4 { - background-color: #CFF; -} - -.band5 { - color: #fff; - background-color: #336; -} - -.band6 { - color: #fff; - background-color: #966; -} - -.band7 { - background-color: #9CC; -} - -.band8 { - background-color: #FFC; -} - -.band9 { - color: #fff; - background-color: #633; -} - -.band10 { - color: #fff; - background-color: #699; -} - -.band11 { - background-color: #CC9; -} - -.band12 { - background-color: #CCF; -} - -.band13 { - color: #fff; - background-color: #366; -} - -.band14 { - color: #fff; - background-color: #996; -} - -.band15 { - background-color: #99C; -} - -.band16 { - background-color: #FCC; -} - - - -/* font and text properties, exclusive of link indication, alignment, text-indent */ - -body, div, p, th, td, li, dl, dd { - font-family: Lucida, Arial, Helvetica, sans-serif; - } -code, pre { - font-family: 'Andale Mono', Courier, monospace; - } -h2, h3, h4 { - font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif; - } -.selection { - font-weight: bold - } -#login .username { - font-weight: bold; - } -#apphead h2 em { - font-style: normal; - } -.tabs th { - font-weight: bold - } - -/* box properties (exclusive of borders), positioning, alignments, list types, text-indent */ - -th, td { - text-align: left; - vertical-align: top - } -.right { - text-align: right; - } -.center { - text-align: center; - } -body .app .axial th { - text-align: right; - } -.app .axial td th { - text-align: left; - } -body td .stb { - margin-top: 1em; - text-indent: 0; - } -body td .mtb { - margin-top: 2em; - text-indent: 0; - } -dd { - margin-bottom: .67em; - } -#footer, #breadcrumbs { - margin: 4px - } -.courtesylinks { - margin-top: 1em; - padding-top: 1em - } -#navcolumn .toolgroup { - margin-bottom: 1em; - margin-left: 4px; - } -#navcolumn .body div { - margin-top: .3em; - padding-left: 1em; - } -#banner, #banner td { - vertical-align: middle; - } -body.docs, body.nonav { - margin: 1em - } -.tier1 { margin-left: 0 } -.tier2 { margin-left: 1.5em } -.tier3 { margin-left: 3em } -.tier4 { margin-left: 4.5em } -.tier5 { margin-left: 6em } -.tier6 { margin-left: 7.5em } -.tier7 { margin-left: 9em } -.tier8 { margin-left: 10.5em } -.tier9 { margin-left: 12em } -.tier10 { margin-left: 13.5em } - -.messagechild { - padding-left: 34px; -} diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/css/print.css b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/css/print.css deleted file mode 100644 index b08e30242..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/css/print.css +++ /dev/null @@ -1,9 +0,0 @@ -/* $Id$ */ - -#banner, #footer, #leftcol, #breadcrumbs, .docs #toc, .docs .courtesylinks { - display: none; - } -body.docs div.docs { - margin: 0 !important; - border: none !important - } diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/css/tigris.css b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/css/tigris.css deleted file mode 100644 index 8adb0fc4b..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/css/tigris.css +++ /dev/null @@ -1,797 +0,0 @@ -/* $Id$ - - This file defines basic default formatting for HTML conforming to Tigris application style. To extend or override these rules for your instance, edit inst.css instead of this file. */ - -/* colors, backgrounds, borders, link indication */ -body { - background: #fff; - color: #000; -} - -.app h3, .app h4, .tabs td, .tabs th, .functnbar { - background-image: url(../images/nw_maj_rond.gif); - background-repeat: no-repeat; -} - -.functnbar, .functnbar2 { - background-color: #aaa; -} - -.functnbar2, .functnbar3 { - background-color: #aaa; - background-image: url(../images/sw_maj_rond.gif); - background-repeat: no-repeat; - background-position: bottom left; -} - -.functnbar3 { - background-color: #ddd; - background-image: url(../images/sw_med_rond.gif); -} - -.functnbar, .functnbar2, .functnbar3 { - color: #000; -} - -.functnbar a, .functnbar2 a, .functnbar3 a { - color: #000; - text-decoration: underline; -} - -#navcolumn .body div, body.docs #toc li li { - background-image: url(../images/strich.gif); - background-repeat: no-repeat; - background-position: .5em .5em; -} - -#searchbox .body div, #navcolumn .body .heading { - background-image: none; -} - -a:link, #navcolumn a:visited, .app a:visited, .tasknav a:visited { - color: blue; -} - -a:link.selfref, a:visited.selfref { - color: #555 !important; - text-decoration: none; -} - -a:active, a:hover, #leftcol a:active, #leftcol a:hover { - color: #f30 !important; -} - -#leftcol a, #breadcrumbs a { - text-decoration: none; -} - -.app h3, .app h4 { - color: #fff; -} - -.app h3 { - background-color: #333; -} - -.app h3 a:link, .app h3 a:visited, .app h4 a:link, .app h4 a:visited { - color: #fff !important; - text-decoration: underline; -} - -.app h4 { - background-color: #888; -} - -.a td { - background: #ddd; -} - -.b td { - background: #efefef; -} - -.warning td { - background: #cc0000; -} - -table, th, td { - border: none; -} - -div.colbar { - background: #eee; - border-color: #999 #EEE #EEE #999; - border-width: 1px; - border-style: solid; -} - -.toolgroup { - background: #efefef; -} - -.toolgroup .label { - border-bottom: 1px solid #666; - border-right: 1px solid #666; - background: #ddd; - color: #555; -} - -.toolgroup .body { - border-right: 1px solid #aaa; - border-bottom: 1px solid #aaa; -} - -#breadcrumbs { - border-top: 1px solid #fff; - background-color: #ccc; -} - -#main { - border-top: 1px solid #999; -} - -#rightcol div.www, #rightcol div.help { - border: 1px solid #ddd; -} - -body.docs div.docs { - background-color: #fff; - border-left: 1px solid #ddd; - border-top: 1px solid #ddd; -} - -#helptext .label { - background-image: url(../images/icon_help_sml.gif); - background-repeat: no-repeat; - background-position: 97%; -} - -body.docs { - background: #eee url(../images/help_logo.gif) top right no-repeat !important; -} - -.docs h3, .docs h4 { - border-top: solid 1px #000; -} - -#apphead h2 em { - color: #777; -} - -.app th { - background-color: #bbb; -} - -.tabs th { - border-right: 1px solid #333; - background-color: #ddd; - color: #fff; - border-left: 1px solid #fff; -} - -.tabs td { - background-color: #999; - border-bottom: 1px solid #fff; - border-right: 1px solid #fff; - border-left: 1px solid #fff; -} - -.tabs { - border-bottom: 6px #ddd solid; -} - -.tabs th, .tabs th a:link, .tabs th a:visited { - color: #555; -} - -.tabs td, .tabs td a:link, .tabs td a:visited { - color: #fff; -} - -.tabs a { - text-decoration: none; -} - -.axial th { - background-color: #ddd; - color: black; -} - -.alert { - background-color: #ff9; -} - -.expandedwaste { - background: url(../images/icon_arrowwaste2_sml.gif) no-repeat; -} - -.collapsedwaste { - background: url(../images/icon_arrowwaste1_sml.gif) no-repeat; -} - -.filebrowse .expanded, .filebrowse-alt .expanded { - background-image: url(../images/icon_arrowfolderopen2_sml.gif); - background-repeat: no-repeat; -} - -.filebrowse .collapsed, .filebrowse-alt .collapsed { - background-image: url(../images/icon_arrowfolderclosed1_sml.gif); - background-repeat: no-repeat; -} - -.filebrowse .leafnode, .filebrowse-alt .leafnode { - background-image: url(../images/icon_folder_sml.gif); - background-repeat: no-repeat; -} - -.filebrowse .leaf, .filebrowse-alt .leaf { - background-image: url(../images/icon_doc_sml.gif); - background-repeat: no-repeat; -} - -.sortup { - background: url(../images/icon_sortup.gif) no-repeat; -} - -.sortdown { - background: url(../images/icon_sortdown.gif) no-repeat; -} - -.collapsedwaste { - background: url(../images/icon_arrowwaste1_sml.gif) no-repeat; -} - -body .grid td { - border-top: 1px solid #ccc; - border-left: 1px solid #ccc; - background-color: transparent; -} - -.confirm { - color: #090; -} - -.info { - color: #069; -} - -.errormessage, .warningmessage, .donemessage, .infomessage { - border-top: 5px solid #900; - border-left: 1px solid #900; - background-image: url(../images/icon_error_lrg.gif); - background-repeat: no-repeat; - background-position: 5px 1.33em; -} - -.warningmessage { - background-image: url(../images/icon_warning_lrg.gif); - border-color: #c60; -} - -.donemessage { - background-image: url(../images/icon_success_lrg.gif); - border-color: #090; -} - -.infomessage { - background-image: url(../images/icon_info_lrg.gif); - border-color: #069; -} - -.docinfo { - background: url(../images/icon_doc_lrg.gif) no-repeat; -} - -.dirinfo { - background: url(../images/icon_folder_lrg.gif) no-repeat; -} - -.memberinfo { - background: url(../images/icon_members_lrg.gif) no-repeat; -} - -.usergroupinfo { - background: url(../images/icon_usergroups_lrg.gif) no-repeat; -} - -.errormark, .warningmark, .donemark, .infomark { - background: url(../images/icon_error_sml.gif) no-repeat; -} - -.warningmark { - background-image: url(../images/icon_warning_sml.gif); -} - -.donemark { - background-image: url(../images/icon_success_sml.gif); -} - -.infomark { - background-image: url(../images/icon_info_sml.gif); -} - -.cvsdiff, .cvsblame { - background-color: #ccc; -} - -.cvsdiffadd { - background-color: #afa; -} - -.cvsdiffremove { - background-color: #faa; -} - -.cvsdiffchanges1 { - background-color: #ff7; -} - -.cvsdiffchanges2 { - background-color: #ff7; -} - -li.selection ul a { - background: #fff; -} - -.band1 { - color: #fff; - background-color: #663; -} - -.band2 { - color: #fff; - background-color: #66C; -} - -.band3 { - background-color: #C99; -} - -.band4 { - background-color: #CFF; -} - -.band5 { - color: #fff; - background-color: #336; -} - -.band6 { - color: #fff; - background-color: #966; -} - -.band7 { - background-color: #9CC; -} - -.band8 { - background-color: #FFC; -} - -.band9 { - color: #fff; - background-color: #633; -} - -.band10 { - color: #fff; - background-color: #699; -} - -.band11 { - background-color: #CC9; -} - -.band12 { - background-color: #CCF; -} - -.band13 { - color: #fff; - background-color: #366; -} - -.band14 { - color: #fff; - background-color: #996; -} - -.band15 { - background-color: #99C; -} - -.band16 { - background-color: #FCC; -} - -.app .helplink, #helptext .helplink { - cursor: help; -} - -.legend th, .bars th { - background-color: #fff; -} - -/* font and text properties, exclusive of link indication, alignment, text-indent */ -body, th, td, input, select { - font-family: Verdana, Helvetica, Arial, sans-serif; -} - -code, pre { - font-family: 'Andale Mono', Courier, monospace; -} - -body, .app h3, .app h4, #rightcol h3, pre, code, #apphead h2 small { - font-size: x-small; - voice-family: "\"}\""; - voice-family: inherit; - font-size: small; -} - -small, div#footer, div#login, div.tabs th, div.tabs td, input, select, .paginate, .functnbar, .functnbar2, .functnbar3, #breadcrumbs, .courtesylinks, #rightcol div.help, .colbar, .tasknav, body.docs div#toc, #leftcol, .legend, .bars { - font-size: xx-small; - voice-family: "\"}\""; - voice-family: inherit; - font-size: x-small; -} - -.tabs td, .tabs th, dt, .tasknav .selfref, #login .username, .selection { - font-weight: bold; -} - -li.selection ul { - font-weight: normal; -} - -h4, table { - font-size: 1em; -} - -#apphead h2 em { - font-style: normal; -} - -#banner h1 { - font-size: 1.25em; -} - -/* box properties (exclusive of borders), positioning, alignments, list types, text-indent */ -#bodycol h2 { - margin-top: .3em; - margin-bottom: .5em; -} - -p, ul, ol, dl, .bars table { - margin-top: .67em; - margin-bottom: .67em; -} - -h3, h4 { - margin-bottom: 0; -} - -form { - margin: 0; -} - -#bodycol { - padding-left: 12px; - padding-right: 12px; - width: 100%; - voice-family: "\"}\""; - voice-family: inherit; - width: auto; -} - -html>body #bodycol { - width: auto; -} - -.docs { - line-height: 1.4; -} - -ol ol { - list-style-type: lower-alpha; -} - -ol ol ol { - list-style-type: lower-roman; -} - -.app h3, .app h4 { - padding: 5px; - margin-right: 2px; - margin-left: 2px; -} - -.app td, .app th { - padding: 2px 3px; -} - -.h3 p, .h4 p, .h3 dt, .h4 dt { - margin-right: 7px; - margin-left: 7px; -} - -.tasknav { - margin-bottom: 1.33em; -} - -div.colbar { - padding: 3px; - margin: 2px 2px 0; -} - -.tabs { - margin-top: .67em; - margin-right: 2px; - margin-left: 2px; - padding-left: 8px; -} - -.tabs td, .tabs th { - padding: 3px 9px; -} - -#rightcol div.www, #rightcol div.help { - padding: 0 .5em; -} - -body.docs #toc { - position: absolute; - top: 15px; - left: 0px; - width: 120px; - padding: 0 20px 0 0; -} - -body.docs #toc ul, #toc ol { - margin-left: 0; - padding-left: 0; -} - -body.docs #toc li { - margin-top: 7px; - padding-left: 10px; - list-style-type: none; -} - -body.docs div.docs { - margin: 61px 0 0 150px; - padding: 1em 2em 1em 1em !important; -} - -.docs p+p { - text-indent: 5%; - margin-top: -.67em; -} - -.docs h3, .docs h4 { - margin-bottom: .1em; - padding-top: .3em; -} - -.functnbar, .functnbar2, .functnbar3 { - padding: 5px; - margin: .67em 2px; -} - -.functnbar3 { - margin-top: 0; -} - -body { - padding: 1em; -} - -body.composite, body.docs { - margin: 0; - padding: 0; -} - -th, td { - text-align: left; - vertical-align: top; -} - -.right { - text-align: right !important; -} - -.center { - text-align: center !important; -} - -.axial th, .axial th .strut { - text-align: right; -} - -.app .axial td th { - text-align: left; -} - -body .stb { - margin-top: 1em; - text-indent: 0; -} - -body .mtb { - margin-top: 2em; - text-indent: 0; -} - -.courtesylinks { - margin-top: 1em; - padding-top: 1em; -} - -dd { - margin-bottom: .67em; -} - -.toolgroup { - margin-bottom: 6px; -} - -.toolgroup .body { - padding: 4px 4px 4px 0; -} - -.toolgroup .label { - padding: 4px; -} - -.toolgroup .body div { - padding-bottom: .3em; - padding-left: 1em; -} - -.toolgroup .body div div { - margin-top: .3em; - padding-bottom: 0; -} - -.tier1 { - margin-left: 0; -} - -.tier2 { - margin-left: 1.5em; -} - -.tier3 { - margin-left: 3em; -} - -.tier4 { - margin-left: 4.5em; -} - -.tier5 { - margin-left: 6em; -} - -.tier6 { - margin-left: 7.5em; -} - -.tier7 { - margin-left: 9em; -} - -.tier8 { - margin-left: 10.5em; -} - -.tier9 { - margin-left: 12em; -} - -.tier10 { - margin-left: 13.5em; -} - -.filebrowse .expanded, .filebrowse .collapsed { - padding-left: 34px; -} - -.filebrowse .leafnode, .filebrowse .leaf { - padding-left: 20px; -} - -.messagechild { - padding-left: 34px; -} - -.filebrowse-alt .expanded, .filebrowse-alt .collapsed, .filebrowse-alt .leaf, .filebrowse-alt .leafnode, .expandedwaste, .collapsedwaste, .sortup, .sortdown { - /* hide from macie5\*/ - float: left; - /* resume */ - display: inline-block; - height: 15px; - width: 34px; - padding-left: 0 !important; -} - -.filebrowse-alt .leaf, .filebrowse-alt .leafnode, .sortup, .sortdown { - width: 20px; -} - -.filebrowse ul, .filebrowse-alt ul { - list-style-type: none; - padding-left: 0; - margin-left: 0; -} - -.filebrowse ul ul, .filebrowse-alt ul ul { - margin-left: 1.5em; - margin-top: 0; - padding-top: .67em; -} - -.filebrowse li, .filebrowse-alt li { - margin-bottom: .67em; -} - -td.filebrowse h3 { - margin-top: 0; -} - -.errormessage, .warningmessage, .donemessage, .infomessage, .docinfo, .dirinfo, .memberinfo, .usergroupinfo { - margin: .67em 0; - padding: .33em 0 .67em 42px; - min-height: 32px; -} - -.errormark, .warningmark, .donemark, .infomark { - padding-left: 20px; - min-height: 15px; -} - -.alt { - display: none; -} - -#banner h1 { - margin: 0; -} - -#leftcol { - width: 14em; -} - -.axial th, .axial th .strut, #leftcol .strut { - width: 12em; -} - -#breadcrumbs { - padding: 2px 8px; -} - -.app h3, .app h4, .bars { - clear: both; -} - -.legend { - float: right; -} - -.legend th, .bars th { - text-align: right; - padding-left: 1em; -} - -.bars table { - table-layout: fixed; -} - -.bars th { - width: 12em; -} - -#projectdocumentlist td.filebrowse-alt { - padding-right: .75em; -} diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/codehaus-small.png b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/codehaus-small.png deleted file mode 100644 index d4b837187..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/codehaus-small.png and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/continuum_logo.png b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/continuum_logo.png deleted file mode 100644 index 0559f4152..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/continuum_logo.png and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/corporate_logo.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/corporate_logo.gif deleted file mode 100644 index b291fb7a7..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/corporate_logo.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/docorama.png b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/docorama.png deleted file mode 100644 index 5635609d2..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/docorama.png and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/file.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/file.gif deleted file mode 100644 index 72c13cc75..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/file.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/folder-closed.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/folder-closed.gif deleted file mode 100644 index 2baed621d..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/folder-closed.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/folder-open.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/folder-open.gif deleted file mode 100644 index 3955d19e5..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/folder-open.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/help_logo.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/help_logo.gif deleted file mode 100644 index cc25c033e..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/help_logo.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_alert.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_alert.gif deleted file mode 100644 index 4968bca45..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_alert.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_alertsml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_alertsml.gif deleted file mode 100644 index 641308d18..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_alertsml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowfolder1_sml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowfolder1_sml.gif deleted file mode 100644 index 89408afae..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowfolder1_sml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowfolder2_sml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowfolder2_sml.gif deleted file mode 100644 index d9e7e1cf9..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowfolder2_sml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowfolderclosed1_sml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowfolderclosed1_sml.gif deleted file mode 100644 index c48e8b649..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowfolderclosed1_sml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowfolderopen2_sml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowfolderopen2_sml.gif deleted file mode 100644 index 477e327cb..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowfolderopen2_sml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowmembers1_sml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowmembers1_sml.gif deleted file mode 100644 index b4dea8301..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowmembers1_sml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowmembers2_sml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowmembers2_sml.gif deleted file mode 100644 index 0e743574f..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowmembers2_sml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowusergroups1_sml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowusergroups1_sml.gif deleted file mode 100644 index 5177959c3..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowusergroups1_sml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowusergroups2_sml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowusergroups2_sml.gif deleted file mode 100644 index 574bb4561..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowusergroups2_sml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowwaste1_sml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowwaste1_sml.gif deleted file mode 100644 index 25d75f73b..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowwaste1_sml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowwaste2_sml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowwaste2_sml.gif deleted file mode 100644 index 54dbf4259..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_arrowwaste2_sml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_confirmsml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_confirmsml.gif deleted file mode 100644 index ca3c810bd..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_confirmsml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_doc_lrg.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_doc_lrg.gif deleted file mode 100644 index b4582671a..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_doc_lrg.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_doc_sml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_doc_sml.gif deleted file mode 100644 index 239bfaadb..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_doc_sml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_error_lrg.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_error_lrg.gif deleted file mode 100644 index fccffd17d..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_error_lrg.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_error_sml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_error_sml.gif deleted file mode 100644 index 61132ef2b..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_error_sml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_folder_lrg.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_folder_lrg.gif deleted file mode 100644 index 3683e75ce..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_folder_lrg.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_folder_sml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_folder_sml.gif deleted file mode 100644 index 8e26f89ab..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_folder_sml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_help_lrg.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_help_lrg.gif deleted file mode 100644 index c2162957f..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_help_lrg.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_help_sml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_help_sml.gif deleted file mode 100644 index 43bfd56ff..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_help_sml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_info_lrg.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_info_lrg.gif deleted file mode 100644 index b390fd4ac..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_info_lrg.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_info_sml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_info_sml.gif deleted file mode 100644 index c6cb9ad7c..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_info_sml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_infosml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_infosml.gif deleted file mode 100644 index 1aa2d30ac..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_infosml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_members_lrg.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_members_lrg.gif deleted file mode 100644 index 7ba2df6b9..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_members_lrg.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_members_sml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_members_sml.gif deleted file mode 100644 index 997e6998f..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_members_sml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_sortdown.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_sortdown.gif deleted file mode 100644 index 9561bbe2a..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_sortdown.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_sortleft.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_sortleft.gif deleted file mode 100644 index 4fd21e8c0..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_sortleft.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_sortright.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_sortright.gif deleted file mode 100644 index ea8076e3e..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_sortright.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_sortup.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_sortup.gif deleted file mode 100644 index 61942d6d1..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_sortup.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_success_lrg.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_success_lrg.gif deleted file mode 100644 index 9af317d84..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_success_lrg.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_success_sml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_success_sml.gif deleted file mode 100644 index 52e85a430..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_success_sml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_usergroups_lrg.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_usergroups_lrg.gif deleted file mode 100644 index 3a4e35693..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_usergroups_lrg.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_usergroups_sml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_usergroups_sml.gif deleted file mode 100644 index 923610139..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_usergroups_sml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_warning_lrg.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_warning_lrg.gif deleted file mode 100644 index 83359d818..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_warning_lrg.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_warning_sml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_warning_sml.gif deleted file mode 100644 index 873bbb52c..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_warning_sml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_waste_lrg.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_waste_lrg.gif deleted file mode 100644 index e5434aa48..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_waste_lrg.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_waste_sml.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_waste_sml.gif deleted file mode 100644 index 6dd046d46..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/icon_waste_sml.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_maj.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_maj.gif deleted file mode 100644 index 452296b7b..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_maj.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_maj_hi.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_maj_hi.gif deleted file mode 100644 index 54c39336e..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_maj_hi.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_maj_rond.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_maj_rond.gif deleted file mode 100644 index add42a402..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_maj_rond.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_med.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_med.gif deleted file mode 100644 index d2b6d91de..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_med.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_med_hi.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_med_hi.gif deleted file mode 100644 index 0c2db4cf6..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_med_hi.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_med_rond.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_med_rond.gif deleted file mode 100644 index 8aaa564ef..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_med_rond.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_min.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_min.gif deleted file mode 100644 index bf4bc759c..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_min.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_min_036.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_min_036.gif deleted file mode 100644 index eb344a8fd..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_min_036.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_min_hi.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_min_hi.gif deleted file mode 100644 index a8a30abf4..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/nw_min_hi.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/poweredby_036.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/poweredby_036.gif deleted file mode 100644 index 49d0345da..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/poweredby_036.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/product_logo.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/product_logo.gif deleted file mode 100644 index 327b83886..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/product_logo.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/se_maj_rond.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/se_maj_rond.gif deleted file mode 100644 index da2510e98..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/se_maj_rond.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/strich.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/strich.gif deleted file mode 100644 index a33e79d96..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/strich.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/sw_maj_rond.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/sw_maj_rond.gif deleted file mode 100644 index 110bdf4e3..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/sw_maj_rond.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/sw_med_rond.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/sw_med_rond.gif deleted file mode 100644 index 6671c3d0d..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/sw_med_rond.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/sw_min.gif b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/sw_min.gif deleted file mode 100644 index d96369d4e..000000000 Binary files a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/images/sw_min.gif and /dev/null differ diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/scripts/tigris.js b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/scripts/tigris.js deleted file mode 100644 index 5c9bb152b..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/scripts/tigris.js +++ /dev/null @@ -1,61 +0,0 @@ -// Write the Netscape 4-specific stylesheet. -if (document.layers) { - document.writeln('') -} - - -// Focus on user name input (the "loginform.loginID" field). -function focus() { - if (document.loginform) { - document.loginform.loginID.focus(); - } -} - -/* Open popup widows of (mostly) predetermined types. - - windowURL -- The URL to load in the new browser window. - type -- The (predetermined) type of window to launch. - acceptable values for type: - 1: a help window - 2: a 400x400 window - 3: Issuezilla assignable users popup window - ... and you can hard code others yourself inside the function. - atts -- (optional) If the window you wish to create is unique and you do - not want to set up a "type" for it, or if you want to pass - additional attributes for a certain "type", you can pass its - attributes directly to the function via this parameter. -*/ - -var tigrisPopupCounter = 0; - -function launch(windowURL, type, atts) { - tigrisPopupCounter += 1; - - var windowName = 'SourceCast' + type; - if (atts) { - windowName += tigrisPopupCounter; - } - - var windowAttributes; - if (type == 1) { - windowAttributes = 'resizable=yes,left=10,top=10,screenX=12,screenY=12,height=485,width=724,status=yes,scrollbars=yes,toolbar=yes,menubar=yes,location=yes' - } - else if (type == 2) { - windowAttributes = 'resizable=yes,left=10,top=10,screenX=12,screenY=12,height=400,width=400'; - } - else if (type == 3) { - windowAttributes = 'resizable=yes,left=10,top=10,screenX=12,screenY=12,height=440,width=600,scrollbars=yes'; - } - if (atts) { - windowAttributes += ',' + atts; - } - - var windowObj = window.open(windowURL, windowName, windowAttributes); - - if (windowObj) { - return false; - } - else { - return true; - } -} diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/CommonMacros.vm b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/CommonMacros.vm deleted file mode 100644 index 058dfb27f..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/CommonMacros.vm +++ /dev/null @@ -1,253 +0,0 @@ -#macro ( keyField $entity $label $key $value $help ) - - $label - - #if ( $entity ) - $value - - #else - - #end - - -#end - -#macro ( field $label $key $value $help ) - - $label - - - - -#end - -#macro ( help $message ) -
-
- - $message - -#end - -#macro ( addBar $path ) - -#end - -#macro ( viewField $label $value ) - -$label -$!value - -#end - -#macro ( renderSummary $sr $id $link ) - -
-
-

$sr.getTitle($id)

- - - - #foreach ( $columnHeader in $sr.getHeaders($id) ) - - #end - - - - #set ( $deleteAction = "web-delete-${id}" ) - - #set ( $class = "a" ) - - #foreach ( $object in $sr.getCollection($id) ) - - #set( $keyValue = $sr.getKeyValue( $id, $object ) ) - #foreach ( $value in $sr.getValues( $id, $object ) ) - - #end - - - - - #if ( $class == "a" ) - #set ( $class = "b" ) - #else - #set ( $class = "a" ) - #end - #end - -
$columnHeader
$valueViewEditDelete
- - #addBar( "$id,${id}-edit.vm" ) - -
-
-#end - -#macro ( renderMessageSummary $sr $id $link ) - -
-
-

$sr.getTitle($id)

- - - - #foreach ( $columnHeader in $sr.getHeaders($id) ) - - #end - - - - #set ( $deleteAction = "web-delete-${id}" ) - - #set ( $class = "a" ) - - #foreach ( $object in $sr.getCollection($id) ) - - #set( $keyValue = $sr.getKeyValue( $id, $object ) ) - #foreach ( $value in $sr.getValues( $id, $object ) ) - - #end - - - #if ( $class == "a" ) - #set ( $class = "b" ) - #else - #set ( $class = "a" ) - #end - #end - -
$columnHeader
$valueView
- -
- -
-
-#end - -#macro ( renderUserSummary $sr $id $link ) - -
-
-

$sr.getTitle($id)

- - - - #foreach ( $columnHeader in $sr.getHeaders($id) ) - - #end - - - - #set ( $deleteAction = "web-delete-${id}" ) - - #set ( $class = "a" ) - - #foreach ( $object in $sr.getCollection($id) ) - - #set( $keyValue = $sr.getKeyValue( $id, $object ) ) - #foreach ( $value in $sr.getValues( $id, $object ) ) - - #end - - - - - - #if ( $class == "a" ) - #set ( $class = "b" ) - #else - #set ( $class = "a" ) - #end - #end - -
$columnHeader
$valueRolesViewEditDelete
- - #addBar( "$id,${id}-edit.vm" ) - -
-
-#end - - -#macro ( renderEdit $id $fm $object $link ) - -#set ( $form = $fm.getForm( $id ) ) - -
-
-

$fm.getTitle( $form )

-
-
- - #foreach ( $element in $form.formElements ) - #if ( $velocityCount == 1 ) - #keyField( $object $fm.getLabel( $element ) $element.id $fm.getValue( $element, $object ) $fm.getMessage( $element ) ) - #else - #field( $fm.getLabel( $element ) $element.id $fm.getValue( $element, $object ) $fm.getMessage( $element ) ) - #end - #end -
-
-
- #if ( $tpi ) - - #else - - #end -
-
-
-
-#end - -#macro ( renderView $id $fm $object $link ) - -#set ( $form = $fm.getForm( $id ) ) - -
-
-

$fm.getTitle( $form )

-
- - #foreach ( $element in $form.formElements ) - #viewField( $fm.getLabel( $element ) $fm.getValue( $element, $object ) ) - #end -
-
-
-
-
-#end - -#macro ( verifyDelete $id $fm $object $link $keyValue) - -#set ( $form = $fm.getForm( $id ) ) -#set ( $deleteAction = "web-delete-${id}" ) - -
-
- -
-
- Are you really sure you want to delete this? -
- -

$fm.getTitle( $form )

-
- - #foreach ( $element in $form.formElements ) - #viewField( $fm.getLabel( $element ) $fm.getValue( $element, $object ) ) - #end -
-
-
-
- -
-
-
-
-#end - diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/layouts/Default.vm b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/layouts/Default.vm deleted file mode 100644 index c27ef3e31..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/layouts/Default.vm +++ /dev/null @@ -1,61 +0,0 @@ - - - - - Continuum - - - - - - - - - - - - - - - - - - - -
- #parse("navigations/Menu.vm") - -
- $screenViewContent -
-
- - #parse("navigations/DefaultBottom.vm") - - - diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/layouts/Login.vm b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/layouts/Login.vm deleted file mode 100644 index e43984172..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/layouts/Login.vm +++ /dev/null @@ -1,62 +0,0 @@ - - - - - Docorama - - - - - - - - - - - - - - - - - - - -
- ##parse("navigations/Menu.vm") - -
- - $screenViewContent -
-
- - #parse("navigations/DefaultBottom.vm") - - - diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/navigations/DefaultBottom.vm b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/navigations/DefaultBottom.vm deleted file mode 100644 index 5e734a9d1..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/navigations/DefaultBottom.vm +++ /dev/null @@ -1,11 +0,0 @@ - diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/navigations/DefaultTop.vm b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/navigations/DefaultTop.vm deleted file mode 100644 index 16ac58bf0..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/navigations/DefaultTop.vm +++ /dev/null @@ -1,2 +0,0 @@ -Summit Test App -
diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/navigations/Menu.vm b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/navigations/Menu.vm deleted file mode 100644 index 5fc0448c3..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/navigations/Menu.vm +++ /dev/null @@ -1,16 +0,0 @@ - diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/Error.vm b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/Error.vm deleted file mode 100644 index 8c4e32395..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/Error.vm +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - -

Error

-
-$exceptionStackTrace
-
-
-
diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/ExternalMaven2BuildResult.vm b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/ExternalMaven2BuildResult.vm deleted file mode 100644 index 8a0b67d8b..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/ExternalMaven2BuildResult.vm +++ /dev/null @@ -1,38 +0,0 @@ -## Input -## $project ProjectModel -## $build ExternalMaven2BuildResultModel -
-

Build result for $project.name

-

- - - - - - - - - - - - - - - - -
Start Time$build.startTime
End Time$build.endTime
State$build.state
- Project Details | - Builds -
-

- -

Standard Output

-

-

$build.result.standardOutput
-

- -

Standard Error

-

-

$build.result.standardError
-

-
diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/Index.vm b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/Index.vm deleted file mode 100644 index b80d0ec16..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/Index.vm +++ /dev/null @@ -1,6 +0,0 @@ -
-

Welcome to Continuum!

-

- Please visit the continuum site for more information. -

-
diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/Issue.vm b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/Issue.vm deleted file mode 100644 index 43b440ef3..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/Issue.vm +++ /dev/null @@ -1,24 +0,0 @@ -
-

Maven book

-

- #set ( $class = "a" ) - - - - - - - #foreach ( $doc in $docorama.issueStorage.issues ) - - - - - #if ( $class == "a" ) - #set ( $class = "b" ) - #else - #set ( $class = "a" ) - #end - #end -
Issue SummaryDetail
$doc.summary$doc.detail
-

-
diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/Login.vm b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/Login.vm deleted file mode 100644 index cca29138d..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/Login.vm +++ /dev/null @@ -1,18 +0,0 @@ -
- -

Login

-
- -
- - #field( "Login" "login" "" "Enter your user name" ) - #field( "Password" "password" "" "Enter your password" ) -
-
- -
- -
-
- -
diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/Mif.vm b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/Mif.vm deleted file mode 100644 index 236d3b7f4..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/Mif.vm +++ /dev/null @@ -1,13 +0,0 @@ -
-

Maven book

-
-
-

- -

-
-
- -
-
-
diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/ShellBuildResult.vm b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/ShellBuildResult.vm deleted file mode 100644 index 8a0b67d8b..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/ShellBuildResult.vm +++ /dev/null @@ -1,38 +0,0 @@ -## Input -## $project ProjectModel -## $build ExternalMaven2BuildResultModel -
-

Build result for $project.name

-

- - - - - - - - - - - - - - - - -
Start Time$build.startTime
End Time$build.endTime
State$build.state
- Project Details | - Builds -
-

- -

Standard Output

-

-

$build.result.standardOutput
-

- -

Standard Error

-

-

$build.result.standardError
-

-
diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/confirmRemoveProject.vm b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/confirmRemoveProject.vm deleted file mode 100644 index c4f2a7082..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/confirmRemoveProject.vm +++ /dev/null @@ -1,28 +0,0 @@ -
-

Confirm removal of $project.name

- - - - -
- - - - - -
-
- - - - -
-
-
- - - -
-
-
-
diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/editProject.vm b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/editProject.vm deleted file mode 100644 index f914b2482..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/editProject.vm +++ /dev/null @@ -1,31 +0,0 @@ -
-

Edit Project $project.name

-
- - -

- - - - - - - - - - - - - - - - - -
Project Name
Scm url
Nag email address
Version
-

-
- - -
-
-
diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/projectBuilds.vm b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/projectBuilds.vm deleted file mode 100644 index e7bbed8e8..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/projectBuilds.vm +++ /dev/null @@ -1,42 +0,0 @@ -## Input -## $project ContinuumProject -## $builds List of BuildResults -
-

Build results for $project.name

- - - - -
- Back to project details. -
-

- #set ( $class = "a" ) - - - - - - - - - #foreach ( $build in $builds ) - - - - -#if( $build.state == "ok" || $build.state == "failed" || $build.state == "error" ) - -#else - -#end - - #if ( $class == "a" ) - #set ( $class = "b" ) - #else - #set ( $class = "a" ) - #end - #end -
Start TimeEnd TimeStateOutput
$build.startTime$build.endTime$build.stateOutput
-

-
diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/projectDetails.vm b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/projectDetails.vm deleted file mode 100644 index 0353a49e7..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/projectDetails.vm +++ /dev/null @@ -1,79 +0,0 @@ -$css.reset() -
-

Project Details: $project.name

-#if ( $buildId ) -

- Build enqueued, build id: $buildId. -

-#end -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Include project type specific info -#if ( $project.builderId == "maven2" ) -#set ( $desc = $project.descriptor ) - - - - -#elseif ( $project.type == "maven" ) - -#else - - - - -#end - - - - -
Project Name$project.name
Current State$project.state
Project type$project.builderId
Scm url$project.scmUrl
Nag email address$project.nagEmailAddress
Version$project.version
Working directory$project.workingDirectory
Goals -#foreach( $goal in $desc.goals) - $goal
-#end -
UNKNOWN PROJECT TYPE '$project.type' 
Actions - Edit project | - Remove project | - Enqueue for build | - Builds | - Update project descriptor from SCM -
-

-#if( $latestBuild && ( $latestBuild.state == "ok" || $latestBuild.state == "failed" || $latestBuild.state == "error" ) ) -#set ( $build = $latestBuild ) -#if ( $project.type == "maven2" ) -#parse ( "screens/ExternalMaven2BuildResult.vm" ) -#elseif( $project.type == "maven" ) -#parse ( "screens/ShellBuildResult.vm" ) -#else - -#end -#end diff --git a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/projectOverview.vm b/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/projectOverview.vm deleted file mode 100644 index 83cc023a3..000000000 --- a/plexus-archetypes/plexus-application-view-web/src/main/resources/web/continuumweb/templates/screens/projectOverview.vm +++ /dev/null @@ -1,39 +0,0 @@ -
-

Project Summary

-#if ( $error ) -

- $error -#if ( $exception ) -

-    $exception
-    
-#end -

-#end -

- #set ( $class = "a" ) - - - - - - - #foreach ( $project in $projects ) - #if ( $project.state == "failed" ) - #set ( $class = "warning" ) - #end - - - - - - - #if ( $class == "a" ) - #set ( $class = "b" ) - #else - #set ( $class = "a" ) - #end - #end -
Project NameStateDetails
$project.name$project.state $project.idDetails
-

-
diff --git a/plexus-archetypes/plexus-archetype-application/pom.xml b/plexus-archetypes/plexus-archetype-application/pom.xml deleted file mode 100644 index 487cae3c7..000000000 --- a/plexus-archetypes/plexus-archetype-application/pom.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - plexus-archetypes - org.codehaus.plexus - 1.0-alpha-1-SNAPSHOT - - 4.0.0 - plexus-archetype-application - jar - 1.0-alpha-1-SNAPSHOT - Plexus Archetype Application - \ No newline at end of file diff --git a/plexus-archetypes/plexus-archetype-application/src/main/resources/META-INF/archetype.xml b/plexus-archetypes/plexus-archetype-application/src/main/resources/META-INF/archetype.xml deleted file mode 100644 index 003095172..000000000 --- a/plexus-archetypes/plexus-archetype-application/src/main/resources/META-INF/archetype.xml +++ /dev/null @@ -1,7 +0,0 @@ - - plexus-archetype-component-simple - - src/conf/application.xml - src/plexus.properties - - diff --git a/plexus-archetypes/plexus-archetype-application/src/main/resources/archetype-resources/pom.xml b/plexus-archetypes/plexus-archetype-application/src/main/resources/archetype-resources/pom.xml deleted file mode 100644 index 6037f1d41..000000000 --- a/plexus-archetypes/plexus-archetype-application/src/main/resources/archetype-resources/pom.xml +++ /dev/null @@ -1,30 +0,0 @@ - - 4.0.0 - $groupId - $artifactId - $version - plexus-application - - - junit - junit - 3.8.1 - test - - - - - - org.codehaus.plexus - plexus-appserver-maven-plugin - true - - src/conf - foo - src/conf/application.xml - src/plexus.properties - - - - - diff --git a/plexus-archetypes/plexus-archetype-application/src/main/resources/archetype-resources/src/conf/application.xml b/plexus-archetypes/plexus-archetype-application/src/main/resources/archetype-resources/src/conf/application.xml deleted file mode 100644 index af2f01131..000000000 --- a/plexus-archetypes/plexus-archetype-application/src/main/resources/archetype-resources/src/conf/application.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - ${plexus.home}/lib - - - - - - - diff --git a/plexus-archetypes/plexus-archetype-application/src/main/resources/archetype-resources/src/plexus.properties b/plexus-archetypes/plexus-archetype-application/src/main/resources/archetype-resources/src/plexus.properties deleted file mode 100644 index f54f8ab10..000000000 --- a/plexus-archetypes/plexus-archetype-application/src/main/resources/archetype-resources/src/plexus.properties +++ /dev/null @@ -1 +0,0 @@ -name = jason diff --git a/plexus-archetypes/plexus-archetype-component-simple/pom.xml b/plexus-archetypes/plexus-archetype-component-simple/pom.xml deleted file mode 100644 index 853f5ae55..000000000 --- a/plexus-archetypes/plexus-archetype-component-simple/pom.xml +++ /dev/null @@ -1,11 +0,0 @@ - - 4.0.0 - - plexus-archetypes - org.codehaus.plexus - 1.0-alpha-1-SNAPSHOT - - plexus-archetype-component-simple - 1.0-alpha-1-SNAPSHOT - Plexus Archetype Component Simple - diff --git a/plexus-archetypes/plexus-archetype-component-simple/src/main/resources/META-INF/archetype.xml b/plexus-archetypes/plexus-archetype-component-simple/src/main/resources/META-INF/archetype.xml deleted file mode 100644 index f2bd276c9..000000000 --- a/plexus-archetypes/plexus-archetype-component-simple/src/main/resources/META-INF/archetype.xml +++ /dev/null @@ -1,13 +0,0 @@ - - plexus-archetype-component-simple - - src/main/java/HelloWorld.java - src/main/java/DefaultHelloWorld.java - - - src/main/resources/META-INF/plexus/components.xml - - - src/test/java/HelloWorldTest.java - - diff --git a/plexus-archetypes/plexus-archetype-component-simple/src/main/resources/archetype-resources/pom.xml b/plexus-archetypes/plexus-archetype-component-simple/src/main/resources/archetype-resources/pom.xml deleted file mode 100644 index 15a0480a3..000000000 --- a/plexus-archetypes/plexus-archetype-component-simple/src/main/resources/archetype-resources/pom.xml +++ /dev/null @@ -1,19 +0,0 @@ - - 4.0.0 - ${groupId} - ${artifactId} - ${version} - - - org.codehaus.plexus - plexus-container-default - 1.0-alpha-9 - - - junit - junit - 3.8.1 - test - - - diff --git a/plexus-archetypes/plexus-archetype-component-simple/src/main/resources/archetype-resources/src/main/java/DefaultHelloWorld.java b/plexus-archetypes/plexus-archetype-component-simple/src/main/resources/archetype-resources/src/main/java/DefaultHelloWorld.java deleted file mode 100644 index 5e1d9148c..000000000 --- a/plexus-archetypes/plexus-archetype-component-simple/src/main/resources/archetype-resources/src/main/java/DefaultHelloWorld.java +++ /dev/null @@ -1,48 +0,0 @@ -package $package; - -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable; - -/** - * Concrete implementation of a HelloWorld component. The - * component is configured via the Plexus container. - * - * @author - * @version $$Id$$ - */ -public class DefaultHelloWorld - extends AbstractLogEnabled - implements HelloWorld, Startable -{ - /** The greeting that was specified in the configuration. */ - private String greeting; - - // ---------------------------------------------------------------------- - // Component Lifecycle - // ---------------------------------------------------------------------- - - public void start() - { - getLogger().info( "Starting Hello component." ); - } - - public void stop() - { - getLogger().info( "Stopping Hello component." ); - } - - // ---------------------------------------------------------------------- - // HelloWorld Implementation - // ---------------------------------------------------------------------- - - /** - * Says hello by returning a greeting to the caller. - * - * @return A greeting. - */ - public String sayHello() - { - return greeting; - } -} - diff --git a/plexus-archetypes/plexus-archetype-component-simple/src/main/resources/archetype-resources/src/main/java/HelloWorld.java b/plexus-archetypes/plexus-archetype-component-simple/src/main/resources/archetype-resources/src/main/java/HelloWorld.java deleted file mode 100644 index b2b2eba6a..000000000 --- a/plexus-archetypes/plexus-archetype-component-simple/src/main/resources/archetype-resources/src/main/java/HelloWorld.java +++ /dev/null @@ -1,21 +0,0 @@ -package $package; - -/** - * This component produces a greeting. - * - * @author - * @version $$Id$$ - */ -public interface HelloWorld -{ - /** The role associated with the component. */ - String ROLE = HelloWorld.class.getName(); - - /** - * Says hello by returning a greeting to the caller. - * - * @return A greeting. - */ - public String sayHello(); -} - diff --git a/plexus-archetypes/plexus-archetype-component-simple/src/main/resources/archetype-resources/src/main/resources/META-INF/plexus/components.xml b/plexus-archetypes/plexus-archetype-component-simple/src/main/resources/archetype-resources/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index f15ffb040..000000000 --- a/plexus-archetypes/plexus-archetype-component-simple/src/main/resources/archetype-resources/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - ${package}.HelloWorld - ${package}.DefaultHelloWorld - - Hello World! - - - - diff --git a/plexus-archetypes/plexus-archetype-component-simple/src/main/resources/archetype-resources/src/test/java/HelloWorldTest.java b/plexus-archetypes/plexus-archetype-component-simple/src/main/resources/archetype-resources/src/test/java/HelloWorldTest.java deleted file mode 100644 index e3fdbc7fa..000000000 --- a/plexus-archetypes/plexus-archetype-component-simple/src/main/resources/archetype-resources/src/test/java/HelloWorldTest.java +++ /dev/null @@ -1,20 +0,0 @@ -package $package; - -import org.codehaus.plexus.PlexusTestCase; - -/** - * @author - * @version $$Id$$ - */ -public class HelloWorldTest - extends PlexusTestCase -{ - public void testMessage() - throws Exception - { - HelloWorld component = (HelloWorld) lookup( HelloWorld.ROLE ); - - assertEquals( "The hello message wasn't as expected.", - "Hello World!", component.sayHello() ); - } -} diff --git a/plexus-archetypes/plexus-archetype-runtime/pom.xml b/plexus-archetypes/plexus-archetype-runtime/pom.xml deleted file mode 100644 index 9a002c1b5..000000000 --- a/plexus-archetypes/plexus-archetype-runtime/pom.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - plexus-archetypes - org.codehaus.plexus - 1.0-alpha-1-SNAPSHOT - - 4.0.0 - plexus-archetype-runtime - jar - 1.0-alpha-1-SNAPSHOT - Plexus Archetype Runtime - \ No newline at end of file diff --git a/plexus-archetypes/plexus-archetype-runtime/src/main/resources/META-INF/archetype.xml b/plexus-archetypes/plexus-archetype-runtime/src/main/resources/META-INF/archetype.xml deleted file mode 100644 index 22fc84b4c..000000000 --- a/plexus-archetypes/plexus-archetype-runtime/src/main/resources/META-INF/archetype.xml +++ /dev/null @@ -1,7 +0,0 @@ - - plexus-archetype-runtime - - src/conf/plexus.xml - src/plexus.properties - - diff --git a/plexus-archetypes/plexus-archetype-runtime/src/main/resources/archetype-resources/pom.xml b/plexus-archetypes/plexus-archetype-runtime/src/main/resources/archetype-resources/pom.xml deleted file mode 100644 index 58224850c..000000000 --- a/plexus-archetypes/plexus-archetype-runtime/src/main/resources/archetype-resources/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - 4.0.0 - $groupId - $artifactId - $version - - - org.codehaus.plexus - plexus-container-default - 1.0-alpha-9 - - - org.codehaus.plexus - plexus-utils - 1.2 - - - org.codehaus.plexus - plexus-appserver-host - 2.0-alpha-1 - - - - - - org.codehaus.plexus - plexus-appserver-maven-plugin - true - - - - assemble-runtime - add-services - add-apps - - - - - src/conf/plexus.xml - src/plexus.properties - target/plexus-app-runtime - - - - - diff --git a/plexus-archetypes/plexus-archetype-runtime/src/main/resources/archetype-resources/src/conf/plexus.xml b/plexus-archetypes/plexus-archetype-runtime/src/main/resources/archetype-resources/src/conf/plexus.xml deleted file mode 100644 index 3e71d7cd6..000000000 --- a/plexus-archetypes/plexus-archetype-runtime/src/main/resources/archetype-resources/src/conf/plexus.xml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/plexus-archetypes/plexus-archetype-runtime/src/main/resources/archetype-resources/src/plexus.properties b/plexus-archetypes/plexus-archetype-runtime/src/main/resources/archetype-resources/src/plexus.properties deleted file mode 100644 index dace80e4a..000000000 --- a/plexus-archetypes/plexus-archetype-runtime/src/main/resources/archetype-resources/src/plexus.properties +++ /dev/null @@ -1,2 +0,0 @@ -# TODO: Add some explanation to what this file does. - \ No newline at end of file diff --git a/plexus-archetypes/plexus-archetype-webapp/pom.xml b/plexus-archetypes/plexus-archetype-webapp/pom.xml deleted file mode 100644 index 8b00d81d8..000000000 --- a/plexus-archetypes/plexus-archetype-webapp/pom.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - plexus-archetypes - org.codehaus.plexus - 1.0-alpha-1-SNAPSHOT - - 4.0.0 - plexus-archetype-webapp - jar - 1.0-SNAPSHOT - Plexus Archetype Webapp - diff --git a/plexus-archetypes/plexus-archetype-webapp/src/main/resources/META-INF/archetype.xml b/plexus-archetypes/plexus-archetype-webapp/src/main/resources/META-INF/archetype.xml deleted file mode 100644 index 6113d06ea..000000000 --- a/plexus-archetypes/plexus-archetype-webapp/src/main/resources/META-INF/archetype.xml +++ /dev/null @@ -1,17 +0,0 @@ - - plexus-archetype-webapp - - src/main/java/HelloWorld.java - src/main/java/Component.java - src/main/java/DefaultComponent.java - - - - src/main/resources/META-INF/plexus/application.xml - src/main/webapp/index.jsp - src/main/webapp/WEB-INF/plexus.xml - src/main/webapp/WEB-INF/web.xml - - diff --git a/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/pom.xml b/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/pom.xml deleted file mode 100644 index 420af2013..000000000 --- a/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ - - 4.0.0 - ${groupId} - ${artifactId} - ${version} - war - - - org.codehaus.plexus - plexus-servlet - 1.0-beta-5 - - - javax.servlet - servlet-api - 2.3 - provided - - - junit - junit - 3.8.1 - test - - - - - - org.codehaus.plexus - plexus-maven-plugin - - - - descriptor - - - - - - org.mortbay.jetty - maven-jetty-plugin - - 10 - / - - - 9090 - 60000 - - - - - - - diff --git a/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/src/main/java/Component.java b/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/src/main/java/Component.java deleted file mode 100644 index 06f27263f..000000000 --- a/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/src/main/java/Component.java +++ /dev/null @@ -1,9 +0,0 @@ -package $package; - -/** - * - */ -public interface Component -{ - String sayHello(); -} diff --git a/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/src/main/java/DefaultComponent.java b/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/src/main/java/DefaultComponent.java deleted file mode 100644 index 0e6a444d7..000000000 --- a/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/src/main/java/DefaultComponent.java +++ /dev/null @@ -1,12 +0,0 @@ -package $package; - -/** - * - */ -public class DefaultComponent implements Component -{ - public String sayHello() - { - return "

Hello PlexusServlet World!

"; - } -} diff --git a/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/src/main/java/HelloWorld.java b/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/src/main/java/HelloWorld.java deleted file mode 100644 index f647e8aec..000000000 --- a/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/src/main/java/HelloWorld.java +++ /dev/null @@ -1,25 +0,0 @@ -package $package; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpServletRequest; - -import org.codehaus.plexus.servlet.PlexusServlet; - -import java.io.IOException; -import java.io.OutputStreamWriter; - -public class HelloWorld - extends PlexusServlet -{ - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException - { - if ( !hasComponent( Component.class.getName() ) ) - throw new ServletException("No component implementation available"); - - Component component = (Component) lookup( Component.class.getName() ); - - new OutputStreamWriter( res.getOutputStream() ).write( component.sayHello() ); - } -} diff --git a/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/src/main/resources/META-INF/plexus/application.xml b/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/src/main/resources/META-INF/plexus/application.xml deleted file mode 100644 index 379925a99..000000000 --- a/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/src/main/resources/META-INF/plexus/application.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/plexus.xml b/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/plexus.xml deleted file mode 100644 index 339a976e3..000000000 --- a/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/plexus.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 81305c64e..000000000 --- a/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - Plexus Test Webapp - - - org.codehaus.plexus.servlet.PlexusServletContextListener - - - - HelloWorld - ${package}.HelloWorld - - - - HelloWorld - /HelloWorld - - - - HelloWorld - - diff --git a/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/index.jsp b/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/index.jsp deleted file mode 100644 index f6b07cb47..000000000 --- a/plexus-archetypes/plexus-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/index.jsp +++ /dev/null @@ -1 +0,0 @@ - diff --git a/plexus-archetypes/plexus-archetype-webwork-application/pom.xml b/plexus-archetypes/plexus-archetype-webwork-application/pom.xml deleted file mode 100644 index c715045d7..000000000 --- a/plexus-archetypes/plexus-archetype-webwork-application/pom.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - plexus-archetypes - org.codehaus.plexus - 1.0-alpha-1-SNAPSHOT - - 4.0.0 - plexus-archetype-webwork-application - jar - 1.0-alpha-1-SNAPSHOT - Plexus Archetype Webwork Application - diff --git a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/META-INF/archetype.xml b/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/META-INF/archetype.xml deleted file mode 100644 index bc8e78c0a..000000000 --- a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/META-INF/archetype.xml +++ /dev/null @@ -1,20 +0,0 @@ - - plexus-archetype-webwork-application - - src/main/java/HelloWorld.java - src/main/java/DefaultHelloWorld.java - src/main/java/Person.java - - - - src/main/resources/META-INF/plexus/application.xml - src/main/resources/webwork.properties - src/main/resources/xwork.xml - src/main/webapp/index.jsp - src/main/webapp/success.jsp - src/main/webapp/WEB-INF/plexus.xml - src/main/webapp/WEB-INF/web.xml - - diff --git a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/pom.xml b/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/pom.xml deleted file mode 100644 index 16dfdbdb5..000000000 --- a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ - - 4.0.0 - ${groupId} - ${artifactId} - ${version} - war - - - org.codehaus.plexus - plexus-xwork-integration - 1.0-alpha-2-SNAPSHOT - - - junit - junit - 3.8.1 - test - - - - - - org.codehaus.plexus - plexus-maven-plugin - - - - com.opensymphony.xwork.Action - per-lookup - - - - - - - descriptor - - - - - - org.mortbay.jetty - maven-jetty-plugin - - 10 - / - - - 9090 - 60000 - - - - - - - diff --git a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/java/DefaultHelloWorld.java b/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/java/DefaultHelloWorld.java deleted file mode 100644 index cb4573ada..000000000 --- a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/java/DefaultHelloWorld.java +++ /dev/null @@ -1,35 +0,0 @@ -package $package; - -import com.opensymphony.xwork.ActionContext; -import com.opensymphony.xwork.ActionSupport; - -import java.util.Map; - -/** - * @plexus.component role="com.opensymphony.xwork.Action" role-hint="helloAction" - */ -public class DefaultHelloWorld - extends ActionSupport - implements HelloWorld -{ - public Person getPerson() { - Map session = ActionContext.getContext().getSession(); - - Person person = (Person) session.get( "person" ); - - if ( person == null ) - { - person = new Person(); - - session.put( "person", person ); - } - - return person; - } - - public String execute() - throws Exception - { - return SUCCESS; - } -} diff --git a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/java/HelloWorld.java b/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/java/HelloWorld.java deleted file mode 100644 index dfacd6b3d..000000000 --- a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/java/HelloWorld.java +++ /dev/null @@ -1,9 +0,0 @@ -package $package; - -/** - * - */ -public interface HelloWorld -{ - Person getPerson(); -} diff --git a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/java/Person.java b/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/java/Person.java deleted file mode 100644 index db4b18cd6..000000000 --- a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/java/Person.java +++ /dev/null @@ -1,31 +0,0 @@ -package $package; - -/** - * - */ -public class Person -{ - String firstName = "World"; - - String lastName; - - public String getFirstName() - { - return firstName; - } - - public void setFirstName( String firstName ) - { - this.firstName = firstName; - } - - public String getLastName() - { - return lastName; - } - - public void setLastName( String lastName ) - { - this.lastName = lastName; - } -} \ No newline at end of file diff --git a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/resources/META-INF/plexus/application.xml b/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/resources/META-INF/plexus/application.xml deleted file mode 100644 index 379925a99..000000000 --- a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/resources/META-INF/plexus/application.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/resources/webwork.properties b/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/resources/webwork.properties deleted file mode 100644 index 50bb4b873..000000000 --- a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/resources/webwork.properties +++ /dev/null @@ -1,21 +0,0 @@ -webwork.objectFactory = org.codehaus.plexus.xwork.PlexusObjectFactory -#webwork.tag.altSyntax = true - -################################## -# Theme -################################## -#webwork.ui.theme = default - -################################## -# Locale -################################## -#webwork.locale=en_EN - -################################## -# Upload -################################## -webwork.multipart.parser = jakarta -# default saveDir is defined by javax.servlet.context.tempdir property -#webwork.multipart.saveDir = -# default max size is 2097152 (2MB) -#webwork.multipart.maxSize = diff --git a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/resources/xwork.xml b/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/resources/xwork.xml deleted file mode 100644 index 9650c8b1d..000000000 --- a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/resources/xwork.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - /success.jsp - - - - - - diff --git a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/plexus.xml b/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/plexus.xml deleted file mode 100644 index 339a976e3..000000000 --- a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/plexus.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index ab0020508..000000000 --- a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - Plexus and WebWork Test App - - - webwork - com.opensymphony.webwork.dispatcher.FilterDispatcher - - - - webwork - /* - - - - org.codehaus.plexus.xwork.PlexusLifecycleListener - - - - Index.action - - diff --git a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/webapp/index.jsp b/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/webapp/index.jsp deleted file mode 100644 index b03023dbe..000000000 --- a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/webapp/index.jsp +++ /dev/null @@ -1,13 +0,0 @@ -<%@ taglib prefix="ww" uri="/webwork" %> - - - Hello - - - -
-
- -
- - diff --git a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/webapp/success.jsp b/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/webapp/success.jsp deleted file mode 100644 index e54cbff24..000000000 --- a/plexus-archetypes/plexus-archetype-webwork-application/src/main/resources/archetype-resources/src/main/webapp/success.jsp +++ /dev/null @@ -1,4 +0,0 @@ -<%@ taglib uri="/webwork" prefix="ww" %> - -Hello -
diff --git a/plexus-archetypes/pom.xml b/plexus-archetypes/pom.xml deleted file mode 100644 index 2687e3962..000000000 --- a/plexus-archetypes/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - 4.0.0 - - plexus - org.codehaus.plexus - 1.0.8 - - pom - plexus-archetypes - 1.0-alpha-1-SNAPSHOT - Plexus Archetype - - plexus-application-view-web - plexus-archetype-application - plexus-archetype-component-simple - plexus-archetype-runtime - plexus-archetype-webwork-application - plexus-archetype-webapp - - diff --git a/plexus-avalon-components/activity/LICENSE.txt b/plexus-avalon-components/activity/LICENSE.txt deleted file mode 100644 index a69a954da..000000000 --- a/plexus-avalon-components/activity/LICENSE.txt +++ /dev/null @@ -1,57 +0,0 @@ - - -/* ---------------------------------------------------------------------------- - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. - * - * 4. The names "The Jakarta Project", "Plexus", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ---------------------------------------------------------------------------- - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * ---------------------------------------------------------------------------- - */ diff --git a/plexus-avalon-components/activity/pom.xml b/plexus-avalon-components/activity/pom.xml deleted file mode 100644 index 9942fcc89..000000000 --- a/plexus-avalon-components/activity/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - 4.0.0 - - plexus-components-avalon - plexus - 1.0.1-SNAPSHOT - - plexus-activity - 1.0-beta-2-SNAPSHOT - Plexus Activity Component - Activity services that interact with templates. - - - jvanzyl - Jason van Zyl - jason@zenplex.com - Zenplex - - Architect - Release Manager - - - - kaz - Pete Kazmier - - - - Developer - - - - jtaylor - James Taylor - james@jamestaylor.org - - - Developer - - - - dandiep - Dan Diephouse - dan@envoisolutions.com - Envoi solutions - - Developer - - - - - - plexus - plexus-summit - 1.0-beta-2 - compile - - - servletapi - servletapi - 2.3 - compile - - - diff --git a/plexus-avalon-components/activity/project.xml b/plexus-avalon-components/activity/project.xml deleted file mode 100644 index a6703f10e..000000000 --- a/plexus-avalon-components/activity/project.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - ${maven.repo.local}/plexus/poms/plexus-components-avalon-1.0.pom - plexus-activity - plexus-activity - Activity Services - 1.0-beta-1 - Activity services that interact with templates. - - - Activity services that interact with templates. - - - - - Jason van Zyl - jvanzyl - jason@zenplex.com - Zenplex - - Architect - Release Manager - - - - Pete Kazmier - kaz - - - - Developer - - - - James Taylor - jtaylor - james@jamestaylor.org - - - Developer - - - - Dan Diephouse - dandiep - dan@envoisolutions.com - Envoi solutions - - Developer - - - - - - - - plexus - plexus-summit - 1.0-beta-2 - - - - servletapi - servletapi - 2.3 - - - - - diff --git a/plexus-avalon-components/activity/src/main/org/codehaus/plexus/summit/activity/ActionEventService.java b/plexus-avalon-components/activity/src/main/org/codehaus/plexus/summit/activity/ActionEventService.java deleted file mode 100644 index 279c9e0c2..000000000 --- a/plexus-avalon-components/activity/src/main/org/codehaus/plexus/summit/activity/ActionEventService.java +++ /dev/null @@ -1,81 +0,0 @@ -package org.codehaus.plexus.summit.activity; - -/* ---------------------------------------------------------------------------- - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. - * - * 4. The names "The Jakarta Project", "Plexus", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ---------------------------------------------------------------------------- - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * ---------------------------------------------------------------------------- - */ - -import org.codehaus.plexus.summit.rundata.RunData; - -/** - * ActionEventService provides a way for form actions to execute Java methods. It is - * a service which inspects RunData and then executes a method. The way this - * service does this is highly dependent on the implementation. - * - * @author Dan Diephouse - * @since Mar 1, 2003 - */ -public interface ActionEventService -{ - public static final String ROLE = ActionEventService.class.getName(); - - /** - * Perform actions using RunData to find out which actions to perform. - * Each implementation will have its own way of doing this. - * - * @param data - * @throws Exception - */ - void perform( RunData data ) throws Exception; -} diff --git a/plexus-avalon-components/activity/src/main/org/codehaus/plexus/summit/activity/ActionEventValve.java b/plexus-avalon-components/activity/src/main/org/codehaus/plexus/summit/activity/ActionEventValve.java deleted file mode 100644 index aaafac9c0..000000000 --- a/plexus-avalon-components/activity/src/main/org/codehaus/plexus/summit/activity/ActionEventValve.java +++ /dev/null @@ -1,100 +0,0 @@ -package org.codehaus.plexus.summit.activity; - -/* ---------------------------------------------------------------------------- - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. - * - * 4. The names "The Jakarta Project", "Plexus", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ---------------------------------------------------------------------------- - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * ---------------------------------------------------------------------------- - */ - -import java.io.IOException; - -import org.apache.avalon.framework.service.ServiceException; -import org.codehaus.plexus.summit.exception.SummitException; -import org.codehaus.plexus.summit.pipeline.valve.AbstractValve; -import org.codehaus.plexus.summit.rundata.RunData; - -/** - * Locates the ActionEventService and uses it to perform actions. - * - * @author Dan Diephouse - * @since Mar 2, 2003 - */ -public class ActionEventValve - extends AbstractValve -{ - - /** - * @see org.codehaus.plexus.summit.pipeline.valve.Valve#invoke(RunData, ValveContext) - */ - public void invoke( RunData data ) - throws IOException, SummitException - { - try - { - ActionEventService actionEvent = ( ActionEventService ) - data.getServiceManager().lookup( ActionEventService.ROLE ); - - actionEvent.perform( data ); - } - catch (ServiceException e) - { - throw new SummitException( - "Could not find the ActionEvent service.", e ); - } - catch (Exception e) - { - throw new SummitException( - "There was a problem executing the action.", e ); - } - } -} diff --git a/plexus-avalon-components/activity/src/main/org/codehaus/plexus/summit/activity/DefaultActionEventService.java b/plexus-avalon-components/activity/src/main/org/codehaus/plexus/summit/activity/DefaultActionEventService.java deleted file mode 100644 index 64041583e..000000000 --- a/plexus-avalon-components/activity/src/main/org/codehaus/plexus/summit/activity/DefaultActionEventService.java +++ /dev/null @@ -1,347 +0,0 @@ -package org.codehaus.plexus.summit.activity; - -/* ---------------------------------------------------------------------------- - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. - * - * 4. The names "The Jakarta Project", "Plexus", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ---------------------------------------------------------------------------- - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * ---------------------------------------------------------------------------- - */ - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.apache.avalon.framework.thread.ThreadSafe; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.codehaus.plexus.summit.exception.SummitRuntimeException; -import org.codehaus.plexus.summit.rundata.RunData; -import org.apache.avalon.framework.logger.AbstractLogEnabled; - -/** - *

- * This service allows you to execute methods on action classes. Action classes - * are just classes who follow the method naming conventions described below. - * They do not need to inherit from any base class.

- *

- * Actions are looked for based on the "action" parameter in the - * RequestParameters. The packages specified in the configuration are then - * searched for this action. For example, if the action is "Order.Submit" and - * we are to look in package "org.codehaus.plexus.summit.modules," the service - * attempts to load "org.codehaus.plexus.summit.modules.Order.Submit" and execute - * a method on.

- *

- * The method is specified with the submit button name. The name must be - * prefixed with "eventSubmit_". For example, if the submit button is named - * "eventSubmit_doMyaction" then this service tries to execute the method - * "doMyaction" on the specified action.

- * - *

Limitations:

- * - *

- * Because ParameterParser makes all the key values lowercase, we have - * to do some work to format the string into a method name. For - * example, a button name eventSubmit_doDelete gets converted into - * eventsubmit_dodelete. Thus, we need to form some sort of naming - * convention so that dodelete can be turned into doDelete.

- *

- * - * Thus, the convention is this: - * - *

    - *
  • The variable name MUST have the prefix "eventSubmit_".
  • - *
  • The variable name after the prefix MUST begin with the letters - * "do".
  • - *
  • The first letter after the "do" will be capitalized and the - * rest will be lowercase
  • - *
- * - * If you follow these conventions, then you should be ok with your - * method naming in your Action class.

- * - * @author Dan Diephouse - * @author Jon S. Stevens - * @since Mar 1, 2003 - */ -public class DefaultActionEventService - extends AbstractLogEnabled - implements ActionEventService, Configurable, ThreadSafe -{ - /** Whether or not the method name's case is folded. */ - private boolean foldCase; - - /** The configuration key determining the case folding. */ - protected static final String FOLD_CASE_KEY = "fold-method-case"; - - /** The default case folding value. */ - protected static final boolean FOLD_CASE_DEFAULT = true; - - /** The default method to execute */ - protected static final String DEFAULT_METHOD = "doPerform"; - - /** The name of the button to look for. */ - protected static final String BUTTON = "eventSubmit_"; - - /** The length of the button to look for. */ - protected static final int BUTTON_LENGTH = BUTTON.length(); - - /** The prefix of the method name. */ - protected static final String METHOD_NAME_PREFIX = "do"; - - /** The length of the method name. */ - protected static final int METHOD_NAME_LENGTH = METHOD_NAME_PREFIX.length(); - - List actionPackages; - - public DefaultActionEventService() - { - actionPackages = new ArrayList(); - } - - /** - * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration) - */ - public void configure(Configuration config) throws ConfigurationException - { - foldCase = config.getAttributeAsBoolean( FOLD_CASE_KEY, - FOLD_CASE_DEFAULT ); - - Configuration[] packages = config.getChild( "actionPackages" ) - .getChildren( "actionPackage" ); - - // If the user does not define any modules, use the default package. - if ( packages == null || packages.length == 0 ) - { - actionPackages.add( "" ); - } - else - { - for ( int i = 0; i < packages.length; i++ ) - { - getLogger().info( "Adding package " + packages[i].getValue() ); - actionPackages.add( packages[i].getValue() ); - } - } - } - - /** - * @see org.codehaus.plexus.summit.activity.ActionEventService#perform(org.codehaus.plexus.summit.rundata.RunData) - */ - public void perform(RunData data) throws Exception - { - String action = data.getParameters().getString("action"); - - if ( action != null ) - { - String methodName = null; - try - { - methodName = getMethodName( data, DEFAULT_METHOD ); - - Class actionClass = getClass( action ); - - Method method = getMethod( actionClass, data.getClass(), methodName, DEFAULT_METHOD ); - - // The arguments to pass to the method to execute. - Object[] args = new Object[1]; - args[0] = data; - - method.invoke( actionClass.newInstance(), args ); - } - catch ( ClassNotFoundException e ) - { - getLogger().debug( "Could not find the action.", e ); - } - catch (InvocationTargetException ite) - { - // I have not seen this exception, in stacktraces generated - // while doing my own testing on jdk1.3.1 and earlier. But - // see it increasingly from stacktraces reported by others. - // Its printStackTrace method should do The Right Thing, but - // I suspect some implementation is not. - // Unwrap it here, so that the original cause does not get lost. - Throwable t = ite.getTargetException(); - if (t instanceof Exception) - { - throw (Exception)t; - } - else if (t instanceof java.lang.Error) - { - throw (java.lang.Error)t; - } - else - { - // this should not happen, but something could throw - // an instance of Throwable - throw new SummitRuntimeException("",t); - } - } - } - } - - /** - * Find the method to execute for the action. - * - * @param methodName The name of the method. - * @param actionClass The class which the method is on. - * @return Method - * @throws NoSuchMethodException - */ - protected Method getMethod( Class actionClass, - Class rundataClass, - String methodName, - String defaultName ) - throws NoSuchMethodException, ClassNotFoundException - { - // The arguments to the method to find. - Class[] classes = new Class[1]; - classes[0] = rundataClass; - - try - { - return actionClass.getMethod(methodName, classes); - } - catch ( NoSuchMethodException e ) - { - return actionClass.getMethod(defaultName, classes); - } - } - - /** - * Find the appropriate method name to execute. - * - * @param data - * @return String - */ - protected String getMethodName( RunData data, String defaultName ) - { - for ( Iterator iter = data.getParameters().keys(); iter.hasNext(); ) - { - String key = (String) iter.next(); - if ( key.startsWith( BUTTON ) ) - { - return formatString(key); - } - } - - return defaultName; - } - - /** - * This method does the conversion of the lowercase method name - * into the proper case. - * - * @param input The unconverted method name. - * @return A string with the method name in the proper case. - */ - protected final String formatString(String input) - { - String methodName = input; - - if ( foldCase ) - { - methodName = - methodName.substring(BUTTON_LENGTH + METHOD_NAME_LENGTH); - - return (METHOD_NAME_PREFIX + firstLetterCaps(methodName)); - } - else - { - return methodName.substring(BUTTON_LENGTH); - } - } - - /** - * Finds the class correspond to the action. - * - * @param action - * @return Class - */ - protected Class getClass(String action) throws ClassNotFoundException - { - for ( Iterator iter = actionPackages.iterator(); iter.hasNext(); ) - { - // Try to load the action from the possible action packages. - String actionPackage = (String) iter.next(); - try - { - Class actionClass = - getClass().getClassLoader().loadClass(actionPackage + - "." + action ); - return actionClass; - } - catch (ClassNotFoundException e) - { - // Continue on, it could be in another package. - } - } - throw new ClassNotFoundException( "Could not find a class for action " + - action + "." ); - } - - - /** - * Makes the first letter caps and the rest lowercase. - * - * @param data The input string. - * @return A string with the described case. - */ - protected final String firstLetterCaps( String data ) - { - String firstLetter = data.substring(0, 1).toUpperCase(); - String restLetters = data.substring(1).toLowerCase(); - return firstLetter + restLetters; - } -} diff --git a/plexus-avalon-components/activity/src/test/org/codehaus/plexus/summit/activity/DefaultActionEventTest.java b/plexus-avalon-components/activity/src/test/org/codehaus/plexus/summit/activity/DefaultActionEventTest.java deleted file mode 100644 index de942fda5..000000000 --- a/plexus-avalon-components/activity/src/test/org/codehaus/plexus/summit/activity/DefaultActionEventTest.java +++ /dev/null @@ -1,64 +0,0 @@ -package org.codehaus.plexus.summit.activity; - -import java.lang.reflect.Method; - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.summit.rundata.RunData; - -/** - * Tests the DefaultActionEvent service. - * - * @author Dan Diephouse - * @since Mar 1, 2003 - */ -public class DefaultActionEventTest extends PlexusTestCase -{ - DefaultActionEventService actionEvent; - - /** - * @param name - */ - public DefaultActionEventTest(String name) - { - super(name); - } - - public void setUp() throws Exception - { - super.setUp(); - - actionEvent = ( DefaultActionEventService ) lookup( ActionEventService.ROLE ); - } - - public void testMethodNaming() throws Exception - { - // Test template name to method name conversion - String method = actionEvent.formatString( "eventSubmit_doMyMethod" ); - - assertTrue( method.equals("doMymethod") ); - } - - public void testClassFinder() throws Exception - { - Class testClass = actionEvent.getClass( "activity.SomeAction" ); - Object someAction = testClass.newInstance(); - - assertTrue( someAction instanceof SomeAction ); - } - - public void testMethodLookup() throws Exception - { - Class testClass = actionEvent.getClass( "activity.SomeAction" ); - Method myMethod = actionEvent.getMethod( testClass, - RunData.class, - "doMymethod", - "doPerform" ); - assertTrue( myMethod.getName().equals("doMymethod") ); - - myMethod = actionEvent.getMethod( testClass, - RunData.class, - "eventSubmit_doNoMethod", - "doPerform" ); - assertTrue( myMethod.getName().equals("doPerform") ); - } -} diff --git a/plexus-avalon-components/activity/src/test/org/codehaus/plexus/summit/activity/DefaultActionEventTest.xml b/plexus-avalon-components/activity/src/test/org/codehaus/plexus/summit/activity/DefaultActionEventTest.xml deleted file mode 100644 index d9c35073b..000000000 --- a/plexus-avalon-components/activity/src/test/org/codehaus/plexus/summit/activity/DefaultActionEventTest.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - avalon - - - avalon - Avalon Lifecycle Handler - - - - - - - - - - - - - - - - - - - - - - - - - - - - - org.codehaus.plexus.summit.activity.ActionEventService - org.codehaus.plexus.summit.activity.DefaultActionEventService - - - org.codehaus.plexus.summit - - - - - - diff --git a/plexus-avalon-components/activity/src/test/org/codehaus/plexus/summit/activity/SomeAction.java b/plexus-avalon-components/activity/src/test/org/codehaus/plexus/summit/activity/SomeAction.java deleted file mode 100644 index 91725cebb..000000000 --- a/plexus-avalon-components/activity/src/test/org/codehaus/plexus/summit/activity/SomeAction.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.codehaus.plexus.summit.activity; - -import org.codehaus.plexus.summit.rundata.RunData; - -/** - * A class to test the DefaultActionEvent service with. - * - * @author Dan Diephouse - * @since Mar 1, 2003 - */ -public class SomeAction -{ - public void doPerform( RunData data ) - { - - } - - public void doMymethod( RunData data ) - { - - } -} diff --git a/plexus-avalon-components/formproc/LICENSE.txt b/plexus-avalon-components/formproc/LICENSE.txt deleted file mode 100644 index a69a954da..000000000 --- a/plexus-avalon-components/formproc/LICENSE.txt +++ /dev/null @@ -1,57 +0,0 @@ - - -/* ---------------------------------------------------------------------------- - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. - * - * 4. The names "The Jakarta Project", "Plexus", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ---------------------------------------------------------------------------- - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * ---------------------------------------------------------------------------- - */ diff --git a/plexus-avalon-components/formproc/pom.xml b/plexus-avalon-components/formproc/pom.xml deleted file mode 100644 index 54a58473d..000000000 --- a/plexus-avalon-components/formproc/pom.xml +++ /dev/null @@ -1,54 +0,0 @@ - - 4.0.0 - - plexus-components-avalon - plexus - 1.0.1-SNAPSHOT - - plexus - plexus-formproc - 1.0-alpha-7-SNAPSHOT - Plexus FormProc Component - - - commons-logging - commons-logging - 1.0.2 - - - commons-vfs - commons-vfs - SNAPSHOT - - - edenlib - edenlib - 1.3 - - - formproc - formproc - 1.3 - - - oro - oro - 2.0.6 - - - plexus - plexus-pull - 1.0-beta-2 - - - plexus - plexus-summit - 1.0-beta-2 - - - servletapi - servletapi - 2.3 - - - diff --git a/plexus-avalon-components/formproc/project.xml b/plexus-avalon-components/formproc/project.xml deleted file mode 100644 index 5021602c3..000000000 --- a/plexus-avalon-components/formproc/project.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - ${maven.repo.local}/plexus/poms/plexus-components-avalon-1.0.pom - plexus-formproc - plexus-formproc - Plexus FormProc Component - 1.0-beta-1 - - - - - commons-logging - commons-logging - 1.0.2 - - - - commons-vfs - commons-vfs - SNAPSHOT - - - - edenlib - edenlib - 1.3 - - - - formproc - formproc - 1.3 - - - - oro - oro - 2.0.6 - - - - plexus - plexus-summit - 1.0-beta-2 - - - - servletapi - servletapi - 2.3 - - - - - - org.codehaus.plexus.formproc.DefaultFormProcService - - - - diff --git a/plexus-avalon-components/formproc/src/main/org/codehaus/plexus/formproc/DefaultFormProcService.java b/plexus-avalon-components/formproc/src/main/org/codehaus/plexus/formproc/DefaultFormProcService.java deleted file mode 100644 index 8c8e56bf1..000000000 --- a/plexus-avalon-components/formproc/src/main/org/codehaus/plexus/formproc/DefaultFormProcService.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.codehaus.plexus.formproc; - -import java.io.File; - -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.formproc.FormManager; - -/** - * @author Dan Diephouse - * @since May 15, 2003 - */ -public class DefaultFormProcService - implements FormProcService, Configurable, Initializable -{ - protected final static String CONFIGURATION = "formproc-config"; - - private FormManager manager; - - private String configuration; - - /** - * @see org.codehaus.plexus.formproc.FormProcService#getFormManager() - */ - public FormManager getFormManager() - { - return manager; - } - - /** - * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration) - */ - public void configure(Configuration config) throws ConfigurationException - { - configuration = config.getAttribute( CONFIGURATION, "formproc.xml" ); - } - - /** - * @see org.apache.avalon.framework.activity.Initializable#initialize() - */ - public void initialize() throws Exception - { - File configFile = new File( configuration ); - - if ( configFile.exists() ) - { - manager = new FormManager( configFile ); - } - else - { - manager = new FormManager( - getClass().getResourceAsStream( configuration ) ); - } - } - -} diff --git a/plexus-avalon-components/formproc/src/main/org/codehaus/plexus/formproc/FormProcService.java b/plexus-avalon-components/formproc/src/main/org/codehaus/plexus/formproc/FormProcService.java deleted file mode 100644 index e56747c90..000000000 --- a/plexus-avalon-components/formproc/src/main/org/codehaus/plexus/formproc/FormProcService.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.codehaus.plexus.formproc; - -import org.formproc.FormManager; - -/** - * @author Dan Diephouse - * @since May 5, 2003 - */ -public interface FormProcService -{ - final public static String ROLE = FormProcService.class.getName(); - - FormManager getFormManager(); -} diff --git a/plexus-avalon-components/formproc/src/main/org/codehaus/plexus/formproc/FormTool.java b/plexus-avalon-components/formproc/src/main/org/codehaus/plexus/formproc/FormTool.java deleted file mode 100644 index 464d2fcbf..000000000 --- a/plexus-avalon-components/formproc/src/main/org/codehaus/plexus/formproc/FormTool.java +++ /dev/null @@ -1,123 +0,0 @@ -package org.codehaus.plexus.formproc; - -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.service.Serviceable; -import org.codehaus.plexus.summit.SummitConstants; -import org.codehaus.plexus.summit.pull.RequestTool; -import org.codehaus.plexus.summit.rundata.RunData; -import org.codehaus.plexus.summit.view.ViewContext; -import org.formproc.Form; -import org.formproc.FormManager; -import org.formproc.FormResult; -import org.formproc.servlet.HttpForm; - -/** - * A template tool that provides easy access to FormProc. - * - * @author Dan Diephouse - * @since May 15, 2003 - */ -public class FormTool - implements RequestTool, Serviceable -{ - private static final String FORM_KEY = "form"; - - private ServiceManager manager; - - private RunData data; - - public HttpForm getForm() - { - HttpForm form; - - if ( data.getSession().getAttribute( FORM_KEY ) != null ) - { - form = (HttpForm) data.getSession().getAttribute( FORM_KEY ); - } - else - { - form = new HttpForm(); - data.getSession().setAttribute( FORM_KEY, form ); - } - return form; - } - - public HttpForm getForm( String name, Object target ) throws Exception - { - HttpForm form; - - if ( data.getSession().getAttribute( FORM_KEY ) != null ) - { - form = (HttpForm) data.getSession().getAttribute( FORM_KEY ); - } - else - { - form = new HttpForm(); - data.getSession().setAttribute( FORM_KEY, form ); - } - - form.setName(name); - form.setTarget(target); - configure( form ); - - return form; - } - - /** - * When processing a form, this method will retrieve the value from the - * FormResult (via getOriginalValue()). However, if there is no FormResult - * yet (ie, a form that is modifying values on an object), it will return - * the value that you specify. - * - * @param name - * @param value - * @return - */ - public Object getValue( String name, Object value ) - { - ViewContext context = - (ViewContext) data.getMap().get( SummitConstants.VIEW_CONTEXT ); - - if ( context.get( "results" ) != null ) - { - FormResult result = (FormResult) context.get( "results" ); - return result.getOriginalValue( name ); - } - - return value; - } - - public FormManager getFormManager() throws ServiceException - { - return ((FormProcService) manager.lookup(FormProcService.ROLE)).getFormManager(); - } - - public void configure( Form form ) throws Exception - { - getFormManager().configure( form ); - } - - /** - * @see org.codehaus.plexus.summit.pull.RequestTool#setRunData(org.codehaus.plexus.summit.rundata.RunData) - */ - public void setRunData(RunData data) - { - this.data = data; - } - - /** - * @see org.codehaus.plexus.summit.pull.RequestTool#refresh() - */ - public void refresh() - { - } - - /** - * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager) - */ - public void service(ServiceManager manager) throws ServiceException - { - this.manager = manager; - } -} diff --git a/plexus-avalon-components/formproc/src/test/org/codehaus/plexus/formproc/DefaultFormProcServiceTest.java b/plexus-avalon-components/formproc/src/test/org/codehaus/plexus/formproc/DefaultFormProcServiceTest.java deleted file mode 100644 index 8296d4512..000000000 --- a/plexus-avalon-components/formproc/src/test/org/codehaus/plexus/formproc/DefaultFormProcServiceTest.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.codehaus.plexus.formproc; - -import java.util.ArrayList; -import java.util.List; - -import org.codehaus.plexus.PlexusTestCase; -import org.formproc.Form; -import org.formproc.FormData; -import org.formproc.FormManager; -import org.formproc.FormResult; - -/** - * TODO Document DefaultFormProcServiceTest - * - * @author Dan Diephouse - * @since May 15, 2003 - */ -public class DefaultFormProcServiceTest - extends PlexusTestCase -{ - public DefaultFormProcServiceTest(String name) - { - super(name); - } - - public void testService() throws Exception - { - FormProcService service = (FormProcService) lookup( FormProcService.ROLE ); - - FormManager man = service.getFormManager(); - - List values = new ArrayList(); - values.add( new FormData("firstName", "Dan")); - values.add( new FormData("lastName", "Diephouse")); - values.add( new FormData("age", "21")); - values.add( new FormData("skill", "Obfuscator")); - - Form f = new Form( ); - f.setName( "test" ); - man.configure( f ); - - FormResult result = f.process( values ); - - if ( !result.isValid() ) - { - System.out.println( result.getErrorOrMessage( "firstName") ); - System.out.println( result.getOriginalValue( "firstName") ); - System.out.println( result.getErrorOrMessage( "lastName") ); - System.out.println( result.getOriginalValue( "lastName") ); - System.out.println( result.getErrorOrMessage( "skill") ); - System.out.println( result.getOriginalValue( "skill") ); - fail( "Form wasn't valid." ); - } - - release(service); - } -} diff --git a/plexus-avalon-components/formproc/src/test/org/codehaus/plexus/formproc/DefaultFormProcServiceTest.xml b/plexus-avalon-components/formproc/src/test/org/codehaus/plexus/formproc/DefaultFormProcServiceTest.xml deleted file mode 100644 index d6e60c4cc..000000000 --- a/plexus-avalon-components/formproc/src/test/org/codehaus/plexus/formproc/DefaultFormProcServiceTest.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - avalon - - - avalon - Avalon Lifecycle Handler - - - - - - - - - - - - - - - - - - - - - - - - - - - - org.codehaus.plexus.formproc.FormProcService - org.codehaus.plexus.formproc.DefaultFormProcService - - - - diff --git a/plexus-avalon-components/formproc/src/test/org/codehaus/plexus/formproc/example-form.xml b/plexus-avalon-components/formproc/src/test/org/codehaus/plexus/formproc/example-form.xml deleted file mode 100644 index a0951b5dc..000000000 --- a/plexus-avalon-components/formproc/src/test/org/codehaus/plexus/formproc/example-form.xml +++ /dev/null @@ -1,40 +0,0 @@ - - -
- - example - - - - - - First name required. - Le prenom valide a exigé. - - Required - - - - - Last name required required. - Le nom valide a exigé. - - Required - - - - - Optional. If specified, a valid age required. - Optional. L'âge valide a exigé. - - - - - - Skill required - Fr: Skill Required - - Required - - - diff --git a/plexus-avalon-components/formproc/src/test/org/codehaus/plexus/formproc/formproc-include.xml b/plexus-avalon-components/formproc/src/test/org/codehaus/plexus/formproc/formproc-include.xml deleted file mode 100644 index 1cfba458b..000000000 --- a/plexus-avalon-components/formproc/src/test/org/codehaus/plexus/formproc/formproc-include.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - org.formproc.example.IsIntRule - Valid number required - L'âge valide a exigé. - - - [1-9][0-9]* - Age must be 1 or greater - - - - - \ No newline at end of file diff --git a/plexus-avalon-components/formproc/src/test/org/codehaus/plexus/formproc/formproc.xml b/plexus-avalon-components/formproc/src/test/org/codehaus/plexus/formproc/formproc.xml deleted file mode 100644 index aaa53cfcb..000000000 --- a/plexus-avalon-components/formproc/src/test/org/codehaus/plexus/formproc/formproc.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - .{1,} - The field is required. - Exig�e - - - - - - - -
- - diff --git a/plexus-avalon-components/hibernate/LICENSE.txt b/plexus-avalon-components/hibernate/LICENSE.txt deleted file mode 100644 index a69a954da..000000000 --- a/plexus-avalon-components/hibernate/LICENSE.txt +++ /dev/null @@ -1,57 +0,0 @@ - - -/* ---------------------------------------------------------------------------- - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. - * - * 4. The names "The Jakarta Project", "Plexus", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ---------------------------------------------------------------------------- - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * ---------------------------------------------------------------------------- - */ diff --git a/plexus-avalon-components/hibernate/pom.xml b/plexus-avalon-components/hibernate/pom.xml deleted file mode 100644 index 848afc91f..000000000 --- a/plexus-avalon-components/hibernate/pom.xml +++ /dev/null @@ -1,72 +0,0 @@ - - 4.0.0 - - plexus-components-avalon - plexus - 1.0.1-SNAPSHOT - - plexus-jasf - jar - 0.5-SNAPSHOT - Avalon Hibernate component - 2002 - - - dandiep - Dan Diephouse - diephouse@envoisolutions.com - Envoi Solutions - - - - - commons-attributes - commons-attributes-api - 2.0alpha - - - commons-collections - commons-collections - 2.1 - - - commons-digester - commons-digester - 1.2 - - - commons-logging - commons-logging - 1.0.2 - - - commons-beanutils - commons-beanutils - 1.6.1 - - - plexus - plexus-summit - 1.0-beta-2 - - - plexus - plexus-activity - 1.0-alpha-6 - - - qdox - qdox - 1.1 - - - servletapi - servletapi - 2.2 - - - - Envoi Solutions - http://envoisolutions.com - - diff --git a/plexus-avalon-components/hibernate/project.xml b/plexus-avalon-components/hibernate/project.xml deleted file mode 100644 index 037d88b1d..000000000 --- a/plexus-avalon-components/hibernate/project.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - ${maven.repo.local}/plexus/poms/plexus-components-avalon-1.0.pom - plexus-hibernate - plexus-hibernate - Plexus Hibernate Component - 1.0-beta-2 - - - - - commons-lang - commons-lang - 1.0.1 - - - - dom4j - dom4j - 1.4 - - - - hibernate - hibernate - 2.0.3 - - - - servletapi - servletapi - 2.3 - - - - - commons-logging - commons-logging - 1.0.3 - - - - commons-beanutils - commons-beanutils - 1.6 - - - - commons-collections - commons-collections - 3.0 - - - - cglib - cglib - 1.0 - - - - bcel - bcel - 5.0 - - - - hsqldb - hsqldb - 1.7.1 - - - - - - org.codehaus.plexus.hibernate.HibernateService - - - - diff --git a/plexus-avalon-components/hibernate/src/main/META-INF/plexus/components.xml b/plexus-avalon-components/hibernate/src/main/META-INF/plexus/components.xml deleted file mode 100644 index 902210b58..000000000 --- a/plexus-avalon-components/hibernate/src/main/META-INF/plexus/components.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - avalon - Avalon Lifecycle Handler - - - - - - - - - - - - - - - - - - - - - - - - - - - - - wasabi.service.Persister - wasabi.service.impl.DefaultPersister - per-lookup - avalon - - - - - org.codehaus.plexus.hibernate.HibernateSessionService - org.codehaus.plexus.hibernate.DefaultHibernateSessionService - singleton - avalon - - - - - diff --git a/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/DefaultHibernateService.java b/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/DefaultHibernateService.java deleted file mode 100644 index aed19f934..000000000 --- a/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/DefaultHibernateService.java +++ /dev/null @@ -1,100 +0,0 @@ -package org.codehaus.plexus.hibernate; - -import java.util.Properties; - -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.logger.AbstractLogEnabled; - -import net.sf.hibernate.HibernateException; -import net.sf.hibernate.MappingException; -import net.sf.hibernate.SessionFactory; - -/** - * Hibernate service. - * - * @author Dan Diephouse - * @since May 10, 2003 - */ -public class DefaultHibernateService - extends AbstractLogEnabled - implements HibernateService, Configurable, Initializable -{ - SessionFactory sessionFactory; - net.sf.hibernate.cfg.Configuration hibConfig; - - /** - * @see org.codehaus.plexus.hibernate.HibernateService#getSessionFactory() - */ - public SessionFactory getSessionFactory() - { - return sessionFactory; - } - - /** - * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration) - */ - public void configure(Configuration config) throws ConfigurationException - { - hibConfig = new net.sf.hibernate.cfg.Configuration(); - - String mapping = config.getAttribute( "mapping" ); - try - { - getLogger().debug("Configuration mapping " + mapping); - hibConfig.configure( mapping ); - } - catch (HibernateException e) - { - throw new ConfigurationException( "Mapping problem.", e ); - } - - Configuration[] classes = config.getChild( "classes" ).getChildren(); - if ( classes != null ) - { - configureClasses( classes ); - } - - Configuration[] properties = config.getChild( "properties" ).getChildren(); - Properties props = new Properties(); - for ( int i = 0; i < properties.length; i++ ) - { - props.setProperty( properties[i].getAttribute("name"), - properties[i].getAttribute("value") ); - } - - hibConfig.addProperties( props ); - } - - private void configureClasses(Configuration[] classes) throws ConfigurationException - { - for ( int i = 0; i < classes.length; i++ ) - { - try - { - hibConfig.addClass( Class.forName( classes[i].getValue() ) ); - } - catch ( ClassNotFoundException e ) - { - throw new ConfigurationException( "Could not find class " - + classes[i].getValue(), - e ); - } - catch (MappingException e) - { - throw new ConfigurationException( "Mapping problem.", e ); - } - } - } - - /** - * @see org.apache.avalon.framework.activity.Initializable#initialize() - */ - public void initialize() throws Exception - { - getLogger().info( "Initializing Hibernate." ); - sessionFactory = hibConfig.buildSessionFactory(); - } -} diff --git a/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/DefaultHibernateSessionService.java b/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/DefaultHibernateSessionService.java deleted file mode 100644 index 9e62785de..000000000 --- a/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/DefaultHibernateSessionService.java +++ /dev/null @@ -1,112 +0,0 @@ -package org.codehaus.plexus.hibernate; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import net.sf.hibernate.HibernateException; -import net.sf.hibernate.Session; -import net.sf.hibernate.SessionFactory; - -import org.apache.avalon.framework.activity.Disposable; -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.service.Serviceable; - -/** - * @author Dan Diephouse - * @since Nov 7, 2003 - */ -public class DefaultHibernateSessionService - extends AbstractLogEnabled - implements - HibernateSessionService, - Initializable, - Disposable, - Serviceable -{ - private ServiceManager manager; - - private SessionFactory sessionFactory; - - private ThreadLocal session = new ThreadLocal(); - - private List sessions; - - /** - * @see org.codehaus.plexus.hibernate.HibernateSessionService#getSession() - */ - public Session getSession() throws HibernateException - { - return currentSession(); - } - - /** - * @see org.apache.avalon.framework.activity.Initializable#initialize() - */ - public void initialize() throws Exception - { - HibernateService hib = - (HibernateService) manager.lookup(HibernateService.ROLE); - - sessionFactory = hib.getSessionFactory(); - - manager.release(hib); - - sessions = new ArrayList(); - } - - /** - * @see org.apache.avalon.framework.activity.Disposable#dispose() - */ - public void dispose() - { - for ( Iterator itr = sessions.iterator(); itr.hasNext(); ) - { - Session s = (Session) itr.next(); - try - { - getLogger().info("Closing open hibernate session."); - s.close(); - itr.remove(); - } - catch (HibernateException e) - { - getLogger().error("Couldn't close session!", e); - } - } - } - - /** - * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager) - */ - public void service(ServiceManager manager) throws ServiceException - { - this.manager = manager; - } - - public Session currentSession() throws HibernateException - { - Session s = (Session) session.get(); - if (s == null) - { - s = sessionFactory.openSession(); - session.set(s); - sessions.add(s); - } - return s; - } - - public void closeSession() throws HibernateException - { - getLogger().info("Closing session for thread."); - - Session s = (Session) session.get(); - sessions.remove(s); - session.set(null); - if (s != null) - s.close(); - } -} diff --git a/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/HibernateService.java b/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/HibernateService.java deleted file mode 100644 index c9e4cf06f..000000000 --- a/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/HibernateService.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.codehaus.plexus.hibernate; - -import net.sf.hibernate.SessionFactory; - -/** - * Service for Hibernate persistance manager. - * - * @author Dan Diephouse - * @since Nov 7, 2003 - */ -public interface HibernateService -{ - String ROLE = HibernateService.class.getName(); - - SessionFactory getSessionFactory(); -} diff --git a/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/HibernateSessionService.java b/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/HibernateSessionService.java deleted file mode 100644 index 3fe43be11..000000000 --- a/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/HibernateSessionService.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.codehaus.plexus.hibernate; - -import net.sf.hibernate.HibernateException; -import net.sf.hibernate.Session; - -/** - * A service which starts and ends a hibernate session over its lifecycle. - * By doing this we can optimize starts/ends of sessions. - * - * @author Dan Diephouse - * @since Nov 7, 2003 - */ -public interface HibernateSessionService -{ - final public static String ROLE = HibernateSessionService.class.getName(); - - public Session getSession() throws HibernateException; - - public void closeSession() throws HibernateException; -} diff --git a/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/ServletHibernateSessionService.java b/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/ServletHibernateSessionService.java deleted file mode 100644 index c8f1cf45b..000000000 --- a/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/ServletHibernateSessionService.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.codehaus.plexus.hibernate; - -import javax.servlet.http.HttpSessionEvent; -import javax.servlet.http.HttpSessionListener; - -import net.sf.hibernate.HibernateException; - -import org.codehaus.plexus.hibernate.DefaultHibernateSessionService; - -/** - * @author Dan Diephouse - * @since Nov 7, 2003 - */ -public class ServletHibernateSessionService - extends DefaultHibernateSessionService - implements - HttpSessionListener -{ - /** - * @see javax.servlet.http.HttpSessionListener#sessionCreated(javax.servlet.http.HttpSessionEvent) - */ - public void sessionCreated(HttpSessionEvent arg0) - { - } - - /** - * @see javax.servlet.http.HttpSessionListener#sessionDestroyed(javax.servlet.http.HttpSessionEvent) - */ - public void sessionDestroyed(HttpSessionEvent session) - { - try - { - closeSession(); - } - catch (HibernateException e) - { - throw new RuntimeException(e); - } - } -} diff --git a/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/persister/AbstractPersistable.java b/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/persister/AbstractPersistable.java deleted file mode 100644 index 0c2ddd169..000000000 --- a/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/persister/AbstractPersistable.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.codehaus.plexus.hibernate.persister; - -/** - * @author Dan Diephouse - */ -public abstract class AbstractPersistable - implements Persistable -{ - private long id; - - public AbstractPersistable() - { - setId(-1); - } - - public long getId() - { - return id; - } - - public void setId(long id) - { - this.id = id; - } - - public boolean equals(Object o) - { - if ( !(o instanceof Persistable) ) - { - return false; - } - - Persistable p = (Persistable) o; - - if ( p.getId() == this.getId() ) - { - return true; - } - - return false; - } - - public int hashCode() - { - int hash = 7; - int var_code = (int)(id ^ (id >>> 32)); - - hash = 31 * hash + var_code; - - return hash; - } -} diff --git a/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/persister/DefaultPersister.java b/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/persister/DefaultPersister.java deleted file mode 100644 index 8371749ea..000000000 --- a/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/persister/DefaultPersister.java +++ /dev/null @@ -1,180 +0,0 @@ -package org.codehaus.plexus.hibernate.persister; - -import java.util.List; - -import net.sf.hibernate.HibernateException; -import net.sf.hibernate.ObjectNotFoundException; -import net.sf.hibernate.Session; - -import org.apache.avalon.framework.activity.Disposable; -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.service.Serviceable; -import org.codehaus.plexus.hibernate.HibernateService; -import org.codehaus.plexus.hibernate.HibernateSessionService; - -/** - * - * @author Dan Diephouse - * @since May 14, 2003 - */ -public class DefaultPersister - extends AbstractLogEnabled - implements Persister, Serviceable, Disposable, Initializable -{ - - private Class clazz; - private ServiceManager manager; - private HibernateService hib; - - /** - * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager) - */ - public void service(ServiceManager manager) throws ServiceException - { - this.manager = manager; - } - - /** - * @see com.moveitthere.delivery.service.Persister#setClass(java.lang.Class) - */ - public void setClass(Class clazz) - { - this.clazz = clazz; - } - - protected Session getSession() - throws HibernateException - { - HibernateSessionService hss; - try - { - hss = (HibernateSessionService) manager.lookup(HibernateSessionService.ROLE); - return hss.getSession(); - } - catch (ServiceException e) - { - throw new RuntimeException( "Could not find the Hibernate service.", e ); - } - } - - /** - * @see com.moveitthere.delivery.service.Persister#save(java.lang.Object) - */ - public void save(Object o) - throws HibernateException - { - Session session = getSession(); - try - { - session.save( o ); - } - finally - { - session.flush(); - } - } - - /** - * @see org.codehaus.plexus.hibernate.persister.Persister#update(org.codehaus.plexus.hibernate.persister.Persistable) - */ - public void update(Persistable p) throws HibernateException - { - update( p, p.getId() ); - } - - /** - * @see com.moveitthere.delivery.service.Persister#save(java.lang.Object) - */ - public void update( Object o, long id ) throws HibernateException - { - Session session = getSession(); - try - { - session.update( o, new Long(id) ); - } - finally - { - session.flush(); - } - - } - - /** - * @see com.moveitthere.delivery.service.Persister#save(java.lang.Object) - */ - public void saveOrUpdate( Object o ) throws HibernateException - { - Session session = getSession(); - try - { - session.saveOrUpdate(o); - } - finally - { - session.flush(); - } - } - - /** - * @see com.moveitthere.delivery.service.Persister#load(java.lang.Object) - */ - public Object load( long id ) - throws HibernateException, ObjectNotFoundException - { - Session session = getSession(); - return session.load( clazz, new Long(id) ); - } - - /** - * @see com.moveitthere.delivery.service.Persister#delete(java.lang.Object) - */ - public void delete(Object o) throws HibernateException - { - Session session = getSession(); - try - { - session.delete( o ); - } - finally - { - session.flush(); - } - } - - /** - * @see com.moveitthere.delivery.service.Persister#selectAll() - */ - public List selectAll() throws HibernateException - { - Session session = getSession(); - return session.find( "from " + clazz.getName() + " as obj"); - } - - /** - * @see org.apache.avalon.framework.activity.Disposable#dispose() - */ - public void dispose() - { - manager.release( hib ); - } - - /** - * @see org.apache.avalon.framework.activity.Initializable#initialize() - */ - public void initialize() throws Exception - { - try - { - hib = (HibernateService) manager.lookup(HibernateService.ROLE); - } - catch (ServiceException e) - { - throw new RuntimeException( "Could not find the HibernateService.", e ); - } - } - - -} diff --git a/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/persister/Persistable.java b/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/persister/Persistable.java deleted file mode 100644 index a2707b573..000000000 --- a/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/persister/Persistable.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.codehaus.plexus.hibernate.persister; - -/** - * A class that is persistable into the database. - * - * @author Dan Diephouse - */ -public interface Persistable -{ - public long getId(); -} diff --git a/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/persister/Persister.java b/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/persister/Persister.java deleted file mode 100644 index 1af02c216..000000000 --- a/plexus-avalon-components/hibernate/src/main/org/codehaus/plexus/hibernate/persister/Persister.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.codehaus.plexus.hibernate.persister; - -import java.util.List; - -import net.sf.hibernate.HibernateException; -import net.sf.hibernate.ObjectNotFoundException; - -/** - * A Persister for objects that aren't tied to Hibernate. - * - * @author Dan Diephouse - * @since May 12, 2003 - */ -public interface Persister -{ - final public static String ROLE = Persister.class.getName(); - - public void setClass( Class clazz ); - - public void save( Object p ) - throws HibernateException; - - public void update( Persistable p ) - throws HibernateException; - - public void update( Object o, long id ) - throws HibernateException; - - public Object load( long id ) - throws HibernateException, ObjectNotFoundException; - - public void delete( Object p ) - throws HibernateException; - - public List selectAll() - throws HibernateException; - - public void saveOrUpdate( Object p ) - throws HibernateException; -} diff --git a/plexus-avalon-components/hibernate/src/test/hibernate.cfg.xml b/plexus-avalon-components/hibernate/src/test/hibernate.cfg.xml deleted file mode 100644 index eb65645a3..000000000 --- a/plexus-avalon-components/hibernate/src/test/hibernate.cfg.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - true - net.sf.hibernate.dialect.HSQLDialect - org.hsqldb.jdbcDriver - jdbc:hsqldb:. - sa - - 10 - - - diff --git a/plexus-avalon-components/hibernate/src/test/org/codehaus/plexus/hibernate/Child.java b/plexus-avalon-components/hibernate/src/test/org/codehaus/plexus/hibernate/Child.java deleted file mode 100644 index 327e1f92d..000000000 --- a/plexus-avalon-components/hibernate/src/test/org/codehaus/plexus/hibernate/Child.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.codehaus.plexus.hibernate; - -/* - * LICENSE - */ - -/** - * @author Mathias Bjerke - * @version $Id$ - */ -public class Child { - - private long id; - private String name; - private long hufse; - - public Child() { - } - - public Child(String name) { - this.name = name; - } - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public long getHufse() { - return hufse; - } - - public void setHufse(long hufse) { - this.hufse = hufse; - } -} diff --git a/plexus-avalon-components/hibernate/src/test/org/codehaus/plexus/hibernate/DefaultHibernateSessionServiceTest.java b/plexus-avalon-components/hibernate/src/test/org/codehaus/plexus/hibernate/DefaultHibernateSessionServiceTest.java deleted file mode 100644 index 28e95c2d0..000000000 --- a/plexus-avalon-components/hibernate/src/test/org/codehaus/plexus/hibernate/DefaultHibernateSessionServiceTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.codehaus.plexus.hibernate; - -/* - * LICENSE - */ - -import org.codehaus.plexus.PlexusTestCase; -import net.sf.hibernate.cfg.Configuration; -import net.sf.hibernate.Session; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class DefaultHibernateSessionServiceTest extends PlexusTestCase { - public DefaultHibernateSessionServiceTest(String name) { - super(name); - } - - public void testBasic() throws Exception { - HibernateSessionService sessionService; - Configuration config; - Session session; - - sessionService = (HibernateSessionService)lookup(HibernateSessionService.ROLE); - session = sessionService.getSession(); - - session.save(new Parent()); - - sessionService.closeSession(); - release(sessionService); - } -} diff --git a/plexus-avalon-components/hibernate/src/test/org/codehaus/plexus/hibernate/DefaultHibernateSessionServiceTest.xml b/plexus-avalon-components/hibernate/src/test/org/codehaus/plexus/hibernate/DefaultHibernateSessionServiceTest.xml deleted file mode 100644 index a8b00cb38..000000000 --- a/plexus-avalon-components/hibernate/src/test/org/codehaus/plexus/hibernate/DefaultHibernateSessionServiceTest.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - avalon - - - avalon - Avalon Lifecycle Handler - - - - - - - - - - - - - - - - - - - - - - - - - - - - - org.codehaus.plexus.hibernate.HibernateSessionService - org.codehaus.plexus.hibernate.DefaultHibernateSessionService - - - - org.codehaus.plexus.hibernate.HibernateService - org.codehaus.plexus.hibernate.DefaultHibernateService - - - - - diff --git a/plexus-avalon-components/hibernate/src/test/org/codehaus/plexus/hibernate/Parent.java b/plexus-avalon-components/hibernate/src/test/org/codehaus/plexus/hibernate/Parent.java deleted file mode 100644 index 3a3258922..000000000 --- a/plexus-avalon-components/hibernate/src/test/org/codehaus/plexus/hibernate/Parent.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.codehaus.plexus.hibernate; - -/* - * LICENSE - */ - -/** - * @author Mathias Bjerke - * @version $Id$ - */ -public class Parent { - - private long id; - private Child[] children; - - public Parent() { - } - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public Child[] getChildren() { - return children; - } - - public void setChildren(Child[] children) { - this.children = children; - } -} diff --git a/plexus-avalon-components/hibernate/src/test/org/codehaus/plexus/hibernate/Test.hbm.xml b/plexus-avalon-components/hibernate/src/test/org/codehaus/plexus/hibernate/Test.hbm.xml deleted file mode 100644 index e24c5ec49..000000000 --- a/plexus-avalon-components/hibernate/src/test/org/codehaus/plexus/hibernate/Test.hbm.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plexus-avalon-components/hibernate/src/test/org/codehaus/plexus/hibernate/persister/PersisterTest.java b/plexus-avalon-components/hibernate/src/test/org/codehaus/plexus/hibernate/persister/PersisterTest.java deleted file mode 100644 index d9f232a6d..000000000 --- a/plexus-avalon-components/hibernate/src/test/org/codehaus/plexus/hibernate/persister/PersisterTest.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.codehaus.plexus.hibernate.persister; - -import junit.framework.TestCase; - -/** - * PersisterTest - * - * @author Dan Diephouse - */ -public class PersisterTest - extends TestCase -{ - public class PersistableA - extends AbstractPersistable - { - } - - public void testEquivalence() - { - PersistableA a1 = new PersistableA(); - a1.setId(10); - - PersistableA a2 = new PersistableA(); - a2.setId(10); - - PersistableA a3 = new PersistableA(); - a3.setId(13); - - assertEquals(a1.hashCode(), a2.hashCode()); - assertEquals(a1, a2); - assertEquals(a2, a1); - - assertNotSame( a1, a3 ); - assertNotSame( a3, a1 ); - - assertTrue( a1.hashCode() != a3.hashCode() ); - } -} diff --git a/plexus-avalon-components/jasf/NOTES.txt b/plexus-avalon-components/jasf/NOTES.txt deleted file mode 100644 index ece43484d..000000000 --- a/plexus-avalon-components/jasf/NOTES.txt +++ /dev/null @@ -1,3 +0,0 @@ -TODO -* The PageResource class seems a little superfluous -* Clean up exception handling: in catch's and in AccessController constructors \ No newline at end of file diff --git a/plexus-avalon-components/jasf/maven.xml b/plexus-avalon-components/jasf/maven.xml deleted file mode 100644 index a457c9258..000000000 --- a/plexus-avalon-components/jasf/maven.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - \ No newline at end of file diff --git a/plexus-avalon-components/jasf/project.properties b/plexus-avalon-components/jasf/project.properties deleted file mode 100644 index d912d702f..000000000 --- a/plexus-avalon-components/jasf/project.properties +++ /dev/null @@ -1,20 +0,0 @@ -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# xdocs -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -maven.ui.banner.background = #797f68 -maven.ui.section.background = #BBBBBB -maven.ui.subsection.background = #DDDDDD -maven.ui.section.foreground = #990000 -maven.ui.subsection.foreground = #990000 - -maven.checkstyle.format = turbine - -maven.attributes.src.includes= -maven.attributes.src.excludes=**/*.java - -maven.attributes.test.includes=**/*.java -maven.attributes.test.excludes= - -# display the date on the site -maven.xdoc.date = left \ No newline at end of file diff --git a/plexus-avalon-components/jasf/project.xml b/plexus-avalon-components/jasf/project.xml deleted file mode 100644 index d80e1ffe1..000000000 --- a/plexus-avalon-components/jasf/project.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - ${maven.repo.local}/plexus/poms/plexus-components-avalon-1.0.pom - plexus-jasf - plexus-jasf - Java Application Security Framework - 0.4 - - - Envoi Solutions - http://envoisolutions.com - /images/envoi_small.png - - - 2002 - org.codehaus.jasf - - A security framework for applications - - - This security framework seeks to establish a common ground for applications - to integrate security. By creating a flexible mechanism, one can use - different security frameworks, but the same Components from application - to application. - - - - - 0.2 - 0.2 - HEAD - - - - - - - Dan Diephouse - dandiep - diephouse@envoisolutions.com - Envoi Solutions - - - - - - - - commons-attributes - commons-attributes-api - SNAPSHOT - http://jakarta.apache.org/commons/sandbox/attributes/ - - - - commons-collections - 2.1 - http://jakarta.apache.org/commons/sandbox/attributes/ - - - - commons-digester - 1.2 - - - - commons-logging - 1.0.2 - - - - commons-beanutils - 1.6.1 - - - - plexus - plexus-summit - 1.0-beta-2 - - - - plexus - plexus-activity - 1.0-beta-1 - - - - qdox - qdox - 1.1 - - - - servletapi - servletapi - 2.3 - - - - - diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/Authenticator.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/Authenticator.java deleted file mode 100644 index 35be407aa..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/Authenticator.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.jasf; - -import org.codehaus.jasf.exception.AuthenticationException; -import org.codehaus.jasf.exception.UnauthorizedException; -import org.codehaus.jasf.exception.UnknownEntityException; - -/** - * Entity authentication functions. - * - * @author Dan Diephouse - * @since Nov 20, 2002 - */ -public interface Authenticator -{ - public final static String ROLE = Authenticator.class.getName(); - - public final static String SELECTOR_ROLE = ROLE + "Selector"; - - /** - * Return an Entity based on the Entity name and password. - * - * @param entityname the name of the Entity - * @param password the password for the Entity - * @return Entity - */ - public Object authenticate( String entityname, String password ) - throws UnknownEntityException, AuthenticationException, UnauthorizedException; - - /** - * Return an anonymous entity that can be used to interact with - * the system. - * - * @return Entity - */ - public Object getAnonymousEntity(); -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/ResourceController.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/ResourceController.java deleted file mode 100644 index b7ab86af9..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/ResourceController.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.codehaus.jasf; - -/** - * Determines if entities are authorized to access specific resources. - * - * @author Dan Diephouse - * @since Nov 21, 2002 - */ -public interface ResourceController -{ - public final static String ROLE = ResourceController.class.getName(); - - public final static String SELECTOR_ROLE = ROLE + "Selector"; - - /** - * Check to see if the entity is authorized to access the - * resource. The relation between the entity and resource is entirely up to - * the implementation. - * - * @param entity - * @param resource - * @return boolean - */ - public boolean isAuthorized( Object entity, Object resource ); - -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/Permission.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/Permission.java deleted file mode 100644 index 5917024fd..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/Permission.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.codehaus.jasf.belfast; - -/** - * @author Dan Diephouse - * @since May 10, 2003 - */ -public class Permission -{ - private long id; - private String permission; - - /** - * @return - */ - public String getPermission() - { - return permission; - } - - /** - * @param string - */ - public void setPermission(String string) - { - permission = string; - } - - /** - * @return - */ - public long getId() - { - return id; - } - - /** - * @param l - */ - public void setId(long l) - { - id = l; - } - -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/Role.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/Role.java deleted file mode 100644 index 7ddc3a0d5..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/Role.java +++ /dev/null @@ -1,62 +0,0 @@ -package org.codehaus.jasf.belfast; - -import java.util.List; - -/** - * @author Dan Diephouse - * @since May 10, 2003 - */ -public class Role -{ - private long id; - private String name; - private List permissions; - - /** - * @return - */ - public String getName() - { - return name; - } - - /** - * @return - */ - public List getPermissions() - { - return permissions; - } - - /** - * @param string - */ - public void setName(String string) - { - name = string; - } - - /** - * @param list - */ - public void setPermissions(List list) - { - permissions = list; - } - /** - * @return - */ - public long getId() - { - return id; - } - - /** - * @param l - */ - public void setId(long l) - { - id = l; - } - -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/SecurityManager.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/SecurityManager.java deleted file mode 100644 index a2ba051bf..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/SecurityManager.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.codehaus.jasf.belfast; - -import java.util.List; - -import org.codehaus.jasf.belfast.exception.BackendException; -import org.codehaus.jasf.belfast.exception.EntityExistsException; - -/** - * A standard interface to manage various security aspects of a system. - * - * @author Dan Diephouse - * @since Mar 1, 2003 - */ -public interface SecurityManager -{ - public static final String ROLE = SecurityManager.class.getName(); - - public static final String SELECTOR = SecurityManager.class.getName() + "Selector"; - - void removeAllPermissions( Role role ) - throws BackendException; - - void grant( Role role, Permission perm ) - throws BackendException; - - Permission getPermission(String id) - throws BackendException, EntityExistsException; - - boolean hasPermission( Object entity, String permission ) - throws BackendException; - - boolean hasRole( Object entity, String role) - throws BackendException; - - Role getRole(String id) - throws BackendException, EntityExistsException; - - List getRoles() - throws BackendException; - - List getPermissions() - throws BackendException; -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/User.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/User.java deleted file mode 100644 index afde719be..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/User.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.codehaus.jasf.belfast; - -import java.util.List; - -/** - * A user class that contains basic security features. - * - * @author Dan Diephouse - * @since May 13, 2003 - */ -public interface User - extends org.codehaus.jasf.entities.web.User -{ - - public List getRoles(); - -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/UserManager.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/UserManager.java deleted file mode 100644 index f52fcb4cb..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/UserManager.java +++ /dev/null @@ -1,107 +0,0 @@ -package org.codehaus.jasf.belfast; - -import java.util.List; - -import org.codehaus.jasf.belfast.exception.BackendException; -import org.codehaus.jasf.belfast.exception.EntityExistsException; -import org.codehaus.jasf.belfast.exception.PasswordMismatchException; -import org.codehaus.jasf.entities.web.User; -import org.codehaus.jasf.exception.UnknownEntityException; - -/** - * A standard interface for managing users that trys to be backend agnostic. - * - * @author Dan Diephouse - * @since Mar 1, 2003 - */ -public interface UserManager -{ - public static final String ROLE = UserManager.class.getName(); - - public static final String SELECTOR = UserManager.class.getName() + "Selector"; - - /** - * Check whether a specified user's account exists. - * - * The login name is used for looking up the account. - * - * @param user The user to be checked. - * @return true if the specified account exists - * @throws DataBackendException if there was an error accessing the data backend. - */ - boolean accountExists(User user) - throws BackendException; - - /** - * Check whether a specified user's account exists. - * - * The login name is used for looking up the account. - * - * @param userName The name of the user to be checked. - * @return true if the specified account exists - * @throws DataBackendException if there was an error accessing the data backend. - */ - boolean accountExists(String userName) - throws BackendException; - - /** - * Creates new user account with specified attributes. - * - * @param user the object describing account to be created. - * @param password The password to use for the object creation - * - * @throws DataBackendException if there was an error accessing the data backend. - * @throws EntityExistsException if the user account already exists. - */ - void createAccount(User user, String password) - throws EntityExistsException, BackendException; - - /** - * Removes an user account from the system. - * - * @param user the object describing the account to be removed. - * @throws DataBackendException if there was an error accessing the data backend. - * @throws UnknownEntityException if the user account is not present. - */ - void removeUser(User user) - throws UnknownEntityException, BackendException; - /** - * Change the password for an User. - * - * @param user an User to change password for. - * @param oldPassword the current password suplied by the user. - * @param newPassword the current password requested by the user. - * @exception PasswordMismatchException if the supplied password was - * incorrect. - * @exception UnknownEntityException if the user's record does not - * exist in the database. - * @exception DataBackendException if there is a problem accessing the - * storage. - */ - void changePassword(User user, String oldPassword, String newPassword) - throws PasswordMismatchException, UnknownEntityException, - BackendException; - - /** - * Forcibly sets new password for an User. - * - * This is supposed by the administrator to change the forgotten or - * compromised passwords. Certain implementatations of this feature - * would require administrative level access to the authenticating - * server / program. - * - * @param user an User to change password for. - * @param password the new password. - * @exception UnknownEntityException if the user's record does not - * exist in the database. - * @exception DataBackendException if there is a problem accessing the - * storage. - */ - void forcePassword(User user, String password) - throws UnknownEntityException, BackendException; - - - User retrieveEntity( long id ); - - List getUsers(); -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/exception/BackendException.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/exception/BackendException.java deleted file mode 100644 index 8baeb2828..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/exception/BackendException.java +++ /dev/null @@ -1,89 +0,0 @@ -package org.codehaus.jasf.belfast.exception; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Turbine" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Turbine", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ - -/** - * Thrown to indicate that there was an error accessing the data - * backend of the SecurityService. - * - * @author Rafal Krzewski - * @version $Id$ - */ -public class BackendException - extends Exception -{ - /** - * Construct an DataBackendException with specified detail message. - * - * @param msg The detail message. - */ - public BackendException(String msg) - { - super(msg); - } - - /** - * Construct an DataBackendException with specified detail message - * and nested Throwable. - * - * @param msg The detail message. - * @param nested the exception or error that caused this exception - * to be thrown. - */ - public BackendException(String msg, Throwable nested) - { - super(msg, nested); - } -}; diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/exception/EntityExistsException.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/exception/EntityExistsException.java deleted file mode 100644 index eca991e81..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/exception/EntityExistsException.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.codehaus.jasf.belfast.exception; - -/** - * - * @author Dan Diephouse - * @since Mar 1, 2003 - */ -public class EntityExistsException extends Exception -{ -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/exception/PasswordMismatchException.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/exception/PasswordMismatchException.java deleted file mode 100644 index 9fbfebebe..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/exception/PasswordMismatchException.java +++ /dev/null @@ -1,75 +0,0 @@ -package org.codehaus.jasf.belfast.exception; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Turbine" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Turbine", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ - -/** - * Thrown to indicate that the password supplied by user was incorrect. - * - * @author Rafal Krzewski - * @version $Id$ - */ -public class PasswordMismatchException - extends Exception -{ - /** - * Construct an PasswordMismatchException with specified detail message. - * - * @param msg The detail message. - */ - public PasswordMismatchException(String msg) - { - super(msg); - } -}; diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/package.html b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/package.html deleted file mode 100644 index fc84482af..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/belfast/package.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - -Contains a standard user management and access control system. - - - - -
- -
-
-$Id$ - - diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/entities/web/User.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/entities/web/User.java deleted file mode 100644 index 3b21c894e..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/entities/web/User.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.codehaus.jasf.entities.web; - -import org.codehaus.jasf.summit.session.SessionBindingListener; - -/** - *

User is a basic user interface for web applications. It is implemented by - * the various web security implmentations - ie: db and xml. - *

- *

NOTE: This class extends SessionBindingListener because it is - * used for web based applications only. This is open to change.

- * - * @author Dan Diephouse - * @since Jan 11, 2003 - */ -public interface User - extends SessionBindingListener -{ - public static String ENTITY_TYPE = User.class.getName(); - - /** - * Get the unique user name. - * - * @return String - */ - public String getUserName(); - - /** - * Returns true if the user is currently logged in. - * - * @return boolean - */ - public boolean isLoggedIn(); - - /** - * Sets whether or not the user is logged in. - * - * @param value - */ - public void setLoggedIn( boolean value ); - - public void updateLastAccessDate(); - - public void incrementAccessCounter(); - - public void incrementAccessCounterForSession(); - - public void setTemp( String key, Object value ); - - public Object getTemp( String key ); - - public void setPerm( String key, Object value ); - - public Object getPerm( String key ); - -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/exception/AuthenticationException.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/exception/AuthenticationException.java deleted file mode 100644 index 946de5ddc..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/exception/AuthenticationException.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.codehaus.jasf.exception; - -/** - * EntityAuthenticationException.java - * - * @author Dan Diephouse - * @since Nov 24, 2002 - */ -public class AuthenticationException extends Exception -{ - /** - * Constructor EntityAuthenticationException. - */ - public AuthenticationException() - { - super(); - } - - /** - * Constructor EntityAuthenticationException. - * @param string - */ - public AuthenticationException(String message) - { - super(message); - } - - /** - * Constructor EntityAuthenticationException. - * @param string - */ - public AuthenticationException(String message, Exception e) - { - super(message, e); - } - - -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/exception/UnauthorizedException.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/exception/UnauthorizedException.java deleted file mode 100644 index 06e9692b6..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/exception/UnauthorizedException.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.codehaus.jasf.exception; - -/** - * The exception thrown if an entity is unauthorized to access a resource. - * - * @author Dan Diephouse - * @since Mar 1, 2003 - */ -public class UnauthorizedException extends Exception -{ - - /** - * @param message - */ - public UnauthorizedException(String message) - { - super( message ); - } -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/exception/UnknownEntityException.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/exception/UnknownEntityException.java deleted file mode 100644 index cb4c08d4a..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/exception/UnknownEntityException.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.codehaus.jasf.exception; - -/** - * Exception thrown when the Entity specified does not exist. - * - * @author Dan Diephouse - * @since Nov 23, 2002 - */ -public class UnknownEntityException extends Exception -{ - -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/AbstractClassAccessController.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/AbstractClassAccessController.java deleted file mode 100644 index 039933ac8..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/AbstractClassAccessController.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.codehaus.jasf.impl; - -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.codehaus.jasf.ResourceController; - -/** - * Implements basic functionality that all - * ResourceAccessControllers for classes can use. - * - * @author Dan Diephouse - * @since Jan 24, 2003 - */ -public abstract class AbstractClassAccessController - implements ResourceController -{ - private boolean defaultAuthorization; - - /** - * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration) - */ - public void configure(Configuration config) throws ConfigurationException - { - // Should we return false or true for methods which don't have a - // credential attribute? - defaultAuthorization = - config.getChild("defaultAuthorization").getValueAsBoolean(true); - } - - /** - * Returns the defaultAuthorization. - * @return boolean - */ - public boolean getDefaultAuthorization() - { - return defaultAuthorization; - } - -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/AbstractPageAccessController.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/AbstractPageAccessController.java deleted file mode 100644 index f7a3f8ecf..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/AbstractPageAccessController.java +++ /dev/null @@ -1,174 +0,0 @@ -package org.codehaus.jasf.impl; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.commons.digester.Digester; -import org.apache.commons.logging.impl.SimpleLog; -import org.xml.sax.SAXException; - -import org.codehaus.jasf.ResourceController; -import org.codehaus.jasf.resources.PageResource; - -/** - * AbstractPageACcessController is a partial implementation that makes it easy - * to create an xml resource to credential mapping. This class handles the - * loading of the list of pages and their necessary credentials to view them. - * This class can be extended to use this credential and page relation. The - * only method that needs to be implemented is hasCredential(). In this method - * you take care of your entity and credential relation. - * - * @author Dan Diephouse - * @since Nov 21, 2002 - */ -public abstract class AbstractPageAccessController - extends AbstractLogEnabled - implements ResourceController, Configurable, Initializable -{ - private String delimiter; - - private boolean defaultAuthorization; - - // The root resource - List root; - - // The digester which reads in the pages and their necessary credentials - Digester pageDigester; - - private File pagesFile; - - /** - * Return a list of PageResources. - * - * @return List - */ - public List getPages() - { - return root; - } - - /** - * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration) - */ - public void configure(Configuration config) throws ConfigurationException - { - pagesFile = new File(config.getChild("pages").getValue()); - delimiter = config.getAttribute("delimiter", "/"); - defaultAuthorization = - config.getAttributeAsBoolean("defaultAuthorization", false); - } - - /** - * @see org.apache.avalon.framework.activity.Initializable#initialize() - */ - public void initialize() throws Exception - { - // Set up the digester so that it can read in the xml pages declarations. - pageDigester = new Digester(); - SimpleLog log = new SimpleLog("digester"); - pageDigester.setLogger(log); - - pageDigester.addObjectCreate("resources", ArrayList.class); - pageDigester.addObjectCreate("*/resource", XmlPageResource.class); - pageDigester.addSetNext("*/resource", "add", - XmlPageResource.class.getName()); - pageDigester.addCallMethod("*/resource/name", "setName", 0); - pageDigester.addCallMethod("*/resource/credential", "setCredential", 0); - pageDigester.addObjectCreate("*/resource/resources", ArrayList.class); - pageDigester.addSetNext("*/resource/resources", "setResources", - ArrayList.class.getName()); - - try - { - InputStream stream = new FileInputStream(pagesFile); - root = (List) pageDigester.parse( stream ); - } - catch (FileNotFoundException e) - { - getLogger().error("Could not find the pages file."); - throw new ConfigurationException("Could not find the pages file!"); - } catch (IOException e) - { - getLogger().error("Error reading the pages file."); - throw new ConfigurationException("Error reading the pages file."); - } catch (SAXException e) - { - getLogger().error("Error parsing the pages file."); - throw new ConfigurationException("Error parsing the pages file."); - } - } - - /** - * @param entity the Entity being authorized - * @param resource a PageResource - * @see org.apache.fulcrum.jasf.ResourceAccessController#isAuthorized(Object, Object) - */ - public boolean isAuthorized( Object entity, Object resource ) - { - getLogger().debug("Checking to see if then entity can access " + - ((PageResource)resource).getName() + "."); - - Iterator itr = getPages().iterator(); - while (itr.hasNext()) - { - XmlPageResource r = (XmlPageResource) itr.next(); - if (isAuthorized(entity, ((PageResource) resource).getName(), r)) - { - return true; - } - } - - return defaultAuthorization; - } - - protected boolean isAuthorized( Object entity, String r1, - XmlPageResource presource ) - { - int index = r1.indexOf( delimiter ); - // Check to see if we need to go deeper - if (index >= 0 && index < r1.length()) { - String child = r1.substring(index+1); - - Iterator itr = presource.getResources().iterator(); - while (itr.hasNext()) - { - XmlPageResource childResource = (XmlPageResource) itr.next(); - if(isAuthorized(entity, child, childResource )) - return true; - } - } - - if (presource.getName().equals(r1)) - { - if ( presource.getCredential().equals("") ) - return true; - - if ( hasCredential( entity, presource.getCredential() )) - return true; - } - - return false; - } - - /** - * Implement this method to determine if your entity has the necessary - * credential to access the PageResource that has been - * requested. - * - * @param entity - * @param credential - * @return boolean - */ - public abstract boolean hasCredential( Object entity, String credential ); -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/XmlPageResource.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/XmlPageResource.java deleted file mode 100644 index b0a3fcb48..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/XmlPageResource.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.codehaus.jasf.impl; - -import org.codehaus.jasf.resources.PageResource; - -/** - * XmlPageResource.java - * - * @author Dan Diephouse - * @since Jan 22, 2003 - */ -public class XmlPageResource - extends PageResource -{ - String credential; - - /** - * Returns the credential required to view this page. - * @return String - */ - public String getCredential() - { - return credential; - } - - /** - * Sets the credential required to view this page. - * @param credential The credential to set - */ - public void setCredential(String credential) - { - this.credential = credential; - } - -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/basic/BasicEntity.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/basic/BasicEntity.java deleted file mode 100644 index 965b57a59..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/basic/BasicEntity.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.codehaus.jasf.impl.basic; - -/** - * BasicEntity is an interface which all entities that seek to use this - * package's ResourceAccessControllers must implement. - * - * @author Dan Diephouse - * @since Jan 22, 2003 - */ -public interface BasicEntity -{ - /** - * See if the user has the specified credential. - * - * @param credential - * @return boolean - */ - public boolean hasCredential( String credential ); -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/basic/BasicUser.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/basic/BasicUser.java deleted file mode 100644 index 4681076f2..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/basic/BasicUser.java +++ /dev/null @@ -1,238 +0,0 @@ -package org.codehaus.jasf.impl.basic; - -import java.util.ArrayList; -import java.util.Date; -import java.util.Hashtable; -import java.util.Iterator; -import java.util.List; - -import org.codehaus.jasf.entities.web.User; -import org.codehaus.jasf.summit.session.SessionBindingEvent; - -/** - * @author Dan Diephouse - * @since Nov 20, 2002 - * - * A simple Entity implementation of a User. There is a simple - * one to many association with the user's credentials. - */ -public class BasicUser implements User, BasicEntity -{ - String userName; - - String password; - - List roles; - - boolean loggedIn = false; - - Hashtable temp; - - Date lastAccessDate; - - int accessCounter = 0; - - int sessionAccessCounter = 0; - - public BasicUser() - { - roles = new ArrayList(); - temp = new Hashtable(); - } - - /** - * Return the username, which is a unique identifier for each - * user. - * - * @return String - */ - public String getUserName() - { - return userName; - } - - /** - * Sets the username. - * @param username The username to set - */ - public void setUserName(String userName) - { - this.userName = userName; - } - - /** - * Returns the password. - * @return String - */ - public String getPassword() - { - return password; - } - - /** - * Sets the password. - * @param password The password to set - */ - public void setPassword(String password) - { - this.password = password; - } - - public List getRoles() - { - return roles; - } - - public void addRole( Role r ) - { - roles.add(r); - } - - public void removeRole( Role r ) - { - roles.remove(r); - } - - /** - * Check to see if the user has the credential in any of their roles. - * - * @param c - */ - public boolean hasCredential( String c ) - { - Iterator itr = roles.iterator(); - while (itr.hasNext()) - { - Role r = (Role) itr.next(); - if (r.hasCredential(c)) - return true; - } - - // The Credential was not found. - return false; - } - - /** - * @return boolean - */ - public boolean hasLoggedIn() - { - return loggedIn; - } - - /** - * @see org.apache.fulcrum.jasf.entities.web.User#setLoggedIn(boolean) - */ - public void setLoggedIn( boolean loggedIn ) - { - this.loggedIn = loggedIn; - } - - /** - * @see org.apache.fulcrum.jasf.entities.web.User#isLoggedIn() - */ - public boolean isLoggedIn() - { - return false; - } - - /** - * @see org.apache.fulcrum.jasf.entities.web.User#setTemp(String, Object) - */ - public void setTemp(String key, Object value) - { - temp.put(key, value); - } - - - /** - * Gets the last access date for this User. This is the last time - * that the user object was referenced. - * - * @return A Java Date with the last access date for the user. - */ - public java.util.Date getLastAccessDate() - { - if (lastAccessDate == null) - { - updateLastAccessDate(); - } - return lastAccessDate; - } - - /** - * Sets the last access date for this User. This is the last time - * that the user object was referenced. - */ - public void updateLastAccessDate() - { - lastAccessDate = new java.util.Date(); - } - - /** - * @see org.apache.fulcrum.jasf.entities.web.User#getTemp(String) - */ - public Object getTemp(String key) - { - return temp.get(key); - } - - /** - * This is just a call to setTemp, because there is no permanent storage - * mechanism yet. - * - * @see org.apache.fulcrum.jasf.entities.web.User#setPerm(java.lang.String, - * java.lang.Object) - */ - public void setPerm(String key, Object value) - { - setTemp(key, value); - } - - /** - * This is just a call to getTemp, because there is no permanent storage - * mechanism yet. - * - * @see org.apache.fulcrum.jasf.entities.web.User#getPerm(java.lang.String) - */ - public Object getPerm(String key) - { - return getTemp(key); - } - - /** - * @see org.apache.fulcrum.jasf.entities.web.User#incrementAccessCounter() - */ - public void incrementAccessCounter() - { - accessCounter++; - } - - /** - * @see org.apache.fulcrum.jasf.entities.web.User#incrementAccessCounterForSession() - */ - public void incrementAccessCounterForSession() - { - sessionAccessCounter++; - } - - /** - * Currently does nothing. - * - * @see org.apache.fulcrum.security.session.SessionBindingListener#valueBound(org.apache.fulcrum.security.session.SessionBindingEvent) - */ - public void valueBound(SessionBindingEvent event) - { - // Do nothing - } - - /** - * Currently does nothing. - * - * @see org.apache.fulcrum.security.session.SessionBindingListener#valueUnbound(org.apache.fulcrum.security.session.SessionBindingEvent) - */ - public void valueUnbound(SessionBindingEvent event) - { - // Do nothing - } -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/basic/ClassAccessController.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/basic/ClassAccessController.java deleted file mode 100644 index 50815abb6..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/basic/ClassAccessController.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.codehaus.jasf.impl.basic; - -import java.lang.reflect.Method; -import java.util.Collection; -import java.util.Iterator; - -import org.apache.commons.attributes.Attributes; -import org.codehaus.jasf.impl.AbstractClassAccessController; -import org.codehaus.jasf.resources.Credential; - -/** - * ClassAccessController - * - * @author Dan Diephouse - * @since Jan 24, 2003 - */ -public class ClassAccessController - extends AbstractClassAccessController -{ - /** - * @see org.apache.fulcrum.jasf.ResourceAccessController#isAuthorized(java.lang.Object, java.lang.Object) - */ - public boolean isAuthorized(Object entity, Object resource) - { - System.out.println("isAuthd?"); - if (Attributes.hasAttributeType((Method) resource, Credential.class)) - { - Collection attributes = - Attributes.getAttributes((Method) resource); - - for ( Iterator itr = attributes.iterator(); itr.hasNext(); ) - { - // Since I couldn't get AttributesUtil to filter out only - // Credentials, I'm doing it myself. - Object credObj = itr.next(); - if ( credObj instanceof Credential ) - { - Credential cred = (Credential) credObj; - System.out.println("checking for " + cred.getName()); - - if ( !((BasicEntity) entity).hasCredential(cred.getName()) ) - return false; - } - } - - return true; - } - - return getDefaultAuthorization(); - } - -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/basic/PageAccessController.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/basic/PageAccessController.java deleted file mode 100644 index f8d1bee3f..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/basic/PageAccessController.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.codehaus.jasf.impl.basic; - -import org.codehaus.jasf.impl.AbstractPageAccessController; - -/** - * PageAccessController.java - * - * @author Dan Diephouse - * @since Jan 22, 2003 - */ -public class PageAccessController extends AbstractPageAccessController -{ - public static String ROLE = PageAccessController.class.getName(); - - - /** - * Check to see if the entity (ie, the XmlUser) has the - * credential in any of their Roles. - * - * @see org.apache.fulcrum.jasf.impl.AbstractXmlPageAccessController#hasCredential(Object, String) - */ - public boolean hasCredential( Object entity, String credential ) - { - getLogger().debug("Checking to see if the entity has the " + - credential + " credential."); - return ((BasicEntity) entity).hasCredential(credential); - } -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/basic/Role.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/basic/Role.java deleted file mode 100644 index 216ead9cb..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/basic/Role.java +++ /dev/null @@ -1,69 +0,0 @@ -package org.codehaus.jasf.impl.basic; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -/** - * A Role is a collection of credentials that a user has. A user can - * participate in multiple roles. - * - * @author Dan Diephouse - * @since Jan 19, 2003 - */ -public class Role -{ - List credentials; - - String name; - - public Role() - { - credentials = new ArrayList(); - } - - public List getCredentials() - { - return credentials; - } - - public void addCredential( String c ) - { - credentials.add(c); - } - /** - * Method hasCredential. - * @param c - * @return boolean - */ - public boolean hasCredential(String credential) - { - Iterator itr = credentials.iterator(); - while (itr.hasNext()) - { - String roleCred = (String) itr.next(); - if (roleCred.equals(credential)) - return true; - } - - return false; - } - - /** - * Returns the name. - * @return String - */ - public String getName() - { - return name; - } - - /** - * Sets the name. - * @param name The name to set - */ - public void setName(String name) - { - this.name = name; - } -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/basic/UserAuthenticationController.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/basic/UserAuthenticationController.java deleted file mode 100644 index bcaf1c7f6..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/basic/UserAuthenticationController.java +++ /dev/null @@ -1,207 +0,0 @@ -package org.codehaus.jasf.impl.basic; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.commons.digester.AbstractObjectCreationFactory; -import org.apache.commons.digester.Digester; -import org.codehaus.jasf.Authenticator; -import org.codehaus.jasf.exception.AuthenticationException; -import org.codehaus.jasf.exception.UnknownEntityException; - -import org.xml.sax.Attributes; -import org.xml.sax.SAXException; - -/** - * UserAuthenticationController loads in a defined set of users - * and credentials via an XML file. - * - * @author Dan Diephouse - * @since Nov 22, 2002 - */ -public class UserAuthenticationController extends AbstractLogEnabled - implements Authenticator, Configurable, Initializable -{ - // Where the users are stored after initialization - List users; - - // Where the roles are stored after initialization - List roles; - - // The digester which reads in the users and their roles - Digester userDigester; - - // The digester which reads in the roles - Digester roleDigester; - - private File rolesFile; - - private File usersFile; - - public UserAuthenticationController() - { - } - - /** - * @see org.apache.fulcrum.jasf.Authenticator#authenticate(String, String) - */ - public Object authenticate(String entityname, String password) - throws UnknownEntityException, AuthenticationException - { - Iterator itr = users.iterator(); - while (itr.hasNext()) - { - BasicUser user = (BasicUser) itr.next(); - - if (user.getUserName().equals(entityname)) - { - if(user.getPassword().equals(password)) - return user; - else - throw new AuthenticationException(); - } - } - - throw new UnknownEntityException(); - } - - /** - * @see org.apache.fulcrum.jasf.EntityAuthenticationController#getAnonymousEntity() - */ - public Object getAnonymousEntity() - { - return new BasicUser(); - } - - /** - * Lookup a Role by its name. - * - * @param name - * @return Role - */ - public Role getRole( String name ) - { - getLogger().debug("Retrieving role: " + name); - Iterator itr = roles.iterator(); - while (itr.hasNext()) - { - Role r = (Role) itr.next(); - if (r.getName().equals(name)) - return r; - } - - // TODO: Throw exception instead - return null; - } - - /** - * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration) - */ - public void configure(Configuration config) throws ConfigurationException - { - usersFile = new File( config.getChild("users").getValue() ); - rolesFile = new File( config.getChild("roles").getValue() ); - } - - /** - * @see org.apache.avalon.framework.activity.Initializable#initialize() - */ - public void initialize() throws Exception - { - // Set up the Digest to load in the roles file. - roleDigester = new Digester(); - - roleDigester.addObjectCreate("roles", ArrayList.class); - roleDigester.addObjectCreate("roles/role", Role.class); - roleDigester.addSetNext("roles/role", "add", ArrayList.class.getName()); - roleDigester.addCallMethod("roles/role/name", "setName", 0); - roleDigester.addCallMethod("roles/role/credentials/credential", "addCredential", 0); - - // Set up the digester to load in the users file. - userDigester = new Digester(); - - userDigester.addObjectCreate("users", ArrayList.class); - userDigester.addObjectCreate("users/user", BasicUser.class); - userDigester.addSetNext("users/user", "add", ArrayList.class.getName()); - userDigester.addCallMethod("users/user/username", "setUserName", 0); - userDigester.addCallMethod("users/user/password", "setPassword", 0); - userDigester.addFactoryCreate( "users/user/roles/role", - new RoleCreationFactory(this) ); - userDigester.addSetNext("users/user/roles/role", "addRole", Role.class.getName()); - - try - { - InputStream rolesStream = new FileInputStream( rolesFile ); - roles = (List) roleDigester.parse( rolesStream ); - } - catch (FileNotFoundException e) - { - getLogger().error("Could not find the roles file."); - throw new ConfigurationException("Could not find the roles file!"); - } catch (IOException e) - { - getLogger().error("Error reading the roles file."); - throw new ConfigurationException("Error reading the roles file."); - } catch (SAXException e) - { - getLogger().error("Error parsing the roles file."); - throw new ConfigurationException("Error parsing the roles file."); - } - - try - { - InputStream usersStream = new FileInputStream(usersFile); - users = (List) userDigester.parse( usersStream ); - } - catch (FileNotFoundException e) - { - getLogger().error("Could not find the users file."); - throw new ConfigurationException("Could not find the users file!"); - } catch (IOException e) - { - getLogger().error("Error reading the users file."); - throw new ConfigurationException("Error reading the users file."); - } catch (SAXException e) - { - getLogger().error("Error parsing the users file."); - throw new ConfigurationException("Error parsing the users file."); - } - } - - /** - * A factory that pulls the Role objects as needed. - * - * @author Dan Diephouse - * @since Jan 23, 2003 - */ - protected class RoleCreationFactory extends AbstractObjectCreationFactory - { - private UserAuthenticationController _controller; - - public RoleCreationFactory( UserAuthenticationController controller ) - { - _controller = controller; - } - - /** - * @see org.apache.commons.digester.ObjectCreationFactory#createObject(org.xml.sax.Attributes) - */ - public Object createObject(Attributes att) throws Exception - { - String name = att.getValue("name"); - return _controller.getRole(name); - } - - } -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/global/AllAccessResourceController.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/global/AllAccessResourceController.java deleted file mode 100644 index 2e19d1208..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/global/AllAccessResourceController.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.jasf.impl.global; - -import org.codehaus.jasf.ResourceController; - -/** - * AllAccessResourceController is an implementation of - * ResourceController that gives access to any resource - * for any credential for any Entity. - * - * @author Dan Diephouse - * @since Jan 10, 2003 - */ -public class AllAccessResourceController implements ResourceController -{ - public static String ROLE = AllAccessResourceController.class.getName(); - - /** - * A pseudo implementation that returns true for every instance, granting - * Entitys all access. - * - * @see org.apache.fulcrum.jasf.ResourceAccessController#isAuthorized(Object, Object) - */ - public boolean isAuthorized( Object entity, Object resource ) - { - return true; - } -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/global/NoAccessResourceController.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/global/NoAccessResourceController.java deleted file mode 100644 index f0582f65e..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/impl/global/NoAccessResourceController.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.jasf.impl.global; - -import org.codehaus.jasf.ResourceController; - -/** - * NoAccessResourceController is an implementation of - * ResourceController that does not give access to any - * resource for any Entity. - * - * @author Dan Diephouse - * @since Jan 10, 2003 - */ -public class NoAccessResourceController implements ResourceController -{ - - /** - * A pseudo implementation that returns false for every instance, denying - * any Entity access to any resource. - * - * @see org.apache.fulcrum.jasf.ResourceAccessController#isAuthorized(Object, Object) - */ - public boolean isAuthorized( Object entity, Object resource ) - { - return false; - } - -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/resources/ClassMethodResource.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/resources/ClassMethodResource.java deleted file mode 100644 index e7ac89371..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/resources/ClassMethodResource.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.codehaus.jasf.resources; - -/** - * ClassMethodResource need only be used to retrieve it's RESOURCE_TYPE. - * - * @author Dan Diephouse - * @since Jan 21, 2003 - */ -public class ClassMethodResource -{ - public static String RESOURCE_TYPE = ClassMethodResource.class.getName(); -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/resources/Credential.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/resources/Credential.java deleted file mode 100644 index d615aa835..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/resources/Credential.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.codehaus.jasf.resources; - -/** - * A Credential Attribute. - * - * @author Dan Diephouse - * @since Sep 11, 2003 - */ -public class Credential -{ - private String name; - - public Credential( String name ) - { - this.name = name; - } - - /** - * @return - */ - public String getName() - { - return name; - } - - /** - * @param name - */ - public void setName(String name) - { - this.name = name; - } - -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/resources/PageResource.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/resources/PageResource.java deleted file mode 100644 index bd237ef07..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/resources/PageResource.java +++ /dev/null @@ -1,95 +0,0 @@ -package org.codehaus.jasf.resources; - -import java.util.ArrayList; -import java.util.List; - -/** - * The PageResource and associated ResourceControllers are a simple way to - * restrict access to certain web pages. They in no way provide a way to handle - * actions that a user might perform while using the webpage, such as updating - * the database or changing some setting. - * - * @author Dan Diephouse - * @since Nov 21, 2002 - */ -public class PageResource -{ - public final static String RESOURCE_TYPE = - PageResource.class.getName(); - - String name; - - List resources; - - String credential; - - public PageResource( String name ) - { - this.name = name; - resources = new ArrayList(); - } - - public PageResource() - { - resources = new ArrayList(); - } - - public String getName() - { - return name; - } - - public void setName( String name ) - { - this.name = name; - } - /** - * Returns the resources. - * @return List - */ - public List getResources() - { - return resources; - } - - /** - * Sets the children resources if this is a directory. - * - * @param resources The resources to set - */ - public void setResources(List resources) - { - this.resources = resources; - } - - /** - * Adds a resource to the list of children if this is a directory. - * - * @param resource the child file. - */ - public void addResource( PageResource resource ) - { - resources.add(resource); - } - - /** - * Returns true if this resource has child resources, ie: it is a directory. - * - * @return boolean - */ - public boolean hasChildren() - { - if (resources.size() > 0) - return true; - - return false; - } - - public boolean equals( Object resource ) - { - if (((PageResource) resource).getName().equals(getName())) - return true; - - return false; - } -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/LoginValve.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/LoginValve.java deleted file mode 100644 index 431519f41..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/LoginValve.java +++ /dev/null @@ -1,198 +0,0 @@ -package org.codehaus.jasf.summit; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Turbine" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Turbine", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.Iterator; -import java.util.List; - -import javax.servlet.http.HttpSession; - -import org.codehaus.plexus.summit.activity.ActionEventService; -import org.codehaus.plexus.summit.exception.SummitException; -import org.codehaus.plexus.summit.pipeline.valve.AbstractValve; -import org.codehaus.plexus.summit.rundata.RunData; - -/** - * Handles the Login and Logout actions in the request process - * cycle. - * - * @author Jason van Zyl - * @author Daniel Rall - * @version $Id$ - */ -public class LoginValve - extends AbstractValve -{ - private String loginAction = "LoginUser"; - private String logoutAction = "LogoutUser"; - private String loginPage = "Login.vm"; - - /** - * Here we can setup objects that are thread safe and can be - * reused. We setup the session validator and the access - * controller. - */ - public LoginValve() - throws Exception - { - } - - /** - * @see org.apache.turbine.Valve#invoke(RunData, ValveContext) - */ - public void invoke(RunData data) - throws IOException, SummitException - { - try - { - process((SecureRunData)data); - } - catch (Exception e) - { - throw new SummitException( "Valve error.", e ); - } - } - - /** - * Handles user sessions, parsing of the action from the query - * string, and access control. - * - * @param data The run-time data. - */ - protected void process(SecureRunData data) - throws Exception - { - //getLogger().debug( "Checking if the user is logging in." ); - - // Special case for login and logout, this must happen before the - // session validator is executed in order either to allow a user to - // even login, or to ensure that the session validator gets to - // mandate its page selection policy for non-logged in users - // after the logout has taken place. - - // TODO: should there be a special rundata action param? - String actionName = data.getParameters().getString( "action", "" ); - if (!actionName.equals("") && - (actionName.equalsIgnoreCase(loginAction) || - actionName.equalsIgnoreCase(logoutAction) ) ) - { - //getLogger().debug( "User is logging in." ); - - // If a User is logging in, we should refresh the - // session here. Invalidating session and starting a - // new session would seem to be a good method, but I - // (JDM) could not get this to work well (it always - // required the user to login twice). Maybe related - // to JServ? If we do not clear out the session, it - // is possible a new User may accidently (if they - // login incorrectly) continue on with information - // associated with the previous User. Currently the - // only keys stored in the session are "turbine.user" - // and "turbine.acl". - if (actionName.equalsIgnoreCase - (loginAction)) - { - Enumeration names = data.getSession().getAttributeNames(); - if (names != null) - { - // copy keys into a new list, so we can clear the session - // and not get ConcurrentModificationException - List nameList = new ArrayList(); - while (names.hasMoreElements()) - { - nameList.add(names.nextElement()); - } - - HttpSession session = data.getSession(); - Iterator nameIter = nameList.iterator(); - while (nameIter.hasNext()) - { - try - { - session.removeAttribute((String)nameIter.next()); - } - catch (IllegalStateException invalidatedSession) - { - break; - } - } - } - } - - //getLogger().debug( "Invoking login action." ); - - ActionEventService action = - (ActionEventService) data.getServiceManager().lookup( ActionEventService.ROLE ); - action.perform(data); - - // Remove the action parameter so the action is executed again later - for ( Iterator itr = data.getParameters().keys(); itr.hasNext(); ) - { - String key = (String) itr.next(); - if (key.equals( "action" )) - { - synchronized (itr) - { - itr.remove(); - } - return; - } - } - } - } -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/ResourceControllerValve.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/ResourceControllerValve.java deleted file mode 100644 index 28cc4e44d..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/ResourceControllerValve.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.codehaus.jasf.summit; - -import java.io.IOException; - -import org.apache.avalon.framework.service.ServiceSelector; -import org.codehaus.jasf.ResourceController; -import org.codehaus.jasf.resources.PageResource; -import org.codehaus.plexus.summit.exception.SummitException; -import org.codehaus.plexus.summit.pipeline.valve.AbstractValve; -import org.codehaus.plexus.summit.rundata.RunData; - -/** - * Checks to see if the user is authorized to access the specified target. - * If not, it redirects the user to a page telling them they aren't - * authorized. - * - * @author Dan Diephouse - * @since Feb 28, 2003 - */ -public class ResourceControllerValve - extends AbstractValve -{ - - private String notAuthorizedPage = "NotAuthroized.vm"; - - /** - * @see org.codehaus.plexus.summit.pipeline.valve.Valve#invoke(org.codehaus.plexus.summit.rundata.RunData, org.codehaus.plexus.summit.pipeline.valve.ValveContext) - */ - public void invoke(RunData data) - throws IOException, SummitException - { - SecureRunData secData = (SecureRunData) data; - - try - { - ServiceSelector security = - ( ServiceSelector ) data.getServiceManager().lookup( ResourceController.SELECTOR_ROLE ); - - ResourceController controller = - (ResourceController) security.select( PageResource.RESOURCE_TYPE ); - - if ( !controller.isAuthorized( - secData.getUser(), - new PageResource( data.getTarget() ))) - { - data.setTarget( notAuthorizedPage ); - } - - data.getServiceManager().release( controller ); - } - catch (Exception e) - { - throw new SummitException( - "Could not find the SecurityService!", e ); - } - } -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/SecureActionEventValve.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/SecureActionEventValve.java deleted file mode 100644 index e5027d209..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/SecureActionEventValve.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.codehaus.jasf.summit; - -import java.io.IOException; - -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; -import org.codehaus.jasf.exception.UnauthorizedException; -import org.codehaus.jasf.summit.activity.SecureActionEvent; -import org.codehaus.plexus.summit.exception.SummitException; -import org.codehaus.plexus.summit.pipeline.valve.AbstractValve; -import org.codehaus.plexus.summit.rundata.RunData; - -/** - * Executes an action after checking to see that the user has the neccessary - * credentials using the ResourceController for the ClassResource. - * - * @author Dan Diephouse - * @since Mar 1, 2003 - */ -public class SecureActionEventValve - extends AbstractValve -{ - private String notAuthorizedPage = "NotAuthroized.vm"; - - private ServiceManager manager; - - /** - * @see org.codehaus.plexus.summit.pipeline.valve.Valve#invoke(org.codehaus.plexus.summit.rundata.RunData, org.codehaus.plexus.summit.pipeline.valve.ValveContext) - */ - public void invoke(RunData data) - throws IOException, SummitException - { - try - { - SecureActionEvent actionEvent = - ( SecureActionEvent ) manager.lookup( SecureActionEvent.ROLE ); - - try - { - actionEvent.perform( data ); - } - catch ( UnauthorizedException e ) - { - data.setTarget( notAuthorizedPage ); - } - catch ( Exception e ) - { - throw new SummitException( - "Could not execute action!", e ); - } - } - catch (ServiceException e) - { - throw new SummitException( - "Could not find the SecurityService!", e ); - } - } -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/SecureRunData.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/SecureRunData.java deleted file mode 100644 index cf33b6496..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/SecureRunData.java +++ /dev/null @@ -1,154 +0,0 @@ -package org.codehaus.jasf.summit; - -import javax.servlet.http.HttpSession; - -import org.codehaus.plexus.summit.SummitConstants; -import org.codehaus.plexus.summit.rundata.DefaultRunData; -import org.codehaus.plexus.summit.view.ViewContext; - -import org.codehaus.jasf.entities.web.User; -import org.codehaus.jasf.summit.session.SessionBindingEventProxy; - -/** - * An implementation of RunData which keeps a user's Session. - * - * @author Dan Diephouse - * @since Feb 28, 2003 - */ -public class SecureRunData extends DefaultRunData -{ - public static final String USER_SESSION_KEY = "user.session"; - - private User user; - - private String message; - - /** - * @return String - */ - public String getMessage() - { - return message; - } - - /** - * Sets the message. - * @param message The message to set - */ - public void setMessage(String message) - { - this.message = message; - } - - public ViewContext getViewContext() - { - return (ViewContext) getMap().get( SummitConstants.VIEW_CONTEXT ); - } - - /** - * Checks to see if there is a user for this session. - * - * @return boolean - */ - public boolean hasUser() - { - return ( getUser() != null ); - } - - /** - * Return the User for this session. - * - * @return User - */ - public User getUser() - { - if ( user == null ) - { - user = getUserFromSession( getSession() ); - } - return user; - } - - /** - *

Saves this user object to the session.

- * - *

Anyone overriding this method should be sure to leverage - * the SessionBindingEventProxy when adding the user - * and acl into the session. This allows hook functions to be called on - * the User and AccessControlList when it is - * removed from the session (which happens on session timeout).

- * - * @param user The user to set - */ - public void setUser(User user) - { - this.user = user; - getSession().setAttribute( - USER_SESSION_KEY, new SessionBindingEventProxy(user) ); - } - - /** - * Attempts to get the User object from the session. If the user - * does not exist in the session, null is returned. - * - *

Anyone overriding this method should be sure to leverage - * the SessionBindingEventProxy when pulling the - * User object from the session, allowing hook - * functions to be called on the listener when it is removed from - * the session (which happens on session timeout). - * - * @param session The session to retrieve a User - * object from. - * @return The retreived user, or null if errors - * occur. - * @see org.apache.turbine.services.rundata.SessionBindingEventProxy - * @see org.apache.fulcrum.security.entity.User - * @see org.apache.fulcrum.security.session.SessionBindingListener - */ - public User getUserFromSession(HttpSession session) - { - try - { - SessionBindingEventProxy proxy = - (SessionBindingEventProxy) session - .getAttribute(USER_SESSION_KEY); - - // If the user isn't yet logged in, return null so that - // the session validator can take the correct action - // (i.e. make a temporary anonymous user). - return (proxy == null ? null : (User) proxy.getListener()); - } - catch (ClassCastException e) - { - String message = "User object did not implement User interface. " - + "if you are sure the interface is implemented, the user " + - "object in the session and this class may be loaded from " + - "different classloaders. This has been known to happen " + - "when using multiple turbine apps in tomcat that interact " + - "through the use of RequestDispatcher.include or forward."; - - getLogger().error(message, e); - - return null; - } - } - - /** - * Allows one to invalidate the user in a session. - * - * @param session The session from which to remove the user. - * @return Whether the user was removed from the session. - */ - public boolean removeUserFromSession(HttpSession session) - { - try - { - session.removeAttribute(USER_SESSION_KEY); - } - catch (Exception e) - { - return false; - } - return true; - } -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/SessionValidatorValve.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/SessionValidatorValve.java deleted file mode 100644 index 8b108281f..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/SessionValidatorValve.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.codehaus.jasf.summit; - -import java.io.IOException; - -import org.codehaus.plexus.summit.exception.SummitException; -import org.codehaus.plexus.summit.pipeline.valve.AbstractValve; -import org.codehaus.plexus.summit.rundata.RunData; - -/** - *

- * Validates that there is a user in the session. If there isn't one an - * anonymous user is retrieved from the User Authenticator. - *

- * This must be placed before the resolver valve. - *

- * @author Dan Diephouse - * @since Feb 28, 2003 - * - * @todo How do I cancel execution of an action? - */ -public class SessionValidatorValve - extends AbstractValve -{ - - private String loginTarget = "Login.vm"; - - /** - * @see org.codehaus.plexus.summit.pipeline.valve.AbstractValve#invoke(org.codehaus.plexus.summit.rundata.RunData, org.codehaus.plexus.summit.pipeline.valve.ValveContext) - */ - public void invoke(RunData data) - throws IOException, SummitException - { - SecureRunData secData = (SecureRunData) data; - - if ( secData.getUser() == null || - !secData.getUser().isLoggedIn() ) - { - data.setTarget( loginTarget ); - - //data.setAction(null); - } - } -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/activity/SecureActionEvent.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/activity/SecureActionEvent.java deleted file mode 100644 index 14116a622..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/activity/SecureActionEvent.java +++ /dev/null @@ -1,137 +0,0 @@ -package org.codehaus.jasf.summit.activity; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.service.ServiceSelector; -import org.apache.avalon.framework.service.Serviceable; -import org.codehaus.plexus.summit.activity.DefaultActionEventService; -import org.codehaus.plexus.summit.exception.SummitException; -import org.codehaus.plexus.summit.exception.SummitRuntimeException; -import org.codehaus.plexus.summit.rundata.RunData; - -import org.codehaus.jasf.ResourceController; -import org.codehaus.jasf.resources.ClassMethodResource; -import org.codehaus.jasf.summit.SecureRunData; - -/** - * A version of ActionEvent which checks to make sure the user is authorized - * to access the method on the action using the ResourceController for the - * ClassResource. - * - * @author Dan Diephouse - * @since Mar 1, 2003 - */ -public class SecureActionEvent - extends DefaultActionEventService - implements Serviceable -{ - private ServiceManager manager; - - /** - * @see org.codehaus.plexus.summit.activity.ActionEvent#perform(org.codehaus.plexus.summit.rundata.RunData) - */ - public void perform(RunData data) throws Exception - { - String action = data.getParameters().getString("action"); - - if ( action != null ) - { - String methodName = null; - try - { - methodName = getMethodName( data, DEFAULT_METHOD ); - Class actionClass = getClass( action ); - Method method = getMethod( actionClass, data.getClass(), methodName, DEFAULT_METHOD ); - - if ( action.equals("LoginUser") || - isAuthorized( (SecureRunData) data, method ) ) - { - // The arguments to pass to the method to execute. - Object[] args = new Object[1]; - args[0] = data; - - method.invoke( actionClass.newInstance(), args ); - } - else - { - ((SecureRunData) data).setMessage( - "You do not have permission to perform that action." ); - } - } - catch ( ClassNotFoundException e ) - { - getLogger().debug( "Could not find the action.", e ); - } - catch (InvocationTargetException ite) - { - // i have not seen this exception, in stacktraces generated - // while doing my own testing on jdk1.3.1 and earlier. But - // see it increasingly from stacktraces reported by others. - // Its printStackTrace method should do The Right Thing, but - // I suspect some implementation is not. - // Unwrap it here, so that the original cause does not get lost. - Throwable t = ite.getTargetException(); - if (t instanceof Exception) - { - throw (Exception)t; - } - else if (t instanceof java.lang.Error) - { - throw (java.lang.Error)t; - } - else - { - // this should not happen, but something could throw - // an instance of Throwable - throw new SummitRuntimeException("",t); - } - } - } - } - - /** - * @param data - * @param method - * @return boolean - */ - protected boolean isAuthorized(SecureRunData data, Method method) - throws SummitException - { - ServiceSelector security; - boolean isAuthorized; - - if ( data.getUser() == null || - !data.getUser().isLoggedIn() ) - return false; - - try - { - security = (ServiceSelector) manager.lookup(ResourceController.SELECTOR_ROLE); - - ResourceController controller = - (ResourceController) security.select( ClassMethodResource.RESOURCE_TYPE ); - - isAuthorized = controller.isAuthorized( data.getUser(), method ); - - manager.release( controller ); - - return isAuthorized; - } - catch (ServiceException e) - { - throw new SummitException( "Could not find the SecurityService!", - e ); - } - } - - /** - * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager) - */ - public void service(ServiceManager manager) throws ServiceException - { - this.manager = manager; - } -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/session/DefaultSession.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/session/DefaultSession.java deleted file mode 100644 index a7d057d6c..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/session/DefaultSession.java +++ /dev/null @@ -1,74 +0,0 @@ -package org.codehaus.jasf.summit.session; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Turbine" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Turbine", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ - -import javax.servlet.http.HttpSession; - -/** - * Default implementation of the - * Session interface. - * - * @author Daniel Rall - * @version $Id$ - */ -public class DefaultSession implements Session -{ - private HttpSession session; - - public DefaultSession(HttpSession session) - { - this.session = session; - } -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/session/DefaultSessionBindingEvent.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/session/DefaultSessionBindingEvent.java deleted file mode 100644 index d98b6bb22..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/session/DefaultSessionBindingEvent.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.codehaus.jasf.summit.session; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Turbine" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Turbine", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ - -import javax.servlet.http.HttpSessionBindingEvent; - -/** - * Default implementation of the - * {@link org.apache.fulcrum.security.session.SessionBindingEvent} interface. - * - * @author Daniel Rall - * @version $Id$ - */ -public class DefaultSessionBindingEvent implements SessionBindingEvent -{ - private Session session; - private String name; - - public DefaultSessionBindingEvent(HttpSessionBindingEvent event) - { - session = new DefaultSession(event.getSession()); - name = event.getName(); - } - - public Session getSession() - { - return session; - } - - public String getName() - { - return name; - } -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/session/Session.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/session/Session.java deleted file mode 100644 index afa685834..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/session/Session.java +++ /dev/null @@ -1,66 +0,0 @@ -package org.codehaus.jasf.summit.session; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Turbine" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Turbine", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ - -/** - * This interface provides access to the {@link - * javax.servlet.HttpSession} interface. - * - * @author Daniel Rall - * @version $Id$ - */ -public interface Session -{ -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/session/SessionBindingEvent.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/session/SessionBindingEvent.java deleted file mode 100644 index 7fb51f369..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/session/SessionBindingEvent.java +++ /dev/null @@ -1,81 +0,0 @@ -package org.codehaus.jasf.summit.session; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Turbine" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Turbine", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ - -/** - * This interface is modelled after - * {@link javax.servlet.http.HttpSessionBindingEvent}. - * - * @author Daniel Rall - * @version $Id$ - */ -public interface SessionBindingEvent -{ - /** - * Returns the name with which the object is bound to or unbound - * from the session. - * - * @return The name used for binding. - */ - String getName(); - - /** - * Returns the session to or from which the object is bound or - * unbound. - * - * @return A session object. - */ - Session getSession(); -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/session/SessionBindingEventProxy.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/session/SessionBindingEventProxy.java deleted file mode 100644 index a47a1089d..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/session/SessionBindingEventProxy.java +++ /dev/null @@ -1,90 +0,0 @@ -package org.codehaus.jasf.summit.session; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Turbine" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Turbine", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ - -import javax.servlet.http.HttpSessionBindingEvent; -import javax.servlet.http.HttpSessionBindingListener; - -/** - * Proxies session binding/unbinding events from Summit to Fulcrum. - * - * @author Daniel Rall - * @version $Id$ - */ -public class SessionBindingEventProxy - implements HttpSessionBindingListener, java.io.Serializable -{ - private SessionBindingListener listener = null; - - public SessionBindingEventProxy(SessionBindingListener listener) - { - this.listener = listener; - } - - public SessionBindingListener getListener() - { - return listener; - } - - public void valueBound(HttpSessionBindingEvent event) - { - listener.valueBound(new DefaultSessionBindingEvent(event)); - } - - public void valueUnbound(HttpSessionBindingEvent event) - { - listener.valueUnbound(new DefaultSessionBindingEvent(event)); - } -} diff --git a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/session/SessionBindingListener.java b/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/session/SessionBindingListener.java deleted file mode 100644 index f073deb9a..000000000 --- a/plexus-avalon-components/jasf/src/main/org/codehaus/jasf/summit/session/SessionBindingListener.java +++ /dev/null @@ -1,81 +0,0 @@ -package org.codehaus.jasf.summit.session; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Turbine" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Turbine", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ - -/** - * This interface is modelled after - * {@link javax.servlet.http.HttpSessionBindingListener}. - * - * @author Daniel Rall - * @version $Id$ - */ -public interface SessionBindingListener -{ - /** - * Notifies the object that it is being bound to a session and - * identifies the session. - * - * @param event A SessionBindingEvent object. - */ - void valueBound(SessionBindingEvent event); - - /** - * Notifies the object that it is being unbound from a session and - * identifies the session. - * - * @param event A SessionBindingEvent object. - */ - void valueUnbound(SessionBindingEvent event); -} diff --git a/plexus-avalon-components/jasf/src/test-conf/pages.xml b/plexus-avalon-components/jasf/src/test-conf/pages.xml deleted file mode 100644 index 477e493ff..000000000 --- a/plexus-avalon-components/jasf/src/test-conf/pages.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - everyone.html - employee_read - - - emptycred.html - - - - formanagers - employee_update - - - employees.html - employee_update - - - badcred.html - guest - - - - diff --git a/plexus-avalon-components/jasf/src/test-conf/roles.xml b/plexus-avalon-components/jasf/src/test-conf/roles.xml deleted file mode 100644 index 4e24a8dad..000000000 --- a/plexus-avalon-components/jasf/src/test-conf/roles.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - manager - - employee_read - employee_delete - employee_update - - - - employee - - employee_read - - - \ No newline at end of file diff --git a/plexus-avalon-components/jasf/src/test-conf/users.xml b/plexus-avalon-components/jasf/src/test-conf/users.xml deleted file mode 100644 index dd283a8a8..000000000 --- a/plexus-avalon-components/jasf/src/test-conf/users.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - dan - password - - - - - - - bob - password - - - - - \ No newline at end of file diff --git a/plexus-avalon-components/jasf/src/test/org/codehaus/jasf/impl/basic/BasicSecurityTest.java b/plexus-avalon-components/jasf/src/test/org/codehaus/jasf/impl/basic/BasicSecurityTest.java deleted file mode 100644 index 6925cf6bb..000000000 --- a/plexus-avalon-components/jasf/src/test/org/codehaus/jasf/impl/basic/BasicSecurityTest.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.codehaus.jasf.impl.basic; - -import junit.framework.Test; -import junit.framework.TestSuite; -import junit.textui.TestRunner; - -import org.apache.avalon.framework.service.ServiceSelector; -import org.codehaus.jasf.Authenticator; -import org.codehaus.jasf.ResourceController; -import org.codehaus.jasf.resources.PageResource; -import org.codehaus.plexus.PlexusTestCase; - -/** - * Test the xml web security package - * - * @author Dan Diephouse - * @since Nov 23, 2002 - */ -public class BasicSecurityTest extends PlexusTestCase -{ - - ServiceSelector authSelector; - ServiceSelector resSelector; - - public BasicSecurityTest( String testName ) throws Exception - { - super( testName ); - } - - public static void main( String[] args ) { - TestRunner.run( suite() ); - } - - public static Test suite() { - return new TestSuite(BasicSecurityTest.class); - } - - BasicUser entity; - - public void setUp() throws Exception - { - super.setUp(); - - authSelector = (ServiceSelector) lookup(Authenticator.SELECTOR_ROLE); - resSelector = (ServiceSelector) lookup(ResourceController.SELECTOR_ROLE); - - Authenticator controller = - (Authenticator) authSelector.select(BasicUser.ENTITY_TYPE); - entity = (BasicUser) controller.authenticate( "dan", "password" ); - } - - public void testUserAuthentication() throws Exception - { - // Test Authentication - if (entity == null) - throw new Exception("XmlUser was null!"); - - assertTrue( entity.getUserName() != null); - } - - public void testPositiveAuthorization() throws Exception - { - - // Test Authorization - ResourceController controller = - (ResourceController) resSelector.select(PageResource.RESOURCE_TYPE); - - assertTrue( controller != null ); - - assertTrue( controller.isAuthorized(entity, - new PageResource("formanagers/employees.html")) ); - - assertTrue( controller.isAuthorized(entity, - new PageResource("everyone.html")) ); - - assertTrue( controller.isAuthorized(entity, - new PageResource("emptycred.html")) ); - } - - public void testNegativeAuthorization() throws Exception - { - // Test Authorization - ResourceController controller = - (ResourceController) resSelector.select(PageResource.RESOURCE_TYPE); - - assertTrue( controller != null ); - - // Non existant directory - assertTrue( !controller.isAuthorized(entity, - new PageResource("writedir" )) ); - - // NOn existant credential - assertTrue( !controller.isAuthorized(entity, - new PageResource("formanagers/badcred.html" )) ); - } -} diff --git a/plexus-avalon-components/jasf/src/test/org/codehaus/jasf/impl/basic/BasicSecurityTest.xml b/plexus-avalon-components/jasf/src/test/org/codehaus/jasf/impl/basic/BasicSecurityTest.xml deleted file mode 100644 index 1547e8b10..000000000 --- a/plexus-avalon-components/jasf/src/test/org/codehaus/jasf/impl/basic/BasicSecurityTest.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - avalon - - - avalon - Avalon Lifecycle Handler - - - - - - - - - - - - - - - - - - - - - - - - - - - - - org.codehaus.jasf.entities.web.User - org.codehaus.jasf.Authenticator - org.codehaus.jasf.impl.basic.UserAuthenticationController - - ${basedir}/src/test-conf/users.xml - ${basedir}/src/test-conf/roles.xml - - - - - org.codehaus.jasf.resources.ClassMethodResource - org.codehaus.jasf.ResourceController - org.codehaus.jasf.impl.basic.ClassAccessController - - true - - - - - org.codehaus.jasf.resources.ProjectPageResource - org.codehaus.jasf.ResourceController - org.codehaus.jasf.impl.global.NoAccessResourceController - - - - - - org.codehaus.jasf.resources.PageResource - org.codehaus.jasf.ResourceController - org.codehaus.jasf.impl.basic.PageAccessController - - ${basedir}/src/test-conf/pages.xml - - - - - - diff --git a/plexus-avalon-components/jasf/src/test/org/codehaus/jasf/impl/basic/ClassSecurityTest.java b/plexus-avalon-components/jasf/src/test/org/codehaus/jasf/impl/basic/ClassSecurityTest.java deleted file mode 100644 index 748b62193..000000000 --- a/plexus-avalon-components/jasf/src/test/org/codehaus/jasf/impl/basic/ClassSecurityTest.java +++ /dev/null @@ -1,108 +0,0 @@ -package org.codehaus.jasf.impl.basic; - -import java.lang.reflect.Method; -import java.util.Collection; - -import junit.framework.Test; -import junit.framework.TestSuite; -import junit.textui.TestRunner; - -import org.apache.avalon.framework.service.ServiceSelector; -import org.apache.commons.attributes.Attributes; -import org.codehaus.jasf.Authenticator; -import org.codehaus.jasf.ResourceController; -import org.codehaus.jasf.resources.ClassMethodResource; -import org.codehaus.jasf.resources.Credential; -import org.codehaus.plexus.PlexusTestCase; - -/** - * Test the xml web security package - * - * @author Dan Diephouse - * @since Nov 23, 2002 - */ -public class ClassSecurityTest extends PlexusTestCase -{ - - ServiceSelector authSelector; - ServiceSelector resSelector; - - public ClassSecurityTest( String testName ) throws Exception - { - super( testName ); - } - - public static void main( String[] args ) { - TestRunner.run( suite() ); - } - - public static Test suite() { - return new TestSuite(ClassSecurityTest.class); - } - - BasicUser entity; - - public void setUp() throws Exception - { - super.setUp(); - - authSelector = (ServiceSelector) lookup(Authenticator.SELECTOR_ROLE); - resSelector = (ServiceSelector) lookup(ResourceController.SELECTOR_ROLE); - - Authenticator controller = - (Authenticator) authSelector.select(BasicUser.ENTITY_TYPE); - entity = (BasicUser) controller.authenticate( "dan", "password" ); - } - - public void testAttributes() throws Exception - { - Method restrictedMethod = - ClassSecurityTest.class.getDeclaredMethod("myRestrictedMethod", new Class[0]); - - assertTrue( Attributes.hasAttributeType(restrictedMethod, Credential.class) ); - - Collection attributes = Attributes.getAttributes( restrictedMethod ); - - Credential cred = (Credential) attributes.iterator().next(); - - assertTrue( cred.getName().equals("employee_read") ); - - assertTrue( !cred.getName().equals("blah") ); - - ResourceController controller = - (ResourceController) resSelector.select(ClassMethodResource.RESOURCE_TYPE); - - assertFalse( ((ClassAccessController)controller).getDefaultAuthorization() ); - - assertTrue( controller.isAuthorized(entity, restrictedMethod) ); - } - - public void testBadCredentials() throws Exception - { - Method restrictedMethod = - ClassSecurityTest.class.getDeclaredMethod("myBadRestrictedMethod", new Class[0]); - - ResourceController controller = - (ResourceController) resSelector.select(ClassMethodResource.RESOURCE_TYPE); - - assertFalse( controller.isAuthorized(entity, restrictedMethod) ); - } - - /** - * Pretends to do something that needs security. - * - * @@Credential("employee_read") - */ - public void myRestrictedMethod() - { - } - - /** - * Pretends to do something that needs security. - * - * @@Credential("wontwork") - */ - public void myBadRestrictedMethod() - { - } -} diff --git a/plexus-avalon-components/jasf/src/test/org/codehaus/jasf/impl/basic/ClassSecurityTest.xml b/plexus-avalon-components/jasf/src/test/org/codehaus/jasf/impl/basic/ClassSecurityTest.xml deleted file mode 100644 index 563a8cf47..000000000 --- a/plexus-avalon-components/jasf/src/test/org/codehaus/jasf/impl/basic/ClassSecurityTest.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - avalon - - - avalon - Avalon Lifecycle Handler - - - - - - - - - - - - - - - - - - - - - - - - - - - - org.codehaus.jasf.SecurityService - org.codehaus.jasf.JASFSecurityService - - - - - - - - - - - - - - org.codehaus.jasf.entities.web.User - org.codehaus.jasf.Authenticator - org.codehaus.jasf.impl.basic.UserAuthenticationController - - ${basedir}/src/test-conf/users.xml - ${basedir}/src/test-conf/roles.xml - - - - - org.codehaus.jasf.resources.ClassMethodResource - org.codehaus.jasf.ResourceController - org.codehaus.jasf.impl.basic.ClassAccessController - - false - - - - - org.codehaus.jasf.resources.ProjectPageResource - org.codehaus.jasf.ResourceController - org.codehaus.jasf.impl.global.NoAccessResourceController - - - - - - org.codehaus.jasf.resources.PageResource - org.codehaus.jasf.ResourceController - org.codehaus.jasf.impl.basic.PageAccessController - - ${basedir}/src/test-conf/pages.xml - - - - - - diff --git a/plexus-avalon-components/jasf/xdocs/basic.xml b/plexus-avalon-components/jasf/xdocs/basic.xml deleted file mode 100644 index 7b9e6ff5d..000000000 --- a/plexus-avalon-components/jasf/xdocs/basic.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - Basic Package - Dan Diephouse - - - - -
-

- The basic package (org.apache.fulcrum.jasf.impl.basic) provides a bunch of - ResourceAccessControllers to secure your resources. They are all xml based and - entities being passed to them must inherit the BasicEntity interface. -

-

- See BasicSecurityTest for info on how to use it at this point. -

-
- - -
\ No newline at end of file diff --git a/plexus-avalon-components/jasf/xdocs/building.xml b/plexus-avalon-components/jasf/xdocs/building.xml deleted file mode 100644 index fd48921d4..000000000 --- a/plexus-avalon-components/jasf/xdocs/building.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - Building - Dan Diephouse - - - - -
-

- Maven makes building easy just do "maven java:compile"! - Except, you must download - Commons Attributes - from cvs. Make sure to install the jar via "maven jar:install" and the maven plugin - that comes with it. -

-
- - -
\ No newline at end of file diff --git a/plexus-avalon-components/jasf/xdocs/developers.xml b/plexus-avalon-components/jasf/xdocs/developers.xml deleted file mode 100644 index 6c8a9a6e4..000000000 --- a/plexus-avalon-components/jasf/xdocs/developers.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - Developer's Guide - Dan Diephouse - - - - -
-

- The developers guide is divided up into the following sections: -

-

-
-
-

-

- - -
-
-

-

-
-
-

- It was deemed to hard and confusing to create a framework which had a - ResourceAccessController for every entity and resource combination. - Therefore if you need to support multiple entity types in a single - ResourceAccessController you must create a single interface or class which - entities inherit from. You must then use this class in your access controllers. -

-

- See BasicEntity in the basic package for an example. -

-
- -
-

- AbstractPageAccessController makes it easy to tie in a resource to credential - mapping in your ResourceAccessControllers. See the javadocs! -

-
- - -
\ No newline at end of file diff --git a/plexus-avalon-components/jasf/xdocs/framework.xml b/plexus-avalon-components/jasf/xdocs/framework.xml deleted file mode 100644 index f59404229..000000000 --- a/plexus-avalon-components/jasf/xdocs/framework.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - Overview - Dan Diephouse - - - - -
-

- There are four different parts to any good security framework: -

- This framework seeks to seperate these parts, making them - sufficiently flexible so that you may reuse your security code - in a variety of applications and environments. -

-
-
-

- Authentication determines if an entity, someone or something that wants to - interact with the system, is allowed to. Entities are things - or people interacting with the system. They can range from regular users - to company accounts to automated computer systems. Authenticating these - entities consists of passing the unique entity id and a token, or password. - The corresponding class in the security framework is EntityAuthenticationController. - It is easy to extend and create your own. -

-

-

-
-
-

- Session management should be handled the application using the framework. - JASF is not responsible for handling validation/invalidation of the - session. -

-
-
-

- When we write security code what we are actually trying to do - is restrict access to certain resources. These resources require - that an entity has specific permissions to access or use them. For - example, an administration web page may require that the user is - an administrator. -

-

- However the relation between entities and resources is different for every - application (that is why there is this framework). For example, a users - credentials might change depending on the resource being accessed. Then, if - there is then to be a generic framework this must be totally left up to the - developer. -

-

- This is where the ResourceAccessController comes in. It has one simple method: - -public interface ResourceAccessController -{ - public boolean isAuthorized( Object entity, Object resource ); -} - -

-

- As can be seen, the relation between the entity and the resource is left totally - up to the implementation. But, this doesn't mean you have to implement these all - yourself. The framework comes prepackaged with some implementations already. -

-

- Part of the motivation for this framework is to stop people from - over-complicating permissions. For example, lets say you - have a website that keeps track of projects. For each project - a user can have different permissions. Lets keep it simple for - now - each user can have read and/or write permissions for a project. - Most people would instinctively say that the project is part of - the required permissions for the system. But, the project is the - resource that we are trying to access. The permission is only - the "read" or "write" part. -

- -
-
-

- Security management is that area that covers managing users, groups of users, - roles, and permissions. This is NOT handled by this framework. The - reason for this is is that it is implementation/application specific. Take - groups of users for example - they have nothing to do with Authentication or - Authorization. Another example is when you are using a predetermined service - that you have no control over. This could be something like a Windows NT server - or Microsoft's passport service. This is why these functions have been left - out of the framework. -

-
- - -
\ No newline at end of file diff --git a/plexus-avalon-components/jasf/xdocs/goals.xml b/plexus-avalon-components/jasf/xdocs/goals.xml deleted file mode 100644 index 0ddc8b0f4..000000000 --- a/plexus-avalon-components/jasf/xdocs/goals.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - Goals - Dan Diephouse - - - - -
-

-

    -
  • - Allow Components to require certain security credentials independent - of the security framework being employed. -
  • -
  • - Secure web pages based on how much access the user is given. -
  • -
  • - Seperate authentication, authorization, and management. -
  • -
  • - Allow the same security model to be used whatever the view - mechanism - the web, FTP, WebDAV, a phone, etc. -
  • -
  • - For a specific web page we might want to request that a user is part - of a group and has a specific credential in the group. That credential - might vary from group to group. -
  • -
  • - Allow different entity types to interact with the system. -
  • -
-

-
- - -
\ No newline at end of file diff --git a/plexus-avalon-components/jasf/xdocs/images/envoi_small.png b/plexus-avalon-components/jasf/xdocs/images/envoi_small.png deleted file mode 100644 index 676bb4d26..000000000 Binary files a/plexus-avalon-components/jasf/xdocs/images/envoi_small.png and /dev/null differ diff --git a/plexus-avalon-components/jasf/xdocs/index.xml b/plexus-avalon-components/jasf/xdocs/index.xml deleted file mode 100644 index 2ead753a8..000000000 --- a/plexus-avalon-components/jasf/xdocs/index.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - Main - Dan Diephouse - - - - -
-

- JASF (Java Application Security Framework) seeks - to establish a common ground for - applications to integrate security for users, computers or - anything else that interacts with one's code. By creating a - flexible mechanism, one can use different security methods, - but still use the same Components from application to application. -

-

- The framework creates this flexible mechanism by utilizing the Command - Pattern. See your local bookstore for more on this pattern. -

-

- The framework can be downloaded here and - the source code can be found here. -

-
- - -
\ No newline at end of file diff --git a/plexus-avalon-components/jasf/xdocs/methods.xml b/plexus-avalon-components/jasf/xdocs/methods.xml deleted file mode 100644 index 8763bd0cd..000000000 --- a/plexus-avalon-components/jasf/xdocs/methods.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - Class Methods - Dan Diephouse - - - -
-

- In many applications it is beneficial to restrict access to certain methods - depending on the user's credentials. This framework provides a way to do this - using - Commons Attributes. - With commons attributes you can define attributes for each - method in your javadocs. With these we can set the necessary credentials to - execute a certain method. You just need to add the "@credential" tag like so: - -/** - * Pretends to do something that needs security. - * - * @credential employee_read - */ -public void myRestrictedMethod() -{ -} - -

-

- The ClassAccessControllers are then able to read this attribute and determine if - an entity has the required credentials to execute it. -

-

- The basic and torque packages provide some ResourceAccessControllers for the methods. - To use them you pass your entity and the name of the method. Here is an example - from the ClassSecurityTest: - -Method restrictedMethod = - ClassSecurityTest.class.getDeclaredMethod("myBadRestrictedMethod", new Class[0]); -ResourceAccessController controller = - resourceManager.lookup(ClassMethodResource.RESOURCE_TYPE); - -boolean authorizerd = controller.isAuthorized(entity, restrictedMethod) ); - -

-

- You need to lookup the method manually. It would be nice to develop an aspect - oriented system with attributes, but it is impossible to do so because you don't - know what entity is accessing the method. -

- -

- You may ask, "well if I need to look up my method every time, this doesn't seem - worth it." You may very well be right. But it wouldn't have been designed without - a use :). -

-

- In Turbine ActionEvents can be - called from one's templates. These action events are run through introspection - and it is therefore very easy to tie in this kind of access control. -

-
-
- -
\ No newline at end of file diff --git a/plexus-avalon-components/jasf/xdocs/navigation.xml b/plexus-avalon-components/jasf/xdocs/navigation.xml deleted file mode 100644 index 0f22d206e..000000000 --- a/plexus-avalon-components/jasf/xdocs/navigation.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - JASF - - - - - - - - - - - - - - - - - - - - - diff --git a/plexus-avalon-components/jasf/xdocs/related.xml b/plexus-avalon-components/jasf/xdocs/related.xml deleted file mode 100644 index be3107316..000000000 --- a/plexus-avalon-components/jasf/xdocs/related.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - Related Information - Dan Diephouse - - - - -
- - - - - - - - -
- - A flexible and extensible security framework for Java code - -
- - http://www.lambeth.gov.uk/intradoc/help/system_admin/security/user_admin_applet.htm - -
- -
- - -
\ No newline at end of file diff --git a/plexus-avalon-components/jasf/xdocs/stylesheets/maven.css b/plexus-avalon-components/jasf/xdocs/stylesheets/maven.css deleted file mode 100644 index 42a24c4ba..000000000 --- a/plexus-avalon-components/jasf/xdocs/stylesheets/maven.css +++ /dev/null @@ -1,121 +0,0 @@ -body { - background: #ffffff; - color: #000; - } - -.app h3, .app h4, .app th, .tabs td, .tabs th, .functnbar { - background-image: url(../images/nw_min.gif); - } -#navcolumn div div, body.docs #toc li li { - background-image: ; - } - - -.app h3 { - color: #fff; - background-color: #797f68; - border-bottom: 1px solid #363c35; -} - -.app h4 { - color: #fff; - background-color: #9b9f8a; - border-bottom: 1px solid grey; - } - -.a th { - background: #ddd; - color: #000; - } - -.b th { -} - -.a td { - background: #ddd; - color: #000; - } - -.b td { - background: #efefef; - color: #000; - } - -.app th { - background-color: #bbb; - color: #363c35; - } - -div#banner { - border: 1px solid black; - } - -#banner, #banner td { - background-color: #797f68; - color: #fff; - } - -#leftcol { - background: #eee; - color: #000; - border-right: 1px solid #aaa; - border-bottom: 1px solid #aaa; - border-top: 1px solid #fff; -} - -#navcolumn { - background: #eee; - color: #000; - border-right: none; - border-bottom: none; - border-top: none; - } - -#breadcrumbs { - background-color: #ddd; - color: #000; - border-top: 1px solid #fff; - border-bottom: 1px solid #aaa; - } - -#source { - background-color: #fff; - color: #000; - border-right: 1px solid #888; - border-left: 1px solid #888; - border-top: 1px solid #888; - border-bottom: 1px solid #888; - margin-right: 7px; - margin-left: 7px; - margin-top: 1em; - } - -#source pre { - margin-right: 7px; - margin-left: 7px; - } - -#navcolumn a:link, #breadcrumbs a:visited, #navcolumn a:visited { - color: #363c35; - text-decoration: none; - } - -a:link, .app a:visited, .tasknav a:visited { - color: #363c35; - text-decoration: underline; - } - -a:active, a:hover, #leftcol a:active, #leftcol a:hover { - color: #000 !important; - text-decoration: underline; - } - -a:link.selfref, a:visited.selfref { - color: #000 !important; - text-decoration: underline; - } - -h3, h4 { - margin-top: 1em; - margin-bottom: 0; - } diff --git a/plexus-avalon-components/jasf/xdocs/stylesheets/maven_ns4_only.css b/plexus-avalon-components/jasf/xdocs/stylesheets/maven_ns4_only.css deleted file mode 100644 index fcf04b27c..000000000 --- a/plexus-avalon-components/jasf/xdocs/stylesheets/maven_ns4_only.css +++ /dev/null @@ -1,38 +0,0 @@ -body { - background: #fff; - color: #000; - } - -a:active, a:hover, #leftcol a:active, #leftcol a:hover { - color: #f30; - } - -#leftcol a:link, #leftcol a:visited { - color: blue; - } - -.a td { - background: #ddd; - color: #000; - } - -.b td { - background: #efefef; - color: #000; - } - -body .app th { - background-color: #bbb; - color: #fff; - } - -#navcolumn div strong { - background: #fff; - color: #555; - } - -#banner, #banner td { - background: white; - color: #fff; - } - diff --git a/plexus-avalon-components/jasf/xdocs/stylesheets/ns4_only.css b/plexus-avalon-components/jasf/xdocs/stylesheets/ns4_only.css deleted file mode 100644 index 20c825258..000000000 --- a/plexus-avalon-components/jasf/xdocs/stylesheets/ns4_only.css +++ /dev/null @@ -1,162 +0,0 @@ -/* simple rules suitable for Netscape 4.x only; richer rules are in tigris.css. see */ - -/* colors, backgrounds, borders, link indication */ - -body { - background: #fff; - color: #000; - } -#leftcol a:link, #leftcol a:visited { - color: blue; - } -a:active, a:hover, #leftcol a:active, #leftcol a:hover { - color: #f30; - } -#login a:link, #login a:visited { - color: white; - text-decoration: underline; - } -#banner a:active, #banner a:hover { - color: #f90; - } -#leftcol a, #breadcrumbs a { - text-decoration: none; - } -h2 .lastchild { - color: #777 - } -.a td { - background: #ddd; - } -.b td { - background: #efefef; - } -.tabs td, .tabs th { - background-color: #ddd; - } -body .app th { - background-color: #bbb; - } -body .tabs th { - background-color: #888; - color: #fff; - } -body .app .axial th { - background-color: #ddd; - color: black - } -.tabs td { - background-color: #ddd; - } -.alert { - color: #c00; - } -.confirm { - color: green; - } -.info { - color: blue; - } -.selection { - background: #ffc; - } -#login { - color: #fff; - } -#helptext th { - background: #cc9; - } -#helptext td { - background: #ffc; - } -.tabs a { - text-decoration: none; - } -#navcolumn div strong { - color: #555; - } -#banner, #banner td { - background: #036; - color: #fff; - } -body #banner #login a { - color: white; - } - - -/* font and text properties, exclusive of link indication, alignment, text-indent */ - -body, div, p, th, td, li, dl, dd { - font-family: Lucida, Arial, Helvetica, sans-serif; - } -code, pre { - font-family: 'Andale Mono', Courier, monospace; - } -h2, h3, h4 { - font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif; - } -.selection { - font-weight: bold - } -#login .username { - font-weight: bold; - } - - -/* box properties (exclusive of borders), positioning, alignments, list types, text-indent */ - -th, td { - text-align: left; - vertical-align: top - } -.right { - text-align: right; - } -.center { - text-align: center; - } -body .app .axial th { - text-align: right; - } -.app .axial td th { - text-align: left; - } -body td .stb { - margin-top: 1em; - text-indent: 0; - } -body td .mtb { - margin-top: 2em; - text-indent: 0; - } -dd { - margin-bottom: .67em; - } -#footer { - margin: 4px - } -#helptext { - margin-top: 1em - } -#helptext td div { - margin: .5em - } -.courtesylinks { - margin-top: 1em; - padding-top: 1em - } -#navcolumn div { - margin-bottom: .5em; - } -#navcolumn div div { - margin-top: .3em - } -#navcolumn div div { - padding-left: 1em; - } -#banner, #banner td { - vertical-align: middle; - } -body.docs, body.nonav { - margin: 1em - } diff --git a/plexus-avalon-components/jasf/xdocs/stylesheets/print.css b/plexus-avalon-components/jasf/xdocs/stylesheets/print.css deleted file mode 100644 index cef55dce5..000000000 --- a/plexus-avalon-components/jasf/xdocs/stylesheets/print.css +++ /dev/null @@ -1,7 +0,0 @@ -#banner, #footer, #leftcol, #breadcrumbs, .docs #toc, .docs .courtesylinks { - display: none; - } -body.docs div.docs { - margin: 0 !important; - border: none !important - } diff --git a/plexus-avalon-components/pom.xml b/plexus-avalon-components/pom.xml deleted file mode 100644 index 770e1c77a..000000000 --- a/plexus-avalon-components/pom.xml +++ /dev/null @@ -1,29 +0,0 @@ - - 4.0.0 - - plexus-root - plexus - 1.0.1 - - plexus - plexus-components-avalon - 1.0.1-SNAPSHOT - Plexus Avalon Components - - - plexus - plexus - 0.14-SNAPSHOT - - - avalon - avalon-framework - 4.1.4 - - - plexus - plexus-avalon-personality - 0.12 - - - diff --git a/plexus-avalon-components/project.xml b/plexus-avalon-components/project.xml deleted file mode 100644 index eb49cda7a..000000000 --- a/plexus-avalon-components/project.xml +++ /dev/null @@ -1,165 +0,0 @@ - - - 3 - plexus-components-avalon - plexus-components-avalon - plexus - Plexus Avalon Components - 1.0 - - Codehaus - http://www.codehaus.org/ - /images/codehaus-small.gif - - 2001 - org.codehaus.plexus.${pom.artifactId.substring(7)} - /../components/images/plexus-components-logo.gif - - - jakarta - - http://plexus.codehaus.org/components/avalon/${pom.artifactId.substring(7)} - http://jira.codehaus.org/secure/BrowseProject.jspa?id=10080 - - plexus.codehaus.org - /www/plexus.codehaus.org/components/avalon/${pom.artifactId.substring(7)} - - - scm:cvs:pserver:anonymous@cvs.codehaus.org:/scm/cvspublic:/plexus/plexus-components/avalon/${pom.artifactId.substring(7)} - http://cvs.plexus.codehaus.org/plexus-components/avalon/${pom.artifactId.substring(7)}/ - - - - - Plexus Developer List - plexus-dev-request@lists.codehaus.org?subject=subscribe - plexus-dev-request@lists.codehaus.org?subject=unsubscribe - http://lists.codehaus.org/pipermail/plexus-dev/ - - - - Plexus User List - plexus-user-request@lists.codehaus.org?subject=subscribe - plexus-user-request@lists.codehaus.org?subject=unsubscribe - http://lists.codehaus.org/pipermail/plexus-user - - - - Plexus Scm List - plexus-scm-request@lists.codehaus.org?subject=subscribe - plexus-scm-request@lists.codehaus.org?subject=unsubscribe - http://lists.codehaus.org/pipermail/plexus-scm - - - - - - - - - plexus - plexus - 0.14-SNAPSHOT - - - - avalon - avalon-framework - 4.1.4 - - - - plexus - plexus-avalon-personality - 0.12 - - - - - - classworlds - classworlds - 1.1-SNAPSHOT - - - - xstream - xstream - 1.0-SNAPSHOT - - - - xpp3 - xpp3 - 1.1.3.3 - - - - - - - plexus-dev@lists.codehaus.org - src/main - src/test - - - - **/*Test.java - - - **/Abstract*.java - - - - - src/test - - **/*.xml - **/*.xsd - **/*.vm - **/*.properties - - - - - - - - src/main - - **/*.properties - **/*.vsl - **/*.css - **/*.gif - - - - - - - maven-changelog-plugin - maven-changes-plugin - maven-checkstyle-plugin - maven-developer-activity-plugin - maven-file-activity-plugin - maven-javadoc-plugin - maven-jdepend-plugin - maven-jcoverage-plugin - maven-junit-report-plugin - maven-jxr-plugin - maven-license-plugin - - - - diff --git a/plexus-component-factories/plexus-ant-factory/pom.xml b/plexus-component-factories/plexus-ant-factory/pom.xml deleted file mode 100644 index 4d6f5c725..000000000 --- a/plexus-component-factories/plexus-ant-factory/pom.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - plexus-component-factories - org.codehaus.plexus - 1.0-alpha-8 - - 4.0.0 - plexus-ant-factory - Plexus Ant Factory - 1.0-alpha-3-SNAPSHOT - - - ant - ant-launcher - 1.6.5 - - - ant - ant - 1.6.5 - - - org.codehaus.plexus - plexus-utils - 1.0.5 - - - org.codehaus.plexus - plexus-container-default - 1.0-alpha-9 - - - diff --git a/plexus-component-factories/plexus-ant-factory/src/main/java/org/codehaus/plexus/component/factory/ant/AntComponentExecutionException.java b/plexus-component-factories/plexus-ant-factory/src/main/java/org/codehaus/plexus/component/factory/ant/AntComponentExecutionException.java deleted file mode 100644 index e2d9921a1..000000000 --- a/plexus-component-factories/plexus-ant-factory/src/main/java/org/codehaus/plexus/component/factory/ant/AntComponentExecutionException.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.codehaus.plexus.component.factory.ant; - -public class AntComponentExecutionException - extends Exception -{ - - static final long serialVersionUID = 1; - - private final String script; - - private final String target; - - private final String originalMessage; - - public AntComponentExecutionException( String script, String target, String message, Throwable cause ) - { - super( "Executing Ant script: " + script + " [" + ( ( target == null ) ? ( "default-target" ) : ( target ) ) - + "]: " + message, cause ); - - this.script = script; - this.target = target; - this.originalMessage = message; - } - - public AntComponentExecutionException( String script, String target, String message ) - { - super( "Executing Ant script: " + script + " [" + ( ( target == null ) ? ( "default-target" ) : ( target ) ) - + "]: " + message ); - - this.script = script; - this.target = target; - this.originalMessage = message; - } - - public final String getOriginalMessage() - { - return originalMessage; - } - - public final String getScript() - { - return script; - } - - public final String getTarget() - { - return target; - } - -} diff --git a/plexus-component-factories/plexus-ant-factory/src/main/java/org/codehaus/plexus/component/factory/ant/AntComponentFactory.java b/plexus-component-factories/plexus-ant-factory/src/main/java/org/codehaus/plexus/component/factory/ant/AntComponentFactory.java deleted file mode 100644 index e54fadbc3..000000000 --- a/plexus-component-factories/plexus-ant-factory/src/main/java/org/codehaus/plexus/component/factory/ant/AntComponentFactory.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.codehaus.plexus.component.factory.ant; - -import org.codehaus.classworlds.ClassRealm; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.component.factory.AbstractComponentFactory; -import org.codehaus.plexus.component.factory.ComponentInstantiationException; -import org.codehaus.plexus.component.repository.ComponentDescriptor; - -import java.io.IOException; - -public class AntComponentFactory - extends AbstractComponentFactory -{ - - public Object newInstance( ComponentDescriptor componentDescriptor, ClassRealm classRealm, PlexusContainer container ) - throws ComponentInstantiationException - { - try - { - return new AntScriptInvoker( componentDescriptor, new RealmDelegatingClassLoader( classRealm ) ); - } - catch ( IOException e ) - { - throw new ComponentInstantiationException( "Failed to extract Ant script for: " + componentDescriptor.getHumanReadableKey(), e ); - } - } - -} diff --git a/plexus-component-factories/plexus-ant-factory/src/main/java/org/codehaus/plexus/component/factory/ant/AntScriptInvoker.java b/plexus-component-factories/plexus-ant-factory/src/main/java/org/codehaus/plexus/component/factory/ant/AntScriptInvoker.java deleted file mode 100644 index 5dca4dc44..000000000 --- a/plexus-component-factories/plexus-ant-factory/src/main/java/org/codehaus/plexus/component/factory/ant/AntScriptInvoker.java +++ /dev/null @@ -1,331 +0,0 @@ -package org.codehaus.plexus.component.factory.ant; - -import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.DefaultLogger; -import org.apache.tools.ant.DemuxInputStream; -import org.apache.tools.ant.DemuxOutputStream; -import org.apache.tools.ant.Main; -import org.apache.tools.ant.Project; -import org.apache.tools.ant.ProjectHelper; -import org.apache.tools.ant.helper.ProjectHelper2; -import org.codehaus.plexus.component.MapOrientedComponent; -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.ComponentRequirement; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.logging.Logger; -import org.codehaus.plexus.util.IOUtil; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.PrintStream; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Properties; - -public class AntScriptInvoker - extends AbstractLogEnabled - implements MapOrientedComponent -{ - - public static final String BASEDIR_PARAMETER = "basedir"; - - public static final String MESSAGE_LEVEL_PARAMETER = "messageLevel"; - - private final ComponentDescriptor descriptor; - - private final File script; - - private final String scriptResource; - - private String target; - - private Map references = new HashMap(); - - private Properties properties = new Properties(); - - private Project project; - - private File basedir; - - private String messageLevel; - - public AntScriptInvoker( ComponentDescriptor descriptor, ClassLoader loader ) - throws IOException - { - this.descriptor = descriptor; - - String impl = descriptor.getImplementation(); - - int colon = impl.indexOf( ":" ); - - String resourceName; - if ( colon > -1 ) - { - resourceName = impl.substring( 0, colon ); - target = impl.substring( colon + 1 ); - } - else - { - resourceName = impl; - } - - scriptResource = resourceName; - - InputStream input = null; - OutputStream output = null; - - try - { - input = loader.getResourceAsStream( resourceName ); - - script = File.createTempFile( "plexus-ant-component", ".build.xml" ); - script.deleteOnExit(); - - output = new FileOutputStream( script ); - - IOUtil.copy( input, output ); - } - finally - { - IOUtil.close( input ); - IOUtil.close( output ); - } - } - - public static String[] getImplicitRequiredParameters() - { - return new String[] { BASEDIR_PARAMETER }; - } - - public static String[] getImplicitOptionalParameters() - { - return new String[] { MESSAGE_LEVEL_PARAMETER }; - } - - public void addComponentRequirement( ComponentRequirement rd, Object rv ) - throws ComponentConfigurationException - { - if ( !descriptor.getRequirements().contains( rd ) ) - { - throw new ComponentConfigurationException( "Requirement: " + rd.getHumanReadableKey() - + " is not listed in this component's descriptor." ); - } - - references.put( rd.getRole() + "_" + rd.getRoleHint(), rv ); - } - - public void setComponentConfiguration( Map componentConfiguration ) - throws ComponentConfigurationException - { - for ( Iterator it = componentConfiguration.entrySet().iterator(); it.hasNext(); ) - { - Map.Entry entry = (Map.Entry) it.next(); - - Object key = entry.getKey(); - Object val = entry.getValue(); - - if ( ( key instanceof String ) && ( val instanceof String ) ) - { - properties.setProperty( (String) key, (String) val ); - } - else - { - references.put( key, val ); - } - } - - Object basedirInput = componentConfiguration.get( BASEDIR_PARAMETER ); - - if ( basedirInput instanceof File ) - { - this.basedir = (File) basedirInput; - } - else if ( basedirInput != null ) - { - this.basedir = new File( String.valueOf( basedirInput ) ); - } - else - { - throw new ComponentConfigurationException( "\'" + BASEDIR_PARAMETER + "\' parameter is missing." ); - } - - Object messageLevelInput = componentConfiguration.get( MESSAGE_LEVEL_PARAMETER ); - - if ( messageLevelInput != null ) - { - this.messageLevel = String.valueOf( messageLevelInput ); - } - - // ---------------------------------------------------------------------------- - // We need things like the basedir in order to initialize the ant project and - // we need to initialize the project here so that it can be augmented with - // classpath references and other properties before the ant task execution. - // This is a little brittle as we're relying on a call for configuration - // to signal ant project initialization ... jvz. - // ---------------------------------------------------------------------------- - - initializeProject(); - } - - public void invoke() - throws AntComponentExecutionException - { - InputStream oldSysIn = System.in; - PrintStream oldSysOut = System.out; - PrintStream oldSysErr = System.err; - - try - { - project.setDefaultInputStream( System.in ); - - System.setIn( new DemuxInputStream( project ) ); - System.setOut( new PrintStream( new DemuxOutputStream( project, false ) ) ); - System.setErr( new PrintStream( new DemuxOutputStream( project, true ) ) ); - - project.fireBuildStarted(); - - Throwable error = null; - - try - { - try - { - ProjectHelper helper = new ProjectHelper2(); - - project.addReference( "ant.projectHelper", helper ); - - helper.parse( project, script ); - } - catch ( BuildException ex ) - { - error = ex; - throw new AntComponentExecutionException( scriptResource, target, "Failed to parse.", ex ); - } - - for ( Iterator it = references.entrySet().iterator(); it.hasNext(); ) - { - Map.Entry entry = (Map.Entry) it.next(); - - String key = (String) entry.getKey(); - - project.addReference( key, entry.getValue() ); - } - - for ( Iterator it = properties.entrySet().iterator(); it.hasNext(); ) - { - Map.Entry entry = (Map.Entry) it.next(); - - String key = (String) entry.getKey(); - - project.setUserProperty( key, properties.getProperty( key ) ); - } - - try - { - project.executeTarget( target ); - } - catch ( BuildException e ) - { - error = e; - throw new AntComponentExecutionException( scriptResource, target, "Failed to execute.", e ); - } - } - finally - { - project.fireSubBuildFinished( error ); - } - - } - finally - { - // help the gc - project = null; - - System.setIn( oldSysIn ); - System.setOut( oldSysOut ); - System.setErr( oldSysErr ); - } - } - - private void initializeProject() - { - this.project = new Project(); - - project.init(); - project.setUserProperty( "ant.version", Main.getAntVersion() ); - project.setProperty( "ant.file", script.toString() ); - - DefaultLogger antLogger = new DefaultLogger(); - antLogger.setOutputPrintStream( System.out ); - antLogger.setErrorPrintStream( System.err ); - - int level = convertMsgLevel( messageLevel ); - - Logger logger = getLogger(); - if ( logger != null ) - { - logger.debug( "Ant message level is set to: " + messageLevel + "(" + level + ")" ); - } - - antLogger.setMessageOutputLevel( level ); - - project.addBuildListener( antLogger ); - - project.setBaseDir( basedir ); - } - - protected int convertMsgLevel( String msgLevel ) - { - int level; - - if ( msgLevel == null ) - { - return Project.MSG_ERR; - } - - msgLevel = msgLevel.toLowerCase(); - - if ( msgLevel.equals( "error" ) ) - { - level = Project.MSG_ERR; - } - else if ( msgLevel.equals( "warning" ) || msgLevel.equals( "warn" ) ) - { - level = Project.MSG_WARN; - } - else if ( msgLevel.equals( "information" ) || msgLevel.equals( "info" ) ) - { - level = Project.MSG_INFO; - } - else if ( msgLevel.equals( "debug" ) ) - { - level = Project.MSG_DEBUG; - } - else if ( msgLevel.equals( "verbose" ) ) - { - level = Project.MSG_VERBOSE; - } - else - { - Logger logger = getLogger(); - if ( logger != null ) - { - logger.info( "Unknown Ant Message Level (" + msgLevel + ") -- using \"error\" instead" ); - } - - level = Project.MSG_ERR; - } - - return level; - } - - public Project getProject() - { - return project; - } -} diff --git a/plexus-component-factories/plexus-ant-factory/src/main/java/org/codehaus/plexus/component/factory/ant/RealmDelegatingClassLoader.java b/plexus-component-factories/plexus-ant-factory/src/main/java/org/codehaus/plexus/component/factory/ant/RealmDelegatingClassLoader.java deleted file mode 100644 index 9566ff6d0..000000000 --- a/plexus-component-factories/plexus-ant-factory/src/main/java/org/codehaus/plexus/component/factory/ant/RealmDelegatingClassLoader.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.codehaus.plexus.component.factory.ant; - -import org.codehaus.classworlds.ClassRealm; - -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.util.Enumeration; - -/** - * @author jdcasey - */ -public class RealmDelegatingClassLoader - extends ClassLoader -{ - - private final ClassRealm realm; - - public RealmDelegatingClassLoader(ClassRealm realm) - { - this.realm = realm; - } - - protected Enumeration findResources( String name ) throws IOException - { - return realm.findResources( name ); - } - - public URL getResource( String name ) - { - return realm.getResource( name ); - } - - public InputStream getResourceAsStream( String name ) - { - return realm.getResourceAsStream( name ); - } - - public Class loadClass( String name ) throws ClassNotFoundException - { - return realm.loadClass( name ); - } - -} diff --git a/plexus-component-factories/plexus-ant-factory/src/main/resources/META-INF/plexus/components.xml b/plexus-component-factories/plexus-ant-factory/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index 85a7c74aa..000000000 --- a/plexus-component-factories/plexus-ant-factory/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - org.codehaus.plexus.component.factory.ComponentFactory - org.codehaus.plexus.component.factory.ant.AntComponentFactory - ant - - - diff --git a/plexus-component-factories/plexus-bsh-factory/pom.xml b/plexus-component-factories/plexus-bsh-factory/pom.xml deleted file mode 100644 index c877f78d0..000000000 --- a/plexus-component-factories/plexus-bsh-factory/pom.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - plexus-component-factories - org.codehaus.plexus - 1.0-alpha-6 - - 4.0.0 - plexus-bsh-factory - Plexus BSH Factory - 1.0-alpha-8-SNAPSHOT - - - bsh - bsh - 1.3.0 - - - \ No newline at end of file diff --git a/plexus-component-factories/plexus-bsh-factory/src/main/java/org/codehaus/plexus/component/factory/bsh/BshComponent.java b/plexus-component-factories/plexus-bsh-factory/src/main/java/org/codehaus/plexus/component/factory/bsh/BshComponent.java deleted file mode 100755 index 764ad3ee6..000000000 --- a/plexus-component-factories/plexus-bsh-factory/src/main/java/org/codehaus/plexus/component/factory/bsh/BshComponent.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.codehaus.plexus.component.factory.bsh; - -import bsh.Interpreter; - -/** - * Beanshell components must implement this to be able to provide the interpreter. - * @todo This may not be needed if the creation and configuration is done in one step, or there is some other way - * of getting back the interpreter from the created component - * - * @author Brett Porter - * @version $Id$ - */ -public interface BshComponent -{ - Interpreter getInterpreter(); -} diff --git a/plexus-component-factories/plexus-bsh-factory/src/main/java/org/codehaus/plexus/component/factory/bsh/BshComponentConfigurator.java b/plexus-component-factories/plexus-bsh-factory/src/main/java/org/codehaus/plexus/component/factory/bsh/BshComponentConfigurator.java deleted file mode 100755 index 7f4a9d47d..000000000 --- a/plexus-component-factories/plexus-bsh-factory/src/main/java/org/codehaus/plexus/component/factory/bsh/BshComponentConfigurator.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.codehaus.plexus.component.factory.bsh; - -import bsh.EvalError; -import bsh.Interpreter; - -import org.codehaus.classworlds.ClassRealm; -import org.codehaus.plexus.component.configurator.AbstractComponentConfigurator; -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.ConfigurationListener; -import org.codehaus.plexus.component.configurator.converters.ConfigurationConverter; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * @todo not happy that this has to be different to the object with fields configurator - should only need to redefine the "setValue" method - */ -public class BshComponentConfigurator - extends AbstractComponentConfigurator -{ - - public void configureComponent( Object component, PlexusConfiguration configuration, - ExpressionEvaluator expressionEvaluator, ClassRealm containerRealm, - ConfigurationListener listener ) - throws ComponentConfigurationException - { - Interpreter interpreter = ( (BshComponent) component ).getInterpreter(); - - int items = configuration.getChildCount(); - - for ( int i = 0; i < items; i++ ) - { - PlexusConfiguration childConfiguration = configuration.getChild( i ); - - String elementName = childConfiguration.getName(); - - Class type = Object.class; - - String implementation = childConfiguration.getAttribute( "implementation", null ); - - if ( implementation != null ) - { - try - { - type = containerRealm.loadClass( implementation ); - - } - catch ( ClassNotFoundException e ) - { - String msg = "Class name which was explicitly given in configuration using 'implementation' attribute: '" + - implementation + "' cannot be loaded"; - - throw new ComponentConfigurationException( msg, e ); - } - } - - ConfigurationConverter converter = converterLookup.lookupConverterForType( type ); - - Object value = converter.fromConfiguration( converterLookup, childConfiguration, type, component.getClass(), - containerRealm.getClassLoader(), expressionEvaluator, listener ); - - if ( value != null ) - { - try - { - interpreter.set( elementName, value ); - } - catch ( EvalError evalError ) - { - throw new ComponentConfigurationException( "Unable to evaluate beanshell", evalError ); - } - } - } - - } - - -} diff --git a/plexus-component-factories/plexus-bsh-factory/src/main/java/org/codehaus/plexus/component/factory/bsh/BshComponentFactory.java b/plexus-component-factories/plexus-bsh-factory/src/main/java/org/codehaus/plexus/component/factory/bsh/BshComponentFactory.java deleted file mode 100644 index f2f34374a..000000000 --- a/plexus-component-factories/plexus-bsh-factory/src/main/java/org/codehaus/plexus/component/factory/bsh/BshComponentFactory.java +++ /dev/null @@ -1,99 +0,0 @@ -package org.codehaus.plexus.component.factory.bsh; - -import bsh.EvalError; -import bsh.Interpreter; -import bsh.UtilEvalError; -import org.codehaus.classworlds.ClassRealm; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.component.factory.AbstractComponentFactory; -import org.codehaus.plexus.component.factory.ComponentInstantiationException; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.util.IOUtil; - -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.Reader; -import java.net.URL; - -/** - * BeanShell component factory. - * - * @author Jason Van Zyl - * @author Brett Porter - */ -public class BshComponentFactory - extends AbstractComponentFactory -{ - public Object newInstance( ComponentDescriptor componentDescriptor, ClassRealm containerRealm, - PlexusContainer container ) - throws ComponentInstantiationException - { - String impl = componentDescriptor.getImplementation(); - if ( !impl.startsWith( "/" ) ) - { - impl = "/" + impl; - } - - URL scriptLocation = containerRealm.getResource( impl ); - - if ( scriptLocation == null ) - { - StringBuffer buf = new StringBuffer( "Cannot find: " + impl + " in classpath:" ); - for ( int i = 0; i < containerRealm.getConstituents().length; i++ ) - { - URL constituent = containerRealm.getConstituents()[i]; - buf.append( "\n [" + i + "] " + constituent ); - } - throw new ComponentInstantiationException( buf.toString() ); - } - - Object result = null; - Reader reader = null; - - try - { - Interpreter interp = new Interpreter(); - - reader = new InputStreamReader( scriptLocation.openStream() ); - - // TODO - // BeanShell honours the context classloader, which something is setting (erroneously?) -// interp.setClassLoader( containerRealm.getClassLoader() ); - ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); - Thread.currentThread().setContextClassLoader( containerRealm.getClassLoader() ); - result = interp.eval( reader ); - Thread.currentThread().setContextClassLoader( oldClassLoader ); - } - catch ( EvalError evalError ) - { - containerRealm.display(); - - container.getLogger().info( "Error text: " + evalError.getErrorText() ); - - throw new ComponentInstantiationException( "Cannot build component for: " + - componentDescriptor.getComponentKey() + - "; unable to read BeanShell script", evalError ); - } - catch ( FileNotFoundException e ) - { - containerRealm.display(); - throw new ComponentInstantiationException( "Cannot build component for: " + - componentDescriptor.getComponentKey() + - "; unable to read BeanShell script", e ); - } - catch ( IOException e ) - { - throw new ComponentInstantiationException( "Cannot build component for: " + - componentDescriptor.getComponentKey() + - "; unable to read BeanShell script", e ); - } - finally - { - IOUtil.close( reader ); - } - - return result; - } - -} diff --git a/plexus-component-factories/plexus-bsh-factory/src/main/resources/META-INF/plexus/components.xml b/plexus-component-factories/plexus-bsh-factory/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index 7a66e02f5..000000000 --- a/plexus-component-factories/plexus-bsh-factory/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - org.codehaus.plexus.component.factory.ComponentFactory - org.codehaus.plexus.component.factory.bsh.BshComponentFactory - bsh - - bsh - - - - org.codehaus.plexus.component.configurator.ComponentConfigurator - org.codehaus.plexus.component.factory.bsh.BshComponentConfigurator - bsh - - - diff --git a/plexus-component-factories/plexus-bsh-factory/src/test/java/org/codehaus/plexus/component/factory/bsh/BshComponentFactoryTest.java b/plexus-component-factories/plexus-bsh-factory/src/test/java/org/codehaus/plexus/component/factory/bsh/BshComponentFactoryTest.java deleted file mode 100644 index c8a720482..000000000 --- a/plexus-component-factories/plexus-bsh-factory/src/test/java/org/codehaus/plexus/component/factory/bsh/BshComponentFactoryTest.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.plexus.component.factory.bsh; - -import org.codehaus.plexus.PlexusTestCase; - -public class BshComponentFactoryTest - extends PlexusTestCase -{ - public BshComponentFactoryTest() - { - } - - public void testComponent() - throws Exception - { - Hello hello = (Hello) lookup( Hello.ROLE ); - - assertNotNull( hello ); - - hello.initialize(); - - hello.start(); - - hello.hello(); - - hello.dispose(); - } -} diff --git a/plexus-component-factories/plexus-bsh-factory/src/test/java/org/codehaus/plexus/component/factory/bsh/Hello.java b/plexus-component-factories/plexus-bsh-factory/src/test/java/org/codehaus/plexus/component/factory/bsh/Hello.java deleted file mode 100644 index 231afa7f6..000000000 --- a/plexus-component-factories/plexus-bsh-factory/src/test/java/org/codehaus/plexus/component/factory/bsh/Hello.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.codehaus.plexus.component.factory.bsh; - -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable; - -public interface Hello - extends Initializable, Startable, Disposable -{ - static String ROLE = Hello.class.getName(); - - void hello(); -} diff --git a/plexus-component-factories/plexus-bsh-factory/src/test/resources/DefaultHello.bsh b/plexus-component-factories/plexus-bsh-factory/src/test/resources/DefaultHello.bsh deleted file mode 100644 index 7c38aaee6..000000000 --- a/plexus-component-factories/plexus-bsh-factory/src/test/resources/DefaultHello.bsh +++ /dev/null @@ -1,33 +0,0 @@ -import org.codehaus.plexus.component.factory.bsh.Hello; - -contextualize( context ) -{ - System.out.println( "contextualize(context): " + context ); -} - -initialize() -{ - System.out.println( "initialize()" ); -} - -start() -{ - System.out.println( "start()" ); -} - -stop() -{ - System.out.println( "stop()" ); -} - -dispose() -{ - System.out.println( "dispose()" ); -} - -hello() -{ - System.out.println( "hello!" ); -} - -return (Hello)this; diff --git a/plexus-component-factories/plexus-bsh-factory/src/test/resources/org/codehaus/plexus/component/factory/bsh/BshComponentFactoryTest.xml b/plexus-component-factories/plexus-bsh-factory/src/test/resources/org/codehaus/plexus/component/factory/bsh/BshComponentFactoryTest.xml deleted file mode 100644 index 9e6b5545e..000000000 --- a/plexus-component-factories/plexus-bsh-factory/src/test/resources/org/codehaus/plexus/component/factory/bsh/BshComponentFactoryTest.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - org.codehaus.plexus.component.factory.bsh.Hello - /DefaultHello.bsh - bsh - - - diff --git a/plexus-component-factories/plexus-groovy-factory/j b/plexus-component-factories/plexus-groovy-factory/j deleted file mode 100644 index 5f8bd7279..000000000 --- a/plexus-component-factories/plexus-groovy-factory/j +++ /dev/null @@ -1,5 +0,0 @@ - - plexus - plexus-component-factories - 1.0 - diff --git a/plexus-component-factories/plexus-groovy-factory/pom.xml b/plexus-component-factories/plexus-groovy-factory/pom.xml deleted file mode 100644 index 4ab3e056d..000000000 --- a/plexus-component-factories/plexus-groovy-factory/pom.xml +++ /dev/null @@ -1,18 +0,0 @@ - - 4.0.0 - - plexus-component-factories - org.codehaus.plexus - 1.0-alpha-6 - - plexus-groovy-factory - 1.0-alpha-6-SNAPSHOT - Plexus Groovy Factory - - - groovy - groovy - 1.0-beta-4 - - - diff --git a/plexus-component-factories/plexus-groovy-factory/src/groovy/DefaultHello.groovy b/plexus-component-factories/plexus-groovy-factory/src/groovy/DefaultHello.groovy deleted file mode 100644 index 3f81ae1f1..000000000 --- a/plexus-component-factories/plexus-groovy-factory/src/groovy/DefaultHello.groovy +++ /dev/null @@ -1,30 +0,0 @@ -import org.codehaus.plexus.component.factory.groovy.Hello; - -class DefaultHello - implements Hello -{ - void initialize() - { - System.out.println( "initialize()" ); - } - - void start() - { - System.out.println( "start()" ); - } - - void stop() - { - System.out.println( "stop()" ); - } - - void dispose() - { - System.out.println( "dispose()" ); - } - - void hello() - { - System.out.println( "hello!" ); - } -} diff --git a/plexus-component-factories/plexus-groovy-factory/src/main/java/org/codehaus/plexus/component/factory/groovy/GroovyComponentFactory.java b/plexus-component-factories/plexus-groovy-factory/src/main/java/org/codehaus/plexus/component/factory/groovy/GroovyComponentFactory.java deleted file mode 100644 index 3967cedcd..000000000 --- a/plexus-component-factories/plexus-groovy-factory/src/main/java/org/codehaus/plexus/component/factory/groovy/GroovyComponentFactory.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.codehaus.plexus.component.factory.groovy; - -import java.io.File; -import java.io.FileInputStream; - -import groovy.lang.GroovyClassLoader; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.component.factory.AbstractComponentFactory; -import org.codehaus.plexus.component.factory.ComponentInstantiationException; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.classworlds.ClassRealm; - -public class GroovyComponentFactory - extends AbstractComponentFactory -{ - private String groovyHome; - - private String groovyPath; - - public Object newInstance( ComponentDescriptor componentDescriptor, ClassRealm classRealm, PlexusContainer container ) - throws ComponentInstantiationException - { - Object component = null; - - try - { - GroovyClassLoader gcl = new GroovyClassLoader(); - - File f = new File( groovyPath, componentDescriptor.getImplementation() + ".groovy" ); - - Class clazz = gcl.parseClass( new FileInputStream( f ), "SomeName.groovy"); - - component = clazz.newInstance(); - } - catch ( Exception e ) - { - throw new ComponentInstantiationException( e.getMessage() ); - } - - return component; - } -} diff --git a/plexus-component-factories/plexus-groovy-factory/src/main/resources/META-INF/plexus/components.xml b/plexus-component-factories/plexus-groovy-factory/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index a5bc926ec..000000000 --- a/plexus-component-factories/plexus-groovy-factory/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - org.codehaus.plexus.component.factory.groovy.Hello - DefaultHello - groovy - - - diff --git a/plexus-component-factories/plexus-groovy-factory/src/test/java/org/codehaus/plexus/component/factory/groovy/GroovyComponentFactoryTest.java b/plexus-component-factories/plexus-groovy-factory/src/test/java/org/codehaus/plexus/component/factory/groovy/GroovyComponentFactoryTest.java deleted file mode 100644 index 07e9bf94b..000000000 --- a/plexus-component-factories/plexus-groovy-factory/src/test/java/org/codehaus/plexus/component/factory/groovy/GroovyComponentFactoryTest.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.codehaus.plexus.component.factory.groovy; - -import org.codehaus.plexus.PlexusTestCase; - -public class GroovyComponentFactoryTest - extends PlexusTestCase -{ - public GroovyComponentFactoryTest( String name ) - { - super( name ); - } - - public void testComponent() - throws Exception - { - Hello hello = (Hello) lookup( Hello.ROLE ); - - assertNotNull( hello ); - - hello.initialize(); - - hello.start(); - - hello.hello(); - - hello.dispose(); - } -} diff --git a/plexus-component-factories/plexus-groovy-factory/src/test/java/org/codehaus/plexus/component/factory/groovy/Hello.java b/plexus-component-factories/plexus-groovy-factory/src/test/java/org/codehaus/plexus/component/factory/groovy/Hello.java deleted file mode 100644 index c9620a6ed..000000000 --- a/plexus-component-factories/plexus-groovy-factory/src/test/java/org/codehaus/plexus/component/factory/groovy/Hello.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.codehaus.plexus.component.factory.groovy; - -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable; - -public interface Hello - extends Initializable, Startable, Disposable -{ - static String ROLE = Hello.class.getName(); - - void hello(); -} diff --git a/plexus-component-factories/plexus-groovy-factory/src/test/resources/org/codehaus/plexus/component/factory/groovy/GroovyComponentFactoryTest.xml b/plexus-component-factories/plexus-groovy-factory/src/test/resources/org/codehaus/plexus/component/factory/groovy/GroovyComponentFactoryTest.xml deleted file mode 100644 index b893b8587..000000000 --- a/plexus-component-factories/plexus-groovy-factory/src/test/resources/org/codehaus/plexus/component/factory/groovy/GroovyComponentFactoryTest.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - groovy - ${basedir}/target - ${basedir}/src/groovy - - - - diff --git a/plexus-component-factories/plexus-groovy-factory/src/test/resources/org/codehaus/plexus/component/factory/groovy/pom.xml b/plexus-component-factories/plexus-groovy-factory/src/test/resources/org/codehaus/plexus/component/factory/groovy/pom.xml deleted file mode 100644 index 3ce91654a..000000000 --- a/plexus-component-factories/plexus-groovy-factory/src/test/resources/org/codehaus/plexus/component/factory/groovy/pom.xml +++ /dev/null @@ -1,11 +0,0 @@ - - 4.0.0 - - plexus-components - plexus - 1.0 - - plexus - plexus-groovy-factory - 1.0 - diff --git a/plexus-component-factories/plexus-jruby-factory/pom.xml b/plexus-component-factories/plexus-jruby-factory/pom.xml deleted file mode 100644 index d797301bd..000000000 --- a/plexus-component-factories/plexus-jruby-factory/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ - - 4.0.0 - - plexus-component-factories - org.codehaus.plexus - 1.0-alpha-6 - - plexus-jruby-factory - 1.0-alpha-2-SNAPSHOT - Plexus JRuby Factory - - - - codehaus-snap - http://snapshots.repository.codehaus.org/ - - true - - - - - - - - org.jruby - jruby - 0.9.1-SNAPSHOT - - - bsf - bsf - 2.3.0 - - - diff --git a/plexus-component-factories/plexus-jruby-factory/src/main/java/org/codehaus/plexus/component/factory/jruby/JRubyComponentFactory.java b/plexus-component-factories/plexus-jruby-factory/src/main/java/org/codehaus/plexus/component/factory/jruby/JRubyComponentFactory.java deleted file mode 100644 index 3b8217b4e..000000000 --- a/plexus-component-factories/plexus-jruby-factory/src/main/java/org/codehaus/plexus/component/factory/jruby/JRubyComponentFactory.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.codehaus.plexus.component.factory.jruby; - -import org.codehaus.classworlds.ClassRealm; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.component.factory.AbstractComponentFactory; -import org.codehaus.plexus.component.factory.ComponentInstantiationException; -import org.codehaus.plexus.component.jruby.JRubyInvoker; -import org.codehaus.plexus.component.repository.ComponentDescriptor; - -/** - * - * @author eredmond - */ -public class JRubyComponentFactory - extends AbstractComponentFactory -{ - public Object newInstance( ComponentDescriptor componentDescriptor, ClassRealm containerRealm, - PlexusContainer container ) - throws ComponentInstantiationException - { - return new JRubyInvoker( componentDescriptor, containerRealm ); - } -} diff --git a/plexus-component-factories/plexus-jruby-factory/src/main/java/org/codehaus/plexus/component/jruby/JRubyInvoker.java b/plexus-component-factories/plexus-jruby-factory/src/main/java/org/codehaus/plexus/component/jruby/JRubyInvoker.java deleted file mode 100644 index 2924b154e..000000000 --- a/plexus-component-factories/plexus-jruby-factory/src/main/java/org/codehaus/plexus/component/jruby/JRubyInvoker.java +++ /dev/null @@ -1,455 +0,0 @@ -package org.codehaus.plexus.component.jruby; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.io.Reader; -import java.net.URL; -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import org.apache.bsf.BSFException; -import org.apache.bsf.BSFManager; -import org.codehaus.classworlds.ClassRealm; -import org.codehaus.plexus.component.factory.ComponentInstantiationException; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.util.IOUtil; -import org.codehaus.plexus.util.StringOutputStream; -import org.jruby.IRuby; -import org.jruby.Ruby; -import org.jruby.RubyIO; -import org.jruby.RubyNil; -import org.jruby.javasupport.JavaUtil; -import org.jruby.javasupport.bsf.JRubyEngine; -import org.jruby.runtime.builtin.IRubyObject; - -/** - * Configures and invokes the JRuby runtime. The "invoke" method executes a given - * script (set as a Reader) and returns the results as an IRuby object. - * - * @author eredmond - */ -public class JRubyInvoker -{ - private boolean assumePrintLoop; - - private boolean assumeLoop; - - private boolean autoSplit; - - private boolean processLineEnds; - - private boolean debug; - - private int warning = -1; - - private Map inputs = new HashMap(); - - private List libPaths = new LinkedList(); - - private List reqLibs = new LinkedList(); - - private ClassRealm classRealm; - - private ComponentDescriptor componentDescriptor; - - private Reader reader; - - private IRuby runtime; - - /** - * Create a reader JRubyInvoker that reads a JRuby script from the given reader. - * @param classLoader - */ - public JRubyInvoker( Reader scriptReader ) - { - this.reader = scriptReader; - } - - /** - * Create a JRubyInvoker that runs under the context of this class loader. - * @param componentDescriptor - * @param classRealm - */ - public JRubyInvoker( ComponentDescriptor componentDescriptor, ClassRealm classRealm ) - { - this.componentDescriptor = componentDescriptor; - this.classRealm = classRealm; - } - - /** - * The sole way of sending a script to this invoker object. - * If not set, invoker will extract reader from the componentDescriptor. - * @param reader - */ - public void setReader( Reader reader ) - { - this.reader = reader; - } - - /** - * Not required, however if set, the invoker will tear down - * the runtime before exiting Invoke. If you plan on changing the - * state of inkove-returned IRubyObjects, you should set - * this externally via Ruby.getDefaultInstance(), and tear it - * down when done via tearDown() method. - * @param runtime - */ - public void setRuntime( IRuby runtime ) - { - this.runtime = runtime; - } - - /** - * As per the Ruby command line arg -n. - * @param assumeLoop - */ - public void setAssumeLoop( boolean assumeLoop ) - { - this.assumeLoop = assumeLoop; - } - - /** - * As per the Ruby command line arg -p. - * @param assumePrintLoop - */ - public void setAssumePrintLoop( boolean assumePrintLoop ) - { - this.assumePrintLoop = assumePrintLoop; - } - - /** - * As per the Ruby command line arg -a. - * @param autoSplit - */ - public void setAutoSplit( boolean autoSplit ) - { - this.autoSplit = autoSplit; - } - - /** - * As per the Ruby command line arg -W#. - * @param warning - */ - public void setWarning( int warning ) - { - this.warning = warning; - } - - /** - * As per the Ruby command line arg -d. (sets $DEBUG to true) - * @param debug - */ - public void setDebug( boolean debug ) - { - this.debug = debug; - } - - /** - * As per the Ruby command line arg -l. - * @param processLineEnds - */ - public void setProcessLineEnds( boolean processLineEnds ) - { - this.processLineEnds = processLineEnds; - } - - /** - * Adds a library as per the Ruby command line arg -I. - * @param libPath - */ - public void addLibPath( String libPath ) - { - this.libPaths.add( libPath ); - } - - /** - * Adds a 'require' file as per the Ruby command line arg -r. - * @param reqLib - */ - public void addReqLib( String reqLib ) - { - this.reqLibs.add( reqLib ); - } - - /** - * Appends an input value with the given key to the Ruby - * script by prepending the following code to the Ruby script: - * $INPUT['key'] = value; - * - * @param key - * @param value - */ - public void inputValue( String key, Object value ) - { - this.inputs.put( key, value ); - } - - /** - * Invokes the script after all other values are set. - * @return an Object of possibly returned value - */ - public Object invoke() - throws IOException, ComponentInstantiationException - { - return invoke( System.out, System.err ); - } - - /** - * Invokes the script after all other values are set. - * @param stdout stream where jruby output to - * @param stderr stream where jruby errors to - * @return an Object of possibly returned values - */ - public Object invoke( OutputStream stdout, OutputStream stderr ) - throws IOException, ComponentInstantiationException - { - String impl = componentDescriptor.getImplementation(); - if ( !impl.startsWith( "/" ) ) - { - impl = "/" + impl; - } - - if ( classRealm != null ) - { - if ( classRealm.getResource( impl ) == null ) - { - StringBuffer buf = new StringBuffer( "Cannot find: " + impl + " in classpath:" ); - for ( int i = 0; i < classRealm.getConstituents().length; i++ ) - { - URL constituent = classRealm.getConstituents()[i]; - buf.append( "\n [" + i + "] " + constituent ); - } - throw new ComponentInstantiationException( buf.toString() ); - } - - reader = new InputStreamReader( classRealm.getResourceAsStream( impl ) ); - } - else if ( reader == null ) - { - throw new ComponentInstantiationException( "If no classRealm is given in the constructor, a script Reader must be set." ); - } - Object result = null; - ClassLoader oldClassLoader = null; - ClassLoader classLoader = classRealm == null ? null : classRealm.getClassLoader(); - if ( classLoader != null ) - { - oldClassLoader = Thread.currentThread().getContextClassLoader(); - } - - StringOutputStream bos = null; - - System.setProperty( "jruby.script", "" ); - System.setProperty( "jruby.shell", "/bin/sh" ); - System.setProperty( "jruby.home", "" ); - System.setProperty( "jruby.lib", "/usr/lib/" ); - - boolean isExternalRuntime = true; - if ( runtime == null ) - { - isExternalRuntime = false; - runtime = Ruby.getDefaultInstance(); - } - - try - { - if ( classLoader != null ) - { - Thread.currentThread().setContextClassLoader( classLoader ); - } - - bos = new StringOutputStream(); - - int read = -1; - // append the required output streams to the head the script. - for ( Iterator iter = reqLibs.iterator(); iter.hasNext(); ) - { - String reqLibPath = (String) iter.next(); - InputStream ris = getFileStream( reqLibPath ); - while ( ( read = ris.read() ) != -1 ) - { - bos.write( read ); - } - ris.close(); - } - - while ( ( read = reader.read() ) != -1 ) - { - bos.write( read ); - } - bos.flush(); - - if ( debug ) - { - System.out.println( bos.toString() ); - } - - IRubyObject out = new RubyIO( runtime, stdout ); - IRubyObject err = new RubyIO( runtime, stderr ); - - BSFManager manager = new BSFManager(); - - try - { - for (Iterator iter = inputs.entrySet().iterator(); iter.hasNext(); ) - { - Map.Entry entry = (Map.Entry)iter.next(); - - String key = (String)entry.getKey(); - Object value = entry.getValue(); - if ( key != null && value != null ) - { - manager.declareBean(key , value, value.getClass() ); - } - } - - BSFManager.registerScriptingEngine( "ruby", JRubyEngine.class.getName(), new String[] { "rb" } ); - - manager.declareBean( "stdout", out, RubyIO.class); - manager.declareBean( "defout", out, RubyIO.class); - manager.declareBean( ">", out, RubyIO.class); - manager.declareBean( "stderr", err, RubyIO.class); - manager.declareBean( "deferr", err, RubyIO.class); - - manager.declareBean("STDOUT", stdout, RubyIO.class); - manager.declareBean("STDERR", stderr, RubyIO.class); - - manager.declareBean( "VERBOSE", warning == 2 ? Boolean.TRUE : Boolean.FALSE, Boolean.class ); - - String[] args = new String[1]; - args[0] = buildLibs(); - IRubyObject argumentArray = runtime.newArray( JavaUtil.convertJavaArrayToRuby( runtime, args ) ); - manager.declareBean( "ARGV", argumentArray, String[].class ); - manager.declareBean( "*", argumentArray, String[].class ); - - manager.declareBean( "-p", assumePrintLoop ? Boolean.TRUE : Boolean.FALSE, Boolean.class ); - manager.declareBean( "-n", assumeLoop ? Boolean.TRUE : Boolean.FALSE, Boolean.class ); - manager.declareBean( "-a", autoSplit ? Boolean.TRUE : Boolean.FALSE, Boolean.class ); - manager.declareBean( "-l", processLineEnds ? Boolean.TRUE : Boolean.FALSE, Boolean.class ); - - result = manager.eval( "ruby", " - - - - - - - - - - - - - - -
- #parse("navigations/Menu.vm") - -
- $screenViewContent -
-
- - #parse("navigations/DefaultBottom.vm") - - - diff --git a/plexus-sandbox/plexus-components/plexus-meridian/DefaultBottom.vm b/plexus-sandbox/plexus-components/plexus-meridian/DefaultBottom.vm deleted file mode 100644 index 5e734a9d1..000000000 --- a/plexus-sandbox/plexus-components/plexus-meridian/DefaultBottom.vm +++ /dev/null @@ -1,11 +0,0 @@ - diff --git a/plexus-sandbox/plexus-components/plexus-meridian/DefaultTop.vm b/plexus-sandbox/plexus-components/plexus-meridian/DefaultTop.vm deleted file mode 100644 index 16ac58bf0..000000000 --- a/plexus-sandbox/plexus-components/plexus-meridian/DefaultTop.vm +++ /dev/null @@ -1,2 +0,0 @@ -Summit Test App -
diff --git a/plexus-sandbox/plexus-components/plexus-meridian/Issue.vm b/plexus-sandbox/plexus-components/plexus-meridian/Issue.vm deleted file mode 100644 index 43b440ef3..000000000 --- a/plexus-sandbox/plexus-components/plexus-meridian/Issue.vm +++ /dev/null @@ -1,24 +0,0 @@ -
-

Maven book

-

- #set ( $class = "a" ) - - - - - - - #foreach ( $doc in $docorama.issueStorage.issues ) - - - - - #if ( $class == "a" ) - #set ( $class = "b" ) - #else - #set ( $class = "a" ) - #end - #end -
Issue SummaryDetail
$doc.summary$doc.detail
-

-
diff --git a/plexus-sandbox/plexus-components/plexus-meridian/Menu.vm b/plexus-sandbox/plexus-components/plexus-meridian/Menu.vm deleted file mode 100644 index 5fc0448c3..000000000 --- a/plexus-sandbox/plexus-components/plexus-meridian/Menu.vm +++ /dev/null @@ -1,16 +0,0 @@ - diff --git a/plexus-sandbox/plexus-components/plexus-meridian/output.txt b/plexus-sandbox/plexus-components/plexus-meridian/output.txt deleted file mode 100644 index bd24cf6fa..000000000 --- a/plexus-sandbox/plexus-components/plexus-meridian/output.txt +++ /dev/null @@ -1,5 +0,0 @@ -beep - -jason - -that \ No newline at end of file diff --git a/plexus-sandbox/plexus-components/plexus-meridian/pom.xml b/plexus-sandbox/plexus-components/plexus-meridian/pom.xml deleted file mode 100644 index a25e5bd2a..000000000 --- a/plexus-sandbox/plexus-components/plexus-meridian/pom.xml +++ /dev/null @@ -1,13 +0,0 @@ - - 4.0.0 - plexus - plexus-meridian - 1.0 - - - junit - junit - 3.8.1 - - - diff --git a/plexus-sandbox/plexus-components/plexus-meridian/src/main/java/org/codehaus/plexus/meridian/DefaultMeridian.java b/plexus-sandbox/plexus-components/plexus-meridian/src/main/java/org/codehaus/plexus/meridian/DefaultMeridian.java deleted file mode 100644 index 80fbb0396..000000000 --- a/plexus-sandbox/plexus-components/plexus-meridian/src/main/java/org/codehaus/plexus/meridian/DefaultMeridian.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2005 Your Corporation. All Rights Reserved. - */ -package org.codehaus.plexus.meridian; - -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.io.Writer; - -/** - * @author Jason van Zyl - * @version $Id$ - */ -public class DefaultMeridian - implements Meridian -{ - private static final int DEFAULT_BUFFER_SIZE = 1024 * 4; - - public void render( String template, Writer writer ) - throws IOException - { - processTemplate( template, writer ); - - writer.flush(); - - writer.close(); - } - - public static void processTemplate( String template, Writer writer ) - throws IOException - { - InterpolationHandler h = new MeridianInterpolationHandler(); - - InterpolationFilterWriter out = new InterpolationFilterWriter( writer, h, "${", "}" ); - - InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream( template ); - - Reader reader = new InputStreamReader( is ); - - copy( reader, out ); - } - - public static void copy( Reader input, Writer output ) - throws IOException - { - char[] buffer = new char[DEFAULT_BUFFER_SIZE]; - - int n = 0; - - while ( -1 != ( n = input.read( buffer ) ) ) - { - output.write( buffer, 0, n ); - } - } -} diff --git a/plexus-sandbox/plexus-components/plexus-meridian/src/main/java/org/codehaus/plexus/meridian/InterpolationFilterWriter.java b/plexus-sandbox/plexus-components/plexus-meridian/src/main/java/org/codehaus/plexus/meridian/InterpolationFilterWriter.java deleted file mode 100644 index 0a282a2ca..000000000 --- a/plexus-sandbox/plexus-components/plexus-meridian/src/main/java/org/codehaus/plexus/meridian/InterpolationFilterWriter.java +++ /dev/null @@ -1,137 +0,0 @@ -package org.codehaus.plexus.meridian; - -import java.io.FilterWriter; -import java.io.IOException; -import java.io.Writer; - -public class InterpolationFilterWriter - extends FilterWriter -{ - private int index = 0; - - private String beginToken; - - private int beginTokenLength; - - private StringBuffer queuedData = new StringBuffer(); - - private int beginTokenIndex; - - private int endTokenIndex; - - private String endToken; - - private int endTokenLength; - - private static String DEFAULT_BEGIN_TOKEN = "@"; - - private static String DEFAULT_END_TOKEN = "@"; - - private InterpolationHandler interpolationHandler; - - public InterpolationFilterWriter( Writer out, InterpolationHandler interpolationHandler ) - { - this( out, interpolationHandler, DEFAULT_BEGIN_TOKEN, DEFAULT_END_TOKEN ); - } - - public InterpolationFilterWriter( Writer out, InterpolationHandler interpolationHandler, String beginToken, String endToken ) - { - super( out ); - - this.interpolationHandler = interpolationHandler; - - this.beginToken = beginToken; - - beginTokenLength = beginToken.length(); - - this.endToken = endToken; - - endTokenLength = endToken.length(); - } - - - public void write( String s ) - throws IOException - { - int length = s.length(); - - for ( int i = 0; i < length; i++ ) - { - write( s.charAt( i ) ); - } - } - - public void write( char[] buf, int offset, int len ) - throws IOException - { - for ( int i = offset; i < len; i++ ) - { - write( (char) buf[i] ); - } - } - - public void write( int c ) - throws IOException - { - if ( index == 0 && c == beginToken.toCharArray()[beginTokenIndex] ) - { - if ( beginTokenIndex == ( beginTokenLength - 1 ) ) - { - beginTokenIndex = 0; - } - else - { - beginTokenIndex++; - } - - queuedData.append( (char) c ); - - index++; - } - else if ( index > 0 && c == endToken.toCharArray()[endTokenIndex] ) - { - if ( endTokenIndex == ( endTokenLength - 1 ) ) - { - queuedData.append( (char) c ); - - beginTokenIndex = 0; - - endTokenIndex = 0; - - index = 0; - - interpolate( queuedData.toString() ); - - queuedData = new StringBuffer(); - } - else - { - queuedData.append( (char) c ); - - endTokenIndex++; - - index++; - } - } - else if ( index > 0 ) - { - queuedData.append( (char) c ); - - index++; - } - else - { - out.write( c ); - } - } - - private void interpolate( String s ) - throws IOException - { - System.out.println( "s = " + s ); - - String key = s.substring( beginTokenLength, s.length() - endTokenLength ); - - interpolationHandler.interpolate( key, out ); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-meridian/src/main/java/org/codehaus/plexus/meridian/InterpolationHandler.java b/plexus-sandbox/plexus-components/plexus-meridian/src/main/java/org/codehaus/plexus/meridian/InterpolationHandler.java deleted file mode 100644 index 38a1b629d..000000000 --- a/plexus-sandbox/plexus-components/plexus-meridian/src/main/java/org/codehaus/plexus/meridian/InterpolationHandler.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) 2005 Your Corporation. All Rights Reserved. - */ -package org.codehaus.plexus.meridian; - -import java.io.Writer; -import java.io.IOException; - -/** - * @author Jason van Zyl - * @version $Id$ - */ -public interface InterpolationHandler -{ - public void interpolate( String key, Writer writer ) - throws IOException; -} diff --git a/plexus-sandbox/plexus-components/plexus-meridian/src/main/java/org/codehaus/plexus/meridian/MapInterpolationHandler.java b/plexus-sandbox/plexus-components/plexus-meridian/src/main/java/org/codehaus/plexus/meridian/MapInterpolationHandler.java deleted file mode 100644 index 3f680162f..000000000 --- a/plexus-sandbox/plexus-components/plexus-meridian/src/main/java/org/codehaus/plexus/meridian/MapInterpolationHandler.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2005 Your Corporation. All Rights Reserved. - */ -package org.codehaus.plexus.meridian; - -import java.util.Map; -import java.io.IOException; -import java.io.Writer; - -/** - * @author Jason van Zyl - * @version $Id$ - */ -public class MapInterpolationHandler - implements InterpolationHandler -{ - private Map map; - - public MapInterpolationHandler( Map map ) - { - this.map = map; - } - - public void interpolate( String key, Writer out ) - throws IOException - { - Object o = map.get( key ); - - if ( o == null ) - { - out.write( key ); - } - else - { - out.write( o.toString() ); - } - } -} diff --git a/plexus-sandbox/plexus-components/plexus-meridian/src/main/java/org/codehaus/plexus/meridian/Meridian.java b/plexus-sandbox/plexus-components/plexus-meridian/src/main/java/org/codehaus/plexus/meridian/Meridian.java deleted file mode 100644 index bd447706a..000000000 --- a/plexus-sandbox/plexus-components/plexus-meridian/src/main/java/org/codehaus/plexus/meridian/Meridian.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) 2005 Your Corporation. All Rights Reserved. - */ -package org.codehaus.plexus.meridian; - -import java.io.Writer; -import java.io.IOException; - -/** - * @author Jason van Zyl - * @version $Id$ - */ -public interface Meridian -{ - public void render( String template, Writer writer ) - throws IOException; -} diff --git a/plexus-sandbox/plexus-components/plexus-meridian/src/main/java/org/codehaus/plexus/meridian/MeridianInterpolationHandler.java b/plexus-sandbox/plexus-components/plexus-meridian/src/main/java/org/codehaus/plexus/meridian/MeridianInterpolationHandler.java deleted file mode 100644 index c7f7f3dd0..000000000 --- a/plexus-sandbox/plexus-components/plexus-meridian/src/main/java/org/codehaus/plexus/meridian/MeridianInterpolationHandler.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2005 Your Corporation. All Rights Reserved. - */ -package org.codehaus.plexus.meridian; - -import java.io.IOException; -import java.io.Writer; -import java.util.Map; -import java.util.HashMap; - -/** - * @author Jason van Zyl - * @version $Id$ - */ -public class MeridianInterpolationHandler - implements InterpolationHandler -{ - private Map variables; - - public MeridianInterpolationHandler() - { - variables = new HashMap(); - - variables.put( "value", "beep" ); - - variables.put( "this", "jason" ); - } - - public void interpolate( String key, Writer out ) - throws IOException - { - if ( key.startsWith( ":" ) ) - { - DefaultMeridian.processTemplate( "bottom.txt", out ); - } - else - { - interpolateContextValue( key, out ); - } - } - - protected void interpolateContextValue( String key, Writer out ) - throws IOException - { - Object o = variables.get( key ); - - if ( o == null ) - { - out.write( key ); - } - else - { - out.write( o.toString() ); - } - } -} diff --git a/plexus-sandbox/plexus-components/plexus-meridian/src/test/java/org/codehaus/plexus/meridian/InterpolationFilterWriterTest.java b/plexus-sandbox/plexus-components/plexus-meridian/src/test/java/org/codehaus/plexus/meridian/InterpolationFilterWriterTest.java deleted file mode 100644 index 97023a34f..000000000 --- a/plexus-sandbox/plexus-components/plexus-meridian/src/test/java/org/codehaus/plexus/meridian/InterpolationFilterWriterTest.java +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright (c) 2005 Your Corporation. All Rights Reserved. - */ -package org.codehaus.plexus.meridian; - -import junit.framework.TestCase; - -import java.io.Writer; -import java.io.StringWriter; -import java.util.HashMap; -import java.util.Map; - -/** - * @author Jason van Zyl - * @version $Id$ - */ -public class InterpolationFilterWriterTest - extends TestCase -{ - public void testInterpolatedValueAtTheBeginningOfTheInput() - throws Exception - { - StringWriter sw = new StringWriter(); - - Writer w = new InterpolationFilterWriter( sw, createMap() ); - - w.write( "@name@ is my name." ); - - assertEquals( "jason is my name.", sw.toString() ); - } - - public void testInterpolatedValueInTheMiddleOfTheInput() - throws Exception - { - StringWriter sw = new StringWriter(); - - Writer w = new InterpolationFilterWriter( sw, createMap() ); - - w.write( "My name is @name@ the lazy." ); - - assertEquals( "My name is jason the lazy.", sw.toString() ); - } - - public void testInterpolatedValueAtTheEndOfTheInput() - throws Exception - { - StringWriter sw = new StringWriter(); - - Writer w = new InterpolationFilterWriter( sw, createMap() ); - - w.write( "My name is @name@" ); - - assertEquals( "My name is jason", sw.toString() ); - } - - public void testInterpolatedValueAtTheBeginningOfTheInputUsingMultiCharacterBeginToken() - throws Exception - { - StringWriter sw = new StringWriter(); - - Writer w = new InterpolationFilterWriter( sw, createMap(), "${", "}" ); - - w.write( "${name} is my name." ); - - assertEquals( "jason is my name.", sw.toString() ); - } - - public void testInterpolatedValueInTheMiddleOfTheInputUsingMultiCharacterBeginToken() - throws Exception - { - StringWriter sw = new StringWriter(); - - Writer w = new InterpolationFilterWriter( sw, createMap(), "${", "}" ); - - w.write( "My name is ${name} the lazy." ); - - assertEquals( "My name is jason the lazy.", sw.toString() ); - } - - public void testInterpolatedValueAtTheEndOfTheInputUsingMultiCharacterBeginToken() - throws Exception - { - StringWriter sw = new StringWriter(); - - Writer w = new InterpolationFilterWriter( sw, createMap(), "${", "}" ); - - w.write( "My name is ${name} ${name} ${name} ${name}" ); - - System.out.println( "result = " + sw.toString() ); - - assertEquals( "My name is jason jason jason jason", sw.toString() ); - } - - public void testInterpolatedValueAtTheBeginningOfTheInputUsingMultiCharacterEndToken() - throws Exception - { - StringWriter sw = new StringWriter(); - - Writer w = new InterpolationFilterWriter( sw, createMap(), "{", "}}" ); - - w.write( "{name}} is my name." ); - - assertEquals( "jason is my name.", sw.toString() ); - } - - public void testInterpolatedValueInTheMiddleOfTheInputUsingMultiCharacterEndToken() - throws Exception - { - StringWriter sw = new StringWriter(); - - Writer w = new InterpolationFilterWriter( sw, createMap(), "{", "}}" ); - - w.write( "My name is {name}} the lazy." ); - - assertEquals( "My name is jason the lazy.", sw.toString() ); - } - - public void testInterpolatedValueAtTheEndOfTheInputUsingMultiCharacterEndToken() - throws Exception - { - StringWriter sw = new StringWriter(); - - Writer w = new InterpolationFilterWriter( sw, createMap(), "{", "}}" ); - - w.write( "My name is {name}}" ); - - assertEquals( "My name is jason", sw.toString() ); - } - - public void testInterpolatedValueAtTheBeginningOfTheInputUsingMultiCharacterTokens() - throws Exception - { - StringWriter sw = new StringWriter(); - - Writer w = new InterpolationFilterWriter( sw, createMap(), "{{", "}}" ); - - w.write( "{{name}} is my name." ); - - assertEquals( "jason is my name.", sw.toString() ); - } - - public void testInterpolatedValueInTheMiddleOfTheInputUsingMultiCharacterTokens() - throws Exception - { - StringWriter sw = new StringWriter(); - - Writer w = new InterpolationFilterWriter( sw, createMap(), "{{", "}}" ); - - w.write( "My name is {{name}} the lazy." ); - - assertEquals( "My name is jason the lazy.", sw.toString() ); - } - - public void testInterpolatedValueAtTheEndOfTheInputUsingMultiCharacterTokens() - throws Exception - { - StringWriter sw = new StringWriter(); - - Writer w = new InterpolationFilterWriter( sw, createMap(), "{{", "}}" ); - - w.write( "My name is {{name}}" ); - - assertEquals( "My name is jason", sw.toString() ); - } - - - protected InterpolationHandler createMap() - { - Map m = new HashMap(); - - m.put( "name", "jason" ); - - InterpolationHandler h = new MapInterpolationHandler( m ); - - return h; - } -} diff --git a/plexus-sandbox/plexus-components/plexus-meridian/src/test/java/org/codehaus/plexus/meridian/MeridianTest.java b/plexus-sandbox/plexus-components/plexus-meridian/src/test/java/org/codehaus/plexus/meridian/MeridianTest.java deleted file mode 100644 index 3567b467d..000000000 --- a/plexus-sandbox/plexus-components/plexus-meridian/src/test/java/org/codehaus/plexus/meridian/MeridianTest.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2005 Your Corporation. All Rights Reserved. - */ -package org.codehaus.plexus.meridian; - -import junit.framework.TestCase; - -import java.io.FileWriter; - -/** - * @author Jason van Zyl - * @version $Id$ - */ -public class MeridianTest - extends TestCase -{ - public void testMeridian() - throws Exception - { - Meridian m = new DefaultMeridian(); - - FileWriter w = new FileWriter( "output.txt" ); - - m.render( "front.txt", w ); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-meridian/src/test/resources/bottom.txt b/plexus-sandbox/plexus-components/plexus-meridian/src/test/resources/bottom.txt deleted file mode 100644 index 1482388a5..000000000 --- a/plexus-sandbox/plexus-components/plexus-meridian/src/test/resources/bottom.txt +++ /dev/null @@ -1,3 +0,0 @@ -${this} - -${that} \ No newline at end of file diff --git a/plexus-sandbox/plexus-components/plexus-meridian/src/test/resources/front.txt b/plexus-sandbox/plexus-components/plexus-meridian/src/test/resources/front.txt deleted file mode 100644 index 2505b723c..000000000 --- a/plexus-sandbox/plexus-components/plexus-meridian/src/test/resources/front.txt +++ /dev/null @@ -1,3 +0,0 @@ -${value} - -${:renderer} \ No newline at end of file diff --git a/plexus-sandbox/plexus-components/plexus-naming/pom.xml b/plexus-sandbox/plexus-components/plexus-naming/pom.xml deleted file mode 100644 index 71782278d..000000000 --- a/plexus-sandbox/plexus-components/plexus-naming/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - org.codehaus.plexus - plexus-components - 1.1.6 - - 4.0.0 - plexus-naming - Plexus Naming Component - 1.0-alpha-2-SNAPSHOT - - - - org.codehaus.plexus - plexus-maven-plugin - 1.3 - - - - descriptor - - - - - - - - - directory-naming - naming-core - 0.8 - - - directory-naming - naming-java - 0.8 - - - directory-naming - naming-factory - 0.8 - - - commons-dbcp - commons-dbcp - 1.2.1 - - - hsqldb - hsqldb - 1.7.1 - test - - - diff --git a/plexus-sandbox/plexus-components/plexus-naming/src/main/java/org/codehaus/plexus/naming/DefaultNaming.java b/plexus-sandbox/plexus-components/plexus-naming/src/main/java/org/codehaus/plexus/naming/DefaultNaming.java deleted file mode 100644 index 4f8fd9ada..000000000 --- a/plexus-sandbox/plexus-components/plexus-naming/src/main/java/org/codehaus/plexus/naming/DefaultNaming.java +++ /dev/null @@ -1,151 +0,0 @@ -package org.codehaus.plexus.naming; - -import org.apache.naming.ResourceRef; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; - -import javax.naming.CompositeName; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.Name; -import javax.naming.NameAlreadyBoundException; -import javax.naming.NameClassPair; -import javax.naming.NamingEnumeration; -import javax.naming.NamingException; -import javax.naming.StringRefAddr; -import java.util.Hashtable; -import java.util.Iterator; -import java.util.List; -import java.util.Properties; - -/** - * Default implementation of naming. - * - * @author Brett Porter - * @plexus.component role="org.codehaus.plexus.naming.Naming" role-hint="default" - */ -public class DefaultNaming - implements Naming, Initializable -{ - private static final String COMP_CONTEXT_NAME = "java:comp"; - - private static final String ENV_CONTEXT_NAME = "env"; - - private Context envContext; - - /** - * @plexus.configuration - */ - private List resources; - - /** - * @plexus.configuration default-value="true" - */ - private boolean setSystemProperties = true; // deliberately set true default here so you must declare it false, not just omit it - - public Context createInitialContext() - throws NamingException - { - Hashtable env = new Hashtable(); - env.put( Context.INITIAL_CONTEXT_FACTORY, org.apache.naming.java.javaURLContextFactory.class.getName() ); - env.put( Context.URL_PKG_PREFIXES, "org.apache.naming" ); - - return new InitialContext( env ); - } - - public void initialize() - throws InitializationException - { - if ( setSystemProperties ) - { - System.setProperty( Context.INITIAL_CONTEXT_FACTORY, org.apache.naming.java.javaURLContextFactory.class.getName() ); - System.setProperty( Context.URL_PKG_PREFIXES, "org.apache.naming" ); - } - - try - { - envContext = - createInitialContext().createSubcontext( COMP_CONTEXT_NAME ).createSubcontext( ENV_CONTEXT_NAME ); - - loadConfiguration(); - } - catch ( NamingException e ) - { - throw new InitializationException( e.getMessage(), e ); - } - } - - /** - * Destroys initial context. - *

- * Invokes Context.destroySubcontext(Name) only on top-level - * subcontexts. - * - * @throws NamingException if a NamingException occurs. - */ - public synchronized void destroyInitialContext() - throws NamingException - { - Context initialContext = new InitialContext(); - NamingEnumeration contexts = initialContext.list( "" ); - while ( contexts.hasMore() ) - { - initialContext.destroySubcontext( ( (NameClassPair) contexts.next() ).getName() ); - } - envContext = null; - } - - /** - * Loads xml configuration data from the component configuration. - * - * @throws NamingException if a NamingException occurs. - */ - public synchronized void loadConfiguration() - throws NamingException - { -/* TODO - for ( Iterator j = ctx.getEnvironmentList().iterator(); j.hasNext(); ) - { - Config.Environment e = (Config.Environment) j.next(); - jndiCtx.rebind( e.getName(), e.createValue() ); - } -*/ - - if ( resources != null ) - { - for ( Iterator j = resources.iterator(); j.hasNext(); ) - { - Resource r = (Resource) j.next(); - - Name name = new CompositeName( r.getName() ); - - try - { - for ( int i = 1; i <= name.size() - 1; i++ ) - { - envContext.createSubcontext( name.getPrefix( i ) ); - } - } - catch ( NameAlreadyBoundException e ) - { - // The prefix is already added as a sub context - } - - envContext.bind( r.getName(), createResource( r ) ); - } - } - } - - private ResourceRef createResource( Resource r ) - { - ResourceRef ref = new ResourceRef( r.getType(), null, null, null ); - Properties parameters = r.getProperties(); - for ( Iterator i = parameters.keySet().iterator(); i.hasNext(); ) - { - String name = (String) i.next(); - String value = parameters.getProperty( name ); - ref.add( new StringRefAddr( name, value ) ); - } - return ref; - } -} diff --git a/plexus-sandbox/plexus-components/plexus-naming/src/main/java/org/codehaus/plexus/naming/Naming.java b/plexus-sandbox/plexus-components/plexus-naming/src/main/java/org/codehaus/plexus/naming/Naming.java deleted file mode 100644 index b88245525..000000000 --- a/plexus-sandbox/plexus-components/plexus-naming/src/main/java/org/codehaus/plexus/naming/Naming.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.codehaus.plexus.naming; - -import javax.naming.Context; -import javax.naming.NamingException; - -/** - * A naming component for establishing a JNDI tree. This is useful to load-on-start in your plexus - * applications. - * - * @author Brett Porter - */ -public interface Naming -{ - String ROLE = Naming.class.getName(); - - Context createInitialContext() - throws NamingException; -} diff --git a/plexus-sandbox/plexus-components/plexus-naming/src/main/java/org/codehaus/plexus/naming/Resource.java b/plexus-sandbox/plexus-components/plexus-naming/src/main/java/org/codehaus/plexus/naming/Resource.java deleted file mode 100644 index 593cf525f..000000000 --- a/plexus-sandbox/plexus-components/plexus-naming/src/main/java/org/codehaus/plexus/naming/Resource.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.plexus.naming; - -import java.util.Properties; - -public class Resource -{ - private String name; - - private String type; - - private Properties properties; - - public String getName() - { - return name; - } - - public String getType() - { - return type; - } - - public Properties getProperties() - { - return properties; - } -} diff --git a/plexus-sandbox/plexus-components/plexus-naming/src/test/java/org/codehaus/plexus/naming/NamingTest.java b/plexus-sandbox/plexus-components/plexus-naming/src/test/java/org/codehaus/plexus/naming/NamingTest.java deleted file mode 100644 index bcb563d35..000000000 --- a/plexus-sandbox/plexus-components/plexus-naming/src/test/java/org/codehaus/plexus/naming/NamingTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.codehaus.plexus.naming; - -import org.codehaus.plexus.PlexusTestCase; - -import javax.naming.Context; -import javax.sql.DataSource; -import java.sql.Connection; - -public class NamingTest - extends PlexusTestCase -{ - public void testDataSource() - throws Exception - { - Naming naming = (Naming) lookup( Naming.ROLE, "test" ); - - assertNotNull( naming ); - - Context ctx = naming.createInitialContext(); - ctx = (Context) ctx.lookup( "java:comp/env" ); - - DataSource dataSource = (DataSource) ctx.lookup( "jdbc/testDB" ); - Connection conn = dataSource.getConnection(); - conn.close(); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-naming/src/test/resources/org/codehaus/plexus/naming/NamingTest.xml b/plexus-sandbox/plexus-components/plexus-naming/src/test/resources/org/codehaus/plexus/naming/NamingTest.xml deleted file mode 100644 index e7ca71ef8..000000000 --- a/plexus-sandbox/plexus-components/plexus-naming/src/test/resources/org/codehaus/plexus/naming/NamingTest.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - org.codehaus.plexus.naming.Naming - test - org.codehaus.plexus.naming.DefaultNaming - - - - jdbc/testDB - javax.sql.DataSource - - - driverClassName - org.hsqldb.jdbcDriver - - - url - jdbc:hsqldb:target/hsqldb - - - username - sa - - - password - - - - - - - - - diff --git a/plexus-sandbox/plexus-components/plexus-password-store/pom.xml b/plexus-sandbox/plexus-components/plexus-password-store/pom.xml deleted file mode 100644 index e4b9f4d3b..000000000 --- a/plexus-sandbox/plexus-components/plexus-password-store/pom.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - 4.0.0 - - org.codehaus.plexus - plexus-components - 1.1.5 - - plexus-password-store - 1.0-alpha-1-SNAPSHOT - Plexus Password Store Component - - - - maven-plexus-plugin - 1.1-alpha-3-SNAPSHOT - - - descriptor - - - - - - diff --git a/plexus-sandbox/plexus-components/plexus-password-store/src/main/java/org/codehaus/plexus/components/password/JksPasswordStore.java b/plexus-sandbox/plexus-components/plexus-password-store/src/main/java/org/codehaus/plexus/components/password/JksPasswordStore.java deleted file mode 100755 index 5ac7f7e1d..000000000 --- a/plexus-sandbox/plexus-components/plexus-password-store/src/main/java/org/codehaus/plexus/components/password/JksPasswordStore.java +++ /dev/null @@ -1,310 +0,0 @@ -package org.codehaus.plexus.components.password; - -/* - * The MIT License - * - * Copyright (c) 2005, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; - -import javax.crypto.spec.SecretKeySpec; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.security.Key; -import java.security.KeyStore; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.UnrecoverableKeyException; -import java.security.cert.CertificateException; - -/** - * Implementation of a password keystore that uses a Java KeyStore. - * - * @author Brett Porter - * @version $Id$ - * @plexus.component - */ -public class JksPasswordStore - implements PasswordStore, Initializable -{ - private KeyStore keystore; - - private File keystoreLocation; - - private String masterPassword; - - public static final String KEYSTORE_TYPE = "JCEKS"; - - public static final String ALGORITHM = "raw"; - - private long lastModified = 0L; - - public JksPasswordStore() - { - } - - JksPasswordStore( File keystoreLocation, String masterPassword ) - { - this.keystoreLocation = keystoreLocation; - this.masterPassword = masterPassword; - } - - public String getPassword( String id ) - throws UnsupportedOperationException, PasswordStoreException - { - try - { - synchronized ( keystore ) - { - reloadKeyStore(); - if ( !keystore.isKeyEntry( id ) ) - { - return null; - } - - Key key = keystore.getKey( id, masterPassword.toCharArray() ); - - return new String( key.getEncoded() ); - } - } - catch ( KeyStoreException e ) - { - throw new PasswordStoreException( "Error retrieving password", e ); - } - catch ( NoSuchAlgorithmException e ) - { - throw new PasswordStoreException( "Error retrieving password", e ); - } - catch ( UnrecoverableKeyException e ) - { - throw new PasswordStoreException( "Error retrieving password", e ); - } - } - - public boolean checkPassword( String id, String attempt ) - throws PasswordStoreException - { - return attempt.equals( getPassword( id ) ); - } - - public void setPassword( String id, String oldPassword, String newPassword ) - throws PasswordStoreException - { - if ( !checkPassword( id, oldPassword ) ) - { - throw new PasswordStoreException( "The password specified was not correct for id " + id ); - } - - synchronized ( keystore ) - { - removePassword( id ); - setPassword( id, newPassword ); - } - } - - public void setPassword( String id, String newPassword ) - throws PasswordStoreException - { - try - { - synchronized ( keystore ) - { - reloadKeyStore(); - if ( keystore.isKeyEntry( id ) ) - { - throw new PasswordStoreException( "Password under key " + id + " already exists in the store" ); - } - - Key key = new SecretKeySpec( newPassword.getBytes(), ALGORITHM ); - keystore.setKeyEntry( id, key, masterPassword.toCharArray(), null ); - saveKeyStore(); - } - } - catch ( KeyStoreException e ) - { - throw new PasswordStoreException( "Error setting password", e ); - } - } - - public void removePassword( String id ) - throws PasswordStoreException - { - try - { - synchronized ( keystore ) - { - reloadKeyStore(); - if ( !keystore.isKeyEntry( id ) ) - { - throw new PasswordStoreException( "Password under key " + id + " not found in the store" ); - } - - keystore.deleteEntry( id ); - saveKeyStore(); - } - } - catch ( KeyStoreException e ) - { - throw new PasswordStoreException( "Error deleting password", e ); - } - } - - private void saveKeyStore() - throws PasswordStoreException - { - if ( keystoreLocation != null ) - { - try - { - synchronized ( keystore ) - { - FileOutputStream stream = new FileOutputStream( keystoreLocation ); - try - { - keystore.store( stream, masterPassword.toCharArray() ); - } - finally - { - stream.close(); - } - this.lastModified = keystoreLocation.lastModified(); - } - } - catch ( KeyStoreException e ) - { - throw new PasswordStoreException( "Unable to write store", e ); - } - catch ( IOException e ) - { - throw new PasswordStoreException( "Unable to write store", e ); - } - catch ( NoSuchAlgorithmException e ) - { - throw new PasswordStoreException( "Unable to write store", e ); - } - catch ( CertificateException e ) - { - throw new PasswordStoreException( "Unable to write store", e ); - } - } - } - - public void unlock( String masterPassword ) - { - // TODO: maybe this is preferred to initializable? - } - - public void unlock() - { - // TOOD: implement? - } - - public void lock() - { - // TOOD: implement? - } - - public void initialize() - throws InitializationException - { - try - { - keystore = KeyStore.getInstance( KEYSTORE_TYPE ); - - if ( masterPassword == null ) - { - masterPassword = ""; - } - - if ( !reloadKeyStore() ) - { - keystore.load( null, masterPassword.toCharArray() ); - - saveKeyStore(); - } - } - catch ( Exception e ) - { - throw new InitializationException( "Problem initializing keystore: ", e ); - } - } - - private boolean reloadKeyStore() - throws PasswordStoreException - { - boolean loaded = false; - - if ( keystoreLocation != null ) - { - try - { - loaded = readKeyStore( masterPassword.toCharArray() ); - } - catch ( IOException e ) - { - throw new PasswordStoreException( "Unable to read back store ", e ); - } - catch ( NoSuchAlgorithmException e ) - { - throw new PasswordStoreException( "Unable to read back store ", e ); - } - catch ( CertificateException e ) - { - throw new PasswordStoreException( "Unable to read back store ", e ); - } - } - - return loaded; - } - - private boolean readKeyStore( char[] password ) - throws IOException, NoSuchAlgorithmException, CertificateException - { - boolean result = false; - - if ( keystoreLocation.exists() ) - { - synchronized ( keystore ) - { - long lastModified = keystoreLocation.lastModified(); - if ( this.lastModified < lastModified ) - { - FileInputStream stream = new FileInputStream( keystoreLocation ); - try - { - keystore.load( stream, password ); - this.lastModified = lastModified; - result = true; - } - finally - { - stream.close(); - } - } - } - } - return result; - } -} diff --git a/plexus-sandbox/plexus-components/plexus-password-store/src/main/java/org/codehaus/plexus/components/password/PasswordStore.java b/plexus-sandbox/plexus-components/plexus-password-store/src/main/java/org/codehaus/plexus/components/password/PasswordStore.java deleted file mode 100755 index d01068ae6..000000000 --- a/plexus-sandbox/plexus-components/plexus-password-store/src/main/java/org/codehaus/plexus/components/password/PasswordStore.java +++ /dev/null @@ -1,108 +0,0 @@ -package org.codehaus.plexus.components.password; - -/* - * The MIT License - * - * Copyright (c) 2005, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * Facilitates a secure storage of passwords, accessed by an indentifier. - * - * @author Brett Porter - * @version $Id$ - */ -public interface PasswordStore -{ - static final String ROLE = PasswordStore.class.getName(); - - /** - * Retrieve the unencrypted password by it's key, eg wagon.http.proxy.password. - * This method will require the entry of the master password if the store is locked. - * - * @param id the key to lookup the password by - * @return the plaintext password, or null if there is none under that key - * @throws UnsupportedOperationException if the configuration of the store does not allow password retrieval - * @throws PasswordStoreException if there was a problem reading the password from the store - */ - String getPassword( String id ) - throws UnsupportedOperationException, PasswordStoreException; - - /** - * Checks whether a password is correct. This can be used when the configuration of the store - * does not allow direct retrieval of the password. - * - * @param id the key to lookup the password by - * @param attempt the attempt at the password (plaintext) - * @return whether the password was correct or not - * @throws PasswordStoreException if there was a problem reading the password from the store - */ - boolean checkPassword( String id, String attempt ) - throws PasswordStoreException; - - /** - * Change a stored password. May or may not require the master password depending on whether - * the store is unlocked, or the configuration of the store requires a master password to change - * a stored password when the old one can be given. - * - * @param id the key to lookup the password by - * @param oldPassword the previously stored password (plaintext) - * @param newPassword the replacement password (plaintext) - * @throws PasswordStoreException if there was a problem reading the password from the store, or the old password was incorrect - */ - void setPassword( String id, String oldPassword, String newPassword ) - throws PasswordStoreException; - - /** - * Change or create the password stored for a particular identifier. - * May require the store to be unlocked, and may fail if the id already exists - * dependending on the configuration of the store. - * - * @param id the key to store the password under - * @param newPassword the password (plaintext) - * @throws PasswordStoreException if there was a problem reading the password from the store, or the password was already in the store with that key - */ - void setPassword( String id, String newPassword ) - throws PasswordStoreException; - - /** - * Remove the given password from the store. - * @param id the key to lookup the password by - */ - void removePassword( String id ) - throws PasswordStoreException; - - /** - * Unlock the store to authorise further actions. - * @param masterPassword the master password required to unlock the store - */ - void unlock( String masterPassword ); - - /** - * Unlock the store to authorise further actions. If required, the master password will be prompted for. - */ - void unlock(); - - /** - * Lock the store to prevent further unauthorised actions. - */ - void lock(); -} diff --git a/plexus-sandbox/plexus-components/plexus-password-store/src/main/java/org/codehaus/plexus/components/password/PasswordStoreException.java b/plexus-sandbox/plexus-components/plexus-password-store/src/main/java/org/codehaus/plexus/components/password/PasswordStoreException.java deleted file mode 100755 index 1fc31493c..000000000 --- a/plexus-sandbox/plexus-components/plexus-password-store/src/main/java/org/codehaus/plexus/components/password/PasswordStoreException.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.codehaus.plexus.components.password; - -/* - * The MIT License - * - * Copyright (c) 2005, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * Exception that occurs during the handling of the password store. - * - * @author Brett Porter - * @version $Id$ - */ -public class PasswordStoreException extends Exception -{ - public PasswordStoreException( String message ) - { - super( message ); - } - - public PasswordStoreException( String message, Exception cause ) - { - super( message, cause ); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-password-store/src/test/java/org/codehaus/plexus/components/password/JksPasswordStoreTest.java b/plexus-sandbox/plexus-components/plexus-password-store/src/test/java/org/codehaus/plexus/components/password/JksPasswordStoreTest.java deleted file mode 100755 index a90b7dba7..000000000 --- a/plexus-sandbox/plexus-components/plexus-password-store/src/test/java/org/codehaus/plexus/components/password/JksPasswordStoreTest.java +++ /dev/null @@ -1,174 +0,0 @@ -package org.codehaus.plexus.components.password; - -/* - * The MIT License - * - * Copyright (c) 2005, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import junit.framework.TestCase; -import org.codehaus.plexus.util.FileUtils; - -import java.io.File; - -/** - * Test the JKS Password Store. - * - * @author Brett Porter - * @version $Id$ - */ -public class JksPasswordStoreTest - extends TestCase -{ - private String masterPassword = "foo"; - - private File keystoreFile; - - private static final String KNOWN_ID = "id"; - - private static final String KNOWN_PASSWORD = "newPassword"; - - private String basedir; - - public void setUp() - throws Exception - { - super.setUp(); - - basedir = System.getProperty( "basedir" ); - } - - public void testCreation() - throws Exception - { - createTestKeystore(); - - assertFalse( "Keystore should not yet be created", keystoreFile.exists() ); - - initPasswordStore(); - - assertTrue( "Keystore was not created", keystoreFile.exists() ); - } - - public void testGetPassword() - throws Exception - { - // TODO: use a resource URL instead - keystoreFile = new File( basedir, "target/test-classes/test.keystore" ); - - PasswordStore passwordStore = initPasswordStore(); - assertEquals( "Password was not found", KNOWN_PASSWORD, passwordStore.getPassword( KNOWN_ID ) ); - } - - public void testGetPasswordDoesNotExist() - throws Exception - { - // TODO: use a resource URL instead - keystoreFile = new File( basedir, "target/test-classes/test.keystore" ); - - PasswordStore passwordStore = initPasswordStore(); - assertNull( "Password should not be found", passwordStore.getPassword( "foo" ) ); - } - - public void testCheckPassword() - throws Exception - { - // TODO: use a resource URL instead - keystoreFile = new File( basedir, "target/test-classes/test.keystore" ); - - PasswordStore passwordStore = initPasswordStore(); - assertTrue( "Password check failed on good password", passwordStore.checkPassword( KNOWN_ID, KNOWN_PASSWORD ) ); - assertFalse( "Password check succeeded on bad password", passwordStore.checkPassword( KNOWN_ID, "foo" ) ); - assertFalse( "Password check succeeded on bad password ID", passwordStore.checkPassword( "foo", "bar" ) ); - } - - public void testSetPassword() - throws Exception - { - createTestKeystore(); - PasswordStore passwordStore = initPasswordStore(); - - String password = "setPassword"; - String id = "newId"; - passwordStore.setPassword( id, password ); - assertEquals( "Password was not set correctly", password, passwordStore.getPassword( id ) ); - } - - public void testChangePassword() - throws Exception - { - createTestKeystore(); - FileUtils.copyFile( new File( basedir, "target/test-classes/test.keystore" ), keystoreFile ); - - PasswordStore passwordStore = initPasswordStore(); - assertEquals( "Password was not set correctly", KNOWN_PASSWORD, passwordStore.getPassword( KNOWN_ID ) ); - passwordStore.setPassword( KNOWN_ID, KNOWN_PASSWORD, "foo" ); - assertEquals( "Password was not set correctly", "foo", passwordStore.getPassword( KNOWN_ID ) ); - } - - public void testReload() - throws Exception - { - createTestKeystore(); - FileUtils.copyFile( new File( basedir, "target/test-classes/test.keystore" ), keystoreFile ); - - PasswordStore originalPasswordStore = initPasswordStore(); - assertEquals( "Password was not set correctly", KNOWN_PASSWORD, originalPasswordStore.getPassword( KNOWN_ID ) ); - PasswordStore newPasswordStore = initPasswordStore(); - originalPasswordStore.setPassword( KNOWN_ID, KNOWN_PASSWORD, "foo" ); - assertEquals( "Password was not set correctly", "foo", originalPasswordStore.getPassword( KNOWN_ID ) ); - //TODO: check this as it was failing - //assertEquals( "Password was not set correctly", "foo", newPasswordStore.getPassword( KNOWN_ID ) ); - } - - public void testRemovePassword() - throws Exception - { - createTestKeystore(); - FileUtils.copyFile( new File( basedir, "target/test-classes/test.keystore" ), keystoreFile ); - - PasswordStore passwordStore = initPasswordStore(); - assertEquals( "Password was not set correctly", KNOWN_PASSWORD, passwordStore.getPassword( KNOWN_ID ) ); - passwordStore.removePassword( KNOWN_ID ); - assertNull( "Password was not removed", passwordStore.getPassword( KNOWN_ID ) ); - } - - // ------------------------------------------------------------ - // HELPERS - // ------------------------------------------------------------ - - private void createTestKeystore() - throws Exception - { - this.keystoreFile = File.createTempFile( "test", getClass().getName() ); - this.keystoreFile.delete(); // delete the one just created - this.keystoreFile.deleteOnExit(); // ensure it is deleted at the end - } - - private PasswordStore initPasswordStore() - throws Exception - { - JksPasswordStore passwordStore = new JksPasswordStore( keystoreFile, masterPassword ); - passwordStore.initialize(); - return passwordStore; - } - -} diff --git a/plexus-sandbox/plexus-components/plexus-password-store/src/test/resources/test.keystore b/plexus-sandbox/plexus-components/plexus-password-store/src/test/resources/test.keystore deleted file mode 100755 index 8e5126551..000000000 Binary files a/plexus-sandbox/plexus-components/plexus-password-store/src/test/resources/test.keystore and /dev/null differ diff --git a/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompter-api/pom.xml b/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompter-api/pom.xml deleted file mode 100644 index b6f0841af..000000000 --- a/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompter-api/pom.xml +++ /dev/null @@ -1,9 +0,0 @@ - - 4.0.0 - - org.codehaus.plexus - plexus-prompter - 1.0-alpha-1-SNAPSHOT - - plexus-prompter-api - diff --git a/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompter-api/src/main/java/org/codehaus/plexus/prompter/PromptException.java b/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompter-api/src/main/java/org/codehaus/plexus/prompter/PromptException.java deleted file mode 100644 index a792ccda5..000000000 --- a/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompter-api/src/main/java/org/codehaus/plexus/prompter/PromptException.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.codehaus.plexus.prompter; - -public class PromptException - extends Exception -{ - - public PromptException( String message, Throwable cause ) - { - super( message, cause ); - } - - public PromptException( String message ) - { - super( message ); - } - -} diff --git a/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompter-api/src/main/java/org/codehaus/plexus/prompter/Prompter.java b/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompter-api/src/main/java/org/codehaus/plexus/prompter/Prompter.java deleted file mode 100644 index f7f31d46d..000000000 --- a/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompter-api/src/main/java/org/codehaus/plexus/prompter/Prompter.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.codehaus.plexus.prompter; - -import java.util.List; - -public interface Prompter -{ - - String prompt( String message ) - throws PromptException; - - String prompt( String message, String defaultReply ) - throws PromptException; - - String prompt( String message, List possibleValues ) - throws PromptException; - - String prompt( String message, List possibleValues, String defaultReply ) - throws PromptException; - - char[] promptForPassword( String message ) - throws PromptException; - -} diff --git a/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompters/plexus-prompter-console/pom.xml b/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompters/plexus-prompter-console/pom.xml deleted file mode 100644 index 937522c0d..000000000 --- a/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompters/plexus-prompter-console/pom.xml +++ /dev/null @@ -1,17 +0,0 @@ - - 4.0.0 - - org.codehaus.plexus - plexus-prompters - 1.0-alpha-1-SNAPSHOT - - plexus-prompter-console - - - - org.codehaus.plexus - plexus-prompter-api - 1.0-alpha-1-SNAPSHOT - - - diff --git a/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompters/plexus-prompter-console/src/main/java/org/codehaus/plexus/prompter/console/ConsolePrompter.java b/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompters/plexus-prompter-console/src/main/java/org/codehaus/plexus/prompter/console/ConsolePrompter.java deleted file mode 100644 index 7daf0ac65..000000000 --- a/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompters/plexus-prompter-console/src/main/java/org/codehaus/plexus/prompter/console/ConsolePrompter.java +++ /dev/null @@ -1,235 +0,0 @@ -package org.codehaus.plexus.prompter.console; - -import org.codehaus.plexus.prompter.PromptException; -import org.codehaus.plexus.prompter.Prompter; -import org.codehaus.plexus.util.StringUtils; - -import java.io.IOException; -import java.util.Iterator; -import java.util.List; - -import jline.ConsoleReader; -import jline.SimpleCompletor; - -public class ConsolePrompter - implements Prompter -{ - - /** - * @requirement - */ - private ConsoleWriter consoleWriter; - - public String prompt( String message ) - throws PromptException - { - ConsoleReader consoleReader = createConsoleReader( null ); - - writePrompt( message ); - - try - { - return consoleReader.readLine(); - } - catch ( IOException e ) - { - throw new PromptException( "Failed to read user response", e ); - } - } - - public String prompt( String message, String defaultReply ) - throws PromptException - { - ConsoleReader consoleReader = createConsoleReader( new String[] { defaultReply } ); - - writePrompt( formatMessage( message, null, defaultReply ) ); - - try - { - String line = consoleReader.readLine(); - - if ( StringUtils.isEmpty( line ) ) - { - line = defaultReply; - } - - return line; - } - catch ( IOException e ) - { - throw new PromptException( "Failed to read user response", e ); - } - } - - public String prompt( String message, List possibleValues ) - throws PromptException - { - String[] completions = null; - - if ( !possibleValues.isEmpty() ) - { - completions = (String[]) possibleValues.toArray( new String[possibleValues.size()] ); - } - - ConsoleReader consoleReader = createConsoleReader( completions ); - - String formattedMessage = formatMessage( message, possibleValues, null ); - - try - { - String line = null; - - do - { - writePrompt( formattedMessage ); - - line = consoleReader.readLine(); - - if ( StringUtils.isEmpty( line ) ) - { - line = null; - } - - if ( line != null && !possibleValues.contains( line ) ) - { - consoleWriter.writeLine( "Invalid selection." ); - } - } - while ( line == null || !possibleValues.contains( line ) ); - - return line; - } - catch ( IOException e ) - { - throw new PromptException( "Failed to read user response", e ); - } - } - - public String prompt( String message, List possibleValues, String defaultReply ) - throws PromptException - { - String[] completions = null; - - if ( !possibleValues.isEmpty() ) - { - completions = (String[]) possibleValues.toArray( new String[possibleValues.size()] ); - } - - ConsoleReader consoleReader = createConsoleReader( completions ); - - String formattedMessage = formatMessage( message, possibleValues, defaultReply ); - - try - { - String line = null; - - do - { - writePrompt( formattedMessage ); - - line = consoleReader.readLine(); - - if ( StringUtils.isEmpty( line ) ) - { - line = defaultReply; - } - - if ( !possibleValues.contains( line ) ) - { - consoleWriter.writeLine( "Invalid selection." ); - } - } - while ( !possibleValues.contains( line ) ); - - return line; - } - catch ( IOException e ) - { - throw new PromptException( "Failed to read user response", e ); - } - } - - public char[] promptForPassword( String message ) - throws PromptException - { - ConsoleReader consoleReader = createConsoleReader( null ); - - writePrompt( message ); - - try - { - return consoleReader.readLine( new Character( '*' ) ).toCharArray(); - } - catch ( IOException e ) - { - throw new PromptException( "Failed to read user response", e ); - } - } - - private String formatMessage( String message, List possibleValues, String defaultReply ) - { - StringBuffer formatted = new StringBuffer( message.length() * 2 ); - - formatted.append( message ); - - if ( possibleValues != null && !possibleValues.isEmpty() ) - { - formatted.append( " (" ); - - for ( Iterator it = possibleValues.iterator(); it.hasNext(); ) - { - String possibleValue = (String) it.next(); - - formatted.append( possibleValue ); - - if ( it.hasNext() ) - { - formatted.append( '/' ); - } - } - - formatted.append( ')' ); - } - - if ( defaultReply != null ) - { - formatted.append( ' ' ).append( defaultReply ).append( ' ' ); - } - - return formatted.toString(); - } - - private ConsoleReader createConsoleReader( String[] completionCandidates ) - throws PromptException - { - try - { - ConsoleReader consoleReader = new ConsoleReader(); - - if ( completionCandidates != null && completionCandidates.length > 0 ) - { - consoleReader.addCompletor( new SimpleCompletor( completionCandidates ) ); - } - } - catch ( IOException e ) - { - throw new PromptException( "Failed to initialize console reader", e ); - } - - return null; - } - - private void writePrompt( String message ) - throws PromptException - { - try - { - consoleWriter.write( message ); - } - catch ( IOException e ) - { - throw new PromptException( "Failed to write user prompt", e ); - } - } - -} diff --git a/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompters/plexus-prompter-console/src/main/java/org/codehaus/plexus/prompter/console/ConsoleWriter.java b/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompters/plexus-prompter-console/src/main/java/org/codehaus/plexus/prompter/console/ConsoleWriter.java deleted file mode 100644 index e50de2cb6..000000000 --- a/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompters/plexus-prompter-console/src/main/java/org/codehaus/plexus/prompter/console/ConsoleWriter.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.codehaus.plexus.prompter.console; - -import java.io.IOException; - -public interface ConsoleWriter -{ - - String ROLE = ConsoleWriter.class.getName(); - - void write( String message ) throws IOException; - - void writeLine( String message ) throws IOException; - -} diff --git a/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompters/plexus-prompter-console/src/main/java/org/codehaus/plexus/prompter/console/LoggerConsoleWriter.java b/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompters/plexus-prompter-console/src/main/java/org/codehaus/plexus/prompter/console/LoggerConsoleWriter.java deleted file mode 100644 index 6e6ee48ec..000000000 --- a/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompters/plexus-prompter-console/src/main/java/org/codehaus/plexus/prompter/console/LoggerConsoleWriter.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.codehaus.plexus.prompter.console; - -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.logging.Logger; - -public class LoggerConsoleWriter - extends AbstractLogEnabled - implements ConsoleWriter -{ - - private int logLevel = Logger.LEVEL_INFO; - - public void write( String message ) - { - writeViaLogger( message ); - } - - public void writeLine( String message ) - { - writeViaLogger( message + "\n" ); - } - - private void writeViaLogger( String message ) - { - switch ( logLevel ) - { - case Logger.LEVEL_INFO: - getLogger().info( message ); - break; - - case Logger.LEVEL_DEBUG: - getLogger().debug( message ); - break; - - case Logger.LEVEL_ERROR: - getLogger().error( message ); - break; - - case Logger.LEVEL_FATAL: - getLogger().fatalError( message ); - break; - - case Logger.LEVEL_WARN: - getLogger().warn( message ); - break; - - default: - getLogger().info( message ); - break; - } - } - -} diff --git a/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompters/plexus-prompter-console/src/main/java/org/codehaus/plexus/prompter/console/SystemOutConsoleWriter.java b/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompters/plexus-prompter-console/src/main/java/org/codehaus/plexus/prompter/console/SystemOutConsoleWriter.java deleted file mode 100644 index 68466c50c..000000000 --- a/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompters/plexus-prompter-console/src/main/java/org/codehaus/plexus/prompter/console/SystemOutConsoleWriter.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.codehaus.plexus.prompter.console; - -public class SystemOutConsoleWriter - implements ConsoleWriter -{ - - public void write( String message ) - { - System.out.print( message ); - } - - public void writeLine( String message ) - { - System.out.println( message ); - } - -} diff --git a/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompters/pom.xml b/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompters/pom.xml deleted file mode 100644 index 483bbc286..000000000 --- a/plexus-sandbox/plexus-components/plexus-prompter/plexus-prompters/pom.xml +++ /dev/null @@ -1,14 +0,0 @@ - - 4.0.0 - - org.codehaus.plexus - plexus-prompter - 1.0-alpha-1-SNAPSHOT - - plexus-prompters - pom - - - plexus-prompter-console - - diff --git a/plexus-sandbox/plexus-components/plexus-prompter/pom.xml b/plexus-sandbox/plexus-components/plexus-prompter/pom.xml deleted file mode 100644 index 8edd1ae2d..000000000 --- a/plexus-sandbox/plexus-components/plexus-prompter/pom.xml +++ /dev/null @@ -1,16 +0,0 @@ - - 4.0.0 - - org.codehaus.plexus - plexus-components - 1.1.5 - - plexus-prompter - 1.0-alpha-1-SNAPSHOT - pom - - - plexus-prompter-api - plexus-prompters - - diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/pom.xml b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/pom.xml deleted file mode 100644 index dc28cb85f..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - org.codehaus.plexus - plexus-spe - 1.0-SNAPSHOT - - 4.0.0 - plexus-spe-core - Plexus Simple Process Engine Core - 1.0-SNAPSHOT - - - org.codehaus.plexus - plexus-spe-model - ${project.version} - - - org.codehaus.plexus - plexus-container-default - - - ant - ant - - - org.codehaus.plexus - plexus-jdo2 - - - org.codehaus.plexus - plexus-action - - - hsqldb - hsqldb - test - - - diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/DefaultProcessService.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/DefaultProcessService.java deleted file mode 100644 index 9c191e09a..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/DefaultProcessService.java +++ /dev/null @@ -1,266 +0,0 @@ -package org.codehaus.plexus.spe; - -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.StoppingException; -import org.codehaus.plexus.spe.core.ProcessEventManager; -import org.codehaus.plexus.spe.execution.ProcessExecutor; -import org.codehaus.plexus.spe.model.ProcessDescriptor; -import org.codehaus.plexus.spe.model.ProcessInstance; -import org.codehaus.plexus.spe.model.StepDescriptor; -import org.codehaus.plexus.spe.model.io.xpp3.ProcessDescriptorXpp3Reader; -import org.codehaus.plexus.spe.store.ProcessInstanceStore; -import org.codehaus.plexus.util.StringUtils; -import org.codehaus.plexus.util.xml.Xpp3Dom; -import org.codehaus.plexus.util.xml.pull.XmlPullParserException; - -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.Serializable; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class DefaultProcessService - extends AbstractLogEnabled - implements ProcessService, Initializable, Startable -{ - /** - * @plexus.requirement - */ - private ProcessInstanceStore store; - - /** - * @plexus.requirement - */ - private ProcessExecutor executor; - - /** - * @plexus.requirement - */ - private ProcessEventManager eventManager; - - private Map processes = new HashMap( ); - - // ---------------------------------------------------------------------- - // ProcessService Implementation - // ---------------------------------------------------------------------- - - // ---------------------------------------------------------------------- - // System Control - // ---------------------------------------------------------------------- - - public ProcessDescriptor loadProcess( URL url ) - throws ProcessException - { - ProcessDescriptor process = loadAndValidate( url ); - - processes.put( process.getId(), process ); - - getLogger().info( "Loaded process " + process.getId() + " from " + url.toExternalForm() ); - - return process; - } - - public Collection loadProcessDirectory( File directory ) - throws ProcessException - { - if ( ! directory.isDirectory() ) - { - throw new ProcessException( "The specified file is not a directory: '" + directory.getAbsolutePath() + "'." ); - } - - File[] files = directory.listFiles(); - - Map descriptors = new HashMap(); - - for ( File file : files ) - { - if ( !file.isFile() ) - { - continue; - } - - try - { - URL url = file.toURL(); - - ProcessDescriptor descriptor = loadAndValidate( url ); - - descriptors.put( descriptor.getId(), descriptor ); - - getLogger().info( "Loaded process " + descriptor.getId() + " from " + url.toExternalForm() ); - } - catch ( MalformedURLException e ) - { - throw new ProcessException( "Error while reading process descriptor from '" + file.getAbsolutePath() + "'.", e ); - } - } - - processes.putAll( descriptors ); - - return descriptors.values(); - } - - public void addProcessListener( ProcessListener processListener ) - { - eventManager.addProcessListener( processListener ); - } - - public void removeProcessListener( ProcessListener processListener ) - { - eventManager.removeProcessListener( processListener ); - } - - // ---------------------------------------------------------------------- - // Process Control - // ---------------------------------------------------------------------- - - public int executeProcess( String processId, Map context ) - throws ProcessException - { - ProcessDescriptor process = processes.get( processId ); - - if ( process == null ) - { - throw new ProcessException( "No such process: " + processId ); - } - - ProcessInstance processState = store.createInstance( process, context ); - - executor.startProcess( process, processState ); - - return processState.getInstanceId(); - } - - /** - * Returns true if this process has stopped, either because it completed successfully or because it failed - * and cannot be started again. - */ - public boolean hasCompleted( int instanceId ) - throws ProcessException - { - ProcessInstance instance = store.getInstance( instanceId, false ); - - return instance.getEndTime() > 0 || StringUtils.isNotEmpty( instance.getErrorMessage() ); - } - - public ProcessInstance getProcessInstance( int instanceId ) - throws ProcessException - { - return store.getInstance( instanceId, true ); - } - - // ---------------------------------------------------------------------- - // Component Lifecycle - // ---------------------------------------------------------------------- - - public void initialize() - throws InitializationException - { - } - - public void start() - throws StartingException - { - try - { - Collection processInstances = store.getActiveInstances(); - - getLogger().info( "Active processes:" ); - - for ( ProcessInstance instance : processInstances ) - { - getLogger().info( " Instance: " + instance.getInstanceId() + " of process: " + instance.getProcessId() ); - } - } - catch ( ProcessException e ) - { - throw new StartingException( "Error while loading processes.", e ); - } - - } - - public void stop() - throws StoppingException - { - } - - // ---------------------------------------------------------------------- - // Private - // ---------------------------------------------------------------------- - - private void validateProcess( ProcessDescriptor process ) - throws ProcessException - { - String id = process.getId(); - - if ( StringUtils.isEmpty( id ) ) - { - throw new ProcessException( "Invalid process descriptor: Missing id." ); - } - - String defaultExecutorId = process.getDefaultExecutorId(); - - int i = 0; - - for ( StepDescriptor stepDescriptor : (List) process.getSteps() ) - { - if ( StringUtils.isEmpty( stepDescriptor.getExecutorId() ) ) - { - stepDescriptor.setExecutorId( defaultExecutorId ); - - if ( StringUtils.isEmpty( stepDescriptor.getExecutorId() ) ) - { - throw new ProcessException( "Invalid process descriptor: Step #" + i + " is missing 'executor id'." ); - } - } - - if ( stepDescriptor.getExecutorConfiguration() == null ) - { - stepDescriptor.setExecutorConfiguration( new Xpp3Dom( "executorConfiguration" ) ); - } - - if ( stepDescriptor.getConfiguration() == null ) - { - stepDescriptor.setConfiguration( new Xpp3Dom( "configuration" ) ); - } - - i++; - } - } - - private ProcessDescriptor loadAndValidate( URL url ) - throws ProcessException - { - ProcessDescriptorXpp3Reader reader = new ProcessDescriptorXpp3Reader(); - - try - { - ProcessDescriptor processDescriptor = reader.read( new InputStreamReader( url.openStream() ) ); - - validateProcess( processDescriptor ); - - return processDescriptor; - } - catch ( IOException e ) - { - throw new ProcessException( "Error while reading process descriptor from '" + url.toExternalForm() + "'.", e ); - } - catch ( XmlPullParserException e ) - { - throw new ProcessException( "Error while reading process descriptor from '" + url.toExternalForm() + "'.", e ); - } - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/ProcessEvent.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/ProcessEvent.java deleted file mode 100644 index d704a4785..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/ProcessEvent.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.codehaus.plexus.spe; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public interface ProcessEvent -{ -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/ProcessException.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/ProcessException.java deleted file mode 100644 index 9afaa3415..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/ProcessException.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.codehaus.plexus.spe; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class ProcessException - extends Exception -{ - public ProcessException( String message ) - { - super( message ); - } - - public ProcessException( String message, Throwable cause ) - { - super( message, cause ); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/ProcessListener.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/ProcessListener.java deleted file mode 100644 index f1eee065d..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/ProcessListener.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.codehaus.plexus.spe; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public interface ProcessListener -{ - void onProcessEvent( ProcessEvent event ); -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/ProcessService.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/ProcessService.java deleted file mode 100644 index ef9cea83a..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/ProcessService.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.codehaus.plexus.spe; - -import org.codehaus.plexus.spe.model.ProcessDescriptor; -import org.codehaus.plexus.spe.model.ProcessInstance; - -import java.io.File; -import java.io.Serializable; -import java.net.URL; -import java.util.Collection; -import java.util.Map; - -/** - * Facade service for the entire process system. - * - * @author Trygve Laugstøl - * @version $Id$ - */ -public interface ProcessService -{ - String ROLE = ProcessService.class.getName(); - - // ---------------------------------------------------------------------- - // System Control - // ---------------------------------------------------------------------- - - ProcessDescriptor loadProcess( URL url ) - throws ProcessException; - - Collection loadProcessDirectory( File directory ) - throws ProcessException; - - void addProcessListener( ProcessListener processListener ); - - void removeProcessListener( ProcessListener processListener ); - - // ---------------------------------------------------------------------- - // Process - // ---------------------------------------------------------------------- - - int executeProcess( String processId, Map context ) - throws ProcessException; - - boolean hasCompleted( int processId ) - throws ProcessException; - - ProcessInstance getProcessInstance( int instanceId ) - throws ProcessException; -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/SystemOutProcessListener.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/SystemOutProcessListener.java deleted file mode 100644 index 5d331ae65..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/SystemOutProcessListener.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.codehaus.plexus.spe; - -import org.codehaus.plexus.spe.event.StartingProcessEvent; -import org.codehaus.plexus.spe.event.StartingStepEvent; -import org.codehaus.plexus.spe.event.StepCompletedEvent; -import org.codehaus.plexus.spe.utils.DurationFormatUtils; -import org.codehaus.plexus.util.StringUtils; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class SystemOutProcessListener - implements ProcessListener -{ - public void onProcessEvent( ProcessEvent event ) - { - if ( event instanceof StartingProcessEvent ) - { - onStartingProcessEvent( (StartingProcessEvent) event ); - } - else if ( event instanceof StartingStepEvent ) - { - onStartingStepEvent( (StartingStepEvent) event ); - } - else if ( event instanceof StepCompletedEvent ) - { - onStepCompletedEvent( (StepCompletedEvent) event ); - } - } - - private void onStartingProcessEvent( StartingProcessEvent event ) - { - System.out.println( "Starting process " + event.getProcessId() + "." ); - } - - private void onStartingStepEvent( StartingStepEvent event ) - { - System.out.println( "Starting step #" + event.getStepNumber() + " in process " + event.getProcessId() + ", instance: " + event.getProcessInstanceId() + "." ); - } - - private void onStepCompletedEvent( StepCompletedEvent event ) - { - long interval = event.getStepInstance().getEndTime() - event.getProcessInstance().getCreatedTime(); - String duration = DurationFormatUtils.formatDuration( interval, "H:mm:ss.SSS", false ); - - if ( event.getThrowable() == null ) - { - System.out.println( "Step completed successully. Time elapsed so far: " + duration ); - } - else - { - event.getThrowable().printStackTrace( System.out ); - - System.out.println( "Step failed. Time elapsed so far: " + duration ); - } - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/action/AntRunAction.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/action/AntRunAction.java deleted file mode 100644 index a352dd130..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/action/AntRunAction.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.codehaus.plexus.spe.action; - -import org.apache.tools.ant.DefaultLogger; -import org.apache.tools.ant.Project; -import org.apache.tools.ant.Target; -import org.codehaus.plexus.action.AbstractAction; - -import java.util.Map; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class AntRunAction - extends AbstractAction -{ - private Target target; - - public void execute( Map context ) - throws Exception - { - Project antProject = target.getProject(); - - DefaultLogger antLogger = new DefaultLogger(); - antLogger.setOutputPrintStream( System.out ); - antLogger.setErrorPrintStream( System.err ); - antLogger.setMessageOutputLevel( getLogger().isDebugEnabled() ? Project.MSG_DEBUG : Project.MSG_INFO ); - antLogger.setMessageOutputLevel( Project.MSG_DEBUG); - - antProject.addBuildListener( antLogger ); - //TODO: antProject.setBaseDir( ); - - if ( getLogger().isInfoEnabled() ) - { - getLogger().info( "Executing tasks" ); - } - - target.execute(); - - if ( getLogger().isInfoEnabled() ) - { - getLogger().info( "Executed tasks" ); - } - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/action/AntTargetConverter.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/action/AntTargetConverter.java deleted file mode 100644 index b075db078..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/action/AntTargetConverter.java +++ /dev/null @@ -1,150 +0,0 @@ -package org.codehaus.plexus.spe.action; - -import org.apache.tools.ant.ComponentHelper; -import org.apache.tools.ant.Project; -import org.apache.tools.ant.ProjectHelper; -import org.apache.tools.ant.RuntimeConfigurable; -import org.apache.tools.ant.Target; -import org.apache.tools.ant.UnknownElement; -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.ConfigurationListener; -import org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter; -import org.codehaus.plexus.component.configurator.converters.ConfigurationConverter; -import org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.PlexusConfigurationException; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class AntTargetConverter - extends AbstractConfigurationConverter -{ - public static final String MAVEN_EXPRESSION_EVALUATOR_ID = "maven.expressionEvaluator"; - - public final String ROLE = ConfigurationConverter.class.getName(); - - public boolean canConvert( Class type ) - { - return Target.class.isAssignableFrom( type ); - } - - public Object fromConfiguration( ConverterLookup converterLookup, PlexusConfiguration configuration, Class type, - Class baseType, ClassLoader classLoader, - ExpressionEvaluator expressionEvaluator, ConfigurationListener listener ) - throws ComponentConfigurationException - { - Object retValue = fromExpression( configuration, expressionEvaluator, type ); - if ( retValue != null ) - { - return retValue; - } - - Class implementation = getClassForImplementationHint( type, configuration, classLoader ); - - retValue = instantiateObject( implementation ); - - processConfiguration( (Target) retValue, configuration, expressionEvaluator ); - - return retValue; - } - - - private void processConfiguration( Target target, PlexusConfiguration configuration, - ExpressionEvaluator expressionEvaluator ) - throws ComponentConfigurationException - { - Project project = new Project(); - project.setName( "DummyProject" ); - - target.setName( "" ); - target.setProject( project ); - project.addTarget( target ); - - project.addReference( MAVEN_EXPRESSION_EVALUATOR_ID, expressionEvaluator ); - - initDefinitions( project, target ); - - processConfiguration( null, project, target, configuration ); - - project.init(); - } - - private void processConfiguration( RuntimeConfigurable parentWrapper, Project project, Target target, - PlexusConfiguration configuration ) - throws ComponentConfigurationException - { - int items = configuration.getChildCount(); - - Object parent = parentWrapper == null ? null : parentWrapper.getProxy(); - - for ( int i = 0; i < items; i++ ) - { - PlexusConfiguration childConfiguration = configuration.getChild( i ); - UnknownElement task = new UnknownElement( childConfiguration.getName() ); - task.setProject( project ); - task.setNamespace( "" ); - task.setQName( childConfiguration.getName() ); - task.setTaskType( ProjectHelper.genComponentName( task.getNamespace(), childConfiguration.getName() ) ); - task.setTaskName( childConfiguration.getName() ); - task.setOwningTarget( target ); - task.init(); - - if ( parent != null ) - { - ( (UnknownElement) parent ).addChild( task ); - } - else - { - target.addTask( task ); - } - - RuntimeConfigurable wrapper = new RuntimeConfigurable( task, task.getTaskName() ); - - try - { - if ( childConfiguration.getValue() != null ) - { - wrapper.addText( childConfiguration.getValue() ); - } - } - catch ( PlexusConfigurationException e ) - { - throw new ComponentConfigurationException( - "Error reading text value from element '" + childConfiguration.getName() + "'", e ); - } - - String [] attrNames = childConfiguration.getAttributeNames(); - - for ( String attrName : attrNames ) - { - try - { - String v = childConfiguration.getAttribute( attrName ); - wrapper.setAttribute( attrName, v ); - } - catch ( PlexusConfigurationException e ) - { - throw new ComponentConfigurationException( - "Error getting attribute '" + attrName + "' of tag '" + childConfiguration.getName() + "'", e ); - } - } - - if ( parentWrapper != null ) - { - parentWrapper.addChild( wrapper ); - } - - processConfiguration( wrapper, project, target, childConfiguration ); - } - } - - protected void initDefinitions( Project project, Target unused ) - { - ComponentHelper componentHelper = ComponentHelper.getComponentHelper( project ); - - componentHelper.initDefaultDefinitions(); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/action/EchoAction.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/action/EchoAction.java deleted file mode 100644 index 47c49c7a7..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/action/EchoAction.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.plexus.spe.action; - -import org.codehaus.plexus.action.AbstractAction; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class EchoAction - extends AbstractAction -{ - private String message; - - public static List messages = new ArrayList(); - - public static String lastMessage; - - public void execute( Map context ) - throws Exception - { - String m = this.message; - - if ( m == null ) - { - m = (String) context.get( "message" ); - } - - getLogger().info( "Message:" + m ); - lastMessage = m; - messages.add( m ); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/action/HauskeeperAction.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/action/HauskeeperAction.java deleted file mode 100644 index 4cf04cbdc..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/action/HauskeeperAction.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.codehaus.hauskeeper.action; - -import java.io.Serializable; -import java.util.Map; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public interface HauskeeperAction -{ - String ROLE = HauskeeperAction.class.getName(); - - void execute( Map context ) - throws Exception; -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/action/SetContextAction.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/action/SetContextAction.java deleted file mode 100644 index 84442a9db..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/action/SetContextAction.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.codehaus.plexus.spe.action; - -import org.codehaus.plexus.action.AbstractAction; - -import java.util.Map; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class SetContextAction - extends AbstractAction -{ - private String contextKey; - - private String contextValue; - - public void execute( Map context ) - throws Exception - { - context.put( contextKey, contextValue ); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/action/ThrowExceptionAction.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/action/ThrowExceptionAction.java deleted file mode 100644 index 0bb1afe8d..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/action/ThrowExceptionAction.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.codehaus.plexus.spe.action; - -import org.codehaus.plexus.action.AbstractAction; - -import java.util.Map; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class ThrowExceptionAction - extends AbstractAction -{ - private String message; - - private boolean runtime; - - public void execute( Map context ) - throws Exception - { - String m = this.message; - - if ( m == null ) - { - m = (String) context.get( "message" ); - } - - if ( runtime ) - { - throw new RuntimeException( m ); - } - else - { - throw new Exception( m ); - } - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/core/DefaultProcessEventManager.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/core/DefaultProcessEventManager.java deleted file mode 100644 index b7584d550..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/core/DefaultProcessEventManager.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.codehaus.plexus.spe.core; - -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.spe.ProcessEvent; -import org.codehaus.plexus.spe.ProcessListener; - -import java.util.HashSet; -import java.util.Set; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class DefaultProcessEventManager - extends AbstractLogEnabled - implements ProcessEventManager -{ - private final Set listeners = new HashSet(); - - // ---------------------------------------------------------------------- - // ProcessEventManager Implementation - // ---------------------------------------------------------------------- - - public void addProcessListener( ProcessListener processListener ) - { - synchronized( listeners ) - { - listeners.add( processListener ); - } - } - - public void removeProcessListener( ProcessListener processListener ) - { - synchronized( listeners ) - { - listeners.remove( processListener ); - } - } - - public void sendEvent( ProcessEvent event ) - { - synchronized( listeners ) - { - for ( ProcessListener listener : listeners ) - { - listener.onProcessEvent( event ); - } - } - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/core/ProcessEventManager.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/core/ProcessEventManager.java deleted file mode 100644 index 7120e8c0b..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/core/ProcessEventManager.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.codehaus.plexus.spe.core; - -import org.codehaus.plexus.spe.ProcessListener; -import org.codehaus.plexus.spe.ProcessEvent; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public interface ProcessEventManager -{ - String ROLE = ProcessEventManager.class.getName(); - - void addProcessListener( ProcessListener processListener ); - - void removeProcessListener( ProcessListener processListener ); - - void sendEvent( ProcessEvent event ); -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/event/StartingProcessEvent.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/event/StartingProcessEvent.java deleted file mode 100644 index 470569d45..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/event/StartingProcessEvent.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.codehaus.plexus.spe.event; - -import org.codehaus.plexus.spe.ProcessEvent; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class StartingProcessEvent - implements ProcessEvent -{ - private String processId; - - public String getProcessId() - { - return processId; - } - - public void setProcessId( String processId ) - { - this.processId = processId; - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/event/StartingStepEvent.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/event/StartingStepEvent.java deleted file mode 100644 index 0c464bed6..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/event/StartingStepEvent.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.codehaus.plexus.spe.event; - -import org.codehaus.plexus.spe.ProcessEvent; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class StartingStepEvent - implements ProcessEvent -{ - private String processId; - - private int processInstanceId; - - private int stepNumber; - - public String getProcessId() - { - return processId; - } - - public void setProcessId( String processId ) - { - this.processId = processId; - } - - public int getProcessInstanceId() - { - return processInstanceId; - } - - public void setProcessInstanceId( int processInstanceId ) - { - this.processInstanceId = processInstanceId; - } - - public int getStepNumber() - { - return stepNumber; - } - - public void setStepNumber( int stepNumber ) - { - this.stepNumber = stepNumber; - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/event/StepCompletedEvent.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/event/StepCompletedEvent.java deleted file mode 100644 index 470ab2bd7..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/event/StepCompletedEvent.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.codehaus.plexus.spe.event; - -import org.codehaus.plexus.spe.ProcessEvent; -import org.codehaus.plexus.spe.model.ProcessInstance; -import org.codehaus.plexus.spe.model.StepInstance; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class StepCompletedEvent - implements ProcessEvent -{ - private ProcessInstance processInstance; - - private StepInstance stepInstance; - - private Throwable throwable; - - public ProcessInstance getProcessInstance() - { - return processInstance; - } - - public void setProcessInstance( ProcessInstance processInstance ) - { - this.processInstance = processInstance; - } - - public StepInstance getStepInstance() - { - return stepInstance; - } - - public void setStepInstance( StepInstance stepInstance ) - { - this.stepInstance = stepInstance; - } - - public Throwable getThrowable() - { - return throwable; - } - - public void setThrowable( Throwable throwable ) - { - this.throwable = throwable; - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/execution/DefaultProcessExecutor.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/execution/DefaultProcessExecutor.java deleted file mode 100644 index 3eb96ddf9..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/execution/DefaultProcessExecutor.java +++ /dev/null @@ -1,325 +0,0 @@ -package org.codehaus.plexus.spe.execution; - -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.ServiceLocator; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Serviceable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.StoppingException; -import org.codehaus.plexus.spe.ProcessException; -import org.codehaus.plexus.spe.core.ProcessEventManager; -import org.codehaus.plexus.spe.event.StartingProcessEvent; -import org.codehaus.plexus.spe.event.StartingStepEvent; -import org.codehaus.plexus.spe.event.StepCompletedEvent; -import org.codehaus.plexus.spe.model.ProcessDescriptor; -import org.codehaus.plexus.spe.model.ProcessInstance; -import org.codehaus.plexus.spe.model.StepDescriptor; -import org.codehaus.plexus.spe.model.StepInstance; -import org.codehaus.plexus.spe.store.ProcessInstanceStore; -import org.codehaus.plexus.util.ExceptionUtils; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class DefaultProcessExecutor - extends AbstractLogEnabled - implements ProcessExecutor, Initializable, Startable, Serviceable -{ - /** - * @plexus.requirement - */ - private ProcessInstanceStore store; - - /** - * @plexus.requirement - */ - private ProcessEventManager eventManager; - - /** - * @plexus.requirement - */ - private Map stepExecutors; - - private ServiceLocator serviceLocator; - - private ExecutorService executorService; - - private Map runningProcesses = new HashMap(); - - // ---------------------------------------------------------------------- - // ProcessExecutor Implementation - // ---------------------------------------------------------------------- - - public void startProcess( ProcessDescriptor process, ProcessInstance instance ) - throws ProcessException - { - StartingProcessEvent event = new StartingProcessEvent(); - event.setProcessId( process.getId() ); - eventManager.sendEvent( event ); - - // ---------------------------------------------------------------------- - // Look up all the required actions and put them in the runtime process. - // Stores the first action and adds that to the executor queue. - // ---------------------------------------------------------------------- - - ProcessRuntimeDescriptor runtimeDescriptor = new ProcessRuntimeDescriptor( process, instance.getInstanceId() ); - - runtimeDescriptor.setCurrentStep( 0 ); - - // ---------------------------------------------------------------------- - // Schedule the first action - // ---------------------------------------------------------------------- - - scheduleStep( runtimeDescriptor ); - } - - // ---------------------------------------------------------------------- - // Component Lifecycle - // ---------------------------------------------------------------------- - - public void initialize() - throws InitializationException - { - executorService = new ProcessThreadPoolExecutor(); - } - - public void start() - throws StartingException - { - } - - public void stop() - throws StoppingException - { - executorService.shutdownNow(); - } - - public void service( ServiceLocator serviceLocator ) - { - this.serviceLocator = serviceLocator; - } - - // ---------------------------------------------------------------------- - // Process lifecycle - // ---------------------------------------------------------------------- - - private void onStepStart( StepExecutorRunner stepExecutorRunner, ProcessRuntimeDescriptor runtimeDescriptor ) - { - StartingStepEvent event = new StartingStepEvent(); - event.setProcessId( runtimeDescriptor.getProcessDescriptor().getId() ); - event.setProcessInstanceId( runtimeDescriptor.getInstanceId() ); - event.setStepNumber( runtimeDescriptor.getCurrentStep() ); - eventManager.sendEvent( event ); - - try - { - // ---------------------------------------------------------------------- - // Create and record the new step in the process - // ---------------------------------------------------------------------- - - ProcessInstance processInstance = store.getInstance( runtimeDescriptor.getInstanceId(), true ); - StepInstance step = (StepInstance) processInstance.getSteps().get( runtimeDescriptor.getCurrentStep() ); - step.setStartTime( System.currentTimeMillis() ); - store.saveInstance( processInstance ); - - processInstance = store.getInstance( runtimeDescriptor.getInstanceId(), true ); - stepExecutorRunner.setContext( processInstance.getContext() ); - } - catch ( ProcessException e ) - { - throw new RuntimeException( "Abort", e ); - } - } - - private void onStepCompletion( StepExecutorRunner stepExecutorRunner, - ProcessRuntimeDescriptor runtimeDescriptor ) - throws ProcessException - { - long timestamp = System.currentTimeMillis(); - - Throwable throwable = stepExecutorRunner.getThrowable(); - - // ---------------------------------------------------------------------- - // Load the process - // ---------------------------------------------------------------------- - - ProcessInstance processInstance = store.getInstance( runtimeDescriptor.getInstanceId(), true ); - - // ---------------------------------------------------------------------- - // Update the step and context - // ---------------------------------------------------------------------- - - List steps = processInstance.getSteps(); - StepInstance step = (StepInstance) steps.get( steps.size() - 1 ); - step.setEndTime( timestamp ); - - processInstance.setContext( stepExecutorRunner.getContext() ); - - StepCompletedEvent event = new StepCompletedEvent(); - event.setProcessInstance( processInstance ); - event.setStepInstance( step ); - - // ---------------------------------------------------------------------- - // Check if the step failed. If so stop the processing for now and let - // the system handle the restart of the process at a later point in time. - // ---------------------------------------------------------------------- - - if ( throwable != null ) - { - String stackTrace = ExceptionUtils.getFullStackTrace( throwable ); - if ( stackTrace.length() > 8000 ) - { - stackTrace = stackTrace.substring( 0, 8000 ); - } - processInstance.setErrorMessage( stackTrace ); - - store.saveInstance( processInstance ); - - event.setThrowable( throwable ); - eventManager.sendEvent( event ); - - return; - } - - // ---------------------------------------------------------------------- - // Check if this is the last step in the process - // ---------------------------------------------------------------------- - - if ( runtimeDescriptor.getProcessDescriptor().getSteps().size() == runtimeDescriptor.getCurrentStep() + 1 ) - { - processInstance.setCompleted( true ); - processInstance.setEndTime( timestamp ); - - store.saveInstance( processInstance ); - - eventManager.sendEvent( event ); - - // TODO: Send process completed event - - return; - } - - // ---------------------------------------------------------------------- - // Schedule the next step - // ---------------------------------------------------------------------- - - runtimeDescriptor.setCurrentStep( runtimeDescriptor.getCurrentStep() + 1 ); - - StepInstance nextStep = (StepInstance) processInstance.getSteps().get( runtimeDescriptor.getCurrentStep() ); - nextStep.setStartTime( timestamp ); - - store.saveInstance( processInstance ); - - eventManager.sendEvent( event ); - - scheduleStep( runtimeDescriptor ); - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - private void scheduleStep( ProcessRuntimeDescriptor runtimeDescriptor ) - throws ProcessException - { - int currentStep = runtimeDescriptor.getCurrentStep(); - - StepDescriptor stepDescriptor = (StepDescriptor) runtimeDescriptor.getProcessDescriptor().getSteps().get( currentStep ); - - StepExecutor stepExecutor = (StepExecutor) stepExecutors.get( stepDescriptor.getExecutorId() ); - - if ( stepExecutor == null ) - { - throw new ProcessException( "No such executor '" + stepDescriptor.getExecutorId() + "'." ); - } - - StepExecutorRunner stepExecutorRunner = new StepExecutorRunner( stepExecutor, stepDescriptor ); - - runningProcesses.put( stepExecutorRunner, runtimeDescriptor ); - - executorService.execute( stepExecutorRunner ); - } - - /** - * Holder object containing the runtime information of the process. - */ - private static class ProcessRuntimeDescriptor - { - private ProcessDescriptor processDescriptor; - - private int instanceId; - - private int currentStep; - - public ProcessRuntimeDescriptor( ProcessDescriptor processDescriptor, int processId ) - { - this.processDescriptor = processDescriptor; - this.instanceId = processId; - } - - public ProcessDescriptor getProcessDescriptor() - { - return processDescriptor; - } - - public int getInstanceId() - { - return instanceId; - } - - public int getCurrentStep() - { - return currentStep; - } - - public void setCurrentStep( int currentStep ) - { - this.currentStep = currentStep; - } - } - - private class ProcessThreadPoolExecutor - extends ThreadPoolExecutor - { - public ProcessThreadPoolExecutor() - { - super( 1, 1, 0, TimeUnit.SECONDS, new ArrayBlockingQueue(1000) ); - } - - protected void beforeExecute( Thread thread, Runnable runnable ) - { - StepExecutorRunner stepExecutorRunner = (StepExecutorRunner) runnable; - - ProcessRuntimeDescriptor processRuntimeDescriptor = runningProcesses.get( stepExecutorRunner ); - - onStepStart( stepExecutorRunner, processRuntimeDescriptor ); - } - - protected void afterExecute( Runnable runnable, Throwable throwable ) - { - try - { - StepExecutorRunner stepExecutorRunner = (StepExecutorRunner) runnable; - - ProcessRuntimeDescriptor processRuntimeDescriptor = runningProcesses.get( stepExecutorRunner ); - - onStepCompletion( stepExecutorRunner, processRuntimeDescriptor ); - } - catch ( ProcessException e ) - { - getLogger().error( "Error while saving process state.", e ); - } - } - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/execution/PlexusActionStepExecutor.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/execution/PlexusActionStepExecutor.java deleted file mode 100644 index 2063785d0..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/execution/PlexusActionStepExecutor.java +++ /dev/null @@ -1,208 +0,0 @@ -package org.codehaus.plexus.spe.execution; - -import org.codehaus.classworlds.ClassRealm; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.action.Action; -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.ComponentConfigurator; -import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; -import org.codehaus.plexus.spe.ProcessException; -import org.codehaus.plexus.spe.model.StepDescriptor; -import org.codehaus.plexus.util.StringUtils; -import org.codehaus.plexus.util.xml.Xpp3Dom; - -import java.io.Serializable; -import java.util.Map; -import java.lang.reflect.Field; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class PlexusActionStepExecutor - extends AbstractLogEnabled - implements StepExecutor, Initializable -{ - /** - * @plexus.requirement - */ - private PlexusContainer container; - - private ClassRealm classRealm; - - // ---------------------------------------------------------------------- - // StepExecutor Implementation - // ---------------------------------------------------------------------- - - public void execute( StepDescriptor stepDescriptor, Map context ) - throws ProcessException - { - Xpp3Dom executorConfiguration = (Xpp3Dom) stepDescriptor.getExecutorConfiguration(); - - String actionId = getChild( executorConfiguration, "actionId" ); - - String configuratorId = getChild( executorConfiguration, "configuratorId", "basic" ); - - Action action; - - ComponentConfigurator configurator; - - // ---------------------------------------------------------------------- - // Look up the action and the configurator - // ---------------------------------------------------------------------- - - try - { - action = (Action) container.lookup( Action.ROLE, actionId ); - } - catch ( ComponentLookupException e ) - { - throw new ProcessException( "Could not look up Hauskeeper action '" + actionId + "'.", e ); - } - - try - { - configurator = (ComponentConfigurator) container.lookup( ComponentConfigurator.ROLE, configuratorId ); - } - catch ( ComponentLookupException e ) - { - release( action ); - - throw new ProcessException( "Could not look up component configurator '" + configuratorId + "'.", e ); - } - - // ---------------------------------------------------------------------- - // Pull some reflection magic and set the fields that matches what's - // in the context - // ---------------------------------------------------------------------- - - Field[] declaredFields = action.getClass().getDeclaredFields(); - - for ( Field field : declaredFields ) - { - String name = field.getName(); - - Object value = context.get( name ); - - if ( value == null ) - { - continue; - } - - if ( field.getType().isAssignableFrom( value.getClass() ) ) - { - boolean accessible = field.isAccessible(); - field.setAccessible( true ); - - try - { - field.set( action, value ); - } - catch ( IllegalAccessException e ) - { - throw new ProcessException( "Error while configuring action.", e ); - } - - field.setAccessible( accessible ); - } - } - - // ---------------------------------------------------------------------- - // Configure the action based on the configuration - // ---------------------------------------------------------------------- - - Xpp3Dom configuration = (Xpp3Dom) stepDescriptor.getConfiguration(); - - PlexusConfiguration componentConfiguration = new XmlPlexusConfiguration( configuration ); - - try - { - configurator.configureComponent( action, componentConfiguration, classRealm ); - } - catch ( ComponentConfigurationException e ) - { - release( action ); - release( configurator ); - - throw new ProcessException( "Error while configuring the action.", e ); - } - - // ---------------------------------------------------------------------- - // Execute the action - // ---------------------------------------------------------------------- - - try - { - action.execute( context ); - } - catch ( Exception e ) - { - throw new ProcessException( "Error while executing action.", e ); - } - finally - { - release( action ); - release( configurator ); - } - } - - // ---------------------------------------------------------------------- - // Component Lifecycle - // ---------------------------------------------------------------------- - - public void initialize() - throws InitializationException - { - // TODO: Is this the correct realm to use? I would think so as it's the same as the one that the action - // itself is looked up from. - classRealm = container.getContainerRealm(); - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - private String getChild( Xpp3Dom configuration, String key ) - throws ProcessException - { - if ( configuration == null || - configuration.getChild( key ) == null || - StringUtils.isEmpty( configuration.getChild( key ).getValue() ) ) - { - throw new ProcessException( "Invalid configuration: Missing '" + key + "'." ); - } - - return configuration.getChild( key ).getValue(); - } - - private String getChild( Xpp3Dom configuration, String key, String defaultValue ) - throws ProcessException - { - if ( configuration == null || - configuration.getChild( key ) == null || - StringUtils.isEmpty( configuration.getChild( key ).getValue() ) ) - { - return defaultValue; - } - - return configuration.getChild( key ).getValue(); - } - - private void release( Object component ) - { - try - { - container.release( component ); - } - catch ( ComponentLifecycleException e ) - { - getLogger().error( "Error while releasing ", e ); - } - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/execution/ProcessExecutor.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/execution/ProcessExecutor.java deleted file mode 100644 index bfb3b7724..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/execution/ProcessExecutor.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.codehaus.plexus.spe.execution; - -import org.codehaus.plexus.spe.ProcessException; -import org.codehaus.plexus.spe.model.ProcessDescriptor; -import org.codehaus.plexus.spe.model.ProcessInstance; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public interface ProcessExecutor -{ - String ROLE = ProcessExecutor.class.getName(); - - void startProcess( ProcessDescriptor process, ProcessInstance state ) - throws ProcessException; -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/execution/StepExecutor.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/execution/StepExecutor.java deleted file mode 100644 index 1d072b415..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/execution/StepExecutor.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.codehaus.plexus.spe.execution; - -import org.codehaus.plexus.spe.ProcessException; -import org.codehaus.plexus.spe.model.StepDescriptor; - -import java.io.Serializable; -import java.util.Map; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public interface StepExecutor -{ - String ROLE = StepExecutor.class.getName(); - - void execute( StepDescriptor stepDescriptor, Map context ) - throws ProcessException; -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/execution/StepExecutorRunner.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/execution/StepExecutorRunner.java deleted file mode 100644 index a8aca544f..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/execution/StepExecutorRunner.java +++ /dev/null @@ -1,71 +0,0 @@ -package org.codehaus.plexus.spe.execution; - -import org.codehaus.plexus.spe.model.StepDescriptor; - -import java.io.Serializable; -import java.util.Map; - -/** - * Contains the thread-local state of the currently running state. - * - * @author Trygve Laugstøl - * @version $Id$ - */ -public class StepExecutorRunner - implements Runnable -{ - private StepExecutor executor; - - private StepDescriptor stepDescriptor; - - private Map context; - - private Throwable throwable; - - public StepExecutorRunner( StepExecutor executor, StepDescriptor stepDescriptor ) - { - this.executor = executor; - this.stepDescriptor = stepDescriptor; - } - - public StepExecutor getExecutor() - { - return executor; - } - - public StepDescriptor getStepDescriptor() - { - return stepDescriptor; - } - - public Map getContext() - { - return context; - } - - public void setContext( Map context ) - { - this.context = context; - } - - public Throwable getThrowable() - { - return throwable; - } - - // ---------------------------------------------------------------------- - // Runnable Implementation - // ---------------------------------------------------------------------- - - public void run() - { - try - { - executor.execute( stepDescriptor, context ); - } - catch ( Throwable e ) - { - this.throwable = e; - } - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/model/ProcessInstanceLifecycleListener.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/model/ProcessInstanceLifecycleListener.java deleted file mode 100644 index 775cd80dd..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/model/ProcessInstanceLifecycleListener.java +++ /dev/null @@ -1,168 +0,0 @@ -package org.codehaus.plexus.spe.model; - -import javax.jdo.JDODetachedFieldAccessException; -import javax.jdo.JDOHelper; -import javax.jdo.listener.AttachLifecycleListener; -import javax.jdo.listener.DetachLifecycleListener; -import javax.jdo.listener.InstanceLifecycleEvent; -import javax.jdo.listener.StoreLifecycleListener; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.Serializable; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -/** - * TODO: Figure out if there is a way to figure out if a field is detahced to prevent the silly try/catch - * clauses all over the place. - * - * @author Trygve Laugstøl - * @version $Id$ - */ -public class ProcessInstanceLifecycleListener - implements AttachLifecycleListener, DetachLifecycleListener, StoreLifecycleListener -{ - // ---------------------------------------------------------------------- - // AttachLifecycleListener Implementation - // ---------------------------------------------------------------------- - - public void preAttach( InstanceLifecycleEvent event ) - { - ProcessInstance source = (ProcessInstance) event.getSource(); - - try - { - source.setContext( serializableToContextValue( source.getContext() ) ); - } - catch ( JDODetachedFieldAccessException e ) - { - // ignore - } - } - - public void postAttach( InstanceLifecycleEvent event ) - { - } - - // ---------------------------------------------------------------------- - // DetachLifecycleListener Implementation - // ---------------------------------------------------------------------- - - public void preDetach( InstanceLifecycleEvent event ) - { - } - - public void postDetach( InstanceLifecycleEvent event ) - { - ProcessInstance source = (ProcessInstance) event.getSource(); - - try - { - source.setContext( contextValueToSerializable( source.getContext() ) ); - } - catch ( JDODetachedFieldAccessException e ) - { - // ignore - } - } - - // ---------------------------------------------------------------------- - // StoreLifecycleListener Implementation - // ---------------------------------------------------------------------- - - public void preStore( InstanceLifecycleEvent event ) - { - ProcessInstance source = (ProcessInstance) event.getSource(); - if ( JDOHelper.isNew( source ) ) - { - try - { - source.setContext( serializableToContextValue( source.getContext() ) ); - } - catch ( JDODetachedFieldAccessException e ) - { - // ignore - } - } - } - - public void postStore( InstanceLifecycleEvent event ) - { - } - - // ---------------------------------------------------------------------- - // Private - // ---------------------------------------------------------------------- - - private Map contextValueToSerializable( Map processContext ) - { - try - { - Map context = new HashMap(); - - Iterator iterator = processContext.entrySet().iterator(); - - while ( iterator.hasNext() ) - { - Map.Entry entry = (Map.Entry) iterator.next(); - - if ( ! ( entry.getValue() instanceof ContextValue ) ) - { - throw new RuntimeException( "All entires has to be ContextValues" ); - } - - ByteArrayInputStream data = new ByteArrayInputStream( ((ContextValue)entry.getValue()).getValue() ); - ObjectInputStream inputStream = new ObjectInputStream( data ); - context.put( entry.getKey(), inputStream.readObject() ); - } - - return context; - } - catch ( IOException e ) - { - throw new RuntimeException( "Could not un-serialize the context.", e ); - } - catch ( ClassNotFoundException e ) - { - throw new RuntimeException( "Could not un-serialize the context.", e ); - } - } - - private Map serializableToContextValue( Map context ) - { - try - { - Map processContext = new HashMap(); - - Iterator iterator = context.entrySet().iterator(); - while( iterator.hasNext() ) - { - Map.Entry entry = (Map.Entry) iterator.next(); - - if ( entry.getValue() instanceof ContextValue ) - { - throw new RuntimeException( "All entires has to be Serializables and not ContextValues: " + entry.getKey() + "=" + entry.getValue().getClass() ); - } - - ByteArrayOutputStream data = new ByteArrayOutputStream(); - ObjectOutputStream objectOutputStream = new ObjectOutputStream( data ); - - objectOutputStream.writeObject( entry.getValue() ); - - ContextValue contextValue = new ContextValue(); - contextValue.setValue( data.toByteArray() ); - processContext.put( entry.getKey(), contextValue ); - } - - return processContext; - } - catch ( IOException e ) - { - throw new RuntimeException( "Could not serialize the context.", e ); - } - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/store/DefaultProcessInstanceStore.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/store/DefaultProcessInstanceStore.java deleted file mode 100644 index 111df1c49..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/store/DefaultProcessInstanceStore.java +++ /dev/null @@ -1,288 +0,0 @@ -package org.codehaus.plexus.spe.store; - -import org.codehaus.plexus.jdo.JdoFactory; -import org.codehaus.plexus.jdo.PlexusJdoUtils; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; -import org.codehaus.plexus.spe.ProcessException; -import org.codehaus.plexus.spe.model.ProcessDescriptor; -import org.codehaus.plexus.spe.model.ProcessInstance; -import org.codehaus.plexus.spe.model.ProcessInstanceLifecycleListener; -import org.codehaus.plexus.spe.model.StepDescriptor; -import org.codehaus.plexus.spe.model.StepInstance; - -import javax.jdo.Extent; -import javax.jdo.JDOException; -import javax.jdo.JDOHelper; -import javax.jdo.JDOObjectNotFoundException; -import javax.jdo.PersistenceManager; -import javax.jdo.PersistenceManagerFactory; -import javax.jdo.Query; -import javax.jdo.Transaction; -import java.io.Serializable; -import java.util.Collection; -import java.util.List; -import java.util.Map; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class DefaultProcessInstanceStore - extends AbstractLogEnabled - implements ProcessInstanceStore, Initializable -{ - private PersistenceManagerFactory pmf; - - private ProcessInstanceLifecycleListener processInstanceLifecycleListener; - - /** - * @plexus.requirement - */ - private JdoFactory jdoFactory; - - // ---------------------------------------------------------------------- - // ProcessInstanceStore Implementation - // ---------------------------------------------------------------------- - - public ProcessInstance createInstance( ProcessDescriptor ProcessDescriptor, Map context ) - throws ProcessException - { - getLogger().info( "Creating a new process instance: " + ProcessDescriptor.getId() + "." ); - PersistenceManager pm = getPm(); - - Transaction transaction = pm.currentTransaction(); - - ProcessInstance instance = new ProcessInstance(); - instance.setProcessId( ProcessDescriptor.getId() ); - instance.setContext( context ); - instance.setCreatedTime( System.currentTimeMillis() ); - - for ( StepDescriptor action : (List)ProcessDescriptor.getSteps() ) - { - StepInstance step = new StepInstance(); - step.setExecutorId( action.getExecutorId() ); - instance.getSteps().add( step ); - } - - try - { - transaction.begin(); - - pm.makePersistent( instance ); - - pm.getFetchPlan().addGroup( "StepInstance_detail" ); - ProcessInstance processInstance = (ProcessInstance) pm.detachCopy( instance ); - - transaction.commit(); - - return processInstance; - } - finally - { - PlexusJdoUtils.rollbackIfActive( transaction ); - } - } - - public Collection getActiveInstances() - { - PersistenceManager pm = getPm(); - - Transaction transaction = pm.currentTransaction(); - - try - { - transaction.begin(); - - Extent extent = pm.getExtent( ProcessInstance.class ); - Query query = pm.newQuery( extent ); - Collection collection = pm.detachCopyAll( (Collection) query.execute() ); - - transaction.commit(); - - return collection; - } - finally - { - PlexusJdoUtils.rollbackIfActive( transaction ); - } - } - - public void saveInstance( ProcessInstance processInstance ) - { - getLogger().debug( "Storing process instance " + processInstance.getInstanceId() + ", process: " + processInstance.getProcessId() + "." ); - - updateObject( getPm(), processInstance ); - } - - public ProcessInstance getInstance( int id, boolean includeContext ) - throws ProcessException - { - PersistenceManager pm = getPm(); - - Transaction tx = pm.currentTransaction(); - - try - { - tx.begin(); - - Object objectId = pm.newObjectIdInstance( ProcessInstance.class, (Integer) id ); - - Object object = pm.getObjectById( objectId ); - - pm.getFetchPlan().addGroup( "ProcessInstance_detail" ); - - if ( includeContext ) - { - pm.getFetchPlan().addGroup( "ContextValue_detail" ); - } - - ProcessInstance processInstance = (ProcessInstance) pm.detachCopy( object ); - - tx.commit(); - - return processInstance; - } - catch ( JDOObjectNotFoundException e ) - { - throw new ProcessException( "Could not load object with id " + id + " of class : " + ProcessInstance.class.getName(), e); - } - catch ( JDOException e ) - { - throw new ProcessException( "Error handling JDO.", e ); - } - finally - { - PlexusJdoUtils.rollbackIfActive( tx ); - } - } - - public void deleteInstance( int id ) - throws ProcessException - { - PersistenceManager pm = getPm(); - - Transaction tx = pm.currentTransaction(); - - try - { - tx.begin(); - - Object objectId = pm.newObjectIdInstance( ProcessInstance.class, (Integer) id ); - - Object object = pm.getObjectById( objectId ); - - pm.deletePersistent( object ); - - tx.commit(); - } - catch ( JDOObjectNotFoundException e ) - { - throw new ProcessException( "Could not delete object with id " + id + " of class : " + ProcessInstance.class.getName(), e); - } - catch ( JDOException e ) - { - throw new ProcessException( "Error handling JDO.", e ); - } - finally - { - PlexusJdoUtils.rollbackIfActive( tx ); - } - } - - // ---------------------------------------------------------------------- - // Component Lifecycle - // ---------------------------------------------------------------------- - - public void initialize() - throws InitializationException - { - pmf = jdoFactory.getPersistenceManagerFactory(); - - processInstanceLifecycleListener = new ProcessInstanceLifecycleListener(); - } - - // ---------------------------------------------------------------------- - // Private - // ---------------------------------------------------------------------- - - private PersistenceManager getPm() - { - PersistenceManager pm = pmf.getPersistenceManager(); - - pm.addInstanceLifecycleListener( processInstanceLifecycleListener, new Class[] { ProcessInstance.class } ); - - return pm; - } - - private void updateObject( PersistenceManager pm, Object object ) - throws RuntimeException - { - Transaction tx = pm.currentTransaction(); - - try - { - tx.begin(); - - if ( !JDOHelper.isDetached( object ) ) - { - throw new RuntimeException( "Not detached: " + object ); - } - - pm.makePersistent( object ); - - tx.commit(); - } - finally - { - PlexusJdoUtils.rollbackIfActive( tx ); - } - } - - private Object getObjectById( Class clazz, int id ) - throws ProcessException - { - return getObjectById( clazz, id, null ); - } - - private Object getObjectById( Class clazz, int id, String fetchGroup ) - throws ProcessException - { - PersistenceManager pm = getPm(); - - Transaction tx = pm.currentTransaction(); - - try - { - tx.begin(); - - if ( fetchGroup != null ) - { - pm.getFetchPlan().addGroup( fetchGroup ); - } - - Object objectId = pm.newObjectIdInstance( clazz, new Integer( id ) ); - - Object object = pm.getObjectById( objectId ); - - object = pm.detachCopy( object ); - - tx.commit(); - - return object; - } - catch ( JDOObjectNotFoundException e ) - { - throw new ProcessException( "Could not load object with id " + id + " of class : " + clazz.getName(), e); - } - catch ( JDOException e ) - { - throw new ProcessException( "Error handling JDO.", e ); - } - finally - { - PlexusJdoUtils.rollbackIfActive( tx ); - } - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/store/ProcessInstanceStore.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/store/ProcessInstanceStore.java deleted file mode 100644 index 8104555b0..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/store/ProcessInstanceStore.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.codehaus.plexus.spe.store; - -import org.codehaus.plexus.spe.ProcessException; -import org.codehaus.plexus.spe.model.ProcessDescriptor; -import org.codehaus.plexus.spe.model.ProcessInstance; - -import java.io.Serializable; -import java.util.Collection; -import java.util.Map; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public interface ProcessInstanceStore -{ - String ROLE = ProcessInstanceStore.class.getName(); - - ProcessInstance createInstance( ProcessDescriptor ProcessDescriptor, Map context ) - throws ProcessException; - - Collection getActiveInstances() - throws ProcessException; - - void saveInstance( ProcessInstance processState ) - throws ProcessException; - - ProcessInstance getInstance( int id, boolean includeContext ) - throws ProcessException; - - void deleteInstance( int id ) - throws ProcessException; -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/utils/DurationFormatUtils.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/utils/DurationFormatUtils.java deleted file mode 100644 index 28952b4b5..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/java/org/codehaus/plexus/spe/utils/DurationFormatUtils.java +++ /dev/null @@ -1,929 +0,0 @@ -/* - * Copyright 2002-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.codehaus.plexus.spe.utils; - -import java.util.Calendar; -import java.util.Date; -import java.util.TimeZone; - -/** - *

Duration formatting utilities and constants. The following table describes the tokens - * used in the pattern language for formatting.

- * - * - * - * - * - * - * - * - * - *
characterduration element
yyears
Mmonths
ddays
Hhours
mminutes
sseconds
Smilliseconds
- * - * @author Apache Ant - DateUtils - * @author Stephane Bailliez - * @author Stefan Bodewig - * @author Stephen Colebourne - * @author Gary Gregory - * @author Henri Yandell - * @since 2.1 - * @version $Id$ - */ -public class DurationFormatUtils { - - /** - * Number of milliseconds in a standard second. - * @since 2.1 - */ - public static final long MILLIS_PER_SECOND = 1000; - /** - * Number of milliseconds in a standard minute. - * @since 2.1 - */ - public static final long MILLIS_PER_MINUTE = 60 * MILLIS_PER_SECOND; - /** - * Number of milliseconds in a standard hour. - * @since 2.1 - */ - public static final long MILLIS_PER_HOUR = 60 * MILLIS_PER_MINUTE; - /** - * Number of milliseconds in a standard day. - * @since 2.1 - */ - public static final long MILLIS_PER_DAY = 24 * MILLIS_PER_HOUR; - - /** - *

DurationFormatUtils instances should NOT be constructed in standard programming.

- * - *

This constructor is public to permit tools that require a JavaBean instance - * to operate.

- */ - public DurationFormatUtils() { - super(); - } - - /** - *

Pattern used with FastDateFormat and SimpleDateFormat - * for the ISO8601 period format used in durations.

- * - * @see org.apache.commons.lang.time.FastDateFormat - * @see java.text.SimpleDateFormat - */ - public static final String ISO_EXTENDED_FORMAT_PATTERN = "'P'yyyy'Y'M'M'd'DT'H'H'm'M's.S'S'"; - - //----------------------------------------------------------------------- - /** - *

Formats the time gap as a string.

- * - *

The format used is ISO8601-like: - * H:m:s.S.

- * - * @param durationMillis the duration to format - * @return the time as a String - */ - public static String formatDurationHMS(long durationMillis) { - return formatDuration(durationMillis, "H:mm:ss.SSS"); - } - - /** - *

Formats the time gap as a string.

- * - *

The format used is the ISO8601 period format.

- * - *

This method formats durations using the days and lower fields of the - * ISO format pattern, such as P7D6TH5M4.321S.

- * - * @param durationMillis the duration to format - * @return the time as a String - */ - public static String formatDurationISO(long durationMillis) { - return formatDuration(durationMillis, ISO_EXTENDED_FORMAT_PATTERN, false); - } - - /** - *

Formats the time gap as a string, using the specified format, and padding with zeros and - * using the default timezone.

- * - *

This method formats durations using the days and lower fields of the - * format pattern. Months and larger are not used.

- * - * @param durationMillis the duration to format - * @param format the way in which to format the duration - * @return the time as a String - */ - public static String formatDuration(long durationMillis, String format) { - return formatDuration(durationMillis, format, true); - } - - /** - *

Formats the time gap as a string, using the specified format. - * Padding the left hand side of numbers with zeroes is optional and - * the timezone may be specified.

- * - *

This method formats durations using the days and lower fields of the - * format pattern. Months and larger are not used.

- * - * @param durationMillis the duration to format - * @param format the way in which to format the duration - * @param padWithZeros whether to pad the left hand side of numbers with 0's - * @return the time as a String - */ - public static String formatDuration(long durationMillis, String format, boolean padWithZeros) { - - Token[] tokens = lexx(format); - - int days = 0; - int hours = 0; - int minutes = 0; - int seconds = 0; - int milliseconds = 0; - - if (Token.containsTokenWithValue(tokens, d) ) { - days = (int) (durationMillis / MILLIS_PER_DAY); - durationMillis = durationMillis - (days * MILLIS_PER_DAY); - } - if (Token.containsTokenWithValue(tokens, H) ) { - hours = (int) (durationMillis / MILLIS_PER_HOUR); - durationMillis = durationMillis - (hours * MILLIS_PER_HOUR); - } - if (Token.containsTokenWithValue(tokens, m) ) { - minutes = (int) (durationMillis / MILLIS_PER_MINUTE); - durationMillis = durationMillis - (minutes * MILLIS_PER_MINUTE); - } - if (Token.containsTokenWithValue(tokens, s) ) { - seconds = (int) (durationMillis / MILLIS_PER_SECOND); - durationMillis = durationMillis - (seconds * MILLIS_PER_SECOND); - } - if (Token.containsTokenWithValue(tokens, S) ) { - milliseconds = (int) durationMillis; - } - - return format(tokens, 0, 0, days, hours, minutes, seconds, milliseconds, padWithZeros); - } - - /** - *

Formats an elapsed time into a plurialization correct string.

- * - *

This method formats durations using the days and lower fields of the - * format pattern. Months and larger are not used.

- * - * @param durationMillis the elapsed time to report in milliseconds - * @param suppressLeadingZeroElements suppresses leading 0 elements - * @param suppressTrailingZeroElements suppresses trailing 0 elements - * @return the formatted text in days/hours/minutes/seconds - */ - public static String formatDurationWords( - long durationMillis, - boolean suppressLeadingZeroElements, - boolean suppressTrailingZeroElements) { - - // This method is generally replacable by the format method, but - // there are a series of tweaks and special cases that require - // trickery to replicate. - String duration = formatDuration(durationMillis, "d' days 'H' hours 'm' minutes 's' seconds'"); - if (suppressLeadingZeroElements) { - // this is a temporary marker on the front. Like ^ in regexp. - duration = " " + duration; - String tmp = replaceOnce(duration, " 0 days", ""); - if (tmp.length() != duration.length()) { - duration = tmp; - tmp = replaceOnce(duration, " 0 hours", ""); - if (tmp.length() != duration.length()) { - duration = tmp; - tmp = replaceOnce(duration, " 0 minutes", ""); - duration = tmp; - if (tmp.length() != duration.length()) { - duration = replaceOnce(tmp, " 0 seconds", ""); - } - } - } - if (duration.length() != 0) { - // strip the space off again - duration = duration.substring(1); - } - } - if (suppressTrailingZeroElements) { - String tmp = replaceOnce(duration, " 0 seconds", ""); - if (tmp.length() != duration.length()) { - duration = tmp; - tmp = replaceOnce(duration, " 0 minutes", ""); - if (tmp.length() != duration.length()) { - duration = tmp; - tmp = replaceOnce(duration, " 0 hours", ""); - if (tmp.length() != duration.length()) { - duration = replaceOnce(tmp, " 0 days", ""); - } - } - } - } - // handle plurals - duration = " " + duration; - duration = replaceOnce(duration, " 1 seconds", " 1 second"); - duration = replaceOnce(duration, " 1 minutes", " 1 minute"); - duration = replaceOnce(duration, " 1 hours", " 1 hour"); - duration = replaceOnce(duration, " 1 days", " 1 day"); - return duration.trim(); - } - - //----------------------------------------------------------------------- - /** - *

Formats the time gap as a string.

- * - *

The format used is the ISO8601 period format.

- * - * @param startMillis the start of the duration to format - * @param endMillis the end of the duration to format - * @return the time as a String - */ - public static String formatPeriodISO(long startMillis, long endMillis) { - return formatPeriod(startMillis, endMillis, ISO_EXTENDED_FORMAT_PATTERN, false, TimeZone.getDefault()); - } - - /** - *

Formats the time gap as a string, using the specified format. - * Padding the left hand side of numbers with zeroes is optional. - * - * @param startMillis the start of the duration - * @param endMillis the end of the duration - * @param format the way in which to format the duration - * @return the time as a String - */ - public static String formatPeriod(long startMillis, long endMillis, String format) { - return formatPeriod(startMillis, endMillis, format, true, TimeZone.getDefault()); - } - - /** - *

Formats the time gap as a string, using the specified format. - * Padding the left hand side of numbers with zeroes is optional and - * the timezone may be specified. - * - * @param startMillis the start of the duration - * @param endMillis the end of the duration - * @param format the way in which to format the duration - * @param padWithZeros whether to pad the left hand side of numbers with 0's - * @param timezone the millis are defined in - * @return the time as a String - */ - public static String formatPeriod(long startMillis, long endMillis, String format, boolean padWithZeros, - TimeZone timezone) { - - long millis = endMillis - startMillis; - if (millis < 28 * MILLIS_PER_DAY) { - return formatDuration(millis, format, padWithZeros); - } - - Token[] tokens = lexx(format); - - // timezones get funky around 0, so normalizing everything to GMT - // stops the hours being off - Calendar start = Calendar.getInstance(timezone); - start.setTime(new Date(startMillis)); - Calendar end = Calendar.getInstance(timezone); - end.setTime(new Date(endMillis)); - - // initial estimates - int years = end.get(Calendar.YEAR) - start.get(Calendar.YEAR); - int months = end.get(Calendar.MONTH) - start.get(Calendar.MONTH); - // each initial estimate is adjusted in case it is under 0 - while (months < 0) { - months += 12; - years -= 1; - } - int days = end.get(Calendar.DAY_OF_MONTH) - start.get(Calendar.DAY_OF_MONTH); - while (days < 0) { - days += 31; // such overshooting is taken care of later on - months -= 1; - } - int hours = end.get(Calendar.HOUR_OF_DAY) - start.get(Calendar.HOUR_OF_DAY); - while (hours < 0) { - hours += 24; - days -= 1; - } - int minutes = end.get(Calendar.MINUTE) - start.get(Calendar.MINUTE); - while (minutes < 0) { - minutes += 60; - hours -= 1; - } - int seconds = end.get(Calendar.SECOND) - start.get(Calendar.SECOND); - while (seconds < 0) { - seconds += 60; - minutes -= 1; - } - int milliseconds = end.get(Calendar.MILLISECOND) - start.get(Calendar.MILLISECOND); - while (milliseconds < 0) { - milliseconds += 1000; - seconds -= 1; - } - - // take estimates off of end to see if we can equal start, when it overshoots recalculate - milliseconds -= reduceAndCorrect(start, end, Calendar.MILLISECOND, milliseconds); - seconds -= reduceAndCorrect(start, end, Calendar.SECOND, seconds); - minutes -= reduceAndCorrect(start, end, Calendar.MINUTE, minutes); - hours -= reduceAndCorrect(start, end, Calendar.HOUR_OF_DAY, hours); - days -= reduceAndCorrect(start, end, Calendar.DAY_OF_MONTH, days); - months -= reduceAndCorrect(start, end, Calendar.MONTH, months); - years -= reduceAndCorrect(start, end, Calendar.YEAR, years); - - // This next block of code adds in values that - // aren't requested. This allows the user to ask for the - // number of months and get the real count and not just 0->11. - if (!Token.containsTokenWithValue(tokens, y)) { - if (Token.containsTokenWithValue(tokens, M)) { - months += 12 * years; - years = 0; - } else { - // TODO: this is a bit weak, needs work to know about leap years - days += 365 * years; - years = 0; - } - } - if (!Token.containsTokenWithValue(tokens, M)) { - days += end.get(Calendar.DAY_OF_YEAR) - start.get(Calendar.DAY_OF_YEAR); - months = 0; - } - if (!Token.containsTokenWithValue(tokens, d)) { - hours += 24 * days; - days = 0; - } - if (!Token.containsTokenWithValue(tokens, H)) { - minutes += 60 * hours; - hours = 0; - } - if (!Token.containsTokenWithValue(tokens, m)) { - seconds += 60 * minutes; - minutes = 0; - } - if (!Token.containsTokenWithValue(tokens, s)) { - milliseconds += 1000 * seconds; - seconds = 0; - } - - return format(tokens, years, months, days, hours, minutes, seconds, milliseconds, padWithZeros); - } - - //----------------------------------------------------------------------- - /** - *

The internal method to do the formatting.

- * - * @param tokens the tokens - * @param years the number of years - * @param months the number of months - * @param days the number of days - * @param hours the number of hours - * @param minutes the number of minutes - * @param seconds the number of seconds - * @param milliseconds the number of millis - * @param padWithZeros whether to pad - * @return the formetted string - */ - static String format(Token[] tokens, int years, int months, int days, int hours, int minutes, int seconds, - int milliseconds, boolean padWithZeros) { - StringBuffer buffer = new StringBuffer(); - boolean lastOutputSeconds = false; - int sz = tokens.length; - for (int i = 0; i < sz; i++) { - Token token = tokens[i]; - Object value = token.getValue(); - int count = token.getCount(); - if (value instanceof StringBuffer) { - buffer.append(value.toString()); - } else { - if (value == y) { - buffer.append(padWithZeros ? leftPad(Integer.toString(years), count, '0') : Integer - .toString(years)); - lastOutputSeconds = false; - } else if (value == M) { - buffer.append(padWithZeros ? leftPad(Integer.toString(months), count, '0') : Integer - .toString(months)); - lastOutputSeconds = false; - } else if (value == d) { - buffer.append(padWithZeros ? leftPad(Integer.toString(days), count, '0') : Integer - .toString(days)); - lastOutputSeconds = false; - } else if (value == H) { - buffer.append(padWithZeros ? leftPad(Integer.toString(hours), count, '0') : Integer - .toString(hours)); - lastOutputSeconds = false; - } else if (value == m) { - buffer.append(padWithZeros ? leftPad(Integer.toString(minutes), count, '0') : Integer - .toString(minutes)); - lastOutputSeconds = false; - } else if (value == s) { - buffer.append(padWithZeros ? leftPad(Integer.toString(seconds), count, '0') : Integer - .toString(seconds)); - lastOutputSeconds = true; - } else if (value == S) { - if (lastOutputSeconds) { - milliseconds += 1000; - String str = padWithZeros - ? leftPad(Integer.toString(milliseconds), count, '0') - : Integer.toString(milliseconds); - buffer.append(str.substring(1)); - } else { - buffer.append(padWithZeros - ? leftPad(Integer.toString(milliseconds), count, '0') - : Integer.toString(milliseconds)); - } - lastOutputSeconds = false; - } - } - } - return buffer.toString(); - } - - /** - * Reduces by difference, then if it overshot, calculates the overshot amount and - * fixes and returns the amount to change by. - * - * @param start Start of period being formatted - * @param end End of period being formatted - * @param field Field to reduce, as per constants in {@link java.util.Calendar} - * @param difference amount to reduce by - * @return int reduced value - */ - static int reduceAndCorrect(Calendar start, Calendar end, int field, int difference) { - end.add( field, -1 * difference ); - int endValue = end.get(field); - int startValue = start.get(field); - if (endValue < startValue) { - int newdiff = startValue - endValue; - end.add( field, newdiff ); - return newdiff; - } else { - return 0; - } - } - - static final Object y = "y"; - static final Object M = "M"; - static final Object d = "d"; - static final Object H = "H"; - static final Object m = "m"; - static final Object s = "s"; - static final Object S = "S"; - - /** - * Parses a classic date format string into Tokens - * - * @param format to parse - * @return Token[] of tokens - */ - static Token[] lexx(String format) { - char[] array = format.toCharArray(); - java.util.ArrayList list = new java.util.ArrayList(array.length); - - boolean inLiteral = false; - StringBuffer buffer = null; - Token previous = null; - int sz = array.length; - for(int i=0; itrue if contained - */ - static boolean containsTokenWithValue(Token[] tokens, Object value) { - int sz = tokens.length; - for (int i = 0; i < sz; i++) { - if (tokens[i].getValue() == value) { - return true; - } - } - return false; - } - - private Object value; - private int count; - - /** - * Wraps a token around a value. A value would be something like a 'Y'. - * - * @param value to wrap - */ - Token(Object value) { - this.value = value; - this.count = 1; - } - - /** - * Wraps a token around a repeated number of a value, for example it would - * store 'yyyy' as a value for y and a count of 4. - * - * @param value to wrap - * @param count to wrap - */ - Token(Object value, int count) { - this.value = value; - this.count = count; - } - - /** - * Adds another one of the value - */ - void increment() { - count++; - } - - /** - * Gets the current number of values represented - * - * @return int number of values represented - */ - int getCount() { - return count; - } - - /** - * Gets the particular value this token represents. - * - * @return Object value - */ - Object getValue() { - return value; - } - - /** - * Supports equality of this Token to another Token. - * - * @param obj2 Object to consider equality of - * @return boolean true if equal - */ - public boolean equals(Object obj2) { - if (obj2 instanceof Token) { - Token tok2 = (Token) obj2; - if (this.value.getClass() != tok2.value.getClass()) { - return false; - } - if (this.count != tok2.count) { - return false; - } - if (this.value instanceof StringBuffer) { - return this.value.toString().equals(tok2.value.toString()); - } else if (this.value instanceof Number) { - return this.value.equals(tok2.value); - } else { - return this.value == tok2.value; - } - } else { - return false; - } - } - - /** - * Represents this token as a String. - * - * @return String representation of the token - */ - public String toString() { - return repeat(this.value.toString(), this.count); - } - } - - // ---------------------------------------------------------------------- - // StringUtils inlines - trygve - // ---------------------------------------------------------------------- - - /** - * The empty String "". - * @since 2.0 - */ - public static final String EMPTY = ""; - - /** - *

The maximum size to which the padding constant(s) can expand.

- */ - private static final int PAD_LIMIT = 8192; - - /** - *

Repeat a String repeat times to form a - * new String.

- * - *
-     * StringUtils.repeat(null, 2) = null
-     * StringUtils.repeat("", 0)   = ""
-     * StringUtils.repeat("", 2)   = ""
-     * StringUtils.repeat("a", 3)  = "aaa"
-     * StringUtils.repeat("ab", 2) = "abab"
-     * StringUtils.repeat("a", -2) = ""
-     * 
- * - * @param str the String to repeat, may be null - * @param repeat number of times to repeat str, negative treated as zero - * @return a new String consisting of the original String repeated, - * null if null String input - */ - public static String repeat(String str, int repeat) { - // Performance tuned for 2.0 (JDK1.4) - - if (str == null) { - return null; - } - if (repeat <= 0) { - return EMPTY; - } - int inputLength = str.length(); - if (repeat == 1 || inputLength == 0) { - return str; - } - if (inputLength == 1 && repeat <= PAD_LIMIT) { - return padding(repeat, str.charAt(0)); - } - - int outputLength = inputLength * repeat; - switch (inputLength) { - case 1 : - char ch = str.charAt(0); - char[] output1 = new char[outputLength]; - for (int i = repeat - 1; i >= 0; i--) { - output1[i] = ch; - } - return new String(output1); - case 2 : - char ch0 = str.charAt(0); - char ch1 = str.charAt(1); - char[] output2 = new char[outputLength]; - for (int i = repeat * 2 - 2; i >= 0; i--, i--) { - output2[i] = ch0; - output2[i + 1] = ch1; - } - return new String(output2); - default : - StringBuffer buf = new StringBuffer(outputLength); - for (int i = 0; i < repeat; i++) { - buf.append(str); - } - return buf.toString(); - } - } - - /** - *

Returns padding using the specified delimiter repeated - * to a given length.

- * - *
-     * StringUtils.padding(0, 'e')  = ""
-     * StringUtils.padding(3, 'e')  = "eee"
-     * StringUtils.padding(-2, 'e') = IndexOutOfBoundsException
-     * 
- * - *

Note: this method doesn't not support padding with - * Unicode Supplementary Characters - * as they require a pair of chars to be represented. - * If you are needing to support full I18N of your applications - * consider using {@link #repeat(String, int)} instead. - *

- * - * @param repeat number of times to repeat delim - * @param padChar character to repeat - * @return String with repeated character - * @throws IndexOutOfBoundsException if repeat < 0 - * @see #repeat(String, int) - */ - private static String padding(int repeat, char padChar) throws IndexOutOfBoundsException { - if (repeat < 0) { - throw new IndexOutOfBoundsException("Cannot pad a negative amount: " + repeat); - } - final char[] buf = new char[repeat]; - for (int i = 0; i < buf.length; i++) { - buf[i] = padChar; - } - return new String(buf); - } - - // Empty checks - //----------------------------------------------------------------------- - /** - *

Checks if a String is empty ("") or null.

- * - *
-     * StringUtils.isEmpty(null)      = true
-     * StringUtils.isEmpty("")        = true
-     * StringUtils.isEmpty(" ")       = false
-     * StringUtils.isEmpty("bob")     = false
-     * StringUtils.isEmpty("  bob  ") = false
-     * 
- * - *

NOTE: This method changed in Lang version 2.0. - * It no longer trims the String. - * That functionality is available in isBlank().

- * - * @param str the String to check, may be null - * @return true if the String is empty or null - */ - public static boolean isEmpty(String str) { - return str == null || str.length() == 0; - } - - /** - *

Replaces a String with another String inside a larger String, - * for the first max values of the search String.

- * - *

A null reference passed to this method is a no-op.

- * - *
-     * StringUtils.replace(null, *, *, *)         = null
-     * StringUtils.replace("", *, *, *)           = ""
-     * StringUtils.replace("any", null, *, *)     = "any"
-     * StringUtils.replace("any", *, null, *)     = "any"
-     * StringUtils.replace("any", "", *, *)       = "any"
-     * StringUtils.replace("any", *, *, 0)        = "any"
-     * StringUtils.replace("abaa", "a", null, -1) = "abaa"
-     * StringUtils.replace("abaa", "a", "", -1)   = "b"
-     * StringUtils.replace("abaa", "a", "z", 0)   = "abaa"
-     * StringUtils.replace("abaa", "a", "z", 1)   = "zbaa"
-     * StringUtils.replace("abaa", "a", "z", 2)   = "zbza"
-     * StringUtils.replace("abaa", "a", "z", -1)  = "zbzz"
-     * 
- * - * @param text text to search and replace in, may be null - * @param repl the String to search for, may be null - * @param with the String to replace with, may be null - * @param max maximum number of values to replace, or -1 if no maximum - * @return the text with any replacements processed, - * null if null String input - */ - public static String replace(String text, String repl, String with, int max) { - if (isEmpty(text) || isEmpty(repl) || with == null || max == 0) { - return text; - } - int start = 0; - int end = text.indexOf(repl, start); - if (end == -1) { - return text; - } - int increase = with.length() - repl.length(); - increase = (increase < 0 ? 0 : increase); - increase *= (max < 0 ? 16 : (max > 64 ? 64 : max)); - StringBuffer buf = new StringBuffer(text.length() + increase); - while (end != -1) { - buf.append(text.substring(start, end)).append(with); - start = end + repl.length(); - if (--max == 0) { - break; - } - end = text.indexOf(repl, start); - } - buf.append(text.substring(start)); - return buf.toString(); - } - - public static String replaceOnce(String text, String repl, String with) { - return replace(text, repl, with, 1); - } - - /** - *

Left pad a String with a specified String.

- * - *

Pad to a size of size.

- * - *
-     * StringUtils.leftPad(null, *, *)      = null
-     * StringUtils.leftPad("", 3, "z")      = "zzz"
-     * StringUtils.leftPad("bat", 3, "yz")  = "bat"
-     * StringUtils.leftPad("bat", 5, "yz")  = "yzbat"
-     * StringUtils.leftPad("bat", 8, "yz")  = "yzyzybat"
-     * StringUtils.leftPad("bat", 1, "yz")  = "bat"
-     * StringUtils.leftPad("bat", -1, "yz") = "bat"
-     * StringUtils.leftPad("bat", 5, null)  = "  bat"
-     * StringUtils.leftPad("bat", 5, "")    = "  bat"
-     * 
- * - * @param str the String to pad out, may be null - * @param size the size to pad to - * @param padStr the String to pad with, null or empty treated as single space - * @return left padded String or original String if no padding is necessary, - * null if null String input - */ - public static String leftPad(String str, int size, String padStr) { - if (str == null) { - return null; - } - if (isEmpty(padStr)) { - padStr = " "; - } - int padLen = padStr.length(); - int strLen = str.length(); - int pads = size - strLen; - if (pads <= 0) { - return str; // returns original String when possible - } - if (padLen == 1 && pads <= PAD_LIMIT) { - return leftPad(str, size, padStr.charAt(0)); - } - - if (pads == padLen) { - return padStr.concat(str); - } else if (pads < padLen) { - return padStr.substring(0, pads).concat(str); - } else { - char[] padding = new char[pads]; - char[] padChars = padStr.toCharArray(); - for (int i = 0; i < pads; i++) { - padding[i] = padChars[i % padLen]; - } - return new String(padding).concat(str); - } - } - - /** - *

Left pad a String with a specified character.

- * - *

Pad to a size of size.

- * - *
-     * StringUtils.leftPad(null, *, *)     = null
-     * StringUtils.leftPad("", 3, 'z')     = "zzz"
-     * StringUtils.leftPad("bat", 3, 'z')  = "bat"
-     * StringUtils.leftPad("bat", 5, 'z')  = "zzbat"
-     * StringUtils.leftPad("bat", 1, 'z')  = "bat"
-     * StringUtils.leftPad("bat", -1, 'z') = "bat"
-     * 
- * - * @param str the String to pad out, may be null - * @param size the size to pad to - * @param padChar the character to pad with - * @return left padded String or original String if no padding is necessary, - * null if null String input - * @since 2.0 - */ - public static String leftPad(String str, int size, char padChar) { - if (str == null) { - return null; - } - int pads = size - str.length(); - if (pads <= 0) { - return str; // returns original String when possible - } - if (pads > PAD_LIMIT) { - return leftPad(str, size, String.valueOf(padChar)); - } - return padding(pads, padChar).concat(str); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/resources/META-INF/plexus/components.xml b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index a2134c0dd..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - org.codehaus.plexus.spe.ProcessService - org.codehaus.plexus.spe.DefaultProcessService - - - org.codehaus.plexus.spe.store.ProcessInstanceStore - - - org.codehaus.plexus.spe.core.ProcessEventManager - - - org.codehaus.plexus.spe.execution.ProcessExecutor - - - - - - - org.codehaus.plexus.spe.core.ProcessEventManager - org.codehaus.plexus.spe.core.DefaultProcessEventManager - - - - - org.codehaus.plexus.spe.store.ProcessInstanceStore - org.codehaus.plexus.spe.store.DefaultProcessInstanceStore - - - org.codehaus.plexus.jdo.JdoFactory - - - - - - - org.codehaus.plexus.spe.execution.ProcessExecutor - org.codehaus.plexus.spe.execution.DefaultProcessExecutor - - - org.codehaus.plexus.spe.store.ProcessInstanceStore - - - org.codehaus.plexus.spe.core.ProcessEventManager - - - org.codehaus.plexus.spe.execution.StepExecutor - stepExecutors - - - - - - - org.codehaus.plexus.spe.execution.StepExecutor - plexus-action - org.codehaus.plexus.spe.execution.PlexusActionStepExecutor - - - org.codehaus.plexus.PlexusContainer - - - - - - - org.codehaus.plexus.component.configurator.ComponentConfigurator - ant - org.codehaus.plexus.component.configurator.BasicComponentConfigurator - - - org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup - ant - - - - - org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup - ant - org.codehaus.plexus.component.configurator.converters.lookup.DefaultConverterLookup - - - org.codehaus.plexus.component.configurator.converters.ConfigurationConverter - AntTarget - customConverters - - - - - org.codehaus.plexus.component.configurator.converters.ConfigurationConverter - AntTarget - org.codehaus.plexus.spe.action.AntTargetConverter - - - - - org.codehaus.plexus.action.Action - echo-message - org.codehaus.plexus.spe.action.EchoAction - - - org.codehaus.plexus.action.Action - set-context - org.codehaus.plexus.spe.action.SetContextAction - - - org.codehaus.plexus.action.Action - ant - org.codehaus.plexus.spe.action.AntRunAction - - - diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/java/org/codehaus/plexus/spe/ProcessServiceTest.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/java/org/codehaus/plexus/spe/ProcessServiceTest.java deleted file mode 100644 index 5d21ac13e..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/java/org/codehaus/plexus/spe/ProcessServiceTest.java +++ /dev/null @@ -1,180 +0,0 @@ -package org.codehaus.plexus.spe; - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.spe.action.EchoAction; -import org.codehaus.plexus.spe.model.ProcessInstance; - -import java.io.Serializable; -import java.util.HashMap; -import java.util.Map; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class ProcessServiceTest - extends PlexusTestCase -{ - protected void setUp() - throws Exception - { - super.setUp(); - EchoAction.messages.clear(); - } - - public void testHelloWorldProcess() - throws Exception - { - ProcessService processService = (ProcessService) lookup( ProcessService.ROLE ); - - processService.loadProcess( getTestFile( "src/test/resources/process/process-1.xml").toURL() ); - - Map context = new HashMap(); - context.put( "message", "Context Hello World!" ); - int instanceId = processService.executeProcess( "hello-world", context ); - - Thread.sleep( 1000 ); - - assertTrue( processService.hasCompleted( instanceId )); - - assertEquals( 2, EchoAction.messages.size() ); - assertEquals( "Configuration Hello World!", EchoAction.messages.get( 0 ) ); - assertEquals( "Context Hello World!", EchoAction.messages.get( 1 ) ); - } - - public void testContextModifyingProcess() - throws Exception - { - ProcessService processService = (ProcessService) lookup( ProcessService.ROLE ); - - processService.loadProcess( getTestFile( "src/test/resources/process/process-2.xml").toURL() ); - - Map context = new HashMap(); - context.put( "message", "Hello World!" ); - int instanceId = processService.executeProcess( "context-modifying-process", context ); - - waitForCompletion( 3000, processService, instanceId ); - assertEquals( 2, EchoAction.messages.size() ); - assertEquals( "Hello World!", EchoAction.messages.get( 0 ) ); - assertEquals( "Modified Hello World!", EchoAction.messages.get( 1 ) ); - } - - public void testExceptionHandling() - throws Exception - { - ProcessService processService = (ProcessService) lookup( ProcessService.ROLE ); - - processService.loadProcess( getTestFile( "src/test/resources/process/exception-throwing-process.xml").toURL() ); - processService.loadProcess( getTestFile( "src/test/resources/process/runtime-exception-throwing-process.xml").toURL() ); - - // ---------------------------------------------------------------------- - // Test handling of runtime exceptions. - // ---------------------------------------------------------------------- - - Map context = new HashMap(); - context.put( "message", "Runtime Exception Message" ); - int instanceId = processService.executeProcess( "runtime-exception-throwing-process", context ); - - waitForCompletion( 3000, processService, instanceId, false ); - - ProcessInstance processInstance = processService.getProcessInstance( instanceId ); - - assertTrue( processInstance.getErrorMessage().contains( "Runtime Exception Message" ) ); - - // ---------------------------------------------------------------------- - // Test handling of "normal" exceptions - // ---------------------------------------------------------------------- - - context = new HashMap(); - context.put( "message", "Non-Runtime Exception Message" ); - instanceId = processService.executeProcess( "exception-throwing-process", context ); - - waitForCompletion( 3000, processService, instanceId, false ); - - processInstance = processService.getProcessInstance( instanceId ); - - assertTrue( processInstance.getErrorMessage().contains( "Non-Runtime Exception Message" ) ); - } - - public void testAntBasedTest() - throws Exception - { - ProcessService processService = (ProcessService) lookup( ProcessService.ROLE ); - - processService.loadProcess( getTestFile( "src/test/resources/process/process-3.xml").toURL() ); - - int instanceId = processService.executeProcess( "ant-based-process", new HashMap() ); - - waitForCompletion( 3000, processService, instanceId ); - } - - public void testProcessWithObjectsInTheContext() - throws Exception - { - ProcessService processService = (ProcessService) lookup( ProcessService.ROLE ); - - processService.loadProcess( getTestFile( "src/test/resources/process/process-4.xml").toURL() ); - - HashMap context = new HashMap(); - - User user = new User(); - user.setUsername( "trygvis" ); - user.setFirstName( "Trygve" ); - user.setLastName( "Laugstol" ); - - context.put( "user", user ); - context.put( "username", "foo" ); - - int instanceId = processService.executeProcess( "process-4", context ); - - waitForCompletion( 3000, processService, instanceId ); - - // TODO: Asserts - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - private void waitForCompletion( long time, ProcessService processService, int instanceId ) - throws InterruptedException, ProcessException - { - waitForCompletion( time, processService, instanceId, true); - } - - private void waitForCompletion( long time, ProcessService processService, int instanceId, boolean expectsSuccess ) - throws InterruptedException, ProcessException - { - int sleepTime = 100; - - while ( time > 0 ) - { - if ( processService.hasCompleted( instanceId ) ) - { - ProcessInstance processInstance = processService.getProcessInstance( instanceId ); - - if ( expectsSuccess ) - { - if ( processInstance.getErrorMessage() != null ) - { - System.out.println( "----------------------" ); - System.out.println( "Process throwable:" ); - System.out.println( processInstance.getErrorMessage() ); - System.out.println( "----------------------" ); - - fail( "The process completed non-successfully" ); - } - } - else - { - assertNotNull( processInstance.getErrorMessage() ); - } - - break; - } - - Thread.sleep( sleepTime ); - time -= sleepTime; - } - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/java/org/codehaus/plexus/spe/User.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/java/org/codehaus/plexus/spe/User.java deleted file mode 100644 index bb762ec39..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/java/org/codehaus/plexus/spe/User.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.codehaus.plexus.spe; - -import java.io.Serializable; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class User - implements Serializable -{ - private String username; - - private String firstName; - - private String lastName; - - public String getUsername() - { - return username; - } - - public void setUsername( String username ) - { - this.username = username; - } - - public String getFirstName() - { - return firstName; - } - - public void setFirstName( String firstName ) - { - this.firstName = firstName; - } - - public String getLastName() - { - return lastName; - } - - public void setLastName( String lastName ) - { - this.lastName = lastName; - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/java/org/codehaus/plexus/spe/action/SaveUserAction.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/java/org/codehaus/plexus/spe/action/SaveUserAction.java deleted file mode 100644 index de94eb84a..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/java/org/codehaus/plexus/spe/action/SaveUserAction.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.codehaus.plexus.spe.action; - -import org.codehaus.plexus.action.AbstractAction; -import org.codehaus.plexus.spe.User; - -import java.util.Map; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class SaveUserAction - extends AbstractAction -{ - private User user; - - private String username; - - public static User staticUser; - - public static String staticUsername; - - public void execute( Map map ) - throws Exception - { - staticUser = user; - - staticUsername = username; - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/java/org/codehaus/plexus/spe/execution/PlexusActionStepExecutorTest.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/java/org/codehaus/plexus/spe/execution/PlexusActionStepExecutorTest.java deleted file mode 100644 index 81ea5ed20..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/java/org/codehaus/plexus/spe/execution/PlexusActionStepExecutorTest.java +++ /dev/null @@ -1,62 +0,0 @@ -package org.codehaus.plexus.spe.execution; - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.util.xml.Xpp3Dom; -import org.codehaus.plexus.spe.model.StepDescriptor; -import org.codehaus.plexus.spe.action.SaveUserAction; -import org.codehaus.plexus.spe.User; - -import java.io.Serializable; -import java.util.Map; -import java.util.HashMap; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class PlexusActionStepExecutorTest - extends PlexusTestCase -{ - public void testBasic() - throws Exception - { - PlexusActionStepExecutor executor = (PlexusActionStepExecutor) lookup( PlexusActionStepExecutor.ROLE ); - - Xpp3Dom executorConfiguration = new Xpp3Dom( "executor-configuration" ); - Xpp3Dom actionId = new Xpp3Dom( "actionId" ); - actionId.setValue( "save-user" ); - executorConfiguration.addChild( actionId ); - - Xpp3Dom configuration = new Xpp3Dom( "configuration" ); - Xpp3Dom username = new Xpp3Dom( "username" ); - username.setValue( "trygvis" ); - configuration.addChild( username ); - - StepDescriptor descriptor = new StepDescriptor(); - descriptor.setExecutorId( "plexus-action" ); - descriptor.setExecutorConfiguration( executorConfiguration ); - descriptor.setConfiguration( configuration ); - - Map context = new HashMap(); - - User user = new User(); - user.setUsername( "trygvis" ); - user.setFirstName( "Trygve" ); - user.setLastName( "Laugstol" ); - context.put( "user", user ); - - executor.execute( descriptor, context ); - - // ---------------------------------------------------------------------- - // Assertions - // ---------------------------------------------------------------------- - - assertNotNull( SaveUserAction.staticUsername ); - assertEquals( "trygvis", SaveUserAction.staticUsername); - - assertNotNull( SaveUserAction.staticUser ); - assertEquals( "trygvis", SaveUserAction.staticUser.getUsername() ); - assertEquals( "Trygve", SaveUserAction.staticUser.getFirstName() ); - assertEquals( "Laugstol", SaveUserAction.staticUser.getLastName() ); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/java/org/codehaus/plexus/spe/store/ProcessStoreTest.java b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/java/org/codehaus/plexus/spe/store/ProcessStoreTest.java deleted file mode 100644 index 1e9046f22..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/java/org/codehaus/plexus/spe/store/ProcessStoreTest.java +++ /dev/null @@ -1,172 +0,0 @@ -package org.codehaus.plexus.spe.store; - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.spe.model.ProcessDescriptor; -import org.codehaus.plexus.spe.model.ProcessInstance; -import org.codehaus.plexus.spe.model.StepDescriptor; -import org.codehaus.plexus.spe.model.StepInstance; - -import javax.jdo.JDODetachedFieldAccessException; -import java.io.Serializable; -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class ProcessStoreTest - extends PlexusTestCase -{ - protected void setUp() - throws Exception - { - super.setUp(); - - ProcessInstanceStore store = (ProcessInstanceStore) lookup( ProcessInstanceStore.ROLE ); - - for ( ProcessInstance instance : store.getActiveInstances() ) - { - store.deleteInstance( instance.getInstanceId() ); - } - } - - public void testSimple() - throws Exception - { - ProcessInstanceStore store = (ProcessInstanceStore) lookup( ProcessInstanceStore.ROLE ); - - Map context = new HashMap(); - - ProcessDescriptor process = new ProcessDescriptor(); - process.setId( "hello-world" ); - StepDescriptor stepDescriptor = new StepDescriptor(); - stepDescriptor.setExecutorId( "echo-message" ); - process.addStep( stepDescriptor ); - store.createInstance( process, context ); - } - - public void testBasic() - throws Exception - { - ProcessInstanceStore store = (ProcessInstanceStore) lookup( ProcessInstanceStore.ROLE ); - - Map context = new HashMap(); - - ProcessDescriptor process = new ProcessDescriptor(); - process.setId( "hello-world" ); - StepDescriptor stepDescriptor = new StepDescriptor(); - stepDescriptor.setExecutorId( "echo-message" ); - process.addStep( stepDescriptor ); - - context.put( "message", "Hello World!" ); - context.put( "user", new User( "Trygve", 123 ) ); - - ProcessInstance instance = store.createInstance( process, context ); - - assertNotNull( process.getId() ); - assertTrue( process.getId().length() > 0 ); - assertEquals( 1, instance.getSteps().size() ); - StepInstance step = (StepInstance) instance.getSteps().get( 0 ); - assertEquals( "echo-message", step.getExecutorId() ); - - Collection instances = store.getActiveInstances(); - - assertNotNull( instances ); - - assertEquals( 1, instances.size() ); - - ProcessInstance actualProcess = instances.iterator().next(); - - assertEquals( instance.getInstanceId(), actualProcess.getInstanceId() ); - assertEquals( instance.getProcessId(), actualProcess.getProcessId() ); - try - { - assertEquals( instance.getContext(), actualProcess.getContext() ); - fail( "Expected JDODetachedFieldAccessException" ); - } - catch ( JDODetachedFieldAccessException e ) - { - // expected - } - - actualProcess = store.getInstance( instance.getInstanceId(), true ); - - assertNotNull( actualProcess ); - System.out.println( "actualProcess.getProcessInstance() = " + actualProcess.getContext() ); - assertEquals( instance.getInstanceId(), actualProcess.getInstanceId() ); - assertEquals( instance.getProcessId(), actualProcess.getProcessId() ); - assertEquals( 2, actualProcess.getContext().size() ); - assertEquals( "Hello World!", actualProcess.getContext().get( "message" ) ); - assertNotNull( actualProcess.getContext().get( "user" ) ); - assertEquals( "Trygve", ((User)actualProcess.getContext().get( "user" )).getName() ); - assertEquals( 123, ((User)actualProcess.getContext().get( "user" )).getAge() ); - assertEquals( instance.getContext(), actualProcess.getContext() ); - - store.saveInstance( actualProcess ); - actualProcess = store.getInstance( actualProcess.getInstanceId(), true ); - - assertEquals( "Hello World!", actualProcess.getContext().get( "message" ) ); - } - - private static class User - implements Serializable - { - private String name; - - private int age; - - public User() - { - } - - public User( String name, int age ) - { - this.name = name; - this.age = age; - } - - public String getName() - { - return name; - } - - public void setName( String name ) - { - this.name = name; - } - - public int getAge() - { - return age; - } - - public void setAge( int age ) - { - this.age = age; - } - - public boolean equals( Object o ) - { - if ( this == o ) - { - return true; - } - - if ( o == null || getClass() != o.getClass() ) - { - return false; - } - - User user = (User) o; - - return name.equals( user.name ); - } - - public int hashCode() - { - return name.hashCode(); - } - } -} diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/META-INF/plexus/components.xml b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/META-INF/plexus/components.xml deleted file mode 100644 index 598a0c987..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - org.codehaus.plexus.action.Action - org.codehaus.plexus.spe.action.ThrowExceptionAction - throw-exception - - - - org.codehaus.plexus.action.Action - org.codehaus.plexus.spe.action.SaveUserAction - save-user - - - - org.codehaus.plexus.jdo.JdoFactory - org.codehaus.plexus.jdo.DefaultJdoFactory - - - - javax.jdo.PersistenceManagerFactoryClass - org.jpox.PersistenceManagerFactoryImpl - - - javax.jdo.option.ConnectionDriverName - org.hsqldb.jdbcDriver - - - javax.jdo.option.ConnectionURL - jdbc:hsqldb:mem - - - javax.jdo.option.ConnectionUserName - sa - - - javax.jdo.option.ConnectionPassword - - - - org.jpox.autoCreateSchema - true - - - org.jpox.autoStartMechanism - SchemaTable - - - org.jpox.autoStartMechanismMode - Quiet - - - - - - diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/log4j.properties b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/log4j.properties deleted file mode 100644 index 1b85689d7..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/log4j.properties +++ /dev/null @@ -1,25 +0,0 @@ -# Define the destination and format of our logging -log4j.appender.root=org.apache.log4j.ConsoleAppender -log4j.appender.root.layout=org.apache.log4j.PatternLayout -log4j.appender.root.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%c] - %m%n - -# JPOX Categories -#log4j.category.JPOX=WARN, root -log4j.category.JPOX.RDBMS=ERROR, root -#log4j.category.JPOX.RDBMS.Schema=WARN, root -#log4j.category.JPOX.RDBMS.DDL=DEBUG, root -#log4j.category.JPOX.RDBMS.SQL=WARN, root - -#log4j.category.JPOX.JDO=DEBUG, root -#log4j.category.JPOX.Cache=DEBUG, root -#log4j.category.JPOX.MetaData=DEBUG, root -#log4j.category.JPOX.General=DEBUG, root -#log4j.category.JPOX.Utility=DEBUG, root -#log4j.category.JPOX.Transaction=DEBUG, root -#log4j.category.JPOX.RDBMS=DEBUG, root -#log4j.category.JPOX.RDBMS.Schema=DEBUG, root -#log4j.category.JPOX.RDBMS.DDL=DEBUG, root -#log4j.category.JPOX.RDBMS.SQL=DEBUG, root -#log4j.category.JPOX.Enhancer.Parser=DEBUG, root -#log4j.category.JPOX.Enhancer=DEBUG, root -#log4j.category.JPOX.SchemaTool=DEBUG, root diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/process/exception-throwing-process.xml b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/process/exception-throwing-process.xml deleted file mode 100644 index da79235ea..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/process/exception-throwing-process.xml +++ /dev/null @@ -1,22 +0,0 @@ - - exception-throwing-process - plexus-action - - - - echo-message - - - Configuration Hello World! - - - - - throw-exception - - - false - - - - diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/process/process-1.xml b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/process/process-1.xml deleted file mode 100644 index ee96e034e..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/process/process-1.xml +++ /dev/null @@ -1,19 +0,0 @@ - - hello-world - plexus-action - - - - echo-message - - - Configuration Hello World! - - - - - echo-message - - - - diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/process/process-2.xml b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/process/process-2.xml deleted file mode 100644 index 44824ef11..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/process/process-2.xml +++ /dev/null @@ -1,25 +0,0 @@ - - context-modifying-process - plexus-action - - - - echo-message - - - - - set-context - - - message - Modified Hello World! - - - - - echo-message - - - - diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/process/process-3.xml b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/process/process-3.xml deleted file mode 100644 index 867e4c523..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/process/process-3.xml +++ /dev/null @@ -1,34 +0,0 @@ - - ant-based-process - plexus-action - - - - echo-message - - - Doing! - - - - - ant - ant - - - - - Hello World! - - - - - - echo-message - - - Done! - - - - diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/process/process-4.xml b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/process/process-4.xml deleted file mode 100644 index 5dbfd2eab..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/process/process-4.xml +++ /dev/null @@ -1,14 +0,0 @@ - - process-4 - plexus-action - - - - save-user - - - trygvis - - - - diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/process/runtime-exception-throwing-process.xml b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/process/runtime-exception-throwing-process.xml deleted file mode 100644 index 77a94a5d6..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-core/src/test/resources/process/runtime-exception-throwing-process.xml +++ /dev/null @@ -1,22 +0,0 @@ - - runtime-exception-throwing-process - plexus-action - - - - echo-message - - - Configuration Hello World! - - - - - throw-exception - - - true - - - - diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-model/pom.xml b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-model/pom.xml deleted file mode 100644 index 590667a57..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-model/pom.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - plexus-spe - org.codehaus.plexus - 1.0-SNAPSHOT - - 4.0.0 - plexus-spe-model - Plexus Simple Process Engine Model - 1.0-SNAPSHOT - - - org.codehaus.plexus - plexus-jdo2 - - - org.apache.maven.continuum.jpox - jpox - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - 1.5 - - - - org.codehaus.modello - modello-maven-plugin - 1.0-alpha-9-SNAPSHOT - - - - - process-descriptor - - java - xpp3-reader - - - 1.0.0 - false - src/main/modello/process-descriptor.xml - - - - store - - java - jpox-jdo-mapping - - - 1.0.0 - false - src/main/modello/store.xml - - - - - 1.0.0 - false - - - - org.codehaus.mojo - jpox-maven-plugin - 1.0.2-SNAPSHOT - - - - enhance - - - - - - jpox - jpox - 1.1.0-rc-1 - - - javax.sql - jdbc-stdext - - - javax.resource - connector - - - javax.security - jaas - - - - - - - - diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-model/src/main/modello/process-descriptor.xml b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-model/src/main/modello/process-descriptor.xml deleted file mode 100644 index 31c83937c..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-model/src/main/modello/process-descriptor.xml +++ /dev/null @@ -1,63 +0,0 @@ - - process-descriptor - ProcessDescriptor - Plexus Simple Process Engines's process descriptor object model. - - - package - org.codehaus.plexus.spe.model - - - - - - ProcessDescriptor - 1.0.0+ - - - id - String - true - 1.0.0+ - - - defaultExecutorId - String - true - 1.0.0+ - - - steps - List - 1.0.0+ - - StepDescriptor - * - - - - - - - StepDescriptor - 1.0.0+ - - - executorId - String - 1.0.0+ - - - executorConfiguration - DOM - 1.0.0+ - - - configuration - DOM - 1.0.0+ - - - - - diff --git a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-model/src/main/modello/store.xml b/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-model/src/main/modello/store.xml deleted file mode 100644 index fa1be675c..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/plexus-spe-model/src/main/modello/store.xml +++ /dev/null @@ -1,1082 +0,0 @@ - - plexus- - SimpleProcessEngine - Plexus Simple Process Engines's object model. - - - package - org.codehaus.plexus.spe.model - - - - - - ProcessInstance - 1.0.0+ - - - instanceId - int - true - 1.0.0+ - - - processId - String - 1.0.0+ - - - createdTime - long - - - endTime - long - 1.0.0+ - - - errorMessage - String - 1.0.0+ - - - completed - boolean - 1.0.0+ - - - steps - List - 1.0.0+ - - StepInstance - * - - - - context - Map - 1.0.0+ - - ContextValue - * - - - - - - - StepInstance - 1.0.0+ - - - executorId - String - 1.0.0+ - - - startTime - long - 1.0.0+ - - - endTime - long - 1.0.0+ - - - exception - String - 1.0.0+ - - - - - - ContextValue - 1.0.0+ - - - value - byte[] - 1.0.0+ - - - - - - - diff --git a/plexus-sandbox/plexus-components/plexus-spe/pom.xml b/plexus-sandbox/plexus-components/plexus-spe/pom.xml deleted file mode 100644 index 5fa5ba4e0..000000000 --- a/plexus-sandbox/plexus-components/plexus-spe/pom.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - plexus-components - org.codehaus.plexus - 1.1.4 - - 4.0.0 - plexus-spe - Plexus Simple Process Engine - 1.0-SNAPSHOT - pom - - - - org.codehaus.plexus - plexus-container-default - 1.0-alpha-10-SNAPSHOT - - - ant - ant - 1.6.5 - - - org.codehaus.plexus - plexus-action - 1.0-alpha-6 - - - hsqldb - hsqldb - 1.8.0.1 - - - org.codehaus.plexus - plexus-jdo2 - 1.0-alpha-4-SNAPSHOT - - - xerces - xmlParserAPIs - - - xerces - xercesImpl - - - - - org.apache.maven.continuum.jpox - jpox - 1.1.0-20060413 - - - ant - ant - - - javax.sql - jdbc-stdext - - - javax.resource - connector - - - javax.security - jaas - - - ojdbc - ojdbc - - - - - - - - - maven-compiler-plugin - - 1.5 - 1.5 - - - - - - plexus-spe-core - plexus-spe-model - - diff --git a/plexus-sandbox/plexus-components/plexus-tomcat/pom.xml b/plexus-sandbox/plexus-components/plexus-tomcat/pom.xml deleted file mode 100644 index 1548f6ca8..000000000 --- a/plexus-sandbox/plexus-components/plexus-tomcat/pom.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - plexus-components - org.codehaus.plexus - 1.1.4 - - 4.0.0 - plexus-tomcat - Plexus Apache Tomcat Components - 1.0-alpha-1-SNAPSHOT - - - javax.servlet - servlet-api - 2.4 - provided - - - javax.servlet - jsp-api - 2.0 - provided - - - org.codehaus.plexus - plexus-container-default - 1.0-alpha-9 - - - tomcat - catalina - 5.0.28 - test - - - tomcat - jasper-compiler - 5.0.28 - test - - - tomcat - jasper-runtime - 5.0.28 - test - - - ant - ant - 1.6.5 - test - - - tomcat - catalina-ant - 5.0.28 - test - - - tomcat - catalina-optional - 5.0.28 - test - - - tomcat - tomcat-util - 5.0.28 - test - - - tomcat - tomcat-coyote - 5.0.28 - test - - - tomcat - tomcat-http11 - 5.0.28 - test - - - tomcat - servlets-default - 5.0.28 - test - - - tomcat - servlets-common - 5.0.28 - test - - - tomcat - naming-resources - 5.0.28 - test - - - tomcat - naming-common - 5.0.28 - test - - - commons-digester - commons-digester - 1.7 - test - - - commons-modeler - commons-modeler - 1.1M1 - test - - - commons-el - commons-el - 1.0 - test - - - regexp - regexp - 1.3 - test - - - diff --git a/plexus-sandbox/plexus-components/plexus-tomcat/src/main/java/org/codehaus/plexus/tomcat/DefaultPlexusTomcat.java b/plexus-sandbox/plexus-components/plexus-tomcat/src/main/java/org/codehaus/plexus/tomcat/DefaultPlexusTomcat.java deleted file mode 100644 index f57248e18..000000000 --- a/plexus-sandbox/plexus-components/plexus-tomcat/src/main/java/org/codehaus/plexus/tomcat/DefaultPlexusTomcat.java +++ /dev/null @@ -1,227 +0,0 @@ -package org.codehaus.plexus.tomcat; - -import org.apache.catalina.Connector; -import org.apache.catalina.Container; -import org.apache.catalina.Context; -import org.apache.catalina.Engine; -import org.apache.catalina.Host; -import org.apache.catalina.LifecycleException; -import org.apache.catalina.Logger; -import org.apache.catalina.startup.Embedded; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; -import org.codehaus.plexus.util.FileUtils; - -import javax.management.ObjectName; -import java.io.File; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class DefaultPlexusTomcat - extends AbstractLogEnabled - implements PlexusTomcat, Initializable -{ - // ---------------------------------------------------------------------- - // Configuration - // ---------------------------------------------------------------------- - - private File catalinaHome; - - private File contextRoot; - - private String defaultHost; - - private Logger logger; - - // ---------------------------------------------------------------------- - // Instance Variables - // ---------------------------------------------------------------------- - - private Embedded embedded; - - private Engine engine; - - // ---------------------------------------------------------------------- - // PlexusTomcat Implementation - // ---------------------------------------------------------------------- - - public void setCatalinaHome( File catalinaHome ) - { - this.catalinaHome = catalinaHome; - - System.setProperty( "catalina.home", catalinaHome.getAbsolutePath() ); - } - - public void setContextRoot( File contextRoot ) - { - this.contextRoot = contextRoot; - } - - public void setLogger( Logger logger ) - { - this.logger = logger; - } - - public void setDefaultHost( String defaultHost ) - { - this.defaultHost = defaultHost; - } - - public Engine getEngine() - { - return engine; - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - public Host addHost( String hostName, String webapps ) - { - Host host = embedded.createHost( hostName, webapps ); - -// engine.addChild( host ); - -// if ( engine.getDefaultHost() == null ) -// { -// System.err.println( "Setting default host to: '" + host.getName() + "'." ); -// engine.setDefaultHost( host.getName() ); -// } - - return host; - } - - public Connector addConnector( String host, int port, boolean secure ) - { - Connector connector = embedded.createConnector( host, port, secure ); - - embedded.addConnector( connector ); - - return connector; - } - - public Context addContext( String hostName, String contextName, String contextPath, File path ) - { - hostName = hostName.toLowerCase(); - - Context context = embedded.createContext( contextPath, path.getAbsolutePath() ); - - context.setName( contextName ); - - Container child = engine.findChild( hostName ); - - if ( child == null ) - { - throw new RuntimeException( "Could not find host '" + hostName + "'." ); - } - - if ( !( child instanceof Host ) ) - { - throw new RuntimeException( "Child is not of type Host, but rather: " + child.getClass() ); - } - -// Host host = (Host) child; -// System.err.println( "Adding " + context.getName() + " as a child of " + host.getName() ); -// host.addChild( context ); - - return context; - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - public void startTomcat() - throws LifecycleException - { - if ( catalinaHome == null ) - { - throw new LifecycleException( "Catalina home has to be set." ); - } - - if ( contextRoot == null ) - { - throw new LifecycleException( "The context root has to be set." ); - } - - FileUtils.mkdir( catalinaHome.getAbsolutePath() ); - FileUtils.mkdir( contextRoot.getAbsolutePath() ); - - System.setProperty( "catalina.home", catalinaHome.getAbsolutePath() ); - -// if ( logger == null ) -// { -// embedded.setLogger( new PlexusCatalinaLogger( getLogger() ) ); -// } -// else -// { -// embedded.setLogger( new SystemErrLogger() ); -// } - -// FileLogger fileLog = new FileLogger(); -// fileLog.setDirectory( "/tmp" ); -// fileLog.setPrefix( "tomcat" ); -// fileLog.setSuffix( ".log" ); -// fileLog.setTimestamp( true ); -// embedded.setLogger( fileLog ); -// -// embedded.setDebug( 5 ); -// -// if ( defaultHost != null ) -// { -// engine.setDefaultHost( defaultHost ); -// } -// - embedded.setName( "Plexus Tomcat Embedded" ); - - embedded.addEngine( engine ); - - embedded.start(); - - addConnector( "localhost", 8080, false ).initialize(); - - // ---------------------------------------------------------------------- - // Debugging - // ---------------------------------------------------------------------- - - System.err.println( "Container name: " + embedded.getContainerName() ); - - ObjectName[] connectorNames = embedded.getConnectorNames(); - for ( ObjectName connectorName : connectorNames ) - { - System.err.println( "Connector name: " + connectorName ); - } - } - - public void stopTomcat() - throws LifecycleException - { - try - { - embedded.stop(); - } - finally - { - embedded.destroy(); - } - } - - // ---------------------------------------------------------------------- - // Component Lifecycle - // ---------------------------------------------------------------------- - - public void initialize() - throws InitializationException - { - embedded = new Embedded(); - - engine = embedded.createEngine(); - - engine.setName( "Plexus Tomcat Engine" ); - - engine.setDefaultHost( "localhost" ); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-tomcat/src/main/java/org/codehaus/plexus/tomcat/PlexusCatalinaLogger.java b/plexus-sandbox/plexus-components/plexus-tomcat/src/main/java/org/codehaus/plexus/tomcat/PlexusCatalinaLogger.java deleted file mode 100644 index 0e0e2bf39..000000000 --- a/plexus-sandbox/plexus-components/plexus-tomcat/src/main/java/org/codehaus/plexus/tomcat/PlexusCatalinaLogger.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.codehaus.plexus.tomcat; - -import org.apache.catalina.Logger; -import org.apache.catalina.Container; - -import java.beans.PropertyChangeListener; -import java.util.List; -import java.util.ArrayList; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class PlexusCatalinaLogger - implements Logger -{ - private org.codehaus.plexus.logging.Logger plexusLogger; - - private Container container; - - private List listeners = new ArrayList(); - - public PlexusCatalinaLogger( org.codehaus.plexus.logging.Logger plexusLogger ) - { - this.plexusLogger = plexusLogger; - } - - public Container getContainer() - { - return container; - } - - public void setContainer( Container container ) - { - this.container = container; - } - - public String getInfo() - { - return null; - } - - public int getVerbosity() - { - return 0; // This _can_ be translated, but who cares? - } - - public void setVerbosity( int i ) - { - // ignored - } - - public void addPropertyChangeListener( PropertyChangeListener propertyChangeListener ) - { - listeners.add( propertyChangeListener ); - } - - public void log( String string ) - { - plexusLogger.info( string ); - } - - public void log( Exception exception, String string ) - { - plexusLogger.info( string, exception ); - } - - public void log( String string, Throwable throwable ) - { - plexusLogger.info( string, throwable ); - } - - public void log( String string, int i ) - { - plexusLogger.info( string ); - } - - public void log( String string, Throwable throwable, int i ) - { - plexusLogger.info( string, throwable ); - } - - public void removePropertyChangeListener( PropertyChangeListener propertyChangeListener ) - { - listeners.remove( propertyChangeListener ); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-tomcat/src/main/java/org/codehaus/plexus/tomcat/PlexusTomcat.java b/plexus-sandbox/plexus-components/plexus-tomcat/src/main/java/org/codehaus/plexus/tomcat/PlexusTomcat.java deleted file mode 100644 index 01c6f2070..000000000 --- a/plexus-sandbox/plexus-components/plexus-tomcat/src/main/java/org/codehaus/plexus/tomcat/PlexusTomcat.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.codehaus.plexus.tomcat; - -import org.apache.catalina.Connector; -import org.apache.catalina.Logger; -import org.apache.catalina.Context; -import org.apache.catalina.LifecycleException; -import org.apache.catalina.Host; -import org.apache.catalina.Engine; - -import java.io.File; - -/** - * @author Trygve Laugstøl - * @version $Id$ -*/ -public interface PlexusTomcat -{ - String ROLE = PlexusTomcat.class.getName(); - - void setCatalinaHome( File catalinaHome ); - - void setContextRoot( File contextRoot ); - - void setLogger( Logger logger ); - - void setDefaultHost( String host ); - - Engine getEngine(); - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - Host addHost( String hostName, String webapps ); - - Connector addConnector( String host, int port, boolean secure ); - - Context addContext( String host, String contextName, String contextPath, File path ); - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - void startTomcat() - throws LifecycleException; - - void stopTomcat() - throws LifecycleException; -} diff --git a/plexus-sandbox/plexus-components/plexus-tomcat/src/main/resources/META-INF/plexus/components.xml b/plexus-sandbox/plexus-components/plexus-tomcat/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index accf1b6c7..000000000 --- a/plexus-sandbox/plexus-components/plexus-tomcat/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - org.codehaus.plexus.tomcat.PlexusTomcat - org.codehaus.plexus.tomcat.DefaultPlexusTomcat - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-components/plexus-tomcat/src/test/java/org/codehaus/plexus/tomcat/PlexusTomcatTest.java b/plexus-sandbox/plexus-components/plexus-tomcat/src/test/java/org/codehaus/plexus/tomcat/PlexusTomcatTest.java deleted file mode 100644 index d48f285f5..000000000 --- a/plexus-sandbox/plexus-components/plexus-tomcat/src/test/java/org/codehaus/plexus/tomcat/PlexusTomcatTest.java +++ /dev/null @@ -1,129 +0,0 @@ -package org.codehaus.plexus.tomcat; - -import org.apache.catalina.Connector; -import org.apache.catalina.Context; -import org.apache.catalina.Engine; -import org.apache.catalina.Host; -import org.apache.catalina.startup.Embedded; -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.util.FileUtils; -import org.codehaus.plexus.util.IOUtil; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class PlexusTomcatTest - extends PlexusTestCase -{ - public void testTomcat() - throws Exception - { - String catalinaHome = "/home/trygvis/servers/jakarta-tomcat-5.0.28/"; - String contextRoot = "src/main/webapp"; - - FileUtils.mkdir( catalinaHome ); - FileUtils.mkdir( contextRoot ); - - System.setProperty( "catalina.home", catalinaHome ); - - Embedded embedded = new Embedded(); -// embedded.setDebug( 1000 ); -// embedded.setLogger( new SystemOutLogger() ); - - Engine engine = embedded.createEngine(); - engine.setDefaultHost( "localhost" ); - - Host host = embedded.createHost( "localhost", catalinaHome + "/webapps" ); - engine.addChild( host ); - - Context context = embedded.createContext( "", getTestPath( "src/main/webapp" ) ); -// context.setName( "Unprotected Context" ); - host.addChild( context ); - - context = embedded.createContext( "/protected", getTestPath( "src/main/webapp" ) ); -// context.setName( "Protected Context"); - host.addChild( context ); - - embedded.addEngine( engine ); - - Connector connector = embedded.createConnector( "0.0.0.0", 8080, false ); - embedded.addConnector( connector ); - - embedded.start(); - - System.err.println( "RUNNING" ); - getUrl( "http://localhost:8080" ); - System.err.println( "STOPPING" ); - - embedded.stop(); - - embedded.destroy(); - } - - public void testBasic() - throws Exception - { - File catalinaHome = new File( "/home/trygvis/servers/jakarta-tomcat-5.0.28/" ); - File contextRoot = getTestFile( "target/context-root" ); - - System.setProperty( "catalina.home", catalinaHome.getAbsolutePath() ); - - FileUtils.deleteDirectory( contextRoot ); - FileUtils.mkdir( contextRoot.getAbsolutePath() ); - - PlexusTomcat tomcat = (PlexusTomcat) lookup( PlexusTomcat.ROLE ); - tomcat.setContextRoot( contextRoot ); - tomcat.setCatalinaHome( catalinaHome ); - - Engine engine = tomcat.getEngine(); - - Host host = tomcat.addHost( "localhost", "/tmp/foo" ); - engine.addChild( host ); - - Context context = tomcat.addContext( host.getName(), "Unprotected Context", "", new File( "/" ) ); - host.addChild( context ); - - context = tomcat.addContext( host.getName(), "Protected Context", "/protected", new File( "/" ) ); - host.addChild( context ); - -// JNDIRealm realm = new JNDIRealm(); -// realm.setConnectionURL( "ldap://localhost:10389" ); -// realm.setAlternateURL( "ldap://localhost:10390" ); -// realm.setRoleBase( "ou=Groups,dc=objectware,dc=no" ); -// realm.setRoleName( "roleOccupant" ); -// realm.setUserBase( "ou=People,dc=objectware,dc=no" ); -// -// context.setRealm( realm ); - - tomcat.startTomcat(); - System.err.println( "RUNNING" ); - -// tomcat.addConnector( "localhost", 8080, false ); - -// Thread.sleep( 60000 ); - Thread.sleep( 10000 ); - - getUrl( "http://localhost:8080" ); - System.err.println( "STOPPING" ); - - tomcat.stopTomcat(); - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - private void getUrl( String url ) - throws IOException - { - InputStream inputStream = new URL( url ).openStream(); - String content = IOUtil.toString( inputStream ); - System.err.println( content ); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-tomcat/src/test/resources/webapp/WEB-INF/web.xml b/plexus-sandbox/plexus-components/plexus-tomcat/src/test/resources/webapp/WEB-INF/web.xml deleted file mode 100644 index 2d4a2a85b..000000000 --- a/plexus-sandbox/plexus-components/plexus-tomcat/src/test/resources/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - Objectware Admin Web Application - - diff --git a/plexus-sandbox/plexus-components/plexus-workflow/pom.xml b/plexus-sandbox/plexus-components/plexus-workflow/pom.xml deleted file mode 100644 index 272442a34..000000000 --- a/plexus-sandbox/plexus-components/plexus-workflow/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - 4.0.0 - - org.codehaus.plexus - plexus-components - 1.1.5 - - plexus-workflow - 1.0-alpha-1-SNAPSHOT - Plexus Workflow Component - - - werkflow - werkflow - 2.0-alpha-2-SNAPSHOT - - - plexus - plexus-action - 1.0-alpha-1 - - - plexus - plexus-jdo - 1.0-alpha-2 - - - - xml-apis - xml-apis - 2.0.2 - test - - - xerces - xercesImpl - 2.6.2 - test - - - diff --git a/plexus-sandbox/plexus-components/plexus-workflow/src/main/java/org/codehaus/plexus/workflow/DefaultWorkflowActionManager.java b/plexus-sandbox/plexus-components/plexus-workflow/src/main/java/org/codehaus/plexus/workflow/DefaultWorkflowActionManager.java deleted file mode 100644 index 7eb4b96f1..000000000 --- a/plexus-sandbox/plexus-components/plexus-workflow/src/main/java/org/codehaus/plexus/workflow/DefaultWorkflowActionManager.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.codehaus.plexus.workflow; - -import org.codehaus.plexus.action.Action; -import org.codehaus.plexus.action.DefaultActionManager; -import org.codehaus.werkflow.spi.Instance; - -import java.util.HashMap; -import java.util.Properties; - -/** - * WerkflowActionManager - * - * @author Dan Diephouse - */ -public class DefaultWorkflowActionManager - extends DefaultActionManager - implements WorkflowActionManager -{ - public void perform( String actionId, Instance instance, Properties properties ) - throws Exception - { - Action action = lookup( actionId ); - - HashMap map = new HashMap(); - - map.put( "instance", instance ); - - properties.put( "actionId", actionId ); - - map.put( "properties", properties ); - - action.execute( map ); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-workflow/src/main/java/org/codehaus/plexus/workflow/DefaultWorkflowEngine.java b/plexus-sandbox/plexus-components/plexus-workflow/src/main/java/org/codehaus/plexus/workflow/DefaultWorkflowEngine.java deleted file mode 100644 index a36761d5b..000000000 --- a/plexus-sandbox/plexus-components/plexus-workflow/src/main/java/org/codehaus/plexus/workflow/DefaultWorkflowEngine.java +++ /dev/null @@ -1,208 +0,0 @@ -package org.codehaus.plexus.workflow; - -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.StoppingException; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException; -import org.codehaus.werkflow.DuplicateInstanceException; -import org.codehaus.werkflow.Engine; -import org.codehaus.werkflow.InitialContext; -import org.codehaus.werkflow.NoSuchInstanceException; -import org.codehaus.werkflow.NoSuchWorkflowException; -import org.codehaus.werkflow.Transaction; -import org.codehaus.werkflow.Workflow; -import org.codehaus.werkflow.helpers.SimpleInstanceManager; -import org.codehaus.werkflow.helpers.SimplePersistenceManager; -import org.codehaus.werkflow.helpers.SimpleSatisfactionManager; -import org.codehaus.werkflow.helpers.SimpleWorkflowManager; -import org.codehaus.werkflow.simple.ExpressionFactory; -import org.codehaus.werkflow.simple.SimpleWorkflowReader; -import org.codehaus.werkflow.simple.ognl.OgnlExpressionFactory; -import org.codehaus.werkflow.spi.InstanceManager; -import org.codehaus.werkflow.spi.PersistenceManager; -import org.codehaus.werkflow.spi.RobustInstance; -import org.codehaus.werkflow.spi.SatisfactionManager; -import org.codehaus.werkflow.spi.WorkflowManager; - -import java.io.File; -import java.util.Map; - -/** - * The default WerkflowComponent implementation. - * - * @author Dan Diephouse - */ -public class DefaultWorkflowEngine - extends AbstractLogEnabled - implements WorkflowEngine, Initializable, Startable -{ - // ---------------------------------------------------------------------- - // Requirements - // ---------------------------------------------------------------------- - - private WorkflowActionManager actionManager; - - private WorkflowErrorHandler errorHandler; - - // ---------------------------------------------------------------------- - // Configuration - // ---------------------------------------------------------------------- - - private String workflowDirectory; - - // ---------------------------------------------------------------------- - // Fields - // ---------------------------------------------------------------------- - - private Engine engine; - - private ExpressionFactory expressionFactory; - - // ---------------------------------------------------------------------- - // Implementation - // ---------------------------------------------------------------------- - - public Workflow getWorkflow( String id ) - throws NoSuchWorkflowException - { - return engine.getWorkflowManager().getWorkflow( id ); - } - - public void startWorkflow( String workflowId, String instanceId, Map properties ) - throws NoSuchWorkflowException, DuplicateInstanceException,InterruptedException,Exception - { - InitialContext context = createContext( properties ); - - Transaction transaction = beginTransaction( workflowId, instanceId, context ); - - transaction.commit(); - } - - public Transaction beginTransaction( String workflowId, String instanceId, InitialContext context ) - throws NoSuchWorkflowException, DuplicateInstanceException,InterruptedException,Exception - { - return engine.beginTransaction( workflowId, instanceId, context ); - } - - public Transaction beginTransaction( String instanceId ) - throws NoSuchInstanceException,InterruptedException,Exception - { - return engine.beginTransaction( instanceId ); - } - - public RobustInstance getInstance( String instanceId ) - throws NoSuchInstanceException,Exception - { - return engine.getInstanceManager().getInstance( instanceId ); - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - public ExpressionFactory getExpressionFactory() - { - return expressionFactory; - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - protected InitialContext createContext( Map parameters ) - { - InitialContext context = new InitialContext( parameters ); - - context.set( "true", Boolean.TRUE ); - - context.set( "false", Boolean.FALSE ); - - return context; - } - - private void loadWerkflows() - throws Exception - { - File werkflowDirFile = new File( workflowDirectory ); - - if ( !werkflowDirFile.isDirectory() ) - { - getLogger().warn( workflowDirectory + " is not a valid directory for werkflows." ); - } - else - { - File[] werkflows = werkflowDirFile.listFiles(); - - for ( int i = 0; i < werkflows.length; i++ ) - { - if ( werkflows[i].getAbsolutePath().endsWith( ".xml" ) ) - { - Workflow workflow = SimpleWorkflowReader.read( actionManager, - expressionFactory, - werkflows[i] ); - - engine.getWorkflowManager().addWorkflow( workflow ); - - getLogger().info( "Loaded workflow: " + werkflows[i] ); - } - } - } - } - - // ---------------------------------------------------------------------- - // Lifecylce Management - // ---------------------------------------------------------------------- - - /** - * @see org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable#initialize() - */ - public void initialize() - throws InitializationException - { - PersistenceManager pm = new SimplePersistenceManager(); - - WorkflowManager wm = new SimpleWorkflowManager(); - - SatisfactionManager sm = new SimpleSatisfactionManager(); - - InstanceManager im = new SimpleInstanceManager(); - - engine = new Engine(); - - engine.setPersistenceManager( pm ); - - engine.setSatisfactionManager( sm ); - - engine.setWorkflowManager( wm ); - - engine.setInstanceManager( im ); - - engine.setErrorHandler( errorHandler ); - - expressionFactory = new OgnlExpressionFactory(); - - } - - public void start() - throws StartingException - { - engine.start(); - - try - { - loadWerkflows(); - } - catch ( Exception e ) - { - throw new StartingException( "Cannot load workflows: ", e ); - } - } - - public void stop() - throws StoppingException - { - engine.stop(); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-workflow/src/main/java/org/codehaus/plexus/workflow/DefaultWorkflowErrorHandler.java b/plexus-sandbox/plexus-components/plexus-workflow/src/main/java/org/codehaus/plexus/workflow/DefaultWorkflowErrorHandler.java deleted file mode 100644 index 2869c3938..000000000 --- a/plexus-sandbox/plexus-components/plexus-workflow/src/main/java/org/codehaus/plexus/workflow/DefaultWorkflowErrorHandler.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.codehaus.plexus.workflow; - -/** - * @author Jason van Zyl - * @version $Id$ - */ -public class DefaultWorkflowErrorHandler - implements WorkflowErrorHandler -{ - public void handle( Throwable throwable ) - { - } -} diff --git a/plexus-sandbox/plexus-components/plexus-workflow/src/main/java/org/codehaus/plexus/workflow/WorkflowActionManager.java b/plexus-sandbox/plexus-components/plexus-workflow/src/main/java/org/codehaus/plexus/workflow/WorkflowActionManager.java deleted file mode 100644 index 2d0fd7374..000000000 --- a/plexus-sandbox/plexus-components/plexus-workflow/src/main/java/org/codehaus/plexus/workflow/WorkflowActionManager.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.codehaus.plexus.workflow; - -import org.codehaus.werkflow.simple.ActionManager; - -/** - * @author Jason van Zyl - * @version $Id$ - */ -public interface WorkflowActionManager - extends ActionManager -{ - static String ROLE = WorkflowActionManager.class.getName(); -} diff --git a/plexus-sandbox/plexus-components/plexus-workflow/src/main/java/org/codehaus/plexus/workflow/WorkflowEngine.java b/plexus-sandbox/plexus-components/plexus-workflow/src/main/java/org/codehaus/plexus/workflow/WorkflowEngine.java deleted file mode 100644 index 2c142e759..000000000 --- a/plexus-sandbox/plexus-components/plexus-workflow/src/main/java/org/codehaus/plexus/workflow/WorkflowEngine.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.codehaus.plexus.workflow; - -import org.codehaus.werkflow.DuplicateInstanceException; -import org.codehaus.werkflow.InitialContext; -import org.codehaus.werkflow.NoSuchInstanceException; -import org.codehaus.werkflow.NoSuchWorkflowException; -import org.codehaus.werkflow.Transaction; -import org.codehaus.werkflow.Workflow; -import org.codehaus.werkflow.spi.RobustInstance; - -import java.util.Map; -import java.util.Properties; - -/** - * The Plexus Werkflow component. - * - * @author Dan Diephouse - */ -public interface WorkflowEngine -{ - String ROLE = WorkflowEngine.class.getName(); - - Workflow getWorkflow( String id ) - throws NoSuchWorkflowException; - - Transaction beginTransaction( String workflowId, String instanceId, InitialContext context ) - throws NoSuchWorkflowException, DuplicateInstanceException,InterruptedException,Exception; - - Transaction beginTransaction( String instanceId ) - throws NoSuchInstanceException,InterruptedException,Exception; - - RobustInstance getInstance( String instanceId ) - throws NoSuchInstanceException,Exception; - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - void startWorkflow( String workflowId, String instanceId, Map properties ) - throws NoSuchWorkflowException, DuplicateInstanceException,InterruptedException,Exception; -} diff --git a/plexus-sandbox/plexus-components/plexus-workflow/src/main/java/org/codehaus/plexus/workflow/WorkflowErrorHandler.java b/plexus-sandbox/plexus-components/plexus-workflow/src/main/java/org/codehaus/plexus/workflow/WorkflowErrorHandler.java deleted file mode 100644 index b91beaaf9..000000000 --- a/plexus-sandbox/plexus-components/plexus-workflow/src/main/java/org/codehaus/plexus/workflow/WorkflowErrorHandler.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.codehaus.plexus.workflow; - -import org.codehaus.werkflow.spi.ErrorHandler; - -/** - * @author Jason van Zyl - * @version $Id$ - */ -public interface WorkflowErrorHandler - extends ErrorHandler -{ -} diff --git a/plexus-sandbox/plexus-components/plexus-workflow/src/main/resources/META-INF/plexus/components.xml b/plexus-sandbox/plexus-components/plexus-workflow/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index 81c880f23..000000000 --- a/plexus-sandbox/plexus-components/plexus-workflow/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - org.codehaus.plexus.workflow.WorkflowEngine - org.codehaus.plexus.workflow.DefaultWorkflowEngine - - ${plexus.home}/werkflows/ - - - - org.codehaus.plexus.workflow.WorkflowActionManager - org.codehaus.plexus.workflow.DefaultWorkflowActionManager - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-components/plexus-workflow/src/test/java/org/codehaus/plexus/workflow/continuum/Build.java b/plexus-sandbox/plexus-components/plexus-workflow/src/test/java/org/codehaus/plexus/workflow/continuum/Build.java deleted file mode 100644 index 27b23a88c..000000000 --- a/plexus-sandbox/plexus-components/plexus-workflow/src/test/java/org/codehaus/plexus/workflow/continuum/Build.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2005 Your Corporation. All Rights Reserved. - */ -package org.codehaus.plexus.workflow.continuum; - -import java.util.Map; -import java.util.Properties; - -import junit.framework.Assert; - -import org.codehaus.plexus.action.Action; -import org.codehaus.werkflow.spi.Instance; - -/** - * @author Dan Diephouse - */ -public class Build - extends Assert - implements Action -{ - public void execute( Map context ) - throws Exception - { - Instance instance = (Instance) context.get( "instance" ); - - Properties properties = (Properties) context.get( "properties" ); - - instance.put( "action-build", "done" ); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-workflow/src/test/java/org/codehaus/plexus/workflow/continuum/ContinuumWorkflowTest.java b/plexus-sandbox/plexus-components/plexus-workflow/src/test/java/org/codehaus/plexus/workflow/continuum/ContinuumWorkflowTest.java deleted file mode 100644 index f824af667..000000000 --- a/plexus-sandbox/plexus-components/plexus-workflow/src/test/java/org/codehaus/plexus/workflow/continuum/ContinuumWorkflowTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2005 Your Corporation. All Rights Reserved. - */ -package org.codehaus.plexus.workflow.continuum; - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.workflow.WorkflowEngine; -import org.codehaus.werkflow.Engine; -import org.codehaus.werkflow.InitialContext; -import org.codehaus.werkflow.Transaction; -import org.codehaus.werkflow.Workflow; -import org.codehaus.werkflow.spi.RobustInstance; -import org.codehaus.werkflow.spi.SatisfactionSpec; -import org.codehaus.werkflow.spi.DefaultSatisfactionValues; -import org.codehaus.werkflow.spi.Instance; - -import java.util.Arrays; -import java.util.HashMap; - -/** - * DefaultWerkflowServiceTest - * - * @author Dan Diephouse - */ -public class ContinuumWorkflowTest - extends PlexusTestCase -{ - public void testWerkflow() - throws Exception - { - WorkflowEngine workflowEngine = (WorkflowEngine) lookup( WorkflowEngine.ROLE ); - - workflowEngine.startWorkflow( "continuum", "instance", new HashMap() ); - - try - { - Thread.sleep( 100 ); - } - catch ( InterruptedException ie ) - { - } - - RobustInstance instance = workflowEngine.getInstance( "instance" ); - - assertEquals( "instance", instance.getId() ); - - assertEquals( "done", instance.get( "action-update-scm" ) ); - - assertEquals( "done", instance.get( "action-update-metadata" ) ); - - assertEquals( "done", instance.get( "action-build" ) ); - - assertTrue( instance.hasError() ); - - assertFalse( instance.isComplete() ); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-workflow/src/test/java/org/codehaus/plexus/workflow/continuum/ErrorProducingAction.java b/plexus-sandbox/plexus-components/plexus-workflow/src/test/java/org/codehaus/plexus/workflow/continuum/ErrorProducingAction.java deleted file mode 100644 index 9f04fe0a8..000000000 --- a/plexus-sandbox/plexus-components/plexus-workflow/src/test/java/org/codehaus/plexus/workflow/continuum/ErrorProducingAction.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.codehaus.plexus.workflow.continuum; - -import java.util.Map; -import java.util.Properties; - -import junit.framework.Assert; - -import org.codehaus.plexus.action.Action; -import org.codehaus.werkflow.spi.Instance; - -/** - * @author Dan Diephouse - */ -public class ErrorProducingAction - extends Assert - implements Action -{ - public void execute( Map context ) - throws Exception - { - throw new Exception( "error" ); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-workflow/src/test/java/org/codehaus/plexus/workflow/continuum/UpdateMetadata.java b/plexus-sandbox/plexus-components/plexus-workflow/src/test/java/org/codehaus/plexus/workflow/continuum/UpdateMetadata.java deleted file mode 100644 index 2ff0ecf14..000000000 --- a/plexus-sandbox/plexus-components/plexus-workflow/src/test/java/org/codehaus/plexus/workflow/continuum/UpdateMetadata.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2005 Your Corporation. All Rights Reserved. - */ -package org.codehaus.plexus.workflow.continuum; - -import java.util.Map; -import java.util.Properties; - -import junit.framework.Assert; - -import org.codehaus.plexus.action.Action; -import org.codehaus.werkflow.spi.Instance; - -/** - * @author Dan Diephouse - */ -public class UpdateMetadata - extends Assert - implements Action -{ - public void execute( Map context ) - throws Exception - { - Instance instance = (Instance) context.get( "instance" ); - - Properties properties = (Properties) context.get( "properties" ); - - instance.put( "action-update-metadata", "done" ); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-workflow/src/test/java/org/codehaus/plexus/workflow/continuum/UpdateScm.java b/plexus-sandbox/plexus-components/plexus-workflow/src/test/java/org/codehaus/plexus/workflow/continuum/UpdateScm.java deleted file mode 100644 index c0e6ebda2..000000000 --- a/plexus-sandbox/plexus-components/plexus-workflow/src/test/java/org/codehaus/plexus/workflow/continuum/UpdateScm.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.plexus.workflow.continuum; - -import java.util.Map; -import java.util.Properties; - -import junit.framework.Assert; - -import org.codehaus.plexus.action.Action; -import org.codehaus.werkflow.spi.Instance; - -/** - * @author Dan Diephouse - */ -public class UpdateScm - extends Assert - implements Action -{ - public void execute( Map context ) - throws Exception - { - Instance instance = (Instance) context.get( "instance" ); - - Properties properties = (Properties) context.get( "properties" ); - - instance.put( "action-update-scm", "done" ); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-workflow/src/test/resources/org/codehaus/plexus/workflow/continuum/ContinuumWorkflowTest.xml b/plexus-sandbox/plexus-components/plexus-workflow/src/test/resources/org/codehaus/plexus/workflow/continuum/ContinuumWorkflowTest.xml deleted file mode 100644 index 90824d84b..000000000 --- a/plexus-sandbox/plexus-components/plexus-workflow/src/test/resources/org/codehaus/plexus/workflow/continuum/ContinuumWorkflowTest.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - org.codehaus.plexus.workflow.WorkflowEngine - org.codehaus.plexus.workflow.DefaultWorkflowEngine - - ${basedir}/src/test/werkflows/ - - - - org.codehaus.plexus.workflow.WorkflowActionManager - - - org.codehaus.plexus.workflow.WorkflowErrorHandler - - - - - org.codehaus.plexus.workflow.WorkflowActionManager - org.codehaus.plexus.workflow.DefaultWorkflowActionManager - - - org.codehaus.plexus.workflow.WorkflowErrorHandler - org.codehaus.plexus.workflow.DefaultWorkflowErrorHandler - - - org.codehaus.plexus.action.Action - update-scm - org.codehaus.plexus.workflow.continuum.UpdateScm - - - org.codehaus.plexus.action.Action - update-metadata - org.codehaus.plexus.workflow.continuum.UpdateMetadata - - - org.codehaus.plexus.action.Action - build - org.codehaus.plexus.workflow.continuum.Build - - - org.codehaus.plexus.action.Action - error - org.codehaus.plexus.workflow.continuum.ErrorProducingAction - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-components/plexus-workflow/src/test/werkflows/continuum-workflow.xml b/plexus-sandbox/plexus-components/plexus-workflow/src/test/werkflows/continuum-workflow.xml deleted file mode 100644 index 111b8c6f8..000000000 --- a/plexus-sandbox/plexus-components/plexus-workflow/src/test/werkflows/continuum-workflow.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-components/plexus-workflow/werkflow.txt b/plexus-sandbox/plexus-components/plexus-workflow/werkflow.txt deleted file mode 100644 index f9e313271..000000000 --- a/plexus-sandbox/plexus-components/plexus-workflow/werkflow.txt +++ /dev/null @@ -1,300 +0,0 @@ - but yah, I'm free Monday if you need contract werkflow help - hokay - if we run into anything i'll definitely take you up on that - i think we would like to give it a try - so my first question is exception handling - would we just need a try/catch around beginTx and handle it there? - would that be the place to have the single handler? - you have a scary memory so i assume you know what i'm talking about :-) - Engine::run(InstanceTask) - transaction.run( task.getPath() ) is where the real work is done - inside there is where you can jack in a new werkflow.spi.ErrorHandler perhaps - in impls of RobustTransaction - though, run() itself throws any exceptions - so, catch'em back in Engine.java - rollback instead of commit - is there one transaction per action? - should be - pull a task off the queue, start a tx, run it, commit/rollback - so if a task throws a exception it'll just stop the entire activity? - activity == flow - yah, it's all in Engine.java - run(Task) -> run(Tx, instanceId, path) - if it throws an exception, it'll stop, yah - since it hasn't satisfied anything to continue on - you can force another re-eval later to try again - yeah, that's also interesting to do - might be smart to resched if an exception is caught, to automatically try again - in case it's a transient failure perhaps - or require manual work - or, should be able to let it fall back and try a different option/route - this will happen when a external resource is failing (cvs server down) - ie, catch an exception, set a flag that opens up a differenet path out - so we need pluggable strategies ;) - I think it's finite - TransientFailureException to resched - otherwise, some ErrorHandler to do random other work - so if you want it to retry X times and then require manual work you'd do that in the action? - hm - is there a test that describes standard usage? - probably make the transition have some state where it's only evaled if attempt<10 or such - i'm looking at the tests and see beginTx - but not run() - for retries, etc, it's all based upon Satisfactions - a transition can be unsatified if retries>5 or such, and that one becomes ignorable - yah, the beginTx in the tests is probably just mocking up larger application transactions - since the tests are pretty much purely automated, you won't see an explicit run() - you start a flow, werkflow sees that something is in state #1 - it schedules the flow to be eval'd - the engine spins a thread (the scheduler) - which plucks things off, evals them, and transitions as required - the engine is a de-queueing loop - so, the tests will just show a flow being started, and it does the rest on its own - without explicit calls to run() - which test you looking at? - BlogWerkflowTest - is that how we should call it if we're executing a set of actions? - so, check testStartNewWorkflow() - hokay - it does tx management to get the initial state setup - gandering - the instance stalls, waiting on external data - then calls tx.satisfy(..) - which sends the instance to the queue to be checked - that uses interactive idioms - but mocks a human interacting - you never call run(), you just feed data, and werkflow figures out when it can advance further along the flow - so, you might have a BuildCompletedSatisfaction - when you join() the Process that ran the build, you fire off that, and then werkflow carries on - so you would never call run(), should it be in the public interface? - no, probably not - though, might be public for subclassing crapp - ie, Engine.java is subclassed to JdoEngine - though, protected might be better - remember when I wrote this, and what I was doing/smoking :) - hokay, i'll just make a note of that :-) - I'd say Engine should be a interface - let me paste something - trygvis: sure, but we'd need an AbstractEngine for JdoEngine to extend - which would be fine - exactly - I go through anti-interface phases sometimes - :'( - so something simple here: - other times, I have interface overload phases - - - - - - - - - yah, that'd just happen sequentially - would we just do a beginTx for that? - just newWorkflow() or whatnot, and wait a few moments - each would fall into Engine::run(..) - each would get its own Tx - I /think/, but am not sure, you would have to beginTx around newworkflow - ok, so how would start that specifically? newWorkflow is in werkflow? - we just switch plexus to svn so i don't have it setup with viewcvs - sorry, newInstance() in Engine - wait, that's not public - one sec - it's package - right, okay, here we go... - Transaction transaction = this.engine.beginTransaction(this.workflow.getId(), "een", context); - RobustInstance instance = this.engine.getInstanceManager().getInstance(transaction.getInstanceId()); - transaction.commit(); - beginTransaction() gets it almost started - but werkflow doesn't truly get ahold of it until you commit() - so, you could get away with - engine.beginTx(...).commit() - and werkflow will pick it up, and walk through the steps - you'd end up with 4 tx - 1 to begin the workflow and get it into the system - and 1 for each - the 3 tx's run through run(..) in Engine - where they might through, you can catch, and deal with - so, starting a flow is transactional, just to ensure it's positively in the db - and then each action that occurs within a flow is transactional - so, if update-scm fails, you'd still be in the very first 'start' state - and have to take remedial action - makes sense - do you also go through package protected phases? - so, catch in the engine and rollback? - trygvis: yah :) - jason: yah - we're just trying to figure out how to get the information back to the user - ok, cool - everything you need to do is in Engine - can catch, handle, report to user - run(..) is where the meat of the work occurs - so an interface for an error handler - everything else is transaction handling muck - yah, just add werkflow.spi.ErrorHandler interface - Engine.setErrorHandler(...) - hokay, will do that - and it should be integrated into run(Task) ? - next run(...) with 3 args - page down - run(Task) bounces through the persistence layer to setup the right type of tx - jdo tx, hibernate tx - then passes back to Engine.run(...,...,...) - so i shouldn't hook it around run(Path) ? - Inside of void run(RobustTransaction transaction, - String instanceId, - Path path) - don't let the error escape that, I think - wait, I'm dumb - you're right - run(InstanceTask) - catch/handle in there - hokay :-) - there's already a catch() which does the default of a rollback - just add in ErrorHandler.handle(...) to do more - so, right now, if it throws, it causes a rollback - ok, so the rollback is always prudent and the error handler would be defined more for reporting? - you just want to be able to do more - ok, so where the printStackTrace is i'll add the handler :-) - yah, if you commit(), then it'll think the action succeeded and try to do the next one - you want werkflow to know it failed on this task - what you do after that is up to you - might be a case where you open a new tx, set some values (ie, retry time, favourite cheese) and commit, and re-eval the flow to see where it can go next - ok, that sounds good. so the process is rolled back and we can alert however we like given an error handler - ie, a state might have a transition to "report success" and "report failure" - if the action fails, you rollback, set the error message on the instance, and re-eval - report failure opens up once it sees an error message - perhaps - probably a better way to model that though - I'm making dinner but just keep chatting, I'm reading the logs - 'k - for situs where an error (build failure) might be normal, I'd probably have an aciton that does the build - an action that checks the result, and sets a variable (errorMessage or such) - and then transition purely based on errorMessage - build failure != build error (at least not in continuum) - while the build had errors, the actions themselves succeeded - ie, maven ran fine, but tests failed - not to confuse where $MAVEN_HOME isn't set, and maven didn't even run - which would be an exception from werkflow's POV - yah, that's an error - yeah, same in continuum - cool - so, failures would be business-as-usual, and not go through werkflow ErrorHandler - yep - only true resource failures would do that - exactly - sounds good - it's amazing how you don't forget - I've got a freaky long-term memolry - my short-term is shot to hell, but wait a few days, and I can answer questions :) - hehe - moving back inside. too chilly on the porch - bob: how do i setup viewcvs for subversion? ---- bob is now known as bob_away ---- bob_away is now known as bob - do i need to manage the Txs at all? - to do satisfactions i need the tx? - just wondering if i can get hold of a tx later - or just wondering how I do tx.satisfy() if i don't hold on to them - sorry if these are dumb questions - just ask for a new one, call satisfy() and commit - fine-grained tx's - ah cool - and I think perhaps we can push some tx management into the Engine api - just engine.satisfy() perhaps could open a tx, satisfy, commit - can i get jgraph 5.5.1 on ibiblio, please? - http://sourceforge.net/project/showfiles.php?group_id=43118&package_id=35387 - sure, whatcha making? - visualizer for flox flows - could do similar for werkflow - just static image for web page - maybe clickable to pull up stats about what's in each state - that would be awesome - yep, I'm free starting Monday :) - :-) - jgraph is not very good at rendering images - jung.sf.net might be better - actually jung is for networks really - flows are networks, though, so that might work - but I do need boxes for the vertexes - so I can label them with the state/action name - though, I also need directed graph stuff - i jung would be far better, it looks nice - they have a pluggable renderer demo - which shows off what it can do - looks pretty flexible from that demo - i was going to try it for POM visualization - 'k, I'll research - so - would some thing like: - void startWorkflow( String workflowId, String instanceId, InitialContext context ) - throws NoSuchWorkflowException, DuplicateInstanceException,InterruptedException,Exception; - - be ok as a wrapper which calls - beginTransaction - if i don't need the tx? - sorry, let me explain that more clearly - that would begin a tx, get a robust instance and tx.commit - jung looks nice - yah - just making sure i don't need to hold on to the tx after the first commit - yep, you could wrap it all up in startWf - no need to hang onto tx - dead after it's commit()'d - ah, things i will learn - i've become dumb in the last few months - would holding on to the instance be wise? - or i can always look that up - InstanceManager.getInstance(id) - yup :-) - so a instance is a instance of a flow? - yes, an instance of a proecess - process - or flow - i think wrt workflow a case is an instance of a process - bob can correct me if i'm wrong - hm, so whatever that gets into the instance manager has to be PersitenceCapable - really it is only a set of pointers - i wouldn't ever store data in there - i would point to it so we could get it out of our store - so String objects only - basically only storing attributes for the case - and if you need anything real, you store ids and look them up - ypu - i checked in some more to plexus-werkflow - ypu - yup! - you want to see how we might hookup the persistence with jdo? - that's already there, no? - Instance is an instantiation of a flow - don't hang onto it - look it up - that way you have fresh data from the db - could you hook up commit mails? I'd hate to miss commits - yah, will do in a bit - we weren't trying to make you do it :-) - just tell me how if you like - I like cvsspam these days - dunno how to do it with svn, but here's doc on cvs - http://despots.codehaus.org/Using+CVSSpam - right o, thanks - I hate that html shit, doesn't look good in mutt - suck it up, bucko - bob: jgraph will be up there shortly - we don't put things directly on ibiblio anymore - it syncs from beaver - cool - jung already up there? - it is but not sure what version - latest whatever - sorry, hard time reading accurately today - no jung - at all - one sec - 1.6.0 seems to be the latest though - put 1.6 up there - it will sync shortly - cool thanks - should the version of werkflow become alpha-2-SNAPSHOT? - yah, i'll do that now diff --git a/plexus-sandbox/plexus-components/plexus-xfire/pom.xml b/plexus-sandbox/plexus-components/plexus-xfire/pom.xml deleted file mode 100644 index acd4d9199..000000000 --- a/plexus-sandbox/plexus-components/plexus-xfire/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - plexus-components - org.codehaus.plexus - 1.1.5 - - 4.0.0 - plexus-xfire - XFire Plexus - 1.1.2 - - 1.2-RC - - - - org.codehaus.plexus - plexus-container-default - 1.0-alpha-11-SNAPSHOT - - - org.codehaus.xfire - xfire-xmpp - ${xfireVersion} - - - org.codehaus.xfire - xfire-aegis - ${xfireVersion} - - - org.codehaus.xfire - xfire-annotations - ${xfireVersion} - - - org.codehaus.xfire - xfire-core - ${xfireVersion} - - - org.codehaus.plexus - plexus-servlet - 1.0-beta-4 - - - servletapi - servletapi - 2.4 - - - junit - junit - 3.8.1 - - - diff --git a/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/AbstractSoapTest.java b/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/AbstractSoapTest.java deleted file mode 100644 index 0de02eb64..000000000 --- a/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/AbstractSoapTest.java +++ /dev/null @@ -1,267 +0,0 @@ -package org.codehaus.plexus.xfire.soap; - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.xfire.MessageContext; -import org.codehaus.xfire.XFire; -import org.codehaus.xfire.exchange.InMessage; -import org.codehaus.xfire.service.Service; -import org.codehaus.xfire.service.ServiceFactory; -import org.codehaus.xfire.service.ServiceRegistry; -import org.codehaus.xfire.service.binding.MessageBindingProvider; -import org.codehaus.xfire.service.binding.ObjectServiceFactory; -import org.codehaus.xfire.soap.Soap11; -import org.codehaus.xfire.soap.Soap12; -import org.codehaus.xfire.soap.SoapConstants; -import org.codehaus.xfire.test.XPathAssert; -import org.codehaus.xfire.transport.Channel; -import org.codehaus.xfire.transport.Transport; -import org.codehaus.xfire.transport.local.LocalTransport; -import org.codehaus.xfire.util.STAXUtils; -import org.codehaus.xfire.util.jdom.StaxBuilder; -import org.codehaus.xfire.wsdl.WSDLWriter; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.output.XMLOutputter; - -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamException; -import java.io.ByteArrayOutputStream; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.io.StringReader; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * Contains helpful methods to test SOAP services. - * - * @author Dan Diephouse - */ -public abstract class AbstractSoapTest - extends PlexusTestCase -{ - private ServiceFactory factory; - - private XMLInputFactory defaultInputFactory = XMLInputFactory.newInstance(); - - /** - * @see junit.framework.TestCase#setUp() - */ - protected void setUp() - throws Exception - { - super.setUp(); - - addNamespace( "s", Soap11.getInstance().getNamespace() ); - - addNamespace( "soap12", Soap12.getInstance().getNamespace() ); - } - - /** - * Namespaces for the XPath expressions. - */ - private Map namespaces = new HashMap(); - - protected void printNode( Document node ) - throws Exception - { - XMLOutputter writer = new XMLOutputter(); - - writer.output( node, System.out ); - } - - protected void printNode( Element node ) - throws Exception - { - XMLOutputter writer = new XMLOutputter(); - - writer.output( node, System.out ); - } - - /** - * Invoke a soap with the specified document. - * - * @param service The name of the soap. - * @param document The request as an xml document in the classpath. - */ - protected Document invokeService( String service, - String document ) - throws Exception - { - ByteArrayOutputStream out = new ByteArrayOutputStream(); - MessageContext context = new MessageContext(); - context.setXFire( getXFire() ); - context.setProperty( Channel.BACKCHANNEL_URI, out ); - - if ( service != null ) - { - context.setService( getServiceRegistry().getService( service ) ); - } - - InputStream stream = getResourceAsStream( document ); - InMessage msg = new InMessage( STAXUtils.createXMLStreamReader( stream, "UTF-8", null ) ); - - Transport t = getXFire().getTransportManager().getTransport( LocalTransport.BINDING_ID ); - Channel c = t.createChannel(); - - c.receive( context, msg ); - - String response = out.toString(); - if ( response == null || response.length() == 0 ) - { - return null; - } - - return readDocument( response ); - } - - protected Document readDocument( String text ) - throws XMLStreamException - { - return readDocument( text, defaultInputFactory ); - } - - protected Document readDocument( String text, - XMLInputFactory ifactory ) - throws XMLStreamException - { - try - { - StaxBuilder builder = new StaxBuilder( ifactory ); - return builder.build( new StringReader( text ) ); - } - catch ( XMLStreamException e ) - { - System.err.println( "Could not read the document!" ); - System.err.println( text ); - throw e; - } - } - - protected Document getWSDLDocument( String service ) - throws Exception - { - ByteArrayOutputStream out = new ByteArrayOutputStream(); - - getXFire().generateWSDL( service, out ); - - return readDocument( out.toString() ); - } - - - /** - * Assert that the following XPath query selects one or more nodes. - * - * @param xpath - */ - public List assertValid( String xpath, - Object node ) - throws Exception - { - return XPathAssert.assertValid( xpath, node, namespaces ); - } - - /** - * Assert that the following XPath query selects no nodes. - * - * @param xpath - */ - public List assertInvalid( String xpath, - Object node ) - throws Exception - { - return XPathAssert.assertInvalid( xpath, node, namespaces ); - } - - /** - * Asser that the text of the xpath node retrieved is equal to the value specified. - * - * @param xpath - * @param value - * @param node - */ - public void assertXPathEquals( String xpath, - String value, - Document node ) - throws Exception - { - XPathAssert.assertXPathEquals( xpath, value, node, namespaces ); - } - - public void assertNoFault( Document node ) - throws Exception - { - XPathAssert.assertNoFault( node ); - } - - /** - * Add a namespace that will be used for XPath expressions. - * - * @param ns Namespace name. - * @param uri The namespace uri. - */ - public void addNamespace( String ns, - String uri ) - { - namespaces.put( ns, uri ); - } - - /** - * Get the WSDL for a soap. - * - * @param service The name of the soap. - */ - protected WSDLWriter getWSDL( String service ) - throws Exception - { - ServiceRegistry reg = getServiceRegistry(); - Service hello = reg.getService( service ); - - return hello.getWSDLWriter(); - } - - public ServiceFactory getServiceFactory() - throws Exception - { - if ( factory == null ) - { - ObjectServiceFactory ofactory = - new ObjectServiceFactory( getXFire().getTransportManager(), new MessageBindingProvider() ); - - ofactory.setStyle( SoapConstants.STYLE_MESSAGE ); - - factory = ofactory; - } - - return factory; - } - - public void setServiceFactory( ServiceFactory factory ) - { - this.factory = factory; - } - - protected InputStream getResourceAsStream( String resource ) - { - return getClass().getResourceAsStream( resource ); - } - - protected Reader getResourceAsReader( String resource ) - { - return new InputStreamReader( getResourceAsStream( resource ) ); - } - - protected XFire getXFire() - throws Exception - { - return (XFire) lookup( XFire.ROLE ); - } - - protected ServiceRegistry getServiceRegistry() - throws Exception - { - return getXFire().getServiceRegistry(); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/DefaultPlexusServiceConfiguration.java b/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/DefaultPlexusServiceConfiguration.java deleted file mode 100644 index 58613d872..000000000 --- a/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/DefaultPlexusServiceConfiguration.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.codehaus.plexus.xfire.soap; - -import org.codehaus.xfire.service.binding.DefaultServiceConfiguration; - -/** - * @author Jason van Zyl - */ -public class DefaultPlexusServiceConfiguration - extends DefaultServiceConfiguration - implements PlexusServiceWsdlConfigurator -{ -} diff --git a/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/DefaultSoapServiceCreator.java b/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/DefaultSoapServiceCreator.java deleted file mode 100644 index d7991d569..000000000 --- a/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/DefaultSoapServiceCreator.java +++ /dev/null @@ -1,180 +0,0 @@ -package org.codehaus.plexus.xfire.soap; - -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.context.Context; -import org.codehaus.plexus.context.ContextException; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; -import org.codehaus.xfire.XFire; -import org.codehaus.xfire.service.Service; -import org.codehaus.xfire.service.ServiceFactory; -import org.codehaus.xfire.service.invoker.FactoryInvoker; -import org.codehaus.xfire.service.invoker.Invoker; -import org.codehaus.xfire.service.invoker.ScopePolicy; -import org.codehaus.xfire.service.invoker.ScopePolicyEditor; -import org.codehaus.xfire.soap.Soap11; -import org.codehaus.xfire.soap.Soap12; -import org.codehaus.xfire.soap.SoapVersion; -import org.codehaus.xfire.util.factory.Factory; - -// use continuum/MRM as a use cases -// creating services -// using qdox/annotations to drive -// - methods to expose in the soap -// - generation and use of any DTOs used to proxy objects in the datamodel -// most convenient way to expose a component as a set of web services -// take configuration information taken from annotation sources and have an -// external services.xml file which can be used an an override - -/** - * @author Jason van Zyl - */ -public class DefaultSoapServiceCreator - extends AbstractLogEnabled - implements SoapServiceCreator, - Initializable, - Contextualizable -{ - private XFire xfire; - - private ServiceFactory serviceFactory; - - private PlexusServiceWsdlConfigurator serviceWsdlConfigurator; - - private SoapServiceConfigurationSource soapServiceConfigurationSource; - - private PlexusContainer container; - - // ---------------------------------------------------------------------------- - // Implementation - // ---------------------------------------------------------------------------- - - public Service createService( String role ) - throws SoapServiceCreationException - { - Object component; - - try - { - component = container.lookup( role ); - } - catch ( ComponentLookupException e ) - { - throw new SoapServiceCreationException( "Error looking up component from which to create SOAP service.", e ); - } - - Class clazz = component.getClass(); - - // ---------------------------------------------------------------------------- - // Now we need to pull the configuration for the webservice from the specificed - // source so we can pass those values in to the ServiceFactory. - // ---------------------------------------------------------------------------- - - SoapServiceConfiguration config = null; - - try - { - config = soapServiceConfigurationSource.getConfiguration(); - } - catch ( SoapServiceConfigurationSourceRetrievalException e ) - { - throw new SoapServiceCreationException( "Cannot retrieve SOAP service configuration.", e ); - } - - String name = config.getName(); - - String namespace = config.getNamespace(); - - String use = config.getUse(); - - String style = config.getStyle(); - - String soapVersion = config.getSoapVersion(); - - String wsdlUrl = config.getWsdlUrl(); - - String scope = config.getScope(); - - Service service; - - SoapVersion version = null; - - if ( soapVersion.equals( "1.1" ) ) - { - version = Soap11.getInstance(); - } - else if ( soapVersion.equals( "1.2" ) ) - { - version = Soap12.getInstance(); - } - - ((PlexusServiceFactory)serviceFactory).setStyle( style ); - - ((PlexusServiceFactory)serviceFactory).setUse( use ); - - if ( name.length() == 0 && namespace.length() == 0 ) - { - service = serviceFactory.create( clazz, null ); - } - else - { - service = serviceFactory.create( clazz, name, namespace, null ); - } - - final ScopePolicy policy = ScopePolicyEditor.toScopePolicy( scope ); - - if ( container.hasComponent( role ) ) - { - final Invoker invoker = new FactoryInvoker( new PlexusFactory( role ), policy ); - - service.setInvoker( invoker ); - } - - getLogger().info( "Registered soap " + service.getSimpleName() ); - - xfire.getServiceRegistry().register( service ); - - return service; - } - - // ---------------------------------------------------------------------------- - // Lifecycle - // ---------------------------------------------------------------------------- - - public void initialize() - throws InitializationException - { - ( (PlexusServiceFactory) serviceFactory ).getServiceConfigurations().add( serviceWsdlConfigurator ); - } - - public void contextualize( Context context ) - throws ContextException - { - container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY ); - } - - // ---------------------------------------------------------------------------- - // Factory - // ---------------------------------------------------------------------------- - - class PlexusFactory - implements Factory - { - private String role; - - public PlexusFactory( String role ) - { - this.role = role; - } - - public Object create() - throws Throwable - { - return container.lookup( role ); - } - } -} diff --git a/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/PlexusServiceFactory.java b/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/PlexusServiceFactory.java deleted file mode 100644 index ecf6885d5..000000000 --- a/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/PlexusServiceFactory.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.codehaus.plexus.xfire.soap; - -import org.codehaus.xfire.service.binding.ObjectServiceFactory; - -/** - * @author Jason van Zyl - */ -public class PlexusServiceFactory - extends ObjectServiceFactory -{ -} diff --git a/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/PlexusServiceWsdlConfigurator.java b/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/PlexusServiceWsdlConfigurator.java deleted file mode 100644 index 2c4991e19..000000000 --- a/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/PlexusServiceWsdlConfigurator.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.codehaus.plexus.xfire.soap; - -/** - * @author Jason van Zyl - */ -public interface PlexusServiceWsdlConfigurator -{ - String ROLE = PlexusServiceWsdlConfigurator.class.getName(); -} diff --git a/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/SoapServiceConfiguration.java b/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/SoapServiceConfiguration.java deleted file mode 100644 index f2170b096..000000000 --- a/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/SoapServiceConfiguration.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.codehaus.plexus.xfire.soap; - -/** - * @author Jason van Zyl - */ -public interface SoapServiceConfiguration -{ - String getName(); - - String getNamespace(); - - String getStyle(); - - String getUse(); - - String getScope(); - - String getSoapVersion(); - - String getWsdlUrl(); -} diff --git a/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/SoapServiceConfigurationSource.java b/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/SoapServiceConfigurationSource.java deleted file mode 100644 index 33d10c7ec..000000000 --- a/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/SoapServiceConfigurationSource.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.codehaus.plexus.xfire.soap; - -/** - * @author Jason van Zyl - */ -public interface SoapServiceConfigurationSource -{ - SoapServiceConfiguration getConfiguration() - throws SoapServiceConfigurationSourceRetrievalException; -} diff --git a/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/SoapServiceConfigurationSourceRetrievalException.java b/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/SoapServiceConfigurationSourceRetrievalException.java deleted file mode 100644 index 5d08ea761..000000000 --- a/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/SoapServiceConfigurationSourceRetrievalException.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.codehaus.plexus.xfire.soap; - -/** - * @author Jason van Zyl - */ -public class SoapServiceConfigurationSourceRetrievalException - extends Exception -{ - public SoapServiceConfigurationSourceRetrievalException( String id ) - { - super( id ); - } - - public SoapServiceConfigurationSourceRetrievalException( String id, - Throwable throwable ) - { - super( id, throwable ); - } - - public SoapServiceConfigurationSourceRetrievalException( Throwable throwable ) - { - super( throwable ); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/SoapServiceCreationException.java b/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/SoapServiceCreationException.java deleted file mode 100644 index 3ab490302..000000000 --- a/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/SoapServiceCreationException.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.codehaus.plexus.xfire.soap; - -/** - * @author Jason van Zyl - */ -public class SoapServiceCreationException - extends Exception -{ - public SoapServiceCreationException( String id ) - { - super( id ); - } - - public SoapServiceCreationException( String id, - Throwable throwable ) - { - super( id, throwable ); - } - - public SoapServiceCreationException( Throwable throwable ) - { - super( throwable ); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/SoapServiceCreator.java b/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/SoapServiceCreator.java deleted file mode 100644 index d32556edf..000000000 --- a/plexus-sandbox/plexus-components/plexus-xfire/src/main/java/org/codehaus/plexus/xfire/soap/SoapServiceCreator.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.codehaus.plexus.xfire.soap; - -import org.codehaus.xfire.service.Service; - -/** - * @author Jason van Zyl - */ -public interface SoapServiceCreator -{ - String ROLE = SoapServiceCreator.class.getName(); - - Service createService( String role ) - throws SoapServiceCreationException; -} diff --git a/plexus-sandbox/plexus-components/plexus-xfire/src/main/resources/META-INF/plexus/components.xml b/plexus-sandbox/plexus-components/plexus-xfire/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index 9c4af8c77..000000000 --- a/plexus-sandbox/plexus-components/plexus-xfire/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - org.codehaus.plexus.xfire.soap.SoapServiceCreator - org.codehaus.plexus.xfire.soap.DefaultSoapServiceCreator - - - org.codehaus.xfire.XFire - - - org.codehaus.xfire.service.ServiceFactory - - - org.codehaus.plexus.xfire.soap.PlexusServiceWsdlConfigurator - - - - - - - - - - org.codehaus.xfire.XFire - org.codehaus.xfire.DefaultXFire - - - org.codehaus.xfire.service.ServiceRegistry - - - org.codehaus.xfire.transport.TransportManager - - - - - - org.codehaus.xfire.service.ServiceRegistry - org.codehaus.xfire.service.DefaultServiceRegistry - - - - org.codehaus.xfire.transport.TransportManager - org.codehaus.xfire.transport.DefaultTransportManager - - - - org.codehaus.xfire.service.ServiceFactory - org.codehaus.plexus.xfire.soap.PlexusServiceFactory - - - org.codehaus.xfire.transport.TransportManager - - - - - - org.codehaus.plexus.xfire.soap.PlexusServiceWsdlConfigurator - org.codehaus.plexus.xfire.soap.DefaultPlexusServiceConfiguration - - - - diff --git a/plexus-sandbox/plexus-components/plexus-xfire/src/test/java/org/codehaus/plexus/xfire/soap/DefaultEcho.java b/plexus-sandbox/plexus-components/plexus-xfire/src/test/java/org/codehaus/plexus/xfire/soap/DefaultEcho.java deleted file mode 100644 index 3636590c2..000000000 --- a/plexus-sandbox/plexus-components/plexus-xfire/src/test/java/org/codehaus/plexus/xfire/soap/DefaultEcho.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.codehaus.plexus.xfire.soap; - -/** - * @plexus.soap.name EchoService - * @plexus.soap.namespace echo - * @plexus.soap.style document - * @plexus.soap.use literal - * @plexus.soap.scope application - */ -public class DefaultEcho - implements Echo -{ - public String echo( String echo ) - { - return echo; - } -} diff --git a/plexus-sandbox/plexus-components/plexus-xfire/src/test/java/org/codehaus/plexus/xfire/soap/Echo.java b/plexus-sandbox/plexus-components/plexus-xfire/src/test/java/org/codehaus/plexus/xfire/soap/Echo.java deleted file mode 100644 index bb80f27c8..000000000 --- a/plexus-sandbox/plexus-components/plexus-xfire/src/test/java/org/codehaus/plexus/xfire/soap/Echo.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.codehaus.plexus.xfire.soap; - -public interface Echo -{ - String ROLE = Echo.class.getName(); - - public String echo( String echo ); -} diff --git a/plexus-sandbox/plexus-components/plexus-xfire/src/test/java/org/codehaus/plexus/xfire/soap/EchoTest.java b/plexus-sandbox/plexus-components/plexus-xfire/src/test/java/org/codehaus/plexus/xfire/soap/EchoTest.java deleted file mode 100644 index afdb8263b..000000000 --- a/plexus-sandbox/plexus-components/plexus-xfire/src/test/java/org/codehaus/plexus/xfire/soap/EchoTest.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.codehaus.plexus.xfire.soap; - -import org.codehaus.xfire.service.Service; - -/** - * @author Jason van Zyl - */ -public class EchoTest - extends AbstractSoapTest -{ - private SoapServiceCreator soapServiceCreator; - - protected void setUp() - throws Exception - { - super.setUp(); - - soapServiceCreator = (SoapServiceCreator) lookup( SoapServiceCreator.ROLE ); - } - - public void testEchoService() - throws Exception - { - Service echo = soapServiceCreator.createService( Echo.ROLE ); - - assertNotNull( echo ); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-xfire/src/test/java/org/codehaus/plexus/xfire/soap/XFireTest.java b/plexus-sandbox/plexus-components/plexus-xfire/src/test/java/org/codehaus/plexus/xfire/soap/XFireTest.java deleted file mode 100644 index 6c35c31de..000000000 --- a/plexus-sandbox/plexus-components/plexus-xfire/src/test/java/org/codehaus/plexus/xfire/soap/XFireTest.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.codehaus.plexus.xfire.soap; - -import org.codehaus.plexus.PlexusTestCase; - -/** - * @author Jason van Zyl - */ -public class XFireTest - extends PlexusTestCase -{ - public void testConstruction() - throws Exception - { - SoapServiceCreator sc = (SoapServiceCreator) lookup( SoapServiceCreator.ROLE ); - } -} diff --git a/plexus-sandbox/plexus-components/plexus-xfire/src/test/resources/org/codehaus/plexus/xfire/soap/Echo.wsdl b/plexus-sandbox/plexus-components/plexus-xfire/src/test/resources/org/codehaus/plexus/xfire/soap/Echo.wsdl deleted file mode 100644 index 902b53a4c..000000000 --- a/plexus-sandbox/plexus-components/plexus-xfire/src/test/resources/org/codehaus/plexus/xfire/soap/Echo.wsdl +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-components/plexus-xfire/src/test/resources/org/codehaus/plexus/xfire/soap/EchoTest.xml b/plexus-sandbox/plexus-components/plexus-xfire/src/test/resources/org/codehaus/plexus/xfire/soap/EchoTest.xml deleted file mode 100644 index eb0dd703a..000000000 --- a/plexus-sandbox/plexus-components/plexus-xfire/src/test/resources/org/codehaus/plexus/xfire/soap/EchoTest.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - org.codehaus.plexus.xfire.soap.Echo - org.codehaus.plexus.xfire.soap.DefaultEcho - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-components/plexus-xfire/src/test/resources/org/codehaus/plexus/xfire/soap/echo11.xml b/plexus-sandbox/plexus-components/plexus-xfire/src/test/resources/org/codehaus/plexus/xfire/soap/echo11.xml deleted file mode 100644 index 43d3f9f75..000000000 --- a/plexus-sandbox/plexus-components/plexus-xfire/src/test/resources/org/codehaus/plexus/xfire/soap/echo11.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - Yo Yo - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/pom.xml b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/pom.xml deleted file mode 100644 index 0b88fc077..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/pom.xml +++ /dev/null @@ -1,19 +0,0 @@ - - 4.0.0 - - org.codehaus.bacon - bacon-root - 1.0-alpha-1-SNAPSHOT - - - bacon-api - - BaCon Container API - - - - org.codehaus.bacon - bacon-utils - - - diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/Container.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/Container.java deleted file mode 100644 index 2acb29e71..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/Container.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.codehaus.bacon; - -import java.util.Date; -import java.util.Map; - -import org.codehaus.bacon.component.ComponentDescriptor; -import org.codehaus.bacon.component.ComponentSelector; -import org.codehaus.bacon.component.DuplicateComponentDescriptorException; -import org.codehaus.bacon.session.SessionKey; - -public interface Container -{ - void setParentContainer( Container parent ); - - Container getParentContainer(); - - void addChildContainer( Container child ); - - Container getChildContainer( String childId ); - - String getContainerId(); - - boolean containsComponent( String ifc, String instance, SessionKey sessionKey ) - throws ContainerException; - - boolean containsComponent( String ifc, SessionKey sessionKey ) - throws ContainerException; - - boolean containsComponent( ComponentDescriptor descriptor, SessionKey sessionKey ) - throws ContainerException; - - Object lookup( String ifc, String instance, SessionKey sessionKey, Map context ) - throws LookupException, ContainerException; - - Object lookup( String ifc, SessionKey sessionKey, Map context ) - throws LookupException, ContainerException; - - void registerSelector( ComponentSelector selector, SessionKey sessionKey ) - throws ContainerException; - - void registerComponent( ComponentDescriptor descriptor, SessionKey sessionKey ) - throws DuplicateComponentDescriptorException, ContainerException; - - Date getCreationDate(); -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/ContainerConfiguration.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/ContainerConfiguration.java deleted file mode 100644 index 1125b980d..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/ContainerConfiguration.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.codehaus.bacon; - -import java.util.List; -import java.util.Map; -import java.util.Set; - -public interface ContainerConfiguration -{ - - Set getComponentDescriptors(); - - Set getComponentSelectors(); - - List getClasspathElements(); - - Map getLanguagePacksByKey(); - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/ContainerException.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/ContainerException.java deleted file mode 100644 index cf3aeb1eb..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/ContainerException.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.codehaus.bacon; - -public abstract class ContainerException - extends Exception -{ - - protected ContainerException( String message, Throwable cause ) - { - super( message, cause ); - } - - protected ContainerException( String message ) - { - super( message ); - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/LookupException.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/LookupException.java deleted file mode 100644 index e6985d49e..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/LookupException.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.codehaus.bacon; - -public class LookupException - extends ContainerException -{ - static final long serialVersionUID = 1; - - public LookupException( String message, Throwable cause ) - { - super( message, cause ); - } - - public LookupException( String message ) - { - super( message ); - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/ComponentAttribute.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/ComponentAttribute.java deleted file mode 100644 index 8ec69dbb1..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/ComponentAttribute.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.codehaus.bacon.component; - -public interface ComponentAttribute - extends InjectionDescriptor -{ - String getExpression(); - - String getType(); -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/ComponentDescriptor.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/ComponentDescriptor.java deleted file mode 100644 index 11e7e43c5..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/ComponentDescriptor.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.bacon.component; - -import java.util.List; -import java.util.Map; -import java.util.Set; - -public interface ComponentDescriptor -{ - String NO_INSTANCE_NAME = "_anonymous_"; - - String PER_LOOKUP_INSTANTIATION_STRATEGY = "per-lookup"; - - String SESSION_SINGLETON_INSTANTIATION_STRATEGY = "session-singleton"; - - String TRUE_SINGLETON_INSTANTIATION_STRATEGY = "true-singleton"; - - String getInterfaceName(); - - String getInstanceName(); - - String getImplementation(); - - Set getComponentReferences(); - - Set getComponentAttributes(); - - String getInstantiationStrategy(); - - String getImplementationLanguage(); - - List getConstructionRequirements(); - - Map getComponentReferencesById(); - - Map getComponentAttributesById(); -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/ComponentException.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/ComponentException.java deleted file mode 100644 index dd8be9a79..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/ComponentException.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.codehaus.bacon.component; - -import org.codehaus.bacon.ContainerException; - -public abstract class ComponentException - extends ContainerException -{ - - protected ComponentException( String message, Throwable cause ) - { - super( message, cause ); - } - - protected ComponentException( String message ) - { - super( message ); - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/ComponentReference.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/ComponentReference.java deleted file mode 100644 index 944a5a744..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/ComponentReference.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.codehaus.bacon.component; - -public interface ComponentReference - extends InjectionDescriptor -{ - String CARDINALITY_1_1 = "1:1"; - - String CARDINALITY_1_M = "1:M"; - - String CARDINALITY_1_MAP = "1:MAP"; - - String getInterfaceName(); - - String getCardinality(); -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/ComponentSelector.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/ComponentSelector.java deleted file mode 100644 index e4d511c52..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/ComponentSelector.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.codehaus.bacon.component; - -import java.util.List; - -public interface ComponentSelector -{ - - String getInterfaceName(); - - List getSelectedInstancesInOrder(); - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/ComponentUtilities.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/ComponentUtilities.java deleted file mode 100644 index 3d8605aa6..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/ComponentUtilities.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.bacon.component; - -public final class ComponentUtilities -{ - - private ComponentUtilities() - { - } - - public static String createDescriptorKey( ComponentDescriptor descriptor ) - { - return createDescriptorKey( descriptor.getInterfaceName(), descriptor.getInstanceName() ); - } - - public static String createDescriptorKey( String interfaceName ) - { - return createDescriptorKey( interfaceName, null ); - } - - public static String createDescriptorKey( String interfaceName, String instanceName ) - { - String instance = instanceName; - - if ( instance != null && instance.trim().length() < 1 ) - { - instance = null; - } - else if ( ComponentDescriptor.NO_INSTANCE_NAME.equals( instanceName ) ) - { - instance = null; - } - - return interfaceName + ( instance != null ? ":" + instance : "" ); - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/DuplicateComponentDescriptorException.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/DuplicateComponentDescriptorException.java deleted file mode 100644 index 5eafc6230..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/DuplicateComponentDescriptorException.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.codehaus.bacon.component; - -public class DuplicateComponentDescriptorException - extends ComponentException -{ - static final long serialVersionUID = 1; - - public DuplicateComponentDescriptorException( String message, Throwable cause ) - { - super( message, cause ); - } - - public DuplicateComponentDescriptorException( String message ) - { - super( message ); - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/DuplicateComponentInstanceException.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/DuplicateComponentInstanceException.java deleted file mode 100644 index 45fec2e8b..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/DuplicateComponentInstanceException.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.codehaus.bacon.component; - -public class DuplicateComponentInstanceException - extends ComponentException -{ - private static final long serialVersionUID = 1L; - - public DuplicateComponentInstanceException( String message, Throwable cause ) - { - super( message, cause ); - } - - public DuplicateComponentInstanceException( String message ) - { - super( message ); - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/InjectionDescriptor.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/InjectionDescriptor.java deleted file mode 100644 index 61a393778..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/InjectionDescriptor.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.codehaus.bacon.component; - -public interface InjectionDescriptor -{ - - boolean isRequired(); - - String getId(); - - String getInjectionStrategy(); - - String getInjectionTarget(); - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/factory/InstanceFactory.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/factory/InstanceFactory.java deleted file mode 100644 index 45c49fc13..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/factory/InstanceFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.codehaus.bacon.component.factory; - -import java.util.List; - -import org.codehaus.bacon.component.ComponentDescriptor; - -public interface InstanceFactory -{ - - Object instantiate( ComponentDescriptor descriptor, List constructionParameters, ClassLoader componentLoader ) - throws InstantiationException; - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/factory/InstantiationException.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/factory/InstantiationException.java deleted file mode 100644 index bbacb6fff..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/factory/InstantiationException.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.codehaus.bacon.component.factory; - -import org.codehaus.bacon.component.ComponentException; - -public class InstantiationException - extends ComponentException -{ - private static final long serialVersionUID = 1L; - - public InstantiationException( String message, Throwable cause ) - { - super( message, cause ); - } - - public InstantiationException( String message ) - { - super( message ); - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/injection/ComponentInjectionException.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/injection/ComponentInjectionException.java deleted file mode 100644 index a6c413a0f..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/injection/ComponentInjectionException.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.codehaus.bacon.component.injection; - -import org.codehaus.bacon.component.ComponentException; - -public class ComponentInjectionException - extends ComponentException -{ - - private static final long serialVersionUID = 1L; - - public ComponentInjectionException( String message, Throwable cause ) - { - super( message, cause ); - } - - public ComponentInjectionException( String message ) - { - super( message ); - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/injection/ComponentInjector.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/injection/ComponentInjector.java deleted file mode 100644 index 1367d7f07..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/injection/ComponentInjector.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.codehaus.bacon.component.injection; - -import java.util.Map; - -public interface ComponentInjector -{ - - void inject( Object instance, Map valuesByCompositionSource, ClassLoader containerLoader ) - throws ComponentInjectionException; - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/language/LanguagePack.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/language/LanguagePack.java deleted file mode 100644 index 0f6bc3d60..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/language/LanguagePack.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.codehaus.bacon.component.language; - -import org.codehaus.bacon.component.factory.InstanceFactory; -import org.codehaus.bacon.component.injection.ComponentInjector; - -public interface LanguagePack -{ - - String getLanguageKey(); - - ComponentInjector getComponentInjector(); - - InstanceFactory getInstanceFactory(); - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/manager/InstanceManager.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/manager/InstanceManager.java deleted file mode 100644 index 14bce2efb..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/component/manager/InstanceManager.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.codehaus.bacon.component.manager; - -import java.util.Map; - -import org.codehaus.bacon.component.ComponentDescriptor; -import org.codehaus.bacon.component.factory.InstantiationException; -import org.codehaus.bacon.session.SessionKey; - -public interface InstanceManager -{ - - Object getInstance( ComponentDescriptor descriptor, SessionKey sessionKey, Map context, boolean nativeToContainer ) - throws InstantiationException; - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/session/ContainerSession.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/session/ContainerSession.java deleted file mode 100644 index 4a106bbdf..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/session/ContainerSession.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.codehaus.bacon.session; - -import java.util.Date; - -import org.codehaus.bacon.ContainerException; -import org.codehaus.bacon.component.ComponentDescriptor; -import org.codehaus.bacon.component.ComponentSelector; -import org.codehaus.bacon.component.DuplicateComponentDescriptorException; -import org.codehaus.bacon.component.DuplicateComponentInstanceException; - -public interface ContainerSession -{ - - String getContainerId(); - - SessionKey getSessionKey(); - - ComponentDescriptor getComponentDescriptor( String interfaceName, ComponentSelector selector ); - - ComponentSelector getComponentSelector( String ifc ); - - boolean containsComponentDescriptor( String ifc, String instance ) - throws ContainerException; - - boolean containsComponentDescriptor( String ifc, ComponentSelector selector ) - throws ContainerException; - - boolean containsComponentDescriptor( ComponentDescriptor descriptor ) - throws ContainerException; - - void registerComponentDescriptor( ComponentDescriptor descriptor ) - throws DuplicateComponentDescriptorException; - - void registerComponentSelector( ComponentSelector selector ); - - boolean isOpen(); - - Date getLastAccessed(); - - Date getCreationDate(); - - void registerComponentInstance( ComponentDescriptor descriptor, Object instance ) - throws DuplicateComponentInstanceException; - - boolean containsComponentInstance( ComponentDescriptor descriptor ) - throws ContainerException; - - Object getComponentInstance( ComponentDescriptor descriptor ) - throws ContainerException; - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/session/ContainerSessionManager.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/session/ContainerSessionManager.java deleted file mode 100644 index d007f18d2..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/session/ContainerSessionManager.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.codehaus.bacon.session; - -import java.util.Map; -import java.util.WeakHashMap; - -public final class ContainerSessionManager -{ - - private static final ContainerSessionManager INSTANCE = new ContainerSessionManager(); - - private Map sessions = new WeakHashMap(); - - private ContainerSessionManager() - { - } - - public static final ContainerSessionManager instance() - { - return INSTANCE; - } - - public ContainerSession get( SessionKey sessionKey, String containerId ) - { - return (ContainerSession) sessions.get( createLookupKey( sessionKey, containerId ) ); - } - - public void register( ContainerSession containerSession ) - throws DuplicateContainerSessionException - { - String key = createLookupKey( containerSession.getSessionKey(), containerSession.getContainerId() ); - - if ( sessions.containsKey( key ) ) - { - throw new DuplicateContainerSessionException( containerSession.getSessionKey(), containerSession.getContainerId() ); - } - else - { - sessions.put( key, containerSession ); - } - } - - public ContainerSession deregister( ContainerSession containerSession ) - { - String key = createLookupKey( containerSession.getSessionKey(), containerSession.getContainerId() ); - - if ( sessions.containsKey( key ) ) - { - return (ContainerSession) sessions.remove( key ); - } - - return null; - } - - private String createLookupKey( SessionKey sessionKey, String containerId ) - { - return containerId + ":" + sessionKey.getSessionId(); - } -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/session/DuplicateContainerSessionException.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/session/DuplicateContainerSessionException.java deleted file mode 100644 index 9cb79f307..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/session/DuplicateContainerSessionException.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.codehaus.bacon.session; - -import org.codehaus.bacon.ContainerException; - -public class DuplicateContainerSessionException - extends ContainerException -{ - - private static final long serialVersionUID = 1L; - - private final SessionKey sessionKey; - private final String containerId; - - public DuplicateContainerSessionException( SessionKey sessionKey, String containerId ) - { - super( "Duplicate container session for key: " + sessionKey.getSessionId() + "; container: " + containerId ); - - this.sessionKey = sessionKey; - this.containerId = containerId; - } - - public String getContainerId() - { - return containerId; - } - - public SessionKey getSessionKey() - { - return sessionKey; - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/session/SessionKey.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/session/SessionKey.java deleted file mode 100644 index ae1196bc5..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/session/SessionKey.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.codehaus.bacon.session; - -import java.util.Date; - -public final class SessionKey -{ - - private final String sessionId; - - private final Date created = new Date(); - - private Date lastAccessed = new Date(); - - private boolean open = true; - - SessionKey( String sessionId ) - { - this.sessionId = sessionId; - } - - public String getSessionId() - { - return sessionId; - } - - public Date getLastAccessed() - { - return lastAccessed; - } - - public void touch() - { - lastAccessed = new Date(); - } - - public Date getCreationDate() - { - return created; - } - - public boolean isOpen() - { - return open; - } - - public void close() - { - open = false; - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/session/SessionKeyFactory.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/session/SessionKeyFactory.java deleted file mode 100644 index 64e8603c2..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-api/src/main/java/org/codehaus/bacon/session/SessionKeyFactory.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.bacon.session; - -import java.security.SecureRandom; - -public final class SessionKeyFactory -{ - public static final int DEFAULT_SESSION_KEY_SIZE = 16; - - private static final String VALID_SESSION_ID_CHARS = "0123456789ABCDEF"; - - private static SecureRandom secureRandom = new SecureRandom(); - - private SessionKeyFactory() - { - } - - public static SessionKey newSessionKey() - { - return newSessionKey( DEFAULT_SESSION_KEY_SIZE ); - } - - public static SessionKey newSessionKey( int keySize ) - { - StringBuffer buffer = new StringBuffer(); - - for ( int i = 0; i < keySize; i++ ) - { - int nextIdx = secureRandom.nextInt() % VALID_SESSION_ID_CHARS.length(); - - buffer.append( VALID_SESSION_ID_CHARS.charAt( nextIdx ) ); - } - - return new SessionKey( buffer.toString() ); - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-base-container/pom.xml b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-base-container/pom.xml deleted file mode 100644 index b11aaafc7..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-base-container/pom.xml +++ /dev/null @@ -1,23 +0,0 @@ - - 4.0.0 - - org.codehaus.bacon - bacon-root - 1.0-alpha-1-SNAPSHOT - - bacon-base-container - - BaCon Base Container Implementation - - - - org.codehaus.bacon - bacon-api - - - ognl - ognl - - - - diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-base-container/src/main/java/org/codehaus/bacon/base/BasicContainer.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-base-container/src/main/java/org/codehaus/bacon/base/BasicContainer.java deleted file mode 100644 index 0bd431f3e..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-base-container/src/main/java/org/codehaus/bacon/base/BasicContainer.java +++ /dev/null @@ -1,416 +0,0 @@ -package org.codehaus.bacon.base; - -import java.net.URL; -import java.net.URLClassLoader; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.codehaus.bacon.Container; -import org.codehaus.bacon.ContainerConfiguration; -import org.codehaus.bacon.ContainerException; -import org.codehaus.bacon.LookupException; -import org.codehaus.bacon.base.component.BasicInstanceManager; -import org.codehaus.bacon.base.session.BasicContainerSession; -import org.codehaus.bacon.component.ComponentDescriptor; -import org.codehaus.bacon.component.ComponentSelector; -import org.codehaus.bacon.component.ComponentUtilities; -import org.codehaus.bacon.component.DuplicateComponentDescriptorException; -import org.codehaus.bacon.component.factory.InstantiationException; -import org.codehaus.bacon.component.manager.InstanceManager; -import org.codehaus.bacon.session.ContainerSession; -import org.codehaus.bacon.session.ContainerSessionManager; -import org.codehaus.bacon.session.DuplicateContainerSessionException; -import org.codehaus.bacon.session.SessionKey; - -public class BasicContainer - implements Container -{ - private Container parent; - - private Map children; - - private final String id; - - private final Date creationDate; - - private final Set componentDescriptors; - - private final Set componentSelectors; - - private final URLClassLoader containerLoader; - - private final InstanceManager instanceManager; - - private Map componentSelectorsByInterface; - - private Map componentDescriptorsByKey; - - public BasicContainer( String id, ContainerConfiguration configuration ) - throws ContainerException - { - this.id = id; - this.creationDate = new Date(); - - List cpElements = configuration.getClasspathElements(); - - URL[] cpUrls = new URL[cpElements.size()]; - - cpUrls = (URL[]) cpElements.toArray( cpUrls ); - - this.containerLoader = URLClassLoader.newInstance( cpUrls ); - - this.componentDescriptors = Collections.unmodifiableSet( configuration.getComponentDescriptors() ); - this.componentSelectors = Collections.unmodifiableSet( configuration.getComponentSelectors() ); - - this.instanceManager = new BasicInstanceManager( configuration.getLanguagePacksByKey(), this, containerLoader ); - - createComponentDescriptorMap(); - - createComponentSelectorMap(); - } - - public BasicContainer( String id, ContainerConfiguration configuration, ClassLoader parentClassLoader ) - throws ContainerException - { - this.id = id; - this.creationDate = new Date(); - - List cpElements = configuration.getClasspathElements(); - - URL[] cpUrls = new URL[cpElements.size()]; - - cpUrls = (URL[]) cpElements.toArray( cpUrls ); - - this.containerLoader = URLClassLoader.newInstance( cpUrls, parentClassLoader ); - - this.componentDescriptors = configuration.getComponentDescriptors(); - this.componentSelectors = configuration.getComponentSelectors(); - - this.instanceManager = new BasicInstanceManager( configuration.getLanguagePacksByKey(), this, containerLoader ); - - createComponentDescriptorMap(); - - createComponentSelectorMap(); - } - - public Object lookup( String ifc, String instance, SessionKey sessionKey, Map context ) - throws LookupException, ContainerException - { - String key = ComponentUtilities.createDescriptorKey( ifc, instance ); - - ComponentDescriptor descriptor = (ComponentDescriptor) componentDescriptorsByKey.get( key ); - - ContainerSession session = getContainerSession( sessionKey ); - - boolean nativeToContainer = true; - if ( descriptor == null ) - { - String inst = instance; - - if ( inst == null || inst.trim().length() < 1 ) - { - inst = ComponentDescriptor.NO_INSTANCE_NAME; - } - - ComponentSelector selector = new AdHocComponentSelector( ifc, inst ); - - descriptor = session.getComponentDescriptor( ifc, selector ); - nativeToContainer = false; - } - - Object result = null; - - if ( descriptor != null ) - { - result = getComponentInstance( descriptor, sessionKey, context, nativeToContainer ); - } - else if ( parent != null ) - { - result = parent.lookup( ifc, instance, sessionKey, context ); - } - - return result; - } - - public Object lookup( String ifc, SessionKey sessionKey, Map context ) - throws LookupException, ContainerException - { - ComponentSelector selector = (ComponentSelector) componentSelectorsByInterface.get( ifc ); - - ContainerSession session = getContainerSession( sessionKey ); - - if ( selector == null ) - { - selector = session.getComponentSelector( ifc ); - } - - if ( selector == null ) - { - selector = new AdHocComponentSelector( ifc, ComponentDescriptor.NO_INSTANCE_NAME ); - } - - ComponentDescriptor descriptor = null; - - List instanceNames = selector.getSelectedInstancesInOrder(); - - for ( Iterator it = instanceNames.iterator(); it.hasNext(); ) - { - String instanceName = (String) it.next(); - - String key = ComponentUtilities.createDescriptorKey( ifc, instanceName ); - - descriptor = (ComponentDescriptor) componentDescriptorsByKey.get( key ); - - if ( descriptor != null ) - { - break; - } - } - - boolean nativeToContainer = true; - - if ( descriptor == null ) - { - descriptor = session.getComponentDescriptor( ifc, selector ); - nativeToContainer = false; - } - - Object result = null; - - if ( descriptor != null ) - { - result = getComponentInstance( descriptor, sessionKey, context, nativeToContainer ); - } - else if ( parent != null ) - { - result = parent.lookup( ifc, sessionKey, context ); - } - - return result; - } - - private Object getComponentInstance( ComponentDescriptor descriptor, SessionKey sessionKey, Map context, boolean nativeToContainer ) - throws InstantiationException - { - return instanceManager.getInstance( descriptor, sessionKey, context, nativeToContainer ); - } - - private ContainerSession getContainerSession( SessionKey sessionKey ) - throws DuplicateContainerSessionException - { - ContainerSession session = ContainerSessionManager.instance().get( sessionKey, id ); - - if ( session == null ) - { - session = new BasicContainerSession( sessionKey, this ); - - ContainerSessionManager.instance().register( session ); - } - - return session; - } - - public void registerComponent( ComponentDescriptor descriptor, SessionKey sessionKey ) - throws DuplicateComponentDescriptorException, ContainerException - { - String key = ComponentUtilities.createDescriptorKey( descriptor ); - - if ( componentDescriptorsByKey.containsKey( key ) ) - { - throw new DuplicateComponentDescriptorException( "Container: " + id - + " already contains a component matching descriptor: " + descriptor ); - } - - ContainerSession session = getContainerSession( sessionKey ); - - session.registerComponentDescriptor( descriptor ); - } - - public void registerSelector( ComponentSelector selector, SessionKey sessionKey ) - throws ContainerException - { - ContainerSession session = getContainerSession( sessionKey ); - - session.registerComponentSelector( selector ); - } - - public void setParentContainer( Container parent ) - { - this.parent = parent; - } - - public Container getParentContainer() - { - return parent; - } - - public void addChildContainer( Container child ) - { - synchronized ( this ) - { - if ( children == null ) - { - children = new HashMap(); - } - - children.put( child.getContainerId(), child ); - } - } - - public Container getChildContainer( String childId ) - { - return (Container) ( children == null ? null : children.get( childId ) ); - } - - public String getContainerId() - { - return id; - } - - public boolean containsComponent( ComponentDescriptor descriptor, SessionKey sessionKey ) - throws ContainerException - { - String key = ComponentUtilities.createDescriptorKey( descriptor ); - - boolean result = componentDescriptorsByKey.containsKey( key ); - - if ( !result && parent != null ) - { - result = parent.containsComponent( descriptor, sessionKey ); - } - - if ( !result ) - { - ContainerSession session = getContainerSession( sessionKey ); - result = session.containsComponentDescriptor( descriptor ); - } - - return result; - } - - public boolean containsComponent( String ifc, String instance, SessionKey sessionKey ) - throws ContainerException - { - String key = ComponentUtilities.createDescriptorKey( ifc, instance ); - - boolean result = componentDescriptorsByKey.containsKey( key ); - - if ( !result && parent != null ) - { - result = parent.containsComponent( ifc, instance, sessionKey ); - } - - if ( !result ) - { - ContainerSession session = ContainerSessionManager.instance().get( sessionKey, id ); - result = session.containsComponentDescriptor( ifc, instance ); - } - - return result; - } - - public boolean containsComponent( String ifc, SessionKey sessionKey ) - throws ContainerException - { - String key = ComponentUtilities.createDescriptorKey( ifc ); - - boolean result = componentDescriptorsByKey.containsKey( key ); - - if ( !result && parent != null ) - { - result = parent.containsComponent( ifc, sessionKey ); - } - - if ( !result ) - { - ContainerSession session = getContainerSession( sessionKey ); - - ComponentSelector selector = new AdHocComponentSelector( ifc, ComponentDescriptor.NO_INSTANCE_NAME ); - - result = session.containsComponentDescriptor( ifc, selector ); - } - - return result; - } - - public Date getCreationDate() - { - return creationDate; - } - - private void createComponentDescriptorMap() - { - this.componentDescriptorsByKey = new HashMap(); - - if ( componentDescriptors != null && !componentDescriptors.isEmpty() ) - { - for ( Iterator it = componentDescriptors.iterator(); it.hasNext(); ) - { - ComponentDescriptor descriptor = (ComponentDescriptor) it.next(); - - String key = ComponentUtilities.createDescriptorKey( descriptor ); - - componentDescriptorsByKey.put( key, descriptor ); - } - } - - this.componentDescriptorsByKey = Collections.unmodifiableMap( componentDescriptorsByKey ); - } - - private void createComponentSelectorMap() - { - this.componentSelectorsByInterface = new HashMap(); - - if ( componentSelectors != null && !componentSelectors.isEmpty() ) - { - for ( Iterator it = componentSelectors.iterator(); it.hasNext(); ) - { - ComponentSelector selector = (ComponentSelector) it.next(); - - componentSelectorsByInterface.put( selector.getInterfaceName(), selector ); - } - } - - this.componentSelectorsByInterface = Collections.unmodifiableMap( componentSelectorsByInterface ); - } - - private static class AdHocComponentSelector - implements ComponentSelector - { - - private final List instanceNames; - - private final String interfaceName; - - public AdHocComponentSelector( String interfaceName, String instanceName ) - { - this( interfaceName, Collections.singletonList( instanceName ) ); - } - - public AdHocComponentSelector( String interfaceName, List instanceNames ) - { - this.interfaceName = interfaceName; - - List instNames = new ArrayList( instanceNames ); - - this.instanceNames = Collections.unmodifiableList( instNames ); - } - - public String getInterfaceName() - { - return interfaceName; - } - - public List getSelectedInstancesInOrder() - { - return instanceNames; - } - - } -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-base-container/src/main/java/org/codehaus/bacon/base/component/BasicInstanceManager.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-base-container/src/main/java/org/codehaus/bacon/base/component/BasicInstanceManager.java deleted file mode 100644 index dc70451ee..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-base-container/src/main/java/org/codehaus/bacon/base/component/BasicInstanceManager.java +++ /dev/null @@ -1,405 +0,0 @@ -package org.codehaus.bacon.base.component; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import ognl.Ognl; -import ognl.OgnlException; - -import org.codehaus.bacon.Container; -import org.codehaus.bacon.ContainerException; -import org.codehaus.bacon.LookupException; -import org.codehaus.bacon.component.ComponentAttribute; -import org.codehaus.bacon.component.ComponentDescriptor; -import org.codehaus.bacon.component.ComponentReference; -import org.codehaus.bacon.component.ComponentUtilities; -import org.codehaus.bacon.component.DuplicateComponentInstanceException; -import org.codehaus.bacon.component.factory.InstanceFactory; -import org.codehaus.bacon.component.factory.InstantiationException; -import org.codehaus.bacon.component.injection.ComponentInjectionException; -import org.codehaus.bacon.component.language.LanguagePack; -import org.codehaus.bacon.component.manager.InstanceManager; -import org.codehaus.bacon.session.ContainerSession; -import org.codehaus.bacon.session.ContainerSessionManager; -import org.codehaus.bacon.session.SessionKey; - -public class BasicInstanceManager - implements InstanceManager -{ - private static final String DEFAULT_IMPLEMENTATION_LANGUAGE = "java"; - - private final Container container; - - private final ClassLoader containerLoader; - - private Map singletons = new HashMap(); - - private final Map languagePacksByLanguageKey; - - public BasicInstanceManager( Map languagePacksByLanguageKey, Container container, ClassLoader containerLoader ) - { - this.languagePacksByLanguageKey = languagePacksByLanguageKey; - this.container = container; - this.containerLoader = containerLoader; - } - - public Object getInstance( ComponentDescriptor descriptor, SessionKey sessionKey, Map context, boolean nativeToContainer ) - throws InstantiationException - { - Object instance = null; - - try - { - instance = resolveCached( descriptor, sessionKey, nativeToContainer ); - } - catch ( ContainerException e ) - { - throw new InstantiationException( "Error looking up cached instance of: " + descriptor + ". Reason: " - + e.getMessage(), e ); - } - - if ( instance == null ) - { - LanguagePack langPack = getLanguagePack( descriptor ); - - List constructorParameters = resolveConstructorParameters( descriptor, sessionKey, context ); - - InstanceFactory factory = langPack.getInstanceFactory(); - - instance = factory.instantiate( descriptor, constructorParameters, containerLoader ); - - compose( instance, descriptor, sessionKey, context, langPack ); - - try - { - cacheIfAppropriate( instance, descriptor, sessionKey, nativeToContainer ); - } - catch ( DuplicateComponentInstanceException e ) - { - throw new InstantiationException( "Error caching component instance. Duplicate of: " + descriptor - + " already registered.", e ); - } - } - - return instance; - } - - private LanguagePack getLanguagePack( ComponentDescriptor descriptor ) - throws InstantiationException - { - String lang = descriptor.getImplementationLanguage(); - - if ( lang == null || lang.trim().length() < 1 ) - { - lang = DEFAULT_IMPLEMENTATION_LANGUAGE; - } - - // fail fast. - if ( !languagePacksByLanguageKey.containsKey( lang ) ) - { - throw new InstantiationException( "No InstanceFactory found for language: " + lang ); - } - - return (LanguagePack) languagePacksByLanguageKey.get( lang ); - } - - private void compose( Object instance, ComponentDescriptor descriptor, SessionKey sessionKey, Map context, - LanguagePack langPack ) - throws InstantiationException - { - Map valuesByCompositionSource = new HashMap(); - - injectNonConstructorAttributes( instance, descriptor, sessionKey, context, valuesByCompositionSource ); - injectNonConstructorReferences( instance, descriptor, sessionKey, context, valuesByCompositionSource ); - - try - { - langPack.getComponentInjector().inject( instance, valuesByCompositionSource, containerLoader ); - } - catch ( ComponentInjectionException e ) - { - throw new InstantiationException( "Error injecting non-constructor references and attributes into component. Reason: " + e.getMessage(), e ); - } - } - - private void injectNonConstructorAttributes( Object instance, ComponentDescriptor descriptor, - SessionKey sessionKey, Map context, Map valuesByCompositionSource ) - throws InstantiationException - { - Set attributes = descriptor.getComponentAttributes(); - - if ( attributes == null || attributes.isEmpty() ) - { - // nothing to do. - return; - } - - List constructorIds = descriptor.getConstructionRequirements(); - if ( constructorIds == null ) - { - constructorIds = Collections.EMPTY_LIST; - } - - for ( Iterator it = attributes.iterator(); it.hasNext(); ) - { - ComponentAttribute attribute = (ComponentAttribute) it.next(); - - Object value = resolveAttribute( attribute, context ); - - valuesByCompositionSource.put( attribute, value ); - } - } - - private void injectNonConstructorReferences( Object instance, ComponentDescriptor descriptor, - SessionKey sessionKey, Map context, Map valuesByCompositionSource ) - throws InstantiationException - { - Set references = descriptor.getComponentReferences(); - - if ( references == null || references.isEmpty() ) - { - // nothing to do. - return; - } - - List constructorIds = descriptor.getConstructionRequirements(); - if ( constructorIds == null ) - { - constructorIds = Collections.EMPTY_LIST; - } - - for ( Iterator it = references.iterator(); it.hasNext(); ) - { - ComponentReference reference = (ComponentReference) it.next(); - - Object component = resolveReference( reference, sessionKey, context ); - - valuesByCompositionSource.put( reference, component ); - } - } - - private void cacheIfAppropriate( Object instance, ComponentDescriptor descriptor, SessionKey sessionKey, boolean nativeToContainer ) - throws DuplicateComponentInstanceException - { - if ( !nativeToContainer || ComponentDescriptor.SESSION_SINGLETON_INSTANTIATION_STRATEGY - .equals( descriptor.getInstantiationStrategy() ) ) - { - ContainerSession session = ContainerSessionManager.instance().get( sessionKey, container.getContainerId() ); - - session.registerComponentInstance( descriptor, instance ); - } - else if ( ComponentDescriptor.TRUE_SINGLETON_INSTANTIATION_STRATEGY.equals( descriptor - .getInstantiationStrategy() ) ) - { - String key = ComponentUtilities.createDescriptorKey( descriptor ); - - singletons.put( key, instance ); - } - } - - private Object resolveCached( ComponentDescriptor descriptor, SessionKey sessionKey, boolean nativeToContainer ) - throws ContainerException - { - Object instance = null; - - if ( !nativeToContainer || ComponentDescriptor.SESSION_SINGLETON_INSTANTIATION_STRATEGY - .equals( descriptor.getInstantiationStrategy() ) ) - { - ContainerSession session = ContainerSessionManager.instance().get( sessionKey, container.getContainerId() ); - - instance = session.getComponentInstance( descriptor ); - } - else if ( ComponentDescriptor.TRUE_SINGLETON_INSTANTIATION_STRATEGY.equals( descriptor - .getInstantiationStrategy() ) ) - { - String key = ComponentUtilities.createDescriptorKey( descriptor ); - - instance = singletons.get( key ); - } - - return instance; - } - - private List resolveConstructorParameters( ComponentDescriptor descriptor, SessionKey sessionKey, Map context ) - throws InstantiationException - { - List constructionRequirements = descriptor.getConstructionRequirements(); - - List parameters; - - if ( constructionRequirements != null && !constructionRequirements.isEmpty() ) - { - Map constructorReferences = resolveConstructorReferences( constructionRequirements, descriptor - .getComponentReferencesById(), sessionKey, context ); - - Map constructorAttributes = resolveConstructorAttributes( constructionRequirements, descriptor - .getComponentAttributesById(), sessionKey, context ); - - parameters = new ArrayList( constructionRequirements.size() ); - - for ( Iterator it = constructionRequirements.iterator(); it.hasNext(); ) - { - String id = (String) it.next(); - - Object referent = constructorReferences.get( id ); - - if ( referent == null ) - { - referent = constructorAttributes.get( id ); - } - - if ( referent == null ) - { - throw new InstantiationException( "Missing constructor requirement: \'" + id + "\'." ); - } - - parameters.add( referent ); - } - } - else - { - parameters = Collections.EMPTY_LIST; - } - - return parameters; - } - - private Map resolveConstructorAttributes( List constructionRequirements, Map componentAttributes, - SessionKey sessionKey, Map context ) - throws InstantiationException - { - Map resolvedAttributes = new HashMap(); - - for ( Iterator it = constructionRequirements.iterator(); it.hasNext(); ) - { - String id = (String) it.next(); - - ComponentAttribute attribute = (ComponentAttribute) componentAttributes.get( id ); - - if ( attribute != null ) - { - Object resolvedValue = resolveAttribute( attribute, context ); - - resolvedAttributes.put( id, resolvedValue ); - } - } - - return resolvedAttributes; - } - - private Object resolveAttribute( ComponentAttribute attribute, Map context ) - throws InstantiationException - { - String id = attribute.getId(); - - String expression = attribute.getExpression(); - String type = attribute.getType(); - - Class expectedType; - try - { - expectedType = containerLoader.loadClass( type ); - } - catch ( ClassNotFoundException e ) - { - throw new InstantiationException( "Error evaluating attribute expression for: \'" + id + "\'. Class: " - + type + " could not be found." ); - } - - Object resolvedValue; - try - { - resolvedValue = Ognl.getValue( expression, context, (Object) null, expectedType ); - } - catch ( OgnlException e ) - { - throw new InstantiationException( "Error evaluating attribute expression for: \'" + id + "\'. Reason: " - + e.getMessage(), e ); - } - - return resolvedValue; - } - - private Map resolveConstructorReferences( List constructionRequirements, Map componentReferences, - SessionKey sessionKey, Map context ) - throws InstantiationException - { - Map resolvedReferences = new HashMap(); - - for ( Iterator it = constructionRequirements.iterator(); it.hasNext(); ) - { - String id = (String) it.next(); - - ComponentReference reference = (ComponentReference) componentReferences.get( id ); - - if ( reference != null ) - { - Object component = resolveReference( reference, sessionKey, context ); - - if ( component != null ) - { - resolvedReferences.put( id, component ); - } - } - } - - return resolvedReferences; - } - - private Object resolveReference( ComponentReference reference, SessionKey sessionKey, Map context ) - throws InstantiationException - { - String id = reference.getId(); - - String cardinality = reference.getCardinality(); - - if ( !ComponentReference.CARDINALITY_1_1.equals( cardinality ) ) - { - throw new UnsupportedOperationException( "Error evaluating reference: \'" + id - + "\'. 1:M component references are not yet supported." ); - } - else - { - boolean found; - try - { - found = container.containsComponent( reference.getInterfaceName(), sessionKey ); - } - catch ( ContainerException e ) - { - throw new InstantiationException( "Error satisfying component reference: \'" + id - + "\'. Container failed while looking for component." ); - } - - if ( !found ) - { - throw new InstantiationException( "Cannot satisfy component reference: \'" + id - + "\'. Component not found." ); - } - - Object component; - try - { - component = container.lookup( reference.getInterfaceName(), sessionKey, context ); - } - catch ( LookupException e ) - { - throw new InstantiationException( "Error satisfying component reference: \'" + id - + "\'. Container failed while looking up component." ); - } - catch ( ContainerException e ) - { - throw new InstantiationException( "Error satisfying component reference: \'" + id - + "\'. Container failed while looking up component." ); - } - - return component; - } - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-base-container/src/main/java/org/codehaus/bacon/base/session/BasicContainerSession.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-base-container/src/main/java/org/codehaus/bacon/base/session/BasicContainerSession.java deleted file mode 100644 index a736fcbec..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-base-container/src/main/java/org/codehaus/bacon/base/session/BasicContainerSession.java +++ /dev/null @@ -1,186 +0,0 @@ -package org.codehaus.bacon.base.session; - -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.codehaus.bacon.Container; -import org.codehaus.bacon.ContainerException; -import org.codehaus.bacon.component.ComponentDescriptor; -import org.codehaus.bacon.component.ComponentSelector; -import org.codehaus.bacon.component.ComponentUtilities; -import org.codehaus.bacon.component.DuplicateComponentDescriptorException; -import org.codehaus.bacon.component.DuplicateComponentInstanceException; -import org.codehaus.bacon.session.ContainerSession; -import org.codehaus.bacon.session.SessionKey; - -public class BasicContainerSession - implements ContainerSession -{ - - private final Container container; - private final SessionKey sessionKey; - private final Date created; - - private Map selectors = new HashMap(); - private Map components = new HashMap(); - private Map instances = new HashMap(); - - public BasicContainerSession( SessionKey sessionKey, Container container ) - { - this.sessionKey = sessionKey; - this.container = container; - this.created = new Date(); - } - - public String getContainerId() - { - return container.getContainerId(); - } - - public SessionKey getSessionKey() - { - return sessionKey; - } - - public ComponentDescriptor getComponentDescriptor( String interfaceName, ComponentSelector selector ) - { - ComponentDescriptor descriptor = null; - - List instanceNames = selector.getSelectedInstancesInOrder(); - if ( instanceNames == null || instanceNames.isEmpty() ) - { - instanceNames = Collections.singletonList( ComponentDescriptor.NO_INSTANCE_NAME ); - } - - for ( Iterator it = instanceNames.iterator(); it.hasNext(); ) - { - String instanceName = (String) it.next(); - - String key = ComponentUtilities.createDescriptorKey( interfaceName, instanceName ); - - descriptor = (ComponentDescriptor) components.get( key ); - - if ( descriptor != null ) - { - break; - } - } - - return descriptor; - } - - public ComponentSelector getComponentSelector( String ifc ) - { - return (ComponentSelector) selectors.get( ifc ); - } - - public boolean containsComponentDescriptor( String ifc, String instance ) - throws ContainerException - { - String key = ComponentUtilities.createDescriptorKey( ifc, instance ); - - return components.containsKey( key ); - } - - public boolean containsComponentDescriptor( String ifc, ComponentSelector selector ) - throws ContainerException - { - boolean result = false; - - List instanceNames = selector.getSelectedInstancesInOrder(); - for ( Iterator it = instanceNames.iterator(); it.hasNext(); ) - { - String instance = (String) it.next(); - - String key = ComponentUtilities.createDescriptorKey( ifc, instance ); - - result = components.containsKey( key ); - - if ( result ) - { - break; - } - } - - return result; - } - - public boolean containsComponentDescriptor( ComponentDescriptor descriptor ) - throws ContainerException - { - String key = ComponentUtilities.createDescriptorKey( descriptor ); - - return components.containsKey( key ); - } - - public void registerComponentDescriptor( ComponentDescriptor descriptor ) - throws DuplicateComponentDescriptorException - { - String key = ComponentUtilities.createDescriptorKey( descriptor ); - - if ( components .containsKey( key ) ) - { - throw new DuplicateComponentDescriptorException( "Cannot re-register component for: " + descriptor ); - } - else - { - components.put( key, descriptor ); - } - } - - public void registerComponentSelector( ComponentSelector selector ) - { - selectors.put( selector.getInterfaceName(), selector ); - } - - public boolean isOpen() - { - return sessionKey.isOpen(); - } - - public Date getLastAccessed() - { - return sessionKey.getLastAccessed(); - } - - public Date getCreationDate() - { - return created; - } - - public void registerComponentInstance( ComponentDescriptor descriptor, Object instance ) - throws DuplicateComponentInstanceException - { - String key = ComponentUtilities.createDescriptorKey( descriptor ); - - if ( instances.containsKey( key ) ) - { - throw new DuplicateComponentInstanceException( "Cannot register new instance of: " + descriptor + ". An instance already exists in the session." ); - } - else - { - instances.put( key, instance ); - } - } - - public boolean containsComponentInstance( ComponentDescriptor descriptor ) - throws ContainerException - { - String key = ComponentUtilities.createDescriptorKey( descriptor ); - - return instances.containsKey( key ); - } - - public Object getComponentInstance( ComponentDescriptor descriptor ) - throws ContainerException - { - String key = ComponentUtilities.createDescriptorKey( descriptor ); - - return instances.get( key ); - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-basic-component-info/pom.xml b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-basic-component-info/pom.xml deleted file mode 100644 index 31b5c2694..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-basic-component-info/pom.xml +++ /dev/null @@ -1,19 +0,0 @@ - - 4.0.0 - - org.codehaus.bacon - bacon-root - 1.0-alpha-1-SNAPSHOT - - bacon-basic-component-info - - BaCon Basic Component Information - - - - org.codehaus.bacon - bacon-api - - - - diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-basic-component-info/src/main/java/org/codehaus/bacon/component/basic/BasicComponentAttribute.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-basic-component-info/src/main/java/org/codehaus/bacon/component/basic/BasicComponentAttribute.java deleted file mode 100644 index 75c3d8613..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-basic-component-info/src/main/java/org/codehaus/bacon/component/basic/BasicComponentAttribute.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.codehaus.bacon.component.basic; - -import org.codehaus.bacon.component.ComponentAttribute; - -public class BasicComponentAttribute - extends BasicCompositionSource - implements ComponentAttribute -{ - - private String expression; - - private String type; - - public String getExpression() - { - return expression; - } - - public void setExpression( String expression ) - { - this.expression = expression; - } - - public String getType() - { - return type; - } - - public void setType( String type ) - { - this.type = type; - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-basic-component-info/src/main/java/org/codehaus/bacon/component/basic/BasicComponentDescriptor.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-basic-component-info/src/main/java/org/codehaus/bacon/component/basic/BasicComponentDescriptor.java deleted file mode 100644 index 43ef1a807..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-basic-component-info/src/main/java/org/codehaus/bacon/component/basic/BasicComponentDescriptor.java +++ /dev/null @@ -1,196 +0,0 @@ -package org.codehaus.bacon.component.basic; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.codehaus.bacon.component.ComponentAttribute; -import org.codehaus.bacon.component.ComponentDescriptor; -import org.codehaus.bacon.component.ComponentReference; - -public class BasicComponentDescriptor - implements ComponentDescriptor -{ - private Set references = new HashSet(); - - private Set attributes = new HashSet(); - - private String interfaceName; - - private String instanceName; - - private String implementation; - - private String instantiationStrategy; - - private String language; - - private List constructionRequirements = new ArrayList(); - - // calculated. - private Map referencesById; - - // calculated. - private Map attributesById; - - public List getConstructionRequirements() - { - return constructionRequirements; - } - - public void setConstructionRequirements( List constructionRequirements ) - { - this.constructionRequirements.clear(); - this.constructionRequirements.addAll( constructionRequirements ); - } - - public void addConstructionRequirement( String compositionSourceId ) - { - this.constructionRequirements.add( compositionSourceId ); - } - - public String getInterfaceName() - { - return interfaceName; - } - - public void setInterfaceName( String interfaceName ) - { - this.interfaceName = interfaceName; - } - - public String getInstanceName() - { - return instanceName; - } - - public void setInstanceName( String instanceName ) - { - this.instanceName = instanceName; - } - - public String getImplementation() - { - return implementation; - } - - public void setImplementation( String implementation ) - { - this.implementation = implementation; - } - - public Set getComponentReferences() - { - return Collections.unmodifiableSet( references ); - } - - public void setComponentReferences( Set componentReferences ) - { - this.references.clear(); - this.references.addAll( componentReferences ); - } - - public void addComponentReference( ComponentReference componentReference ) - { - references.add( componentReference ); - } - - public Set getComponentAttributes() - { - return Collections.unmodifiableSet( attributes ); - } - - public void setComponentAttributes( Set componentAttributes ) - { - this.attributes.clear(); - this.attributes.addAll( componentAttributes ); - } - - public void addComponentAttribute( ComponentAttribute componentAttribute ) - { - attributes.add( componentAttribute ); - } - - public String toString() - { - return "Basic Component Descriptor (" + interfaceName + ":" + (instanceName == null ? ComponentDescriptor.NO_INSTANCE_NAME : instanceName ) + ")"; - } - - public String getInstantiationStrategy() - { - return instantiationStrategy; - } - - public void setInstantiationStrategy( String instantiationStrategy ) - { - this.instantiationStrategy = instantiationStrategy; - } - - public String getImplementationLanguage() - { - return language; - } - - public void setImplementationLanguage( String language ) - { - this.language = language; - } - - public Map getComponentReferencesById() - { - if ( referencesById == null ) - { - if ( references != null && !references.isEmpty() ) - { - referencesById = new HashMap(); - - for ( Iterator it = references.iterator(); it.hasNext(); ) - { - ComponentReference reference = (ComponentReference) it.next(); - - referencesById.put( reference.getId(), reference ); - } - - referencesById = Collections.unmodifiableMap( referencesById ); - } - else - { - referencesById = Collections.EMPTY_MAP; - } - } - - return referencesById; - } - - public Map getComponentAttributesById() - { - if ( attributesById == null ) - { - if ( attributes != null && !attributes.isEmpty() ) - { - attributesById = new HashMap(); - - for ( Iterator it = attributes.iterator(); it.hasNext(); ) - { - ComponentAttribute attribute = (ComponentAttribute) it.next(); - - attributesById.put( attribute.getId(), attribute ); - } - - attributesById = Collections.unmodifiableMap( attributesById ); - } - else - { - attributesById = Collections.EMPTY_MAP; - } - } - - return attributesById; - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-basic-component-info/src/main/java/org/codehaus/bacon/component/basic/BasicComponentReference.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-basic-component-info/src/main/java/org/codehaus/bacon/component/basic/BasicComponentReference.java deleted file mode 100644 index 5ed3a7404..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-basic-component-info/src/main/java/org/codehaus/bacon/component/basic/BasicComponentReference.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.codehaus.bacon.component.basic; - -import org.codehaus.bacon.component.ComponentReference; - -public class BasicComponentReference - extends BasicCompositionSource - implements ComponentReference -{ - - private String interfaceName; - - private String cardinality; - - public String getCardinality() - { - return cardinality; - } - - public void setCardinality( String cardinality ) - { - this.cardinality = cardinality; - } - - public String getInterfaceName() - { - return interfaceName; - } - - public void setInterfaceName( String interfaceName ) - { - this.interfaceName = interfaceName; - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-basic-component-info/src/main/java/org/codehaus/bacon/component/basic/BasicComponentSelector.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-basic-component-info/src/main/java/org/codehaus/bacon/component/basic/BasicComponentSelector.java deleted file mode 100644 index 01fd8ceb9..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-basic-component-info/src/main/java/org/codehaus/bacon/component/basic/BasicComponentSelector.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.codehaus.bacon.component.basic; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.codehaus.bacon.component.ComponentDescriptor; -import org.codehaus.bacon.component.ComponentSelector; - -public class BasicComponentSelector - implements ComponentSelector -{ - - private List instanceNames = new ArrayList(); - private String interfaceName; - - public String getInterfaceName() - { - return interfaceName; - } - - public void setInterfaceName( String interfaceName ) - { - this.interfaceName = interfaceName; - } - - public void addInstanceName( String instanceName ) - { - instanceNames.add( instanceName ); - } - - public void addEmptyInstance() - { - instanceNames.add( ComponentDescriptor.NO_INSTANCE_NAME ); - } - - public void setInstanceNames( List instanceNames ) - { - this.instanceNames.addAll( instanceNames ); - } - - public List getSelectedInstancesInOrder() - { - List names = instanceNames; - - if ( names.isEmpty() ) - { - names = Collections.singletonList( ComponentDescriptor.NO_INSTANCE_NAME ); - } - - return Collections.unmodifiableList( names ); - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-basic-component-info/src/main/java/org/codehaus/bacon/component/basic/BasicCompositionSource.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-basic-component-info/src/main/java/org/codehaus/bacon/component/basic/BasicCompositionSource.java deleted file mode 100644 index b4b0ea2aa..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-basic-component-info/src/main/java/org/codehaus/bacon/component/basic/BasicCompositionSource.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.codehaus.bacon.component.basic; - -import org.codehaus.bacon.component.InjectionDescriptor; - -public abstract class BasicCompositionSource - implements InjectionDescriptor -{ - - private boolean required = false; - - private String target; - - private String strategy; - - private String id; - - public boolean isRequired() - { - return required; - } - - public void setRequired( boolean required ) - { - this.required = required; - } - - public String getId() - { - return id; - } - - public void setId( String id ) - { - this.id = id; - } - - public String getInjectionTarget() - { - return target; - } - - public void setInjectionTarget( String destination ) - { - this.target = destination; - } - - public String getInjectionStrategy() - { - return strategy; - } - - public void setInjectionStrategy( String strategy ) - { - this.strategy = strategy; - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-component-factories/pom.xml b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-component-factories/pom.xml deleted file mode 100644 index b0c409322..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-component-factories/pom.xml +++ /dev/null @@ -1,19 +0,0 @@ - - 4.0.0 - - org.codehaus.bacon - bacon-root - 1.0-alpha-1-SNAPSHOT - - bacon-component-factories - - BaCon Basic Component Factories - - - - org.codehaus.bacon - bacon-api - - - - diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-language-support/bacon-java-support/pom.xml b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-language-support/bacon-java-support/pom.xml deleted file mode 100644 index 338b91b1b..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-language-support/bacon-java-support/pom.xml +++ /dev/null @@ -1,23 +0,0 @@ - - 4.0.0 - - org.codehaus.bacon - bacon-language-root - 1.0-alpha-1-SNAPSHOT - - bacon-java-support - - BaCon Java Component Support - - - - org.codehaus.bacon - bacon-api - - - ognl - ognl - - - - diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-language-support/bacon-java-support/src/main/java/org/codehaus/bacon/component/factory/java/JavaInstanceFactory.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-language-support/bacon-java-support/src/main/java/org/codehaus/bacon/component/factory/java/JavaInstanceFactory.java deleted file mode 100644 index 0527987c5..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-language-support/bacon-java-support/src/main/java/org/codehaus/bacon/component/factory/java/JavaInstanceFactory.java +++ /dev/null @@ -1,117 +0,0 @@ -package org.codehaus.bacon.component.factory.java; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.util.List; - -import org.codehaus.bacon.component.ComponentDescriptor; -import org.codehaus.bacon.component.factory.InstanceFactory; -import org.codehaus.bacon.component.factory.InstantiationException; - -public class JavaInstanceFactory - implements InstanceFactory -{ - - private static final Class[] EMPTY_CLASSES = new Class[0]; - - private static final Object[] EMPTY_INSTANCES = new Object[0]; - - public Object instantiate( ComponentDescriptor descriptor, List constructionParameters, - ClassLoader componentLoader ) - throws InstantiationException - { - Class[] parameterClasses; - Object[] parameters; - if ( constructionParameters != null ) - { - int paramCount = constructionParameters.size(); - - parameterClasses = new Class[paramCount]; - parameters = new Object[paramCount]; - - for ( int i = 0; i < paramCount; i++ ) - { - Object parameter = (Object) constructionParameters.get( i ); - - parameterClasses[i] = parameter.getClass(); - parameters[i] = parameter; - } - } - else - { - parameterClasses = EMPTY_CLASSES; - parameters = EMPTY_INSTANCES; - } - - String className = descriptor.getImplementation(); - - Object instance = null; - try - { - Class clazz = componentLoader.loadClass( className ); - - Constructor[] constructors = clazz.getConstructors(); - - if ( constructors != null ) - { - for ( int i = 0; i < constructors.length; i++ ) - { - Constructor constructor = constructors[i]; - - Class[] paramTypes = constructor.getParameterTypes(); - - int paramCount = paramTypes.length; - - boolean foundConstructor = true; - if ( paramCount == parameterClasses.length ) - { - parameterCheck: for ( int j = 0; j < paramCount; j++ ) - { - Class paramClass = paramTypes[j]; - Class checkClass = parameterClasses[j]; - - if ( !paramClass.isAssignableFrom( checkClass ) ) - { - foundConstructor = false; - break parameterCheck; - } - } - } - - if ( foundConstructor ) - { - try - { - instance = constructor.newInstance( parameters ); - } - catch ( IllegalAccessException e ) - { - throw new InstantiationException( "Error accessing constructor for: " + className + ". Reason: " + e.getMessage(), e ); - } - catch ( InvocationTargetException e ) - { - Throwable cause = e.getTargetException(); - throw new InstantiationException( "Error occurred while invoking constructor for: " + className + ". Reason: " + cause.getMessage(), cause ); - } - catch ( java.lang.InstantiationException e ) - { - throw new InstantiationException( "Error instantiating: " + className + ". Reason: " + e.getMessage(), e ); - } - } - } - } - - if ( instance == null ) - { - throw new InstantiationException( "Cannot find matching constructor for: " + className + " with parameters: " + constructionParameters ); - } - } - catch ( ClassNotFoundException e ) - { - throw new InstantiationException( "Cannot find component class: " + className, e ); - } - - return instance; - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-language-support/bacon-java-support/src/main/java/org/codehaus/bacon/component/injector/java/JavaComponentInjector.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-language-support/bacon-java-support/src/main/java/org/codehaus/bacon/component/injector/java/JavaComponentInjector.java deleted file mode 100644 index 469b24a91..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-language-support/bacon-java-support/src/main/java/org/codehaus/bacon/component/injector/java/JavaComponentInjector.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.codehaus.bacon.component.injector.java; - -import java.lang.reflect.Field; -import java.util.Iterator; -import java.util.Map; - -import ognl.Ognl; -import ognl.OgnlException; - -import org.codehaus.bacon.component.InjectionDescriptor; -import org.codehaus.bacon.component.injection.ComponentInjectionException; -import org.codehaus.bacon.component.injection.ComponentInjector; -import org.codehaus.bacon.component.language.java.JavaLanguageConstants; -import org.codehaus.bacon.component.util.ognl.ClassLoaderResolver; - -public class JavaComponentInjector - implements ComponentInjector -{ - public static final String LANGUAGE = "java"; - - public void inject( Object instance, Map valuesByCompositionSource, ClassLoader containerLoader ) - throws ComponentInjectionException - { - if ( valuesByCompositionSource != null && !valuesByCompositionSource.isEmpty() ) - { - for ( Iterator it = valuesByCompositionSource.entrySet().iterator(); it.hasNext(); ) - { - Map.Entry entry = (Map.Entry) it.next(); - - InjectionDescriptor source = (InjectionDescriptor) entry.getKey(); - Object value = entry.getValue(); - - String injectionStrategy = source.getInjectionStrategy(); - - String injectionTarget = source.getInjectionTarget(); - - if ( JavaLanguageConstants.FIELD_INJECTION_STRATEGY.equals( injectionStrategy ) ) - { - try - { - Field field = instance.getClass().getField( injectionTarget ); - - boolean accessible = field.isAccessible(); - if ( !accessible ) - { - field.setAccessible( true ); - } - - field.set( instance, value ); - field.setAccessible( accessible ); - } - catch ( SecurityException e ) - { - throw new ComponentInjectionException( "Security is restricted for field: " + injectionTarget - + " in: " + instance.getClass() + ". Error: " + e.getMessage(), e ); - } - catch ( NoSuchFieldException e ) - { - throw new ComponentInjectionException( "Field: " + injectionTarget + " in: " + instance.getClass() - + " could not be found.", e ); - } - catch ( IllegalAccessException e ) - { - throw new ComponentInjectionException( "Illegal access for field: " + injectionTarget + " in: " - + instance.getClass() + ". Error: " + e.getMessage(), e ); - } - } - else - { - try - { - Ognl.createDefaultContext(instance, new ClassLoaderResolver( containerLoader ) ); - Ognl.setValue( injectionTarget, instance, value ); - } - catch ( OgnlException e ) - { - throw new ComponentInjectionException( "Error setting value of: " + injectionTarget - + " on root object: " + instance.getClass() + ". Error: " + e.getMessage(), e ); - } - } - } - } - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-language-support/bacon-java-support/src/main/java/org/codehaus/bacon/component/language/java/JavaLanguageConstants.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-language-support/bacon-java-support/src/main/java/org/codehaus/bacon/component/language/java/JavaLanguageConstants.java deleted file mode 100644 index f0b75e37a..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-language-support/bacon-java-support/src/main/java/org/codehaus/bacon/component/language/java/JavaLanguageConstants.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.codehaus.bacon.component.language.java; - -public final class JavaLanguageConstants -{ - public static final String FIELD_INJECTION_STRATEGY = "field"; - public static final String PROPERTY_INJECTION_STRATEGY = "property"; - - private JavaLanguageConstants() {} - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-language-support/bacon-java-support/src/main/java/org/codehaus/bacon/component/language/java/JavaLanguagePack.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-language-support/bacon-java-support/src/main/java/org/codehaus/bacon/component/language/java/JavaLanguagePack.java deleted file mode 100644 index d6c93f234..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-language-support/bacon-java-support/src/main/java/org/codehaus/bacon/component/language/java/JavaLanguagePack.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.codehaus.bacon.component.language.java; - -import org.codehaus.bacon.component.factory.InstanceFactory; -import org.codehaus.bacon.component.factory.java.JavaInstanceFactory; -import org.codehaus.bacon.component.injection.ComponentInjector; -import org.codehaus.bacon.component.injector.java.JavaComponentInjector; -import org.codehaus.bacon.component.language.LanguagePack; - -public class JavaLanguagePack - implements LanguagePack -{ - - public static final String LANGUAGE = "java"; - - private InstanceFactory instanceFactory = new JavaInstanceFactory(); - private ComponentInjector componentInjector = new JavaComponentInjector(); - - public String getLanguageKey() - { - return LANGUAGE; - } - - public ComponentInjector getComponentInjector() - { - return componentInjector; - } - - public InstanceFactory getInstanceFactory() - { - return instanceFactory; - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-language-support/bacon-java-support/src/main/java/org/codehaus/bacon/component/util/ognl/ClassLoaderResolver.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-language-support/bacon-java-support/src/main/java/org/codehaus/bacon/component/util/ognl/ClassLoaderResolver.java deleted file mode 100644 index 39edaff4e..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-language-support/bacon-java-support/src/main/java/org/codehaus/bacon/component/util/ognl/ClassLoaderResolver.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.codehaus.bacon.component.util.ognl; - -import java.util.Map; - -import ognl.ClassResolver; - -public class ClassLoaderResolver - implements ClassResolver -{ - - private final ClassLoader loader; - - public ClassLoaderResolver( ClassLoader loader ) - { - this.loader = loader; - } - - public Class classForName( String className, Map context ) - throws ClassNotFoundException - { - return loader.loadClass( className ); - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-language-support/pom.xml b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-language-support/pom.xml deleted file mode 100644 index a7d2787a8..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-language-support/pom.xml +++ /dev/null @@ -1,17 +0,0 @@ - - 4.0.0 - - org.codehaus.bacon - bacon-root - 1.0-alpha-1-SNAPSHOT - - - bacon-language-root - pom - - BaCon Lanugage Support Root POM - - - bacon-java-support - - diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-utils/pom.xml b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-utils/pom.xml deleted file mode 100644 index 8c37639c7..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-utils/pom.xml +++ /dev/null @@ -1,12 +0,0 @@ - - 4.0.0 - - org.codehaus.bacon - bacon-root - 1.0-alpha-1-SNAPSHOT - - - bacon-utils - - BaCon Utilities - diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-utils/src/main/java/org/codehaus/bacon/util/io/IOUtil.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-utils/src/main/java/org/codehaus/bacon/util/io/IOUtil.java deleted file mode 100644 index 215b7428e..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-utils/src/main/java/org/codehaus/bacon/util/io/IOUtil.java +++ /dev/null @@ -1,813 +0,0 @@ -package org.codehaus.bacon.util.io; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.codehaus.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Turbine" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact codehaus@codehaus.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Turbine", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ - -import java.io.BufferedInputStream; -import java.io.BufferedOutputStream; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import java.io.Writer; - -/** - * General IO Stream manipulation. - *

- * This class provides static utility methods for input/output operations, particularly buffered - * copying between sources (InputStream, Reader, String and - * byte[]) and destinations (OutputStream, Writer, - * String and byte[]). - *

- * - *

Unless otherwise noted, these copy methods do not flush or close the - * streams. Often, doing so would require making non-portable assumptions about the streams' origin - * and further use. This means that both streams' close() methods must be called after - * copying. if one omits this step, then the stream resources (sockets, file descriptors) are - * released when the associated Stream is garbage-collected. It is not a good idea to rely on this - * mechanism. For a good overview of the distinction between "memory management" and "resource - * management", see this - * UnixReview article

- * - *

For each copy method, a variant is provided that allows the caller to specify the - * buffer size (the default is 4k). As the buffer size can have a fairly large impact on speed, this - * may be worth tweaking. Often "large buffer -> faster" does not hold, even for large data - * transfers.

- * - *

For byte-to-char methods, a copy variant allows the encoding to be selected - * (otherwise the platform default is used).

- * - *

The copy methods use an internal buffer when copying. It is therefore advisable - * not to deliberately wrap the stream arguments to the copy methods in - * Buffered* streams. For example, don't do the - * following:

- * - * copy( new BufferedInputStream( in ), new BufferedOutputStream( out ) ); - * - *

The rationale is as follows:

- * - *

Imagine that an InputStream's read() is a very expensive operation, which would usually suggest - * wrapping in a BufferedInputStream. The BufferedInputStream works by issuing infrequent - * {@link java.io.InputStream#read(byte[] b, int off, int len)} requests on the underlying InputStream, to - * fill an internal buffer, from which further read requests can inexpensively get - * their data (until the buffer runs out).

- *

However, the copy methods do the same thing, keeping an internal buffer, - * populated by {@link InputStream#read(byte[] b, int off, int len)} requests. Having two buffers - * (or three if the destination stream is also buffered) is pointless, and the unnecessary buffer - * management hurts performance slightly (about 3%, according to some simple experiments).

- * - * @author Peter Donald - * @author Jeff Turner - * @version CVS $Revision: 1106 $ $Date$ - * @since 4.0 - */ - -/* - * Behold, intrepid explorers; a map of this class: - * - * Method Input Output Dependency - * ------ ----- ------ ------- - * 1 copy InputStream OutputStream (primitive) - * 2 copy Reader Writer (primitive) - * - * 3 copy InputStream Writer 2 - * 4 toString InputStream String 3 - * 5 toByteArray InputStream byte[] 1 - * - * 6 copy Reader OutputStream 2 - * 7 toString Reader String 2 - * 8 toByteArray Reader byte[] 6 - * - * 9 copy String OutputStream 2 - * 10 copy String Writer (trivial) - * 11 toByteArray String byte[] 9 - * - * 12 copy byte[] Writer 3 - * 13 toString byte[] String 12 - * 14 copy byte[] OutputStream (trivial) - * - * - * Note that only the first two methods shuffle bytes; the rest use these two, or (if possible) copy - * using native Java copy methods. As there are method variants to specify buffer size and encoding, - * each row may correspond to up to 4 methods. - * - */ - -public final class IOUtil -{ - private static final int DEFAULT_BUFFER_SIZE = 1024 * 4; - - /** - * Private constructor to prevent instantiation. - */ - private IOUtil() - { - } - - /////////////////////////////////////////////////////////////// - // Core copy methods - /////////////////////////////////////////////////////////////// - - /** - * Copy bytes from an InputStream to an OutputStream. - */ - public static void copy( final InputStream input, final OutputStream output ) - throws IOException - { - copy( input, output, DEFAULT_BUFFER_SIZE ); - } - - /** - * Copy bytes from an InputStream to an OutputStream. - * @param bufferSize Size of internal buffer to use. - */ - public static void copy( final InputStream input, - final OutputStream output, - final int bufferSize ) - throws IOException - { - final byte[] buffer = new byte[bufferSize]; - int n = 0; - while ( -1 != ( n = input.read( buffer ) ) ) - { - output.write( buffer, 0, n ); - } - } - - /** - * Copy chars from a Reader to a Writer. - */ - public static void copy( final Reader input, final Writer output ) - throws IOException - { - copy( input, output, DEFAULT_BUFFER_SIZE ); - } - - /** - * Copy chars from a Reader to a Writer. - * @param bufferSize Size of internal buffer to use. - */ - public static void copy( final Reader input, final Writer output, final int bufferSize ) - throws IOException - { - final char[] buffer = new char[bufferSize]; - int n = 0; - while ( -1 != ( n = input.read( buffer ) ) ) - { - output.write( buffer, 0, n ); - } - output.flush(); - } - - /////////////////////////////////////////////////////////////// - // Derived copy methods - // InputStream -> * - /////////////////////////////////////////////////////////////// - - - /////////////////////////////////////////////////////////////// - // InputStream -> Writer - - /** - * Copy and convert bytes from an InputStream to chars on a - * Writer. - * The platform's default encoding is used for the byte-to-char conversion. - */ - public static void copy( final InputStream input, final Writer output ) - throws IOException - { - copy( input, output, DEFAULT_BUFFER_SIZE ); - } - - /** - * Copy and convert bytes from an InputStream to chars on a - * Writer. - * The platform's default encoding is used for the byte-to-char conversion. - * @param bufferSize Size of internal buffer to use. - */ - public static void copy( final InputStream input, final Writer output, final int bufferSize ) - throws IOException - { - final InputStreamReader in = new InputStreamReader( input ); - copy( in, output, bufferSize ); - } - - /** - * Copy and convert bytes from an InputStream to chars on a - * Writer, using the specified encoding. - * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. - */ - public static void copy( final InputStream input, final Writer output, final String encoding ) - throws IOException - { - final InputStreamReader in = new InputStreamReader( input, encoding ); - copy( in, output ); - } - - /** - * Copy and convert bytes from an InputStream to chars on a - * Writer, using the specified encoding. - * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. - * @param bufferSize Size of internal buffer to use. - */ - public static void copy( final InputStream input, - final Writer output, - final String encoding, - final int bufferSize ) - throws IOException - { - final InputStreamReader in = new InputStreamReader( input, encoding ); - copy( in, output, bufferSize ); - } - - - /////////////////////////////////////////////////////////////// - // InputStream -> String - - /** - * Get the contents of an InputStream as a String. - * The platform's default encoding is used for the byte-to-char conversion. - */ - public static String toString( final InputStream input ) - throws IOException - { - return toString( input, DEFAULT_BUFFER_SIZE ); - } - - /** - * Get the contents of an InputStream as a String. - * The platform's default encoding is used for the byte-to-char conversion. - * @param bufferSize Size of internal buffer to use. - */ - public static String toString( final InputStream input, final int bufferSize ) - throws IOException - { - final StringWriter sw = new StringWriter(); - copy( input, sw, bufferSize ); - return sw.toString(); - } - - /** - * Get the contents of an InputStream as a String. - * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. - */ - public static String toString( final InputStream input, final String encoding ) - throws IOException - { - return toString( input, encoding, DEFAULT_BUFFER_SIZE ); - } - - /** - * Get the contents of an InputStream as a String. - * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. - * @param bufferSize Size of internal buffer to use. - */ - public static String toString( final InputStream input, - final String encoding, - final int bufferSize ) - throws IOException - { - final StringWriter sw = new StringWriter(); - copy( input, sw, encoding, bufferSize ); - return sw.toString(); - } - - /////////////////////////////////////////////////////////////// - // InputStream -> byte[] - - /** - * Get the contents of an InputStream as a byte[]. - */ - public static byte[] toByteArray( final InputStream input ) - throws IOException - { - return toByteArray( input, DEFAULT_BUFFER_SIZE ); - } - - /** - * Get the contents of an InputStream as a byte[]. - * @param bufferSize Size of internal buffer to use. - */ - public static byte[] toByteArray( final InputStream input, final int bufferSize ) - throws IOException - { - final ByteArrayOutputStream output = new ByteArrayOutputStream(); - copy( input, output, bufferSize ); - return output.toByteArray(); - } - - - /////////////////////////////////////////////////////////////// - // Derived copy methods - // Reader -> * - /////////////////////////////////////////////////////////////// - - /////////////////////////////////////////////////////////////// - // Reader -> OutputStream - /** - * Serialize chars from a Reader to bytes on an OutputStream, and - * flush the OutputStream. - */ - public static void copy( final Reader input, final OutputStream output ) - throws IOException - { - copy( input, output, DEFAULT_BUFFER_SIZE ); - } - - /** - * Serialize chars from a Reader to bytes on an OutputStream, and - * flush the OutputStream. - * @param bufferSize Size of internal buffer to use. - */ - public static void copy( final Reader input, final OutputStream output, final int bufferSize ) - throws IOException - { - final OutputStreamWriter out = new OutputStreamWriter( output ); - copy( input, out, bufferSize ); - // NOTE: Unless anyone is planning on rewriting OutputStreamWriter, we have to flush - // here. - out.flush(); - } - - /////////////////////////////////////////////////////////////// - // Reader -> String - /** - * Get the contents of a Reader as a String. - */ - public static String toString( final Reader input ) - throws IOException - { - return toString( input, DEFAULT_BUFFER_SIZE ); - } - - /** - * Get the contents of a Reader as a String. - * @param bufferSize Size of internal buffer to use. - */ - public static String toString( final Reader input, final int bufferSize ) - throws IOException - { - final StringWriter sw = new StringWriter(); - copy( input, sw, bufferSize ); - return sw.toString(); - } - - - /////////////////////////////////////////////////////////////// - // Reader -> byte[] - /** - * Get the contents of a Reader as a byte[]. - */ - public static byte[] toByteArray( final Reader input ) - throws IOException - { - return toByteArray( input, DEFAULT_BUFFER_SIZE ); - } - - /** - * Get the contents of a Reader as a byte[]. - * @param bufferSize Size of internal buffer to use. - */ - public static byte[] toByteArray( final Reader input, final int bufferSize ) - throws IOException - { - ByteArrayOutputStream output = new ByteArrayOutputStream(); - copy( input, output, bufferSize ); - return output.toByteArray(); - } - - - /////////////////////////////////////////////////////////////// - // Derived copy methods - // String -> * - /////////////////////////////////////////////////////////////// - - - /////////////////////////////////////////////////////////////// - // String -> OutputStream - - /** - * Serialize chars from a String to bytes on an OutputStream, and - * flush the OutputStream. - */ - public static void copy( final String input, final OutputStream output ) - throws IOException - { - copy( input, output, DEFAULT_BUFFER_SIZE ); - } - - /** - * Serialize chars from a String to bytes on an OutputStream, and - * flush the OutputStream. - * @param bufferSize Size of internal buffer to use. - */ - public static void copy( final String input, final OutputStream output, final int bufferSize ) - throws IOException - { - final StringReader in = new StringReader( input ); - final OutputStreamWriter out = new OutputStreamWriter( output ); - copy( in, out, bufferSize ); - // NOTE: Unless anyone is planning on rewriting OutputStreamWriter, we have to flush - // here. - out.flush(); - } - - - - /////////////////////////////////////////////////////////////// - // String -> Writer - - /** - * Copy chars from a String to a Writer. - */ - public static void copy( final String input, final Writer output ) - throws IOException - { - output.write( input ); - } - - /** - * Copy bytes from an InputStream to an - * OutputStream, with buffering. - * This is equivalent to passing a - * {@link java.io.BufferedInputStream} and - * {@link java.io.BufferedOutputStream} to {@link #copy(InputStream, OutputStream)}, - * and flushing the output stream afterwards. The streams are not closed - * after the copy. - * @deprecated Buffering streams is actively harmful! See the class description as to why. Use - * {@link #copy(InputStream, OutputStream)} instead. - */ - public static void bufferedCopy( final InputStream input, final OutputStream output ) - throws IOException - { - final BufferedInputStream in = new BufferedInputStream( input ); - final BufferedOutputStream out = new BufferedOutputStream( output ); - copy( in, out ); - out.flush(); - } - - - /////////////////////////////////////////////////////////////// - // String -> byte[] - /** - * Get the contents of a String as a byte[]. - */ - public static byte[] toByteArray( final String input ) - throws IOException - { - return toByteArray( input, DEFAULT_BUFFER_SIZE ); - } - - /** - * Get the contents of a String as a byte[]. - * @param bufferSize Size of internal buffer to use. - */ - public static byte[] toByteArray( final String input, final int bufferSize ) - throws IOException - { - ByteArrayOutputStream output = new ByteArrayOutputStream(); - copy( input, output, bufferSize ); - return output.toByteArray(); - } - - - - /////////////////////////////////////////////////////////////// - // Derived copy methods - // byte[] -> * - /////////////////////////////////////////////////////////////// - - - /////////////////////////////////////////////////////////////// - // byte[] -> Writer - - /** - * Copy and convert bytes from a byte[] to chars on a - * Writer. - * The platform's default encoding is used for the byte-to-char conversion. - */ - public static void copy( final byte[] input, final Writer output ) - throws IOException - { - copy( input, output, DEFAULT_BUFFER_SIZE ); - } - - /** - * Copy and convert bytes from a byte[] to chars on a - * Writer. - * The platform's default encoding is used for the byte-to-char conversion. - * @param bufferSize Size of internal buffer to use. - */ - public static void copy( final byte[] input, final Writer output, final int bufferSize ) - throws IOException - { - final ByteArrayInputStream in = new ByteArrayInputStream( input ); - copy( in, output, bufferSize ); - } - - /** - * Copy and convert bytes from a byte[] to chars on a - * Writer, using the specified encoding. - * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. - */ - public static void copy( final byte[] input, final Writer output, final String encoding ) - throws IOException - { - final ByteArrayInputStream in = new ByteArrayInputStream( input ); - copy( in, output, encoding ); - } - - /** - * Copy and convert bytes from a byte[] to chars on a - * Writer, using the specified encoding. - * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. - * @param bufferSize Size of internal buffer to use. - */ - public static void copy( final byte[] input, - final Writer output, - final String encoding, - final int bufferSize ) - throws IOException - { - final ByteArrayInputStream in = new ByteArrayInputStream( input ); - copy( in, output, encoding, bufferSize ); - } - - - /////////////////////////////////////////////////////////////// - // byte[] -> String - - /** - * Get the contents of a byte[] as a String. - * The platform's default encoding is used for the byte-to-char conversion. - */ - public static String toString( final byte[] input ) - throws IOException - { - return toString( input, DEFAULT_BUFFER_SIZE ); - } - - /** - * Get the contents of a byte[] as a String. - * The platform's default encoding is used for the byte-to-char conversion. - * @param bufferSize Size of internal buffer to use. - */ - public static String toString( final byte[] input, final int bufferSize ) - throws IOException - { - final StringWriter sw = new StringWriter(); - copy( input, sw, bufferSize ); - return sw.toString(); - } - - /** - * Get the contents of a byte[] as a String. - * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. - */ - public static String toString( final byte[] input, final String encoding ) - throws IOException - { - return toString( input, encoding, DEFAULT_BUFFER_SIZE ); - } - - /** - * Get the contents of a byte[] as a String. - * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. - * @param bufferSize Size of internal buffer to use. - */ - public static String toString( final byte[] input, - final String encoding, - final int bufferSize ) - throws IOException - { - final StringWriter sw = new StringWriter(); - copy( input, sw, encoding, bufferSize ); - return sw.toString(); - } - - - /////////////////////////////////////////////////////////////// - // byte[] -> OutputStream - - /** - * Copy bytes from a byte[] to an OutputStream. - */ - public static void copy( final byte[] input, final OutputStream output ) - throws IOException - { - copy( input, output, DEFAULT_BUFFER_SIZE ); - } - - /** - * Copy bytes from a byte[] to an OutputStream. - * @param bufferSize Size of internal buffer to use. - */ - public static void copy( final byte[] input, - final OutputStream output, - final int bufferSize ) - throws IOException - { - output.write( input ); - } - - /** - * Compare the contents of two Streams to determine if they are equal or not. - * - * @param input1 the first stream - * @param input2 the second stream - * @return true if the content of the streams are equal or they both don't exist, false otherwise - */ - public static boolean contentEquals( final InputStream input1, - final InputStream input2 ) - throws IOException - { - final InputStream bufferedInput1 = new BufferedInputStream( input1 ); - final InputStream bufferedInput2 = new BufferedInputStream( input2 ); - - int ch = bufferedInput1.read(); - while ( -1 != ch ) - { - final int ch2 = bufferedInput2.read(); - if ( ch != ch2 ) - { - return false; - } - ch = bufferedInput1.read(); - } - - final int ch2 = bufferedInput2.read(); - if ( -1 != ch2 ) - { - return false; - } - else - { - return true; - } - } - - // ---------------------------------------------------------------------- - // closeXXX() - // ---------------------------------------------------------------------- - - /** - * Closes the input stream. The input stream can be null and any IOException's will be swallowed. - * - * @param inputStream The stream to close. - */ - public static void close( InputStream inputStream ) - { - if ( inputStream == null ) - { - return; - } - - try - { - inputStream.close(); - } - catch( IOException ex ) - { - // ignore - } - } - - /** - * Closes the output stream. The output stream can be null and any IOException's will be swallowed. - * - * @param outputStream The stream to close. - */ - public static void close( OutputStream outputStream ) - { - if ( outputStream == null ) - { - return; - } - - try - { - outputStream.close(); - } - catch( IOException ex ) - { - // ignore - } - } - - /** - * Closes the reader. The reader can be null and any IOException's will be swallowed. - * - * @param reader The reader to close. - */ - public static void close( Reader reader ) - { - if ( reader == null ) - { - return; - } - - try - { - reader.close(); - } - catch( IOException ex ) - { - // ignore - } - } - - /** - * Closes the writer. The writer can be null and any IOException's will be swallowed. - * - * @param wrtier The writer to close. - */ - public static void close( Writer writer ) - { - if ( writer == null ) - { - return; - } - - try - { - writer.close(); - } - catch( IOException ex ) - { - // ignore - } - } -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-utils/src/main/java/org/codehaus/bacon/util/service/ServiceLocator.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-utils/src/main/java/org/codehaus/bacon/util/service/ServiceLocator.java deleted file mode 100644 index f16450c28..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-utils/src/main/java/org/codehaus/bacon/util/service/ServiceLocator.java +++ /dev/null @@ -1,70 +0,0 @@ -package org.codehaus.bacon.util.service; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; - -import org.codehaus.bacon.util.io.IOUtil; - -public final class ServiceLocator -{ - - private static final String BACON_SERVICE_BASE = "META-INF/bacon/"; - - private ServiceLocator(){} - - public static Object find( Class serviceType, String serviceInstance, ClassLoader targetLoader ) - throws ServiceLookupException - { - String servicePointer = BACON_SERVICE_BASE + serviceType.getName() + "/" + serviceInstance; - - BufferedReader reader = null; - - try - { - InputStream resourceIn = targetLoader.getResourceAsStream( servicePointer ); - - if ( resourceIn != null ) - { - reader = new BufferedReader( new InputStreamReader( resourceIn ) ); - - String implName; - - try - { - implName = reader.readLine(); - } - catch ( IOException e ) - { - throw new ServiceLookupException( "Cannot load service [class: " + serviceType + "; instance: " + serviceInstance + "]. Cannot read pointer resource: " + servicePointer, e ); - } - - try - { - return targetLoader.loadClass( implName ).newInstance(); - } - catch ( ClassNotFoundException e ) - { - throw new ServiceLookupException( "Cannot load service [class: " + serviceType + "; instance: " + serviceInstance + "]. Class: " + implName + " not found.", e ); - } - catch ( InstantiationException e ) - { - throw new ServiceLookupException( "Cannot load service [class: " + serviceType + "; instance: " + serviceInstance + "]. Cannot instantiate class: " + implName, e ); - } - catch ( IllegalAccessException e ) - { - throw new ServiceLookupException( "Cannot load service [class: " + serviceType + "; instance: " + serviceInstance + "]. Cannot instantiate class: " + implName, e ); - } - } - else - { - throw new ServiceLookupException( "Cannot find service [class: " + serviceType + "; instance: " + serviceInstance + "]" ); - } - } - finally - { - IOUtil.close( reader ); - } - } -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-utils/src/main/java/org/codehaus/bacon/util/service/ServiceLookupException.java b/plexus-sandbox/plexus-containers/plexus-api-new/bacon-utils/src/main/java/org/codehaus/bacon/util/service/ServiceLookupException.java deleted file mode 100644 index b1e66153d..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/bacon-utils/src/main/java/org/codehaus/bacon/util/service/ServiceLookupException.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.codehaus.bacon.util.service; - -public class ServiceLookupException - extends Exception -{ - private static final long serialVersionUID = 1L; - - public ServiceLookupException( String message, Throwable cause ) - { - super( message, cause ); - } - - public ServiceLookupException( String message ) - { - super( message ); - } - -} diff --git a/plexus-sandbox/plexus-containers/plexus-api-new/pom.xml b/plexus-sandbox/plexus-containers/plexus-api-new/pom.xml deleted file mode 100644 index 6ee2ad3a4..000000000 --- a/plexus-sandbox/plexus-containers/plexus-api-new/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - 4.0.0 - org.codehaus.bacon - bacon-root - 1.0-alpha-1-SNAPSHOT - pom - - BaCon Root POM - - - bacon-utils - bacon-api - bacon-base-container - bacon-basic-component-info - bacon-component-factories - bacon-language-support - - - - - commonjava-deploy - scp://maven.commonjava.org/opt/web/sites/maven.commonjava.org - - - - - - commonjava - http://maven.commonjava.org - - - - - - - ${groupId} - bacon-api - ${version} - - - ${groupId} - bacon-utils - ${version} - - - ognl - ognl - 2.6.7 - - - - diff --git a/plexus-sandbox/plexus-containers/plexus-container-artifact/pom.xml b/plexus-sandbox/plexus-containers/plexus-container-artifact/pom.xml deleted file mode 100644 index 8d99107a2..000000000 --- a/plexus-sandbox/plexus-containers/plexus-container-artifact/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - 4.0.0 - - org.codehaus.plexus - plexus-containers - 1.0.4 - - plexus-container-artifact - Plexus Artifact-Enabled Container - 1.0-alpha-4-SNAPSHOT - - - org.codehaus.plexus - plexus-container-default - 1.0-alpha-9 - - - org.apache.maven - maven-artifact - 2.0-alpha-2 - - - org.apache.maven.wagon - wagon-provider-api - 1.0-alpha-3 - - - - junit - junit - 3.8.1 - compile - - - diff --git a/plexus-sandbox/plexus-containers/plexus-container-artifact/src/main/java/org/codehaus/plexus/ArtifactEnabledContainer.java b/plexus-sandbox/plexus-containers/plexus-container-artifact/src/main/java/org/codehaus/plexus/ArtifactEnabledContainer.java deleted file mode 100644 index 675773844..000000000 --- a/plexus-sandbox/plexus-containers/plexus-container-artifact/src/main/java/org/codehaus/plexus/ArtifactEnabledContainer.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.codehaus.plexus; - -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.metadata.ArtifactMetadataSource; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.resolver.ArtifactResolutionException; -import org.apache.maven.artifact.resolver.ArtifactResolver; -import org.apache.maven.artifact.resolver.filter.ArtifactFilter; - -import java.util.List; - -/** - * @author jdcasey - * @version $Id$ - */ -public interface ArtifactEnabledContainer - extends PlexusContainer -{ - public void addComponent( Artifact component, - ArtifactResolver artifactResolver, - List remoteRepositories, - ArtifactRepository localRepository, - ArtifactMetadataSource sourceReader, - ArtifactFilter filter ) - throws ArtifactResolutionException, ArtifactEnabledContainerException; -} diff --git a/plexus-sandbox/plexus-containers/plexus-container-artifact/src/main/java/org/codehaus/plexus/ArtifactEnabledContainerException.java b/plexus-sandbox/plexus-containers/plexus-container-artifact/src/main/java/org/codehaus/plexus/ArtifactEnabledContainerException.java deleted file mode 100644 index 994a253d9..000000000 --- a/plexus-sandbox/plexus-containers/plexus-container-artifact/src/main/java/org/codehaus/plexus/ArtifactEnabledContainerException.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.codehaus.plexus; - -/** - * Exception in the container. - * - * @author Brett Porter - * @version $Id$ - */ -public class ArtifactEnabledContainerException extends Exception -{ - public ArtifactEnabledContainerException( String message, Throwable throwable ) - { - super( message, throwable ); - } -} diff --git a/plexus-sandbox/plexus-containers/plexus-container-artifact/src/main/java/org/codehaus/plexus/ArtifactEnabledPlexusContainerHost.java b/plexus-sandbox/plexus-containers/plexus-container-artifact/src/main/java/org/codehaus/plexus/ArtifactEnabledPlexusContainerHost.java deleted file mode 100644 index 042684d23..000000000 --- a/plexus-sandbox/plexus-containers/plexus-container-artifact/src/main/java/org/codehaus/plexus/ArtifactEnabledPlexusContainerHost.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.codehaus.plexus; - -import org.codehaus.classworlds.ClassWorld; - -/** - * - * @author Trygve Laugstøl - * @version $Id$ - */ -public class ArtifactEnabledPlexusContainerHost - extends PlexusContainerHost -{ - // ---------------------------------------------------------------------- - // Customizing Container Host - // ---------------------------------------------------------------------- - - protected DefaultPlexusContainer getPlexusContainer() - { - return new DefaultArtifactEnabledContainer(); - } - - /** - * Main entry-point. - * - * @param args Command-line arguments. - */ - public static void main( String[] args, ClassWorld classWorld ) - { - if ( args.length != 1 ) - { - System.err.println( "usage: plexus " ); - System.exit( 1 ); - } - - try - { - ArtifactEnabledPlexusContainerHost host = new ArtifactEnabledPlexusContainerHost(); - host.start( classWorld, args[0] ); - - host.waitForContainerShutdown(); - } - catch ( Exception e ) - { - e.printStackTrace(); - System.exit( 2 ); - } - } -} diff --git a/plexus-sandbox/plexus-containers/plexus-container-artifact/src/main/java/org/codehaus/plexus/ArtifactEnabledPlexusTestCase.java b/plexus-sandbox/plexus-containers/plexus-container-artifact/src/main/java/org/codehaus/plexus/ArtifactEnabledPlexusTestCase.java deleted file mode 100644 index eecc32cd9..000000000 --- a/plexus-sandbox/plexus-containers/plexus-container-artifact/src/main/java/org/codehaus/plexus/ArtifactEnabledPlexusTestCase.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.codehaus.plexus; - -/** - * @author jdcasey - * @version $Id$ - */ -public class ArtifactEnabledPlexusTestCase - extends PlexusTestCase -{ - public PlexusContainer getContainerInstance() - { - return new DefaultArtifactEnabledContainer(); - } -} diff --git a/plexus-sandbox/plexus-containers/plexus-container-artifact/src/main/java/org/codehaus/plexus/DefaultArtifactEnabledContainer.java b/plexus-sandbox/plexus-containers/plexus-container-artifact/src/main/java/org/codehaus/plexus/DefaultArtifactEnabledContainer.java deleted file mode 100644 index 10d747013..000000000 --- a/plexus-sandbox/plexus-containers/plexus-container-artifact/src/main/java/org/codehaus/plexus/DefaultArtifactEnabledContainer.java +++ /dev/null @@ -1,297 +0,0 @@ -package org.codehaus.plexus; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.factory.ArtifactFactory; -import org.apache.maven.artifact.factory.DefaultArtifactFactory; -import org.apache.maven.artifact.metadata.ArtifactMetadataSource; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.resolver.ArtifactResolutionException; -import org.apache.maven.artifact.resolver.ArtifactResolutionResult; -import org.apache.maven.artifact.resolver.ArtifactResolver; -import org.apache.maven.artifact.resolver.filter.ArtifactFilter; -import org.codehaus.classworlds.ClassRealm; -import org.codehaus.classworlds.ClassWorld; -import org.codehaus.classworlds.DuplicateRealmException; -import org.codehaus.classworlds.NoSuchRealmException; -import org.codehaus.plexus.component.repository.ComponentDependency; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.exception.ComponentRepositoryException; -import org.codehaus.plexus.configuration.PlexusConfigurationException; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; - -/** - * @author Jason van Zyl - * @author jdcasey - * @version $Id$ - */ -public class DefaultArtifactEnabledContainer - extends DefaultPlexusContainer - implements ArtifactEnabledContainer -{ - // TODO: should be a component? - private ArtifactFactory artifactFactory = new DefaultArtifactFactory(); - - public DefaultArtifactEnabledContainer() - { - super(); - } - - private Artifact createArtifact( ComponentDependency cd ) - { - return artifactFactory.createArtifact( cd.getGroupId(), cd.getArtifactId(), cd.getVersion(), - Artifact.SCOPE_RUNTIME, cd.getType() ); - } - - // ---------------------------------------------------------------------- - // Dynamic component addition - // ---------------------------------------------------------------------- - - // We could have an option here for isolation ... - - int realmTmpId = 0; - - public void addComponent( Artifact component, ArtifactResolver artifactResolver, List remoteRepositories, - ArtifactRepository localRepository, ArtifactMetadataSource sourceReader, - ArtifactFilter filter ) - throws ArtifactResolutionException, ArtifactEnabledContainerException - { - boolean dependencyComponentsDiscovered = false; - - // I need an active filter and not an excludes list here. - - // We have to create a completely fake realm here so that only the - // components - // in the JAR we don't want the process to touch any parent realms or - // ClassLoaders. - - // ---------------------------------------------------------------------- - // First we need to see if the artifact is present - // ---------------------------------------------------------------------- - - // TODO: we are being passed in the plugin repository for this, but then later using those to resolve other artifacts. - // the passed in remote repos should be the artifact repositories, and this should be done before the addComponent call... - // (see MNG-229) - artifactResolver.resolve( component, remoteRepositories, localRepository ); - - realmTmpId++; - - ClassWorld classWorld = getClassWorld(); - - List componentDescriptors = null; - try - { - ClassRealm tmp = classWorld.newRealm( "tmp" + realmTmpId ); - - tmp.addConstituent( getArtifactUrl( component ) ); - - componentDescriptors = discoverArtifactComponents( tmp ); - - classWorld.disposeRealm( "tmp" + realmTmpId ); - } - catch ( DuplicateRealmException e ) - { - throw new ArtifactEnabledContainerException( "Unable to add component class realm", e ); - } - catch ( NoSuchRealmException e ) - { - throw new ArtifactEnabledContainerException( "Unable to add component class realm", e ); - } - - // ---------------------------------------------------------------------- - // Now we walk through any of the component descriptors that we find in - // the JAR of the component we are adding and there may be several of - // them. - // - // NOTE: We must still deal with components that might be found in the - // depenendencies of this component. For example a Maven plugin has - // component descriptors in the plugin JAR itself, but if it relies on - // components that are found within the dependent JARs then we must - // account for that as well. - // - // To make this easier we should probably get something back from the - // discovery process which has the individual component descriptors as - // well as a list of their dependencies. Right now this is being hacked - // in by repeating the list of dependencies for each component and - // attaching them. The indivdual list of dependencies may indeed by - // useful but I really only need to process them here once insofar as - // discovering components inside the dependencies. jvz. - // ---------------------------------------------------------------------- - - ClassRealm componentRealm; - - ClassRealm plexusRealm = getContainerRealm(); - - String realmId = component.getId(); - - try - { - componentRealm = plexusRealm.createChildRealm( realmId ); - } - catch ( DuplicateRealmException e ) - { - throw new ArtifactEnabledContainerException( "Unable to add component class realm", e ); - } - - for ( Iterator i = componentDescriptors.iterator(); i.hasNext(); ) - { - ComponentDescriptor componentDescriptor = (ComponentDescriptor) i.next(); - - String componentKey = componentDescriptor.getComponentKey(); - - // Add a alias for the components in the artifact itself - addRealmAlias( componentKey, realmId ); - - if ( componentDescriptor.getComponentSetDescriptor().getDependencies() != null ) - { - Set artifactsToResolve = new HashSet(); - - for ( Iterator j = componentDescriptor.getComponentSetDescriptor().getDependencies().iterator(); - j.hasNext(); ) - { - ComponentDependency cd = (ComponentDependency) j.next(); - - // ---------------------------------------------------------------------- - // Don't even attempt to transtively resolve artifacts we are excluding. - // ---------------------------------------------------------------------- - - Artifact componentArtifact = createArtifact( cd ); - - if ( filter.include( componentArtifact ) ) - { - artifactsToResolve.add( componentArtifact ); - } - } - - // ---------------------------------------------------------------------- - // NOTE!!!! - // - // This is the wrong way to do this I now realize. What i need to do is - // collect the metedata about the components i.e. just pull in the - // component descriptor and create the DAG. Then when the component is - // requested the first time, at that point create the realm and use - // the DAG to populate the realm correctly. This method below is - // leading to jumbled realms and the alias mechanism used is crap and - // won't be needed when I delay the creation of the realms using the - // component metadata which is the way to go. jvz. - // ---------------------------------------------------------------------- - - // ---------------------------------------------------------------------- - // I need to pass the exclusion parameters into the artifact resolution - // phase to prevent duplication entries. - // ---------------------------------------------------------------------- - - ArtifactResolutionResult result = artifactResolver.resolveTransitively( artifactsToResolve, - remoteRepositories, - localRepository, sourceReader, - filter ); - - for ( Iterator k = result.getArtifacts().values().iterator(); k.hasNext(); ) - { - Artifact a = (Artifact) k.next(); - - if ( filter.include( a ) ) - { - componentRealm.addConstituent( getArtifactUrl( a ) ); - } - } - } - - // ---------------------------------------------------------------------- - // Now all the dependencies have been processed and we have a realm that - // is full of the components dependencies. We have already discovered - // components in the JAR that was passed into this method so at this - // point all we need to do is discover any components that may be - // contained within the dependencies. - // ---------------------------------------------------------------------- - - if ( !dependencyComponentsDiscovered ) - { - List dependencyComponents = discoverArtifactComponents( componentRealm ); - - // ---------------------------------------------------------------------- - // We have to make sure that components among the dependencies have - // their realms aligned with the realm of the component that was added. - // If this is not done then component will use the container realm which - // will not contain the classes required for the component because they - // are put in the added component's realm here. - // ---------------------------------------------------------------------- - - for ( Iterator j = dependencyComponents.iterator(); j.hasNext(); ) - { - ComponentDescriptor dcd = (ComponentDescriptor) j.next(); - - addRealmAlias( dcd.getComponentKey(), realmId ); - } - - dependencyComponentsDiscovered = true; - } - - // ---------------------------------------------------------------------- - // Now that the dependencies have been processed we can add the component - // JAR itself into the realm and everything is now ready for use. - // ---------------------------------------------------------------------- - - componentRealm.addConstituent( getArtifactUrl( component ) ); - } - } - - private List discoverArtifactComponents( ClassRealm tmp ) - throws ArtifactEnabledContainerException - { - try - { - return discoverComponents( tmp ); - } - catch ( PlexusConfigurationException e ) - { - throw new ArtifactEnabledContainerException( "Error discovering components", e ); - } - catch ( ComponentRepositoryException e ) - { - throw new ArtifactEnabledContainerException( "Error discovering components", e ); - } - } - - private URL getArtifactUrl( Artifact component ) - throws ArtifactEnabledContainerException - { - try - { - return component.getFile().toURL(); - } - catch ( MalformedURLException e ) - { - throw new ArtifactEnabledContainerException( "Error constructing file URL", e ); - } - } -} diff --git a/plexus-sandbox/plexus-containers/plexus-container-artifact/src/main/java/org/codehaus/plexus/embed/ArtifactEnabledEmbedder.java b/plexus-sandbox/plexus-containers/plexus-container-artifact/src/main/java/org/codehaus/plexus/embed/ArtifactEnabledEmbedder.java deleted file mode 100644 index d7a4391e3..000000000 --- a/plexus-sandbox/plexus-containers/plexus-container-artifact/src/main/java/org/codehaus/plexus/embed/ArtifactEnabledEmbedder.java +++ /dev/null @@ -1,195 +0,0 @@ -package org.codehaus.plexus.embed; - -import org.codehaus.classworlds.ClassWorld; -import org.codehaus.plexus.DefaultArtifactEnabledContainer; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.PlexusContainerException; -import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.configuration.PlexusConfigurationResourceException; -import org.codehaus.plexus.util.PropertyUtils; - -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.URL; -import java.util.Iterator; -import java.util.Properties; -import java.util.Set; - -public class ArtifactEnabledEmbedder -{ - private URL configurationURL; - - /** Context properties */ - private Properties properties; - - private final DefaultArtifactEnabledContainer container; - - private boolean embedderStarted = false; - - private boolean embedderStopped = false; - - public ArtifactEnabledEmbedder() - { - container = new DefaultArtifactEnabledContainer(); - } - - public synchronized PlexusContainer getContainer() - { - if ( !embedderStarted ) - { - throw new IllegalStateException( "ArtifactEnabledEmbedder must be started" ); - } - - return container; - } - - public Object lookup( String role ) throws ComponentLookupException - { - return getContainer().lookup( role ); - } - - public Object lookup( String role, String id ) throws ComponentLookupException - { - return getContainer().lookup( role, id ); - } - - public boolean hasComponent( String role ) - { - return getContainer().hasComponent( role ); - } - - public boolean hasComponent( String role, String id ) - { - return getContainer().hasComponent( role, id ); - } - - public void release( Object service ) - throws ComponentLifecycleException - { - getContainer().release( service ); - } - - //public synchronized void setClassLoader( ClassLoader classLoader ) - //{ - // container.setClassLoader( classLoader ); - //} - - public synchronized void setClassWorld( ClassWorld classWorld ) - { - container.setClassWorld( classWorld ); - } - - public synchronized void setConfiguration( URL configuration ) - { - if ( embedderStarted || embedderStopped ) - { - throw new IllegalStateException( "ArtifactEnabledEmbedder has already been started" ); - } - - this.configurationURL = configuration; - } - - public synchronized void addContextValue( Object key, Object value ) - { - if ( embedderStarted || embedderStopped ) - { - throw new IllegalStateException( "ArtifactEnabledEmbedder has already been started" ); - } - - container.addContextValue( key, value ); - } - - public synchronized void setProperties( Properties properties ) - { - this.properties = properties; - } - - public synchronized void setProperties( File file ) - { - properties = PropertyUtils.loadProperties( file ); - } - - protected synchronized void initializeContext() - { - Set keys = properties.keySet(); - - for ( Iterator iter = keys.iterator(); iter.hasNext(); ) - { - String key = (String) iter.next(); - - String value = properties.getProperty( key ); - - container.addContextValue( key, value ); - } - } - - public synchronized void start( ClassWorld classWorld ) - throws PlexusContainerException - { - container.setClassWorld( classWorld ); - - start(); - } - - public synchronized void start() - throws PlexusContainerException - { - if ( embedderStarted ) - { - throw new IllegalStateException( "ArtifactEnabledEmbedder already started" ); - } - - if ( embedderStopped ) - { - throw new IllegalStateException( "ArtifactEnabledEmbedder cannot be restarted" ); - } - - if ( configurationURL != null ) - { - try - { - container.setConfigurationResource( new InputStreamReader( configurationURL.openStream() ) ); - } - catch ( PlexusConfigurationResourceException e ) - { - throw new PlexusContainerException( "Error loading from configuration reader", e ); - } - catch ( IOException e ) - { - throw new PlexusContainerException( "Error loading from configuration reader", e ); - } - } - - if ( properties != null ) - { - initializeContext(); - } - - container.initialize(); - - embedderStarted = true; - - container.start(); - } - - public synchronized void stop() - { - if ( embedderStopped ) - { - throw new IllegalStateException( "ArtifactEnabledEmbedder already stopped" ); - } - - if ( !embedderStarted ) - { - throw new IllegalStateException( "ArtifactEnabledEmbedder not started" ); - } - - container.dispose(); - - embedderStarted = false; - - embedderStopped = true; - } -} diff --git a/plexus-sandbox/plexus-containers/plexus-container-extra/pom.xml b/plexus-sandbox/plexus-containers/plexus-container-extra/pom.xml deleted file mode 100644 index f1b053692..000000000 --- a/plexus-sandbox/plexus-containers/plexus-container-extra/pom.xml +++ /dev/null @@ -1,19 +0,0 @@ - - 4.0.0 - - plexus-containers - plexus - 1.0 - - plexus - plexus-container-extra - 1.0-alpha-1-SNAPSHOT - Extra Plexus Container Stuff - - - plexus - plexus-container-default - 1.0-alpha-1-SNAPSHOT - - - diff --git a/plexus-sandbox/plexus-containers/plexus-container-extra/src/main/java/org/codehaus/plexus/component/manager/KeepAliveSingletonComponentManager.java b/plexus-sandbox/plexus-containers/plexus-container-extra/src/main/java/org/codehaus/plexus/component/manager/KeepAliveSingletonComponentManager.java deleted file mode 100644 index cc9d0bc76..000000000 --- a/plexus-sandbox/plexus-containers/plexus-container-extra/src/main/java/org/codehaus/plexus/component/manager/KeepAliveSingletonComponentManager.java +++ /dev/null @@ -1,88 +0,0 @@ -package org.codehaus.plexus.component.manager; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - - -/** - * This ensures a component is only used as a singleton, and is only shutdown when - * the container shuts down. - * - * @author Bert van Brakel - * - * @version $Id$ - */ -public class KeepAliveSingletonComponentManager - extends AbstractComponentManager -{ - private Object lock = new Object(); - - private Object singleton; - - public void release( Object component ) - throws Exception - { - synchronized( lock ) - { - if ( singleton == component ) - { - decrementConnectionCount(); - } - else - { - getLogger().warn( "Component returned which is not the same manager. Ignored. component=" + component ); - } - } - } - - public void dispose() - throws Exception - { - synchronized( lock ) - { - //wait for all the clients to return all the components - //Do we do this in a seperate thread? or block the current thread?? - //TODO - if ( singleton != null ) - { - endComponentLifecycle( singleton ); - } - } - } - - public Object getComponent() throws Exception - { - synchronized( lock ) - { - if ( singleton == null ) - { - singleton = createComponentInstance(); - } - - incrementConnectionCount(); - - return singleton; - } - } -} diff --git a/plexus-sandbox/plexus-containers/plexus-container-extra/src/main/java/org/codehaus/plexus/component/manager/PoolableComponentManager.java b/plexus-sandbox/plexus-containers/plexus-container-extra/src/main/java/org/codehaus/plexus/component/manager/PoolableComponentManager.java deleted file mode 100644 index 89a2bb0e1..000000000 --- a/plexus-sandbox/plexus-containers/plexus-container-extra/src/main/java/org/codehaus/plexus/component/manager/PoolableComponentManager.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.codehaus.plexus.component.manager; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.util.SweeperPool; - -/** - * Pools comnponents - * - * @author Jason van Zyl - * - * @version $Id$ - */ -public class PoolableComponentManager - extends AbstractComponentManager -{ - private SweeperPool pool; - - private int maxCapacity = 30; - private int minCapacity = 3; - private int initialCapacity = 10; - private int sweepInterval = 5; - private int triggerSize = 15; - - public void initialize() - throws Exception - { - super.initialize(); - - pool = new SweeperPool( maxCapacity, minCapacity, initialCapacity, sweepInterval, triggerSize ); - } - - public void release( Object component ) - throws Exception - { - pool.put( component ); - } - - public void dispose() - throws Exception - { - //@todo really need to wait for all components to be returned. - //however blocking on this call may prevent plexus servicing - //other requests and hence prevent cleanup. Have to look - //at this. For now just assume all connections have been - //released. - pool.dispose(); - - } - - public Object getComponent() - throws Exception - { - Object component = pool.get(); - - if ( component == null ) - { - component = createComponentInstance(); - } - - return component; - } -} diff --git a/plexus-sandbox/plexus-containers/plexus-container-extra/src/main/resources/META-INF/plexus.xml b/plexus-sandbox/plexus-containers/plexus-container-extra/src/main/resources/META-INF/plexus.xml deleted file mode 100644 index fcd7d14a4..000000000 --- a/plexus-sandbox/plexus-containers/plexus-container-extra/src/main/resources/META-INF/plexus.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - poolable - 5 - 5 - 30 - 5 - 20 - - - singleton-keep-alive - - diff --git a/plexus-sandbox/plexus-containers/plexus-container-extra/src/test/java/org/codehaus/plexus/component/manager/PoolableComponentManagerTest.java b/plexus-sandbox/plexus-containers/plexus-container-extra/src/test/java/org/codehaus/plexus/component/manager/PoolableComponentManagerTest.java deleted file mode 100644 index 6f3dedf5e..000000000 --- a/plexus-sandbox/plexus-containers/plexus-container-extra/src/test/java/org/codehaus/plexus/component/manager/PoolableComponentManagerTest.java +++ /dev/null @@ -1,99 +0,0 @@ -package org.codehaus.plexus.component.manager; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.test.DefaultServiceD; -import org.codehaus.plexus.test.ServiceD; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class PoolableComponentManagerTest - extends PlexusTestCase -{ - /** - * Test poolable instantiation strategy. - * - * @throws Exception - */ - public void testPoolableInstantiationStrategy() - throws Exception - { - PlexusContainer container = getContainer(); - - // ---------------------------------------------------------------------- - // ServiceD - // ---------------------------------------------------------------------- - - // Retrieve an manager of component c. - ServiceD serviceD1 = (ServiceD) container.lookup( ServiceD.ROLE ); - - assertNotNull( serviceD1 ); - - ServiceD serviceD2 = (ServiceD) container.lookup( ServiceD.ROLE ); - - assertNotNull( serviceD2 ); - - ServiceD serviceD3 = (ServiceD) container.lookup( ServiceD.ROLE ); - - assertNotNull( serviceD3 ); - - assertNotSame( serviceD1, serviceD2 ); - - assertNotSame( serviceD2, serviceD3 ); - - assertNotSame( serviceD1, serviceD3 ); - - // Now let's release all the components. - - container.release( serviceD1 ); - - container.release( serviceD2 ); - - container.release( serviceD3 ); - - ServiceD[] ds = new DefaultServiceD[ 30 ]; - - for ( int h = 0; h < 5; h++ ) - { - // Consume all available components in the pool. - - for ( int i = 0; i < 30; i++ ) - { - ds[ i ] = (ServiceD) container.lookup( ServiceD.ROLE ); - } - - // Release them all. - - for ( int i = 0; i < 30; i++ ) - { - container.release( ds[ i ] ); - } - } - } -} diff --git a/plexus-sandbox/plexus-installer/pom.xml b/plexus-sandbox/plexus-installer/pom.xml deleted file mode 100644 index 404f2593e..000000000 --- a/plexus-sandbox/plexus-installer/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - plexus-components - org.codehaus.plexus - 1.1.4 - - 4.0.0 - plexus-installer - Plexus Installer Component - 1.0-alpha-1-SNAPSHOT - - - Vincent Siveton - vsiveton@apache.org - ASF - - Java Developer - - -5 - - - - - org.codehaus.plexus - plexus-archiver - 1.0-alpha-4-SNAPSHOT - - - org.codehaus.plexus - plexus-velocity - 1.1.2 - - - - - exclude-nsis-test-when-not-on-windows - - - !windows - - - - - - maven-surefire-plugin - - - **/NSIS* - **/nsis/* - **/IIS* - **/iis/* - - - - - - - - diff --git a/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/DefaultInstaller.java b/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/DefaultInstaller.java deleted file mode 100644 index 76f3a1c4b..000000000 --- a/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/DefaultInstaller.java +++ /dev/null @@ -1,344 +0,0 @@ -package org.codehaus.plexus.installer; - -/* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.File; -import java.io.FileWriter; -import java.io.Writer; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLClassLoader; -import java.util.Date; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -import org.apache.velocity.VelocityContext; -import org.codehaus.plexus.archiver.AbstractArchiver; -import org.codehaus.plexus.archiver.ArchiveEntry; -import org.codehaus.plexus.util.StringUtils; -import org.codehaus.plexus.util.cli.CommandLineException; -import org.codehaus.plexus.util.cli.CommandLineUtils; -import org.codehaus.plexus.util.cli.Commandline; -import org.codehaus.plexus.util.cli.DefaultConsumer; -import org.codehaus.plexus.velocity.VelocityComponent; - -/** - * Default implementation of an Installer - * - * @author Vincent Siveton - * @version $Id$ - */ -public class DefaultInstaller - extends AbstractArchiver - implements Installer -{ - /** Template definition */ - /** - * @parameter expression="${template}" - * @required - */ - protected String template; - - private Map templateProperties; - - private ClassLoader templateClassLoader; - - /** - * @plexus.requirement - */ - private VelocityComponent velocity; - - /** Third party compiler */ - /** - * @parameter expression="${compiler}" - * @required - */ - protected File compiler; - - private File generatedScript; - - /** Properties for an installer */ - private String outputFileName; - - private String productName; - - private String productVersion; - - private String productCompany; - - private String productURL; - - private File productLicense; - - /** - * @see org.codehaus.plexus.installer.Installer#setCompiler(File) - */ - public void setCompiler( File compilerFile ) - throws InstallerException - { - this.compiler = compilerFile; - - if ( !this.compiler.exists() ) - { - throw new InstallerException( "The compiler path ('" + compilerFile + "') doesnt exists" ); - } - } - - /** - * @see org.codehaus.plexus.installer.Installer#setInstallerName(java.lang.String) - */ - public void setInstallerName( String installerName ) - { - this.outputFileName = installerName; - } - - /** - * @see org.codehaus.plexus.installer.Installer#setProductCompany(java.lang.String) - */ - public void setProductCompany( String productCompany ) - { - this.productCompany = productCompany; - } - - /** - * @see org.codehaus.plexus.installer.Installer#setProductLicense(java.io.File) - */ - public void setProductLicense( File productLicense ) - { - this.productLicense = productLicense; - } - - /** - * @see org.codehaus.plexus.installer.Installer#setProductName(java.lang.String) - */ - public void setProductName( String productName ) - { - this.productName = productName; - } - - /** - * @see org.codehaus.plexus.installer.Installer#setProductURL(java.lang.String) - */ - public void setProductURL( String productURL ) - { - this.productURL = productURL; - } - - /** - * @see org.codehaus.plexus.installer.Installer#setProductVersion(java.lang.String) - */ - public void setProductVersion( String productVersion ) - { - this.productVersion = productVersion; - } - - /** - * @see org.codehaus.plexus.installer.Installer#setTemplate(java.lang.String) - */ - public void setTemplate( String template ) - { - this.template = template; - } - - /** - * @see org.codehaus.plexus.installer.Installer#setTemplate(java.io.File, java.util.Map) - */ - public void setTemplate( File template, Map templateProperties ) - throws InstallerException - { - if ( template == null ) - { - throw new InstallerException( "The template can not be null." ); - } - if ( !template.exists() ) - { - throw new InstallerException( "The template '" + template.getAbsolutePath() + "' doesnt exist." ); - } - - this.templateProperties = templateProperties; - this.template = template.getName(); - try - { - this.templateClassLoader = new URLClassLoader( new URL[] { template.getParentFile().toURL() } ); - } - catch ( MalformedURLException e ) - { - throw new InstallerException( "MalformedURLException: " + e.getMessage(), e ); - } - } - - /** - * @see org.codehaus.plexus.archiver.Archiver#createArchive() - */ - public void createArchive() - throws InstallerException - { - createInstallerScript(); - createInstaller(); - } - - /** - * @see org.codehaus.plexus.installer.Installer#createInstallerScript() - */ - public void createInstallerScript() - throws InstallerException - { - VelocityContext context = new VelocityContext(); - - context.put( "currentDate", new Date() ); - - if ( !StringUtils.isEmpty( outputFileName ) ) - { - context.put( "outputFileName", outputFileName ); - } - - if ( StringUtils.isEmpty( productName ) ) - { - throw new InstallerException( "The product name is required" ); - } - context.put( "productName", productName ); - - if ( StringUtils.isEmpty( productVersion ) ) - { - throw new InstallerException( "The product version is required" ); - } - context.put( "productVersion", productVersion ); - - if ( !StringUtils.isEmpty( productCompany ) ) - { - context.put( "productCompany", productCompany ); - } - - if ( !StringUtils.isEmpty( productURL ) ) - { - context.put( "productURL", productURL ); - } - - if ( ( productLicense != null ) && ( productLicense.exists() ) ) - { - context.put( "productLicense", productLicense.getAbsolutePath() ); - } - - if ( getFiles() == null ) - { - throw new InstallerException( "Files are required" ); - } - Map result = new HashMap(); - for ( Iterator iter = getFiles().keySet().iterator(); iter.hasNext(); ) - { - String fileName = (String) iter.next(); - result.put( fileName.substring( fileName.indexOf( "/" ), fileName.length() ), ( (ArchiveEntry) getFiles() - .get( fileName ) ).getFile() ); - } - context.put( "files", result ); - - if ( StringUtils.isEmpty( template ) ) - { - throw new InstallerException( "A template is required." ); - } - - // User properties for the template - if ( templateProperties != null ) - { - for ( Iterator i = templateProperties.keySet().iterator(); i.hasNext(); ) - { - String key = (String) i.next(); - - context.put( key, templateProperties.get( key ) ); - } - } - - ClassLoader old = null; - if ( templateClassLoader != null ) - { - old = Thread.currentThread().getContextClassLoader(); - - Thread.currentThread().setContextClassLoader( templateClassLoader ); - } - - try - { - try - { - if ( getDestFile() == null ) - { - throw new InstallerException( "destFile is not set" ); - } - generatedScript = getDestFile(); - - Writer scriptWriter = new FileWriter( generatedScript ); - - velocity.getEngine().mergeTemplate( template, context, scriptWriter ); - - scriptWriter.close(); - } - catch ( Exception e ) - { - throw new InstallerException( "Error while generating code.", e ); - } - } - finally - { - if ( old != null ) - { - Thread.currentThread().setContextClassLoader( old ); - } - } - } - - /** - * @see org.codehaus.plexus.installer.Installer#createInstaller() - */ - public void createInstaller() - throws InstallerException - { - Commandline cmd = new Commandline(); - - if ( compiler == null ) - { - throw new InstallerException( "A compiler is required." ); - } - - if ( !compiler.exists() ) - { - throw new InstallerException( "The compiler path '" + compiler.getAbsolutePath() + "' doesn't exist." ); - } - - cmd.setWorkingDirectory( compiler.getParentFile().getAbsolutePath() ); - cmd.setExecutable( compiler.getAbsolutePath() ); - - cmd.createArgument().setValue( generatedScript.getAbsolutePath() ); - - getLogger().info( Commandline.toString( cmd.getCommandline() ) ); - - CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer(); - try - { - int exitCode = CommandLineUtils.executeCommandLine( cmd, new DefaultConsumer(), err ); - - if ( exitCode != 0 ) - { - throw new InstallerException( "Exit code: " + exitCode + " - " + err.getOutput() ); - } - } - catch ( CommandLineException e ) - { - throw new InstallerException( "Unable to execute " + compiler.getAbsolutePath() + " command", e ); - } - } -} diff --git a/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/DefaultInstallerManager.java b/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/DefaultInstallerManager.java deleted file mode 100644 index 4b387138c..000000000 --- a/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/DefaultInstallerManager.java +++ /dev/null @@ -1,78 +0,0 @@ -package org.codehaus.plexus.installer; - -/* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.HashMap; -import java.util.Map; - -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.context.Context; -import org.codehaus.plexus.context.ContextException; -import org.codehaus.plexus.installer.Installer; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; - -/** - * Manager interface to look up an installer. - * - * @author Vincent Siveton - * @version $Id$ - */ -public class DefaultInstallerManager - implements InstallerManager, Contextualizable -{ - // TODO: Get away from doing container lookups once we have active, container-backed maps. - private PlexusContainer container; - - /** - * Retrieve the container instance so we can lookup installers that are added after this component is looked up for - * the first time. - * - * @throws ContextException - * @see org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable#initialize() - */ - public void contextualize( Context context ) throws ContextException - { - container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY ); - } - - /** - * @see org.codehaus.plexus.installer.manager.InstallerManager#getInstaller(java.lang.String) - */ - public Installer getInstaller( String installerName ) - throws NoSuchInstallerException - { - Installer installer; - try - { - installer = (Installer) container.lookup( Installer.ROLE, installerName ); - } - catch ( ComponentLookupException e ) - { - throw new NoSuchInstallerException( installerName, e ); - } - - if ( installer == null ) - { - throw new NoSuchInstallerException( installerName ); - } - - return installer; - } -} diff --git a/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/Installer.java b/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/Installer.java deleted file mode 100644 index ef1a2f5f4..000000000 --- a/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/Installer.java +++ /dev/null @@ -1,118 +0,0 @@ -package org.codehaus.plexus.installer; - -/* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.File; -import java.util.Map; - -import org.codehaus.plexus.archiver.Archiver; - -/** - * Interface to create installer - * - * @author Vincent Siveton - * @version $Id$ - */ -public interface Installer - extends Archiver -{ - String ROLE = Installer.class.getName(); - - /** - * Generate an installer script with the Velocity component for instance. - * - * @throws InstallerException if any - */ - void createInstallerScript() - throws InstallerException; - - /** - * Compile the generated script, ie call the third party compiler. - * - * @throws InstallerException if any - */ - void createInstaller() - throws InstallerException; - - /** - * Specify the compiler path - * - * @param compilerFile - * @throws InstallerException if any - */ - void setCompiler( File compilerFile ) - throws InstallerException; - - /** - * Specify an installer name, if needed - * - * @param installerName - */ - void setInstallerName( String installerName ); - - /** - * Specify the product name. - * - * @param name - */ - void setProductName( String name ); - - /** - * Specify the product version - * - * @param version - */ - void setProductVersion( String version ); - - /** - * Specify the product company name. - * - * @param company - */ - void setProductCompany( String company ); - - /** - * Specify the product URL. - * - * @param url - */ - void setProductURL( String url ); - - /** - * Specify the installer/product license. - * - * @param license - */ - void setProductLicense( File license ); - - /** - * Specify a template in the current class loader - * - * @param template - */ - public void setTemplate( String template ); - - /** - * Specify a template as file - * - * @param template a user's template - * @param templateProperties user's properties for the given template - * @throws InstallerException if any - */ - public void setTemplate( File template, Map templateProperties ) - throws InstallerException; -} diff --git a/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/InstallerException.java b/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/InstallerException.java deleted file mode 100644 index 9f37ceb3b..000000000 --- a/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/InstallerException.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.codehaus.plexus.installer; - -import org.codehaus.plexus.archiver.ArchiverException; - -/* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -/** - * An installer exception - * - * @author Vincent Siveton - * @version $Id:$ - */ -public class InstallerException - extends ArchiverException -{ - /** - * Default constructor - * - * @param message - */ - public InstallerException( String message ) - { - super( message ); - } - - /** - * Other constructor - * - * @param message - * @param cause - */ - public InstallerException( String message, Throwable cause ) - { - super( message, cause ); - } -} diff --git a/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/InstallerManager.java b/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/InstallerManager.java deleted file mode 100644 index b27194911..000000000 --- a/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/InstallerManager.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.codehaus.plexus.installer; - -/* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.installer.Installer; - -/** - * Manager interface to look up an installer. - * - * @author Vincent Siveton - * @version $Id$ - */ -public interface InstallerManager -{ - String ROLE = InstallerManager.class.getName(); - - /** - * Look up an installer - * - * @param roleHint - * @return an installer - * @throws NoSuchInstallerException - */ - Installer getInstaller( String roleHint ) - throws NoSuchInstallerException; -} diff --git a/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/NoSuchInstallerException.java b/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/NoSuchInstallerException.java deleted file mode 100644 index 71cc7ec0f..000000000 --- a/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/NoSuchInstallerException.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.codehaus.plexus.installer; - -/* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.archiver.manager.NoSuchArchiverException; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; - -/** - * Exception when no installer exists. - * - * @author Vincent Siveton - * @version $Id$ - */ -public class NoSuchInstallerException - extends NoSuchArchiverException -{ - private final String installerName; - - /** - * - * @param installerName - */ - public NoSuchInstallerException( String installerName ) - { - super( "No such installer: '" + installerName + "'." ); - - this.installerName = installerName; - } - - public NoSuchInstallerException( String installerName, ComponentLookupException e ) - { - super( "No such installer: " + installerName + ". Error: " + e.getMessage() ); - initCause( e ); - - this.installerName = installerName; - } - - /** - * Return the installer name - * - * @return the installer name - */ - public String getInstallerName() - { - return installerName; - } -} diff --git a/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/generic/GenericInstaller.java b/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/generic/GenericInstaller.java deleted file mode 100644 index cb27f60d6..000000000 --- a/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/generic/GenericInstaller.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.codehaus.plexus.installer.generic; - -/* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.installer.DefaultInstaller; - -/** - * Implementation for a Generic Setup Installer. - * - * @author Vincent Siveton - * @version $Id$ - */ -public class GenericInstaller - extends DefaultInstaller -{ - // nop -} diff --git a/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/iis/IISInstaller.java b/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/iis/IISInstaller.java deleted file mode 100644 index f8c3263d0..000000000 --- a/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/iis/IISInstaller.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.codehaus.plexus.installer.iis; - -/* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.installer.DefaultInstaller; - -/** - * Implementation for InnoSetup Installer. - * - * @see InnoSetup Homepage - * - * @author Vincent Siveton - * @version $Id$ - */ -public class IISInstaller - extends DefaultInstaller -{ - // nop -} diff --git a/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/nsis/NSISInstaller.java b/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/nsis/NSISInstaller.java deleted file mode 100644 index 7b439f965..000000000 --- a/plexus-sandbox/plexus-installer/src/main/java/org/codehaus/plexus/installer/nsis/NSISInstaller.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.codehaus.plexus.installer.nsis; - -/* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.installer.DefaultInstaller; - -/** - * Implementation for NSIS Installer. - * - * @see NSIS Homepage - * - * @author Vincent Siveton - * @version $Id$ - */ -public class NSISInstaller - extends DefaultInstaller -{ - // nop -} diff --git a/plexus-sandbox/plexus-installer/src/main/resources/META-INF/plexus/components.xml b/plexus-sandbox/plexus-installer/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index 8a7abec30..000000000 --- a/plexus-sandbox/plexus-installer/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - org.codehaus.plexus.installer.Installer - nsi - org.codehaus.plexus.installer.nsis.NSISInstaller - per-lookup - - - org.codehaus.plexus.velocity.VelocityComponent - - - - - C:/Program Files/NSIS/makensis.exe - - - - - org.codehaus.plexus.installer.Installer - iis - org.codehaus.plexus.installer.iis.IISInstaller - per-lookup - - - org.codehaus.plexus.velocity.VelocityComponent - - - - - C:/Program Files/Inno Setup 5/ISCC.exe - - - - - org.codehaus.plexus.installer.Installer - generic - org.codehaus.plexus.installer.generic.GenericInstaller - per-lookup - - - org.codehaus.plexus.velocity.VelocityComponent - - - - - - - org.codehaus.plexus.installer.InstallerManager - org.codehaus.plexus.installer.DefaultInstallerManager - - - - - diff --git a/plexus-sandbox/plexus-installer/src/main/resources/org/codehaus/plexus/installer/iis/template.vm b/plexus-sandbox/plexus-installer/src/main/resources/org/codehaus/plexus/installer/iis/template.vm deleted file mode 100644 index a30e23c0f..000000000 --- a/plexus-sandbox/plexus-installer/src/main/resources/org/codehaus/plexus/installer/iis/template.vm +++ /dev/null @@ -1,354 +0,0 @@ -; -; Copyright 2005 The Apache Software Foundation. -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. -; - -; Setup script for NSIS 2.0 (http://nsis.sourceforge.net) -#if ( ${currentDate} ) -; Script generated by Maven (http://maven.apache.org) at ${currentDate} -#else -; Script generated by Maven (http://maven.apache.org) -#end -; -; @author Vincent Siveton - -; ----------------------------------------------------------------------------- -; Script Defines -; ----------------------------------------------------------------------------- -#if ( ${productName} ) -Name "${productName}" -#end -#if ( ${productVersion} ) -!define PRODUCT_VERSION "${productVersion}" -#end - -#if ( ${productCompany} ) -!define PRODUCT_COMPANY "${productCompany}" -#else -!define PRODUCT_COMPANY "" -#end -#if ( ${productURL} ) -!define PRODUCT_URL "${productURL}" -#else -!define PRODUCT_URL "" -#end - -#if ( ${outputFileName} ) -!define INSTALLER_NAME "${outputFileName}.exe" -#else -!define INSTALLER_NAME "install.exe" -#end - -; ----------------------------------------------------------------------------- -; Defines -; ----------------------------------------------------------------------------- -!define REGKEY "SOFTWARE\$(^Name)" - -; ----------------------------------------------------------------------------- -; MUI defines -; ----------------------------------------------------------------------------- -!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico" -!define MUI_FINISHPAGE_NOAUTOCLOSE -!define MUI_LICENSEPAGE_RADIOBUTTONS -!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM -!define MUI_STARTMENUPAGE_NODISABLE -!define MUI_STARTMENUPAGE_REGISTRY_KEY Software\$(^Name) -!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup -!define MUI_STARTMENUPAGE_DEFAULT_FOLDER $(^Name) -!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" -!define MUI_UNFINISHPAGE_NOAUTOCLOSE -!define MUI_LANGDLL_REGISTRY_ROOT HKLM -!define MUI_LANGDLL_REGISTRY_KEY ${REGKEY} -!define MUI_LANGDLL_REGISTRY_VALUENAME InstallerLanguage - -; ----------------------------------------------------------------------------- -; Included files -; ----------------------------------------------------------------------------- -!include Sections.nsh -!include MUI.nsh - -; ----------------------------------------------------------------------------- -; Reserved Files -; ----------------------------------------------------------------------------- -!insertmacro MUI_RESERVEFILE_LANGDLL - -; ----------------------------------------------------------------------------- -; Variables -; ----------------------------------------------------------------------------- -Var StartMenuGroup - -; ----------------------------------------------------------------------------- -; Installer pages -; ----------------------------------------------------------------------------- -!insertmacro MUI_PAGE_WELCOME -#if ( $productLicense ) - !insertmacro MUI_PAGE_LICENSE $productLicense -#end -!insertmacro MUI_PAGE_DIRECTORY -!insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup -!insertmacro MUI_PAGE_INSTFILES -!insertmacro MUI_PAGE_FINISH -!insertmacro MUI_UNPAGE_CONFIRM -!insertmacro MUI_UNPAGE_INSTFILES - -; Installer languages (first is default language) -!insertmacro MUI_LANGUAGE "English" -!insertmacro MUI_LANGUAGE "Albanian" -!insertmacro MUI_LANGUAGE "Arabic" -!insertmacro MUI_LANGUAGE "Belarusian" -!insertmacro MUI_LANGUAGE "Bosnian" -!insertmacro MUI_LANGUAGE "Breton" -!insertmacro MUI_LANGUAGE "Bulgarian" -!insertmacro MUI_LANGUAGE "Catalan" -!insertmacro MUI_LANGUAGE "Croatian" -!insertmacro MUI_LANGUAGE "Czech" -!insertmacro MUI_LANGUAGE "Danish" -!insertmacro MUI_LANGUAGE "Dutch" -!insertmacro MUI_LANGUAGE "Estonian" -!insertmacro MUI_LANGUAGE "Farsi" -!insertmacro MUI_LANGUAGE "Finnish" -!insertmacro MUI_LANGUAGE "French" -!insertmacro MUI_LANGUAGE "German" -!insertmacro MUI_LANGUAGE "Greek" -!insertmacro MUI_LANGUAGE "Hebrew" -!insertmacro MUI_LANGUAGE "Hungarian" -!insertmacro MUI_LANGUAGE "Icelandic" -!insertmacro MUI_LANGUAGE "Indonesian" -!insertmacro MUI_LANGUAGE "Italian" -!insertmacro MUI_LANGUAGE "Japanese" -!insertmacro MUI_LANGUAGE "Korean" -!insertmacro MUI_LANGUAGE "Kurdish" -!insertmacro MUI_LANGUAGE "Latvian" -!insertmacro MUI_LANGUAGE "Lithuanian" -!insertmacro MUI_LANGUAGE "Luxembourgish" -!insertmacro MUI_LANGUAGE "Macedonian" -!insertmacro MUI_LANGUAGE "Malay" -!insertmacro MUI_LANGUAGE "Mongolian" -!insertmacro MUI_LANGUAGE "Norwegian" -!insertmacro MUI_LANGUAGE "Polish" -!insertmacro MUI_LANGUAGE "Portuguese" -!insertmacro MUI_LANGUAGE "PortugueseBR" -!insertmacro MUI_LANGUAGE "Romanian" -!insertmacro MUI_LANGUAGE "Russian" -!insertmacro MUI_LANGUAGE "Serbian" -!insertmacro MUI_LANGUAGE "SerbianLatin" -!insertmacro MUI_LANGUAGE "SimpChinese" -!insertmacro MUI_LANGUAGE "Slovak" -!insertmacro MUI_LANGUAGE "Slovenian" -!insertmacro MUI_LANGUAGE "Spanish" -!insertmacro MUI_LANGUAGE "Swedish" -!insertmacro MUI_LANGUAGE "Thai" -!insertmacro MUI_LANGUAGE "TradChinese" -!insertmacro MUI_LANGUAGE "Turkish" -!insertmacro MUI_LANGUAGE "Ukrainian" - -; ----------------------------------------------------------------------------- -; Installer attributes -; ----------------------------------------------------------------------------- -OutFile ${INSTALLER_NAME} -InstallDir $PROGRAMFILES\$(^Name) -CRCCheck on -XPStyle on -ShowInstDetails show -VIProductVersion 1.0.0.0 -VIAddVersionKey /lang=${LANG_ENGLISH} ProductName $(^Name) -VIAddVersionKey ProductVersion "${VERSION}" -VIAddVersionKey /lang=${LANG_ENGLISH} CompanyName "${PRODUCT_COMPANY}" -VIAddVersionKey /lang=${LANG_ENGLISH} CompanyWebsite "${PRODUCT_URL}" -VIAddVersionKey /lang=${LANG_ENGLISH} FileVersion "" -VIAddVersionKey /lang=${LANG_ENGLISH} FileDescription "" -VIAddVersionKey /lang=${LANG_ENGLISH} LegalCopyright "" -InstallDirRegKey HKLM "${REGKEY}" Path -ShowUninstDetails show - -; ----------------------------------------------------------------------------- -; Installer sections -; ----------------------------------------------------------------------------- -Section -Main SEC0000 - SetOverwrite on -#if ( $files ) - #foreach( $path in $files.keySet() ) - #set ( $file = $files.get( $path ) ) - #set ( $outDirectory = $path.substring( 0, $path.lastIndexOf( "/" ) ) ) - #set ( $outDirectory = $outDirectory.replaceAll( "/", "\\" ) ) - #if ( !$file.isDirectory() ) - SetOutPath "$INSTDIR$outDirectory" - File "$file" - #end - #end -#end - WriteRegStr HKLM "${REGKEY}\Components" Main 1 -SectionEnd - -Section -post SEC0001 - WriteRegStr HKLM "${REGKEY}" Path $INSTDIR - WriteUninstaller $INSTDIR\uninstall.exe - !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - SetOutPath $SMPROGRAMS\$StartMenuGroup - CreateShortCut "$SMPROGRAMS\$StartMenuGroup\$(^UninstallLink).lnk" $INSTDIR\uninstall.exe - !insertmacro MUI_STARTMENU_WRITE_END - WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)" - WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion "${PRODUCT_VERSION}" - WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Publisher "${PRODUCT_COMPANY}" - WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" URLInfoAbout "${PRODUCT_URL}" - WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon $INSTDIR\uninstall.exe - WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString $INSTDIR\uninstall.exe - WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoModify 1 - WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair 1 -SectionEnd - -; Macro for selecting uninstaller sections -!macro SELECT_UNSECTION SECTION_NAME UNSECTION_ID - Push $R0 - ReadRegStr $R0 HKLM "${REGKEY}\Components" "${SECTION_NAME}" - StrCmp $R0 1 0 next${UNSECTION_ID} - !insertmacro SelectSection "${UNSECTION_ID}" - Goto done${UNSECTION_ID} - next${UNSECTION_ID}: - !insertmacro UnselectSection "${UNSECTION_ID}" - done${UNSECTION_ID}: - Pop $R0 -!macroend - -; ----------------------------------------------------------------------------- -; Uninstaller sections -; ----------------------------------------------------------------------------- -Section /o un.Main UNSEC0000 - ; TODO Maybe we could delete each file and directory installed - RMDir /R /REBOOTOK $INSTDIR - DeleteRegValue HKLM "${REGKEY}\Components" Main -SectionEnd - -Section un.post UNSEC0001 - DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" - Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\$(^UninstallLink).lnk" - Delete /REBOOTOK $INSTDIR\uninstall.exe - DeleteRegValue HKLM "${REGKEY}" StartMenuGroup - DeleteRegValue HKLM "${REGKEY}" Path - DeleteRegKey /ifempty HKLM "${REGKEY}\Components" - DeleteRegKey /ifempty HKLM "${REGKEY}" - RMDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup - RMDir /REBOOTOK $INSTDIR -SectionEnd - -; ----------------------------------------------------------------------------- -; Installer functions -; ----------------------------------------------------------------------------- -Function .onInit - InitPluginsDir - !insertmacro MUI_LANGDLL_DISPLAY -FunctionEnd - -; ----------------------------------------------------------------------------- -; Uninstaller functions -; ----------------------------------------------------------------------------- -Function un.onInit - ReadRegStr $INSTDIR HKLM "${REGKEY}" Path - ReadRegStr $StartMenuGroup HKLM "${REGKEY}" StartMenuGroup - !insertmacro MUI_UNGETLANGUAGE - !insertmacro SELECT_UNSECTION Main ${UNSEC0000} -FunctionEnd - -; ----------------------------------------------------------------------------- -; Installer Language Strings -; ----------------------------------------------------------------------------- -LangString ^UninstallLink ${LANG_ENGLISH} "Uninstall $(^Name)" -; -; Copyright 2005 The Apache Software Foundation. -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. -; - -; Installer script for InnoSetup 5 (http://www.jrsoftware.org/isinfo.php) -#if ( ${currentDate} ) -; Script generated by Maven (http://maven.apache.org) at ${currentDate} -#else -; Script generated by Maven (http://maven.apache.org) -#end -; -; @author Vincent Siveton - -[Setup] -#if ( ${productName} ) -AppName="${productName}" -#end -#if ( ${productVersion} ) -AppVerName="${productVersion}" -#end -#if ( ${productCompany} ) -AppPublisher="${productCompany}" -#end -#if ( ${productURL} ) -AppPublisherURL="${productURL}" -AppSupportURL="${productURL}" -AppUpdatesURL="${productURL}" -#end -#if ( ${productName} ) -DefaultDirName={pf}\\${productCompany}\\${productName} -DefaultGroupName=${productCompany}\\${productName} -#end -#if ( ${productLicense} ) -LicenseFile=${productLicense} -#end -#if ( ${outputFileName} ) -OutputBaseFilename=${outputFileName} -#else -OutputBaseFilename=install -#end -OutputDir=. -Compression=lzma -SolidCompression=yes - -[Languages] -Name: "eng"; MessagesFile: "compiler:Default.isl" -Name: "bra"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl" -Name: "cat"; MessagesFile: "compiler:Languages\Catalan.isl" -Name: "cze"; MessagesFile: "compiler:Languages\Czech.isl" -Name: "dan"; MessagesFile: "compiler:Languages\Danish.isl" -Name: "dut"; MessagesFile: "compiler:Languages\Dutch.isl" -Name: "fin"; MessagesFile: "compiler:Languages\Finnish.isl" -Name: "fre"; MessagesFile: "compiler:Languages\French.isl" -Name: "ger"; MessagesFile: "compiler:Languages\German.isl" -Name: "hun"; MessagesFile: "compiler:Languages\Hungarian.isl" -Name: "ita"; MessagesFile: "compiler:Languages\Italian.isl" -Name: "nor"; MessagesFile: "compiler:Languages\Norwegian.isl" -Name: "pol"; MessagesFile: "compiler:Languages\Polish.isl" -Name: "por"; MessagesFile: "compiler:Languages\Portuguese.isl" -Name: "rus"; MessagesFile: "compiler:Languages\Russian.isl" -Name: "slo"; MessagesFile: "compiler:Languages\Slovenian.isl" - -[Files] -#if ( $files ) - #foreach( $path in $files.keySet() ) - #set ( $file = $files.get( $path ) ) - #set ( $outDirectory = $path.substring( 0, $path.lastIndexOf( "/" ) ) ) - #set ( $outDirectory = $outDirectory.replaceAll( "/", "\\" ) ) - #if ( !$file.isDirectory() ) -Source: "$file"; DestDir: "{app}$outDirectory"; Flags: ignoreversion - #end - #end -#end - -[Icons] -Name: "{group}\{cm:UninstallProgram,${productName}}"; Filename: "{uninstallexe}" diff --git a/plexus-sandbox/plexus-installer/src/test/java/org/codehaus/plexus/installer/InstallerManagerTest.java b/plexus-sandbox/plexus-installer/src/test/java/org/codehaus/plexus/installer/InstallerManagerTest.java deleted file mode 100644 index c6478ea4f..000000000 --- a/plexus-sandbox/plexus-installer/src/test/java/org/codehaus/plexus/installer/InstallerManagerTest.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.codehaus.plexus.installer; - -/* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.PlexusTestCase; - -/** - * Test case to look up installers with InstallerManager - * - * @author Vincent Siveton - * @version $Id$ - */ -public class InstallerManagerTest - extends PlexusTestCase -{ - - /** - * Look up with an unkwown installer - * - * @throws Exception - */ - public void testLookupUnknownInstaller() - throws Exception - { - InstallerManager manager = (InstallerManager) lookup( InstallerManager.ROLE ); - try - { - manager.getInstaller( "Unknown" ); - fail(); - } - catch ( NoSuchInstallerException e ) - { - } - } -} diff --git a/plexus-sandbox/plexus-installer/src/test/java/org/codehaus/plexus/installer/generic/GenericInstallerManagerTest.java b/plexus-sandbox/plexus-installer/src/test/java/org/codehaus/plexus/installer/generic/GenericInstallerManagerTest.java deleted file mode 100644 index 7ccbce63f..000000000 --- a/plexus-sandbox/plexus-installer/src/test/java/org/codehaus/plexus/installer/generic/GenericInstallerManagerTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.codehaus.plexus.installer.generic; - -import org.codehaus.plexus.installer.InstallerManager; -import org.codehaus.plexus.installer.InstallerManagerTest; - -public class GenericInstallerManagerTest - extends InstallerManagerTest -{ - - /** - * Look up with a Generic installer - * - * @throws Exception - */ - public void testLookupGenericInstaller() throws Exception - { - InstallerManager manager = (InstallerManager) lookup( InstallerManager.ROLE ); - - manager.getInstaller( "generic" ); - } - -} diff --git a/plexus-sandbox/plexus-installer/src/test/java/org/codehaus/plexus/installer/iis/IISInstallerManagerTest.java b/plexus-sandbox/plexus-installer/src/test/java/org/codehaus/plexus/installer/iis/IISInstallerManagerTest.java deleted file mode 100644 index a6cea4725..000000000 --- a/plexus-sandbox/plexus-installer/src/test/java/org/codehaus/plexus/installer/iis/IISInstallerManagerTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.codehaus.plexus.installer.iis; - -import org.codehaus.plexus.installer.InstallerManager; -import org.codehaus.plexus.installer.InstallerManagerTest; - -public class IISInstallerManagerTest - extends InstallerManagerTest -{ - - /** - * Look up with an InnoSetup installer - * - * @throws Exception - */ - public void testLookupIISInstaller() throws Exception - { - InstallerManager manager = (InstallerManager) lookup( InstallerManager.ROLE ); - - manager.getInstaller( "iis" ); - } - -} diff --git a/plexus-sandbox/plexus-installer/src/test/java/org/codehaus/plexus/installer/iis/IISInstallerTest.java b/plexus-sandbox/plexus-installer/src/test/java/org/codehaus/plexus/installer/iis/IISInstallerTest.java deleted file mode 100644 index d8fd07581..000000000 --- a/plexus-sandbox/plexus-installer/src/test/java/org/codehaus/plexus/installer/iis/IISInstallerTest.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.codehaus.plexus.installer.iis; - -/* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.installer.Installer; -import org.codehaus.plexus.installer.iis.IISInstaller; - -/** - * Test case for an IIS installer - * - * @author Vincent Siveton - * @version $Id$ - */ -public class IISInstallerTest - extends PlexusTestCase -{ - /** - * Create an installer - * - * @throws Exception - */ - public void testCreateInstaller() - throws Exception - { - IISInstaller installer = (IISInstaller) lookup( Installer.ROLE, "iis" ); - - installer.setInstallerName( "myInstallerIis" ); - installer.setProductName( "myProduct" ); - installer.setProductVersion( "1.0" ); - installer.setProductCompany( "ASF" ); - installer.setProductURL( "http://codehaus.org" ); - - installer.setDestFile( getTestFile( "target/myInstaller.iis" ) ); - - installer.createArchive(); - } -} diff --git a/plexus-sandbox/plexus-installer/src/test/java/org/codehaus/plexus/installer/nsis/NSISInstallerManagerTest.java b/plexus-sandbox/plexus-installer/src/test/java/org/codehaus/plexus/installer/nsis/NSISInstallerManagerTest.java deleted file mode 100644 index d8a996e86..000000000 --- a/plexus-sandbox/plexus-installer/src/test/java/org/codehaus/plexus/installer/nsis/NSISInstallerManagerTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.codehaus.plexus.installer.nsis; - -import org.codehaus.plexus.installer.InstallerManager; -import org.codehaus.plexus.installer.InstallerManagerTest; - -public class NSISInstallerManagerTest - extends InstallerManagerTest -{ - - /** - * Look up with a NSIS installer - * - * @throws Exception - */ - public void testLookupNSISInstaller() throws Exception - { - InstallerManager manager = (InstallerManager) lookup( InstallerManager.ROLE ); - - manager.getInstaller( "nsi" ); - } - -} diff --git a/plexus-sandbox/plexus-installer/src/test/java/org/codehaus/plexus/installer/nsis/NSISInstallerTest.java b/plexus-sandbox/plexus-installer/src/test/java/org/codehaus/plexus/installer/nsis/NSISInstallerTest.java deleted file mode 100644 index e16ae76a4..000000000 --- a/plexus-sandbox/plexus-installer/src/test/java/org/codehaus/plexus/installer/nsis/NSISInstallerTest.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.codehaus.plexus.installer.nsis; - -/* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.installer.Installer; -import org.codehaus.plexus.installer.nsis.NSISInstaller; - -/** - * Test case for an NSIS installer - * - * @author Vincent Siveton - * @version $Id$ - */ -public class NSISInstallerTest - extends PlexusTestCase -{ - /** - * Create an installer - * - * @throws Exception - */ - public void testCreateInstaller() - throws Exception - { - NSISInstaller installer = (NSISInstaller) lookup( Installer.ROLE, "nsi" ); - - installer.setInstallerName( "myInstallerNsi" ); - installer.setProductName( "myProduct" ); - installer.setProductVersion( "1.0" ); - installer.setProductCompany( "ASF" ); - installer.setProductURL( "http://codehaus.org" ); - - installer.setDestFile( getTestFile( "target/myInstaller.nsi" ) ); - - installer.createArchive(); - } -} diff --git a/plexus-sandbox/plexus-jabber/.cvsignore b/plexus-sandbox/plexus-jabber/.cvsignore deleted file mode 100644 index 2c89d65ef..000000000 --- a/plexus-sandbox/plexus-jabber/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -*.log -*.log* -.project \ No newline at end of file diff --git a/plexus-sandbox/plexus-jabber/INSTALL b/plexus-sandbox/plexus-jabber/INSTALL deleted file mode 100644 index f420b483e..000000000 --- a/plexus-sandbox/plexus-jabber/INSTALL +++ /dev/null @@ -1,92 +0,0 @@ - -Get last CVS stable source - -cvs -z3 update -P -d -r V1_2_1 - - -############################# -Prerequisite -############################# - -- Get last maven binary version -http://maven.apache.org/ -(current OpenIM uses rc1) - -- Get Merlin 3.2.1 binary version -http://avalon.apache.org/ -http://www.dpml.net/merlin/distributions/3.2.4/ -Unzip and notice the 2 *plugin*jar file in current folder - -############################# -Setup -############################# - -Set your env variable -JAVA_HOME to jdk folder -MAVEN_HOME to Maven folder -MERLIN_HOME to Merlin folder -OPENIM_HOME to OpenIM folder - -Move $MERLIN_HOME/../*plugin*jar to $MAVEN_HOME/plugins folder - - -If you are behind a firewall (using http proxy) configure merlin -$MERLIN_HOME/config/kernel.xml -For example: - - - -proxy.dot.com -8080 - -... - - -see http://avalon.apache.org/merlin/meta/kernel/repository/index.html -for more info - - -############################# -Build -############################# - -Type 'maven build' in openim folder - - -############################# -Config -############################# - -Edit conf/config.xml -and set you hostname (shoud be the name as viewed from outside the network) - - -############################# -Run -############################# - -Use the script shell: openim.sh -OR -(windows not tested) -merlin.bat %MERLIN_HOME\repository\openim\jars\openim-server-1.1*.jar -config conf\config.xml - - - -############################# -Use SSL -############################# - -Go to keystore folder - # cd openim/sockets/manager/conf/ - -Use keytool to generate a keystore file (default password is set to "openim" in impl/conf/block.xml file) - # keytool -genkey -keyalg RSA -alias openimRSA -keystore keystore - - -############################# -Avaible Servers -############################# - -"jabber.open-im.net" is running last tagged cvs snapshot and available for -testing purpose. -(contact me if you want your server to be added here) diff --git a/plexus-sandbox/plexus-jabber/LICENSE.txt b/plexus-sandbox/plexus-jabber/LICENSE.txt deleted file mode 100644 index 60e7138d4..000000000 --- a/plexus-sandbox/plexus-jabber/LICENSE.txt +++ /dev/null @@ -1,10 +0,0 @@ -Copyright (c) 2003, OpenIM Project (http://open-im.net) -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of the OpenIM Project (http://open-im.net) nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/plexus-sandbox/plexus-jabber/STATUS b/plexus-sandbox/plexus-jabber/STATUS deleted file mode 100644 index 344659d8b..000000000 --- a/plexus-sandbox/plexus-jabber/STATUS +++ /dev/null @@ -1,4 +0,0 @@ -Perform -cvs -z3 update -P -d -r V1_2_1rc1 -to get last stable source - diff --git a/plexus-sandbox/plexus-jabber/conf/config.xml b/plexus-sandbox/plexus-jabber/conf/config.xml deleted file mode 100644 index e55b13e04..000000000 --- a/plexus-sandbox/plexus-jabber/conf/config.xml +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - -]> - - - - - - 5 - - - - - - - - &client-port; - &ssl-client-port; - &server-port; - &ssl-server-port; - &server-port; - &hostname; - localhost - - - - - - - default - - - 5 - - - false - - 5 - 1000 - - 5 - - - - - - - - - - - - 3 - 500 - 3600000 - - - - - - - 60000 - - - - - - - - UTF-8 - - - - - - - UTF-8 - - - - - - - - - - - false - - - - - - - - - - - - - - - - - iso-8859-1 - - - - - - - - - - - - - - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/conf/kernel.xml b/plexus-sandbox/plexus-jabber/conf/kernel.xml deleted file mode 100644 index b356251bd..000000000 --- a/plexus-sandbox/plexus-jabber/conf/kernel.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - ./repository - - - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/incubator/README b/plexus-sandbox/plexus-jabber/incubator/README deleted file mode 100644 index c42b2026d..000000000 --- a/plexus-sandbox/plexus-jabber/incubator/README +++ /dev/null @@ -1,2 +0,0 @@ -This folder is dedicated to incubation OpenIM subproject. - diff --git a/plexus-sandbox/plexus-jabber/jabber-data-model/maven.xml b/plexus-sandbox/plexus-jabber/jabber-data-model/maven.xml deleted file mode 100644 index 755f0b241..000000000 --- a/plexus-sandbox/plexus-jabber/jabber-data-model/maven.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/jabber-data-model/project.xml b/plexus-sandbox/plexus-jabber/jabber-data-model/project.xml deleted file mode 100644 index be590f3a2..000000000 --- a/plexus-sandbox/plexus-jabber/jabber-data-model/project.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - openim - jabber-data-model - Jabber Data Model - net.java.dev.openim - 1.0 - - 2004 - Jabber Data Model - - Jabber Data Model - - - ${basedir}/../project.xml - - - - - - - kxml2 - kxml2 - 2.1.8 - - - - - - commons-lang - commons-lang - 1.0.1 - - - - - - avalon-framework - avalon-framework-api - 4.1.5 - - - - avalon-framework - avalon-framework-impl - 4.1.5 - - - - - - - vohlmup@fel.cvut.cz - ${basedir}/src/java - ${basedir}/src/test - - - - - - - ${basedir}/src/java - - **/*.dtd - **/*.properties - **/*.xinfo - **/*.xtype - **/*.xprofile - **/*.xconfig - **/*.xml - **/*.xservice - - - - ${basedir}/conf - BLOCK-INF - - block.xml - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/jabber-data-model/src/java/ctu/jabber/data/Element.java b/plexus-sandbox/plexus-jabber/jabber-data-model/src/java/ctu/jabber/data/Element.java deleted file mode 100644 index 6f27d721a..000000000 --- a/plexus-sandbox/plexus-jabber/jabber-data-model/src/java/ctu/jabber/data/Element.java +++ /dev/null @@ -1,278 +0,0 @@ -package ctu.jabber.data; - -import java.util.*; -import java.io.StringWriter; -import java.io.Writer; -import java.io.IOException; - -import org.xmlpull.v1.XmlPullParser; -import ctu.tools.xml.XMLUtils; - -/** - * @author PV - * @version 1.0 - * TODO: prefix & attribute namespace support - * TODO: escape attribute values - */ -public class Element { - - private List m_children = new LinkedList(); - private String m_namespace = ""; - private String m_name; - private Map m_attributes = new HashMap(); - private String m_serializedAtts = ""; - - // Constructors - public Element(String name) { setName(name); } - public Element(String name, String text) { - setName(name); - setText(text); - } - public Element(XmlPullParser xpp) { - setName(xpp.getName()); - setNamespace(xpp.getNamespace()); - // Copy attributes into hashtable - for (int i = 0; i < xpp.getAttributeCount(); i++) { - m_attributes.put(xpp.getAttributeName(i), xpp.getAttributeValue(i)); - } - } - - // name - public void setName(String name) { this.m_name = name; } - public String getName() { return m_name; } - - // namespace - public void setNamespace(String name) { - if (name == null) m_namespace = ""; - else m_namespace = name; - } - public void replaceNamespaceRecursive(String oldname, String name) { - if (getNamespace().equals(oldname)) { - setNamespace(name); - } - Iterator childIterator = m_children.iterator(); - while (childIterator.hasNext()) { - Object child = childIterator.next(); - if (child instanceof Element) { - ((Element)child).replaceNamespaceRecursive(oldname, name); - } - } - } - public String getNamespace() { return m_namespace; } - - // methods for manipulating with children elements - public List getChildren() { return m_children; } - public List getChildren(String childname) { - List children = new LinkedList(); - Iterator childIterator = m_children.iterator(); - while (childIterator.hasNext()) { - Object child = childIterator.next(); - if (child instanceof Element) { - Element childElement = (Element) child; - if (childElement.getName().equals(childname)) { - children.add(childElement); - } - } - } - return children; - } - public void addChild(Object child) { if (child != null) getChildren().add(child); } - public void addSerializedChild(String content) { - if (content.length() > 0) - getChildren().add(new SerializedElement(content)); - } - public void addChildTexts(final Collection collection, String childname) { - Iterator i = collection.iterator(); - while (i.hasNext()) { - String text = i.next().toString(); - Element child = new Element(childname); - child.setText(text); - addChild(child); - } - } - public List getChildTexts(String childname) { - List result = new LinkedList(); - Iterator i = getChildren(childname).iterator(); - while (i.hasNext()) { - Object next = i.next(); - if (next != null && next instanceof Element) { - Element child = (Element) next; - String text = child.getText(); - if (text.length() > 0) { - result.add(text); - } - } - } - return result; - } - public Element getFirstChild(String childname) { - Iterator childIterator = m_children.iterator(); - while (childIterator.hasNext()) { - Object child = childIterator.next(); - if (child != null && child instanceof Element) { - Element childElement = (Element) child; - if (childElement.getName().equals(childname)) { - return childElement; - } - } - } - return null; - } - public String getChildText(String childname) { - Element child = getFirstChild(childname); - if (child == null) return ""; - return child.getText(); - } - public void setChildText(String childname, String text) { - Element child = this.getFirstChild(childname); - if (child == null) { - child = new Element(childname, text); - child.setNamespace(this.getNamespace()); - this.addChild(child); - } - else child.setText(text); - } - public String getChildAttribute(String childname, String attribute) { - Element child = getFirstChild(childname); - if (child == null) return ""; - return child.getAttribute(attribute); - } - public void setChildAttribute(String childname, String attribute, String value) { - Element child = this.getFirstChild(childname); - if (child == null) { - child = new Element(childname); - child.setNamespace(this.getNamespace()); - child.setAttribute(attribute, value); - this.addChild(child); - } - else child.setAttribute(attribute, value); - } - - // methods for getting and setting element content - public String getText() { - String text = ""; - Iterator iChildren = getChildren().iterator(); - while (iChildren.hasNext()) { - Object o = iChildren.next(); - if (o instanceof String) { - text += (String) o; - } - } - return text; - } - public void setText(String text) { - text = text.trim(); - getChildren().clear(); - if (text.length() > 0) addChild(text); - } - public void appendText(String text) { - text = text.trim(); - if (text.length() > 0) addChild(text); - } - - // methods for manipulating with attributes - public String getAttribute(String attribute) { - String attrib = (String) m_attributes.get(attribute); - return (attrib == null)? "": attrib; - } - public void setAttribute(String attribute, String value) { - if (value == null || value.length() == 0) { - removeAttribute(attribute); - } else { - m_attributes.put(attribute, value); - } - } - public void removeAttribute(String attribute) { - m_attributes.remove(attribute); - } - public void clearAttributes() { - m_attributes.clear(); - } - public Map getAttributes() { return m_attributes; } - public void addSerializedAttribute(String attribute) { - if (attribute.length() > 0) { - m_serializedAtts += attribute + " "; - } - } - - public void writeInnerXML(Writer out, String encoding) throws IOException { - Iterator childIterator = m_children.iterator(); - while (childIterator.hasNext()) { - Object child = childIterator.next(); - if (child instanceof Element) { - ((Element)child).writeXML(out, getNamespace(), encoding); - } else if (child instanceof String){ - String s = (String) child; - out.write(XMLUtils.escapeElementEntities(s, encoding)); - } else { - out.write(child.toString()); - } - } - } - public void writeXML(Writer out, String defaultNamespace, String encoding) throws IOException { - out.write("<"); - out.write(m_name); - - if (defaultNamespace != null && this.getNamespace() != "" - && !this.getNamespace().equals(defaultNamespace)) { - - out.write(" xmlns='" + this.getNamespace() + "'"); - } - - Iterator keys = m_attributes.keySet().iterator(); - while (keys.hasNext()) { - String key = (String) keys.next(); - out.write(" "); - out.write(key); - out.write("='"); - out.write((String) m_attributes.get(key)); - out.write("'"); - } - if (m_serializedAtts.length() > 0) { - out.write(" "); - out.write(m_serializedAtts.trim()); - } - - if (m_children.size() == 0 && getText().length() == 0) { - out.write("/>"); - out.flush(); - return; - } - - out.write(">"); - - writeInnerXML(out, encoding); - - out.write(""); - out.flush(); - } - - public String toString(String encoding) { - try { - StringWriter sw = new StringWriter(); - writeXML(sw, "", encoding); - return sw.toString(); - } catch (Exception e) { - e.printStackTrace(System.err); - } - return "<" + m_name + ">"; - } - - public String toString() { - return this.toString(""); - } - - class SerializedElement { - String m_content = ""; - - SerializedElement(String s) { - if (s != null) m_content = s; - } - - public String toString() { - return m_content; - } - } -} \ No newline at end of file diff --git a/plexus-sandbox/plexus-jabber/jabber-data-model/src/java/ctu/jabber/data/Packet.java b/plexus-sandbox/plexus-jabber/jabber-data-model/src/java/ctu/jabber/data/Packet.java deleted file mode 100644 index 617d480ad..000000000 --- a/plexus-sandbox/plexus-jabber/jabber-data-model/src/java/ctu/jabber/data/Packet.java +++ /dev/null @@ -1,30 +0,0 @@ -package ctu.jabber.data; - -import org.xmlpull.v1.XmlPullParser; - -/** - * @author PV - * @version 1.0 - */ -public class Packet extends Element { - - // Constructors - public Packet(String name) { super(name); } - public Packet(XmlPullParser xpp) { super(xpp); setNamespace("");} - - // Transitable interface implementation - public String getTo() { return getAttribute("to"); } - public void setTo(String recipient) { setAttribute("to", recipient); } - public String getFrom() { return getAttribute("from"); } - public void setFrom(String sender) { setAttribute("from", sender); } - public String getType() { return getAttribute("type"); } - public void setType(String type) { setAttribute("type", type); } - public String getId() { return getAttribute("id"); } - public void setId(String ID) { setAttribute("id", ID); } - public void setError(String errormsg) { - this.setChildText("error", errormsg); - } - public void setErrorCode(int errorCode) { - setChildAttribute("error", "code", Integer.toString(errorCode)); - } -} diff --git a/plexus-sandbox/plexus-jabber/jabber-data-model/src/java/ctu/tools/xml/EscapeStrategy.java b/plexus-sandbox/plexus-jabber/jabber-data-model/src/java/ctu/tools/xml/EscapeStrategy.java deleted file mode 100644 index dc290457f..000000000 --- a/plexus-sandbox/plexus-jabber/jabber-data-model/src/java/ctu/tools/xml/EscapeStrategy.java +++ /dev/null @@ -1,72 +0,0 @@ -package ctu.tools.xml; - -import java.lang.reflect.Method; - -public class EscapeStrategy { - private int bits; - Object encoder; - Method canEncode; - - public EscapeStrategy(String encoding) { - if ("UTF-8".equalsIgnoreCase(encoding) || - "UTF-16".equalsIgnoreCase(encoding)) { - bits = 16; - } - else if ("ISO-8859-1".equalsIgnoreCase(encoding) || - "Latin1".equalsIgnoreCase(encoding)) { - bits = 8; - } - else if ("US-ASCII".equalsIgnoreCase(encoding) || - "ASCII".equalsIgnoreCase(encoding)) { - bits = 7; - } - else { - bits = 0; - //encoder = Charset.forName(encoding).newEncoder(); - try { - Class charsetClass = Class.forName("java.nio.charset.Charset"); - Class encoderClass = Class.forName("java.nio.charset.CharsetEncoder"); - Method forName = charsetClass.getMethod("forName", new Class[]{String.class}); - Object charsetObj = forName.invoke(null, new Object[]{encoding}); - Method newEncoder = charsetClass.getMethod("newEncoder", null); - encoder = newEncoder.invoke(charsetObj, null); - canEncode = encoderClass.getMethod("canEncode", new Class[]{char.class}); - } - catch (Exception ignored) { - } - } - } - - public boolean shouldEscape(char ch) { - if (bits == 16) { - return false; - } - if (bits == 8) { - if ((int) ch > 255) - return true; - else - return false; - } - if (bits == 7) { - if ((int) ch > 127) - return true; - else - return false; - } - else { - if (canEncode != null && encoder != null) { - try { - Boolean val = (Boolean) canEncode.invoke(encoder, new Object[]{new Character(ch)}); - return !val.booleanValue(); - } - catch (Exception ignored) { - } - } - // Return false if we don't know. This risks not escaping - // things which should be escaped, but also means people won't - // start getting loads of unnecessary escapes. - return false; - } - } -} - diff --git a/plexus-sandbox/plexus-jabber/jabber-data-model/src/java/ctu/tools/xml/XMLUtils.java b/plexus-sandbox/plexus-jabber/jabber-data-model/src/java/ctu/tools/xml/XMLUtils.java deleted file mode 100644 index 60ff06d16..000000000 --- a/plexus-sandbox/plexus-jabber/jabber-data-model/src/java/ctu/tools/xml/XMLUtils.java +++ /dev/null @@ -1,205 +0,0 @@ -package ctu.tools.xml; - -import ctu.jabber.data.Element; -import org.xmlpull.v1.XmlPullParserException; -import org.xmlpull.v1.XmlPullParser; -import org.xmlpull.v1.XmlSerializer; - -import java.io.IOException; - -/** - * @author PV - * @version 1.0 - */ - -public class XMLUtils { - - /** - * Serializes the XML from parser. - * - * @param xpp XML parser. - * @param serializer XML serializer. - * @throws XmlPullParserException - * @throws java.io.IOException - */ - public static void serialize(final XmlPullParser xpp, final XmlSerializer serializer, boolean ignoreDefaultNamespace) throws XmlPullParserException, java.io.IOException - { - if (xpp.getEventType() == XmlPullParser.START_TAG) { - // serialize start tag - ignoreDefaultNamespace = serializeToken(xpp, serializer, ignoreDefaultNamespace); - // serialize tag content - while (xpp.next() != XmlPullParser.END_TAG) { - if (xpp.getEventType() == XmlPullParser.START_TAG) { - serialize(xpp, serializer, ignoreDefaultNamespace); - } else { - serializeToken(xpp, serializer, false); - } - } - // serialize end tag - serializeToken(xpp, serializer, ignoreDefaultNamespace); - } else { - serializeToken(xpp, serializer, false); - } - } - - /** - * Serializes the currently parsed token. - * - * @param xpp XML parser. - * @param serializer XML serializer. - * @throws XmlPullParserException - * @throws java.io.IOException - */ - private static boolean serializeToken(final XmlPullParser xpp, final XmlSerializer serializer, boolean ignoreDefaultNamespace) throws XmlPullParserException, java.io.IOException - { - switch (xpp.getEventType()) - { - case XmlPullParser.START_TAG: - if (xpp.getFeature(XmlPullParser.FEATURE_REPORT_NAMESPACE_ATTRIBUTES) == false) - { - for (int i = xpp.getNamespaceCount(xpp.getDepth() - 1); - i <= xpp.getNamespaceCount(xpp.getDepth()) - 1; - i++) - { - String prefix = xpp.getNamespacePrefix(i); - if (prefix == null) prefix = ""; // set default namespace - serializer.setPrefix(prefix, xpp.getNamespaceUri(i)); - ignoreDefaultNamespace = false; - } - - if (ignoreDefaultNamespace) - serializer.startTag(null, xpp.getName()); - else - serializer.startTag(xpp.getNamespace(), xpp.getName()); - - } else { - // TODO: Check functionality - serializer.startTag(xpp.getNamespace(), xpp.getName()); - } - - for (int i = 0; i < xpp.getAttributeCount(); i++) - { - serializer.attribute(xpp.getAttributeNamespace(i), xpp.getAttributeName(i), xpp.getAttributeValue(i)); - } - break; - - case XmlPullParser.END_TAG: - if (ignoreDefaultNamespace) - serializer.endTag(null, xpp.getName()); - else - serializer.endTag(xpp.getNamespace(), xpp.getName()); - break; - - case XmlPullParser.TEXT: - serializer.text(xpp.getText()); - break; - - default: - break; - } - - return ignoreDefaultNamespace; - } - - /** - * Creates an element and its subelements according to the parsed xml content. - * - * @return Element. - * @throws XmlPullParserException - * @throws IOException - */ - public static Element createElement(XmlPullParser xpp) throws XmlPullParserException, IOException { - if (xpp.getEventType() != XmlPullParser.START_TAG) return null; - - Element element = new Element(xpp); - while (xpp.next() != XmlPullParser.END_TAG) { - switch (xpp.getEventType()) { - case XmlPullParser.TEXT: - element.appendText(xpp.getText()); - break; - case XmlPullParser.START_TAG: - element.addChild(createElement(xpp)); - break; - default: - break; - } - } - return element; - } - - public static String s_DefaultEncoding = "UTF-8"; - - /** - * This will take the three pre-defined entities in XML 1.0 - * (used specifically in XML elements) and convert their character - * representation to the appropriate entity reference, suitable for - * XML element content. - * - * @param str String input to escape. - * @return String with escaped content. - */ - public static String escapeElementEntities(String str, String encoding) { - - StringBuffer buffer; - char ch; - String entity; - if (encoding == null || encoding.length() < 1) - encoding = s_DefaultEncoding; - EscapeStrategy strategy = new EscapeStrategy(encoding); - - buffer = null; - for (int i = 0; i < str.length(); i++) { - ch = str.charAt(i); - switch(ch) { - case '<' : - entity = "<"; - break; - case '>' : - entity = ">"; - break; - case '&' : - entity = "&"; - break; - case '\r' : - entity = " "; - break; - case '\n' : - entity = "\r\n"; - break; - default : - if (strategy.shouldEscape(ch)) { - entity = "&#x" + Integer.toHexString(ch) + ";"; - } - else { - entity = null; - } - break; - } - if (buffer == null) { - if (entity != null) { - // An entity occurred, so we'll have to use StringBuffer - // (allocate room for it plus a few more entities). - buffer = new StringBuffer(str.length() + 20); - // Copy previous skipped characters and fall through - // to pickup current character - buffer.append(str.substring(0, i)); - buffer.append(entity); - } - } - else { - if (entity == null) { - buffer.append(ch); - } - else { - buffer.append(entity); - } - } - } - - // If there were any entities, return the escaped characters - // that we put in the StringBuffer. Otherwise, just return - // the unmodified input string. - return (buffer == null) ? str : buffer.toString(); - } - -} diff --git a/plexus-sandbox/plexus-jabber/maven.xml b/plexus-sandbox/plexus-jabber/maven.xml deleted file mode 100644 index 63c3d8d8c..000000000 --- a/plexus-sandbox/plexus-jabber/maven.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/openim.bat b/plexus-sandbox/plexus-jabber/openim.bat deleted file mode 100644 index fc9af7d3b..000000000 --- a/plexus-sandbox/plexus-jabber/openim.bat +++ /dev/null @@ -1,72 +0,0 @@ -@echo off - -rem Slurp the command line arguments. This loop allows for an unlimited number -rem of arguments (up to the command line limit, anyway). -set OPENIM_CMD_LINE_ARGS=%1 -if ""%1""=="""" goto doneStart -shift -:setupArgs -if ""%1""=="""" goto doneStart -set OPENIM_CMD_LINE_ARGS=%OPENIM_CMD_LINE_ARGS% %1 -shift -goto setupArgs - -rem This label provides a place for the argument list loop to break out -rem and for NT handling to skip to. -:doneStart -set _JAVACMD=%JAVACMD% -set LOCALCLASSPATH=%CLASSPATH% - -if "%JAVA_HOME%" == "" goto noJavaHome -if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome -if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe -if exist "%JAVA_HOME%\lib\tools.jar" set LOCALCLASSPATH=%JAVA_HOME%\lib\tools.jar;%LOCALCLASSPATH% -if exist "%JAVA_HOME%\lib\classes.zip" set LOCALCLASSPATH=%JAVA_HOME%\lib\classes.zip;%LOCALCLASSPATH% -goto checkMerlin - -:noJavaHome -echo ERROR: JAVA_HOME not found in your environment. -echo -echo Please, set the JAVA_HOME variable in your environment to match the -echo location of the Java Virtual Machine you want to use. -goto mainEnd - -:checkMerlin -set _MERLINCMD=%MERLINCMD% - -if "%MERLIN_HOME%" == "" goto noMerlinHome -if not exist "%MERLIN_HOME%\bin\merlin.bat" goto noMerlinHome -if "%_MERLINCMD%" == "" set _MERLINCMD=%MERLIN_HOME%\bin\merlin.bat -goto checkOpenIM - -:noMerlinHome -echo ERROR: MERLIN_HOME not found in your environment. -echo -echo Please, set the MERLIN_HOME variable in your environment to match the -echo location of Merlin distribution. -goto mainEnd - -:checkOpenIM -if "%OPENIM_HOME%" == "" goto runOpenIMNoHome -goto runOpenIM - -:runOpenIM -set RUN_CMD=%MERLIN_HOME%\bin\merlin.bat %OPENIM_HOME%\repository\openim\jars\openim-server-impl-1.2.1.jar -config file:/%OPENIM_HOME%\conf\config.xml -context %OPENIM_HOME% -kernel file:/%OPENIM_HOME%\conf\kernel.xml %OPENIM_CMD_LINE_ARGS% -echo RUN CMD IS: %RUN_CMD% -call %RUN_CMD% -goto mainEnd - -:runOpenIMNoHome -set OPENIM_HOME=c:/works/openim-1.2.1-bin -echo Setting OPENIM_HOME: %OPENIM_HOME% -set RUN_CMD=%MERLIN_HOME%\bin\merlin.bat %OPENIM_HOME%\repository\openim\jars\openim-server-impl-1.2.1.jar -config file:/%OPENIM_HOME%\conf\config.xml -context %OPENIM_HOME% -kernel file:/%OPENIM_HOME%\conf\kernel.xml %OPENIM_CMD_LINE_ARGS% -echo RUN CMD IS: %RUN_CMD% -call %RUN_CMD% -set OPENIM_HOME= -goto mainEnd - -:mainEnd -set LOCALCLASSPATH= -set _JAVACMD= -set _MERLINCMD= -set OPENIM_CMD_LINE_ARGS= diff --git a/plexus-sandbox/plexus-jabber/openim.sh b/plexus-sandbox/plexus-jabber/openim.sh deleted file mode 100755 index 537605a95..000000000 --- a/plexus-sandbox/plexus-jabber/openim.sh +++ /dev/null @@ -1,33 +0,0 @@ -#! /bin/sh - -# Checking for JAVA_HOME is required on *nix due -# to some distributions stupidly including kaffe in /usr/bin -if [ "$JAVA_HOME" = "" ] ; then - echo "ERROR: JAVA_HOME not found in your environment." - echo - echo "Please, set the JAVA_HOME variable in your environment to match the" - echo "location of the Java Virtual Machine you want to use." - exit 1 -fi - -# Checking for MERLIN_HOME is required on *nix due -# to some distributions stupidly including kaffe in /usr/bin -if [ "$MERLIN_HOME" = "" ] ; then - echo "ERROR: MERLIN_HOME not found in your environment." - echo - echo "Please, set the MERLIN_HOME variable in your environment to match the" - echo "location of Merlin distribution." - exit 1 -fi - -# Checking for OPENIM_HOME -if [ "$OPENIM_HOME" = "" ] ; then - OPENIM_HOME=`pwd` - echo "Setting OPENIM_HOME: $OPENIM_HOME" -fi - - - -RUN_CMD="$MERLIN_HOME/bin/merlin $OPENIM_HOME/repository/openim/jars/openim-server-impl-1.2.2.jar -config file:$OPENIM_HOME/conf/config.xml -context $OPENIM_HOME -kernel file:$OPENIM_HOME/conf/kernel.xml $*" -echo "RUN CMD IS: $RUN_CMD" -exec $RUN_CMD diff --git a/plexus-sandbox/plexus-jabber/project.properties b/plexus-sandbox/plexus-jabber/project.properties deleted file mode 100644 index cc1b1bdba..000000000 --- a/plexus-sandbox/plexus-jabber/project.properties +++ /dev/null @@ -1 +0,0 @@ -maven.repo.remote = http://www.dpml.net,http://www.apache.org/dist/avalon,http://open-im.net/maven,http://www.ibiblio.org/maven diff --git a/plexus-sandbox/plexus-jabber/project.xml b/plexus-sandbox/plexus-jabber/project.xml deleted file mode 100644 index 4bd1bccd2..000000000 --- a/plexus-sandbox/plexus-jabber/project.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - openim - openim-server - OpenIM Server - net.java.dev.openim - 1.2.2 - - 2003 - OpenIM Server - - OpenIM Server - - - - - Alexis Agahi - alag@users.sf.net - - Release Manager. - - - - Peter Antman - pra@tim.se - - Bugfix, Patch, FlashStream, Code enhancements - - - - - - - Stephen McConnell - mcconnell - mcconnell@apache.org - OSM - - Avalon Merlin integration and advices - - - - - - - - alag@users.sf.net - ${basedir}/src/java - ${basedir}/src/test - - - - - - - ${basedir}/src/java - - **/*.dtd - **/*.properties - **/*.xinfo - **/*.xtype - **/*.xprofile - **/*.xconfig - **/*.xml - **/*.xservice - - - - ${basedir}/conf - BLOCK-INF - - block.xml - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/server/api/maven.xml b/plexus-sandbox/plexus-jabber/server/api/maven.xml deleted file mode 100644 index 755f0b241..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/maven.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/server/api/project.xml b/plexus-sandbox/plexus-jabber/server/api/project.xml deleted file mode 100644 index 7dd5d4086..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/project.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - openim - openim-server-api - OpenIM Server API - net.java.dev.openim - 1.2.2 - - 2003 - OpenIM Server API - - OpenIM Server API - - - ${basedir}/../../project.xml - - - - - - openim - openim-storage-api - 1.2.2 - - - - openim - openim-users-manager-api - 1.3.1 - - - - openim - jabber-data-model - 1.0 - - - - - - kxml2 - kxml2 - 2.1.8 - - - - - avalon-framework - avalon-framework-api - 4.2.0 - - - - - cornerstone-connection - cornerstone-connection-api - 2.0.0 - - - - - - - alag@users.sf.net - ${basedir}/src/java - ${basedir}/src/test - - - - - - ${basedir}/src/java - - **/*.dtd - **/*.properties - **/*.xinfo - **/*.xtype - **/*.xprofile - **/*.xconfig - **/*.xml - **/*.xservice - - - - ${basedir}/conf - BLOCK-INF - - block.xml - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/IMConnectionHandler.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/IMConnectionHandler.java deleted file mode 100644 index c03007b85..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/IMConnectionHandler.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim; - -import org.apache.avalon.cornerstone.services.connection.ConnectionHandler; - -/** - * @version 1.0 - * @author AlAg - */ -public interface IMConnectionHandler extends SessionProcessor, ConnectionHandler -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/IMPresenceHolder.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/IMPresenceHolder.java deleted file mode 100644 index 676762b3c..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/IMPresenceHolder.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim; - -import java.util.Collection; - -import net.java.dev.openim.data.jabber.IMPresence; - - -/** - * @version 1.0 - * @author AlAg - * @author PV - */ -public interface IMPresenceHolder -{ - public void setPresence( String jidAndRessource, IMPresence presence ); - public Collection getPresence( String jid ); - public IMPresence removePresence( String jidAndRessource ); - - public void registerListener(IMPresenceListener listener); - public void unregisterListener(IMPresenceListener listener); -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/IMPresenceListener.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/IMPresenceListener.java deleted file mode 100644 index 3ff37b591..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/IMPresenceListener.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim; - -import net.java.dev.openim.data.jabber.IMPresence; - -/** - * @author PV - * @version 1.0 - */ -public interface IMPresenceListener { - public void onSetPresence(String jidAndRessource, IMPresence presence); - public void onRemovePresence(String jidAndRessource); -} diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/IMRouter.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/IMRouter.java deleted file mode 100644 index ec77e0622..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/IMRouter.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim; - -import java.util.List; - -import net.java.dev.openim.data.Transitable; -import net.java.dev.openim.session.IMClientSession; -import net.java.dev.openim.session.IMSession; - -/** - * @version 1.0 - * @author AlAg - */ -public interface IMRouter -{ - public void setS2SConnectorManager( S2SConnectorManager s2sConnectorManager ); - public S2SConnectorManager getS2SConnectorManager(); - - // client session related - public void registerSession( IMClientSession session ); - public void unregisterSession( IMClientSession session ); - public List getAllRegisteredSession( String username ); - public void releaseSessions(); - - public void route( IMSession session, Transitable message ) throws java.io.IOException; - - - -} diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/IMServer.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/IMServer.java deleted file mode 100644 index f5df2a823..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/IMServer.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim; - -/** - * @version 1.0 - * @author AlAg - */ -public interface IMServer -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/ModuleManager.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/ModuleManager.java deleted file mode 100644 index 064764c4a..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/ModuleManager.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim; - -import net.java.dev.openim.module.ServerModule; - - -/** - * @version 1.0 - * @author AlAg - * @author PV - */ -public interface ModuleManager -{ - /** - * Registers a server module. - * @param module The module to be inserted. - */ - public void registerModule( ServerModule module ); - - /** - * Unregisters a server module. - * @param module The module to be removed. - */ - public void unregisterModule( ServerModule module ); - - /** - * @return An array of server modules. - */ - public ServerModule[] getModules(); - - /** - * @param discoveryId Id of the searched module. - * @return A found module or null. - */ - public ServerModule getModule(String discoveryId); - - /** - * @param hostname - * @return A server module with the specified hostname or null when not found. - */ - public ServerModule getModuleByHostname(String hostname); -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/S2SConnector.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/S2SConnector.java deleted file mode 100644 index fc9781066..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/S2SConnector.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim; - -import java.io.IOException; -import net.java.dev.openim.session.SessionsManager; -import net.java.dev.openim.session.IMServerSession; - -/** - * @version 1.0 - * @author AlAg - */ -public interface S2SConnector extends Runnable { - - public void setToHostname( String toHostname ); - public void setRouter( IMRouter router ); - public void setIMConnectionHandler( IMConnectionHandler connectionHandler ); - public void setSessionsManager( SessionsManager sessionManager ); - - public IMServerSession getSession() throws Exception ; - public void sendResult() throws IOException; - public void sendVerify( String dialbackValue, String id ) throws IOException; - - public void run() ; - public boolean isAlive() ; - -} // class diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/S2SConnectorManager.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/S2SConnectorManager.java deleted file mode 100644 index 959032c1d..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/S2SConnectorManager.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim; - -import net.java.dev.openim.session.IMServerSession; - -/** - * @version 1.0 - * @author AlAg - */ -public interface S2SConnectorManager { - - public void setConnectionHandler( IMConnectionHandler connectionHandler ); - - public IMServerSession getCurrentRemoteSession( String hostname ) throws Exception; - public IMServerSession getRemoteSessionWaitForValidation( String hostname, long timeout ) throws Exception; - - public void verifyRemoteHost( String hostname, String dialbackValue, String id, IMServerSession session ) throws Exception; -} // class diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/ServerParameters.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/ServerParameters.java deleted file mode 100644 index acf13c552..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/ServerParameters.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim; - -import java.util.List; - - - - - -/** - * @version 1.0 - * @author AlAg - */ -public interface ServerParameters -{ - public int getLocalClientPort(); - public int getLocalSSLClientPort(); - public int getLocalServerPort(); - public int getLocalSSLServerPort(); - public List getHostNameList(); - public String getHostName(); - public int getRemoteServerPort(); -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/SessionProcessor.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/SessionProcessor.java deleted file mode 100644 index 0dd4ab258..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/SessionProcessor.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim; - -import net.java.dev.openim.session.IMSession; - - - - -/** - * @author AlAg - */ -public interface SessionProcessor -{ - public void process( IMSession session ) throws Exception; - public void process( IMSession session, Object context ) throws Exception; -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/SimpleMessageRouter.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/SimpleMessageRouter.java deleted file mode 100644 index 01031e740..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/SimpleMessageRouter.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim; - - -/** - * @version 1.0 - * @author AlAg - */ -public interface SimpleMessageRouter -{ - - public void route( String from, String to, String type, String subject, String body, String threadId ) throws java.io.IOException; - - -} diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/SubscriptionManager.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/SubscriptionManager.java deleted file mode 100644 index e1934312b..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/SubscriptionManager.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim; - - -import net.java.dev.openim.data.jabber.IMPresence; -import net.java.dev.openim.session.*; - - -/** - * @version 1.0 - * @author AlAg - */ -public interface SubscriptionManager { - - public void process( IMSession session, IMPresence presence ) throws Exception; - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/data/Deferrable.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/data/Deferrable.java deleted file mode 100644 index 2e59173ff..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/data/Deferrable.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data; - - - - -/** - * @author AlAg - */ -public interface Deferrable extends java.io.Serializable -{ -} - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/data/Transitable.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/data/Transitable.java deleted file mode 100644 index 61f8dbb59..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/data/Transitable.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data; - - - -/** - * @author AlAg - * @author PV - */ -public interface Transitable -{ - public static final String TYPE_ERROR = "error"; - - public void setTo( String to ); - public String getTo(); - - public void setFrom( String from ); - public String getFrom(); - - public void setType( String type ); - public String getType(); - - public void setError( String errormsg ); - public void setErrorCode( int errorCode ); - - public String toString(String encoding); -} - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/data/UsersManager.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/data/UsersManager.java deleted file mode 100644 index b299c7345..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/data/UsersManager.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data; - - -import net.java.dev.openim.data.jabber.User; - -/** - * @version 1.0 - * @author AlAg - */ -public interface UsersManager -{ - public User getNewUser() throws Exception; -} - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/data/jabber/IMPresence.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/data/jabber/IMPresence.java deleted file mode 100644 index b060cf3a8..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/data/jabber/IMPresence.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data.jabber; - -import net.java.dev.openim.data.Transitable; - -/** - * @author AlAg - */ -public interface IMPresence extends Transitable -{ - public static final String TYPE_AVAILABLE = "available"; - public static final String TYPE_UNAVAILABLE = "unavailable"; - public static final String TYPE_SUBSCRIBE = "subscribe"; - public static final String TYPE_SUBSCRIBED = "subscribed"; - public static final String TYPE_UNSUBSCRIBE = "unsubscribe"; - public static final String TYPE_UNSUBSCRIBED= "unsubscribed"; - public static final String TYPE_PROBE = "probe"; - - public void setStatus( String status ); - public String getStatus(); - - public String getPriority(); - public void setPriority( String priority ); - - public void setShow( String show ); - public String getShow(); - - public Object clone(); - -} - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/data/jabber/User.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/data/jabber/User.java deleted file mode 100644 index 958905b65..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/data/jabber/User.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data.jabber; - - -import java.util.List; - -/* - * @version 1.0 - * - * @author AlAg - */ -public interface User -{ - - public void setName( String username ); - public String getName(); - - public void setHostname( String hostname ); - public String getHostname(); - - public void setPassword( String password ); - public String getPassword(); - - public void setDigest( String digest ); - public String getDigest(); - - public void setResource( String resource ); - public String getResource(); - - public boolean isAuthenticationTypeSupported( int type ); - public void authenticate( String sessionId ) throws Exception; - - public String getJID(); - public String getNameAndRessource(); - public String getJIDAndRessource(); - - public void setRosterItemList( List rosterlist ); - public List getRosterItemList(); - - // should be removed when using another component container - // (this is a workaround due to Phoenix(?) strange behaviour - //public User newInstance(); - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/Error.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/Error.java deleted file mode 100644 index f1cc46e22..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/Error.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Error extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/FlashStreams.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/FlashStreams.java deleted file mode 100644 index 58ca9e045..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/FlashStreams.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber; - - - -/** - * @version 1.0 - * @author Pra - */ -public interface FlashStreams extends Streams -{ -} diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/Streams.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/Streams.java deleted file mode 100644 index 3e7da11ca..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/Streams.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber; - - - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Streams extends SessionProcessor -{ - /** - * Get the namespace of the stream. - */ - public String getNamespace(); -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Body.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Body.java deleted file mode 100644 index 94d937eb0..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Body.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.client; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Body extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Iq.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Iq.java deleted file mode 100644 index c8300d4f3..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Iq.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.client; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Iq extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Message.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Message.java deleted file mode 100644 index 16c7c724d..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Message.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.client; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Message extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Presence.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Presence.java deleted file mode 100644 index 92db0c438..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Presence.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.client; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Presence extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Priority.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Priority.java deleted file mode 100644 index d567031c0..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Priority.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.client; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Priority extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Show.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Show.java deleted file mode 100644 index ff9a19922..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Show.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.client; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Show extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Status.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Status.java deleted file mode 100644 index cb1ecd6f7..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Status.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.client; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Status extends SessionProcessor -{ - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Subject.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Subject.java deleted file mode 100644 index 8d471c02c..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Subject.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.client; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Subject extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Thread.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Thread.java deleted file mode 100644 index 2d3797dd0..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/client/Thread.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.client; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Thread extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/auth/Digest.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/auth/Digest.java deleted file mode 100644 index e09f111a0..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/auth/Digest.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.auth; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Digest extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/auth/Password.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/auth/Password.java deleted file mode 100644 index fd21c8695..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/auth/Password.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.auth; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Password extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/auth/Query.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/auth/Query.java deleted file mode 100644 index d4bbdce9f..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/auth/Query.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.auth; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Query extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/auth/Resource.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/auth/Resource.java deleted file mode 100644 index 740c71ec5..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/auth/Resource.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.auth; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Resource extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/auth/Username.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/auth/Username.java deleted file mode 100644 index 7ee3c8785..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/auth/Username.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.auth; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Username extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/browse/Query.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/browse/Query.java deleted file mode 100644 index 5345cd53c..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/browse/Query.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.browse; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Query extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/jprivate/Query.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/jprivate/Query.java deleted file mode 100644 index 437f7a2f4..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/jprivate/Query.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.jprivate; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Query extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/oob/Query.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/oob/Query.java deleted file mode 100644 index 2d1f70e44..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/oob/Query.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.oob; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Query extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/register/Password.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/register/Password.java deleted file mode 100644 index 9f8f8b526..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/register/Password.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.register; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Password extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/register/Query.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/register/Query.java deleted file mode 100644 index ebae00fc8..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/register/Query.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.register; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Query extends SessionProcessor -{ - public Integer CTX_SHOULD_REMOVE = new Integer( 1 ); -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/register/Remove.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/register/Remove.java deleted file mode 100644 index 927879a21..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/register/Remove.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.register; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Remove extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/register/Username.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/register/Username.java deleted file mode 100644 index 5cc7223d2..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/register/Username.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.register; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Username extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/roster/Group.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/roster/Group.java deleted file mode 100644 index 208f191d3..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/roster/Group.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.roster; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Group extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/roster/Item.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/roster/Item.java deleted file mode 100644 index 02d700c9f..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/roster/Item.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.roster; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Item extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/roster/Query.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/roster/Query.java deleted file mode 100644 index e7f66bad0..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/roster/Query.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.roster; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Query extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/search/Query.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/search/Query.java deleted file mode 100644 index 490e60062..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/search/Query.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.search; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Query extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/vcardtemp/VCard.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/vcardtemp/VCard.java deleted file mode 100644 index bd064368a..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/iq/vcardtemp/VCard.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.vcardtemp; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface VCard extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Body.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Body.java deleted file mode 100644 index c968abe75..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Body.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Body extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Error.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Error.java deleted file mode 100644 index a123df636..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Error.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Error extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Iq.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Iq.java deleted file mode 100644 index 4d68f2bb7..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Iq.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Iq extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Message.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Message.java deleted file mode 100644 index db82475cd..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Message.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Message extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Presence.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Presence.java deleted file mode 100644 index 1fdf58728..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Presence.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Presence extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Priority.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Priority.java deleted file mode 100644 index 9b0235056..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Priority.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Priority extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Show.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Show.java deleted file mode 100644 index f5f226cb1..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Show.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Show extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Status.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Status.java deleted file mode 100644 index 79dcdc068..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Status.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Status extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Subject.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Subject.java deleted file mode 100644 index 1e30e282c..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Subject.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Subject extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Thread.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Thread.java deleted file mode 100644 index 67b936112..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/Thread.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Thread extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/dialback/Result.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/dialback/Result.java deleted file mode 100644 index ba35b893f..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/dialback/Result.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server.dialback; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Result extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/dialback/Verify.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/dialback/Verify.java deleted file mode 100644 index f6b9f63a9..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/jabber/server/dialback/Verify.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server.dialback; - -import net.java.dev.openim.SessionProcessor; - -/** - * @version 1.0 - * @author AlAg - */ -public interface Verify extends SessionProcessor -{ -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/log/MessageLogger.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/log/MessageLogger.java deleted file mode 100644 index e5cb46ad6..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/log/MessageLogger.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.log; - - -import net.java.dev.openim.data.Transitable; - - -/** - * @version 1.0 - * @author AlAg - */ -public interface MessageLogger -{ - public void log( Transitable message ); -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/log/MessageRecorder.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/log/MessageRecorder.java deleted file mode 100644 index ca03dfb7f..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/log/MessageRecorder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.log; - -import net.java.dev.openim.data.Transitable; - -/** - * @version 1.0 - * @author AlAg - */ -public interface MessageRecorder -{ - public void record( Transitable message ); -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/module/ServerModule.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/module/ServerModule.java deleted file mode 100644 index 8f2fbd733..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/module/ServerModule.java +++ /dev/null @@ -1,36 +0,0 @@ -// I'm not sure how this interface should look like. -// every module should has its identity and features as defined in discovery protocol -// module can be hooked to the processing schema having its own hostname (ie. conference.openim.net, pubsub.openim.net etc.) -// if server receives a packet for this module, then the eventname of packet is passed to getProcessor() method -// and calls process on returned processor -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.module; - -import net.java.dev.openim.SessionProcessor; - -import java.util.List; - - -/** - * @version 1.0 - * @author AlAg - * @author PV - */ -public interface ServerModule -{ - public ServerModuleIdentity getId(); - public ServerModuleFeatures getFeatures(); - public List getHostNameList(); - public SessionProcessor getProcessor(String eventName); -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/module/ServerModuleFeatures.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/module/ServerModuleFeatures.java deleted file mode 100644 index bfe282a14..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/module/ServerModuleFeatures.java +++ /dev/null @@ -1,38 +0,0 @@ -package net.java.dev.openim.module; - -import ctu.jabber.data.Element; - -import java.util.Set; -import java.util.HashSet; -import java.util.Iterator; -import java.io.StringWriter; - -/** - * @author PV - * @version 1.0 - */ -public class ServerModuleFeatures { - private Set m_features = new HashSet(); - - public Set getFeatures() { return m_features; } - - public String toString(String encoding) { - StringWriter sw = new StringWriter(); - Iterator i = getFeatures().iterator(); - while (i.hasNext()) { - String feature = (String) i.next(); - Element e = new Element("feature"); - e.setAttribute("var", feature); - try { - e.writeXML(sw, "", encoding); - } catch(Exception ex) { - ex.printStackTrace(System.err); - } - } - return sw.toString(); - } - - public String toString() { - return toString(""); - } -} diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/module/ServerModuleIdentity.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/module/ServerModuleIdentity.java deleted file mode 100644 index a065a4f8e..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/module/ServerModuleIdentity.java +++ /dev/null @@ -1,35 +0,0 @@ -package net.java.dev.openim.module; - -import ctu.jabber.data.Element; - -/** - * @author PV - * @version 1.0 - */ -public class ServerModuleIdentity { - private String m_category; - private String m_type; - private String m_name; - - public ServerModuleIdentity(String category, String type, String name) { - m_category = category; - m_type = type; - m_name = name; - } - - public String getCategory() { return m_category; } - public String getType() { return m_type; } - public String getName() { return m_name; } - - public String toString(String encoding) { - Element e = new Element("identity"); - e.setAttribute("category", getCategory()); - e.setAttribute("type", getType()); - e.setAttribute("name", getName()); - return e.toString(encoding); - } - - public String toString() { - return toString(""); - } -} diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/session/IMClientSession.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/session/IMClientSession.java deleted file mode 100644 index 1b4630c43..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/session/IMClientSession.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.session; - - -import net.java.dev.openim.data.jabber.User; -import net.java.dev.openim.data.jabber.IMPresence; - - -/** - * @version 1.0 - * @author AlAg - * @author PV - */ -public interface IMClientSession extends IMSession -{ - // C2S session (will split) - public User getUser(); - public void setUser( User user ); - public int getPriority(); - - public IMPresence getPresence(); - public void setPresence( IMPresence presence ); -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/session/IMServerSession.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/session/IMServerSession.java deleted file mode 100644 index a102b4998..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/session/IMServerSession.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.session; - - - -/** - * @version 1.0 - * @author AlAg - */ -public interface IMServerSession extends IMSession -{ - public boolean getDialbackValid(); - public void setDialbackValid( boolean value ); - - public String getDialbackValue(); - public void setDialbackValue( String dialback ); - - public String getRemoteHostname(); - public void setRemoteHostname( String hostname ); - - public IMServerSession getTwinSession(); - public void setTwinSession( IMServerSession session ); - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/session/IMSession.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/session/IMSession.java deleted file mode 100644 index 6ce11cdbb..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/session/IMSession.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.session; - -import java.net.Socket; - - -import java.io.IOException; -import java.io.Writer; - - -import net.java.dev.openim.IMRouter; -import net.java.dev.openim.data.Transitable; -import net.java.dev.openim.jabber.Streams; -import org.xmlpull.v1.XmlPullParser; -import org.xmlpull.v1.XmlPullParserFactory; -import org.xmlpull.v1.XmlPullParserException; - - -/** - * @version 1.0 - * @author AlAg - * @author PV - */ -public interface IMSession -{ - public static final int UNKNOWN_CONNECTION = 0; - public static final int C2S_CONNECTION = 1; - public static final int S2S_L2R_CONNECTION = 2; - public static final int S2S_R2L_CONNECTION = 3; - - public void setup( Socket socket ) throws Exception; - public boolean isClosed(); - public void close(); - - - public long getId(); - - public XmlPullParser getXmlPullParser(); - public XmlPullParserFactory getXMLParserFactory(); - - public int getConnectionType(); - - public void writeOutputStream( String s ) throws IOException; - public void writeOutputStream( Transitable s ) throws IOException; - public String getEncoding(); - - public void setRouter( IMRouter router ); - public IMRouter getRouter(); - public void setStreams(Streams streams); - public Streams getStreams(); - - public void roundTripNode(Writer out) throws XmlPullParserException, java.io.IOException; -} - - - diff --git a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/session/SessionsManager.java b/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/session/SessionsManager.java deleted file mode 100644 index 2155bce9b..000000000 --- a/plexus-sandbox/plexus-jabber/server/api/src/java/net/java/dev/openim/session/SessionsManager.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.session; - -import net.java.dev.openim.session.IMSession; - - -/** - * @version 1.0 - * @author AlAg - */ -public interface SessionsManager -{ - public IMClientSession getNewClientSession() throws Exception; - public IMServerSession getNewServerSession() throws Exception; - public void release( IMSession session ); - public void releaseSessions(); -} - diff --git a/plexus-sandbox/plexus-jabber/server/impl/conf/block.xml b/plexus-sandbox/plexus-jabber/server/impl/conf/block.xml deleted file mode 100644 index 2f753d0a9..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/conf/block.xml +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - SimpleMessageRouter - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/maven.xml b/plexus-sandbox/plexus-jabber/server/impl/maven.xml deleted file mode 100644 index 755f0b241..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/maven.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/project.xml b/plexus-sandbox/plexus-jabber/server/impl/project.xml deleted file mode 100644 index 3a186181b..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/project.xml +++ /dev/null @@ -1,256 +0,0 @@ - - - - - openim - openim-server-impl - OpenIM Server Impl - net.java.dev.openim - 1.2.2 - - 2003 - OpenIM Server Impl - - OpenIM Server Impl - - - ${basedir}/../../project.xml - - - - - openim - openim-server-api - 1.2.2 - - - - openim - openim-storage-api - 1.2.2 - - - - openim - openim-storage-impl - 1.2.2 - - - - openim - openim-users-manager-api - 1.3.1 - - - - openim - openim-users-manager-impl - 1.3.1 - - - - openim - jabber-data-model - 1.0 - - - - - - - kxml2 - kxml2 - 2.1.8 - - - - - - - concurrent - concurrent - 1.3.4 - - - - - - commons-lang - commons-lang - 2.0 - - - - commons-io - commons-io - 1.0 - - - - - commons-collections - commons-collections - 3.1 - - - - - - avalon-framework - avalon-framework-api - 4.2.0 - - - - avalon-framework - avalon-framework-impl - 4.2.0 - - - - - - - cornerstone-threads - cornerstone-threads-api - 2.0.0 - - - - cornerstone-threads - cornerstone-threads-impl - 2.0.0 - - - - cornerstone-sockets - cornerstone-sockets-api - 1.0 - - - cornerstone-sockets - cornerstone-sockets-impl - 1.1.0 - - - - cornerstone-scheduler - cornerstone-scheduler-api - 1.0.0 - - - cornerstone-scheduler - cornerstone-scheduler-impl - 2.0.0 - - - - cornerstone-datasources - cornerstone-datasources-api - 1.0.0 - - - cornerstone-datasources - cornerstone-datasources-impl - 2.0.0 - - - - cornerstone-connection - cornerstone-connection-api - 2.0.0 - - - cornerstone-connection - cornerstone-connection-impl - 2.0.0 - - - - - - excalibur-pool - excalibur-pool-api - 2.0.0 - - - - excalibur-pool - excalibur-pool-impl - 2.0.0 - - - - - excalibur-thread - excalibur-thread-api - 2.0.0 - - - - excalibur-thread - excalibur-thread-impl - 2.0.0 - - - - - - alag@users.sf.net - ${basedir}/src/java - ${basedir}/src/test - - - - - - - ${basedir}/src/java - - **/*.dtd - **/*.properties - **/*.xinfo - **/*.xtype - **/*.xprofile - **/*.xconfig - **/*.xml - **/*.xservice - - - - ${basedir}/conf - BLOCK-INF - - block.xml - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/DefaultSessionProcessor.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/DefaultSessionProcessor.java deleted file mode 100644 index 73a079b4e..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/DefaultSessionProcessor.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim; - - -import java.util.Properties; -import java.io.StringWriter; - - -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.avalon.framework.service.Serviceable; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; - -import org.xmlpull.v1.XmlPullParser; -import org.xmlpull.v1.XmlPullParserException; - - -import net.java.dev.openim.session.IMSession; -import net.java.dev.openim.jabber.Streams; - -/** - * @author AlAg - * @author PV - */ -public class DefaultSessionProcessor -extends AbstractLogEnabled implements SessionProcessor, Serviceable, Configurable { - - - protected Properties m_XmlEventRole; - protected ServiceManager m_serviceManager; - protected StringWriter m_notProcessedData = null; - - //------------------------------------------------------------------------- - public void configure(Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException { - Configuration[] children = configuration.getChildren( "map" ); - m_XmlEventRole = new Properties(); - for( int i=0, l=children.length; i" ); - String roleName = m_XmlEventRole.getProperty( eventName ); - if( roleName != null ){ - SessionProcessor processor = null; - try{ - processor = (SessionProcessor)m_serviceManager.lookup( roleName ); - }catch( org.apache.avalon.framework.service.ServiceException e ){ - getLogger().warn( "<"+eventName+"> : " + e.getMessage(), e ); - } - if( processor != null ){ - //getLogger().debug( "Got processor "+processor+" for " +roleName); - try{ - processor.process( session, context ); - } - finally{ - //m_serviceManager.release( processor ); - } - } - else{ - getLogger().warn( "No processor for event: " + roleName ); - skip( xpp ); - } - } - else{ - getLogger().warn( "No rolename: "+ roleName +" / defined for event: " + eventName + " skipping" ); - if (m_notProcessedData == null) m_notProcessedData = new StringWriter(); - session.roundTripNode(m_notProcessedData); - // skip( xpp ); - } // else - } - - //------------------------------------------------------------------------- - public void processEndTag( final IMSession session, final Object context ) throws Exception { - final XmlPullParser xpp = session.getXmlPullParser(); - final String eventName = getEventName(session,xpp.getNamespace(),xpp.getName()); - getLogger().debug( "["+session.getId()+"] " ); - } - - //------------------------------------------------------------------------- - public void processText( final IMSession session, final Object context ) throws Exception { - final String text = session.getXmlPullParser().getText().trim(); - if( text.length() > 0 ){ - getLogger().debug( "[ "+text+" ]" ); - } - } - - - - //------------------------------------------------------------------------- - protected void skip( final XmlPullParser xpp ) throws XmlPullParserException, java.io.IOException { - - int eventType = xpp.getEventType(); - - if( eventType == XmlPullParser.START_TAG ){ - - while( eventType != XmlPullParser.END_TAG ){ - eventType = xpp.next(); - if( eventType == XmlPullParser.START_TAG ){ - skip( xpp ); - } - } - } - } - //------------------------------------------------------------------------- - protected StringBuffer serialize( final XmlPullParser xpp ) throws XmlPullParserException, java.io.IOException { - - StringBuffer sb = null; - - int eventType = xpp.getEventType(); - - - if( eventType == XmlPullParser.START_TAG ){ - - sb = getStartElementAsStringBuffer( xpp ); - String elementName = xpp.getName(); - - while( eventType != XmlPullParser.END_TAG ){ - eventType = xpp.next(); - if( eventType == XmlPullParser.START_TAG ){ - sb.append( serialize( xpp ) ); - } - else if( eventType == XmlPullParser.TEXT ){ - sb.append( xpp.getText() ); - } - } // while - - sb.append( "" ); - - } - - return sb; - } - //------------------------------------------------------------------------- - protected String asString( final XmlPullParser xpp ) throws XmlPullParserException { - String s = null; - int eventType = xpp.getEventType(); - if( eventType == XmlPullParser.START_TAG ){ - s = getStartElementAsStringBuffer( xpp ).toString(); - } - if( eventType == XmlPullParser.TEXT ){ - s = xpp.getText(); - } - if( eventType == XmlPullParser.END_TAG ){ - s = ""; - } - return s; - } - - - - //------------------------------------------------------------------------- - private StringBuffer getStartElementAsStringBuffer( final XmlPullParser xpp ){ - StringBuffer sb = new StringBuffer(); - - String elementName = xpp.getName(); - String elementNamespace = xpp.getNamespace(); - // no access to stream and its default namespce - - sb.append( "<" ).append( elementName ); - if( elementNamespace != null && elementNamespace.length() > 0 ){ - sb.append( " xmlns='" ).append( elementNamespace ).append( "'" ); - } - for( int i=0, l=xpp.getAttributeCount(); i" ) ; - return sb; - - } - - protected String getEventName(final IMSession session,final String currentNamespace,final String name) { - String ns = getNamespace( session,currentNamespace ); - ns = ns != null ? ns : ""; - return ns+":"+name; - } - - /** - * Get namespace, using the Streams namespace if current is null or empty string. - */ - protected String getNamespace(final IMSession session,String current) { - String ns = current; - if ( current == null || current.length() == 0) { - // try get the streams namespace - Streams s = session.getStreams(); - if ( s != null) { - ns = s.getNamespace(); - } // end of if () - } // end of if () - return ns; - } - - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/IMConnectionHandlerImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/IMConnectionHandlerImpl.java deleted file mode 100644 index d61be8e39..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/IMConnectionHandlerImpl.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim; - - -import org.apache.avalon.cornerstone.services.connection.ConnectionHandler; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.activity.Disposable; - -import org.xmlpull.v1.XmlPullParser; - -import net.java.dev.openim.session.SessionsManager; -import net.java.dev.openim.session.IMSession; - -/** - * @avalon.component version="1.0" name="IMConnectionHandler" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.IMConnectionHandler" - * - * @version 1.0 - * @author AlAg - */ -public class IMConnectionHandlerImpl extends DefaultSessionProcessor -implements IMConnectionHandler, ConnectionHandler, Configurable,Disposable { - - private ServerParameters m_serverParameters; - private SessionsManager m_sessionsManager; - private IMRouter m_router; - - /** - * @avalon.dependency type="net.java.dev.openim.jabber.Streams:1.0" key="Streams" - * @avalon.dependency type="net.java.dev.openim.jabber.FlashStreams:1.0" key="FlashStreams" - * @avalon.dependency type="net.java.dev.openim.session.SessionsManager:1.0" key="SessionsManager" - * @avalon.dependency type="net.java.dev.openim.ServerParameters:1.0" key="ServerParameters" - * @avalon.dependency type="net.java.dev.openim.IMRouter:1.0" key="IMRouter" - * @avalon.dependency type="net.java.dev.openim.S2SConnectorManager:1.0" key="S2SConnectorManager" - */ - public void service(ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException { - m_serverParameters = (ServerParameters)serviceManager.lookup( "ServerParameters" ); - m_sessionsManager = (SessionsManager)serviceManager.lookup( "SessionsManager" ); - m_router = (IMRouter)serviceManager.lookup( "IMRouter" ); - - S2SConnectorManager s2sConnectorManager = (S2SConnectorManager)serviceManager.lookup( "S2SConnectorManager" ); - s2sConnectorManager.setConnectionHandler( this ); - - m_router.setS2SConnectorManager( s2sConnectorManager ); - - super.service( serviceManager ); - } - //------------------------------------------------------------------------- - public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException { - super.configure( configuration ); - } - - //------------------------------------------------------------------------- - public void handleConnection(java.net.Socket socket) throws java.io.IOException, java.net.ProtocolException { - getLogger().info( "Connection from " + socket.getRemoteSocketAddress() ); - - IMSession session = null; - try { - - if( socket.getLocalPort() == m_serverParameters.getLocalClientPort() - || socket.getLocalPort() == m_serverParameters.getLocalSSLClientPort() ){ - session = m_sessionsManager.getNewClientSession(); - } - else{ - session = m_sessionsManager.getNewServerSession(); - } - - session.setRouter( m_router ); - - getLogger().debug( "######## ["+m_serverParameters.getHostName()+"] New session instance: " + session.getId() ); - session.setup( socket ); - //session.setHostname( m_serverParameters.getHostName() ); - - //socket.setKeepAlive( true ); - - final XmlPullParser xpp = session.getXmlPullParser(); - - int eventType = xpp.getEventType(); - while( eventType != XmlPullParser.START_DOCUMENT ){ - eventType = xpp.getEventType(); - } - - - String s = ""; - session.writeOutputStream( s ); - - - - process( session ); - } - - catch( java.net.SocketException e ){ - String s = e.getMessage(); - getLogger().info( s ); - } - - catch( java.io.EOFException e ){ - getLogger().info( e.getMessage() ); - } - - - catch( Exception e ){ - getLogger().error( e.getMessage(), e ); - throw new java.io.IOException( e.getMessage() ); - } - - finally{ - try{ - if( session != null ){ - if( m_sessionsManager != null ){ - getLogger().info( "Release session " + session.getId() ); - m_sessionsManager.release( session ); - } - } - if( ! socket.isClosed() ){ - socket.close(); - } - } catch( Exception e ){ - getLogger().error( e.getMessage(), e ); - throw new java.io.IOException( e.getMessage() ); - } - } - getLogger().info( "Disconnected session " + session.getId() ); - } - - - public void dispose() { - getLogger().debug( "Disposing Router" ); - // We must stop all sessions! - // Hope the pull parser stops gracefully! - m_router.releaseSessions(); - - // Unfortunately we may also have sessions that was never authenticated - // and therefore is not yet part of the router sessions - m_sessionsManager.releaseSessions(); - - } - - - - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/IMConnectionHandlerImpl.xconfig b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/IMConnectionHandlerImpl.xconfig deleted file mode 100644 index 7992acff9..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/IMConnectionHandlerImpl.xconfig +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/IMPresenceHolderImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/IMPresenceHolderImpl.java deleted file mode 100644 index ead9c2072..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/IMPresenceHolderImpl.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim; - -import java.util.*; - - -import org.apache.avalon.framework.logger.AbstractLogEnabled; - -import net.java.dev.openim.data.jabber.IMPresence; -import net.java.dev.openim.tools.JIDParser; - - - - -/** - * - * @avalon.component version="1.0" name="IMPresenceHolder" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.IMPresenceHolder" - * - * @version 1.0 - * @author AlAg - * @author PV - */ -public class IMPresenceHolderImpl extends AbstractLogEnabled implements IMPresenceHolder { - - Map m_presenceMap = new HashMap(); - Set m_presenceListeners = new HashSet(); - - public void setPresence( String jid, IMPresence presence ){ - synchronized( m_presenceMap ){ - String name = JIDParser.getName( jid ); - Map map = (Map)m_presenceMap.get( name ); - if( map == null ){ - map = new HashMap(); - } - map.put( jid, presence ); - m_presenceMap.put( name, map ); - } - synchronized(m_presenceListeners) { - Iterator iListeners = m_presenceListeners.iterator(); - while (iListeners.hasNext()) { - IMPresenceListener listener = (IMPresenceListener) iListeners.next(); - listener.onSetPresence(jid, presence); - } - } - } - public Collection getPresence( String jid ){ - Collection col = null; - synchronized( m_presenceMap ){ - String name = JIDParser.getName( jid ); - Map map = (Map)m_presenceMap.get( name ); - if( map != null ){ - col = map.values(); - } - } - return col; - } - - public IMPresence removePresence( String jid ) { - IMPresence presence = null; - synchronized( m_presenceMap ){ - String name = JIDParser.getName( jid ); - Map map = (Map)m_presenceMap.get( name ); - if( map != null ){ - presence = (IMPresence)map.remove( jid ); - if( map.isEmpty() ){ - m_presenceMap.remove( map ); - } - } - } - synchronized(m_presenceListeners) { - Iterator iListeners = m_presenceListeners.iterator(); - while (iListeners.hasNext()) { - IMPresenceListener listener = (IMPresenceListener) iListeners.next(); - listener.onRemovePresence(jid); - } - } - return presence; - } - - public void registerListener(IMPresenceListener listener) { - synchronized (m_presenceListeners) { - m_presenceListeners.add(listener); - } - } - - public void unregisterListener(IMPresenceListener listener) { - synchronized(m_presenceListeners) { - m_presenceListeners.remove(listener); - } - } -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/IMRouterImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/IMRouterImpl.java deleted file mode 100644 index 78478102a..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/IMRouterImpl.java +++ /dev/null @@ -1,518 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim; - -import java.util.Map; -import java.util.HashMap; -import java.util.List; -import java.util.LinkedList; -import java.util.ArrayList; -import java.util.Iterator; - - -import java.io.IOException; - -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.service.Serviceable; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.service.ServiceManager; - -import net.java.dev.openim.data.Account; -import net.java.dev.openim.data.storage.AccountRepositoryHolder; -import net.java.dev.openim.data.storage.DeferrableListRepositoryHolder; -import net.java.dev.openim.data.Transitable; -import net.java.dev.openim.data.Deferrable; -import net.java.dev.openim.data.jabber.DeferrableTransitable; -import net.java.dev.openim.data.jabber.User; -import net.java.dev.openim.tools.JIDParser; - -import net.java.dev.openim.log.MessageLogger; -import net.java.dev.openim.log.MessageRecorder; - -import net.java.dev.openim.session.SessionsManager; -import net.java.dev.openim.session.IMClientSession; -import net.java.dev.openim.session.IMSession; -import ctu.jabber.data.Packet; - -/** - * - * @avalon.component version="1.0" name="IMRouter" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.IMRouter" - * - * @version 1.0 - * @author AlAg - * @author PV - */ -public class IMRouterImpl extends AbstractLogEnabled -implements IMRouter, Initializable, Configurable, Serviceable { - - - private Map m_sessionMap; - private ServerParameters m_serverParameters; - private SessionsManager m_sessionsManager; - private S2SConnectorManager m_s2sConnectorManager; - - - - private DeferrableListRepositoryHolder m_deferrableListHolder; - private AccountRepositoryHolder m_accountHolder; - - private int m_deliveryRetryDelay; - private int m_deliveryMaxRetry; - private long m_deliveryMessageQueueTimeout; - private Map m_remoteDeliveryThreadMap; - - private ServiceManager m_serviceManager; - - private MessageLogger m_messageLogger; - private MessageRecorder m_messageRecorder; - - /** - * @avalon.dependency type="net.java.dev.openim.ServerParameters:1.0" key="ServerParameters" - * @avalon.dependency type="net.java.dev.openim.session.SessionsManager:1.0" key="SessionsManager" - * - * @avalon.dependency type="net.java.dev.openim.data.storage.DeferrableListRepositoryHolder:1.0" key="DeferrableListRepositoryHolder" - * @avalon.dependency type="net.java.dev.openim.data.storage.AccountRepositoryHolder:1.0" key="AccountRepositoryHolder" - * - * @avalon.dependency type="net.java.dev.openim.log.MessageLogger:1.0" key="MessageLogger" - * @avalon.dependency type="net.java.dev.openim.log.MessageRecorder:1.0" key="MessageRecorder" - */ - public void service( ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException { - m_serviceManager = serviceManager; - m_deferrableListHolder = (DeferrableListRepositoryHolder)serviceManager.lookup( "DeferrableListRepositoryHolder" ); - m_accountHolder = (AccountRepositoryHolder)serviceManager.lookup( "AccountRepositoryHolder" ); - m_serverParameters = (ServerParameters)serviceManager.lookup( "ServerParameters" ); - m_sessionsManager = (SessionsManager)serviceManager.lookup( "SessionsManager" ); - - m_messageLogger = (MessageLogger)serviceManager.lookup( "MessageLogger" ); - m_messageRecorder = (MessageRecorder)serviceManager.lookup( "MessageRecorder" ); - } - - //------------------------------------------------------------------------- - public void configure(Configuration configuration) throws ConfigurationException { - m_deliveryMessageQueueTimeout = configuration.getChild( "delivery-message-queue-timeout" ).getValueAsLong( 1000*60*60 ); - m_deliveryMaxRetry = configuration.getChild( "delivery-max-retry" ).getValueAsInteger( 3 ); - m_deliveryRetryDelay = configuration.getChild( "delivery-retry-delay" ).getValueAsInteger( 500 ); - getLogger().info( "Router having delivery max retry: "+m_deliveryMaxRetry+" and delay " + m_deliveryRetryDelay ); - } - - //------------------------------------------------------------------------- - public void initialize() throws java.lang.Exception { - //m_validHost = new HashSet(); - m_sessionMap = new HashMap(); - m_remoteDeliveryThreadMap = new HashMap(); - } - //------------------------------------------------------------------------- - public S2SConnectorManager getS2SConnectorManager(){ - return m_s2sConnectorManager; - } - //------------------------------------------------------------------------- - public void setS2SConnectorManager( S2SConnectorManager s2sConnectorManager ){ - m_s2sConnectorManager = s2sConnectorManager; - } - - //------------------------------------------------------------------------- - public void registerSession( final IMClientSession session ) { - - final User user = session.getUser(); - - if( session.getConnectionType() == IMSession.C2S_CONNECTION && user != null ){ - getLogger().debug( "Session map before register : " + m_sessionMap ); - getLogger().debug( "Register session user: " + user.getNameAndRessource() + " session id " + session.getId() ); - try{ - IMSession prevSession = (IMSession)m_sessionMap.get( user.getNameAndRessource() ); - if( prevSession != null ){ - getLogger().debug( "Allready register session: " + prevSession.getId() ); - m_sessionsManager.release( prevSession ); - } - } catch( Exception e ){ - getLogger().error( e.getMessage(), e ); - } - m_sessionMap.put( user.getNameAndRessource(), session ); - - try { - deliverQueueMessage( session, user.getName() ); - } catch( Exception e ){ - getLogger().warn( "Failed to deliver queue message " + e.getMessage(), e ); - } - - - } // if - - } - - - //------------------------------------------------------------------------- - public void unregisterSession( final IMClientSession session ) { - if( session instanceof IMClientSession ){ - User user = ((IMClientSession)session).getUser(); - if( user != null ){ - getLogger().debug( "Unregister register session user: " + user.getJIDAndRessource() + " session id " + session.getId() ); - m_sessionMap.remove( user.getNameAndRessource() ); - //m_sessionMap.remove( user.getName() ); - } - } - } - - //------------------------------------------------------------------------- - public List getAllRegisteredSession( final String name ){ - - List list = new ArrayList( 1 ); - final String[] nameArray = (String[])m_sessionMap.keySet().toArray( new String[0] ); - for( int i=0, l=nameArray.length; i>> getting session for " + name + " having map key " + m_sessionMap.keySet() ); - if( session == null ){ - String username = name; - if( name.indexOf( '/' ) > 0 ){ - // we have a ressource => get the login - username = JIDParser.getName( name ); - } - - List list = getAllRegisteredSession( name ); - for( int i=0, l=list.size(); i getPriorityNumber( session ) ) ){ - session = s; - getLogger().debug( "Select session " + s ); - } - } // for - } // if - - return session; - } - //------------------------------------------------------------------------- - private final int getPriorityNumber( IMClientSession session ){ - int priorityNumber = 0; - if( session.getPresence() != null ){ - String priorityStr = session.getPresence().getPriority(); - - if( priorityStr != null ){ - try{ - priorityNumber = Integer.parseInt( priorityStr ); - } - catch( Exception e ){ - getLogger().error( e.getMessage(), e ); - } - } - } - return priorityNumber; - } - //------------------------------------------------------------------------- - public void route( final IMSession currentSession, final Transitable transit ) - throws java.io.IOException { - final String to = transit.getTo(); - //final String from = transit.getFrom(); - final String toHostname = JIDParser.getHostname( to ); - - if( m_serverParameters.getHostNameList().contains( toHostname ) ){ // local delivery - - final IMClientSession session = getRegisteredSession( JIDParser.getNameAndRessource( to ) ); - - if( session == null ){ - if( transit instanceof Deferrable ){ - - final String username = JIDParser.getName( to ); - Account account = m_accountHolder.getAccount( username ); - if( account == null ){ - getLogger().debug( to + " unknown user. Transit value was: " + transit ); - String from = transit.getFrom(); - transit.setError( "Not Found" ); - transit.setErrorCode( 404 ); - transit.setFrom( to ); - transit.setTo( from ); - transit.setType( Transitable.TYPE_ERROR ); - - m_messageLogger.log( transit ); - if (currentSession != null) { - currentSession.writeOutputStream(transit); - } - m_messageLogger.log( transit ); - m_messageRecorder.record( transit ); - - } - else{ - getLogger().debug( to + " is not connected for getting message, should store for offline dispatch. Transit value was: " + transit ); - - List list = m_deferrableListHolder.getDeferrableList( username ); - if( list == null ){ - list = new ArrayList(); - } - Transitable transitToStore = transit; - if (transit instanceof Packet) { - transitToStore = new DeferrableTransitable((Packet)transit); - } - list.add( transitToStore ); - m_deferrableListHolder.setDeferrableList( username, list ); - } // if else - } // if - } // if - else { - transit.setTo( session.getUser().getJIDAndRessource() ); - session.writeOutputStream( transit.toString() ); - m_messageLogger.log( transit ); - m_messageRecorder.record( transit ); - } // else - } // if - - else { // remote delivery - getLogger().debug( "Remote delivery to " + transit.getTo() ); - enqueueRemoteDelivery( transit, currentSession ); - getLogger().debug( "Enqueued to " + transit.getTo() ); - //new Thread( new AsyncDeliverer( transit, toHostname, currentSession ) ).start(); - } - - } - - //------------------------------------------------------------------------- - public void deliverQueueMessage( IMSession currentSession, String username ) - throws java.io.IOException { - final List list = m_deferrableListHolder.getDeferrableList( username ); - if( list != null ){ - for( int i=0, l=list.size(); i"; - s += ""; - - session.writeOutputStream( s ); - - m_ready = true; - if( m_sendVerify ){ - sendVerify( m_verifyDialbackValue, m_verifyId ); - } - if( m_sendResult ){ - sendResult(); - } - m_connectionHandler.process( session ); - } catch( Exception e ){ - getLogger().error( "L2R "+ m_toHostName +" session exception: "+ e.getMessage(), e ); - } - finally{ - m_isAlive = false; - if (m_session != null) { - if( !m_session.isClosed() ){ - getLogger().info( "Release session " + m_session.getId() ); - m_sessionsManager.release( m_session ); - } - // unlock all thread - synchronized( m_session ){ - m_session.notifyAll(); - } - } - } - } - - //---------------------------------------------------------------------- - public void sendResult() throws IOException { - - if( !m_ready ){ - m_sendResult = true; - } - else{ - - if( m_session.getDialbackValue() == null ){ - String dialbackValue = Long.toString( m_session.getId() ); - m_session.setDialbackValue( dialbackValue ); - - String s = ""; - s += dialbackValue; - s += ""; - getLogger().info( "Started dialback validation for host " + m_toHostName + " id " + m_session.getId() ); - m_session.writeOutputStream( s ); - } - } - - - } - - //---------------------------------------------------------------------- - public void sendVerify( String dialbackValue, String id ) throws IOException { - if( !m_ready ){ - m_sendVerify = true; - m_verifyDialbackValue = dialbackValue; - m_verifyId = id; - } - else{ - String s = ""; - s += dialbackValue; - s += ""; - m_session.writeOutputStream( s ); - } - } - - - -} // class diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/S2SConnectorManagerImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/S2SConnectorManagerImpl.java deleted file mode 100644 index 6518eb2bc..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/S2SConnectorManagerImpl.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim; - - -import java.util.Map; -import java.util.HashMap; - -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.service.Serviceable; - - - -import net.java.dev.openim.session.SessionsManager; -import net.java.dev.openim.session.IMServerSession; - -import org.apache.avalon.framework.activity.Initializable; - - - -/** - * - * @avalon.component version="1.0" name="S2SConnectorManager" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.S2SConnectorManager" - * - * @version 1.0 - * @author AlAg - */ - -public class S2SConnectorManagerImpl extends AbstractLogEnabled -implements S2SConnectorManager, Initializable, Serviceable { - - private Map m_hostnameAndS2SMap; - - private ServiceManager m_serviceManager; - - private IMConnectionHandler m_connectionHandler; - private IMRouter m_router; - private SessionsManager m_sessionsManager; - - /** - * @avalon.dependency type="net.java.dev.openim.S2SConnector:1.0" key="S2SConnector" - * @avalon.dependency type="net.java.dev.openim.session.SessionsManager:1.0" key="SessionsManager" - * @avalon.dependency type="net.java.dev.openim.IMRouter:1.0" key="IMRouter" - */ - public void service( ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException { - m_serviceManager = serviceManager; - m_sessionsManager = (SessionsManager)serviceManager.lookup( "SessionsManager" ); - m_router = (IMRouter)serviceManager.lookup( "IMRouter" ); - } - - - //------------------------------------------------------------------------- - public void initialize() throws java.lang.Exception { - m_hostnameAndS2SMap = new HashMap(); - } - - - - - //------------------------------------------------------------------------- - public void setConnectionHandler( IMConnectionHandler connectionHandler ){ - m_connectionHandler = connectionHandler; - } - - - //------------------------------------------------------------------------- - public IMServerSession getCurrentRemoteSession( String hostname ) throws Exception { - IMServerSession session = null; - synchronized( m_hostnameAndS2SMap ){ - S2SConnector s2s = (S2SConnector)m_hostnameAndS2SMap.get( hostname ); - if( s2s != null && !s2s.getSession().isClosed() ){ - session = s2s.getSession(); - } - } - return session; - } - //---------------------------------------------------------------------- - public IMServerSession getRemoteSessionWaitForValidation( String hostname, long timeout ) throws Exception { - - IMServerSession session = null; - S2SConnector s2s = null; - synchronized( m_hostnameAndS2SMap ){ - s2s = (S2SConnector)m_hostnameAndS2SMap.get( hostname ); - if( s2s != null && !s2s.getSession().isClosed() ){ - session = s2s.getSession(); - } - else{ - s2s = getS2SConnector( hostname ); - session = s2s.getSession(); - - } - } - - synchronized( session ){ - // wait for validation - if( !session.getDialbackValid() ){ - s2s.sendResult(); - getLogger().info( "Wait validation for " + hostname + " for session " + session ); - session.wait( timeout ); - } - } - if( !session.getDialbackValid() ){ - throw new Exception( "Unable to get dialback validation for " + hostname +" after timeout " + timeout + " ms" ); - } - getLogger().info( "Validation granted from " + hostname + " for session " + session ); - - return session; - - } // getremote session - - - //------------------------------------------------------------------------- - public void verifyRemoteHost( String hostname, String dialbackValue, String id, IMServerSession session ) throws Exception{ - - S2SConnector s2s = getS2SConnector( hostname ); - - - s2s.sendVerify( dialbackValue, id ); - if( !s2s.getSession().getDialbackValid() ){ - s2s.sendResult(); - } - - session.setTwinSession( s2s.getSession() ); - s2s.getSession().setTwinSession( session ); - - } - - - //------------------------------------------------------------------------- - private S2SConnector getS2SConnector( String hostname ) throws Exception { - S2SConnector s2s = null; - synchronized( m_hostnameAndS2SMap ){ - s2s = (S2SConnector)m_hostnameAndS2SMap.get( hostname ); - - if( s2s != null && !s2s.isAlive() ){ - getLogger().info( "Removing s2s for hostname (thread not alive) " + hostname ); - m_hostnameAndS2SMap.remove( hostname ); - s2s = null; - } - - if( s2s == null || s2s.getSession().isClosed() ){ - s2s = (S2SConnector)m_serviceManager.lookup( "S2SConnector" ); - s2s.setIMConnectionHandler( m_connectionHandler ); - s2s.setRouter( m_router ); - s2s.setSessionsManager( m_sessionsManager ); - s2s.setToHostname( hostname ); - new Thread( s2s ).start(); - m_hostnameAndS2SMap.put( hostname, s2s ); - } - } - return s2s; - } - - - -} // class diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/ServerParametersImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/ServerParametersImpl.java deleted file mode 100644 index 2c9b55540..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/ServerParametersImpl.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim; - -import java.util.List; -import java.util.ArrayList; -import java.net.InetAddress; - -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.configuration.Configuration; - - -/** - * @avalon.component version="1.0" name="ServerParameters" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.ServerParameters" - * - * @version 1.0 - * @author AlAg - */ -public class ServerParametersImpl extends AbstractLogEnabled -implements ServerParameters, Configurable { - - - private List m_hostnameList; - private int m_localClientPort; - private int m_localSSLClientPort; - private int m_localServerPort; - private int m_localSSLServerPort; - private int m_remoteServerPort; - - - //------------------------------------------------------------------------- - public void configure( final Configuration configuration ) throws org.apache.avalon.framework.configuration.ConfigurationException { - - m_localClientPort = configuration.getChild( "local-client-port" ).getValueAsInteger( 5222 ); - m_localSSLClientPort = configuration.getChild( "local-ssl-client-port" ).getValueAsInteger( 5223 ); - - m_localServerPort = configuration.getChild( "local-server-port" ).getValueAsInteger( 5269 ); - m_localSSLServerPort = configuration.getChild( "local-ssl-server-port" ).getValueAsInteger( 5270 ); - - m_remoteServerPort = configuration.getChild( "remote-server-port" ).getValueAsInteger( 5269 ); - - Configuration[] confs = configuration.getChildren( "hostname" ); - m_hostnameList = new ArrayList( confs.length ); - - for( int i=0, l=confs.length; i 0 || m_error.length() > 0) { - packet.setChildText("error", m_error); - packet.setChildAttribute("error", "code", m_errcode); - } - return packet.toString(encoding); - } - - public String toString() { - return toString(""); - } -} diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/data/jabber/IMIq.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/data/jabber/IMIq.java deleted file mode 100644 index 4f67a832e..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/data/jabber/IMIq.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data.jabber; - -import net.java.dev.openim.data.Transitable; -import net.java.dev.openim.tools.XMLToString; - -/** - * @author AlAg - * @author PV - */ -public class IMIq implements Transitable -{ - public static final String TYPE_GET = "get"; - public static final String TYPE_SET = "set"; - public static final String TYPE_RESULT = "result"; - public static final String TYPE_ERROR = "error"; - - private String m_type; - private String m_to; - private String m_id; - private String m_from; - private String m_data; - - private String m_error; - private Integer m_errorCode; - - public final void setType( String type ){ - m_type = type; - } - public final String getType(){ - return m_type; - } - - public final void setTo( String to ){ - m_to = to; - } - public final String getTo(){ - return m_to; - } - - public final void setFrom( String from ){ - m_from = from; - } - public final String getFrom(){ - return m_from; - } - - public final void setId( String id ){ - m_id = id; - } - public final String getId(){ - return m_id; - } - - public final void setStringData( String data ){ - m_data = data; - } - - public final void setError( String error ){ - m_error = error; - } - - public void setErrorCode( int errorCode ) { - m_errorCode = new Integer( errorCode ); - } - - public String toString(String enconding) { - return toString(); - } - - public String toString(){ - - XMLToString iq = new XMLToString( "iq" ); - iq.addFilledAttribut( "to", m_to ); - iq.addFilledAttribut( "from", m_from ); - iq.addFilledAttribut( "type", m_type ); - iq.addFilledAttribut( "id", m_id ); - - if( m_error != null ){ - XMLToString error = new XMLToString( "error" ); - error.addTextNode( m_error ); - if( m_errorCode != null ){ - error.addFilledAttribut( "code", m_errorCode.toString() ); - } - iq.addElement( error ); - } - - iq.addStringElement( m_data ); - - return iq.toString(); - - } - -} - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/data/jabber/IMMessage.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/data/jabber/IMMessage.java deleted file mode 100644 index 610586459..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/data/jabber/IMMessage.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data.jabber; - -import net.java.dev.openim.tools.XMLToString; -import net.java.dev.openim.data.Transitable; -import net.java.dev.openim.data.Deferrable; - - -/** - * @author AlAg - * @author PV - */ -public class IMMessage implements Transitable, Deferrable -{ - public static final String TYPE_CHAT = "chat"; - - - private String m_to; - private String m_from; - private String m_type; - private String m_subject; - private String m_body; - private String m_thread; - - private String m_error; - private Integer m_errorCode; - - public final void setTo( String to ){ - m_to = to; - } - public final String getTo(){ - return m_to; - } - - - public final void setFrom( String from ){ - m_from = from; - } - public final String getFrom(){ - return m_from; - } - - - public final void setType( String type ){ - m_type = type; - } - public final String getType(){ - return m_type; - } - - public final void setSubject( String subject ){ - m_subject = subject; - } - public final String getSubject(){ - return m_subject; - } - - - public final void setBody( String body ){ - m_body = body; - } - public final String getBody(){ - return m_body; - } - - - public final void setThread( String thread ){ - m_thread = thread; - } - public final String getThread(){ - return m_thread; - } - - public final void setError( String error ){ - m_error = error; - } - - public void setErrorCode( int errorCode ) { - m_errorCode = new Integer( errorCode ); - } - - public String toString(String enconding) { - return toString(); - } - - public String toString(){ - XMLToString message = new XMLToString( "message" ); - message.addFilledAttribut( "to", m_to ); - message.addFilledAttribut( "from", m_from ); - message.addFilledAttribut( "type", m_type ); - - if( m_subject != null ){ - XMLToString subject = new XMLToString( "subject" ); - subject.addTextNode( m_subject ); - message.addElement( subject ); - } - - if( m_body != null ){ - XMLToString body = new XMLToString( "body" ); - body.addTextNode( m_body ); - message.addElement( body ); - } - - if( m_thread != null ){ - XMLToString thread = new XMLToString( "thread" ); - thread.addTextNode( m_thread ); - message.addElement( thread ); - } - - if( m_error != null ){ - XMLToString error = new XMLToString( "error" ); - error.addTextNode( m_error ); - if( m_errorCode != null ){ - error.addFilledAttribut( "code", m_errorCode.toString() ); - } - message.addElement( error ); - } - - return message.toString(); - - } - -} - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/data/jabber/IMPresenceImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/data/jabber/IMPresenceImpl.java deleted file mode 100644 index 33b47cbc3..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/data/jabber/IMPresenceImpl.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data.jabber; - -import net.java.dev.openim.tools.XMLToString; - -/** - * @author AlAg - * @author PV - */ -public class IMPresenceImpl implements IMPresence, java.io.Serializable -{ - - - - private String m_to; - private String m_from; - - private String m_type; - private String m_show; - private String m_priority; - private String m_status; - - private String m_error; - private Integer m_errorCode; - - public final void setTo( String to ){ - m_to = to; - } - public final String getTo(){ - return m_to; - } - - public final void setFrom( String from ){ - m_from = from; - } - public final String getFrom(){ - return m_from; - } - - public final void setType( String type ){ - m_type = type; - } - public final String getType(){ - return m_type; - } - - public final void setShow( String show ){ - m_show = show; - } - public final String getShow(){ - return m_show; - } - - public final void setPriority( String priority ){ - m_priority = priority; - } - public final String getPriority(){ - return m_priority; - } - - public final void setStatus( String status ){ - m_status = status; - } - public final String getStatus(){ - return m_status; - } - - - public final void setError( String error ){ - m_error = error; - } - - public void setErrorCode( int errorCode ) { - m_errorCode = new Integer( errorCode ); - } - - - public Object clone(){ - IMPresenceImpl clone = new IMPresenceImpl(); - - clone.m_to = m_to; - clone.m_from = m_from; - clone.m_type = m_type; - clone.m_show = m_show; - clone.m_priority = m_priority; - clone.m_status = m_status; - clone.m_error = m_error; - clone.m_errorCode = m_errorCode; - - return clone; - } - - public String toString(String encoding) { - return toString(); - } - - public String toString(){ - - XMLToString presence = new XMLToString( "presence" ); - presence.addFilledAttribut( "to", m_to ); - presence.addFilledAttribut( "from", m_from ); - presence.addFilledAttribut( "type", m_type ); - - - if( m_priority != null ){ - XMLToString priority = new XMLToString( "priority" ); - priority.addTextNode( m_priority ); - presence.addElement( priority ); - } - - - if( m_show != null ){ - XMLToString show = new XMLToString( "show" ); - show.addTextNode( m_show ); - presence.addElement( show ); - } - - if( m_status != null ){ - XMLToString status = new XMLToString( "status" ); - status.addTextNode( m_status ); - presence.addElement( status ); - } - - if( m_error != null ){ - XMLToString error = new XMLToString( "error" ); - error.addTextNode( m_error ); - if( m_errorCode != null ){ - error.addFilledAttribut( "code", m_errorCode.toString() ); - } - presence.addElement( error ); - } - - return presence.toString(); - } - - -} - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/data/jabber/IMRosterItem.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/data/jabber/IMRosterItem.java deleted file mode 100644 index 59be5dcc6..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/data/jabber/IMRosterItem.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data.jabber; - -import net.java.dev.openim.tools.XMLToString; -import net.java.dev.openim.tools.JIDParser; - -/** - * @author AlAg - */ -public class IMRosterItem implements java.io.Serializable -{ - public static final String SUBSCRIPTION_REMOVE = "remove"; - public static final String SUBSCRIPTION_BOTH = "both"; - public static final String SUBSCRIPTION_NONE = "none"; - public static final String SUBSCRIPTION_TO = "to"; - public static final String SUBSCRIPTION_FROM = "from"; - - public static final String ASK_SUBSCRIBE = "subscribe"; - public static final String ASK_UNSUBSCRIBE = "unsubscribe"; - - - - private String m_name; - private String m_jid; - private String m_group; - private String m_subscription; - private String m_ask; - - - public final void setName( String name ){ - m_name = name; - } - public final String getName(){ - return m_name; - } - - public final void setJID( String jid ){ - if( jid != null ){ - m_jid = JIDParser.getJID( jid ); - } - } - public final String getJID(){ - return m_jid; - } - - public final void setGroup( String group ){ - m_group = group; - } - public final String getGroup(){ - return m_group; - } - - public final void setSubscription( String subscription ){ - m_subscription = subscription; - } - public final String getSubscription(){ - return m_subscription; - } - - public final void setAsk( String ask ){ - m_ask = ask; - } - public final String getAsk(){ - return m_ask; - } - - public boolean equals( Object obj ){ - return m_jid.equals( ((IMRosterItem)obj).m_jid ); - } - - public String toString(){ - - XMLToString item = new XMLToString( "item" ); - item.addFilledAttribut( "name", m_name ); - item.addFilledAttribut( "jid", m_jid ); - item.addFilledAttribut( "subscription", m_subscription ); - item.addFilledAttribut( "ask", m_ask ); - - XMLToString group = new XMLToString( "group" ); - group.addTextNode( m_group ); - item.addElement( group ); - - return item.toString(); - } -} - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/data/jabber/IQPacket.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/data/jabber/IQPacket.java deleted file mode 100644 index baba3d67c..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/data/jabber/IQPacket.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data.jabber; - -import net.java.dev.openim.data.Transitable; -import net.java.dev.openim.data.Deferrable; -import ctu.jabber.data.Packet; -import org.xmlpull.v1.XmlPullParser; - -/** - * @author PV - */ -public class IQPacket extends Packet implements Transitable, Deferrable -{ - public static final String TYPE_GET = "get"; - public static final String TYPE_SET = "set"; - public static final String TYPE_RESULT = "result"; - public static final String TYPE_ERROR = "error"; - - // Constructors - public IQPacket() { super("iq"); } - public IQPacket(XmlPullParser xpp) { super(xpp); } - -} - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/data/jabber/MessagePacket.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/data/jabber/MessagePacket.java deleted file mode 100644 index 2d0bc802a..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/data/jabber/MessagePacket.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data.jabber; - -import net.java.dev.openim.data.Transitable; -import net.java.dev.openim.data.Deferrable; -import ctu.jabber.data.Packet; -import org.xmlpull.v1.XmlPullParser; - - -/** - * @author PV - */ -public class MessagePacket extends Packet implements Transitable, Deferrable { - public static final String TYPE_CHAT = "chat"; - - // Constructors - public MessagePacket() { super("message"); } - public MessagePacket(XmlPullParser xpp) { super(xpp); } - - public final void setSubject(String subject) { - this.setChildText("subject", subject); - } - public final String getSubject() { - return this.getChildText("subject"); - } - - public final void setBody(String body) { - this.setChildText("body", body); - } - public final String getBody() { - return this.getChildText("body"); - } - - public final void setThread(String thread) { - this.setChildText("thread", thread); - } - public final String getThread() { - return this.getChildText("thread"); - } - -} - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/data/jabber/UserImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/data/jabber/UserImpl.java deleted file mode 100644 index 8cd567649..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/data/jabber/UserImpl.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data.jabber; - -import java.util.List; - -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.avalon.framework.service.Serviceable; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.service.ServiceException; - -import net.java.dev.openim.data.Account; -import net.java.dev.openim.data.storage.AccountRepositoryHolder; -import net.java.dev.openim.data.storage.RosterListRepositoryHolder; -import net.java.dev.openim.ServerParameters; - - - - - -/** - * - * @avalon.component version="1.0" name="User" lifestyle="transient" - * @avalon.service type="net.java.dev.openim.data.jabber.User" - * - * @version 1.0 - * @author AlAg - */ -public class UserImpl extends AbstractLogEnabled implements User, Serviceable -{ - - private String m_name; - private String m_hostname; - private String m_password; - private String m_digest; - private String m_resource; - - private ServiceManager m_serviceManager; - private AccountRepositoryHolder m_accountHolder; - private RosterListRepositoryHolder m_rosterListHolder; - - private ServerParameters m_serverParameters; - - /** - * @avalon.dependency type="net.java.dev.openim.ServerParameters:1.0" key="ServerParameters" - * @avalon.dependency type="net.java.dev.openim.data.storage.AccountRepositoryHolder:1.0" key="AccountRepositoryHolder" - * @avalon.dependency type="net.java.dev.openim.data.storage.RosterListRepositoryHolder:1.0" key="RosterListRepositoryHolder" - */ - //------------------------------------------------------------------------- - public void service( ServiceManager serviceManager) throws ServiceException { - m_serviceManager = serviceManager; - m_serverParameters = (ServerParameters)serviceManager.lookup( "ServerParameters" ); - m_accountHolder = (AccountRepositoryHolder)serviceManager.lookup( "AccountRepositoryHolder" ); - m_rosterListHolder = (RosterListRepositoryHolder)serviceManager.lookup( "RosterListRepositoryHolder" ); - - } - - //------------------------------------------------------------------------- - public final String getName() { - return m_name; - } - //------------------------------------------------------------------------- - public final void setName(final String name) { - m_name = name; - } - //------------------------------------------------------------------------- - public final String getHostname() { - return m_hostname; - } - //------------------------------------------------------------------------- - public final void setHostname(final String hostname) { - m_hostname = hostname; - } - //------------------------------------------------------------------------- - public final void setPassword( final String password) { - m_password = password; - } - //------------------------------------------------------------------------- - public final String getPassword() { - return m_password; - } - //------------------------------------------------------------------------- - public final String getResource() { - return m_resource; - } - //------------------------------------------------------------------------- - public final String getDigest() { - return m_digest; - } - //------------------------------------------------------------------------- - public final void setDigest(final String digest) { - m_digest = digest; - } - //------------------------------------------------------------------------- - public final void setResource(final String resource) { - m_resource = resource; - } - //------------------------------------------------------------------------- - public boolean isAuthenticationTypeSupported( final int type ) { - Account account = m_accountHolder.getAccount( m_name ); - boolean b = false; - if( account == null ){ - getLogger().warn( "Account " + m_name + " does not exist" ); - } - else{ - b = account.isAuthenticationTypeSupported( type ); - } - return b; - } - //------------------------------------------------------------------------- - public void authenticate( String sessionId ) throws Exception { - getLogger().info( "Authenticating " + getJID() + " digest " + m_digest ); - - Account account = m_accountHolder.getAccount( m_name ); - if( account == null ){ - throw new Exception( "Unknow JID " + getJIDAndRessource() ); - } - - // no password assuming digest - if( m_password == null ){ - account.authenticate( Account.AUTH_TYPE_DIGEST, m_digest, sessionId ); - } - - else { // password available: plain authentification - account.authenticate( Account.AUTH_TYPE_PLAIN, m_password, sessionId ); - } - } - //------------------------------------------------------------------------- - public final String getJID() { - String s = m_name; - if( m_hostname != null ){ - s += "@"+m_hostname; - } - return s; - } - //------------------------------------------------------------------------- - public final String getNameAndRessource() { - return m_name+"/"+m_resource; - } - //------------------------------------------------------------------------- - public final String getJIDAndRessource() { - return getJID()+"/"+m_resource; - } - - //------------------------------------------------------------------------- - public List getRosterItemList() { - List rosterList = m_rosterListHolder.getRosterList( m_name ); - - // correcting hostname hack? (maybe should be removed) - /* - if( rosterList != null ){ - for( int i=0, l=rosterList.size(); i"); - session.writeOutputStream( s.toString() ); - } - - -}// FlashStreams diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/FlashStreamsImpl.xconfig b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/FlashStreamsImpl.xconfig deleted file mode 100644 index c9def7a30..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/FlashStreamsImpl.xconfig +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/StreamsImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/StreamsImpl.java deleted file mode 100644 index f28d6eb3a..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/StreamsImpl.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber; - - -import org.apache.avalon.framework.service.ServiceManager; - -import org.xmlpull.v1.XmlPullParser; - -import net.java.dev.openim.ServerParameters; -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.session.IMServerSession; -import net.java.dev.openim.session.IMSession; - - -/** - * @avalon.component version="1.0" name="Streams" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.Streams" - * - * @version 1.0 - * @author AlAg - */ -public class StreamsImpl extends DefaultSessionProcessor implements Streams { - - protected ServerParameters m_serverParameters; - protected String m_namespace; - - /** - * @avalon.dependency type="net.java.dev.openim.ServerParameters:1.0" key="ServerParameters" - * - * @avalon.dependency type="net.java.dev.openim.jabber.Error:1.0" key="Error" - * - * @avalon.dependency type="net.java.dev.openim.jabber.server.Iq:1.0" key="server.Iq" - * @avalon.dependency type="net.java.dev.openim.jabber.server.dialback.Result:1.0" key="server.dialback.Result" - * @avalon.dependency type="net.java.dev.openim.jabber.server.dialback.Verify:1.0" key="server.dialback.Verify" - * @avalon.dependency type="net.java.dev.openim.jabber.server.Message:1.0" key="server.Message" - * @avalon.dependency type="net.java.dev.openim.jabber.server.Presence:1.0" key="server.Presence" - * - * @avalon.dependency type="net.java.dev.openim.jabber.client.Iq:1.0" key="client.Iq" - * @avalon.dependency type="net.java.dev.openim.jabber.client.Presence:1.0" key="client.Presence" - * @avalon.dependency type="net.java.dev.openim.jabber.client.Message:1.0" key="client.Message" - * - */ - public void service( ServiceManager serviceManager ) throws org.apache.avalon.framework.service.ServiceException { - m_serverParameters = (ServerParameters)serviceManager.lookup( "ServerParameters" ); - super.service( serviceManager ); - } - - - public void process( final IMSession session, final Object context ) throws Exception{ - final XmlPullParser xpp = session.getXmlPullParser(); - m_namespace = xpp.getNamespace(null); - processAttribute( session, context ); - if( session instanceof IMServerSession ){ - getLogger().info( "Start stream " + ((IMServerSession)session).getRemoteHostname() + " id " + session.getId() ); - } - super.process( session, context ); - if( session instanceof IMServerSession ){ - getLogger().info( "Stop stream " + ((IMServerSession)session).getRemoteHostname() + " id " + session.getId() ); - } - } - - //------------------------------------------------------------------------- - public void processAttribute( final IMSession session, final Object context ) throws Exception { - - final XmlPullParser xpp = session.getXmlPullParser(); - String to = xpp.getAttributeValue( "", "to" ); - String from = xpp.getAttributeValue( "", "from" ); - - if( from == null || from.length() == 0 ){ - getLogger().debug( "from attribut not specified in stream declaration" ); - } - else{ - if( session instanceof IMServerSession ){ - ((IMServerSession)session).setRemoteHostname( from ); - } - } - - - if( session.getConnectionType() == IMSession.S2S_L2R_CONNECTION ){ - getLogger().debug( "Local to Remote connection " + to ); - } - else{ - String s = ""; - session.writeOutputStream( s ); - - } - } - - public String getNamespace() { - return m_namespace; - } - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/StreamsImpl.xconfig b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/StreamsImpl.xconfig deleted file mode 100644 index b3f7f4c4a..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/StreamsImpl.xconfig +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/BodyImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/BodyImpl.java deleted file mode 100644 index be5924b66..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/BodyImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.client; - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.data.jabber.MessagePacket; -import net.java.dev.openim.session.IMSession; - -/** - * @avalon.component version="1.0" name="client.Body" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.client.Body" - * - * @version 1.0 - * @author AlAg - */ -public class BodyImpl extends DefaultSessionProcessor implements Body { - - public void processText( final IMSession session, final Object context ) throws Exception { - ((MessagePacket)context).setBody( session.getXmlPullParser().getText().trim() ); - } - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/IqImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/IqImpl.java deleted file mode 100644 index 4c49ffe96..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/IqImpl.java +++ /dev/null @@ -1,124 +0,0 @@ -// very simple delivery tree added (it looks for destination hostname and decides who will process iq) -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.client; - -import org.xmlpull.v1.XmlPullParser; - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.ServerParameters; -import net.java.dev.openim.ModuleManager; -import net.java.dev.openim.SessionProcessor; -import net.java.dev.openim.tools.JIDParser; -import net.java.dev.openim.module.ServerModule; -import net.java.dev.openim.data.jabber.IQPacket; -import net.java.dev.openim.session.IMClientSession; -import net.java.dev.openim.session.IMSession; - -import java.io.StringWriter; - -/** - * @author AlAg - * @author PV - * @version 1.0 - * @avalon.component version="1.0" name="client.Iq" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.client.Iq" - */ -public class IqImpl extends DefaultSessionProcessor implements Iq { - - private ServerParameters m_serverParameters; - private ModuleManager m_moduleManager; - - /** - * @avalon.dependency type="net.java.dev.openim.jabber.iq.auth.Query:1.0" key="iq.auth.Query" - * @avalon.dependency type="net.java.dev.openim.jabber.iq.browse.Query:1.0" key="iq.browse.Query" - * @avalon.dependency type="net.java.dev.openim.jabber.iq.search.Query:1.0" key="iq.search.Query" - * @avalon.dependency type="net.java.dev.openim.jabber.iq.oob.Query:1.0" key="iq.oob.Query" - * @avalon.dependency type="net.java.dev.openim.jabber.iq.register.Query:1.0" key="iq.register.Query" - * @avalon.dependency type="net.java.dev.openim.jabber.iq.roster.Query:1.0" key="iq.roster.Query" - * @avalon.dependency type="net.java.dev.openim.jabber.iq.jprivate.Query:1.0" key="iq.jprivate.Query" - * @avalon.dependency type="net.java.dev.openim.jabber.iq.vcardtemp.VCard:1.0" key="iq.vcardtemp.VCard" - * @avalon.dependency type="net.java.dev.openim.ModuleManager:1.0" key="ModuleManager" - * @avalon.dependency type="net.java.dev.openim.ServerParameters:1.0" key="ServerParameters" - */ - public void service(org.apache.avalon.framework.service.ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException { - super.service(serviceManager); - - m_serverParameters = (ServerParameters) serviceManager.lookup("ServerParameters"); - m_moduleManager = (ModuleManager) serviceManager.lookup("ModuleManager"); - - } - - public void process(final IMSession session, final Object context) throws Exception { - - ServerModule module = null; - - XmlPullParser xpp = session.getXmlPullParser(); - - for (int i = 0, l = xpp.getAttributeCount(); i < l; i++) { - getLogger().debug("Attribut ns: " + xpp.getAttributeNamespace(i) + " name: " + xpp.getAttributeName(i) + " value: " + xpp.getAttributeValue(i)); - } - - // create a new iq packet - IQPacket iq = new IQPacket(xpp); - getLogger().debug("Got IQ " + iq); - - // set the correct from field - IMClientSession clientSession = null; - if (session instanceof IMClientSession) { - clientSession = (IMClientSession) session; - } - - if (clientSession != null && clientSession.getUser() != null) { - iq.setFrom(clientSession.getUser().toString()); - } - - // Is the received packet for the server? - if (iq.getTo() == "" || m_serverParameters.getHostNameList().contains(iq.getTo())) { - - super.process(session, iq); - - // append not processed elemenents - if (this.m_notProcessedData != null ) { - iq.addSerializedChild(this.m_notProcessedData.toString()); - } - - // route a result - if (IQPacket.TYPE_RESULT.equals(iq.getType())) { - iq.setFrom(((IMClientSession) session).getUser().getJIDAndRessource()); - session.getRouter().route(session, iq); - } - - } else if ((module = m_moduleManager.getModuleByHostname(JIDParser.getHostname(iq.getTo()))) != null) { - // the received packet is for some server module - SessionProcessor processor = module.getProcessor(getEventName(session, xpp.getNamespace(), xpp.getName())); - if (processor != null) processor.process(session, iq); - - } else { - // the received packet is not for the server or its modules - // the packet will be roundtriped and routed - StringWriter sw = new StringWriter(); - // serialize packet content - while (xpp.next() != XmlPullParser.END_TAG) { - session.roundTripNode(sw); - } - iq.addSerializedChild(sw.toString()); - - if (clientSession != null && clientSession.getUser() != null) { - iq.setFrom(clientSession.getUser().toString()); - } - session.getRouter().route(session, iq); - } - } - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/IqImpl.xconfig b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/IqImpl.xconfig deleted file mode 100644 index 042f4987f..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/IqImpl.xconfig +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/MessageImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/MessageImpl.java deleted file mode 100644 index 8957eb72f..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/MessageImpl.java +++ /dev/null @@ -1,106 +0,0 @@ -// very simple delivery tree added (it looks for destination hostname and decides who will process msg) -// server now routes not processed elements -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.client; - - - -import org.xmlpull.v1.XmlPullParser; - -import net.java.dev.openim.*; -import net.java.dev.openim.tools.JIDParser; -import net.java.dev.openim.module.ServerModule; -import net.java.dev.openim.data.jabber.MessagePacket; -import net.java.dev.openim.session.IMClientSession; -import net.java.dev.openim.session.IMSession; - - -/** - * @avalon.component version="1.0" name="client.Message" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.client.Message" - * - * @version 1.0 - * @author AlAg - */ -public class MessageImpl extends DefaultSessionProcessor implements Message { - - private ServerParameters m_serverParameters; - private ModuleManager m_moduleManager; - - /** - * @avalon.dependency type="net.java.dev.openim.jabber.client.Subject:1.0" key="client.Subject" - * @avalon.dependency type="net.java.dev.openim.jabber.client.Body:1.0" key="client.Body" - * @avalon.dependency type="net.java.dev.openim.jabber.client.Thread:1.0" key="client.Thread" - * - * @avalon.dependency type="net.java.dev.openim.ModuleManager:1.0" key="ModuleManager" - * @avalon.dependency type="net.java.dev.openim.ServerParameters:1.0" key="ServerParameters" - */ - public void service(org.apache.avalon.framework.service.ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException { - super.service( serviceManager ); - - m_serverParameters = (ServerParameters) serviceManager.lookup("ServerParameters"); - m_moduleManager = (ModuleManager) serviceManager.lookup("ModuleManager"); - } - - //------------------------------------------------------------------------- - - public void process( final IMSession session, final Object context ) throws Exception{ - - ServerModule module = null; - - XmlPullParser xpp = session.getXmlPullParser(); - - MessagePacket message = new MessagePacket(xpp); - - if( session instanceof IMClientSession ) { - if (message.getFrom().length() == 0 ) { - String from = ((IMClientSession)session).getUser().getJIDAndRessource(); - message.setFrom(from); - } - // Handle ping your self - if (message.getTo().length() == 0 ) { - String to = ((IMClientSession)session).getUser().getJIDAndRessource(); - message.setTo(to); - } - } - - if ((module = m_moduleManager.getModuleByHostname(JIDParser.getHostname(message.getTo()))) != null) { - // the received packet is for some server module - SessionProcessor processor = module.getProcessor(getEventName(session, xpp.getNamespace(), xpp.getName())); - if (processor != null) processor.process(session, message); - - } else if (!m_serverParameters.getHostNameList().contains(message.getTo())) { - // the received packet is not for the server or its modules - super.process( session, message ); - if (this.m_notProcessedData != null) { - message.addSerializedChild(this.m_notProcessedData.getBuffer().toString()); - } - IMRouter router = session.getRouter(); - router.route( session, message ); - } - -/* - String iqMsg = session.getMessageData().getId(); - - String s = "" - +"" - +"" - +""; - - - session.writeOutputStream( s ); -*/ - } - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/MessageImpl.xconfig b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/MessageImpl.xconfig deleted file mode 100644 index 3101a9ae4..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/MessageImpl.xconfig +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/PresenceImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/PresenceImpl.java deleted file mode 100644 index 9018f14e9..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/PresenceImpl.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.client; - - -import java.util.List; - - -import org.xmlpull.v1.XmlPullParser; - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.IMRouter; -import net.java.dev.openim.IMPresenceHolder; -import net.java.dev.openim.SubscriptionManager; -import net.java.dev.openim.data.jabber.IMPresence; -import net.java.dev.openim.data.jabber.IMPresenceImpl; -import net.java.dev.openim.data.jabber.IMRosterItem; -import net.java.dev.openim.session.IMClientSession; -import net.java.dev.openim.session.IMSession; - -/** - * @avalon.component version="1.0" name="client.Presence" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.client.Presence" - * - * @version 1.0 - * @author AlAg - */ -public class PresenceImpl extends DefaultSessionProcessor implements Presence { - - private IMPresenceHolder m_presenceHolder; - private SubscriptionManager m_subscriptionManager; - - /** - * @avalon.dependency type="net.java.dev.openim.jabber.client.Show:1.0" key="client.Show" - * @avalon.dependency type="net.java.dev.openim.jabber.client.Priority:1.0" key="client.Priority" - * @avalon.dependency type="net.java.dev.openim.jabber.client.Status:1.0" key="client.Status" - * - * @avalon.dependency type="net.java.dev.openim.IMPresenceHolder:1.0" key="IMPresenceHolder" - * @avalon.dependency type="net.java.dev.openim.SubscriptionManager:1.0" key="SubscriptionManager" - */ - public void service(org.apache.avalon.framework.service.ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException { - super.service( serviceManager ); - m_presenceHolder = (IMPresenceHolder)serviceManager.lookup( "IMPresenceHolder" ); - m_subscriptionManager = (SubscriptionManager)serviceManager.lookup( "SubscriptionManager" ); - } - - //------------------------------------------------------------------------- - public void process( final IMSession session, final Object context ) throws Exception{ - - IMClientSession clientSession = (IMClientSession)session; - - XmlPullParser xpp = session.getXmlPullParser(); - - String type = xpp.getAttributeValue( "", "type" ); - String to = xpp.getAttributeValue( "", "to" ); - - String from = xpp.getAttributeValue( "", "from" ); - - if( from == null || from.length() == 0 ) { - from = clientSession.getUser().getJIDAndRessource(); - } - - - IMPresence presence = new IMPresenceImpl(); - presence.setType( type ); - presence.setFrom( from ); - - super.process( session, presence ); - - clientSession.setPresence( presence ); - - - if( type == null || type.length()==0 - || IMPresence.TYPE_AVAILABLE.equals( type ) - || IMPresence.TYPE_UNAVAILABLE.equals( type ) - ){ - m_presenceHolder.setPresence( from, presence ); - } - - getLogger().debug( "Got presence (to "+to+") " + presence ); - - IMRouter router = session.getRouter(); - if( to == null || to.length() == 0 || to.equals( "null" ) ){ - // emit presence associated to roster friends - List rosterList = clientSession.getUser().getRosterItemList(); - if( rosterList != null ){ - for( int i=0, l=rosterList.size(); i - - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/PriorityImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/PriorityImpl.java deleted file mode 100644 index 845761eec..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/PriorityImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.client; - - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.data.jabber.IMPresence; -import net.java.dev.openim.session.IMSession; - -/** - * @avalon.component version="1.0" name="client.Priority" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.client.Priority" - * - * @version 1.0 - * @author AlAg - */ -public class PriorityImpl extends DefaultSessionProcessor implements Priority { - - public void processText( final IMSession session, final Object context ) throws Exception { - ((IMPresence)context).setPriority( session.getXmlPullParser().getText().trim() ); - } - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/ShowImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/ShowImpl.java deleted file mode 100644 index a963ca560..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/ShowImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.client; - - - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.data.jabber.IMPresence; -import net.java.dev.openim.session.IMSession; - - -/** - * @avalon.component version="1.0" name="client.Show" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.client.Show" - * - * @version 1.0 - * @author AlAg - */ -public class ShowImpl extends DefaultSessionProcessor implements Show { - - public void processText( final IMSession session, final Object context ) throws Exception { - ((IMPresence)context).setShow( session.getXmlPullParser().getText().trim() ); - } - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/StatusImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/StatusImpl.java deleted file mode 100644 index 7bc9d3338..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/StatusImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.client; - - - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.data.jabber.IMPresence; -import net.java.dev.openim.session.IMSession; - -/** - * @avalon.component version="1.0" name="client.Status" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.client.Status" - * - * @version 1.0 - * @author AlAg - */ -public class StatusImpl extends DefaultSessionProcessor implements Status { - - public void processText( final IMSession session, final Object context ) throws Exception { - ((IMPresence)context).setStatus( session.getXmlPullParser().getText().trim() ); - } - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/SubjectImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/SubjectImpl.java deleted file mode 100644 index f5760d892..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/SubjectImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.client; - - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.data.jabber.MessagePacket; -import net.java.dev.openim.session.IMSession; - -/** - * @avalon.component version="1.0" name="client.Subject" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.client.Subject" - * - * @version 1.0 - * @author AlAg - */ -public class SubjectImpl extends DefaultSessionProcessor implements Subject { - - public void processText( final IMSession session, final Object context ) throws Exception { - //Why trim? - //((MessagePacket)context).setSubject( session.getXmlPullParser().getText().trim() ); - ((MessagePacket)context).setSubject( session.getXmlPullParser().getText()); - } - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/ThreadImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/ThreadImpl.java deleted file mode 100644 index e10a94052..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/client/ThreadImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.client; - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.data.jabber.MessagePacket; -import net.java.dev.openim.session.IMSession; - -/** - * @avalon.component version="1.0" name="client.Thread" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.client.Thread" - * - * @version 1.0 - * @author AlAg - */ -public class ThreadImpl extends DefaultSessionProcessor implements Thread { - - - public void processText( final IMSession session, final Object context ) throws Exception { - ((MessagePacket)context).setThread( session.getXmlPullParser().getText().trim() ); - } - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/auth/DigestImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/auth/DigestImpl.java deleted file mode 100644 index f58452d96..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/auth/DigestImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.auth; - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.session.IMClientSession; -import net.java.dev.openim.session.IMSession; - - -/** - * @avalon.component version="1.0" name="iq.auth.Digest" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.iq.auth.Digest" - * - * @version 1.0 - * @author AlAg - */ -public class DigestImpl extends DefaultSessionProcessor implements Digest { - - public void processText( final IMSession session, final Object context ) throws Exception { - ((IMClientSession)session).getUser().setDigest( session.getXmlPullParser().getText().trim() ); - } - - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/auth/PasswordImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/auth/PasswordImpl.java deleted file mode 100644 index 81e1f75af..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/auth/PasswordImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.auth; - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.session.IMClientSession; -import net.java.dev.openim.session.IMSession; - - -/** - * @avalon.component version="1.0" name="iq.auth.Password" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.iq.auth.Password" - * - * @version 1.0 - * @author AlAg - */ -public class PasswordImpl extends DefaultSessionProcessor implements Password { - - public void processText( final IMSession session, final Object context ) throws Exception { - ((IMClientSession)session).getUser().setPassword( session.getXmlPullParser().getText().trim() ); - } - - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/auth/QueryImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/auth/QueryImpl.java deleted file mode 100644 index 07e8d5f6f..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/auth/QueryImpl.java +++ /dev/null @@ -1,135 +0,0 @@ -// there is a bug, some clients have problems that errorcode and errormsg are not set -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.auth; - - - -import net.java.dev.openim.data.UsersManager; -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.ServerParameters; -import net.java.dev.openim.IMRouter; -import net.java.dev.openim.data.Account; -import net.java.dev.openim.data.jabber.IQPacket; -import net.java.dev.openim.data.jabber.User; -import net.java.dev.openim.data.storage.AccountRepositoryHolder; -import net.java.dev.openim.session.IMClientSession; -import net.java.dev.openim.session.IMSession; - - - - -/** - * @avalon.component version="1.0" name="iq.auth.Query" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.iq.auth.Query" - * - * @version 1.0 - * @author AlAg - */ -public class QueryImpl extends DefaultSessionProcessor implements Query { - - private ServerParameters m_serverParameters; - private UsersManager m_usersManager; - private AccountRepositoryHolder m_accountHolder; - - /** - * @avalon.dependency type="net.java.dev.openim.ServerParameters:1.0" key="ServerParameters" - * - * @avalon.dependency type="net.java.dev.openim.data.UsersManager:1.0" key="UsersManager" - * @avalon.dependency type="net.java.dev.openim.data.storage.AccountRepositoryHolder:1.0" key="AccountRepositoryHolder" - * - * @avalon.dependency type="net.java.dev.openim.jabber.iq.auth.Username:1.0" key="iq.auth.Username" - * @avalon.dependency type="net.java.dev.openim.jabber.iq.auth.Password:1.0" key="iq.auth.Password" - * @avalon.dependency type="net.java.dev.openim.jabber.iq.auth.Digest:1.0" key="iq.auth.Digest" - * @avalon.dependency type="net.java.dev.openim.jabber.iq.auth.Resource:1.0" key="iq.auth.Resource" - */ - public void service(org.apache.avalon.framework.service.ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException { - m_usersManager = (UsersManager)serviceManager.lookup( "UsersManager" ); - m_accountHolder = (AccountRepositoryHolder)serviceManager.lookup( "AccountRepositoryHolder" ); - m_serverParameters = (ServerParameters)serviceManager.lookup( "ServerParameters" ); - super.service( serviceManager ); - } - - //------------------------------------------------------------------------- - public void process( final IMSession session, final Object context ) throws Exception{ - - IMClientSession clientSession = (IMClientSession)session; - - String iqId = ((IQPacket)context).getId(); - String type = ((IQPacket)context).getType(); - - - User user = m_usersManager.getNewUser(); - clientSession.setUser( user ); - user.setHostname( m_serverParameters.getHostName() ); - - - // GET - if( IQPacket.TYPE_GET.equals( type ) ){ - super.process( session, context ); - String s = null; - - Account account = m_accountHolder.getAccount( user.getName() ); - if( account == null ){ // user does not exists - s = "" - +""+user.getName()+"" - + "Unauthorized" - + ""; - } - - else{ // user exists - s = "" - +"" - +""+user.getName()+""; - - if( user.isAuthenticationTypeSupported( Account.AUTH_TYPE_PLAIN ) ){ - s += ""; - } - if( user.isAuthenticationTypeSupported( Account.AUTH_TYPE_DIGEST ) ){ - s += ""; - } - s += ""; - } - - session.writeOutputStream( s ); - } - - // SET - else if( IQPacket.TYPE_SET.equals( type ) ){ - super.process( session, context ); - - - try{ - user.authenticate( Long.toString( session.getId() ) ); - IMRouter router = session.getRouter(); - router.registerSession( clientSession ); - - String s = ""; - session.writeOutputStream( s ); - - // get all enqued message - //router.deliverQueueMessage( session, user.getName() ); - - } - - catch( Exception e ){ - getLogger().debug( e.getMessage(), e ); - String s = ""; - // TODO: add error code and msg - session.writeOutputStream( s ); - } - } - - } - - -} - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/auth/QueryImpl.xconfig b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/auth/QueryImpl.xconfig deleted file mode 100644 index d27bc7fc7..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/auth/QueryImpl.xconfig +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/auth/ResourceImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/auth/ResourceImpl.java deleted file mode 100644 index 9eb90b027..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/auth/ResourceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.auth; - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.session.IMClientSession; -import net.java.dev.openim.session.IMSession; - - -/** - * @avalon.component version="1.0" name="iq.auth.Resource" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.iq.auth.Resource" - * - * @version 1.0 - * @author AlAg - */ -public class ResourceImpl extends DefaultSessionProcessor implements Resource { - - public void processText( final IMSession session, final Object context ) throws Exception { - ((IMClientSession)session).getUser().setResource( session.getXmlPullParser().getText().trim() ); - } - - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/auth/UsernameImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/auth/UsernameImpl.java deleted file mode 100644 index ca64a9200..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/auth/UsernameImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.auth; - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.session.IMClientSession; -import net.java.dev.openim.session.IMSession; - - -/** - * @avalon.component version="1.0" name="iq.auth.Username" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.iq.auth.Username" - * - * @version 1.0 - * @author AlAg - */ -public class UsernameImpl extends DefaultSessionProcessor implements Username { - - public void processText( final IMSession session, final Object context ) throws Exception { - ((IMClientSession)session).getUser().setName( session.getXmlPullParser().getText().trim().toLowerCase() ); - } - - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/browse/QueryImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/browse/QueryImpl.java deleted file mode 100644 index 9a3ca1f44..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/browse/QueryImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.browse; - - - - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.ServerParameters; - -import net.java.dev.openim.data.jabber.IQPacket; -import net.java.dev.openim.session.IMClientSession; -import net.java.dev.openim.session.IMSession; - -import org.apache.avalon.framework.service.ServiceManager; -import org.xmlpull.v1.XmlPullParser; - - - - -/** - * @avalon.component version="1.0" name="iq.browse.Query" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.iq.browse.Query" - * - * @version 1.0 - * @author AlAg - */ -public class QueryImpl extends DefaultSessionProcessor implements Query { - - private ServerParameters m_serverParameters; - /** - * @avalon.dependency type="net.java.dev.openim.ServerParameters:1.0" key="ServerParameters" - */ - public void service( ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException { - m_serverParameters = (ServerParameters)serviceManager.lookup( "ServerParameters" ); - } - - //------------------------------------------------------------------------- - public void process( final IMSession session, final Object context ) throws Exception{ - - IMClientSession clientSession = (IMClientSession)session; - String type = ((IQPacket)context).getType(); - - // GET - if( IQPacket.TYPE_GET.equals( type ) ){ - get( clientSession, context ); - } - else if( IQPacket.TYPE_SET.equals( type ) ){ - set( clientSession, context ); - } - } - - - //------------------------------------------------------------------------- - private void get( final IMClientSession session, Object context ) throws Exception { - - - final XmlPullParser xpp = session.getXmlPullParser(); - - String iqId = ((IQPacket)context).getId(); - - String s = ""; - s += ""; - s += "jabber:iq:register"; - s += ""; - s += ""; - - session.writeOutputStream( s ); - } - - //------------------------------------------------------------------------- - private void set( final IMClientSession session, final Object context ) throws Exception { - - final XmlPullParser xpp = session.getXmlPullParser(); - getLogger().warn( "Skipping jabber:iq:browse:query set" ); - } - -} - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/jprivate/QueryImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/jprivate/QueryImpl.java deleted file mode 100644 index 0e00a89bf..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/jprivate/QueryImpl.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.jprivate; - - - - - -import net.java.dev.openim.DefaultSessionProcessor; - -import net.java.dev.openim.data.jabber.IQPacket; -import net.java.dev.openim.data.storage.PrivateRepositoryHolder; -import net.java.dev.openim.session.IMClientSession; -import net.java.dev.openim.session.IMSession; - -import org.xmlpull.v1.XmlPullParser; - -import java.io.StringWriter; - - - - -/** - * @avalon.component version="1.0" name="iq.auth.Query" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.iq.jprivate.Query" - * - * @version 1.0 - * @author AlAg - */ -public class QueryImpl extends DefaultSessionProcessor implements Query { - - private PrivateRepositoryHolder m_privateRepository; - - /** - * @avalon.dependency type="net.java.dev.openim.data.storage.PrivateRepositoryHolder:1.0" key="PrivateRepositoryHolder" - */ - public void service(org.apache.avalon.framework.service.ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException { - m_privateRepository = (PrivateRepositoryHolder)serviceManager.lookup( "PrivateRepositoryHolder" ); - } - - - //------------------------------------------------------------------------- - - public void process( final IMSession session, final Object context ) throws Exception{ - - IMClientSession clientSession = (IMClientSession)session; - String type = ((IQPacket)context).getType(); - - // GET - if( IQPacket.TYPE_GET.equals( type ) ){ - get( clientSession, context ); - } - else if( IQPacket.TYPE_SET.equals( type ) ){ - set( clientSession, context ); - } - } - - - //------------------------------------------------------------------------- - private void get( final IMClientSession session, Object context ) throws Exception { - - - final XmlPullParser xpp = session.getXmlPullParser(); - //final String privateName = xpp.getNamespace()+':'+xpp.getName(); - - - - - String iqId = ((IQPacket)context).getId(); - - int eventType = xpp.next(); - String privateKey = xpp.getNamespace()+':'+xpp.getName(); - String data = m_privateRepository.getData( session.getUser().getName(), privateKey ); - if( data == null ){ - data = "<"+xpp.getName()+" xmlns='"+xpp.getNamespace()+"'/>"; - } - - getLogger().debug( "Got data ("+privateKey+"): " + data ); - String s = ""; - s += ""; - s += data; - s += ""; - s += ""; - - session.writeOutputStream( s ); - - skip( xpp ); - /* - while( !( eventType == XmlPullParser.END_TAG - && privateName.equals( xpp.getNamespace()+':'+xpp.getName() ) ) ){ - eventType = xpp.next(); - } - */ - } - - //------------------------------------------------------------------------- - private void set( final IMClientSession session, final Object context ) throws Exception { - - final XmlPullParser xpp = session.getXmlPullParser(); - - //int eventType = xpp.next(); - String privateKey = xpp.getNamespace()+':'+xpp.getName(); - - StringWriter sw = new StringWriter(); - session.roundTripNode(sw); - String data = sw.toString(); - - getLogger().debug( "Got private key "+ privateKey +" => data: " + data ); - if( data != null && data.length() > 0 ){ - m_privateRepository.setData( session.getUser().getName(), privateKey, data ); - } - - - String iqId = ((IQPacket)context).getId(); - - String s = ""; - - - - } - -} - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/oob/QueryImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/oob/QueryImpl.java deleted file mode 100644 index f1fc25259..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/oob/QueryImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.oob; - - - - - -import net.java.dev.openim.DefaultSessionProcessor; - -import net.java.dev.openim.data.jabber.IQPacket; -import net.java.dev.openim.session.IMClientSession; -import net.java.dev.openim.session.IMSession; - -import java.io.StringWriter; - - - - - -/** - * @avalon.component version="1.0" name="iq.oob.Query" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.iq.oob.Query" - * - * @version 1.0 - * @author AlAg - */ -public class QueryImpl extends DefaultSessionProcessor implements Query { - - - //------------------------------------------------------------------------- - public void process( final IMSession session, final Object context ) throws Exception{ - - StringWriter sw = new StringWriter(); - session.roundTripNode(sw); - String data = sw.toString(); - - IQPacket iq = ((IQPacket)context); - iq.setFrom( ((IMClientSession)session).getUser().getJIDAndRessource() ); - iq.addSerializedChild(data); - session.getRouter().route( session, iq ); - } - - -} - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/register/PasswordImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/register/PasswordImpl.java deleted file mode 100644 index d6520f65d..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/register/PasswordImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.register; - - - - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.session.IMClientSession; -import net.java.dev.openim.session.IMSession; - - -/** - * @avalon.component version="1.0" name="iq.register.Password" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.iq.register.Password" - * - * @version 1.0 - * @author AlAg - */ -public class PasswordImpl extends DefaultSessionProcessor implements Password { - - public void processText( final IMSession session, final Object context ) throws Exception { - ((IMClientSession)session).getUser().setPassword( session.getXmlPullParser().getText().trim() ); - } - - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/register/QueryImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/register/QueryImpl.java deleted file mode 100644 index 4edc3d979..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/register/QueryImpl.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.register; - -import java.util.Map; -import java.util.HashMap; - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.IMRouter; -import net.java.dev.openim.ServerParameters; - -import net.java.dev.openim.data.jabber.User; -import net.java.dev.openim.data.UsersManager; -import net.java.dev.openim.data.jabber.IQPacket; -import net.java.dev.openim.data.Account; -import net.java.dev.openim.data.storage.AccountRepositoryHolder; -import net.java.dev.openim.session.IMClientSession; -import net.java.dev.openim.session.IMSession; - - - -/** - * @avalon.component version="1.0" name="iq.register.Query" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.iq.register.Query" - * - * @version 1.0 - * @author AlAg - */ -public class QueryImpl extends DefaultSessionProcessor implements Query { - - private ServerParameters m_serverParameters; - private UsersManager m_usersManager; - private AccountRepositoryHolder m_accountRepository; - /** - * @avalon.dependency type="net.java.dev.openim.ServerParameters:1.0" key="ServerParameters" - * - * @avalon.dependency type="net.java.dev.openim.data.Account:1.0" key="Account" - * @avalon.dependency type="net.java.dev.openim.data.UsersManager:1.0" key="UsersManager" - * @avalon.dependency type="net.java.dev.openim.data.storage.AccountRepositoryHolder:1.0" key="AccountRepositoryHolder" - * - * @avalon.dependency type="net.java.dev.openim.jabber.iq.register.Username:1.0" key="iq.register.Username" - * @avalon.dependency type="net.java.dev.openim.jabber.iq.register.Password:1.0" key="iq.register.Password" - * @avalon.dependency type="net.java.dev.openim.jabber.iq.register.Remove:1.0" key="iq.register.Remove" - */ - public void service(org.apache.avalon.framework.service.ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException { - m_usersManager = (UsersManager)serviceManager.lookup( "UsersManager" ); - m_accountRepository = (AccountRepositoryHolder)serviceManager.lookup( "AccountRepositoryHolder" ); - m_serverParameters = (ServerParameters)serviceManager.lookup( "ServerParameters" ); - super.service( serviceManager ); - } - - //------------------------------------------------------------------------- - public void process( final IMSession session, final Object context ) throws Exception{ - - IMClientSession clientSession = (IMClientSession)session; - - User currentUser = clientSession.getUser(); - User user = m_usersManager.getNewUser(); - clientSession.setUser( user ); - - Map contextMap = new HashMap(); - contextMap.put( CTX_SHOULD_REMOVE, Boolean.FALSE ); - super.process( session, contextMap ); - - String iqId = ((IQPacket)context).getId(); - String type = ((IQPacket)context).getType(); - - // GET - if( IQPacket.TYPE_GET.equals( type ) ){ - String s = "" - + "" - + "Choose a username and password to register with this service." - + "" - + ""; - session.writeOutputStream( s ); - } - - - // SET - else if( IQPacket.TYPE_SET.equals( type ) ){ - - Boolean shouldRemove = (Boolean)contextMap.get( CTX_SHOULD_REMOVE ); - if( shouldRemove.booleanValue() ){ - m_accountRepository.removeAccount( currentUser.getName() ); - String s = ""; - session.writeOutputStream( s ); - clientSession.setUser( null ); - } - - else{ // no remove - Account existingAccount = m_accountRepository.getAccount( user.getName() ); - if( existingAccount == null ){ - setAccount( user ); - - IMRouter router = session.getRouter(); - router.registerSession( clientSession ); - - String s = ""; - session.writeOutputStream( s ); - } - - else if( currentUser != null ){ // account already exists and we are logged - String s = null; - if( currentUser.getName().equals( user.getName() ) ){ - setAccount( user ); - s = ""; - } - else{ - clientSession.setUser( currentUser ); - s = ""; - } - session.writeOutputStream( s ); - } - - - else{ // abnormal sitatuation sending error - String s = ""; - session.writeOutputStream( s ); - } - - } // else shouldremove - } - } - - - private void setAccount( User user ) throws Exception{ - Account account = (Account)m_serviceManager.lookup( "Account" ); - account.setName( user.getName() ); - account.setPassword( user.getPassword() ); - m_accountRepository.setAccount( account ); - } - - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/register/QueryImpl.xconfig b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/register/QueryImpl.xconfig deleted file mode 100644 index eb2d33b2a..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/register/QueryImpl.xconfig +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/register/RemoveImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/register/RemoveImpl.java deleted file mode 100644 index d0d46d1a8..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/register/RemoveImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.register; - -import java.util.Map; - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.session.IMSession; - - -/** - * @avalon.component version="1.0" name="iq.register.Remove" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.iq.register.Remove" - * - * @version 1.0 - * @author AlAg - */ -public class RemoveImpl extends DefaultSessionProcessor implements Remove { - - //------------------------------------------------------------------------- - public void process( final IMSession session, final Object context ) throws Exception{ - ((Map)context).put( Query.CTX_SHOULD_REMOVE, Boolean.FALSE ); - } - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/register/UsernameImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/register/UsernameImpl.java deleted file mode 100644 index 897d14287..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/register/UsernameImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.register; - - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.session.IMClientSession; -import net.java.dev.openim.session.IMSession; - - -/** - * @avalon.component version="1.0" name="iq.register.Password" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.iq.register.Username" - * - * @version 1.0 - * @author AlAg - */ -public class UsernameImpl extends DefaultSessionProcessor implements Username { - - public void processText( final IMSession session, final Object context ) throws Exception { - ((IMClientSession)session).getUser().setName( session.getXmlPullParser().getText().trim() ); - } - - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/roster/GroupImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/roster/GroupImpl.java deleted file mode 100644 index f501aea79..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/roster/GroupImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.roster; - - - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.data.jabber.IMRosterItem; -import net.java.dev.openim.session.IMSession; - -/** - * @avalon.component version="1.0" name="iq.roster.Group" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.iq.roster.Group" - * - * @version 1.0 - * @author AlAg - */ -public class GroupImpl extends DefaultSessionProcessor implements Group { - - public void processText( final IMSession session, final Object context ) throws Exception { - ((IMRosterItem)context).setGroup( session.getXmlPullParser().getText().trim() ); - } - - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/roster/ItemImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/roster/ItemImpl.java deleted file mode 100644 index 08acc3047..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/roster/ItemImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.roster; - - -import org.xmlpull.v1.XmlPullParser; - - -import net.java.dev.openim.data.jabber.IMRosterItem; -import net.java.dev.openim.session.IMSession; -import net.java.dev.openim.DefaultSessionProcessor; - - -/** - * @avalon.component version="1.0" name="iq.roster.Item" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.iq.roster.Item" - * - * @version 1.0 - * @author AlAg - */ -public class ItemImpl extends DefaultSessionProcessor implements Item { - - /** - * @avalon.dependency type="net.java.dev.openim.jabber.iq.roster.Group:1.0" key="iq.roster.Group" - */ - public void service(org.apache.avalon.framework.service.ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException { - super.service( serviceManager ); - } - - - public void process( final IMSession session, final Object context ) throws Exception{ - XmlPullParser xpp = session.getXmlPullParser(); - IMRosterItem rosterItem = (IMRosterItem)context; - rosterItem.setName( xpp.getAttributeValue( "", "name" ) ); - rosterItem.setJID( xpp.getAttributeValue( "", "jid" ) ); - rosterItem.setSubscription( xpp.getAttributeValue( "", "subscription" ) ); - rosterItem.setAsk( xpp.getAttributeValue( "", "ask" ) ); - super.process( session, context ); - } - - - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/roster/ItemImpl.xconfig b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/roster/ItemImpl.xconfig deleted file mode 100644 index 9f6fca623..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/roster/ItemImpl.xconfig +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/roster/QueryImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/roster/QueryImpl.java deleted file mode 100644 index a4ee36b3c..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/roster/QueryImpl.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.roster; - -import java.util.List; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; - - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.data.jabber.IQPacket; -import net.java.dev.openim.data.jabber.IMRosterItem; -import net.java.dev.openim.data.jabber.IMPresence; -import net.java.dev.openim.data.jabber.IMPresenceImpl; -import net.java.dev.openim.session.IMClientSession; -import net.java.dev.openim.session.IMSession; -import net.java.dev.openim.IMPresenceHolder; -import net.java.dev.openim.SubscriptionManager; - - - - - -/** - * @avalon.component version="1.0" name="iq.roster.Query" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.iq.roster.Query" - * - * @version 1.0 - * @author AlAg - */ -public class QueryImpl extends DefaultSessionProcessor implements Query { - - private IMPresenceHolder m_presenceHolder; - private SubscriptionManager m_subscriptionManager; - - /** - * @avalon.dependency type="net.java.dev.openim.jabber.iq.roster.Item:1.0" key="iq.roster.Item" - * @avalon.dependency type="net.java.dev.openim.IMPresenceHolder:1.0" key="IMPresenceHolder" - * @avalon.dependency type="net.java.dev.openim.SubscriptionManager:1.0" key="SubscriptionManager" - */ - public void service(org.apache.avalon.framework.service.ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException { - m_presenceHolder = (IMPresenceHolder)serviceManager.lookup( "IMPresenceHolder" ); - m_subscriptionManager = (SubscriptionManager)serviceManager.lookup( "SubscriptionManager" ); - super.service( serviceManager ); - - } - - //------------------------------------------------------------------------- - - public void process( final IMSession session, final Object context ) throws Exception{ - - String iqId = ((IQPacket)context).getId(); - String type = ((IQPacket)context).getType(); - - getLogger().debug( "Roster query type = " + type + " iqId " + iqId ); - - - if( IQPacket.TYPE_GET.equals( type ) ){ - get( iqId, (IMClientSession)session ); - } - else if( IQPacket.TYPE_SET.equals( type ) ){ - set( iqId, (IMClientSession)session ); - } - - - - } - - - // ------------------------------------------------------------------------ - private void set( String iqId, IMClientSession session ) throws Exception { - - IMRosterItem roster = new IMRosterItem(); - //session.setRosterItem( roster ); - super.process( session, roster ); - - - // shall we remove? - if( IMRosterItem.SUBSCRIPTION_REMOVE.equals( roster.getSubscription() ) ){ - //removeFromRosterList( rosterList, roster.getJID() ); - String rosterAck = ""; - rosterAck += roster.toString(); - rosterAck += ""; - - rosterAck += ""; - - emitToAllRegisteredSession( session, rosterAck ); - - // emit unsubscrib presence to removed buddy - IMPresence presence = new IMPresenceImpl(); - presence.setTo( roster.getJID() ); - presence.setFrom( session.getUser().getJID() ); - presence.setType( IMPresence.TYPE_UNSUBSCRIBE ); - m_subscriptionManager.process( session, presence ); - // emit unsubscrib presence to removed buddy - presence = new IMPresenceImpl(); - presence.setTo( roster.getJID() ); - presence.setFrom( session.getUser().getJID() ); - presence.setType( IMPresence.TYPE_UNSUBSCRIBED ); - m_subscriptionManager.process( session, presence ); - } - - - // we set - else { - getLogger().debug( "Setting roster item " + roster ); - List rosterList = session.getUser().getRosterItemList(); - getLogger().debug( "RosterList for user " + session.getUser().getName() + " => "+ rosterList ); - if( rosterList == null ){ - rosterList = new ArrayList(); - } - - IMRosterItem localroster = getItemFromRosterList( roster.getJID(), rosterList ); - if( localroster == null ){ - roster.setSubscription( IMRosterItem.SUBSCRIPTION_NONE ); - } - else{ - localroster.setName( roster.getName() ); - localroster.setGroup( roster.getGroup() ); - roster = localroster; - } - // build roster ack string - if( roster.getName() == null || roster.getName().length() == 0 ){ - roster.setName( roster.getJID() ); - } - if( roster.getGroup() == null || roster.getGroup().length() == 0 ){ - roster.setGroup( "General" ); - } - - getLogger().debug( "Got roster: " + roster ); - - //roster.setSubscription( IMRosterItem.SUBSCRIPTION_NONE ); - String rosterAck = ""; - rosterAck += roster.toString(); - rosterAck += ""; - - rosterAck += ""; - - String subscription = roster.getSubscription(); - if( IMRosterItem.SUBSCRIPTION_FROM.equals( subscription ) - || IMRosterItem.SUBSCRIPTION_NONE.equals( subscription ) || subscription == null){ - emitToAllRegisteredSession( session, rosterAck ); - } - - // remove/replace prev occurence of the buddy - removeFromRosterList( rosterList, roster.getJID() ); - rosterList.add( roster ); - - getLogger().debug( "Push rosterList for user " + session.getUser().getName() + " => "+ rosterList ); - - session.getUser().setRosterItemList( rosterList ); - - } // else add buddy - - - } // set - - // ------------------------------------------------------------------------ - private void get( String iqId, IMClientSession session ) throws Exception { - - String s = "" - +""; - - List rosterList = session.getUser().getRosterItemList(); - if( rosterList != null ){ - for( int i=0, l=rosterList.size(); i - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/search/QueryImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/search/QueryImpl.java deleted file mode 100644 index 987bd56c7..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/search/QueryImpl.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.search; - - - - - -import java.util.List; - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.ServerParameters; - -import net.java.dev.openim.data.Account; -import net.java.dev.openim.data.jabber.IQPacket; -import net.java.dev.openim.data.storage.AccountRepositoryHolder; -import net.java.dev.openim.session.IMClientSession; -import net.java.dev.openim.session.IMSession; - -import org.apache.avalon.framework.service.ServiceManager; -import org.xmlpull.v1.XmlPullParser; - - - - -/** - * @avalon.component version="1.0" name="iq.search.Query" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.iq.search.Query" - * - * @version 1.0 - * @author AlAg - */ -public class QueryImpl extends DefaultSessionProcessor implements Query { - - private ServerParameters m_serverParameters; - private AccountRepositoryHolder m_accountHolder; - - /** - * @avalon.dependency type="net.java.dev.openim.ServerParameters:1.0" key="ServerParameters" - * @avalon.dependency type="net.java.dev.openim.data.storage.AccountRepositoryHolder:1.0" key="AccountRepositoryHolder" - */ - public void service( ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException { - m_serverParameters = (ServerParameters)serviceManager.lookup( "ServerParameters" ); - m_accountHolder = (AccountRepositoryHolder)serviceManager.lookup( "AccountRepositoryHolder" ); - - } - - //------------------------------------------------------------------------- - public void process( final IMSession session, final Object context ) throws Exception{ - - IMClientSession clientSession = (IMClientSession)session; - String type = ((IQPacket)context).getType(); - - // GET - if( IQPacket.TYPE_GET.equals( type ) ){ - get( clientSession, context ); - } - else if( IQPacket.TYPE_SET.equals( type ) ){ - set( clientSession, context ); - } - } - - - //------------------------------------------------------------------------- - private void get( final IMClientSession session, Object context ) throws Exception { - - - - String iqId = ((IQPacket)context).getId(); - - String s = " - String searchText = xpp.nextText(); - xpp.nextTag(); // - - getLogger().debug( "Search for account name "+searchText ); - // maybe we should proceed to a search via the vcard... - List list = m_accountHolder.getAccountList( searchText ); - - String s = " 0l ){ - s += ""; - - for( int i=0, l=list.size(); i"; - s += ""+account.getName()+""; - s += ""+account.getName()+""; - s += ""+account.getName()+""; - s += ""+account.getName()+'@'+m_serverParameters.getHostName()+""; - s += ""; - } - s += ""; - } - else{ - s += ""; - } - s += ""; - - session.writeOutputStream( s ); - } - -} - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/vcardtemp/VCardImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/vcardtemp/VCardImpl.java deleted file mode 100644 index 2e6b7a072..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/iq/vcardtemp/VCardImpl.java +++ /dev/null @@ -1,185 +0,0 @@ -// serialization is replaced with session roundtriping -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.iq.vcardtemp; - - - - -import net.java.dev.openim.DefaultSessionProcessor; - - -import net.java.dev.openim.data.jabber.IQPacket; -import net.java.dev.openim.data.storage.PrivateRepositoryHolder; - -import org.xmlpull.v1.XmlPullParser; - -import net.java.dev.openim.ServerParameters; -import net.java.dev.openim.session.IMClientSession; -import net.java.dev.openim.session.IMSession; -import net.java.dev.openim.tools.JIDParser; - -import java.io.StringWriter; - -/** - * @avalon.component version="1.0" name="iq.vcardtemp.VCard" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.iq.vcardtemp.VCard" - * - * @version 1.0 - * @author AlAg - */ -public class VCardImpl extends DefaultSessionProcessor implements VCard { - - private ServerParameters m_serverParameters; - private PrivateRepositoryHolder m_privateRepository; - - /** - * @avalon.dependency type="net.java.dev.openim.ServerParameters:1.0" key="ServerParameters" - * @avalon.dependency type="net.java.dev.openim.data.storage.PrivateRepositoryHolder:1.0" key="PrivateRepositoryHolder" - */ - public void service(org.apache.avalon.framework.service.ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException { - m_privateRepository = (PrivateRepositoryHolder)serviceManager.lookup( "PrivateRepositoryHolder" ); - m_serverParameters = (ServerParameters)serviceManager.lookup( "ServerParameters" ); - } - - - //------------------------------------------------------------------------- - - public void process( final IMSession session, final Object context ) throws Exception{ - - String type = ((IQPacket)context).getType(); - - // GET - if( IQPacket.TYPE_GET.equals( type ) ){ - get( session, context ); - } - else if( IQPacket.TYPE_SET.equals( type ) ){ - set( (IMClientSession)session, context ); - } - else if( IQPacket.TYPE_RESULT.equals( type ) ){ - result( session, context ); - } - } - - - //------------------------------------------------------------------------- - private void get( final IMSession session, Object context ) throws Exception { - - - final XmlPullParser xpp = session.getXmlPullParser(); - final String vcardname = xpp.getNamespace()+':'+xpp.getName(); - - String iqId = ((IQPacket)context).getId(); - String to = ((IQPacket)context).getTo(); - String from = ((IQPacket)context).getFrom(); - - if( to == null || to.length() == 0 ){ - to = ((IMClientSession)session).getUser().getJID(); - } - if( from == null || from.length() == 0 ){ - from = ((IMClientSession)session).getUser().getJID(); - } - - - - IQPacket iq = null; - - if( m_serverParameters.getHostNameList().contains( JIDParser.getHostname( to ) ) ){ - String data = m_privateRepository.getData( to, vcardname.toLowerCase() ); - if( data == null ){ - data = ""; - } - - getLogger().debug( "Get "+to+"/"+vcardname+" vcard: " + data ); - - // local request - iq = new IQPacket(); - iq.setFrom( to ); - iq.setTo( from ); - iq.setId( iqId ); - iq.setType( IQPacket.TYPE_RESULT ); - iq.addSerializedChild(data); - } - else{ - iq = new IQPacket(); - iq.setFrom( from ); - iq.setTo( to ); - iq.setId( iqId ); - iq.setType( IQPacket.TYPE_GET ); - iq.addSerializedChild(""); - } - - session.getRouter().route( session, iq ); - - skip( xpp ); - } - - //------------------------------------------------------------------------- - private void set( final IMClientSession session, final Object context ) throws Exception { - - final XmlPullParser xpp = session.getXmlPullParser(); - - String vcardname = xpp.getNamespace()+':'+xpp.getName(); - - StringWriter sw = new StringWriter(); - session.roundTripNode(sw); - String data = sw.toString(); - - getLogger().debug( "Set "+session.getUser().getJID()+"/"+vcardname+" vcard: " + data ); - if( data != null ){ - m_privateRepository.setData( session.getUser().getJID(), vcardname.toLowerCase(), data ); - } - - - String iqId = ((IQPacket)context).getId(); - String to = ((IQPacket)context).getTo(); - String from = ((IQPacket)context).getFrom(); - - String s = ""; - - session.writeOutputStream( s ); - - - } - //------------------------------------------------------------------------- - private void result( final IMSession session, final Object context ) throws Exception { - - - final XmlPullParser xpp = session.getXmlPullParser(); - String to = ((IQPacket)context).getTo(); - - if( m_serverParameters.getHostNameList().contains( JIDParser.getHostname( to ) ) ){ - // local request - String iqId = ((IQPacket)context).getId(); - String from = ((IQPacket)context).getFrom(); - StringWriter sw = new StringWriter(); - session.roundTripNode(sw); - String data = sw.toString(); - - IQPacket iq = new IQPacket(); - iq.setFrom( from ); - iq.setTo( to ); - iq.setId( iqId ); - iq.setType(IQPacket.TYPE_RESULT); - iq.addSerializedChild(data); - session.getRouter().route(session, iq); - } - - else{ - getLogger().warn( "Abnormal result for remote delivery?" ); - skip( xpp ); - } - } -} - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/BodyImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/BodyImpl.java deleted file mode 100644 index 0800dbd93..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/BodyImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server; - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.data.jabber.MessagePacket; -import net.java.dev.openim.session.IMSession; - -/** - * @avalon.component version="1.0" name="server.Body" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.server.Body" - * - * @version 1.0 - * @author AlAg - */ -public class BodyImpl extends DefaultSessionProcessor implements Body { - - public void processText( final IMSession session, final Object context ) throws Exception { - ((MessagePacket)context).setBody( session.getXmlPullParser().getText().trim() ); - } - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/ErrorImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/ErrorImpl.java deleted file mode 100644 index 912512b73..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/ErrorImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server; - - - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.data.jabber.IMPresence; -import net.java.dev.openim.session.IMSession; - -/** - * @avalon.component version="1.0" name="server.Error" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.server.Error" - * - * @version 1.0 - * @author AlAg - */ -public class ErrorImpl extends DefaultSessionProcessor implements Error { - - public void processText( final IMSession session, final Object context ) throws Exception { - String errorCodeStr = session.getXmlPullParser().getAttributeValue( "", "code" ); - if( errorCodeStr != null && errorCodeStr.length()>0 ){ - ((IMPresence)context).setErrorCode( Integer.parseInt( errorCodeStr ) ); - } - ((IMPresence)context).setError( session.getXmlPullParser().getText().trim() ); - } - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/IqImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/IqImpl.java deleted file mode 100644 index fce0557f1..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/IqImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server; - - - -import org.xmlpull.v1.XmlPullParser; - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.data.jabber.IQPacket; -import net.java.dev.openim.session.IMSession; - - -/** - * @avalon.component version="1.0" name="server.Iq" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.server.Iq" - * - * @version 1.0 - * @author AlAg - */ -public class IqImpl extends DefaultSessionProcessor implements Iq { - - /** - * @avalon.dependency type="net.java.dev.openim.jabber.iq.vcardtemp.VCard:1.0" key="iq.vcardtemp.VCard" - */ - public void service(org.apache.avalon.framework.service.ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException { - super.service( serviceManager ); - } - - - - public void process( final IMSession session, final Object context ) throws Exception{ - - XmlPullParser xpp = session.getXmlPullParser(); - - for( int i=0, l=xpp.getAttributeCount(); i - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/MessageImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/MessageImpl.java deleted file mode 100644 index 2f7741179..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/MessageImpl.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server; - - - -import org.xmlpull.v1.XmlPullParser; - -import net.java.dev.openim.DefaultSessionProcessor; - -import net.java.dev.openim.IMRouter; -import net.java.dev.openim.data.jabber.MessagePacket; -import net.java.dev.openim.session.IMClientSession; -import net.java.dev.openim.session.IMSession; - - -/** - * @avalon.component version="1.0" name="server.Message" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.server.Message" - * - * @version 1.0 - * @author AlAg - */ -public class MessageImpl extends DefaultSessionProcessor implements Message { - - /** - * @avalon.dependency type="net.java.dev.openim.jabber.server.Subject:1.0" key="server.Subject" - * @avalon.dependency type="net.java.dev.openim.jabber.server.Body:1.0" key="server.Body" - * @avalon.dependency type="net.java.dev.openim.jabber.server.Thread:1.0" key="server.Thread" - */ - public void service(org.apache.avalon.framework.service.ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException { - super.service( serviceManager ); - } - - //------------------------------------------------------------------------- - - public void process( final IMSession session, final Object context ) throws Exception{ - - XmlPullParser xpp = session.getXmlPullParser(); - - for( int i=0, l=xpp.getAttributeCount(); i" - +"" - +"" - +""; - - - session.writeOutputStream( s ); -*/ - } - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/MessageImpl.xconfig b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/MessageImpl.xconfig deleted file mode 100644 index e9271f114..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/MessageImpl.xconfig +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/PresenceImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/PresenceImpl.java deleted file mode 100644 index 9f3f3e2e8..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/PresenceImpl.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server; - -import java.util.Collection; -import java.util.Iterator; - -import org.apache.avalon.framework.thread.ThreadSafe; - -import org.xmlpull.v1.XmlPullParser; - -import net.java.dev.openim.IMPresenceHolder; -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.data.jabber.IMPresence; -import net.java.dev.openim.data.jabber.IMPresenceImpl; -import net.java.dev.openim.session.IMSession; -import net.java.dev.openim.SubscriptionManager; - - - -/** - * @avalon.component version="1.0" name="server.Presence" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.server.Presence" - * - * @version 1.0 - * @author AlAg - */ -public class PresenceImpl extends DefaultSessionProcessor implements Presence, ThreadSafe { - - - private IMPresenceHolder m_presenceHolder; - private SubscriptionManager m_subscriptionManager; - - /** - * @avalon.dependency type="net.java.dev.openim.jabber.server.Show:1.0" key="server.Show" - * @avalon.dependency type="net.java.dev.openim.jabber.server.Priority:1.0" key="server.Priority" - * @avalon.dependency type="net.java.dev.openim.jabber.server.Status:1.0" key="server.Status" - * @avalon.dependency type="net.java.dev.openim.jabber.server.Error:1.0" key="server.Error" - * - * @avalon.dependency type="net.java.dev.openim.IMPresenceHolder:1.0" key="IMPresenceHolder" - * @avalon.dependency type="net.java.dev.openim.SubscriptionManager:1.0" key="SubscriptionManager" - */ - public void service(org.apache.avalon.framework.service.ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException { - super.service( serviceManager ); - m_presenceHolder = (IMPresenceHolder)serviceManager.lookup( "IMPresenceHolder" ); - m_subscriptionManager = (SubscriptionManager)serviceManager.lookup( "SubscriptionManager" ); - } - - //------------------------------------------------------------------------- - public void process( final IMSession session, final Object context ) throws Exception{ - - XmlPullParser xpp = session.getXmlPullParser(); - String type = xpp.getAttributeValue( "", "type" ); - String to = xpp.getAttributeValue( "", "to" ); - String from = xpp.getAttributeValue( "", "from" ); - - - IMPresence presence = new IMPresenceImpl(); - presence.setType( type ); - presence.setTo( to ); - presence.setFrom( from ); - - - super.process( session, presence ); - - getLogger().debug( "Got presence (to "+to+"): " + presence ); - - if( to == null || to.length() == 0 ){ - // emit presence associated to roster friends? - getLogger().debug( "To is not specified, what should we do?" ); - } - else{ - String presenceType = presence.getType(); - if( IMPresence.TYPE_PROBE.equals( presenceType ) ){ - getLogger().info( "Probed from " + from + " to " + to ); - // check availability - Collection col = m_presenceHolder.getPresence( to ); - if( col != null && !col.isEmpty() ){ - Iterator iter = col.iterator(); - while( iter.hasNext() ){ - IMPresence localPresence = (IMPresence)iter.next(); - localPresence = (IMPresence)localPresence.clone(); - localPresence.setTo( from ); - session.getRouter().route( session, localPresence ); - } - } - // unavailable - else{ - IMPresence localPresence = new IMPresenceImpl(); - localPresence.setType( IMPresence.TYPE_UNAVAILABLE ); - localPresence.setFrom( to ); - localPresence.setTo( from ); - session.getRouter().route( session, localPresence ); - } - - } - - - else{ - IMPresence localPresence = (IMPresence)presence.clone(); - m_subscriptionManager.process( session, localPresence ); - } - - - } // if to null - - - - } - - - - - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/PresenceImpl.xconfig b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/PresenceImpl.xconfig deleted file mode 100644 index 414ddba24..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/PresenceImpl.xconfig +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/PriorityImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/PriorityImpl.java deleted file mode 100644 index 68e2542e5..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/PriorityImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server; - - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.data.jabber.IMPresence; -import net.java.dev.openim.session.IMSession; - - -/** - * @avalon.component version="1.0" name="server.Priority" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.server.Priority" - * - * @version 1.0 - * @author AlAg - */ -public class PriorityImpl extends DefaultSessionProcessor implements Priority { - - public void processText( final IMSession session, final Object context ) throws Exception { - ((IMPresence)context).setPriority( session.getXmlPullParser().getText().trim() ); - } - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/ShowImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/ShowImpl.java deleted file mode 100644 index 7f9e9c6b9..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/ShowImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server; - - - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.data.jabber.IMPresence; -import net.java.dev.openim.session.IMSession; - -/** - * @avalon.component version="1.0" name="server.Show" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.server.Show" - * - * @version 1.0 - * @author AlAg - */ -public class ShowImpl extends DefaultSessionProcessor implements Show { - - public void processText( final IMSession session, final Object context ) throws Exception { - ((IMPresence)context).setShow( session.getXmlPullParser().getText().trim() ); - } - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/StatusImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/StatusImpl.java deleted file mode 100644 index bec209ebb..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/StatusImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server; - - - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.data.jabber.IMPresence; -import net.java.dev.openim.session.IMSession; - -/** - * @avalon.component version="1.0" name="server.Status" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.server.Status" - * - * @version 1.0 - * @author AlAg - */ -public class StatusImpl extends DefaultSessionProcessor implements Status { - - public void processText( final IMSession session, final Object context ) throws Exception { - ((IMPresence)context).setStatus( session.getXmlPullParser().getText().trim() ); - } - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/SubjectImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/SubjectImpl.java deleted file mode 100644 index f80db4978..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/SubjectImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server; - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.data.jabber.MessagePacket; -import net.java.dev.openim.session.IMSession; - -/** - * @avalon.component version="1.0" name="server.Subject" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.server.Subject" - * - * @version 1.0 - * @author AlAg - */ -public class SubjectImpl extends DefaultSessionProcessor implements Subject{ - - public void processText( final IMSession session, final Object context ) throws Exception { - ((MessagePacket)context).setSubject( session.getXmlPullParser().getText().trim() ); - } - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/ThreadImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/ThreadImpl.java deleted file mode 100644 index fdf661318..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/ThreadImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server; - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.data.jabber.MessagePacket; -import net.java.dev.openim.session.IMSession; - -/** - * @avalon.component version="1.0" name="server.Thread" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.jabber.server.Thread" - * - * @version 1.0 - * @author AlAg - */ -public class ThreadImpl extends DefaultSessionProcessor implements Thread { - - - public void processText( final IMSession session, final Object context ) throws Exception { - ((MessagePacket)context).setThread( session.getXmlPullParser().getText().trim() ); - } - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/dialback/ResultImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/dialback/ResultImpl.java deleted file mode 100644 index 5565162be..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/dialback/ResultImpl.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server.dialback; - -import org.apache.avalon.framework.service.ServiceManager; - -import org.xmlpull.v1.XmlPullParser; - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.session.IMServerSession; -import net.java.dev.openim.session.IMSession; -import net.java.dev.openim.session.SessionsManager; - - - - - - -/** - * @avalon.component version="1.0" name="server.dialback.Result" lifestyle="transient" - * @avalon.service type="net.java.dev.openim.jabber.server.dialback.Result" - * - * @version 1.0 - * @author AlAg - */ -public class ResultImpl extends DefaultSessionProcessor implements Result { - - private String m_dialbackValue; - private SessionsManager m_sessionsManager; - /** - * @avalon.dependency type="net.java.dev.openim.session.SessionsManager:1.0" key="SessionsManager" - */ - public void service( ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException { - m_sessionsManager = (SessionsManager)serviceManager.lookup( "SessionsManager" ); - super.service( serviceManager ); - } - //------------------------------------------------------------------------- - public void process( final IMSession session, final Object context ) throws Exception { - - IMServerSession serverSession = (IMServerSession)session; - - XmlPullParser xpp = session.getXmlPullParser(); - //String to = xpp.getAttributeValue( "", "to" ); - String from = xpp.getAttributeValue( "", "from" ); - String type = xpp.getAttributeValue( "", "type" ); - - if( from != null && from.length() > 0 ){ - serverSession.setRemoteHostname( from ); - } - - super.process( session, context ); - - //String id = xpp.getAttributeValue( "", "id" ); - - if( "valid".equals( type ) ){ - getLogger().debug( "Result valid from " + from ); - serverSession.setDialbackValid( true ); - synchronized( session ){ - session.notifyAll(); - } - } - else if( m_dialbackValue != null ){ - getLogger().debug( "Verify " + from + " dialback " + m_dialbackValue ); - if( serverSession.getTwinSession() == null ){ - session.getRouter().getS2SConnectorManager().verifyRemoteHost( from, m_dialbackValue, Long.toString( session.getId() ), serverSession ); - } - } - - } - - - //------------------------------------------------------------------------- - public void processText( final IMSession session, final Object context ) throws Exception { - m_dialbackValue = session.getXmlPullParser().getText().trim(); - } - -} - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/dialback/VerifyImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/dialback/VerifyImpl.java deleted file mode 100644 index 2905b97c0..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/jabber/server/dialback/VerifyImpl.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.jabber.server.dialback; - -import org.apache.avalon.framework.service.ServiceManager; - -import org.xmlpull.v1.XmlPullParser; - - -import net.java.dev.openim.DefaultSessionProcessor; -import net.java.dev.openim.session.IMServerSession; -import net.java.dev.openim.session.IMSession; -import net.java.dev.openim.session.SessionsManager; - - - - - -/** - * @avalon.component version="1.0" name="server.dialback.Verify" lifestyle="transient" - * @avalon.service type="net.java.dev.openim.jabber.server.dialback.Verify" - * - * @version 1.0 - * @author AlAg - */ -public class VerifyImpl extends DefaultSessionProcessor implements Verify { - private SessionsManager m_sessionsManager; - private String m_dialbackValue; - /** - * @avalon.dependency type="net.java.dev.openim.session.SessionsManager:1.0" key="SessionsManager" - */ - public void service( ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException { - m_sessionsManager = (SessionsManager)serviceManager.lookup( "SessionsManager" ); - super.service( serviceManager ); - } - - //------------------------------------------------------------------------- - public void process( final IMSession session, final Object context ) throws Exception { - - IMServerSession serverSession = (IMServerSession)session; - - XmlPullParser xpp = session.getXmlPullParser(); - String type = xpp.getAttributeValue( "", "type" ); - String from = xpp.getAttributeValue( "", "from" ); - String to = xpp.getAttributeValue( "", "to" ); - String id = xpp.getAttributeValue( "", "id" ); - - super.process( session, context ); - - - getLogger().debug( "Got m_dialbackValue " + m_dialbackValue ); - - if( "valid".equals( type ) ){ - String s = ""; - getLogger().debug( "Verfication valid " + s ); - serverSession.getTwinSession().writeOutputStream( s ); - //session.getRouter().validateRemoteHost( session, from, m_dialbackValue ); - } - else if( m_dialbackValue != null ){ - IMServerSession local2remoteSession = session.getRouter().getS2SConnectorManager().getCurrentRemoteSession( from ); - if( local2remoteSession != null && m_dialbackValue.equals( local2remoteSession.getDialbackValue() ) ){ - getLogger().debug( "Verification valid from " + from + " to " + to - +" id " + id - +" dialbackId " + m_dialbackValue ); - //session.getRouter().validateRemoteHost( session, from, m_dialbackValue ); - String s = ""; - session.writeOutputStream( s ); - } - else{ - // should send unvalid? - if( local2remoteSession == null ){ - getLogger().warn( "Abnormal: local2remoteSession null" ); - } - else{ - getLogger().warn( "Unvalid Dialback " + m_dialbackValue + " expected " + local2remoteSession.getDialbackValue() ); - } - - } - } - - - - } - - //------------------------------------------------------------------------- - public void processText( final IMSession session, final Object context ) throws Exception { - m_dialbackValue = session.getXmlPullParser().getText().trim(); - } - -} - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/log/MessageLoggerImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/log/MessageLoggerImpl.java deleted file mode 100644 index ea47dca57..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/log/MessageLoggerImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.log; - -import java.util.Date; - -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; - - -import net.java.dev.openim.data.jabber.MessagePacket; - -import net.java.dev.openim.data.Transitable; - - -/** - * @avalon.component version="1.0" name="MessageLogger" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.log.MessageLogger" - * - * @version 1.0 - * @author AlAg - */ - -public class MessageLoggerImpl -extends AbstractLogEnabled implements MessageLogger, Configurable { - - - //------------------------------------------------------------------------- - public void configure(Configuration configuration) - throws org.apache.avalon.framework.configuration.ConfigurationException { - - } - - //------------------------------------------------------------------------- - public void log( Transitable message ){ - if( getLogger().isInfoEnabled() ){ - if( message instanceof MessagePacket ){ - MessagePacket m = (MessagePacket)message; - getLogger().info( new Date() + " "+m.getFrom() + " " + m.getTo() + " " + m.toString().length() ); - } - } - } -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/log/MessageRecorderImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/log/MessageRecorderImpl.java deleted file mode 100644 index 2309b2377..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/log/MessageRecorderImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.log; - - -import java.util.Date; - -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; - -import net.java.dev.openim.data.jabber.MessagePacket; -import net.java.dev.openim.data.Transitable; - -/** - * @avalon.component version="1.0" name="MessageRecorder" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.log.MessageRecorder" - * - * @version 1.0 - * @author AlAg - */ -public class MessageRecorderImpl -extends AbstractLogEnabled implements MessageRecorder, Configurable { - - //------------------------------------------------------------------------- - public void configure(Configuration configuration) - throws org.apache.avalon.framework.configuration.ConfigurationException { - - } - - - //------------------------------------------------------------------------- - public void record( Transitable message ){ - if( getLogger().isInfoEnabled() ){ - if( message instanceof MessagePacket ){ - getLogger().info( new Date() + " " + message.toString() ); - } - } - } -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/module/jep65/Jep65ModuleImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/module/jep65/Jep65ModuleImpl.java deleted file mode 100644 index 0631775ea..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/module/jep65/Jep65ModuleImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.module.jep65; - - -import net.java.dev.openim.module.ServerModule; -import net.java.dev.openim.module.ServerModuleIdentity; -import net.java.dev.openim.module.ServerModuleFeatures; -import net.java.dev.openim.SessionProcessor; - -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.avalon.framework.service.Serviceable; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; - -import java.util.List; - - - -/** - * @author AlAg - * @author PV - */ -public class Jep65ModuleImpl extends AbstractLogEnabled -implements ServerModule, Serviceable, Configurable { - - - - //------------------------------------------------------------------------- - public void configure(Configuration configuration) throws ConfigurationException { - } - - //------------------------------------------------------------------------- - public void service( ServiceManager serviceManager) throws ServiceException { - } - - //------------------------------------------------------------------------- - public ServerModuleIdentity getId() { - return null; - } - - public ServerModuleFeatures getFeatures() { - return null; - } - - public List getHostNameList() { - return null; - } - - public SessionProcessor getProcessor(String eventName) { - return null; - } - - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/session/AbstractIMSession.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/session/AbstractIMSession.java deleted file mode 100644 index 3023bb791..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/session/AbstractIMSession.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.session; - - - -import java.net.Socket; - -import java.io.*; - -import org.apache.avalon.framework.logger.AbstractLogEnabled; - - -import org.xmlpull.v1.XmlPullParser; -import org.xmlpull.v1.XmlPullParserFactory; -import org.xmlpull.v1.XmlSerializer; -import org.xmlpull.v1.XmlPullParserException; - -import net.java.dev.openim.IMRouter; -import net.java.dev.openim.data.Transitable; -import net.java.dev.openim.jabber.Streams; -import ctu.tools.xml.XMLUtils; -//import net.java.dev.openim.tools.InputStreamDebugger; - -public abstract class AbstractIMSession extends AbstractLogEnabled - implements IMSession -{ - - protected String m_defaultEncoding; - - protected OutputStreamWriter m_outputStreamWriter; - private XmlPullParser m_xpp; - protected Socket m_socket; - private String m_encoding; - private XmlPullParserFactory m_factory; - - - protected IMRouter m_router; - - protected volatile Boolean m_disposed; - - - protected long m_sessionId; - protected static Long m_lastSessionId = new Long( System.currentTimeMillis() ); - - protected Streams m_streams; - - //------------------------------------------------------------------------- - public boolean isClosed(){ - boolean value = false; - if( m_disposed != null ){ - synchronized( m_disposed ){ - value = m_disposed.booleanValue(); - } - } - return value; - } - - /** - * @return An instance of the XmlPullParserFactory class or null when the session is not set up. - */ - public XmlPullParserFactory getXMLParserFactory() { - return m_factory; - } - - //------------------------------------------------------------------------- - public void setup( final Socket socket ) throws Exception { - m_socket = socket; - - m_factory = XmlPullParserFactory.newInstance(); - m_factory.setNamespaceAware( true ); - m_xpp = m_factory.newPullParser(); - - // to be checked -- getInputEncoding should detect encoding (if parser impl do so) - /*m_encoding = m_xpp.getInputEncoding(); - if( m_encoding == null || m_encoding.length() == 0 ){ - m_encoding = m_defaultEncoding; - } - */ - - //DataInputStream is = new DataInputStream( new net.java.dev.openim.tools.InputStreamDebugger( socket.getInputStream(), getLogger() ) ); - DataInputStream is = new DataInputStream(socket.getInputStream() ); - - InputStreamReader inputStreamReader = new InputStreamReader( is, m_defaultEncoding ); - //InputStreamReader inputStreamReader = new InputStreamReader( new net.java.dev.openim.tools.InputStreamDebugger( is, getLogger(), m_sessionId ) , m_defaultEncoding ); - - m_xpp.setInput( inputStreamReader ); - - - DataOutputStream os = new DataOutputStream( socket.getOutputStream() ); - m_outputStreamWriter = new OutputStreamWriter( os, m_defaultEncoding ); - - getLogger().debug( "Starting session: " +m_sessionId + " with encoding " + m_encoding ); - - } - - //------------------------------------------------------------------------- - public final XmlPullParser getXmlPullParser(){ - return m_xpp; - } - - //------------------------------------------------------------------------- - /* - public final OutputStream getOutputStream() { - return m_outputStream; - } - */ - - - //------------------------------------------------------------------------- - public final long getId() { - return m_sessionId; - } - - - //------------------------------------------------------------------------- - - public final String getEncoding() { - return m_defaultEncoding; - } - - //------------------------------------------------------------------------- - public final void writeOutputStream(final String s) throws IOException { - getLogger().debug( "Output ("+m_sessionId+"/"+getConnectionType()+"): "+ s ); - if( s != null && m_outputStreamWriter != null ){ - if( !m_socket.isClosed() && m_socket.isConnected() ){ - synchronized( m_outputStreamWriter ){ - m_outputStreamWriter.write( s ); - if ( m_streams instanceof net.java.dev.openim.jabber.FlashStreams) { - m_outputStreamWriter.write("\0"); - } // end of if () - - m_outputStreamWriter.flush(); - } - } - else{ - throw new IOException( "Output socket closed or not connected" ); - } - } - } - - public final void writeOutputStream(Transitable packet) throws IOException { - writeOutputStream(packet.toString(getEncoding())); - } - - //------------------------------------------------------------------------- - public final IMRouter getRouter() { - return m_router; - } - //------------------------------------------------------------------------- - public final void setRouter( IMRouter router ) { - m_router = router; - } - - public void setStreams(Streams streams) { - m_streams = streams; - } - - - public Streams getStreams() { - return m_streams; - } - //------------------------------------------------------------------------- - public final String toString() { - return "I: "+ getId(); - } - - //------------------------------------------------------------------------- - public final int hashCode(){ - Long sessionL = new Long( m_sessionId ); - return sessionL.hashCode(); - } - //------------------------------------------------------------------------- - // implementer to make PMD happy ,) - public boolean equals( final Object obj ){ - boolean result = false; - if( obj instanceof IMSession ){ - result = obj == this; - } - return result; - } - - /** - * Serializes the current XML node. - * - * @param out Output character stream. - * @throws org.xmlpull.v1.XmlPullParserException - * @throws java.io.IOException - */ - public void roundTripNode(Writer out) throws XmlPullParserException, java.io.IOException - { - XmlSerializer serializer = getXMLParserFactory().newSerializer(); - serializer.setOutput(out); - - XMLUtils.serialize(getXmlPullParser(), serializer, true); - } -} - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/session/IMClientSessionImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/session/IMClientSessionImpl.java deleted file mode 100644 index 0ea1cce49..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/session/IMClientSessionImpl.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.session; - - - - -import java.util.List; - - - -import org.apache.avalon.framework.service.Serviceable; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.activity.Initializable; - - -import net.java.dev.openim.ServerParameters; -import net.java.dev.openim.IMPresenceHolder; -import net.java.dev.openim.data.UsersManager; -import net.java.dev.openim.data.jabber.User; -import net.java.dev.openim.data.jabber.IMPresence; -import net.java.dev.openim.data.jabber.IMPresenceImpl; -import net.java.dev.openim.data.jabber.IMRosterItem; - - -//import net.java.dev.openim.tools.InputStreamDebugger; - -/** - * - * @avalon.component version="1.0" name="IMClientSession" lifestyle="transient" - * @avalon.service type="net.java.dev.openim.session.IMClientSession" - * - * @version 1.0 - * @author AlAg - * @author PV - */ -public class IMClientSessionImpl extends AbstractIMSession - implements IMClientSession, Initializable, Serviceable, Configurable -{ - - private ServerParameters m_serverParameters; - private ServiceManager m_serviceManager; - private Configuration m_configuration; - private UsersManager m_usersManager; - - private User m_user; - private IMPresence m_presence; - private IMPresenceHolder m_presenceHolder; - - - //------------------------------------------------------------------------- - public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException { - m_configuration = configuration; - m_defaultEncoding = configuration.getChild( "default-encoding" ).getValue( "UTF-8" ); - } - - //------------------------------------------------------------------------- - - - /** - * @avalon.dependency type="net.java.dev.openim.ServerParameters" key="ServerParameters" - * @avalon.dependency type="net.java.dev.openim.data.UsersManager" key="UsersManager" - * @avalon.dependency type="net.java.dev.openim.IMPresenceHolder" key="IMPresenceHolder" - */ - public void service( ServiceManager serviceManager ) throws org.apache.avalon.framework.service.ServiceException { - m_serviceManager = serviceManager; - m_usersManager = (UsersManager)m_serviceManager.lookup( "UsersManager" ); - m_presenceHolder = (IMPresenceHolder)serviceManager.lookup( "IMPresenceHolder" ); - m_serverParameters = (ServerParameters)serviceManager.lookup( "ServerParameters" ); - } - - - public void initialize() throws java.lang.Exception { - m_disposed = new Boolean( false ); - synchronized( m_lastSessionId ){ - m_sessionId = m_lastSessionId.longValue(); - m_lastSessionId = new Long( m_sessionId + 1 ); - } - } - - //------------------------------------------------------------------------- - public void close() { - - getLogger().debug( "Closing session id " + getId() ); - synchronized( m_disposed ){ - - try{ - // set disconnected to all roster friend - if( m_user != null && getConnectionType() == IMSession.C2S_CONNECTION ){ - IMPresence presence = m_presenceHolder.removePresence( m_user.getJIDAndRessource() ); - getLogger().debug( "Remove presence jid " + m_user.getJIDAndRessource() ); - - // emit unavailaible to all user - presence = new IMPresenceImpl(); - presence.setFrom( m_user.getJIDAndRessource() ); - presence.setType( IMPresence.TYPE_UNAVAILABLE ); - presence.setStatus( "Disconnected" ); - List rosterList = m_user.getRosterItemList(); - if( rosterList != null ){ - for( int i=0, l=rosterList.size(); i" ); - } else { - - writeOutputStream( "" ); - } // end of else - - } catch( Exception e ){ - getLogger().warn( "Session dispose failed (stage2): " + e.getMessage() ); - } - - - try{ - getLogger().debug( "Session " + m_sessionId + " closed" ); - - if( m_socket != null && !m_socket.isClosed() ){ - m_socket.close(); - m_outputStreamWriter.close(); - } - } catch( Exception e ){ - getLogger().warn( "Session dispose failed (stage3): " + e.getMessage(), e ); - } - getLogger().debug( "Session " + m_sessionId + " disposed " ); - } - - m_disposed = new Boolean( true ); - - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - public final void setUser(final User user) { - m_user = user; - } - - //------------------------------------------------------------------------- - public final User getUser() { - return m_user; - } - //------------------------------------------------------------------------- - public IMPresence getPresence() { - return m_presence; - } - - public int getPriority() { - int priorityNumber = 0; - try { - priorityNumber = Integer.parseInt(getPresence().getPriority()); - } catch (Exception e) {}; - return priorityNumber; - } - - //------------------------------------------------------------------------- - public void setPresence(IMPresence presence) { - m_presence = presence; - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - public int getConnectionType() { - return C2S_CONNECTION; - } - -} - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/session/IMServerSessionImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/session/IMServerSessionImpl.java deleted file mode 100644 index b58feb756..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/session/IMServerSessionImpl.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.session; - - -import org.apache.avalon.framework.service.Serviceable; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.activity.Initializable; - - -import net.java.dev.openim.ServerParameters; - - -/** - * - * @avalon.component version="1.0" name="IMServerSession" lifestyle="transient" - * @avalon.service type="net.java.dev.openim.session.IMServerSession" - * - * @version 1.0 - * @author AlAg - */ -public class IMServerSessionImpl extends AbstractIMSession -implements IMServerSession, Initializable, Serviceable, Configurable -{ - - private ServerParameters m_serverParameters; - private ServiceManager m_serviceManager; - private Configuration m_configuration; - - private String m_remoteHostname; - - - private volatile boolean m_dialbackValid; - private volatile String m_dialbackValue; - private IMServerSession m_twinSession; - - - //------------------------------------------------------------------------- - public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException { - m_configuration = configuration; - m_defaultEncoding = configuration.getChild( "default-encoding" ).getValue( "UTF-8" ); - } - - //------------------------------------------------------------------------- - - - /** - * @avalon.dependency type="net.java.dev.openim.ServerParameters" key="ServerParameters" - */ - public void service( ServiceManager serviceManager ) throws org.apache.avalon.framework.service.ServiceException { - m_serviceManager = serviceManager; - m_serverParameters = (ServerParameters)serviceManager.lookup( "ServerParameters" ); - } - - - public void initialize() throws java.lang.Exception { - m_dialbackValid = false; - m_disposed = new Boolean( false ); - synchronized( m_lastSessionId ){ - m_sessionId = m_lastSessionId.longValue(); - m_lastSessionId = new Long( m_sessionId + 1 ); - } - } - - //------------------------------------------------------------------------- - public void close() { - getLogger().debug( "Closing session id " + getId() ); - - - synchronized( m_disposed ){ - m_dialbackValid = false; - m_dialbackValue = null; - try{ - if( m_twinSession != null ){ - m_twinSession.setTwinSession( null ); - } - - } catch( Exception e ){ - getLogger().warn( "Session dispose failed (stage1): " + e.getMessage(), e ); - } - - - try{ - writeOutputStream( "" ); - } catch( Exception e ){ - getLogger().warn( "Session dispose failed (stage2): " + e.getMessage() ); - } - - - try{ - getLogger().debug( "Session " + m_sessionId + " closed" ); - - if( m_socket != null && !m_socket.isClosed() ){ - m_socket.close(); - m_outputStreamWriter.close(); - } - } catch( Exception e ){ - getLogger().warn( "Session dispose failed (stage3): " + e.getMessage(), e ); - } - getLogger().debug( "Session " + m_sessionId + " disposed " ); - } // synchro - m_disposed = new Boolean( true ); - } - - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - public boolean getDialbackValid(){ - return m_dialbackValid; - } - //------------------------------------------------------------------------- - public void setDialbackValid( boolean value ){ - int ctype = getConnectionType(); - if( ctype == S2S_R2L_CONNECTION || ctype == S2S_L2R_CONNECTION ){ - m_dialbackValid = value; - } - } - //------------------------------------------------------------------------- - public String getDialbackValue(){ - return m_dialbackValue; - } - - //------------------------------------------------------------------------- - public void setDialbackValue( String dialback ){ - m_dialbackValue = dialback; - } - //------------------------------------------------------------------------- - public IMServerSession getTwinSession(){ - return m_twinSession; - } - //------------------------------------------------------------------------- - public void setTwinSession( IMServerSession session ){ - m_twinSession = session; - } - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - public final String getRemoteHostname() { - return m_remoteHostname; - } - //------------------------------------------------------------------------- - public final void setRemoteHostname(final String remoteHostname) { - m_remoteHostname = remoteHostname; - } - - - //------------------------------------------------------------------------- - public int getConnectionType() { - int type = UNKNOWN_CONNECTION; - - if( m_socket != null ){ - if( m_socket.getLocalPort() == m_serverParameters.getLocalServerPort() - || m_socket.getLocalPort() == m_serverParameters.getLocalSSLServerPort() ){ - type = S2S_R2L_CONNECTION; - } - else if( m_socket.getPort() == m_serverParameters.getRemoteServerPort() ){ - type = S2S_L2R_CONNECTION; - } - } - - return type; - } - - -} - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/session/SessionsManagerImpl.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/session/SessionsManagerImpl.java deleted file mode 100644 index ecf7c178e..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/session/SessionsManagerImpl.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.session; - -import java.util.Map; -import java.util.HashMap; -import java.util.Iterator; - -import org.apache.avalon.framework.service.Serviceable; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.logger.AbstractLogEnabled; - - -/** - * @avalon.component version="1.0" name="SessionsManager" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.session.SessionsManager" - * - * @version 1.0 - * @author AlAg - */ -public class SessionsManagerImpl extends AbstractLogEnabled implements SessionsManager, Serviceable, Initializable { - - - private Map m_sessionSetByHostName; - - private ServiceManager m_serviceManager; - - // We really need this to be able to also shutdown non registered sessions - private HashMap m_activeSessions; - /** - * @avalon.dependency type="net.java.dev.openim.session.IMClientSession:1.0" key="IMClientSession" - * @avalon.dependency type="net.java.dev.openim.session.IMServerSession:1.0" key="IMServerSession" - */ - public void service( ServiceManager serviceManager ) throws org.apache.avalon.framework.service.ServiceException { - m_serviceManager = serviceManager; - } - - public void initialize() throws java.lang.Exception { - m_activeSessions = new HashMap(); - } - - //------------------------------------------------------------------------- - public IMServerSession getNewServerSession() throws Exception { - IMServerSession session = (IMServerSession)m_serviceManager.lookup( "IMServerSession" ); - // Are server session even unregistered? - return session; - } - //------------------------------------------------------------------------- - public IMClientSession getNewClientSession() throws Exception { - IMClientSession session = (IMClientSession)m_serviceManager.lookup( "IMClientSession" ); - synchronized(m_activeSessions) { - m_activeSessions.put(new Long(session.getId()), session); - } - return session; - } - //------------------------------------------------------------------------- - public void release( IMSession session ){ - if( session != null ){ - try{ - if( !session.isClosed() ){ - session.close(); - } - else{ - getLogger().warn( "Session "+ session.getId() +" already diposed" ); - } - } catch( Exception e ){ - getLogger().warn( "Session "+ session.getId() +" release failure " + e.getMessage(), e ); - } - // Remove from sessionsMap - synchronized(m_activeSessions) { - m_activeSessions.remove( new Long( session.getId()) ); - } - } // if - } - - - //------------------------------------------------------------------------- - public void releaseSessions() { - getLogger().debug( "Releasing sessions " ); - // Avoid concurrent mod - Map clonedSessions = (Map)m_activeSessions.clone(); - Iterator it = clonedSessions.values().iterator(); - while ( it.hasNext()) { - IMSession sess = (IMSession)it.next(); - release( sess ); - } // end of while () - } - -} - - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/tools/InputStreamDebugger.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/tools/InputStreamDebugger.java deleted file mode 100644 index bae2dced4..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/tools/InputStreamDebugger.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.tools; - -import java.io.InputStream; -import java.io.IOException; -import org.apache.avalon.framework.logger.Logger; - -/** - * @author AlAg - */ -public class InputStreamDebugger extends InputStream { - - private InputStream m_is; - private Logger m_logger; - private long m_id; - - public InputStreamDebugger( InputStream is, Logger logger, long id ){ - m_is = is; - m_logger = logger; - m_id = id; - } - - public int available() throws IOException{ - return m_is.available(); - } - - public void close() throws IOException{ - m_is.close(); - } - - public void mark(int readlimit){ - m_is.mark( readlimit ); - } - - public boolean markSupported(){ - return m_is.markSupported(); - } - - public int read() throws IOException{ - int b = m_is.read(); - m_logger.info( "Input ("+m_id+"): " + new Character( (char)b ) ); - return b; - } - public int read(byte[] b) throws IOException{ - int i = m_is.read( b ); - if (i != -1 ) { - m_logger.info( "Input ("+m_id+"): " + new String( b, 0, i ) ); - } - return i; - } - - public int read(byte[] b, int off, int len) throws IOException { - int i = m_is.read( b, off, len ); - if ( i != -1) { - m_logger.info( "Input ("+m_id+"): " + new String( b, off, i ) ); - } - - return i; - } - - public void reset() throws IOException { - m_is.reset(); - } - - public long skip( long n ) throws IOException{ - return m_is.skip( n ); - } -} - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/tools/JIDParser.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/tools/JIDParser.java deleted file mode 100644 index 57e2b12e5..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/tools/JIDParser.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.tools; - - -/** - * @author AlAg - * @author PV - */ -public class JIDParser { - - //------------------------------------------------------------------------- - public static final String getJID( final String jidAndRes ) { - return getName( jidAndRes )+'@'+getHostname( jidAndRes ); - } - //------------------------------------------------------------------------- - public static final String getHostname( final String jidAndRes ) { - String hostname = ""; - - int index = jidAndRes.indexOf( '@' ); - if( index > 0 ){ - hostname = jidAndRes.substring( index + 1 ); - index = hostname.indexOf( '/' ); - if( index > 0 ){ - hostname = hostname.substring( 0, index ); - } - hostname = hostname.toLowerCase(); - } - else return jidAndRes; - - return hostname; - } - - //------------------------------------------------------------------------- - public static final String getNameAndRessource( final String jidAndRes ) { - String nameAndRes = null; - - if( jidAndRes != null ){ - int index = jidAndRes.indexOf( '@' ); - if( index > 0 ){ - nameAndRes = jidAndRes.substring( 0, index ).toLowerCase(); - index = jidAndRes.lastIndexOf( '/' ); - if( index > 0 ){ - nameAndRes += jidAndRes.substring( index ); - } - } - } - - return nameAndRes; - } - //------------------------------------------------------------------------- - public static final String getName( final String jidAndRes ) { - String name = jidAndRes; - - if( jidAndRes != null ){ - - int index = jidAndRes.lastIndexOf( '/' ); - if( index > 0 ){ - name = jidAndRes.substring( 0, index ); - } - - index = name.indexOf( '@' ); - if( index > 0 ){ - name = name.substring( 0, index ); - } - - if( name != null ){ - name = name.toLowerCase(); - } - } - - return name; - } - - public static boolean isSameEntity(String jid1, String jid2) { - String name1 = JIDParser.getName(jid1); - String name2 = JIDParser.getName(jid2); - if (!name1.equalsIgnoreCase(name2)) return false; - String hostname1 = JIDParser.getHostname(jid1); - String hostname2 = JIDParser.getHostname(jid2); - if (!hostname1.equalsIgnoreCase(hostname2)) return false; - return true; - } -} - diff --git a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/tools/XMLToString.java b/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/tools/XMLToString.java deleted file mode 100644 index 5827934ff..000000000 --- a/plexus-sandbox/plexus-jabber/server/impl/src/java/net/java/dev/openim/tools/XMLToString.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.tools; - -import org.apache.commons.lang.StringUtils; - -/** - * @author AlAg - */ -public class XMLToString { - - private String m_elementName; - private StringBuffer m_buffer; - private StringBuffer m_innerBuffer; - - public XMLToString( String elementName ){ - m_buffer = new StringBuffer(); - m_buffer.append( '<' ).append( elementName ); - m_elementName = elementName; - } - - public void addAttribut( String name, String value ){ - if( name != null && name.length() > 0 && value != null ){ - m_buffer.append( ' ' ).append( name ).append( "='" ).append( value ).append( "'" ); - } - } - public void addFilledAttribut( String name, String value ){ - if( name != null && name.length() > 0 && value != null && value.length() > 0 ){ - m_buffer.append( ' ' ).append( name ).append( "='" ).append( value ).append( "'" ); - } - } - - public void addTextNode( String text ){ - if( text != null && text.length() > 0 ){ - if( m_innerBuffer == null ){ - m_innerBuffer = new StringBuffer(); - } - m_innerBuffer.append( convert( text ) ); - } - } - - public void addStringElement( String stringElement ){ - if( stringElement != null ){ - if( m_innerBuffer == null ){ - m_innerBuffer = new StringBuffer(); - } - m_innerBuffer.append( stringElement ); - } - } - - public void addElement( XMLToString xmlToString ){ - if( xmlToString != null ){ - if( m_innerBuffer == null ){ - m_innerBuffer = new StringBuffer(); - } - m_innerBuffer.append( xmlToString.toStringBuffer() ); - } - } - - public String toString(){ - return toStringBuffer().toString(); - } - - public StringBuffer toStringBuffer(){ - StringBuffer buffer = new StringBuffer(); - if( m_innerBuffer != null ){ - buffer.append( m_buffer ).append( '>' ).append( m_innerBuffer ).append( "' ); - } - else{ - buffer.append( m_buffer ).append( "/>" ); - } - return buffer; - } - - - // ----------------------------------------------------------------------- - // should be optimized... - private static final String convert( String s ){ - s = StringUtils.replace( s, "&", "&" ); - s = StringUtils.replace( s, "<", "<" ); - s = StringUtils.replace( s, ">", ">" ); - return s; - } - - - -} - diff --git a/plexus-sandbox/plexus-jabber/storage/api/maven.xml b/plexus-sandbox/plexus-jabber/storage/api/maven.xml deleted file mode 100644 index 755f0b241..000000000 --- a/plexus-sandbox/plexus-jabber/storage/api/maven.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/storage/api/project.xml b/plexus-sandbox/plexus-jabber/storage/api/project.xml deleted file mode 100644 index 8c750964f..000000000 --- a/plexus-sandbox/plexus-jabber/storage/api/project.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - openim - openim-storage-api - OpenIM Storage API - net.java.dev.openim - 1.2.2 - - 2003 - OpenIM Storage API - - OpenIM Storage API - - - ${basedir}/../../project.xml - - - - - - avalon-framework - avalon-framework-api - 4.2.0 - - - - - - - alag@users.sf.net - ${basedir}/src/java - ${basedir}/src/test - - - - - - ${basedir}/src/java - - **/*.dtd - **/*.properties - **/*.xinfo - **/*.xtype - **/*.xprofile - **/*.xconfig - **/*.xml - **/*.xservice - - - - ${basedir}/conf - BLOCK-INF - - block.xml - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/storage/api/src/java/net/java/dev/openim/data/storage/DeferrableListRepositoryHolder.java b/plexus-sandbox/plexus-jabber/storage/api/src/java/net/java/dev/openim/data/storage/DeferrableListRepositoryHolder.java deleted file mode 100644 index 60c6f90db..000000000 --- a/plexus-sandbox/plexus-jabber/storage/api/src/java/net/java/dev/openim/data/storage/DeferrableListRepositoryHolder.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data.storage; - - -import java.util.List; - - - - -/* - * @version 1.0 - * - * @author AlAg - */ -public interface DeferrableListRepositoryHolder -{ - public List getDeferrableList( String username ); - - public void setDeferrableList(String username, List rosterList ); -} - - diff --git a/plexus-sandbox/plexus-jabber/storage/api/src/java/net/java/dev/openim/data/storage/PrivateRepositoryHolder.java b/plexus-sandbox/plexus-jabber/storage/api/src/java/net/java/dev/openim/data/storage/PrivateRepositoryHolder.java deleted file mode 100644 index b8be1b0d0..000000000 --- a/plexus-sandbox/plexus-jabber/storage/api/src/java/net/java/dev/openim/data/storage/PrivateRepositoryHolder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data.storage; - -/* - * @version 1.0 - * - * @author AlAg - */ -public interface PrivateRepositoryHolder -{ - public void setData( String username, String key, String data ); - public String getData( String username, String key ); -} - - diff --git a/plexus-sandbox/plexus-jabber/storage/api/src/java/net/java/dev/openim/data/storage/RosterListRepositoryHolder.java b/plexus-sandbox/plexus-jabber/storage/api/src/java/net/java/dev/openim/data/storage/RosterListRepositoryHolder.java deleted file mode 100644 index 6006025cd..000000000 --- a/plexus-sandbox/plexus-jabber/storage/api/src/java/net/java/dev/openim/data/storage/RosterListRepositoryHolder.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data.storage; - - -import java.util.List; - - - - -/* - * @version 1.0 - * - * @author AlAg - */ -public interface RosterListRepositoryHolder -{ - public List getRosterList( String username ); - - public void setRosterList(String username, List rosterList ); -} - - diff --git a/plexus-sandbox/plexus-jabber/storage/impl/conf/block.xml b/plexus-sandbox/plexus-jabber/storage/impl/conf/block.xml deleted file mode 100644 index 948461c5f..000000000 --- a/plexus-sandbox/plexus-jabber/storage/impl/conf/block.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - DeferrableListRepositoryHolder - - - PrivateRepositoryHolder - - - RosterListRepositoryHolder - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/storage/impl/maven.xml b/plexus-sandbox/plexus-jabber/storage/impl/maven.xml deleted file mode 100644 index 755f0b241..000000000 --- a/plexus-sandbox/plexus-jabber/storage/impl/maven.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/storage/impl/project.xml b/plexus-sandbox/plexus-jabber/storage/impl/project.xml deleted file mode 100644 index 78d9ebda2..000000000 --- a/plexus-sandbox/plexus-jabber/storage/impl/project.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - - openim - openim-storage-impl - OpenIM Storage Impl - net.java.dev.openim - 1.2.2 - - 2003 - OpenIM Storage Impl - - OpenIM Storage Impl - - - ${basedir}/../../project.xml - - - - - openim - openim-storage-api - 1.2.2 - - - - - - - commons-lang - commons-lang - 2.0 - - - - commons-io - commons-io - 1.0 - - - - - - - avalon-framework - avalon-framework-api - 4.2.0 - - - - avalon-framework - avalon-framework-impl - 4.2.0 - - - - - xstream - xstream - 1.0.1 - - - - - - - - - - alag@users.sf.net - ${basedir}/src/java - ${basedir}/src/test - - - - - - - ${basedir}/src/java - - **/*.dtd - **/*.properties - **/*.xinfo - **/*.xtype - **/*.xprofile - **/*.xconfig - **/*.xml - **/*.xservice - - - - ${basedir}/conf - BLOCK-INF - - block.xml - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/storage/impl/src/java/net/java/dev/openim/data/storage/DeferrableListRepositoryHolderImpl.java b/plexus-sandbox/plexus-jabber/storage/impl/src/java/net/java/dev/openim/data/storage/DeferrableListRepositoryHolderImpl.java deleted file mode 100644 index 2fb523bde..000000000 --- a/plexus-sandbox/plexus-jabber/storage/impl/src/java/net/java/dev/openim/data/storage/DeferrableListRepositoryHolderImpl.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data.storage; - -import java.io.File; -import java.util.List; - - - -import net.java.dev.openim.tools.XStreamStore; - -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.context.Context; -import org.apache.avalon.framework.context.ContextException; -import org.apache.avalon.framework.context.Contextualizable; - - - -/** - * @avalon.component version="1.0" name="DeferrableListRepositoryHolder" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.data.storage.DeferrableListRepositoryHolder" - * - * @version 1.0 - * @author AlAg - */ -public class DeferrableListRepositoryHolderImpl extends AbstractLogEnabled -implements DeferrableListRepositoryHolder, Contextualizable, Initializable -{ - - private XStreamStore m_repository; - private File m_home; - - - - public void initialize() throws java.lang.Exception { - - if( !m_home.exists() ){ - m_home.mkdirs(); - } - if( !m_home.isDirectory() ){ - getLogger().error( "Abnormal Home Path (should be directory): " + m_home ); - } - - File storeFile = new File( m_home, "deferrable-list.xml"); - m_repository = new XStreamStore( storeFile, getLogger() ); - m_repository.substitute( "net.java.dev.openim.data.jabber.IMMessage", "message" ); - m_repository.load(); - - } - - //-------------------------------------------------------------------------- - /** - * @avalon.entry key="urn:avalon:home" type="java.io.File" - */ - public void contextualize( Context context ) throws ContextException { - m_home = (File) context.get( "urn:avalon:home" ); - } - - - //-------------------------------------------------------------------------- - public List getDeferrableList( String username ) { - List list = null; - try{ - list = (List)m_repository.get( username ); - } catch( Exception e ){ - getLogger().warn( "User " + username + " message list not found"); - } - return list; - } - - //-------------------------------------------------------------------------- - public void setDeferrableList(String username, List deferrableList ) { - if( username != null && deferrableList != null ){ - m_repository.put( username, deferrableList ); - } - } - -} - diff --git a/plexus-sandbox/plexus-jabber/storage/impl/src/java/net/java/dev/openim/data/storage/PrivateRepositoryHolderImpl.java b/plexus-sandbox/plexus-jabber/storage/impl/src/java/net/java/dev/openim/data/storage/PrivateRepositoryHolderImpl.java deleted file mode 100644 index 8e9238593..000000000 --- a/plexus-sandbox/plexus-jabber/storage/impl/src/java/net/java/dev/openim/data/storage/PrivateRepositoryHolderImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data.storage; - - - - - - -import java.io.File; - -import net.java.dev.openim.tools.XStreamStore; - -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.context.Context; -import org.apache.avalon.framework.context.ContextException; -import org.apache.avalon.framework.context.Contextualizable; - - -/** - * @avalon.component version="1.0" name="PrivateRepositoryHolder" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.data.storage.PrivateRepositoryHolder" - * - * @version 1.0 - * @author AlAg - */ -public class PrivateRepositoryHolderImpl extends AbstractLogEnabled -implements PrivateRepositoryHolder, Contextualizable, Initializable -{ - - - private XStreamStore m_repository; - private File m_home; - private File m_storeFile; - - - - public void initialize() throws java.lang.Exception { - - if( !m_home.exists() ){ - m_home.mkdirs(); - } - if( !m_home.isDirectory() ){ - getLogger().error( "Abnormal Home Path (should be directory): " + m_home ); - } - - File storeFile = new File( m_home, "private.xml"); - m_repository = new XStreamStore( storeFile, getLogger() ); - m_repository.load(); - } - - //-------------------------------------------------------------------------- - /** - * @avalon.entry key="urn:avalon:home" type="java.io.File" - */ - public void contextualize( Context context ) throws ContextException { - m_home = (File) context.get( "urn:avalon:home" ); - } - - - - //-------------------------------------------------------------------------- - public String getData( String username, String key ) { - String data = null; - try{ - String repKey = username+"::"+key; - data = (String)m_repository.get( repKey ); - getLogger().debug( "Get key: " + repKey +" => " + data ); - } catch( Exception e ){ - getLogger().debug( "Username " + username + " dont have private for element " + key ); - } - return data; - } - - public void setData(String username, String key, String data) { - String repKey = username+"::"+key; - getLogger().debug( "Put key: " + repKey +" => " + data ); - m_repository.put( repKey , data ); - } - - - - -} - diff --git a/plexus-sandbox/plexus-jabber/storage/impl/src/java/net/java/dev/openim/data/storage/RosterListRepositoryHolderImpl.java b/plexus-sandbox/plexus-jabber/storage/impl/src/java/net/java/dev/openim/data/storage/RosterListRepositoryHolderImpl.java deleted file mode 100644 index d5d4d95d7..000000000 --- a/plexus-sandbox/plexus-jabber/storage/impl/src/java/net/java/dev/openim/data/storage/RosterListRepositoryHolderImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data.storage; - -import java.io.File; -import java.util.List; - - - -import net.java.dev.openim.tools.XStreamStore; - -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.context.Context; -import org.apache.avalon.framework.context.ContextException; -import org.apache.avalon.framework.context.Contextualizable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.Configurable; - - -/** - * @avalon.component version="1.0" name="RosterListRepositoryHolder" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.data.storage.RosterListRepositoryHolder" - * - * @version 1.0 - * @author AlAg - */ -public class RosterListRepositoryHolderImpl extends AbstractLogEnabled - implements RosterListRepositoryHolder, Contextualizable, Initializable,Configurable -{ - - - private XStreamStore m_repository; - private File m_home; - private File m_storeFile; - private String m_encoding; - - //------------------------------------------------------------------------- - public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException { - m_encoding = configuration.getChild( "encoding" ).getValue( "UTF-8" ); - } - - public void initialize() throws java.lang.Exception { - - if( !m_home.exists() ){ - m_home.mkdirs(); - } - if( !m_home.isDirectory() ){ - getLogger().error( "Abnormal Home Path (should be directory): " + m_home ); - } - - File storeFile = new File( m_home, "roster-list.xml"); - m_repository = new XStreamStore( storeFile, getLogger(),m_encoding ); - m_repository.substitute( "net.java.dev.openim.data.jabber.IMRosterItem", "item" ); - m_repository.load(); - } - - //-------------------------------------------------------------------------- - /** - * @avalon.entry key="urn:avalon:home" type="java.io.File" - */ - public void contextualize( Context context ) throws ContextException { - m_home = (File) context.get( "urn:avalon:home" ); - } - - //-------------------------------------------------------------------------- - - public List getRosterList( String username ) { - List list = null; - try{ - list = (List)m_repository.get( username ); - } catch( Exception e ){ - getLogger().debug( "User " + username + " roster list not found"); - } - return list; - } - - - public void setRosterList(String username, List rosterList ) { - if( username != null && rosterList != null ){ - m_repository.put( username, rosterList ); - } - } - -} - diff --git a/plexus-sandbox/plexus-jabber/storage/impl/src/java/net/java/dev/openim/tools/XStreamStore.java b/plexus-sandbox/plexus-jabber/storage/impl/src/java/net/java/dev/openim/tools/XStreamStore.java deleted file mode 100644 index 3ada4886f..000000000 --- a/plexus-sandbox/plexus-jabber/storage/impl/src/java/net/java/dev/openim/tools/XStreamStore.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.tools; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -import org.apache.commons.io.IOUtils; -import org.apache.avalon.framework.logger.Logger; -import org.apache.commons.lang.StringUtils; - -import com.thoughtworks.xstream.XStream; -import com.thoughtworks.xstream.io.xml.DomDriver; - - - - - -public class XStreamStore -{ - public static final String DEFAULT_ENCODING = "UTF-8"; - - private File m_file; - private XStream m_xstream; - private Logger m_logger; - private Map m_map; - - private String m_substituteFrom; - private String m_substituteTo; - private String m_xmlProlog; - - public XStreamStore( File file, Logger logger) { - this(file,logger,DEFAULT_ENCODING); - } - - public XStreamStore( File file, Logger logger,String encoding ){ - m_file = file; - m_logger = logger; - m_xstream = new XStream(new DomDriver()); - String enc = encoding != null ? encoding : DEFAULT_ENCODING; - m_xmlProlog = ""; - } - - - public void load(){ - m_map = loadMap(); - } - // -------------------------------------------------------------------------- - public void alias( String name, Class classz ){ - m_xstream.alias( name, classz ); - } - // -------------------------------------------------------------------------- - public void substitute( String from, String to ){ - m_substituteFrom = from; - m_substituteTo= to; - } - - // -------------------------------------------------------------------------- - public Object get( Object key ){ - Object value = null; - synchronized( m_map ){ - value = m_map.get( key ); - } - return value; - } - - // -------------------------------------------------------------------------- - public Object remove( Object key ){ - Object value = null; - synchronized( m_map ){ - value = m_map.remove( key ); - saveMap( m_map ); - } - return value; - } - - // -------------------------------------------------------------------------- - public void put( Object key, Object value ){ - synchronized( m_map ){ - value = m_map.put( key, value ); - saveMap( m_map ); - } - } - - - - // -------------------------------------------------------------------------- - private Logger getLogger(){ - return m_logger; - } - //-------------------------------------------------------------------------- - //-------------------------------------------------------------------------- - //-------------------------------------------------------------------------- - //-------------------------------------------------------------------------- - private void saveMap( Map map ){ - String xstreamData = m_xstream.toXML( map ); - if( m_substituteFrom != null && m_substituteTo != null ){ - xstreamData = StringUtils.replace( xstreamData, m_substituteFrom, m_substituteTo ); - } - xstreamData = m_xmlProlog+"\n"+xstreamData; - //getLogger().info("saving roster " + xstreamData); - FileOutputStream fos = null; - try{ - fos = new FileOutputStream( m_file ); - fos.write( xstreamData.getBytes() ); - } - catch( IOException e ){ - getLogger().error( e.getMessage(), e ); - } - finally{ - if( fos != null ){ - try{ - fos.close(); - } - catch( IOException e ){ - getLogger().error( e.getMessage() ); - } - } - } - - } - //-------------------------------------------------------------------------- - private Map loadMap(){ - Map map = null; - - if( m_file.exists() ){ - try{ - FileInputStream fis = new FileInputStream( m_file ); - String xmlData = IOUtils.toString( fis ); - fis.close(); - if( m_substituteFrom != null && m_substituteTo != null ){ - xmlData = StringUtils.replace( xmlData, m_substituteTo, m_substituteFrom ); - } - map = (Map)m_xstream.fromXML( xmlData ); - } - catch( Exception e ){ - getLogger().error( e.getMessage(), e ); - } - - } - else{ - getLogger().info( "No " + m_file + " => starting with void store" ); - map = new HashMap(); - } - - return map; - } - - -} - diff --git a/plexus-sandbox/plexus-jabber/users-manager-ldap/impl/conf/block.xml b/plexus-sandbox/plexus-jabber/users-manager-ldap/impl/conf/block.xml deleted file mode 100644 index 50fc3b42f..000000000 --- a/plexus-sandbox/plexus-jabber/users-manager-ldap/impl/conf/block.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - AccountRepositoryHolder - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/users-manager-ldap/impl/maven.xml b/plexus-sandbox/plexus-jabber/users-manager-ldap/impl/maven.xml deleted file mode 100644 index 755f0b241..000000000 --- a/plexus-sandbox/plexus-jabber/users-manager-ldap/impl/maven.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/users-manager-ldap/impl/project.xml b/plexus-sandbox/plexus-jabber/users-manager-ldap/impl/project.xml deleted file mode 100644 index 916e54b86..000000000 --- a/plexus-sandbox/plexus-jabber/users-manager-ldap/impl/project.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - - openim - openim-users-manager-ldap-impl - OpenIM UsersManager LDAP Impl - net.java.dev.openim - 1.3.1 - - 2003 - OpenIM UsersManager LDAP Impl - - OpenIM UsersManager LDAP Impl - - - ${basedir}/../../project.xml - - - - - openim - openim-users-manager-api - 1.3.1 - - - - - - - avalon-framework - avalon-framework-api - 4.2.0 - - - avalon-framework - avalon-framework-impl - 4.2.0 - - - - - - - - alag@users.sf.net - ${basedir}/src/java - ${basedir}/src/test - - - - - - - ${basedir}/src/java - - **/*.dtd - **/*.properties - **/*.xinfo - **/*.xtype - **/*.xprofile - **/*.xconfig - **/*.xml - **/*.xservice - - - - ${basedir}/conf - BLOCK-INF - - block.xml - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/users-manager-ldap/impl/src/java/net/java/dev/openim/data/AccountImpl.java b/plexus-sandbox/plexus-jabber/users-manager-ldap/impl/src/java/net/java/dev/openim/data/AccountImpl.java deleted file mode 100644 index 3e3c00980..000000000 --- a/plexus-sandbox/plexus-jabber/users-manager-ldap/impl/src/java/net/java/dev/openim/data/AccountImpl.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data; - - - - -/** - * @avalon.component version="1.0" name="Account" lifestyle="transient" - * @avalon.service type="net.java.dev.openim.data.Account" - * - * @author AlAg - */ -public class AccountImpl implements java.io.Serializable, Account { - - private String m_name; - private String m_password; - - public final void setName( String name ){ - m_name = name; - } - public final String getName(){ - return m_name; - } - - - public final void setPassword( String password ){ - m_password = password; - } - public final String getPassword(){ - return m_password; - } - - // ----------------------------------------------------------------------- - public boolean isAuthenticationTypeSupported( int type ){ - boolean isSupported = false; - if( type == Account.AUTH_TYPE_PLAIN ){ - isSupported = true; - } - return isSupported; - } - - // ----------------------------------------------------------------------- - public final void authenticate( int type, String value, String sessionId ) throws Exception { - if( type == AUTH_TYPE_PLAIN ){ - if( !m_password.equals( value ) ){ - throw new Exception( "Unvalid plain password" ); - } - } - else if( type == AUTH_TYPE_DIGEST ){ - throw new Exception( "Digest Authenticate not supported"); - } - } - - - // ----------------------------------------------------------------------- - public String toString(){ - String s = "Username: " + m_name + " password: " + m_password; - return s; - } - - - -} - diff --git a/plexus-sandbox/plexus-jabber/users-manager-ldap/impl/src/java/net/java/dev/openim/data/storage/AccountRepositoryHolderImpl.java b/plexus-sandbox/plexus-jabber/users-manager-ldap/impl/src/java/net/java/dev/openim/data/storage/AccountRepositoryHolderImpl.java deleted file mode 100644 index beaceca83..000000000 --- a/plexus-sandbox/plexus-jabber/users-manager-ldap/impl/src/java/net/java/dev/openim/data/storage/AccountRepositoryHolderImpl.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data.storage; - - -import java.util.Hashtable; -import java.util.List; - - -import javax.naming.Context; -import javax.naming.NamingEnumeration; -import javax.naming.directory.Attribute; -import javax.naming.directory.Attributes; -import javax.naming.directory.BasicAttributes; -import javax.naming.directory.DirContext; -import javax.naming.directory.InitialDirContext; -import javax.naming.directory.SearchResult; - - -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.thread.ThreadSafe; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.service.Serviceable; - - -import net.java.dev.openim.data.Account; -import net.java.dev.openim.data.AccountImpl; - -/** - * @avalon.component version="1.0" name="AccountRepositoryHolder" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.data.storage.AccountRepositoryHolder" - * - * @version 1.0 - * @author AlAg - */ -public class AccountRepositoryHolderImpl extends AbstractLogEnabled -implements AccountRepositoryHolder, AccountRepositoryHolderMBean, Serviceable, -Configurable, Initializable, ThreadSafe -{ - - private ServiceManager m_serviceManager; - - private DirContext m_dirContext; - private Hashtable m_confEnv; - private String m_lookupDir; - private String m_attribSearch; - private String m_ldapPasswordAttribute; - - //-------------------------------------------------------------------------- - public void configure( Configuration configuration ) throws ConfigurationException { - m_confEnv = new Hashtable(); - - String initCtxFactory = configuration.getChild( "initial-context-factory" ).getValue(); - if( initCtxFactory != null ){ - m_confEnv.put( Context.INITIAL_CONTEXT_FACTORY, initCtxFactory ); - } - - String securityAuthentication = configuration.getChild( "security-authentication" ).getValue("simple"); - m_confEnv.put( Context.SECURITY_AUTHENTICATION, securityAuthentication ); - - String providerUrl = configuration.getChild( "provider-url" ).getValue( null ); - if( providerUrl != null ){ - m_confEnv.put( Context.PROVIDER_URL, providerUrl ); - } - - - String securityPrincipal = configuration.getChild( "security-principal" ).getValue( null ); - String securityCredentials = configuration.getChild( "security-credentials" ).getValue( null ); - if( securityPrincipal != null && securityCredentials != null ){ - m_confEnv.put( Context.SECURITY_PRINCIPAL, securityPrincipal); - m_confEnv.put( Context.SECURITY_CREDENTIALS, securityCredentials ); - } - - m_lookupDir = configuration.getChild( "ldap-lookup-directory" ).getValue(); - m_attribSearch = configuration.getChild( "ldap-attribute-search" ).getValue(); - m_ldapPasswordAttribute = configuration.getChild( "ldap-password-attribute" ).getValue(); - } - - //-------------------------------------------------------------------------- - public void initialize() throws java.lang.Exception { - m_dirContext = new InitialDirContext( m_confEnv ); - } - - //-------------------------------------------------------------------------- - /** - * @avalon.dependency type="net.java.dev.openim.data.Account:1.0" key="Account" - * @avalon.dependency type="org.apache.avalon.cornerstone.services.store.Store:1.0" key="Store" - */ - public void service(ServiceManager serviceManager) throws ServiceException { - m_serviceManager = serviceManager; - } - - //-------------------------------------------------------------------------- - public Account getAccount( String username ) { - getLogger().debug( "Get username "+username+" account" ); - Account account = null; - try{ - DirContext context = (DirContext)m_dirContext.lookup( m_lookupDir ); - NamingEnumeration ne = context.search( "", new BasicAttributes( m_attribSearch, username ) ); - SearchResult sr = (SearchResult)ne.nextElement(); - Attributes attr = sr.getAttributes(); - Attribute passwordAttrib = attr.get( m_ldapPasswordAttribute ); - account = new AccountImpl(); - account.setName( username ); - - Object value = passwordAttrib.get(); - if (value instanceof byte[]){ - account.setPassword( new String((byte[]) value) ); - } - else{ - account.setPassword( value.toString() ); - } - - } catch( Exception e ){ - getLogger().debug( e.getMessage(), e ); - getLogger().warn( "User " + username + " not found"); - } - return account; - } - - //-------------------------------------------------------------------------- - public List getAccountList( String searchPattern ){ - throw new UnsupportedOperationException("Not implemented"); - } - //-------------------------------------------------------------------------- - public Account removeAccount( String username ) { - throw new UnsupportedOperationException("Not implemented (LDAP read only access)"); - } - - //-------------------------------------------------------------------------- - public void setAccount(Account account) { - throw new UnsupportedOperationException("Not implemented (LDAP read only access)"); - } - - //-------------------------------------------------------------------------- - public void setAccount(String accountStr) { - throw new UnsupportedOperationException("Not implemented (LDAP read only access)"); - } - - //-------------------------------------------------------------------------- - public List getAccountList() { - throw new UnsupportedOperationException("Not implemented"); - } - -} - diff --git a/plexus-sandbox/plexus-jabber/users-manager/api/maven.xml b/plexus-sandbox/plexus-jabber/users-manager/api/maven.xml deleted file mode 100644 index 755f0b241..000000000 --- a/plexus-sandbox/plexus-jabber/users-manager/api/maven.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/users-manager/api/project.xml b/plexus-sandbox/plexus-jabber/users-manager/api/project.xml deleted file mode 100644 index 0616002db..000000000 --- a/plexus-sandbox/plexus-jabber/users-manager/api/project.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - openim - openim-users-manager-api - OpenIM UsersManager API - net.java.dev.openim - 1.3.1 - - 2003 - OpenIM UsersManager API - - OpenIM UsersManager API - - - ${basedir}/../../project.xml - - - - - - - - - - avalon-framework - avalon-framework-api - 4.2.0 - - - - - - - - - alag@users.sf.net - ${basedir}/src/java - ${basedir}/src/test - - - - - - ${basedir}/src/java - - **/*.dtd - **/*.properties - **/*.xinfo - **/*.xtype - **/*.xprofile - **/*.xconfig - **/*.xml - **/*.xservice - - - - ${basedir}/conf - BLOCK-INF - - block.xml - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/users-manager/api/src/java/net/java/dev/openim/data/Account.java b/plexus-sandbox/plexus-jabber/users-manager/api/src/java/net/java/dev/openim/data/Account.java deleted file mode 100644 index fb0873442..000000000 --- a/plexus-sandbox/plexus-jabber/users-manager/api/src/java/net/java/dev/openim/data/Account.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data; - -/** - * @version 1.0 - * - * @author AlAg - */ -public interface Account { - - public static final int AUTH_TYPE_PLAIN = 1; - public static final int AUTH_TYPE_DIGEST = 2; - - public void setName( String name ); - public String getName(); - - - public void setPassword( String password ); - public String getPassword(); - - - public boolean isAuthenticationTypeSupported( int type ); - public void authenticate( int type, String value, String sessionId ) throws Exception; - - -} - diff --git a/plexus-sandbox/plexus-jabber/users-manager/api/src/java/net/java/dev/openim/data/storage/AccountRepositoryHolder.java b/plexus-sandbox/plexus-jabber/users-manager/api/src/java/net/java/dev/openim/data/storage/AccountRepositoryHolder.java deleted file mode 100644 index bd2086d1e..000000000 --- a/plexus-sandbox/plexus-jabber/users-manager/api/src/java/net/java/dev/openim/data/storage/AccountRepositoryHolder.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data.storage; - - - -import java.util.List; - -import net.java.dev.openim.data.Account; - - - -/* - * @version 1.0 - * - * @author AlAg - */ -public interface AccountRepositoryHolder -{ - public void setAccount( Account account ); - public Account getAccount( String username ); - public List getAccountList( String searchPattern ); - public Account removeAccount( String username ); -} - - diff --git a/plexus-sandbox/plexus-jabber/users-manager/api/src/java/net/java/dev/openim/data/storage/AccountRepositoryHolderMBean.java b/plexus-sandbox/plexus-jabber/users-manager/api/src/java/net/java/dev/openim/data/storage/AccountRepositoryHolderMBean.java deleted file mode 100644 index 75c409907..000000000 --- a/plexus-sandbox/plexus-jabber/users-manager/api/src/java/net/java/dev/openim/data/storage/AccountRepositoryHolderMBean.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ -package net.java.dev.openim.data.storage; - -import java.util.List; - - -/* - * @phoenix:mx-topic name="AccountRepositoryHolder" - */ -public interface AccountRepositoryHolderMBean -{ - /* - * @phoenix:@phoenix:mx-attribute - * @phoenix:mx-description Create a new account (format name/password) - * @phoenix:mx-isWriteable true - */ - public void setAccount(String accountStr); - /* - * @phoenix:@phoenix:mx-attribute - * @phoenix:mx-isWriteable false - */ - public List getAccountList(); - -} \ No newline at end of file diff --git a/plexus-sandbox/plexus-jabber/users-manager/impl/conf/block.xml b/plexus-sandbox/plexus-jabber/users-manager/impl/conf/block.xml deleted file mode 100644 index bf4fd3187..000000000 --- a/plexus-sandbox/plexus-jabber/users-manager/impl/conf/block.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - AccountRepositoryHolder - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/users-manager/impl/maven.xml b/plexus-sandbox/plexus-jabber/users-manager/impl/maven.xml deleted file mode 100644 index 755f0b241..000000000 --- a/plexus-sandbox/plexus-jabber/users-manager/impl/maven.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/users-manager/impl/project.xml b/plexus-sandbox/plexus-jabber/users-manager/impl/project.xml deleted file mode 100644 index 101454929..000000000 --- a/plexus-sandbox/plexus-jabber/users-manager/impl/project.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - openim - openim-users-manager-impl - OpenIM UsersManager Impl - net.java.dev.openim - 1.3.1 - - 2003 - OpenIM UsersManager Impl - - OpenIM UsersManager Impl - - - ${basedir}/../../project.xml - - - - - openim - openim-users-manager-api - 1.3.1 - - - - - - commons-io - commons-io - 1.0 - - - - - - - avalon-framework - avalon-framework-api - 4.2.0 - - - avalon-framework - avalon-framework-impl - 4.2.0 - - - - - xstream - xstream - 1.0.1 - - - - - - - - - - alag@users.sf.net - ${basedir}/src/java - ${basedir}/src/test - - - - - - - ${basedir}/src/java - - **/*.dtd - **/*.properties - **/*.xinfo - **/*.xtype - **/*.xprofile - **/*.xconfig - **/*.xml - **/*.xservice - - - - ${basedir}/conf - BLOCK-INF - - block.xml - - - - - - - diff --git a/plexus-sandbox/plexus-jabber/users-manager/impl/src/java/net/java/dev/openim/data/AccountImpl.java b/plexus-sandbox/plexus-jabber/users-manager/impl/src/java/net/java/dev/openim/data/AccountImpl.java deleted file mode 100644 index 810a6161e..000000000 --- a/plexus-sandbox/plexus-jabber/users-manager/impl/src/java/net/java/dev/openim/data/AccountImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data; - -import java.io.Serializable; - -import net.java.dev.openim.tools.Digester; - -/** - * @avalon.component version="1.0" name="Account" lifestyle="transient" - * @avalon.service type="net.java.dev.openim.data.Account" - * - * @author AlAg - */ -public class AccountImpl implements Serializable, Account { - - private String m_name; - private String m_password; - - public final void setName( String name ){ - m_name = name; - } - public final String getName(){ - return m_name; - } - - - public final void setPassword( String password ){ - m_password = password; - } - public final String getPassword(){ - return m_password; - } - - // ----------------------------------------------------------------------- - public boolean isAuthenticationTypeSupported( int type ){ - boolean isSupported = false; - if( type == Account.AUTH_TYPE_DIGEST || type == Account.AUTH_TYPE_PLAIN ){ - isSupported = true; - } - return isSupported; - } - - // ----------------------------------------------------------------------- - public final void authenticate( int type, String value, String sessionId ) throws Exception { - if( type == AUTH_TYPE_PLAIN ){ - if( !m_password.equals( value ) ){ - throw new Exception( "Unvalid plain password" ); - } - - } - else if( type == AUTH_TYPE_DIGEST ){ - String digest = Digester.digest( sessionId + m_password ); - - if( !digest.equals( value ) ){ - throw new Exception( "Unvalid digest password" + " \nGot : " + value + "\nExpect: " + digest ); - } - - } - } - - - // ----------------------------------------------------------------------- - public String toString(){ - String s = "Username: " + m_name + " password: " + m_password; - return s; - } - - - -} - diff --git a/plexus-sandbox/plexus-jabber/users-manager/impl/src/java/net/java/dev/openim/data/storage/AccountRepositoryHolderImpl.java b/plexus-sandbox/plexus-jabber/users-manager/impl/src/java/net/java/dev/openim/data/storage/AccountRepositoryHolderImpl.java deleted file mode 100644 index 0a859c1f0..000000000 --- a/plexus-sandbox/plexus-jabber/users-manager/impl/src/java/net/java/dev/openim/data/storage/AccountRepositoryHolderImpl.java +++ /dev/null @@ -1,268 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.data.storage; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.Map; - - -import org.apache.commons.io.IOUtils; -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.thread.ThreadSafe; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.context.Context; -import org.apache.avalon.framework.context.ContextException; -import org.apache.avalon.framework.context.Contextualizable; -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.service.Serviceable; - -import com.thoughtworks.xstream.XStream; -import com.thoughtworks.xstream.io.xml.DomDriver; - - -import net.java.dev.openim.data.Account; -import net.java.dev.openim.data.AccountImpl; - -/** - * @avalon.component version="1.0" name="AccountRepositoryHolder" lifestyle="singleton" - * @avalon.service type="net.java.dev.openim.data.storage.AccountRepositoryHolder" - * - * @version 1.0 - * @author AlAg - */ -public class AccountRepositoryHolderImpl extends AbstractLogEnabled -implements AccountRepositoryHolder, AccountRepositoryHolderMBean, Serviceable, Contextualizable, -Configurable, Initializable, ThreadSafe -{ - - -// private ServiceManager m_serviceManager; - - private Map m_repository; - - private XStream m_xstream; - private boolean m_regexpSearch; - - private File m_home; - private File m_storeFile; - - //-------------------------------------------------------------------------- - public void configure( Configuration configuration ) throws ConfigurationException { - m_regexpSearch = configuration.getChild( "regexp-search").getValueAsBoolean( false ); - - if( !m_home.exists() ){ - m_home.mkdirs(); - } - if( !m_home.isDirectory() ){ - getLogger().error( "Abnormal Home Path (should be directory): " + m_home ); - } - - m_storeFile = new File( m_home, "accounts.xml"); - } - - //-------------------------------------------------------------------------- - /** - * @avalon.entry key="urn:avalon:home" type="java.io.File" - */ - public void contextualize( Context context ) throws ContextException { - m_home = (File) context.get( "urn:avalon:home" ); - } - - //-------------------------------------------------------------------------- - public void initialize() throws java.lang.Exception { - m_xstream = new XStream(new DomDriver()); - m_xstream.alias( "account", AccountImpl.class ); - m_repository = loadMap( m_storeFile ); - } - - - /** - * @avalon.dependency type="net.java.dev.openim.data.Account:1.0" key="Account" - */ - public void service(ServiceManager serviceManager) throws ServiceException { -// m_serviceManager = serviceManager; - } - - //-------------------------------------------------------------------------- - public Account getAccount( String username ) { - Account account = null; - try{ - if( username != null && username.length() > 0 ){ - synchronized( m_repository ){ - if( m_repository.containsKey( username ) ){ - account = (AccountImpl)m_repository.get( username ); - } - } - } - } - - catch( Exception e ){ - getLogger().error( e.getMessage(), e ); - account = null; - } - - if( account == null ){ - getLogger().warn( "User " + username + " not found"); - } - return account; - } - //-------------------------------------------------------------------------- - public List getAccountList( String searchPattern ){ - List list = new ArrayList(); - if( !m_regexpSearch ){ - searchPattern = searchPattern.replaceAll( "\\*", ".*" ); - } - - try{ - synchronized( m_repository ){ - Iterator iter = m_repository.values().iterator(); - while ( iter.hasNext() ){ - String name = iter.next().toString(); - if( name.matches( searchPattern ) ){ - Account account = (Account)m_repository.get( name ); - list.add( account ); - } - } - } - } catch( Exception e ){ - getLogger().warn( e.getMessage(), e ); - } - - return list; - } - //-------------------------------------------------------------------------- - public Account removeAccount( String username ) { - Account account = null; - synchronized( m_repository ){ - account = (Account)m_repository.remove( username ); - if( account != null ){ - saveMap( m_storeFile, m_repository ); - } - else{ - getLogger().warn( "User " + username + " not found"); - } - } - - return account; - } - - //-------------------------------------------------------------------------- - public void setAccount(Account userAccount) { - AccountImpl account = new AccountImpl(); - - account.setName( userAccount.getName() ); - account.setPassword( userAccount.getPassword() ); - - getLogger().debug( "Setting account in repository " + account ); - synchronized( m_repository ){ - m_repository.put( account.getName(), account ); - saveMap( m_storeFile, m_repository ); - } - } - - //-------------------------------------------------------------------------- - public void setAccount(String accountStr) { - try{ - Account account = new AccountImpl(); - int index = accountStr.indexOf( '/' ); - if( index < 0 ){ - account.setName( accountStr ); - account.setPassword( accountStr ); - } - else{ - account.setName( accountStr.substring( 0, index ) ); - account.setPassword( accountStr.substring( index+1 ) ); - } - setAccount( account ); - } catch( Exception e ){ - getLogger().warn( e.getMessage(), e ); - } - } - - //-------------------------------------------------------------------------- - public List getAccountList() { - List list = new ArrayList(); - synchronized( m_repository ){ - Iterator iter = m_repository.values().iterator(); - while( iter.hasNext() ){ - Object o = iter.next(); - getLogger().debug( "Item " + o + " account " + getAccount( o.toString() ) ); - list.add( o ); - } - } - return list; - } - - - //-------------------------------------------------------------------------- - //-------------------------------------------------------------------------- - //-------------------------------------------------------------------------- - //-------------------------------------------------------------------------- - private void saveMap( File file, Map map ){ - String xstreamData = m_xstream.toXML( map ); - FileOutputStream fos = null; - try{ - fos = new FileOutputStream( file ); - fos.write( xstreamData.getBytes() ); - } - catch( IOException e ){ - getLogger().error( e.getMessage(), e ); - } - finally{ - if( fos != null ){ - try{ - fos.close(); - } - catch( IOException e ){ - getLogger().error( e.getMessage() ); - } - } - } - - } - //-------------------------------------------------------------------------- - private Map loadMap( File file ){ - Map map = null; - - if( file.exists() ){ - try{ - FileInputStream fis = new FileInputStream( file ); - String xmlData = IOUtils.toString( fis ); - fis.close(); - map = (Map)m_xstream.fromXML( xmlData ); - } - catch( Exception e ){ - getLogger().error( e.getMessage(), e ); - } - - } - else{ - getLogger().info( "No " + file + " => starting with void user list" ); - map = new HashMap(); - } - - return map; - } - - -} - diff --git a/plexus-sandbox/plexus-jabber/users-manager/impl/src/java/net/java/dev/openim/tools/Digester.java b/plexus-sandbox/plexus-jabber/users-manager/impl/src/java/net/java/dev/openim/tools/Digester.java deleted file mode 100644 index f19fa5440..000000000 --- a/plexus-sandbox/plexus-jabber/users-manager/impl/src/java/net/java/dev/openim/tools/Digester.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * BSD License http://open-im.net/bsd-license.html - * Copyright (c) 2003, OpenIM Project http://open-im.net - * All rights reserved. - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the OpenIM project. For more - * information on the OpenIM project, please see - * http://open-im.net/ - */ -package net.java.dev.openim.tools; - -import java.security.MessageDigest; - -/** - * @author AlAg - */ -public class Digester { - - - // ----------------------------------------------------------------------- - public static final String digest( long value ){ - return digest( Long.toString( value ) ); - } - // ----------------------------------------------------------------------- - public static final String digest( String value ) { - - String digest = null; - try{ - MessageDigest messageDigest = MessageDigest.getInstance("SHA1"); - digest = bytesToHex( messageDigest.digest( value.getBytes() ) ); - - } catch( Exception e ){ - e.printStackTrace(); - } - - return digest; - } - - - // =============================================================================== - /** quick array to convert byte values to hex codes */ - private final static char[] HEX = {'0','1','2','3','4','5','6','7','8', '9','a','b','c','d','e','f'}; - - /** - * This utility method is passed an array of bytes. It returns - * this array as a String in hexadecimal format. This is used - * internally by digest(). Data is returned in - * the format specified by the Jabber protocol. - */ - private static String bytesToHex( byte[] data ){ - StringBuffer retval = new StringBuffer(); - for(int i=0;i>4)&0x0F ]); - retval.append(HEX[ data[i]&0x0F ]); - } - return retval.toString(); - } - -} - diff --git a/plexus-sandbox/plexus-webwork-application/pom.xml b/plexus-sandbox/plexus-webwork-application/pom.xml deleted file mode 100644 index abe392d92..000000000 --- a/plexus-sandbox/plexus-webwork-application/pom.xml +++ /dev/null @@ -1,34 +0,0 @@ - - 4.0.0 - org.codehaus.plexus - plexus-webwork-application - 1.0-alpha-1-SNAPSHOT - war - - - org.codehaus.plexus - plexus-xwork-integration - 1.0-alpha-1 - - - junit - junit - 3.8.1 - test - - - - - - org.codehaus.mojo - jetty-maven-plugin - 1.0.0-alpha-1-SNAPSHOT - - - run-war - - - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/ExceptionAction.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/ExceptionAction.java deleted file mode 100644 index bb5f46c29..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/ExceptionAction.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.opensymphony.webwork.example; - -import com.opensymphony.xwork.Action; - -/** - * @author $Author: plightbo $ - * @version $Revision: 1.2 $ - */ -public class ExceptionAction implements Action { - public String execute() throws Exception { - throw new Exception("This is expected"); - } -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/FormAction.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/FormAction.java deleted file mode 100644 index abe337ed3..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/FormAction.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2002-2003 by OpenSymphony - * All rights reserved. - */ -package com.opensymphony.webwork.example; - -import com.opensymphony.xwork.ActionSupport; - - -/** - * FormAction - * - * @author Jason Carreira - * Created Apr 2, 2003 10:22:36 PM - */ -public class FormAction extends ActionSupport { - //~ Instance fields //////////////////////////////////////////////////////// - - private String foo; - private String status = "Unprocessed."; - - //~ Methods //////////////////////////////////////////////////////////////// - - public void setFoo(String foo) { - this.foo = foo; - } - - public String getFoo() { - return foo; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getStatus() { - return status; - } - - public String processForm() { - try { - Thread.sleep(2000 * 3); - } catch (InterruptedException e) { - e.printStackTrace(); - } - - status = "Processed Form."; - - return SUCCESS; - } -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/IndexedPropertyAction.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/IndexedPropertyAction.java deleted file mode 100644 index f41d10a99..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/IndexedPropertyAction.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.opensymphony.webwork.example; - -import com.opensymphony.xwork.ActionSupport; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * IndexedPropertyAction - * - * @author Jason Carreira - * Date: Nov 23, 2003 2:36:58 PM - */ -public class IndexedPropertyAction extends ActionSupport { - private Map emails; - private List urls; - - public IndexedPropertyAction() { - // set these now, and they will be overridden by the parameter interceptor if the values are set in - emails = new HashMap(); - emails.put("Bob", "bob@example.com"); - emails.put("Fred", "fred@example.com"); - emails.put("Tom", "tom@example.com"); - urls = new ArrayList(); - urls.add("http://www.opensymphony.com"); - urls.add("http://wiki.opensymphony.com"); - urls.add("http://jira.opensymphony.com"); - } - - public String execute() throws Exception { - return SUCCESS; - } - - public Map getEmails() { - return emails; - } - - public void setEmails(Map emails) { - this.emails = emails; - } - - public List getUrls() { - return urls; - } - - public void setUrls(List urls) { - this.urls = urls; - } -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/IteratorExample.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/IteratorExample.java deleted file mode 100644 index 8eb3855d2..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/IteratorExample.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2002-2003 by OpenSymphony - * All rights reserved. - */ -package com.opensymphony.webwork.example; - -import com.opensymphony.xwork.Action; - -import java.util.ArrayList; -import java.util.Collection; - - -/** - * @author $author$ - * @author Rick Salsa (rsal@mb.sympatico.ca) - * @version $Revision: 1.2 $ - */ -public class IteratorExample implements Action { - //~ Instance fields //////////////////////////////////////////////////////// - - private Collection daysOfWeeek = new ArrayList(7); - - //~ Constructors /////////////////////////////////////////////////////////// - - public IteratorExample() { - daysOfWeeek.add("Sunday"); - daysOfWeeek.add("Monday"); - daysOfWeeek.add("Tuesday"); - daysOfWeeek.add("Wednesday"); - daysOfWeeek.add("Thursday"); - daysOfWeeek.add("Friday"); - daysOfWeeek.add("Saturday"); - } - - //~ Methods //////////////////////////////////////////////////////////////// - - public void setDay(String day) { - this.daysOfWeeek.add(day); - } - - public Collection getDays() { - return this.daysOfWeeek; - } - - public String execute() throws Exception { - return SUCCESS; - } -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/JavascriptValidationAction.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/JavascriptValidationAction.java deleted file mode 100644 index c2c26fbc7..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/JavascriptValidationAction.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.opensymphony.webwork.example; - -import com.opensymphony.xwork.ActionSupport; - -import java.util.Date; - -public class JavascriptValidationAction extends ActionSupport { - - String requiredString; - int intRange; - String email; - String url; - Date date; - ValidatedBean bean; - - public String execute() throws Exception { - return SUCCESS; - } - - public String doDefault() { - return INPUT; - } - - - public String getRequiredString() { - return requiredString; - } - - public void setRequiredString(String requiredString) { - this.requiredString = requiredString; - } - - public int getIntRange() { - return intRange; - } - - public void setIntRange(int intRange) { - this.intRange = intRange; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public Date getDate() { - return date; - } - - public void setDate(Date date) { - this.date = date; - } - - public ValidatedBean getBean() { - return bean; - } - - public void setBean(ValidatedBean bean) { - this.bean = bean; - } -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/LoanCalc.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/LoanCalc.java deleted file mode 100644 index 13de05589..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/LoanCalc.java +++ /dev/null @@ -1,132 +0,0 @@ -package com.opensymphony.webwork.example; - -import com.opensymphony.xwork.ActionSupport; - -import java.util.ArrayList; -import java.util.List; - -/** - * @author Philipp Meier - * Date: 15.10.2003 - * Time: 18:27:34 - */ -public class LoanCalc extends ActionSupport { - private float presentValue = 1000; - private float interestRate = 0.08f; - private float instalment = 100; - protected static final int MAXTERMS = 100; - - private List monthlyDues; - - public void setPresentValue(float presentValue) { - this.presentValue = presentValue; - } - - public float getPresentValue() { - return presentValue; - } - - public void setInterestRate(float interestRate) { - this.interestRate = interestRate; - } - - public float getInterestRate() { - return interestRate; - } - - public void setInstalment(float instalment) { - this.instalment = instalment; - } - - public float getInstalment() { - return instalment; - } - - public List getMonthlyDues() { - return monthlyDues; - } - - protected void doValidation() { - if (presentValue <= 0) { - addFieldError("presentValue", "must be > 0"); - } - - if (interestRate <= 0) { - addFieldError("interestRate", "must be > 0"); - } - - if (instalment <= 0) { - addFieldError("instalment", "must be > 0"); - } - } - - protected String doExecute() { - monthlyDues = new ArrayList(); - int month = 0; - for (float rest = presentValue; rest > 0.0001f && month <= MAXTERMS; month++) { - float interest = rest * interestRate / 12; - float redemption = instalment - interest; - float newRest = rest - redemption; - - if (newRest < 0) { - monthlyDues.add(new MonthlyDue(month, rest, interest, rest, rest + interest)); - } else { - monthlyDues.add(new MonthlyDue(month, rest, interest, redemption, instalment)); - } - rest = newRest; - } - - if (month > MAXTERMS) { - addActionError("Term is longer than " + MAXTERMS + " months!"); - return ERROR; - } - - return SUCCESS; - } - - public String execute() throws Exception { - doValidation(); - if (hasErrors()) { - return INPUT; - } else { - return doExecute(); - } - } - - public class MonthlyDue { - MonthlyDue(int month, float presentValue, float interest, float redemption, float instalment) { - this.month = month; - this.presentValue = presentValue; - this.interest = interest; - this.redemption = redemption; - this.instalment = instalment; - } - - public int getMonth() { - return month; - } - - public float getPresentValue() { - return presentValue; - } - - public float getInterest() { - return interest; - } - - public float getRedemption() { - return redemption; - } - - public float getInstalment() { - return instalment; - } - - private int month; - private float presentValue; - private float interest; - private float redemption; - private float instalment; - } - -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/MonthList.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/MonthList.java deleted file mode 100644 index 605d51f51..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/MonthList.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.opensymphony.webwork.example; - -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Date; -import java.util.List; - -/** - * List of days in month - * - * @author Rickard Öberg () - * @version $Revision: 1.3 $ - * @see - */ -public class MonthList - extends MonthSelector { - // Attributes ---------------------------------------------------- - List weeks; - int today; - String firstWeek; - long firstDay; - - int day = 0; - int thisMonth; - - // Public -------------------------------------------------------- - public void setDay(Integer aDay) { - this.day = aDay.intValue(); - } - - public int getDay() { - return day; - } - - public List getWeeks() { - return weeks; - } - - public int getToday() { - return today; - } - - public int getThisMonth() { - return thisMonth; - } - - public String getFirstWeek() { - return firstWeek; - } - - public long getFirstDay() { - return firstDay; - } - - public String execute() - throws Exception { - Calendar cal = Calendar.getInstance(); - cal.setTime(new Date()); - today = cal.get(Calendar.DATE); - cal.set(Calendar.DAY_OF_MONTH, 1); - - thisMonth = cal.get(Calendar.MONTH); - - if (month != -1) { - cal.set(Calendar.MONTH, month); - } - - int currentMonth = cal.get(Calendar.MONTH); - cal.setTime(cal.getTime()); - cal.set(Calendar.DAY_OF_WEEK, cal.getFirstDayOfWeek()); - firstDay = cal.getTime().getTime(); - firstWeek = cal.get(Calendar.WEEK_OF_YEAR) + ""; - - weeks = new ArrayList(); - Long[] days = null; - do { - days = new Long[7]; - for (int j = 0; j < 7; j++) { - if (cal.get(Calendar.MONTH) == currentMonth) - days[j] = new Long(cal.get(Calendar.DATE)); - else - days[j] = new Long(0); - - cal.add(Calendar.DATE, 1); - } - weeks.add(days); - } while (cal.get(Calendar.MONTH) == currentMonth); - - return SUCCESS; - } -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/MonthSelector.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/MonthSelector.java deleted file mode 100644 index cca770bdd..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/MonthSelector.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.opensymphony.webwork.example; - -import com.opensymphony.xwork.ActionSupport; - -/** - * Month selector - * - * @author Rickard Öberg () - * @version $Revision: 1.3 $ - * @see - */ -public class MonthSelector - extends ActionSupport { - // Attributes ---------------------------------------------------- - int month = -1; - - // Public -------------------------------------------------------- - public void setMonth(int aMonth) { - this.month = aMonth; - } - - public int getMonth() { - return month; - } -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/Person.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/Person.java deleted file mode 100644 index 8652c300e..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/Person.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.opensymphony.webwork.example; - -public class Person { - String name; - String email; - - public Person(String name, String email) { - setName(name); - setEmail(email); - } - - public Person() { - this("Rickard Oberg", "rickard@dreambean.com"); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/SelectExampleAction.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/SelectExampleAction.java deleted file mode 100644 index ba034044f..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/SelectExampleAction.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.opensymphony.webwork.example; - -import com.opensymphony.xwork.ActionSupport; - -import java.util.HashMap; -import java.util.Map; - -/** - * SelectExampleAction - * - * @author Jason Carreira - * Date: Nov 23, 2003 12:20:02 AM - */ -public class SelectExampleAction extends ActionSupport { - private Map selectMap; - private Long selected; - - public String execute() throws Exception { - selectMap = new HashMap(); - selectMap.put(new Long(1), "Value 1"); - selectMap.put(new Long(2), "Value 2"); - selectMap.put(new Long(3), "Value 3"); - return SUCCESS; - } - - public Map getSelectMap() { - return selectMap; - } - - public void setSelectMap(Map selectMap) { - this.selectMap = selectMap; - } - - public Long getSelected() { - return selected; - } - - public void setSelected(Long selected) { - this.selected = selected; - } -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/TabbedPaneTest.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/TabbedPaneTest.java deleted file mode 100644 index 77ac0dab3..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/TabbedPaneTest.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.opensymphony.webwork.example; - -import com.opensymphony.xwork.ActionSupport; - -import java.util.HashMap; -import java.util.Map; -import java.util.Set; -import java.util.Vector; - -public class TabbedPaneTest extends ActionSupport { - static Set getData() { - Map tmpMap = new HashMap(); - - tmpMap.put("Counter", "/SimpleCounter.action"); - tmpMap.put("UI Tags", "/TagTest.action"); - tmpMap.put("Country List", "/CountryTest.action"); - - return tmpMap.entrySet(); - } - - public Vector getTabs1() { - return tabs1; - } - - // Attributes -------------------------------------------------------- - private Vector tabs1 = new Vector(TabbedPaneTest.getData()); -} \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/Test.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/Test.java deleted file mode 100644 index 8feb0f19b..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/Test.java +++ /dev/null @@ -1,116 +0,0 @@ -package com.opensymphony.webwork.example; - -import com.opensymphony.webwork.interceptor.ParameterAware; -import com.opensymphony.xwork.ActionSupport; -import org.apache.commons.logging.LogFactory; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Properties; - -/** - * Simple test action. - * - * @author Rickard Öberg (rickard@middleware-company.com) - * @version $Revision: 1.5 $ - * @see - */ -public class Test extends ActionSupport implements ParameterAware { - // Constants ----------------------------------------------------- - - // Attributes ---------------------------------------------------- - String name = "HelloWorld"; - String foo; - ArrayList list; - Properties settings = new Properties(); - Map params; - - // Static -------------------------------------------------------- - - // Constructors -------------------------------------------------- - - // Public -------------------------------------------------------- - public String getName() { - return name; - } - - public List getPeople() { - return list; - } - - public Map getSettings() { - return settings; - } - - public Map getParameters() { - return params; - } - - public Person getPerson() { - return new Person(); - } - - public Boolean getBool(String b) { - return new Boolean(b); - } - - public String getSecond(String one, String two) { - return two; - } - - public boolean getStringsEqual(String one, String two) { - return one.equals(two); - } - - public Integer getInteger(int i) { - return new Integer(i); - } - - public void setFoo(String aValue) { - foo = aValue; - } - - public String getFoo() { - return foo; - } - - public boolean[] getBools() { - boolean[] b = new boolean[]{true, false, false, true}; - return b; - } - - public String concat(String s1, String s2) { - return s1 + s2; - } - - public String getSameString(String s) { - return s; - } - - // ParameterAware implementation --------------------------------- - public void setParameters(Map parameters) { - this.params = parameters; - } - - // Action implementation ----------------------------------------- - protected String doExecute() throws Exception { - list = new ArrayList(); - list.add(new Person()); - list.add(new Person("Maurice C. Parker", "maurice@vineyardenterprise.com")); - - settings.put("foo", "bar"); - settings.put("black", "white"); - - return SUCCESS; - } - - /** - * Test of CommandDriven interface - */ - public String doFoo() { - LogFactory.getLog(this.getClass()).debug("Foo command executed"); - return SUCCESS; - } - -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/ValidatedAction.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/ValidatedAction.java deleted file mode 100644 index b17432659..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/ValidatedAction.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.opensymphony.webwork.example; - -import com.opensymphony.xwork.ActionSupport; - -/** - * ValidatedAction - * - * @author Jason Carreira - * Created Sep 12, 2003 9:23:38 PM - */ -public class ValidatedAction extends ActionSupport { - private ValidatedBean bean = new ValidatedBean(); - private String name; - private String validationAction = "basicValidation.action"; - - public ValidatedBean getBean() { - return bean; - } - - public void setBean(ValidatedBean bean) { - this.bean = bean; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getValidationAction() { - return validationAction; - } - - public void setValidationAction(String validationAction) { - this.validationAction = validationAction; - } -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/ValidatedBean.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/ValidatedBean.java deleted file mode 100644 index 0ce2a74d8..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/ValidatedBean.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.opensymphony.webwork.example; - -import java.util.Date; - -/** - * ValidatedBean - * - * @author Jason Carreira - * Created Sep 12, 2003 9:24:18 PM - */ -public class ValidatedBean { - private String text; - private Date date = new Date(System.currentTimeMillis()); - private int number; - private int number2; - public static final int MAX_TOTAL = 12; - - public String getText() { - return text; - } - - public void setText(String text) { - this.text = text; - } - - public Date getDate() { - return date; - } - - public void setDate(Date date) { - this.date = date; - } - - public int getNumber() { - return number; - } - - public void setNumber(int number) { - this.number = number; - } - - public int getNumber2() { - return number2; - } - - public void setNumber2(int number2) { - this.number2 = number2; - } -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/counter/Counter.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/counter/Counter.java deleted file mode 100644 index 4212a039c..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/counter/Counter.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2002-2003 by OpenSymphony - * All rights reserved. - */ -package com.opensymphony.webwork.example.counter; - -import java.io.Serializable; - - -/** - * @author $Author: plightbo $ - * @version $Revision: 1.3 $ - */ -public class Counter implements Serializable { - //~ Instance fields //////////////////////////////////////////////////////// - - private int count; - - //~ Methods //////////////////////////////////////////////////////////////// - - public int getCount() { - return count; - } - - public void incrementCount() { - count++; - } -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/counter/CounterAware.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/counter/CounterAware.java deleted file mode 100644 index d5d4c4905..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/counter/CounterAware.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) 2002-2003 by OpenSymphony - * All rights reserved. - */ -package com.opensymphony.webwork.example.counter; - - -/** - * @author $Author: plightbo $ - * @version $Revision: 1.2 $ - */ -public interface CounterAware { - //~ Methods //////////////////////////////////////////////////////////////// - - public void setCounter(Counter counter); -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/counter/SimpleCounter.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/counter/SimpleCounter.java deleted file mode 100644 index 55b8a6210..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/counter/SimpleCounter.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2002-2003 by OpenSymphony - * All rights reserved. - */ -package com.opensymphony.webwork.example.counter; - -import com.opensymphony.xwork.ActionSupport; - - -/** - * @author $Author: jcarreira $ - * @version $Revision: 1.4 $ - */ -public class SimpleCounter extends ActionSupport implements CounterAware { - //~ Instance fields //////////////////////////////////////////////////////// - - private Counter counter; - private String foo; - - //~ Methods //////////////////////////////////////////////////////////////// - - public SimpleCounter() { - } - - public void setCounter(Counter counter) { - this.counter = counter; - } - - public Counter getCounter() { - return counter; - } - - public void setFoo(String foo) { - this.foo = foo; - } - - public String getFoo() { - return foo; - } - - public String execute() throws Exception { - counter.incrementCount(); - - return SUCCESS; - } -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/fileUpload/FileUploadAction.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/fileUpload/FileUploadAction.java deleted file mode 100644 index 7ba77c770..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/fileUpload/FileUploadAction.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.opensymphony.webwork.example.fileUpload; - -import com.opensymphony.xwork.ActionSupport; - -import java.io.File; - -public class FileUploadAction extends ActionSupport { - File file; - String fileContentType; - String fileFileName; - File[] files; - String[] filesContentType; - String[] filesFileName; - - public String execute() throws Exception { - - return SUCCESS; - } - - public String doDefault() throws Exception { - return INPUT; - } - - public void setFile(File file) { - this.file = file; - } - - public void setFileContentType(String fileContentType) { - this.fileContentType = fileContentType; - } - - public void setFileFileName(String fileFileName) { - this.fileFileName = fileFileName; - } - - public void setFiles(File[] files) { - this.files = files; - } - - public void setFilesContentType(String[] filesContentType) { - this.filesContentType = filesContentType; - } - - public void setFilesFileName(String[] filesFileName) { - this.filesFileName = filesFileName; - } -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/Add.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/Add.java deleted file mode 100644 index b66c542de..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/Add.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * WebWork, Web Application Framework - * - * Distributable under Apache license. - * See terms of license at opensource.org - */ -package com.opensymphony.webwork.example.i18n; - -/** - * This code is an adaptation of the I18N example from the JavaWorld article by Govind Seshadri. - * http://www.javaworld.com/javaworld/jw-03-2000/jw-03-ssj-jsp_p.html - */ -public class Add extends Shop { - // Attributes ---------------------------------------------------- - String album; - int quantity; - - // Public ------------------------------------------------------- - public void setAlbum(String title) { - this.album = title; - } - - public void setQuantity(int quantity) { - this.quantity = quantity; - } - - // Action implementation ----------------------------------------- - public String execute() throws Exception { - Cart cart = getCart(); - CDList cdList = new CDList(); - cdList.execute(); - CD cd = cdList.getCD(album); - - cart.addItem(cd, quantity); - - return SUCCESS; - } -} \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/CD.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/CD.java deleted file mode 100644 index 7affd40fa..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/CD.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.opensymphony.webwork.example.i18n; - -/** - * This code is an adaptation of the I18N example from the JavaWorld article by Govind Seshadri. - * http://www.javaworld.com/javaworld/jw-03-2000/jw-03-ssj-jsp_p.html - */ -public class CD { - String album; - String artist; - String country; - double price; - - public void setAlbum(String title) { - album = title; - } - - public String getAlbum() { - return album; - } - - public void setArtist(String group) { - artist = group; - } - - public String getArtist() { - return artist; - } - - public void setCountry(String cty) { - country = cty; - } - - public String getCountry() { - return country; - } - - public void setPrice(double p) { - price = p; - } - - public double getPrice() { - return price; - } - - public boolean equals(Object obj) { - return ((CD) obj).getAlbum().equals(getAlbum()); - } -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/CDList.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/CDList.java deleted file mode 100644 index 502f043ca..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/CDList.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * WebWork, Web Application Framework - * - * Distributable under Apache license. - * See terms of license at opensource.org - */ -package com.opensymphony.webwork.example.i18n; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.ArrayList; -import java.util.List; -import java.util.StringTokenizer; - -/** - * This code is an adaptation of the I18N example from the JavaWorld article by Govind Seshadri. - * http://www.javaworld.com/javaworld/jw-03-2000/jw-03-ssj-jsp_p.html - */ -public class CDList extends Shop { - // Attributes ---------------------------------------------------- - static List cds; - - static { - // This never changes, so we do it once only - cds = new ArrayList(); - - // We read the values from a file so that it is easy to change - try { - InputStream resource = CDList.class.getResourceAsStream("cdlist.txt"); - BufferedReader in = new BufferedReader(new InputStreamReader(resource)); - String cdInfo; - while ((cdInfo = in.readLine()) != null) { - StringTokenizer tokens = new StringTokenizer(cdInfo, ","); - CD cd = new CD(); - cd.setAlbum(tokens.nextToken()); - cd.setArtist(tokens.nextToken()); - cd.setCountry(tokens.nextToken()); - cd.setPrice(new Double(tokens.nextToken()).doubleValue()); - cds.add(cd); - } - in.close(); - } catch (IOException e) { - e.printStackTrace(System.err); - System.err.println("Could not read list of CD's"); - } - } - - // Public -------------------------------------------------------- - public List getCDList() { - return cds; - } - - public CD getCD(String title) { - List l = getCDList(); // Call getCDList so it can be replaced with database access if necessary - for (int i = 0; i < l.size(); i++) { - CD cd = (CD) l.get(i); - if (cd.getAlbum().equals(title)) { - return cd; - } - } - - throw new IllegalArgumentException("No such CD"); - } -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/Cart.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/Cart.java deleted file mode 100644 index 902d4bf5d..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/Cart.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.opensymphony.webwork.example.i18n; - -import java.util.ArrayList; -import java.util.List; - -/** - * This code is an adaptation of the I18N example from the JavaWorld article by Govind Seshadri. - * http://www.javaworld.com/javaworld/jw-03-2000/jw-03-ssj-jsp_p.html - */ -public class Cart { - List items; - - public void addItem(CD cd, int quantity) { - if (items == null) - items = new ArrayList(); - - for (int i = 0; i < items.size(); i++) { - CartItem ci = (CartItem) items.get(i); - if (cd.equals(ci.cd)) { - ci.addQuantity(quantity); - return; - } - } - - items.add(new CartItem(cd, quantity)); - } - - public void removeItem(CD cd) { - for (int i = 0; i < items.size(); i++) { - CartItem ci = (CartItem) items.get(i); - if (cd.equals(ci.cd)) { - items.remove(ci); - - if (items.size() == 0) - items = null; - - return; - } - } - } - - public List getItems() { - return items; - } - - public double getTotal() { - double total = 0; - for (int i = 0; i < items.size(); i++) { - CartItem ci = (CartItem) items.get(i); - total += ci.getCd().getPrice() * ci.getQuantity(); - } - return total; - } - - static public class CartItem { - int qty; - CD cd; - - CartItem(CD cd, int qty) { - this.cd = cd; - addQuantity(qty); - } - - public void addQuantity(int qty) { - this.qty += qty; - } - - public int getQuantity() { - return qty; - } - - public CD getCd() { - return cd; - } - } -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/Checkout.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/Checkout.java deleted file mode 100644 index eacb1d1fe..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/Checkout.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * WebWork, Web Application Framework - * - * Distributable under Apache license. - * See terms of license at opensource.org - */ -package com.opensymphony.webwork.example.i18n; - -/** - * This code is an adaptation of the I18N example from the JavaWorld article by Govind Seshadri. - * http://www.javaworld.com/javaworld/jw-03-2000/jw-03-ssj-jsp_p.html - */ -public class Checkout extends Shop { - // Checkout - double totalPrice; - - // Public ------------------------------------------------------ - public double getTotalPrice() { - return totalPrice; - } - - // Action implementation ----------------------------------------- - public String execute() throws Exception { - Cart cart = getCart(); - - // Calculate total - ComputePrice cp = new ComputePrice(); - //cp.setSession(session); - cp.setPrice(cart.getTotal()); - totalPrice = cp.getRealPrice(); - - return SUCCESS; - } -} \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/ComputePrice.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/ComputePrice.java deleted file mode 100644 index 11d38801b..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/ComputePrice.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * WebWork, Web Application Framework - * - * Distributable under Apache license. - * See terms of license at opensource.org - */ -package com.opensymphony.webwork.example.i18n; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Properties; - -/** - * This code is an adaptation of the I18N example from the JavaWorld article by Govind Seshadri. - * http://www.javaworld.com/javaworld/jw-03-2000/jw-03-ssj-jsp_p.html - */ -public class ComputePrice extends Shop { - // Static -------------------------------------------------------- - static Properties exchangeRates; - - static { - // This never changes, so we do it once only - exchangeRates = new Properties(); - - // We read the values from a file so that it is easy to change - try { - InputStream in = ComputePrice.class.getResourceAsStream("exchangerates.properties"); - exchangeRates.load(in); - in.close(); - } catch (IOException e) { - e.printStackTrace(System.err); - System.err.println("Could not read list of exchange rates"); - } - } - - // Attributes ---------------------------------------------------- - double price; - - // Public -------------------------------------------------------- - public void setPrice(double price) { - this.price = price; - } - - public double getRealPrice() { - return computePrice(price); - } - - /* - public String computePrice(double price) - { - String exchangeRate = (String)exchangeRates.getProperty(getLocale().getCountry()); - - price *= new Double(exchangeRate).doubleValue(); - - NumberFormat form = NumberFormat.getCurrencyInstance(getLocale()); - return form.format(price); - } - */ - - public double computePrice(double price) { - String exchangeRate = (String) exchangeRates.getProperty(getLocale().getCountry()); - - price *= new Double(exchangeRate).doubleValue(); - - return price; - } - - public String execute() throws Exception { - return SUCCESS; - } - -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/Delete.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/Delete.java deleted file mode 100644 index 083f252b2..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/Delete.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * WebWork, Web Application Framework - * - * Distributable under Apache license. - * See terms of license at opensource.org - */ -package com.opensymphony.webwork.example.i18n; - -/** - * This code is an adaptation of the I18N example from the JavaWorld article by Govind Seshadri. - * http://www.javaworld.com/javaworld/jw-03-2000/jw-03-ssj-jsp_p.html - */ -public class Delete extends Shop { - // Attributes ---------------------------------------------------- - String album; - - // Public ------------------------------------------------------ - public void setAlbum(String title) { - this.album = title; - } - - // Action implementation ----------------------------------------- - public String execute() throws Exception { - Cart cart = getCart(); - CDList cdList = new CDList(); - cdList.execute(); - CD cd = cdList.getCD(album); - - cart.removeItem(cd); - - return SUCCESS; - } -} \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/Language.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/Language.java deleted file mode 100644 index b0eec5b0c..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/Language.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * WebWork, Web Application Framework - * - * Distributable under Apache license. - * See terms of license at opensource.org - */ -package com.opensymphony.webwork.example.i18n; - -import com.opensymphony.xwork.ActionContext; - -import java.util.Locale; - -/** - * This code is an adaptation of the I18N example from the JavaWorld article by Govind Seshadri. - * http://www.javaworld.com/javaworld/jw-03-2000/jw-03-ssj-jsp_p.html - */ -public class Language extends Shop { - // Language - String lang; - - // Public ------------------------------------------------------ - public void setLanguage(String lang) { - this.lang = lang; - } - - public String getLanguage() { - return getLocale().getCountry(); - } - - // Action implementation ----------------------------------------- - public String execute() throws Exception { - Locale locale; - if (lang == null) - return ERROR; - else { - if (lang.equals("de")) { - locale = Locale.GERMANY; - } else if (lang.equals("fr")) { - locale = Locale.FRANCE; - } else if (lang.equals("sv")) { - locale = new Locale("sv", "SE"); - } else { - locale = Locale.US; - } - ActionContext.getContext().getSession().put("locale", locale); - - return SUCCESS; - } - } -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/LanguageList.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/LanguageList.java deleted file mode 100644 index ed2f38411..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/LanguageList.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * WebWork, Web Application Framework - * - * Distributable under Apache license. - * See terms of license at opensource.org - */ -package com.opensymphony.webwork.example.i18n; - -import com.opensymphony.xwork.ActionSupport; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Map; -import java.util.Properties; - -/** - * This code is an adaptation of the I18N example from the JavaWorld article by Govind Seshadri. - * http://www.javaworld.com/javaworld/jw-03-2000/jw-03-ssj-jsp_p.html - */ -public class LanguageList extends ActionSupport { - // Attributes ---------------------------------------------------- - static Properties languages; - - static { - // This never changes, so we do it once only - languages = new Properties(); - - // We read the values from a file so that it is easy to change - try { - InputStream in = LanguageList.class.getResourceAsStream("languages.properties"); - languages.load(in); - in.close(); - } catch (IOException e) { - e.printStackTrace(System.err); - System.err.println("Could not read list of languages"); - languages.put("en", "English"); // Default so we at least get something - } - } - - // Public -------------------------------------------------------- - public Map getLanguages() { - return languages; - } -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/Restart.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/Restart.java deleted file mode 100644 index 753e8826f..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/Restart.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * WebWork, Web Application Framework - * - * Distributable under Apache license. - * See terms of license at opensource.org - */ -package com.opensymphony.webwork.example.i18n; - -import com.opensymphony.xwork.ActionContext; - -/** - * This code is an adaptation of the I18N example from the JavaWorld article by Govind Seshadri. - * http://www.javaworld.com/javaworld/jw-03-2000/jw-03-ssj-jsp_p.html - */ -public class Restart extends Shop { - // Action implementation ----------------------------------------- - public String execute() throws Exception { - ActionContext.getContext().getSession().remove("cart"); - return SUCCESS; - } -} \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/Shop.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/Shop.java deleted file mode 100644 index 24bfdbae4..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/i18n/Shop.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * WebWork, Web Application Framework - * - * Distributable under Apache license. - * See terms of license at opensource.org - */ -package com.opensymphony.webwork.example.i18n; - -import com.opensymphony.xwork.ActionContext; -import com.opensymphony.xwork.ActionSupport; - -import java.util.Locale; -import java.util.Map; - -/** - * This code is an adaptation of the I18N example from the JavaWorld article by Govind Seshadri. - * http://www.javaworld.com/javaworld/jw-03-2000/jw-03-ssj-jsp_p.html - */ -public class Shop extends ActionSupport { - // Attributes --------------------------------------------------- - protected Map application; - - // Public ------------------------------------------------------- - public Cart getCart() { - Map session = ActionContext.getContext().getSession(); - Cart cart = (Cart) session.get("cart"); - if (cart == null) { - cart = new Cart(); - session.put("cart", cart); - } - - return cart; - } - - // ActionSupport overrides --------------------------------------- - public Locale getLocale() { - Locale l = (Locale) ActionContext.getContext().getSession().get("locale"); - return (l == null) ? Locale.getDefault() : l; - } - -} \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/jasperreports/OrderListAction.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/jasperreports/OrderListAction.java deleted file mode 100644 index 0be21ab77..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/jasperreports/OrderListAction.java +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright (c) 2002-2003 by OpenSymphony - * All rights reserved. - */ -package com.opensymphony.webwork.example.jasperreports; - -import com.opensymphony.xwork.ActionSupport; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.ArrayList; -import java.util.List; -import java.util.StringTokenizer; - - -/** - * A list of orders each with a list of line items - *

- * Ported to WebWork2: - * - * @author Peter Kelley (peterk@moveit.com.au) - * @author <a href="hermanns@aixcept.de">Rainer Hermanns</a> - * @version $Id$ - */ -public class OrderListAction extends ActionSupport { - //~ Static fields/initializers ///////////////////////////////////////////// - - // Attributes ---------------------------------------------------- - static List orders; - - static { - // This never changes, so we do it once only - orders = new ArrayList(); - class Order { - String customerName; - String address1; - String address2; - String city; - String state; - String postcode; - List lineItems; - - public String getCustomerName() { - return customerName; - } - - public void setCustomerName(String newCustomerName) { - customerName = newCustomerName; - } - - public String getAddress1() { - return address1; - } - - public void setAddress1(String newAddress1) { - address1 = newAddress1; - } - - public String getAddress2() { - return address2; - } - - public void setAddress2(String newAddress2) { - address2 = newAddress2; - } - - public String getCity() { - return city; - } - - public void setCity(String newCity) { - city = newCity; - } - - public String getState() { - return state; - } - - public void setState(String newState) { - state = newState; - } - - public String getPostcode() { - return postcode; - } - - public void setPostcode(String newPostcode) { - postcode = newPostcode; - } - - public List getLineItems() { - return lineItems; - } - - public void setLineItems(List newLineItems) { - lineItems = newLineItems; - } - } - - class LineItem { - String productName; - Integer quantity; - Float unitCost; - - public String getProductName() { - return productName; - } - - public void setProductName(String newProductName) { - productName = newProductName; - } - - public Integer getQuantity() { - return quantity; - } - - public void setQuantity(Integer newQuantity) { - quantity = newQuantity; - } - - public Float getUnitCost() { - return unitCost; - } - - public void setUnitCost(Float newUnitCost) { - unitCost = newUnitCost; - } - } - - // We read the values from a file so that it is easy to change - try { - InputStream resource = OrderListAction.class.getResourceAsStream("orders.txt"); - BufferedReader in = new BufferedReader(new InputStreamReader(resource)); - String thisLine; - List lineItems = null; - Order thisOrder = null; - - while ((thisLine = in.readLine()) != null) { - StringTokenizer tokens = new StringTokenizer(thisLine, ","); - - if ("order".equals(tokens.nextToken())) { - if (thisOrder != null) { - thisOrder.setLineItems(lineItems); - orders.add(thisOrder); - } - - thisOrder = new Order(); - lineItems = new ArrayList(); - thisOrder.setCustomerName(tokens.nextToken()); - thisOrder.setAddress1(tokens.nextToken()); - thisOrder.setAddress2(tokens.nextToken()); - thisOrder.setCity(tokens.nextToken()); - thisOrder.setState(tokens.nextToken()); - thisOrder.setPostcode(tokens.nextToken()); - } else { - //Line Item - LineItem lineItem = new LineItem(); - lineItem.setProductName(tokens.nextToken()); - lineItem.setQuantity(new Integer(tokens.nextToken())); - lineItem.setUnitCost(new Float(tokens.nextToken())); - lineItems.add(lineItem); - } - } - - thisOrder.setLineItems(lineItems); - orders.add(thisOrder); - in.close(); - } catch (Throwable e) { - e.printStackTrace(System.err); - System.err.println("Could not read list of orders"); - } - } - - //~ Methods //////////////////////////////////////////////////////////////// - - public Object[] getOrderArray() { - return orders.toArray(); - } - - // Public -------------------------------------------------------- - public List getOrders() { - return orders; - } - - public String getTitle() { - return "Dynamic Order Report Title"; - } - - public String getNullpx() { - return "here"; - } -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/ui/SimpleAction.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/ui/SimpleAction.java deleted file mode 100644 index 8b40c24b9..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/ui/SimpleAction.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) 2002-2003 by OpenSymphony - * All rights reserved. - */ -package com.opensymphony.webwork.example.ui; - -import com.opensymphony.xwork.Action; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - -/** - * @author Matt Ho <matt@indigoegg.com> - * @version $Id$ - */ -public class SimpleAction implements Action { - //~ Instance fields //////////////////////////////////////////////////////// - - private List list; - private Map map; - private String scalar; - private String[] array; - private String[] multiValues; - private List multiList; - - public String[] getMultiValues() { - return multiValues; - } - - public void setMultiValues(String[] multiValues) { - this.multiValues = multiValues; - } - - public List getMultiList() { - return multiList; - } - - public void setMultiList(List multiList) { - this.multiList = multiList; - } - - //~ Constructors /////////////////////////////////////////////////////////// - - public SimpleAction() { - super(); - init(); - } - - //~ Methods //////////////////////////////////////////////////////////////// - - public void setArray(String[] array) { - this.array = array; - } - - public String[] getArray() { - return array; - } - - public void setList(List list) { - this.list = list; - } - - public List getList() { - return list; - } - - public void setMap(Map map) { - this.map = map; - } - - public Map getMap() { - return map; - } - - public void setScalar(String scalar) { - this.scalar = scalar; - } - - public String getScalar() { - return scalar; - } - - public String execute() throws Exception { - return Action.SUCCESS; - } - - private void init() { - this.scalar = "a scalar value with <&>\"' magic characters"; - - this.list = new ArrayList(); - this.list.add(new Node("hello", "world")); - this.list.add(new Node("foo", "bar")); - this.list.add(new Node("another", "test")); - - this.array = new String[3]; - this.array[0] = "adam"; - this.array[1] = "betty"; - this.array[2] = "craig"; - - this.multiList = new ArrayList(); - this.multiList.add("foo"); - this.multiList.add("bar"); - this.multiList.add("baz"); - this.multiList.add("biz"); - this.multiList.add("pop"); - - this.multiValues = new String[2]; - this.multiValues[0] = "bar"; - this.multiValues[1] = "biz"; - - this.map = new HashMap(); - this.map.put("ABC", "123"); - this.map.put("XYZ", "789"); - } - - //~ Inner Classes ////////////////////////////////////////////////////////// - - public class Node { - String key; - String value; - List children = new ArrayList(); - - public Node(String key, String value) { - this.key = key; - this.value = value; - children.add(key + " - " + value + " :: child1"); - children.add(key + " - " + value + " :: child2"); - children.add(key + " - " + value + " :: child3"); - } - - public String getKey() { - return key; - } - - public String getValue() { - return value; - } - - public List getChildren() { - return children; - } - - public String toString() { - return key + "/" + value; - } - } -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/ui/SimpleCountry.java b/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/ui/SimpleCountry.java deleted file mode 100644 index 276fe0103..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/java/com/opensymphony/webwork/example/ui/SimpleCountry.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Copyright (c) 2002-2003 by OpenSymphony - * All rights reserved. - */ -package com.opensymphony.webwork.example.ui; - -import com.opensymphony.xwork.Action; - - -/** - * @author Matt Ho <matt@enginegreen.com> - * @version $Id$ - */ -public class SimpleCountry implements Action { - //~ Instance fields //////////////////////////////////////////////////////// - - private String[][] countries = { - {"AFGHANISTAN", "93"}, - {"ALBANIA", "355"}, - {"ALGERIA", "213"}, - {"AMERICAN SAMOA", "684"}, - {"ANDORRA", "376"}, - {"ANGOLA", "244"}, - {"ANTARCTICA", "672"}, - {"ARGENTINA", "54"}, - {"ARMENIA", "374"}, - {"ARUBA", "297"}, - {"ASCENSION ISLAND", "247"}, - {"AUSTRALIA", "61"}, - {"AUSTRIA", "43"}, - {"AZERBAIJAN", "994"}, - {"BAHRAIN", "973"}, - {"BANGLADESH", "880"}, - {"BELARUS", "375"}, - {"BELGIUM", "32"}, - {"BELIZE", "501"}, - {"BENIN", "229"}, - {"BHUTAN", "975"}, - {"BOLIVIA", "591"}, - {"BOSNIA-HERZEGOVINA", "387"}, - {"BOTSWANA", "267"}, - {"BRAZIL", "55"}, - {"BRUNEI", "673"}, - {"BULGARIA", "359"}, - {"BURKINA FASO", "226"}, - {"BURUNDI", "257"}, - {"CAMBODIA", "855"}, - {"CAMEROON", "237"}, - {"CAPE VERDE IS.", "238"}, - {"CENTRAL AFRICAN REPU", "236"}, - {"CHAD", "235"}, - {"CHILE", "56"}, - {"CHINA", "86"}, - {"COLOMBIA", "57"}, - {"COMOROS", "269"}, - {"CONGO", "242"}, - {"COOK ISLANDS", "682"}, - {"COSTA RICA", "506"}, - {"CROATIA", "385"}, - {"CUBA", "53"}, - {"CYPRUS", "357"}, - {"CZECH REPUBLIC", "420"}, - {"DENMARK", "45"}, - {"DIEGO GARCIA", "246"}, - {"DJIBOUTI", "253"}, - {"ECUADOR", "593"}, - {"EGYPT", "20"}, - {"EL SALVADOR", "503"}, - {"EQUATORIAL GUINEA", "240"}, - {"ERITREA", "291"}, - {"ESTONIA", "372"}, - {"ETHIOPIA", "251"}, - {"FAEROE ISLANDS", "298"}, - {"FALKLAND IS.", "500"}, - {"FIJI", "679"}, - {"FINLAND", "358"}, - {"FRANCE", "33"}, - {"FRENCH GUIANA", "594"}, - {"FRENCH POLYNESIA", "689"}, - {"GABON", "241"}, - {"GAMBIA", "220"}, - {"GEORGIA", "995"}, - {"GERMANY", "49"}, - {"GHANA", "233"}, - {"GIBRALTAR", "350"}, - {"GREECE", "30"}, - {"GREENLAND", "299"}, - {"GUADELOUPE", "590"}, - {"GUAM", "671"}, - {"GUATEMALA", "502"}, - {"GUINEA", "224"}, - {"GUINEA-BISSAU", "245"}, - {"GUYANA", "592"}, - {"HAITI", "509"}, - {"HONDURAS", "504"}, - {"HONG KONG", "852"}, - {"HUNGARY", "36"}, - {"ICELAND", "354"}, - {"INDIA", "91"}, - {"INDONESIA", "62"}, - {"INMARSAT ATL EAST M", "871"}, - {"INMARSAT ATL WEST M", "874"}, - {"INMARSAT IND M", "873"}, - {"INMARSAT PAC M", "872"}, - {"IRAN", "98"}, - {"IRAQ", "964"}, - {"IRELAND", "353"}, - {"ISRAEL", "972"}, - {"ITALY", "39"}, - {"IVORY COAST", "225"}, - {"JAPAN", "81"}, - {"JORDAN", "962"}, - {"KENYA", "254"}, - {"KIRIBATI", "686"}, - {"KOREA, NORTH", "850"}, - {"KOREA, SOUTH", "82"}, - {"KUWAIT", "965"}, - {"KYRGYZSTAN", "996"}, - {"LAOS", "856"}, - {"LATVIA", "371"}, - {"LEBANON", "961"}, - {"LESOTHO", "266"}, - {"LIBERIA", "231"}, - {"LIBYA", "218"}, - {"LIECHTENSTEIN", "423"}, - {"LITHUANIA", "370"}, - {"LUXEMBOURG", "352"}, - {"MACAO", "853"}, - {"MACEDONIA", "389"}, - {"MADAGASCAR", "261"}, - {"MALAWI", "265"}, - {"MALAYSIA", "60"}, - {"MALDIVES", "960"}, - {"MALI", "223"}, - {"MALTA", "356"}, - {"MARSHALL ISLANDS", "692"}, - {"MARTINIQUE (FR. ANTI", "596"}, - {"MAURITANIA", "222"}, - {"MAURITIUS", "230"}, - {"MICRONESIA", "691"}, - {"MOLDOVA", "373"}, - {"MONACO", "377"}, - {"MONGOLIA", "976"}, - {"MOROCCO", "212"}, - {"MOZAMBIQUE", "258"}, - {"MYANMAR", "95"}, - {"NAMIBIA", "264"}, - {"NAURU", "674"}, - {"NEPAL", "977"}, - {"NETHERLANDS", "31"}, - {"NETHERLANDS ANTILLES", "599"}, - {"NEW CALEDONIA", "687"}, - {"NEW ZEALAND", "64"}, - {"NICARAGUA", "505"}, - {"NIGER", "227"}, - {"NIGERIA", "234"}, - {"NIUE", "683"}, - {"NO. MARIANA IS. (SAI", "670"}, - {"NORWAY", "47"}, - {"OMAN", "968"}, - {"PAKISTAN", "92"}, - {"PALAU", "680"}, - {"PALESTINE", "970"}, - {"PANAMA", "507"}, - {"PAPUA NEW GUINEA", "675"}, - {"PARAGUAY", "595"}, - {"PERU", "51"}, - {"PHILIPPINES", "63"}, - {"POLAND", "48"}, - {"PORTUGAL", "351"}, - {"QATAR", "974"}, - {"REUNION ISLAND", "262"}, - {"ROMANIA", "40"}, - {"RUSSIA", "7"}, - {"RWANDA", "250"}, - {"SAN MARINO", "378"}, - {"SAO TOME", "239"}, - {"SAUDI ARABIA", "966"}, - {"SENEGAL REPUBLIC", "221"}, - {"SEYCHELLES", "248"}, - {"SIERRA LEONE", "232"}, - {"SINGAPORE", "65"}, - {"SLOVAKIA", "421"}, - {"SLOVENIA", "386"}, - {"SOLOMON ISLANDS", "677"}, - {"SOMALIA", "252"}, - {"SOUTH AFRICA", "27"}, - {"SPAIN", "34"}, - {"SRI LANKA", "94"}, - {"ST HELENA", "290"}, - {"ST PIERRE & MIQUELON", "508"}, - {"SUDAN", "249"}, - {"SURINAME", "597"}, - {"SWAZILAND", "268"}, - {"SWEDEN", "46"}, - {"SWITZERLAND", "41"}, - {"SYRIA", "963"}, - {"TAIWAN", "886"}, - {"TAJIKISTAN", "992"}, - {"TANZANIA", "255"}, - {"THAILAND", "66"}, - {"TOGO", "228"}, - {"TOKELAU", "690"}, - {"TONGA", "676"}, - {"TUNISIA", "216"}, - {"TURKEY", "90"}, - {"TURKMENISTAN", "993"}, - {"TUVALU", "688"}, - {"UGANDA", "256"}, - {"UKRAINE", "380"}, - {"UNITED ARAB EMIRATES", "971"}, - {"UNITED KINGDOM", "44"}, - {"URUGUAY", "598"}, - {"UZBEKISTAN", "998"}, - {"VANUATU", "678"}, - {"VATICAN CITY", "379"}, - {"VENEZUELA", "58"}, - {"VIETNAM", "84"}, - {"WALLIS & FUTUNA ISLA", "681"}, - {"WESTERN SAMOA", "685"}, - {"YEMEN ARAB REP.", "967"}, - {"YUGOSLAVIA", "381"}, - {"ZAIRE", "243"}, - {"ZAMBIA", "260"}, - {"ZIMBABWE", "263"} - }; - - //~ Methods //////////////////////////////////////////////////////////////// - - public void setCountries(String[][] countries) { - this.countries = countries; - } - - public String[][] getCountries() { - return countries; - } - - public String execute() throws Exception { - return Action.SUCCESS; - } -} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/META-INF/plexus/components.xml b/plexus-sandbox/plexus-webwork-application/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index d928bceca..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - com.opensymphony.xwork.Action - com.opensymphony.webwork.example.counter.SimpleCounter - com.opensymphony.webwork.example.counter.SimpleCounter - - - com.opensymphony.webwork.example.counter.Counter - - - - - - - com.opensymphony.webwork.example.counter.Counter - com.opensymphony.webwork.example.counter.Counter - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/JavascriptValidationAction-javascriptValidation-validation.xml b/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/JavascriptValidationAction-javascriptValidation-validation.xml deleted file mode 100644 index 8f6aec266..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/JavascriptValidationAction-javascriptValidation-validation.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - You must enter a string. - - - - - - 1 - 10 - You must select a number between 1 and 10 - - - - - - You must enter a valid email address. - - - - - - You must enter a valid URL. - - - - - - 2/12/1982 - 2/12/2004 - You must select a date between 2/12/1982 and 2/12/2004 - - - - - - bean: - - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/MonthList.properties b/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/MonthList.properties deleted file mode 100644 index e20b00ed5..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/MonthList.properties +++ /dev/null @@ -1,4 +0,0 @@ -monthName={0,choice,0#January|1#February|2#March\ -|3#April|4#May|5#June|6#July|7#August|8#September|9#October|10#November|11#December} -day={0,choice,0#|0<{0}} -dayName={0,choice,1#Monday|2#Tuesday|3#Wednesday|4#Thursday|5#Friday|6#Saturday|7#Sunday} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/ValidatedAction-expressionValidation-validation.xml b/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/ValidatedAction-expressionValidation-validation.xml deleted file mode 100644 index 50084a350..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/ValidatedAction-expressionValidation-validation.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - The bean must not be null. - - - expression - bean: - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/ValidatedAction-validation.xml b/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/ValidatedAction-validation.xml deleted file mode 100644 index 872ad5f56..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/ValidatedAction-validation.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - You must enter a name. - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/ValidatedAction-visitorValidation-validation.xml b/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/ValidatedAction-visitorValidation-validation.xml deleted file mode 100644 index c48d4070e..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/ValidatedAction-visitorValidation-validation.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - The bean must not be null. - - - bean: - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/ValidatedBean-expression-validation.xml b/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/ValidatedBean-expression-validation.xml deleted file mode 100644 index c87bfc51c..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/ValidatedBean-expression-validation.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - @com.opensymphony.webwork.example.ValidatedBean@MAX_TOTAL > (number + number2) - Invalid total! - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/ValidatedBean-validation.xml b/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/ValidatedBean-validation.xml deleted file mode 100644 index 544a6ae02..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/ValidatedBean-validation.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - Empty Text! - - - - - 01/01/1970 - Invalid Date! - - - - - 1 - 10 - Invalid Number! - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/ValidatedBean.properties b/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/ValidatedBean.properties deleted file mode 100644 index 0bfeda63d..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/ValidatedBean.properties +++ /dev/null @@ -1,4 +0,0 @@ -invalid.date=You must enter a date after ${min}. -invalid.text=You must enter some text. -invalid.number=You must enter a number between ${min} and ${max}. -invalid.total=The total of number and number2 must be less than ${@com.opensymphony.webwork.example.ValidatedBean@MAX_TOTAL}. \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/counter/package.properties b/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/counter/package.properties deleted file mode 100644 index a84c2324f..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/counter/package.properties +++ /dev/null @@ -1 +0,0 @@ -packageLevelKey = This is a package-level resource bundle! diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/Shop.properties b/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/Shop.properties deleted file mode 100644 index 682ff3843..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/Shop.properties +++ /dev/null @@ -1,22 +0,0 @@ -main.title=Music Without Borders -main.subhead=Sounds from the Global Village -main.addLabel=Add -main.qtyLabel=Quantity -main.bgcolor=#33CCFF -cart.bgcolor=#FFFFFF -cart.delLabel=Delete -cart.checkoutLabel=Checkout -checkout.bgcolor=#33CCFF -checkout.title=Music Without Borders Checkout -checkout.subhead=Thanks for your order! -checkout.totalLabel=Total -checkout.returnLabel=Shop some more! -price={0,number,currency} -dollar.exchRate=1.00 -cd.label=CD -cd.albumLabel=Album -cd.artistLabel=Artist -cd.countryLabel=Country -cd.priceLabel=Price -cd.quantityLabel=Quantity - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/Shop_de.properties b/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/Shop_de.properties deleted file mode 100644 index 6e0277107..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/Shop_de.properties +++ /dev/null @@ -1,16 +0,0 @@ -main.title=Musik ohne Grenzen -main.subhead=Klänge von der weiten Welt -main.addLabel=Hinzufügen -main.qtyLabel=Anzahl -cart.delLabel=Löschen -cart.checkoutLabel=Zur Kasse gehen -checkout.title=Musik ohne Grenzen Kasse -checkout.subhead=Vielen Dank für Ihren Auftrag! -checkout.totalLabel=Gesamt -checkout.returnLabel=Einkauf fortsetzen! -dollar.exchRate=2.00 -cd.artistLabel=Künstler -cd.countryLabel=Land -cd.priceLabel=Preis -cd.quantityLabel=Anzahl - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/Shop_en.properties b/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/Shop_en.properties deleted file mode 100644 index 682ff3843..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/Shop_en.properties +++ /dev/null @@ -1,22 +0,0 @@ -main.title=Music Without Borders -main.subhead=Sounds from the Global Village -main.addLabel=Add -main.qtyLabel=Quantity -main.bgcolor=#33CCFF -cart.bgcolor=#FFFFFF -cart.delLabel=Delete -cart.checkoutLabel=Checkout -checkout.bgcolor=#33CCFF -checkout.title=Music Without Borders Checkout -checkout.subhead=Thanks for your order! -checkout.totalLabel=Total -checkout.returnLabel=Shop some more! -price={0,number,currency} -dollar.exchRate=1.00 -cd.label=CD -cd.albumLabel=Album -cd.artistLabel=Artist -cd.countryLabel=Country -cd.priceLabel=Price -cd.quantityLabel=Quantity - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/Shop_fr.properties b/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/Shop_fr.properties deleted file mode 100644 index 4e658d1fa..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/Shop_fr.properties +++ /dev/null @@ -1,15 +0,0 @@ -main.title=Musique sans frontières -main.subhead=Sons du village global -main.addLabel=Ajouter -main.qtyLabel=Quantité -cart.delLabel=Supprimer -cart.checkoutLabel=Passez à la caisse -checkout.title= Caisse pour Musique sans frontières -checkout.subhead=Merci pour votre commande! -checkout.totalLabel=Total -checkout.returnLabel=Faites d'autres commandes! -dollar.exchRate=6.48 -cd.artistLabel=Artiste -cd.countryLabel=Pays -cd.priceLabel=Prix -cd.quantityLabel=Quantité diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/Shop_sv.properties b/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/Shop_sv.properties deleted file mode 100644 index fe11fc67a..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/Shop_sv.properties +++ /dev/null @@ -1,14 +0,0 @@ -main.title=Musik Utan Gränser -main.subhead=Ljud från den Globala Byn -main.addLabel=Lägg till -main.qtyLabel=Kvantitet -cart.delLabel=Radera -cart.checkoutLabel=Checka ut -checkout.title=Musik Utan Gränser Checka ut -checkout.subhead=Tack för din beställning! -checkout.totalLabel=Totalt -checkout.returnLabel=Handla mer! -dollar.exchRate=8.39 -cd.countryLabel=Land -cd.priceLabel=Pris -cd.quantityLabel=Kvantitet \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/cdlist.txt b/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/cdlist.txt deleted file mode 100644 index 87b3cae61..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/cdlist.txt +++ /dev/null @@ -1,10 +0,0 @@ -A Toda Cuba le Gusta,Afro-Cuban All Stars,Cuba,16.95 -Vujicsics,Vujicsics,Croatia,14.95 -Kaira,Tounami Diabate,Mali,16.95 -The Lion is Loose,Eliades Ochoa,Cuba,13.95 -Dance the Devil Away,Outback,Australia,14.95 -Record of Changes,Samulnori,Korea,12.95 -Djelika,Tounami Diabate,Mali,14.95 -Wimme,Wimme,Finland,12.95 -Cesaria Evora,Cesaria Evora,Cape Verde,16.95 -Ibuki,Kodo,Japan,13.95 diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/exchangerates.properties b/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/exchangerates.properties deleted file mode 100644 index c0847035a..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/exchangerates.properties +++ /dev/null @@ -1,7 +0,0 @@ -#Exchange rate list -US=1.0 -SE=8.39 -DE=2.0 -FR=6.48 - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/languages.properties b/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/languages.properties deleted file mode 100644 index f96b7059c..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/i18n/languages.properties +++ /dev/null @@ -1,5 +0,0 @@ -#Language list -en=English -sv=Swedish -de=German -fr=French diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/jasperreports/orders.txt b/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/jasperreports/orders.txt deleted file mode 100644 index 6b4c092f8..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/com/opensymphony/webwork/example/jasperreports/orders.txt +++ /dev/null @@ -1,9 +0,0 @@ -order,Mr Testy Tester,Level 12 Test Tower,1 Test Street,Test,NSW,2000 -line,Big Blue Widget,5,57.16 -line,Small Red Widget,11,23.14 -line,New Shiny Widget,1,109.12 -order,Mr Tested Tester, ,2 Test Street,Test Creek,NSW,2601 -line,Big Blue Widget,1,57.16 -line,Small Red Widget,53,23.14 -order,Mr Testier Tester, ,57/3 Test Street,Test Springs,NSW,2865 -line,New Shiny Widget,13,109.12 \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/components.xml b/plexus-sandbox/plexus-webwork-application/src/main/resources/components.xml deleted file mode 100644 index a5995757f..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/components.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - session - com.opensymphony.webwork.example.counter.Counter - com.opensymphony.webwork.example.counter.CounterAware - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/file-upload.xml b/plexus-sandbox/plexus-webwork-application/src/main/resources/file-upload.xml deleted file mode 100644 index f2cfa3f10..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/file-upload.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - success.jsp - input.jsp - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/i18n.xml b/plexus-sandbox/plexus-webwork-application/src/main/resources/i18n.xml deleted file mode 100644 index b8e381add..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/i18n.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - shop.vm - - - - - shop.vm - - - - - shop.vm - - - - - checkout.vm - - - - - shop.vm - - - language.vm - - - - - shop.vm - - - - - - - - - - cdlist.vm - - - - - shop.vm - - - - - - - shop.jsp - - - - - shop.jsp - - - - - shop.jsp - - - - - checkout.jsp - - - - - shop.jsp - - - language.jsp - - - - - shop.jsp - - - - - - - - - - cdlist.jsp - - - - - shop.jsp - - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/log4j.properties b/plexus-sandbox/plexus-webwork-application/src/main/resources/log4j.properties deleted file mode 100644 index 9fa217c1e..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/log4j.properties +++ /dev/null @@ -1,4 +0,0 @@ -log4j.rootLogger=WARN, A1 -log4j.appender.A1=org.apache.log4j.ConsoleAppender -log4j.appender.A1.layout=org.apache.log4j.PatternLayout -log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/month.xml b/plexus-sandbox/plexus-webwork-application/src/main/resources/month.xml deleted file mode 100644 index 01f76c303..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/month.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - monthlist.jsp - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/validators.xml b/plexus-sandbox/plexus-webwork-application/src/main/resources/validators.xml deleted file mode 100644 index ddf2d44f4..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/validators.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/webwork.properties b/plexus-sandbox/plexus-webwork-application/src/main/resources/webwork.properties deleted file mode 100644 index 13cadd51e..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/webwork.properties +++ /dev/null @@ -1,13 +0,0 @@ -webwork.locale=de_DE -webwork.multipart.saveDir=\temp -webwork.multipart.maxSize=12345 - -### Load custom property files (does not override webwork.properties!) -webwork.custom.properties=test,com/opensymphony/webwork/othertest - -# added the MockTag to the path of Tags that the TagDirective will search through -webwork.velocity.tag.path = com.opensymphony.webwork.views.velocity.ui, org.displaytag.tags - -webwork.xslt.nocache=false - -webwork.ui.templateDir = template \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/xslt.xml b/plexus-sandbox/plexus-webwork-application/src/main/resources/xslt.xml deleted file mode 100644 index 287e8209c..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/xslt.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - /xslt/simpleAction.xslt - - - - /xslt/loanCalc.xslt - /xslt/loanCalc.xslt - /xslt/loanCalc.xslt - - - - - /xslt/showtree.xslt - /xslt/showtree.xslt - /xslt/showtree.xslt - - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/resources/xwork.xml b/plexus-sandbox/plexus-webwork-application/src/main/resources/xwork.xml deleted file mode 100644 index 5f52163d8..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/resources/xwork.xml +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - /success.jsp - - - - - - - - /success.vm - - - - - - - /tags.jsp - - - - - - /tags.vm - - - - - - /country.jsp - - - - - /country.ftl - - - - /country.ftl - - - - - - /iterator.jsp - - - - - - /form.jsp - - - - - http://www.opensymphony.com - - ${foo} - - - - - /form.vm - - ${foo} - - - - - - /form.vm - - - - - /select.jsp - - - - - /form.jsp - - - /form.jsp - - - - - - - - - /form2-success.jsp - - - - - - - - - - - includetagtest.jsp - - - - included.jsp - - - - - - valid.vm - validationForm.vm - validationForm.vm - - - - - visitorValidation.action - valid.vm - validationForm.vm - validationForm.vm - - - - - expressionValidation.action - 15 - valid.vm - validationForm.vm - validationForm.vm - - - - - http://www.opensymphony.com - javascript-input.jsp - - - - - - orderList.jasper - orders - - - - - - - orderList.jasper - orders - PDF - - - - - - - orderList.jasper - orders - CSV - - - - - - orderList.jasper - orders - HTML - - - - - - orderList.jasper - orders - XLS - - - - - - orderList.jasper - orders - XML - - - - - - - - - tabbedpanetest.jsp - - - - /indexedProperties.jsp - - - - - - - - - - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/WEB-INF/c.tld b/plexus-sandbox/plexus-webwork-application/src/main/webapp/WEB-INF/c.tld deleted file mode 100644 index d69816f9b..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/WEB-INF/c.tld +++ /dev/null @@ -1,416 +0,0 @@ - - - - 1.0 - 1.2 - c - http://java.sun.com/jstl/core - JSTL core - JSTL 1.0 core library - - - - org.apache.taglibs.standard.tlv.JstlCoreTLV - - - expressionAttributes - - out:value - out:default - out:escapeXml - if:test - import:url - import:context - import:charEncoding - forEach:items - forEach:begin - forEach:end - forEach:step - forTokens:items - forTokens:begin - forTokens:end - forTokens:step - param:encode - param:name - param:value - redirect:context - redirect:url - set:property - set:target - set:value - url:context - url:value - when:test - - - Whitespace-separated list of colon-separated token pairs - describing tag:attribute combinations that accept expressions. - The validator uses this information to determine which - attributes need their syntax validated. - - - - - - catch - org.apache.taglibs.standard.tag.common.core.CatchTag - JSP - - Catches any Throwable that occurs in its body and optionally - exposes it. - - - var - false - false - - - - - choose - org.apache.taglibs.standard.tag.common.core.ChooseTag - JSP - - Simple conditional tag that establishes a context for - mutually exclusive conditional operations, marked by - <when> and <otherwise> - - - - - out - org.apache.taglibs.standard.tag.el.core.OutTag - JSP - - Like <%= ... >, but for expressions. - - - value - true - false - - - default - false - false - - - escapeXml - false - false - - - - - if - org.apache.taglibs.standard.tag.el.core.IfTag - JSP - - Simple conditional tag, which evalutes its body if the - supplied condition is true and optionally exposes a Boolean - scripting variable representing the evaluation of this condition - - - test - true - false - - - var - false - false - - - scope - false - false - - - - - import - org.apache.taglibs.standard.tag.el.core.ImportTag - org.apache.taglibs.standard.tei.ImportTEI - JSP - - Retrieves an absolute or relative URL and exposes its contents - to either the page, a String in 'var', or a Reader in 'varReader'. - - - url - true - false - - - var - false - false - - - scope - false - false - - - varReader - false - false - - - context - false - false - - - charEncoding - false - false - - - - - forEach - org.apache.taglibs.standard.tag.el.core.ForEachTag - org.apache.taglibs.standard.tei.ForEachTEI - JSP - - The basic iteration tag, accepting many different - collection types and supporting subsetting and other - functionality - - - items - false - false - - - begin - false - false - - - end - false - false - - - step - false - false - - - var - false - false - - - varStatus - false - false - - - - - forTokens - org.apache.taglibs.standard.tag.el.core.ForTokensTag - JSP - - Iterates over tokens, separated by the supplied delimeters - - - items - true - false - - - delims - true - false - - - begin - false - false - - - end - false - false - - - step - false - false - - - var - false - false - - - varStatus - false - false - - - - - otherwise - org.apache.taglibs.standard.tag.common.core.OtherwiseTag - JSP - - Subtag of <choose> that follows <when> tags - and runs only if all of the prior conditions evaluated to - 'false' - - - - - param - org.apache.taglibs.standard.tag.el.core.ParamTag - JSP - - Adds a parameter to a containing 'import' tag's URL. - - - name - true - false - - - value - false - false - - - - - redirect - org.apache.taglibs.standard.tag.el.core.RedirectTag - JSP - - Redirects to a new URL. - - - var - false - false - - - scope - false - false - - - url - true - false - - - context - false - false - - - - - remove - org.apache.taglibs.standard.tag.common.core.RemoveTag - empty - - Removes a scoped variable (from a particular scope, if specified). - - - var - true - false - - - scope - false - false - - - - - set - org.apache.taglibs.standard.tag.el.core.SetTag - JSP - - Sets the result of an expression evaluation in a 'scope' - - - var - false - false - - - value - false - false - - - target - false - false - - - property - false - false - - - scope - false - false - - - - - url - org.apache.taglibs.standard.tag.el.core.UrlTag - JSP - - Prints or exposes a URL with optional query parameters - (via the c:param tag). - - - var - false - false - - - scope - false - false - - - value - true - false - - - context - false - false - - - - - when - org.apache.taglibs.standard.tag.el.core.WhenTag - JSP - - Subtag of <choose> that includes its body if its - condition evalutes to 'true' - - - test - true - false - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/WEB-INF/lib/webwork-config-browser.jar b/plexus-sandbox/plexus-webwork-application/src/main/webapp/WEB-INF/lib/webwork-config-browser.jar deleted file mode 100644 index 1e4431e44..000000000 Binary files a/plexus-sandbox/plexus-webwork-application/src/main/webapp/WEB-INF/lib/webwork-config-browser.jar and /dev/null differ diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/WEB-INF/plexus.xml b/plexus-sandbox/plexus-webwork-application/src/main/webapp/WEB-INF/plexus.xml deleted file mode 100644 index b7fcdaefc..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/WEB-INF/plexus.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - com.opensymphony.xwork.ObjectFactory - org.codehaus.plexus.xwork.PlexusObjectFactory - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/WEB-INF/taglibs-benchmark.tld b/plexus-sandbox/plexus-webwork-application/src/main/webapp/WEB-INF/taglibs-benchmark.tld deleted file mode 100644 index 074dac85e..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/WEB-INF/taglibs-benchmark.tld +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - 1.0 - 1.1 - benchmark - http://jakarta.apache.org/taglibs/benchmark-1.0 - A tag library that facilitates performance testing of other - tag libraries or JSP constructs. • Note: You can go here for more lively - documentation. - - duration - org.apache.taglibs.benchmark.Duration - jsp - - repeat - false - false - - - output - false - false - - - - exclude - org.apache.taglibs.benchmark.Exclude - jsp - - - - - - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/WEB-INF/velocity.properties b/plexus-sandbox/plexus-webwork-application/src/main/webapp/WEB-INF/velocity.properties deleted file mode 100644 index 4056d053a..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/WEB-INF/velocity.properties +++ /dev/null @@ -1,3 +0,0 @@ -# Velocity Macro libraries. The webwork.vm comes standard with webwork. The tigris-macros.vm comes with the config -# browser. -velocimacro.library = webwork.vm, tigris-macros.vm \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/WEB-INF/web.xml b/plexus-sandbox/plexus-webwork-application/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 2b7b14d70..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - - - Plexus and WebWork Test App - - - - - - - - - - - - org.codehaus.plexus.servlet.PlexusServletContextListener - - - - org.codehaus.plexus.webwork.servlet.PlexusWebWorkApplicationLifecycleListener - - - - org.codehaus.plexus.webwork.servlet.PlexusWebWorkSessionLifecycleListener - - - - - - webwork - com.opensymphony.webwork.dispatcher.ServletDispatcher - - - - validation - com.opensymphony.webwork.validators.ValidationServlet - - - - freemarker - com.opensymphony.webwork.views.freemarker.FreemarkerServlet - 1 - - - - velocity - com.opensymphony.webwork.views.velocity.WebWorkVelocityServlet - 1 - - - - freemarker - *.ftl - - - - webwork - *.action - - - - validation - /validation - - - - velocity - *.vm - - - - index.jsp - default.jsp - index.html - - - - webwork - /WEB-INF/webwork.tld - - - - benchmark - /WEB-INF/taglibs-benchmark.tld - - - - c - /WEB-INF/c.tld - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/WEB-INF/webwork.tld b/plexus-sandbox/plexus-webwork-application/src/main/webapp/WEB-INF/webwork.tld deleted file mode 100644 index 89037bb95..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/WEB-INF/webwork.tld +++ /dev/null @@ -1,2469 +0,0 @@ - - - - 1.1 - 1.2 - webwork - webwork - A tag library for processing Model-2 command results - - - action - com.opensymphony.webwork.views.jsp.ActionTag - JSP - - Executes an Action from within the context of a taglib. - The body of the tag is used to display the results of - the action invocation. - - - id - false - true - - - name - true - true - - - namespace - false - true - - - executeResult - false - true - - - - - include - com.opensymphony.webwork.views.jsp.IncludeTag - JSP - Used to include another page or action. - - page - false - true - - - value - false - true - - - - - bean - com.opensymphony.webwork.views.jsp.BeanTag - JSP - - Create a JavaBean and instantiate its properties. It - is then placed in the ActionContext for later use. - - - name - true - true - - - id - false - true - - - - - set - com.opensymphony.webwork.views.jsp.SetTag - empty - - Sets the value of an object in the VS to a scope - (page, stack, application, session). If the value - is not given, the top of the stack is used. If the - scope is not given, the default scope of "webwork" - is used. - - - name - true - true - - - value - false - true - - - scope - false - true - - - - - text - com.opensymphony.webwork.views.jsp.ui.TextTag - JSP - Print out or stores in the ActionContext an internationalized string - - id - false - true - - - name - true - true - - - value0 - false - false - - - value1 - false - false - - - value2 - false - false - - - value3 - false - false - - - - - property - com.opensymphony.webwork.views.jsp.PropertyTag - empty - - Used to get the value of a result attribute. - If the value isn't given, the top of the stack will - be returned. - - - value - false - true - - - default - false - true - - - escape - false - true - - - - - param - com.opensymphony.webwork.views.jsp.ParamTag - JSP - - Sets a parent tag's parameter. - - - name - false - true - - - value - false - true - - - - - url - com.opensymphony.webwork.views.jsp.URLTag - JSP - Url builds an encoded URL. - - value - false - true - - - scheme - false - true - - - id - false - true - - - includeParams - false - true - - - includeContext - false - false - - - encode - false - false - - - - - if - com.opensymphony.webwork.views.jsp.IfTag - JSP - Evaluates a boolean expression - - test - true - true - - - id - false - true - - - - - elseIf - com.opensymphony.webwork.views.jsp.ElseIfTag - JSP - Evaluates a boolean expression - - test - true - true - - - id - false - true - - - - - - elseif - com.opensymphony.webwork.views.jsp.ElseIfTag - JSP - Evaluates a boolean expression - - test - true - true - - - id - false - true - - - - - else - com.opensymphony.webwork.views.jsp.ElseTag - JSP - Evaluates a boolean expression - - id - false - true - - - - - push - com.opensymphony.webwork.views.jsp.PushTag - JSP - Pushes a value on the stack - - value - true - true - - - - - iterator - com.opensymphony.webwork.views.jsp.IteratorTag - JSP - Iterates over a collection - - value - false - true - - - status - false - true - - - id - false - true - - - - - i18n - com.opensymphony.webwork.views.jsp.I18nTag - JSP - Place a resource bundle on the value stack, for access by the text tag - - name - true - false - - - - - - subset - com.opensymphony.webwork.views.jsp.iterator.SubsetIteratorTag - JSP - Get subset of an iterator - - source - false - false - - - count - false - false - - - start - false - false - - - id - false - false - - - - sort - com.opensymphony.webwork.views.jsp.iterator.SortIteratorTag - JSP - Sort an iterator - - source - false - false - - - comparator - true - false - - - id - false - false - - - - append - com.opensymphony.webwork.views.jsp.iterator.AppendIteratorTag - JSP - Append several iterators - - id - false - false - - - - merge - com.opensymphony.webwork.views.jsp.iterator.MergeIteratorTag - JSP - Merge several iterators into one - - id - false - false - - - - generator - com.opensymphony.webwork.views.jsp.iterator.IteratorGeneratorTag - JSP - Generate iterators - - val - true - false - - - separator - false - false - - - count - false - false - - - id - false - false - - - - - - checkbox - com.opensymphony.webwork.views.jsp.ui.CheckboxTag - JSP - An HTML Checkbox UI widget - - id - false - true - - - cssClass - false - true - - - cssStyle - false - true - - - theme - false - true - - - template - false - true - - - label - false - true - - - labelposition - false - false - - - required - false - true - - - name - true - true - - - value - false - true - - - fieldValue - true - false - - - disabled - false - false - - - tabindex - false - false - - - - onclick - false - false - - - ondblclick - false - false - - - onmousedown - false - false - - - onmouseup - false - false - - - onmouseover - false - false - - - onmousemove - false - false - - - onmouseout - false - false - - - onfocus - false - false - - - onblur - false - false - - - onkeypress - false - false - - - onkeydown - false - false - - - onkeyup - false - false - - - onselect - false - false - - - onchange - false - false - - - - - checkboxlist - com.opensymphony.webwork.views.jsp.ui.CheckboxListTag - JSP - An HTML Checkbox List UI widget - - id - false - false - - - cssClass - false - true - - - cssStyle - false - true - - - theme - false - true - - - template - false - true - - - label - false - true - - - labelposition - false - false - - - required - false - true - - - name - true - true - - - value - false - true - - - list - false - true - - - listKey - false - true - - - listValue - false - true - - - disabled - false - false - - - - - component - com.opensymphony.webwork.views.jsp.ui.ComponentTag - JSP - An HTML Component UI widget - - id - false - false - - - cssClass - false - true - - - cssStyle - false - true - - - theme - false - true - - - template - true - true - - - label - false - true - - - labelposition - false - true - - - required - false - true - - - name - false - true - - - value - false - true - - - - - form - com.opensymphony.webwork.views.jsp.ui.FormTag - JSP - An HTML Component UI widget - - id - false - false - - - cssClass - false - true - - - cssStyle - false - true - - - theme - false - true - - - template - false - true - - - openTemplate - false - true - - - name - false - true - - - action - false - true - - - target - false - true - - - namespace - false - true - - - method - false - true - - - enctype - false - true - - - validate - false - true - - - - - token - com.opensymphony.webwork.views.jsp.ui.TokenTag - JSP - An HTML Component UI widget - - theme - false - true - - - template - false - true - - - name - false - true - - - - - label - com.opensymphony.webwork.views.jsp.ui.LabelTag - JSP - An HTML Label UI widget - - id - false - false - - - cssClass - false - true - - - cssStyle - false - true - - - theme - false - true - - - template - false - true - - - label - false - true - - - labelposition - false - false - - - required - false - true - - - name - false - true - - - value - false - true - - - - - password - com.opensymphony.webwork.views.jsp.ui.PasswordTag - JSP - An HTML Password UI widget - - id - false - false - - - cssClass - false - true - - - cssStyle - false - true - - - theme - false - true - - - template - false - true - - - label - false - true - - - labelposition - false - false - - - required - false - true - - - name - true - true - - - value - false - true - - - size - false - true - - - maxlength - false - false - - - disabled - false - false - - - readonly - false - false - - - tabindex - false - false - - - show - false - false - - - - onclick - false - false - - - ondblclick - false - false - - - onmousedown - false - false - - - onmouseup - false - false - - - onmouseover - false - false - - - onmousemove - false - false - - - onmouseout - false - false - - - onfocus - false - false - - - onblur - false - false - - - onkeypress - false - false - - - onkeydown - false - false - - - onkeyup - false - false - - - onselect - false - false - - - onchange - false - false - - - - - hidden - com.opensymphony.webwork.views.jsp.ui.HiddenTag - JSP - An HTML Hidden UI widget - - id - false - false - - - cssClass - false - true - - - cssStyle - false - true - - - theme - false - true - - - template - false - true - - - name - true - true - - - value - false - true - - - - - submit - com.opensymphony.webwork.views.jsp.ui.SubmitTag - JSP - An HTML Hidden UI widget - - id - false - false - - - cssClass - false - true - - - cssStyle - false - true - - - label - false - true - - - labelposition - false - false - - - theme - false - true - - - template - false - true - - - name - false - true - - - value - true - true - - - align - false - true - - - - - radio - com.opensymphony.webwork.views.jsp.ui.RadioTag - JSP - An HTML Radiobox UI widget - - id - false - false - - - cssClass - false - true - - - cssStyle - false - true - - - theme - false - true - - - template - false - true - - - label - false - true - - - labelposition - false - false - - - required - false - true - - - name - true - true - - - value - false - true - - - list - false - true - - - listKey - false - true - - - listValue - false - true - - - disabled - false - false - - - tabindex - false - false - - - - onclick - false - false - - - ondblclick - false - false - - - onmousedown - false - false - - - onmouseup - false - false - - - onmouseover - false - false - - - onmousemove - false - false - - - onmouseout - false - false - - - onfocus - false - false - - - onblur - false - false - - - onkeypress - false - false - - - onkeydown - false - false - - - onkeyup - false - false - - - onselect - false - false - - - onchange - false - false - - - - - combobox - com.opensymphony.webwork.views.jsp.ui.ComboBoxTag - JSP - Combo box - - id - false - false - - - cssClass - false - true - - - cssStyle - false - true - - - size - false - false - - - maxlength - false - false - - - theme - false - false - - - label - false - false - - - name - true - true - - - value - false - false - - - labelposition - false - false - - - list - true - false - - - disabled - false - false - - - onkeyup - false - false - - - tabindex - false - false - - - - onclick - false - false - - - ondblclick - false - false - - - onmousedown - false - false - - - onmouseup - false - false - - - onmouseover - false - false - - - onmousemove - false - false - - - onmouseout - false - false - - - onfocus - false - false - - - onblur - false - false - - - onkeypress - false - false - - - onkeydown - false - false - - - onkeyup - false - false - - - onselect - false - false - - - onchange - false - false - - - - - select - com.opensymphony.webwork.views.jsp.ui.SelectTag - JSP - An HTML Select UI widget - - id - false - false - - - cssClass - false - true - - - cssStyle - false - true - - - theme - false - true - - - template - false - true - - - label - false - true - - - labelposition - false - false - - - required - false - true - - - name - true - true - - - value - false - true - - - list - false - true - - - listKey - false - true - - - listValue - false - true - - - emptyOption - false - true - - - multiple - false - true - - - size - false - true - - - disabled - false - false - - - tabindex - false - false - - - headerKey - false - false - - - headerValue - false - false - - - - onclick - false - false - - - ondblclick - false - false - - - onmousedown - false - false - - - onmouseup - false - false - - - onmouseover - false - false - - - onmousemove - false - false - - - onmouseout - false - false - - - onfocus - false - false - - - onblur - false - false - - - onkeypress - false - false - - - onkeydown - false - false - - - onkeyup - false - false - - - onselect - false - false - - - onchange - false - false - - - - - doubleselect - com.opensymphony.webwork.views.jsp.ui.DoubleSelectTag - JSP - An HTML Double Select UI widget - - theme - false - true - - - template - false - true - - - label - false - true - - - labelposition - false - false - - - required - false - true - - - name - true - true - - - formName - true - true - - - doubleName - true - true - - - value - false - true - - - list - false - true - - - listKey - false - true - - - listValue - false - true - - - doubleList - false - true - - - doubleListKey - false - true - - - doubleListValue - false - true - - - multiple - false - true - - - size - false - true - - - - - textarea - com.opensymphony.webwork.views.jsp.ui.TextareaTag - JSP - An HTML Textarea UI widget - - id - false - true - - - cssClass - false - true - - - cssStyle - false - true - - - theme - false - true - - - template - false - true - - - label - false - true - - - labelposition - false - false - - - required - false - true - - - name - true - true - - - value - false - true - - - rows - false - true - - - cols - false - true - - - wrap - false - true - - - disabled - false - false - - - readonly - false - false - - - tabindex - false - false - - - - onclick - false - false - - - ondblclick - false - false - - - onmousedown - false - false - - - onmouseup - false - false - - - onmouseover - false - false - - - onmousemove - false - false - - - onmouseout - false - false - - - onfocus - false - false - - - onblur - false - false - - - onkeypress - false - false - - - onkeydown - false - false - - - onkeyup - false - false - - - onselect - false - false - - - onchange - false - false - - - - - textfield - com.opensymphony.webwork.views.jsp.ui.TextFieldTag - JSP - An HTML TextField UI widget - - id - false - true - - - cssClass - false - true - - - cssStyle - false - true - - - theme - false - true - - - template - false - true - - - label - false - true - - - labelposition - false - false - - - required - false - true - - - name - true - true - - - value - false - true - - - size - false - true - - - maxlength - false - false - - - disabled - false - false - - - readonly - false - false - - - tabindex - false - false - - - - onclick - false - false - - - ondblclick - false - false - - - onmousedown - false - false - - - onmouseup - false - false - - - onmouseover - false - false - - - onmousemove - false - false - - - onmouseout - false - false - - - onfocus - false - false - - - onblur - false - false - - - onkeypress - false - false - - - onkeydown - false - false - - - onkeyup - false - false - - - onselect - false - false - - - onchange - false - false - - - - - file - com.opensymphony.webwork.views.jsp.ui.FileTag - JSP - An HTML File UI widget - - id - false - true - - - cssClass - false - true - - - cssStyle - false - true - - - theme - false - true - - - template - false - true - - - label - false - true - - - labelposition - false - false - - - required - false - true - - - name - true - true - - - value - false - true - - - size - false - true - - - accept - false - true - - - - onclick - false - false - - - ondblclick - false - false - - - onmousedown - false - false - - - onmouseup - false - false - - - onmouseover - false - false - - - onmousemove - false - false - - - onmouseout - false - false - - - onfocus - false - false - - - onblur - false - false - - - onkeypress - false - false - - - onkeydown - false - false - - - onkeyup - false - false - - - onselect - false - false - - - onchange - false - false - - - - - table - com.opensymphony.webwork.views.jsp.ui.table.WebTable - JSP - WebTable - - theme - false - false - - - modelName - true - false - - - sortable - false - false - - - sortColumn - false - false - - - sortOrder - false - false - - - - - tabbedpane - com.opensymphony.webwork.views.jsp.ui.TabbedPaneTag - JSP - TabbedPane Tag - - id - false - false - - - theme - false - false - - - contentName - true - false - - - tabAlign - false - false - - - - - - field - com.opensymphony.webwork.views.jsp.vui.FieldTag - JSP - Field VUI Tag - - theme - false - false - - - templateheader - false - false - - - templatefooter - false - false - - - name - true - false - - - modal - false - false - - - slot - false - false - - - cond - false - false - - - type - false - false - - - - grammar - com.opensymphony.webwork.views.jsp.vui.GrammarTag - JSP - Grammar VUI Tag - - theme - false - false - - - templateheader - false - false - - - templatefooter - false - false - - - name - true - false - - - model - false - false - - - lang - false - false - - - weight - false - false - - - mode - false - false - - - - audio - com.opensymphony.webwork.views.jsp.vui.AudioTag - JSP - Audio VUI Tag - - theme - false - false - - - templateheader - false - false - - - templatefooter - false - false - - - src - false - false - - - expr - false - false - - - tts - false - false - - - persona - false - false - - - fetchhint - false - false - - - fetchtimeout - false - false - - - maxage - false - false - - - maxstale - false - false - - - - prompt - com.opensymphony.webwork.views.jsp.vui.PromptTag - JSP - Prompt VUI Tag - - theme - false - false - - - templateheader - false - false - - - templatefooter - false - false - - - bargein - false - false - - - timeout - false - false - - - cond - false - false - - - count - false - false - - - lang - false - false - - - - filled - com.opensymphony.webwork.views.jsp.vui.FilledTag - JSP - Filled VUI Tag - - theme - false - false - - - templateheader - false - false - - - templatefooter - false - false - - - action - false - false - - - actionaudio - false - false - - - mode - false - false - - - namelist - false - false - - - - log - com.opensymphony.webwork.views.jsp.vui.LogTag - JSP - Log VUI Tag - - theme - false - false - - - templateheader - false - false - - - templatefooter - false - false - - - label - false - false - - - expr - false - false - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/action.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/action.jsp deleted file mode 100644 index b7f04d269..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/action.jsp +++ /dev/null @@ -1,10 +0,0 @@ -<%@ taglib prefix="ww" uri="webwork" %> - - - - - - counter.count == - foo is also: - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/action.vm b/plexus-sandbox/plexus-webwork-application/src/main/webapp/action.vm deleted file mode 100644 index adf3625aa..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/action.vm +++ /dev/null @@ -1,10 +0,0 @@ - -#bodytag( Action "name='VelocityCounter'" "id=vc" ) -#param( "name=foo" "value='BAR'" ) -#end - -#bodytag( Push "value=#vc" ) - counter.count == $counter.count - foo is also: $foo -#end - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/actiontagbug.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/actiontagbug.jsp deleted file mode 100644 index a7103052f..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/actiontagbug.jsp +++ /dev/null @@ -1,18 +0,0 @@ -<%@ taglib prefix="ww" uri="webwork" %> - - - - - -


- - - - - -
- - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/bean.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/bean.jsp deleted file mode 100644 index cd50b5bd8..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/bean.jsp +++ /dev/null @@ -1,14 +0,0 @@ -<%@ taglib prefix="ww" uri="webwork" %> -<%@ taglib uri="c" prefix="c" %> - - - - - Inside the Bean tag, the value of foo is :
-
- -Testing to see if the Bean's value is available outside of the ww:bean tag:
-foo is :
- -Testing to see if Bean's value is available outside of the ww:bean tag using JSTL:
-foo is :
\ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/country.ftl b/plexus-sandbox/plexus-webwork-application/src/main/webapp/country.ftl deleted file mode 100644 index 51afec41d..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/country.ftl +++ /dev/null @@ -1,62 +0,0 @@ -<#-- - -Freemarker Demonstration -------------------------- - -* uses the benchmark taglib to measure the speed of generating an option list -* illustrates iteration over a list -* illustrates using a macro as a parameter... do that in velocity :) -* illustrates scraping the output of a nested template block into a variable -* illustrates string to number conversion, and vice versa - ---> -<#assign benchmark=JspTaglibs["/WEB-INF/taglibs-benchmark.tld"] /> -<#assign count = 100/> - - - Freemarker Demo - - - -<@heading>Freemarker Demonstration -
    -
  • uses the benchmark taglib to measure the speed of generating an option list -
  • illustrates iteration over a list -
  • illustrates using a macro as a parameter... do that in velocity :) -
  • illustrates scraping the output of a nested template block into a variable -
  • illustrates string to number conversion, and vice versa -
-<@title>Duration to output country list -<@msg>(averaged over ${count} repetitions) -

- <#assign duration><@benchmark.duration><@repeat macro=renderCountries count=count/> - ${duration?number / count} ms each -

-<@title>Country List -<@renderCountries/> - - - -<#macro heading> -

<#nested/>

- -<#macro msg> -

<#nested/>

- -<#macro title> -

<#nested/>

- - -<#macro renderCountries> -
    - <#list countries as country> -
  • ${country[0]}
  • - -
- - -<#macro repeat macro count> - <#list 1..count as c> - <@macro/> - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/country.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/country.jsp deleted file mode 100644 index 2b739119f..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/country.jsp +++ /dev/null @@ -1,18 +0,0 @@ -<%@ taglib uri="webwork" prefix="ww" %> -<%@ taglib uri="benchmark" prefix="benchmark" %> - -<%-- this is to make our special controlfooter not close the row yet --%> - - - - - - Tag - Time - - - - - ms - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/default.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/default.jsp deleted file mode 100644 index 9e944d71d..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/default.jsp +++ /dev/null @@ -1,211 +0,0 @@ - - - - - OpenSymphony WebWork2 Examples - - - - - -

OpenSymphony WebWork2 Examples

- -

-Note, some of the examples might be slow the first time they are run as resources -are loaded and JSP pages are compiled. -

- -

-Simple Examples -

- - - - -

-UI Tag Examples -

- - - - -

-Stress Tests -

- - - - -

-Iterator Examples -

- - - - -

-Form Examples -

- - - - -

-Exception Examples -

- - - - -

-Configuration Browser -

- -
    -
  • View the WebWork2 - configuration browser -

    - This is an example of a reusable set of Actions and views bundled as a - Jar file. The config browser can be included with any WebWork2 - application by dropping the Jar file in your classpath (usually under - WEB-INF/lib) and adding - <include file="config-browser.xml"/> to your - xwork.xml file -

    -
  • -
- - -

-Validation Examples -

- - - - -

-Jasper Reports Examples -

- - - - -

-Internationalization (i18n) Examples -

- - - -

-Misc Examples -

- - - -

-Freemarker Examples -

- - -

-Visit the OpenSymphony WebWork2 site! -

- - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/displaytag.vm b/plexus-sandbox/plexus-webwork-application/src/main/webapp/displaytag.vm deleted file mode 100644 index a94d57fee..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/displaytag.vm +++ /dev/null @@ -1,336 +0,0 @@ - - - - - -#set( $action = $stack.findValue("new com.opensymphony.webwork.example.ui.SimpleAction()") ) -$req.setAttribute("list", $action.list) - -#tag( Table "name=list" ) - -#bodytag( Table "name=list" ) - #tag( Column "property=key" ) - #tag( Column "property=value" ) - #tag( Column "title=static value" "value=static" ) -#end - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/error.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/error.jsp deleted file mode 100644 index c758a30bf..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/error.jsp +++ /dev/null @@ -1 +0,0 @@ -error! \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/bank/confirm.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/bank/confirm.jsp deleted file mode 100644 index 238a91920..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/bank/confirm.jsp +++ /dev/null @@ -1,14 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - - - -MyBank - Transfer - - -

will be transferred to account (owned by ) on day this month

- - Back - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/bank/index.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/bank/index.jsp deleted file mode 100644 index 57004a23d..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/bank/index.jsp +++ /dev/null @@ -1 +0,0 @@ - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/bank/transfer.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/bank/transfer.jsp deleted file mode 100644 index fb1d1a64f..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/bank/transfer.jsp +++ /dev/null @@ -1,33 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> -<%@ taglib uri="webwork" prefix="ui" %> -<%@ taglib uri="webwork" prefix="iterator" %> - - - - -MyBank - Transfer - - - -

Money Transfer

- " method="post"> - - - - - - - - - - - - - - -
- -

- This is a WebWork adaptation of the Struts example by Thor Kristmundsson. - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/events/autologin.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/events/autologin.jsp deleted file mode 100644 index 5402e86dc..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/events/autologin.jsp +++ /dev/null @@ -1,7 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/events/index.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/events/index.jsp deleted file mode 100644 index b1c89afed..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/events/index.jsp +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/events/login.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/events/login.jsp deleted file mode 100644 index e7b64a928..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/events/login.jsp +++ /dev/null @@ -1,40 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> -<%@ taglib uri="webwork" prefix="ui" %> - - - - - - Login Screen - - - - - -

- - - - - - - - - - - - - - - - - -
-

James Bond's
Super-Secret Login Screen

- -
- -
- - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/events/success.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/events/success.jsp deleted file mode 100644 index d56519e5c..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/events/success.jsp +++ /dev/null @@ -1,20 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - - - - Welcome! - - - - -Welcome ! (You were automatically logged in) -

-You have been here times before. -

-Either log out or return to main test page. - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/applet/applet.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/applet/applet.jsp deleted file mode 100644 index f9dd5a54c..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/applet/applet.jsp +++ /dev/null @@ -1,28 +0,0 @@ - - -
- - - - - - - - - - - - </COMMENT> - No Java 2 SDK, Standard Edition v 1.3 support for APPLET!! - - - -
- - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/applet/index.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/applet/index.jsp deleted file mode 100644 index 4978767e8..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/applet/index.jsp +++ /dev/null @@ -1,25 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - - - - -

- - - - - -
WebWork Test Application
- - - - - -
-HelloWorld example -
- - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/footer.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/footer.jsp deleted file mode 100644 index b14196379..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/footer.jsp +++ /dev/null @@ -1,7 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - -
-HelloWorld example - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/header.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/header.jsp deleted file mode 100644 index 2c71c78bb..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/header.jsp +++ /dev/null @@ -1,8 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/index.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/index.jsp deleted file mode 100644 index 5e8620856..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/index.jsp +++ /dev/null @@ -1,3 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/login.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/login.jsp deleted file mode 100644 index 3d0159e0d..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/login.jsp +++ /dev/null @@ -1,22 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> -<%@ taglib uri="webwork" prefix="ui" %> - - - -

Login

- - -
-
- -
- - - - - - - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/loginlink.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/loginlink.jsp deleted file mode 100644 index 0daae3c47..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/loginlink.jsp +++ /dev/null @@ -1,5 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - -
-Login -
diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/loginstatus.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/loginstatus.jsp deleted file mode 100644 index 96c096b14..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/loginstatus.jsp +++ /dev/null @@ -1,6 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - -
-You are logged in as -
- diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/phrase.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/phrase.jsp deleted file mode 100644 index d3404f3a1..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/phrase.jsp +++ /dev/null @@ -1,20 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - -

HelloWorld example

- - -Could not create greeting:
- -
-
-
- -
-Greeting:"> -Name:"> - -
- - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/showgreeting.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/showgreeting.jsp deleted file mode 100644 index 7c66f1a4c..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/brief/showgreeting.jsp +++ /dev/null @@ -1,20 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - -

- -">Try again - - - - - - - - - - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/index.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/index.jsp deleted file mode 100644 index 89bdc91bb..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/index.jsp +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/selectview.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/selectview.jsp deleted file mode 100644 index fad9b0ccf..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/selectview.jsp +++ /dev/null @@ -1,5 +0,0 @@ -
-Brief | -Verbose | -Applet -
diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/footer.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/footer.jsp deleted file mode 100644 index 50f455dee..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/footer.jsp +++ /dev/null @@ -1,11 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - -HelloWorld example - - - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/header.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/header.jsp deleted file mode 100644 index 30d2acae1..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/header.jsp +++ /dev/null @@ -1,15 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - - - - -
- - - - - - #CCCCCC - - - - - - - - - - - - - - - -

- -
- diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/xslt/primes.xslt b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/xslt/primes.xslt deleted file mode 100644 index 40446b2ac..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/xslt/primes.xslt +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - -Primes from <xsl:value-of select="start"/> to <xsl:value-of select="end"/> - - - -

Primes from to

- - - -
- - - : -
- -
-
diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/fileUpload/input.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/fileUpload/input.jsp deleted file mode 100644 index 7e61df4f2..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/fileUpload/input.jsp +++ /dev/null @@ -1,15 +0,0 @@ -<%@ taglib prefix="ww" uri="webwork" %> - - File Upload - - - - - - - - - - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/fileUpload/success.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/fileUpload/success.jsp deleted file mode 100644 index c0101fa04..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/fileUpload/success.jsp +++ /dev/null @@ -1,4 +0,0 @@ - - Success - SUCCESS! - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/form.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/form.jsp deleted file mode 100644 index 3435bfb2a..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/form.jsp +++ /dev/null @@ -1,37 +0,0 @@ -<%@ taglib prefix="ww" uri="webwork" %> - -OpenSymphony WebWork2 Form Example - - -

- -ERRORS:
-

    - -
  • -
    -
- -

-
-Status:

-Test Form with valid token
- -
-

WebWork Test Application
- - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/index.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/index.jsp deleted file mode 100644 index a37784cf3..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/index.jsp +++ /dev/null @@ -1,34 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - - - - -
- - - - - -
WebWork Test Application
- - - - - - - - - -
-HelloWorld example -
- - - - - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/login.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/login.jsp deleted file mode 100644 index 946993017..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/login.jsp +++ /dev/null @@ -1,24 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> -<%@ taglib uri="webwork" prefix="ui" %> - - - - -
-
- -
" METHOD="POST"> - - - - - - - - -
" >
-
- - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/loginlink.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/loginlink.jsp deleted file mode 100644 index bc415ca5f..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/loginlink.jsp +++ /dev/null @@ -1,5 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - -
-">Login -
diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/loginstatus.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/loginstatus.jsp deleted file mode 100644 index 96c096b14..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/loginstatus.jsp +++ /dev/null @@ -1,6 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - -
-You are logged in as -
- diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/phrase.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/phrase.jsp deleted file mode 100644 index 8076023be..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/phrase.jsp +++ /dev/null @@ -1,21 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> -<%@ taglib uri="webwork" prefix="ui" %> - -
" METHOD="POST"> - -
Enter greeting phrase and your name (HINT: try "Hello" and "World")
- - - - - - - - - "> - - - - -
Name:
-
diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/showgreeting.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/showgreeting.jsp deleted file mode 100644 index dbe318e3d..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/helloworld/verbose/showgreeting.jsp +++ /dev/null @@ -1,8 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - -
Here is a greeting for you
- - - -
">Try again
diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/hiturl.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/hiturl.jsp deleted file mode 100644 index bfec5568a..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/hiturl.jsp +++ /dev/null @@ -1,63 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> -<%@ taglib uri="webwork" prefix="ui" %> - - - - - -Hit URL - - - -

Hit URL test

- -This page allow you to hit a URL a number of times, and gather statistics regarding the time it takes to retrieve it. -This is a good way to determine the performance of a particular page. Note that if you are using a HotSpot server, or similar, -you will see that the it takes a while for the JVM to "warm up", so make a few runs until the timings become stable. - -
-
" method="GET"> - - - - - - - - - - - -
- -
- -
- - - - - -
-Size:
-Total time: -
- -Average time:
-Mean time:
-Fastest time:
-Slowest time:
-Nr of errors:
-Nr of connect errors:
-

-All times:
-

    - -
  1. - -
- -
- - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/i18n/cart.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/i18n/cart.jsp deleted file mode 100644 index 749cd8c99..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/i18n/cart.jsp +++ /dev/null @@ -1,46 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - - -
- '> - - - - - - - - - - - - - - - - - - - - - - - - -
-
- '> - -
-
-

-

-

- '> -
-
- -
-
diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/i18n/cdlist.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/i18n/cdlist.jsp deleted file mode 100644 index d15d7b07c..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/i18n/cdlist.jsp +++ /dev/null @@ -1,13 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/i18n/checkout.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/i18n/checkout.jsp deleted file mode 100644 index cc1171a28..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/i18n/checkout.jsp +++ /dev/null @@ -1,57 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - - - <webwork:text name="'checkout.title'"/> - - - -'> - - - -


- -

-

- '> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- -

- - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/i18n/index.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/i18n/index.jsp deleted file mode 100644 index f0d5fe416..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/i18n/index.jsp +++ /dev/null @@ -1 +0,0 @@ - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/i18n/language.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/i18n/language.jsp deleted file mode 100644 index 562d3414d..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/i18n/language.jsp +++ /dev/null @@ -1,28 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> -<%@ taglib uri="webwork" prefix="ui" %> - - - - -<webwork:text name="'main.title'"/> - - -"> - - - -
-

-Please select a language: -

- - - - - -

- -

- - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/i18n/price.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/i18n/price.jsp deleted file mode 100644 index efc61e57b..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/i18n/price.jsp +++ /dev/null @@ -1,2 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/i18n/shop.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/i18n/shop.jsp deleted file mode 100644 index 2334166f9..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/i18n/shop.jsp +++ /dev/null @@ -1,36 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> -<%@ taglib uri="webwork" prefix="ui" %> - - - - - <webwork:text name="'main.title'"/> - - - -'> - - - -
- - -
-

- -

-
- - : - - - - "> - -
-

- - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/jdom.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/jdom.jsp deleted file mode 100644 index 2e4725184..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/jdom.jsp +++ /dev/null @@ -1,26 +0,0 @@ - - -JDOM tests - - - -<%@ taglib uri="webwork" prefix="webwork" %> -<%@ taglib uri="webwork" prefix="iterator" %> - -

Testing XML display using JDOM

- - - -
- - Names:
- - (Karma=)
-
- -Time:ms
- -Total time:ms
- - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/month.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/month.jsp deleted file mode 100644 index f11d294e7..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/month.jsp +++ /dev/null @@ -1,44 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> -<%@ taglib uri="webwork" prefix="ui" %> - - - - - - - - - - - - - - - - - - - - - -
-Test - - - -
- - - -
- -Time:ms - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/month/month.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/month/month.jsp deleted file mode 100644 index f11d294e7..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/month/month.jsp +++ /dev/null @@ -1,44 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> -<%@ taglib uri="webwork" prefix="ui" %> - - - - - - - - - - - - - - - - - - - - - -
-Test - - - -
- - - -
- -Time:ms - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/month/monthselector.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/month/monthselector.jsp deleted file mode 100644 index 148ce9340..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/month/monthselector.jsp +++ /dev/null @@ -1,26 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - - - - - - - - - - - - - - - - - - -
Month
BGCOLOR="yellow"> - "> -
- -
diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/month/monthview.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/month/monthview.jsp deleted file mode 100644 index ceb3f9b38..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/month/monthview.jsp +++ /dev/null @@ -1,70 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - - - - - - - - - - - - - - - d - E - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Day
Week
 BGCOLOR="yellow" - BGCOLOR=#EEAAAA> - ">  -
- -
diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/monthlist.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/monthlist.jsp deleted file mode 100644 index ac45019d1..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/monthlist.jsp +++ /dev/null @@ -1,67 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> -<%@ page buffer="17kb" %> - - - - -

This year

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - -
Week
BGCOLOR=#EEAAAA>  
-
- -
-
- -
- -Time:ms - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/monthlist.vm b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/monthlist.vm deleted file mode 100644 index ce68f8c4d..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/monthlist.vm +++ /dev/null @@ -1,95 +0,0 @@ -#bean("com.opensymphony.webwork.util.Timer" $timer) - - - -

This year

- -#bean("com.opensymphony.webwork.util.DateFormatter" $monthformat) -#set ($monthformat.parseFormat = "M") -#set ($monthformat.format = "MMMMMMM") - -#bean ("com.opensymphony.webwork.util.DateFormatter" $format) -#set ($format.parseFormat = "d") -#set ($format.format = "EEEE") - -#bean ("com.opensymphony.webwork.util.Counter" $monthcounter) -$monthcounter.setFirst($webwork.toLong(1)) -$monthcounter.setLast($webwork.toLong(12)) - -#foreach ($monthnr in [0..11]) - #bodytag( Action "name='monthlist'" "id=month" ) - #param( "name=month" "value=$monthnr" ) - #end - #set ($month = $stack.findValue('#attr.month')) - - - - - - - - - - -#bean ("com.opensymphony.webwork.util.Counter" $day) -$day.setFirst($month.firstDay) -$day.setInterval($webwork.toLong("86400000")) - -$format.setTime($day.next) - - -$format.setTime($day.next) - - -$format.setTime($day.next) - - -$format.setTime($day.next) - - -$format.setTime($day.next) - - -$format.setTime($day.next) - - -$format.setTime($day.next) - - - -#bean ("com.opensymphony.webwork.util.Counter" $week) -$week.setFirst($webwork.toLong(1)) -$week.setCurrent($webwork.toLong($month.firstWeek)) -$week.setLast($webwork.toLong(52)) -$week.setWrap(true) - -#foreach ($weeklist in $month.weeks) - - - -#foreach ($weekday in $weeklist) - - -#end - - - -#end -
  -$monthformat.setDate($webwork.toString($monthcounter.next)) -$monthformat.formattedDate -
Week$format.formattedDate$format.formattedDate$format.formattedDate$format.formattedDate$format.formattedDate$format.formattedDate$format.formattedDate
$week.next -#if ($webwork.toInt($weekday) > 0) -$weekday -#end -  -
-
- -#end - -Time:${timer.time}ms - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/monthselector.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/monthselector.jsp deleted file mode 100644 index 148ce9340..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/monthselector.jsp +++ /dev/null @@ -1,26 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - - - - - - - - - - - - - - - - - - -
Month
BGCOLOR="yellow"> - "> -
- -
diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/monthview.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/monthview.jsp deleted file mode 100644 index ceb3f9b38..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/monthview.jsp +++ /dev/null @@ -1,70 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - - - - - - - - - - - - - - - d - E - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Day
Week
 BGCOLOR="yellow" - BGCOLOR=#EEAAAA> - ">  -
- -
diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/numguess.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/numguess.jsp deleted file mode 100644 index a8485282d..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/numguess.jsp +++ /dev/null @@ -1,33 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> -<%@ taglib uri="webwork" prefix="ui" %> -Number Guess - - - - Congratulations! You got it. - And after just tries.

- Not sure what to do here? - Care to ">try again? - - - Welcome to the Number Guess game.

- I'm thinking of a number between 1 and 100.

- -

" method="POST"> - - - - - - Good guess, but nope. Try . - You have made guesses.

- I'm thinking of a number between 1 and 100.

- -

" method="POST"> - - - -
-
- - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/numguess/numguess.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/numguess/numguess.jsp deleted file mode 100644 index a8485282d..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/numguess/numguess.jsp +++ /dev/null @@ -1,33 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> -<%@ taglib uri="webwork" prefix="ui" %> -Number Guess - - - - Congratulations! You got it. - And after just tries.

- Not sure what to do here? - Care to ">try again? - - - Welcome to the Number Guess game.

- I'm thinking of a number between 1 and 100.

- -

" method="POST"> - - - - - - Good guess, but nope. Try . - You have made guesses.

- I'm thinking of a number between 1 and 100.

- -

" method="POST"> - - - -
-
- - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/rss/blank.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/rss/blank.jsp deleted file mode 100644 index d0f1dccb9..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/rss/blank.jsp +++ /dev/null @@ -1,5 +0,0 @@ - - -Select source - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/rss/feeds.rdf b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/rss/feeds.rdf deleted file mode 100644 index 95bce2632..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/rss/feeds.rdf +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - Feed listing - - RSS feed listing - - - - Geek news - http://geeknews.net/backend.php - - - Linux central - http://linuxcentral.com/backend/lcnew.rdf - - - Wired news - http://www.wired.com/news_drop/netcenter/netcenter.rdf - - - Feed listing - examples/rss/feeds.rdf - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/rss/index.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/rss/index.jsp deleted file mode 100644 index ccee7e539..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/rss/index.jsp +++ /dev/null @@ -1,6 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - "> - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/rss/menu.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/rss/menu.jsp deleted file mode 100644 index d5ededa90..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/rss/menu.jsp +++ /dev/null @@ -1,10 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - - - -

RSS viewer

- - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/rss/rss.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/rss/rss.jsp deleted file mode 100644 index d2f13c90c..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/rss/rss.jsp +++ /dev/null @@ -1,64 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - - <%-- channel title --%> -
- - -
-

- <%-- channel image --%> - - - <webwork:property value=" - src="" - - width="" - height="" - - border="0">
-
-
- - <%-- channel description --%> -
- - - -

    - - -
  • - - - - - - - - -
  • -
    -
    -
- - - - -

- - - - - - - - -
- -

-
-
-
-

diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/rss/viewer.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/rss/viewer.jsp deleted file mode 100644 index be75571c9..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/rss/viewer.jsp +++ /dev/null @@ -1,23 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> -<%@ taglib uri="webwork" prefix="ui" %> - -
-
- - - - - - - - -
- -
- -
- - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/userreg/index.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/userreg/index.jsp deleted file mode 100644 index 4df67d3d9..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/userreg/index.jsp +++ /dev/null @@ -1,11 +0,0 @@ - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/userreg/userregistration.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/userreg/userregistration.jsp deleted file mode 100644 index a5e370331..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/userreg/userregistration.jsp +++ /dev/null @@ -1,122 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> -<%@ taglib uri="webwork" prefix="ui" %> - - - - User registration - - -

User registration

- - - ERROR:
- -
-
-
- -
" method="POST"> - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -
  
- -
-
- - - - - - - - - - - - - - - - -
 
 
 
- Net check email -
 
 
 
 
 
 
 
 
 
-
- - -

Instructions

- Try the following: -
    -
  • No firstname, no lastname -
  • Either of the names longer than 30 characters -
  • No username -
  • Username shorter than 6 characters -
  • No password -
  • Not matching passwords -
  • Password shorter than 4 characters -
  • Birth number shorter or longer than 11 numbers -
  • Birth number containing characters -
  • Birth number that aren't valid (see hint below) -
  • Birth number that don't comply with the gender (see hint below) -
  • And I guess these usernames are taken: -
    - rickard -
    - maurice -
    - kjetil -
    -
  • And finally, none of the above :) -
- HINT: -
    - - Birth number is the same as social securty number in Norway, this number is build up like this: -
  • the two first numbers are the day you are born (01 to 31)
  • -
  • the two next numbers are the month you are born (january = 01)
  • -
  • the two next numbers are the two last number in the year you were born (1975 = 75)
  • -
  • the next 5 numbers are controll numbers, for now just make sure the 3rd number here is even for females and odd for males
  • -
- -
- - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/userreg/validregistration.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/userreg/validregistration.jsp deleted file mode 100644 index a674e5492..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/userreg/validregistration.jsp +++ /dev/null @@ -1,78 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> -<%@ taglib uri="webwork" prefix="ui" %> - - - - -You are registered - - - -
- -

Registration is valid

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Name: - -  
-
- Social security number: - -
-
- Email: - -
-
- Username: - -
-
- Password (remove this): - -
-
- Adress information: - -
-  
-
- - - -
- -Registration page - -
- - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/vxml/vxmltest.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/vxml/vxmltest.jsp deleted file mode 100644 index 6fafd2ed0..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/vxml/vxmltest.jsp +++ /dev/null @@ -1,35 +0,0 @@ -<%=""%> -<%@ page contentType="text/xml"%> - -<%@ taglib uri="webwork" prefix="webwork" %> -<%@ taglib uri="webwork" prefix="vui" %> - - - - -
- - - - - - What is it - - - - - - - - - Log - - - - -
- -
- - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/xslt/loancalc.xslt b/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/xslt/loancalc.xslt deleted file mode 100644 index dd583d77e..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/examples/xslt/loancalc.xslt +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - Loan Calculator - - - -

Loan Calculator

- -
- - - - - - - - - - - - - - - - - - - - - - - - -
Present Value - - - - - -
Interest Rate - - - - - -
Instalment - - - - - -
  - -
-
- - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -
MonthPresent ValueInterestRedemptionInstalment
-
- - -
- - - - - - - - - -
-
-
- - -Test Form without valid token
- - -<%-- - @todo something weird happens on resin where if this textfield has the same label as the previous textfield, - the the label for this textfield comes up as empty. ---%> -
-
- -
- \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/form.vm b/plexus-sandbox/plexus-webwork-application/src/main/webapp/form.vm deleted file mode 100644 index e8f708ae5..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/form.vm +++ /dev/null @@ -1,37 +0,0 @@ - -OpenSymphony WebWork2 Form Example - -#if( $errorMessages ) -

- -ERRORS:
-

    -#foreach( $message in $errorMessages ) -
  • $message
  • -#end -
- -

-#end -Status: $status

-Test Form with valid token
-#bodytag( Form "name='myForm'" "action='formTest.action'" "method=POST" ) -#tag( Token "name='myToken'" )
- -#tag( TextField "label='Foo'" "name='foo'" "value=foo" )
-
- -#end -Test Form without valid token
-#bodytag( Form "name='myForm'" "action='formTest.action'" "method=POST" ) - -#* - @todo something weird happens on resin where if this textfield has the same label as the previous textfield, - the the label for this textfield comes up as empty. -*# -#tag( TextField "label='No Foo'" "name='foo'" "value=foo" )
-
- -#end ## Form - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/form2-success.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/form2-success.jsp deleted file mode 100644 index e1338b55a..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/form2-success.jsp +++ /dev/null @@ -1,9 +0,0 @@ -<%@ taglib prefix="ww" uri="webwork" %> - -OpenSymphony WebWork2 Form Example - - -Congrats, , - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/form2.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/form2.jsp deleted file mode 100644 index d9464a04b..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/form2.jsp +++ /dev/null @@ -1,34 +0,0 @@ -<%@ taglib prefix="ww" uri="webwork" %> - -OpenSymphony WebWork2 Form Example - - - -

- -ERRORS:
-

    - -
  • -
    -
- -

- - -
    -
  1. Enter some data below, then execute the action.
  2. -
  3. It will wait 2 seconds and then show you a success page.
  4. -
  5. Then click back and change the value for foo and submit.
  6. -
  7. Notice that the original value of foo is used and there is no 2 second delay. - That is because the action isn't being executed again.
  8. -
- - -
-
- -
- - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/jsp/cart.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/jsp/cart.jsp deleted file mode 100644 index 363416767..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/jsp/cart.jsp +++ /dev/null @@ -1,46 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - - -
- '> - - - - - - - - - - - - - - - - - - - - - - - - -
-
- '> - -
-
-

-

-

- '> -
-
- -
-
diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/jsp/cdlist.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/jsp/cdlist.jsp deleted file mode 100644 index fd49664c3..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/jsp/cdlist.jsp +++ /dev/null @@ -1,13 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/jsp/checkout.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/jsp/checkout.jsp deleted file mode 100644 index c4c524ac0..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/jsp/checkout.jsp +++ /dev/null @@ -1,57 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - - - <webwork:text name="'checkout.title'"/> - - - -'> - - - -


- -

-

- '> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- -

- - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/jsp/index.html b/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/jsp/index.html deleted file mode 100644 index bcbf4b317..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/jsp/index.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/jsp/language.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/jsp/language.jsp deleted file mode 100644 index bc712f15e..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/jsp/language.jsp +++ /dev/null @@ -1,30 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> -<%@ taglib uri="webwork" prefix="ui" %> - - - - -<webwork:text name="'main.title'"/> - - -"> - - - -
-

-Please select a language: -

- - - - -
-
- -

- -

- - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/jsp/price.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/jsp/price.jsp deleted file mode 100644 index efc61e57b..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/jsp/price.jsp +++ /dev/null @@ -1,2 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/jsp/shop.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/jsp/shop.jsp deleted file mode 100644 index 0fcf4adb9..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/jsp/shop.jsp +++ /dev/null @@ -1,36 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> -<%@ taglib uri="webwork" prefix="ui" %> - - - - - <webwork:text name="'main.title'"/> - - - -'> - - - -
- - -
-

- -

-
- - : - - - - "> - -
-

- - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/velocity/cart.vm b/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/velocity/cart.vm deleted file mode 100644 index a6e802bc7..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/velocity/cart.vm +++ /dev/null @@ -1,43 +0,0 @@ -#if($cart.items) -

- - - - - - - - - -#tag( Action "name='i18n.ComputePrice'" "id=pricer") -#bodytag( Push "value=#pricer") -#set($pricer = $stack.peek()) - -#foreach($item in $cart.items) - - - #set ($price = $pricer.computePrice($item.cd.price))) - - - - - - - - - -#end -
$action.getText('cd.albumLabel')$action.getText('cd.artistLabel')$action.getText('cd.countryLabel')$action.getText('cd.priceLabel')$action.getText('cd.quantityLabel')
$item.cd.album$item.cd.artist$item.cd.country$stack.findValue("getText('price', { $price } )")$item.quantity -
- - -
-
-

-

-

- -
-
-#end -#end diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/velocity/cdlist.vm b/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/velocity/cdlist.vm deleted file mode 100644 index ca304fdf8..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/velocity/cdlist.vm +++ /dev/null @@ -1,10 +0,0 @@ -#tag( Action "name='i18n.ComputePrice'" "id=pricer") -#bodytag( Push "value=#pricer") -#set($pricer = $stack.peek()) - -#end diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/velocity/checkout.vm b/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/velocity/checkout.vm deleted file mode 100644 index 676da7eb7..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/velocity/checkout.vm +++ /dev/null @@ -1,53 +0,0 @@ - - - - $action.getText('checkout.title') - - - - - -$action.getText('checkout.title') - -


-$action.getText('checkout.subhead') -

-

- - - - - - - - - -#tag( Action "name='i18n.ComputePrice'" "id=pricer") -#bodytag( Push "value=#pricer") -#set($pricer = $stack.peek()) -#foreach($item in $cart.items) -#set ($price = $pricer.computePrice($item.cd.price)) - - - - - - - -#end -#end - - - - - - - - -
$action.getText('cd.albumLabel')$action.getText('cd.artistLabel')$action.getText('cd.countryLabel')$action.getText('cd.priceLabel')$action.getText('cd.quantityLabel')
$item.cd.album$item.cd.artist$item.cd.country$stack.findValue("getText('price', { $price })")$item.quantity
$action.getText('checkout.totalLabel')$stack.findValue("getText('price', { $totalPrice })")
-

-$action.getText('checkout.returnLabel') -

- - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/velocity/index.html b/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/velocity/index.html deleted file mode 100644 index bcbf4b317..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/velocity/index.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/velocity/language.vm b/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/velocity/language.vm deleted file mode 100644 index dafa77071..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/velocity/language.vm +++ /dev/null @@ -1,28 +0,0 @@ - - - -$action.getText('main.title') - - - - -$action.getText('main.title') - -
-

-Please select a language: -

- - -#tag( Action "name='i18n.LanguageList'" "id=lang") -#bodytag( Push "value=#lang" ) -#foreach($key in $languages.keys()) - -#end -#end
Languages:
$languages.get($key)
- -
- - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/velocity/price.vm b/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/velocity/price.vm deleted file mode 100644 index 979e84d29..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/velocity/price.vm +++ /dev/null @@ -1 +0,0 @@ -#tag( Property "value=realPrice") diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/velocity/shop.vm b/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/velocity/shop.vm deleted file mode 100644 index 4417ad7f7..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/i18n/velocity/shop.vm +++ /dev/null @@ -1,35 +0,0 @@ - - - - $action.getText('main.title') - - - - -#tag( Action "name='i18n.CDList'" "id=cdlist") - - - $action.getText('main.title') - -
- - $action.getText('main.subhead') - -
-

- -

-
- - $action.getText('cd.label'):#bodytag( Push "value=#cdlist" )#parse("/i18n/velocity/cdlist.vm")#end - - $action.getText('main.qtyLabel'): - -
-
-

- #parse('/i18n/velocity/cart.vm') - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/images/px b/plexus-sandbox/plexus-webwork-application/src/main/webapp/images/px deleted file mode 100644 index 69dc682bc..000000000 Binary files a/plexus-sandbox/plexus-webwork-application/src/main/webapp/images/px and /dev/null differ diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/images/px.readme.txt b/plexus-sandbox/plexus-webwork-application/src/main/webapp/images/px.readme.txt deleted file mode 100644 index a93958bb2..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/images/px.readme.txt +++ /dev/null @@ -1 +0,0 @@ -the file "/images/px" is a gif image of a single pixek to use as a shim/spacer image for JasperReports. \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/include.vm b/plexus-sandbox/plexus-webwork-application/src/main/webapp/include.vm deleted file mode 100644 index 16d13d339..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/include.vm +++ /dev/null @@ -1,3 +0,0 @@ -#bean ("com.opensymphony.webwork.example.counter.Counter" $counter) - -#tag( Include "value='SimpleCounter.action'" ) \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/included.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/included.jsp deleted file mode 100644 index 31d30a7b0..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/included.jsp +++ /dev/null @@ -1,2 +0,0 @@ -<%@ taglib prefix="ww" uri="webwork" %> -Current top of stack: \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/includetagtest.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/includetagtest.jsp deleted file mode 100644 index 9dfda1af4..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/includetagtest.jsp +++ /dev/null @@ -1,17 +0,0 @@ -<%@ taglib prefix="ww" uri="webwork" %> - -Include Tag Test - - - -
- -
- -
- -
- - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/indexedProperties.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/indexedProperties.jsp deleted file mode 100644 index 47eb83149..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/indexedProperties.jsp +++ /dev/null @@ -1,26 +0,0 @@ -<%@ taglib prefix="ww" uri="webwork" %> - -OpenSymphony WebWork2 Indexed Property Example - -

-

Indexed Property Example

- -
- - - - - -<%-- this needs to be done by hand so we can add the extra single quotes --%> - - - - - - - -
Emails - a Map of name -> email
:']" value=""/>
URLs - a List accessed by index
-
-
- - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/iterator.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/iterator.jsp deleted file mode 100644 index c0a6d82c0..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/iterator.jsp +++ /dev/null @@ -1,39 +0,0 @@ -<%@ taglib prefix="ww" uri="webwork" %> - -

Example of the Iterator example:

- - - - - - - - - - - -
Days of the week
- -

Example of the Iterator example using the status attribute and a value from the ActionContext

- - - - - - - - - - - - - - - - - - - - - -
Days of the week
\ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/javascript-input.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/javascript-input.jsp deleted file mode 100644 index 1b89249c2..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/javascript-input.jsp +++ /dev/null @@ -1,24 +0,0 @@ -<%@ taglib uri="webwork" prefix="ww" %> - - - - JavaScript Validation Input - - - - - - - - - - - -
- - - - -
- - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/listPeople.ftl b/plexus-sandbox/plexus-webwork-application/src/main/webapp/listPeople.ftl deleted file mode 100644 index a1f8e2155..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/listPeople.ftl +++ /dev/null @@ -1,20 +0,0 @@ - - - All People - - - - - - - - -<#list people as person> - - - - - -
IDName
${person.id}${person.name}
- - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/newPerson.ftl b/plexus-sandbox/plexus-webwork-application/src/main/webapp/newPerson.ftl deleted file mode 100644 index 130871c22..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/newPerson.ftl +++ /dev/null @@ -1,12 +0,0 @@ - - - New Person - - - -<@ww.form action="newPerson"> - <@ww.textfield label="Name" name="person.name"/> - <@ww.submit value="Create person"/> - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/orderList.jasper b/plexus-sandbox/plexus-webwork-application/src/main/webapp/orderList.jasper deleted file mode 100644 index 438d32527..000000000 Binary files a/plexus-sandbox/plexus-webwork-application/src/main/webapp/orderList.jasper and /dev/null differ diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/orderList.xml b/plexus-sandbox/plexus-webwork-application/src/main/webapp/orderList.xml deleted file mode 100644 index fd6bb8df8..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/orderList.xml +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - customerName - - - address1 - - - address2 - - - city - - - state - - - postcode - - - lineItems - - - <band height="50"> - <line> - <reportElement x="0" y="0" width="515" height="0"/> - <graphicElement stretchType="NoStretch"/> - </line> - <textField isStretchWithOverflow="true"> - <reportElement x="0" y="10" width="515" height="30"/> - <textElement textAlignment="Center" lineSpacing="Single"> - <font reportFont="Arial_Normal" size="22"/> - </textElement> - <textFieldExpression>$P{title}</textFieldExpression> - </textField> - </band> - - - - - - - - - - - - - Order List - - - - - - - - - - - - - - - - - - $F{customerName} - - - - - - - - - - $F{customerName} - - - - $F{lineItems} - - - $P{reportDirectory}.getCanonicalPath() + java.io.File.separator + "orderReport.jasper" - - - - - - - - $F{customerName} - - - - - - - $F{addressLine1} - - - - - - - $F{addressLine2} - - - - - - - $F{city} - - - - - - - $F{state} + " " + $F{postcode} - - - - - - - - - - - - - - - - - "Page " + String.valueOf($V{PAGE_NUMBER}) + " of" - - - - - - - " " + String.valueOf($V{PAGE_NUMBER}) - - - - - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/orderReport.jasper b/plexus-sandbox/plexus-webwork-application/src/main/webapp/orderReport.jasper deleted file mode 100644 index 6536fac4f..000000000 Binary files a/plexus-sandbox/plexus-webwork-application/src/main/webapp/orderReport.jasper and /dev/null differ diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/orderReport.xml b/plexus-sandbox/plexus-webwork-application/src/main/webapp/orderReport.xml deleted file mode 100644 index fb1f1de8c..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/orderReport.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - (new BigDecimal($F{quantity}.intValue() * $F{unitCost}.doubleValue())).setScale(2,java.math.BigDecimal.ROUND_HALF_UP) - - - - - $V{itemTotal} - - - - <band height="19"> - <textField> - <reportElement x="0" y="2" width="200" height="15"/> - <textElement textAlignment="Center"> - <font reportFont="Arial_Bold"/> - </textElement> - <textFieldExpression>"Line Items for " + $P{customerName}</textFieldExpression> - </textField> - </band> - - - - - - - - - - - - - Product - - - - - - - Quantity - - - - - - - Cost - - - - - - - - - - - - - $F{productName} - - - - - - - $F{quantity} - - - - - - - $V{itemTotal} - - - - - - - - - - - - - - - - - - - - - - Total : - - - - - - - - $V{orderTotal}.setScale(2,java.math.BigDecimal.ROUND_HALF_UP) - - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/select.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/select.jsp deleted file mode 100644 index ae99d5ea2..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/select.jsp +++ /dev/null @@ -1,13 +0,0 @@ -<%@ taglib prefix="ww" uri="webwork" %> - -Select example - - -

Example of the Select tag:

-

Selected Value:

-
- - -
- - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/styles.css b/plexus-sandbox/plexus-webwork-application/src/main/webapp/styles.css deleted file mode 100644 index 21a86d87f..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/styles.css +++ /dev/null @@ -1,37 +0,0 @@ -BODY { font-size : 100%; } -BODY, TD, TH, DIV, P { - font-family : verdana, arial, helvetica, sans-serif; - font-size : 9pt; -} -H1 { - font-size : 14pt; - border-bottom : 1px #ccc solid; -} -TABLE { - border : 1px #ccc solid; -} -TH { - text-align : left; - background-color : #ddd; -} -UL { - padding-bottom : 0.5em; -} -LI { - margin-bottom : 0.5em; -} -.title { - font-weight : bold; - font-size : 11pt; -} -.msg { - color : #f00; -} - -.wwFormTable {} -.label {font-style:italic; } -.errorLabel {font-style:italic; color:red; } -.errorMessage {font-weight:bold; text-align: center; color:red; } -.checkboxLabel {} -.checkboxErrorLabel {color:red; } -.required {color:red;} diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/success.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/success.jsp deleted file mode 100644 index a292091c8..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/success.jsp +++ /dev/null @@ -1,115 +0,0 @@ -<%@ page import="java.util.Map, - com.opensymphony.xwork.util.OgnlValueStack"%> -<%@ taglib uri="webwork" prefix="ww" %> -<%@ taglib uri="c" prefix="c" %> - -This url is:
-A package-level i18n key is: - -
- -Escaped:
-Not escaped:
- -Success! -
- - - -<%-- -this sets the variable "counter" in the webwork context -to hold the object returned by the VS find query of "conter" ---%> - - -<%-- -We can then reference the above object using # (like @ in the -old EL). This time the scope is page and the variable is -"counter", so now we can use JSTL. The last two ww:set -calls could have, of course, been a simple call ;) ---%> - -(JSTL also says: ) - -<%-- -aka: - - - - -aka: - - - - -aka: - - - - -aka: - - - - - - -aka: - - - - -<% - long x = System.currentTimeMillis(); -%> - - -<% - long y = System.currentTimeMillis(); - System.out.println(y - x); -%> ---%> - -
-Here is an action inside an action. This should make the counter increase twice as fast:
- - - - - -
- counter.count (old) == 
- counter.count (new) == 
- foo is also: 
-
-
- -
-

- The following is a test of the push tag. We call <ww:property/> 4 times. One the second call, we've pushed - the word 'counter' on the stack. What we expect to see is an A, B, B, A pattern where A is the toString() of the - action, and b is the word counter. -

- - - - - - - - - - - - - - - - - - - -
Stack (before push)
Stack (inside push)
Top (inside push)
Stack (after push)
- - -
diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/success.vm b/plexus-sandbox/plexus-webwork-application/src/main/webapp/success.vm deleted file mode 100644 index 9f19bf02b..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/success.vm +++ /dev/null @@ -1,13 +0,0 @@ - -Velocity test - -Success! -
- -$counter.count - - - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/tabbedpanetest.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/tabbedpanetest.jsp deleted file mode 100644 index 7e93e897a..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/tabbedpanetest.jsp +++ /dev/null @@ -1,14 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - - - - TPTEST - - - - -
-

-
- \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/tags.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/tags.jsp deleted file mode 100644 index 55a035a41..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/tags.jsp +++ /dev/null @@ -1,95 +0,0 @@ -<%@ taglib uri="webwork" prefix="ww" %> -<%@ taglib uri="benchmark" prefix="benchmark" %> - -<%-- this is to make our special controlfooter not close the row yet --%> - - - - - - Tag - Time - - - - - ms - - - - ms - - - - ms - - - - ms - - - - ms - - - - ms - - - - ms - - - - ms - - - - ms - - - Empty Component:  - - - ms - - - - ms - - - - ms - - - - ms - - - - ms - - - - ms - -<%----%> -<%-- -<%-- list="list" listKey="key" listValue="value" doubleList="children"/>--%> -<%-- ms--%> - - - - ms - - - Hidden:  - - - ms - - - - ms - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/tags.vm b/plexus-sandbox/plexus-webwork-application/src/main/webapp/tags.vm deleted file mode 100644 index c0a89cbd5..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/tags.vm +++ /dev/null @@ -1,22 +0,0 @@ - - -#tag( Label "label='label test'" "name='label name'" "value=scalar" ) -#tag( TextField "label='textfield test'" "name='textfieldName'" "value=scalar" "size=50" ) -#tag( TextField "label='required textfield test'" "name='textfieldName'" "value=scalar" "size=50" "required=true") -#tag( File "label='file test'" "name='uploadedFile'" "value=" "size=30" ) -#tag( Password "label='password test'" "name='passwordField'" "value=scalar" "size=50" ) -#tag( Checkbox "label='checkbox test'" "name='checkboxField'" ) -#tag( CheckboxList "label='checkboxlist test'" "name='RadioField'" "value=list[1].key" "list=list" "listKey=key" "listValue=value" ) -#tag( Component "label='component test'" "name='componentField'" "template='empty.vm'" ) -#tag( Radio "label='radio test'" "name='RadioField'" "value=list[1].key" "list=list" "listKey=key" "listValue=value" ) -#tag( Select "label='multiple select test'" "name='select1'" "value=multiValues" "list=multiList" "multiple=true" "size=5" ) -#tag( Select "label='select test'" "name='select2'" "value=list[1].key" "list=list" "listKey=key" "listValue=value" "size='5'" ) -#tag( Select "label='pulldown test'" "name='select3'" "value=list[1].value" "list=list" "listKey=key" "listValue=value" ) -#tag( Textarea "label='textarea test'" "name='textareaField'" "value=scalar" "rows='10'" "cols='30'" ) -#tag( Hidden "name='hiddenField'" "value=scalar" ) -#tag( Submit "value='submit this thang!'" "align='right'" ) -#* -*# - -
- diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/template/xhtml/controlfooter.vm b/plexus-sandbox/plexus-webwork-application/src/main/webapp/template/xhtml/controlfooter.vm deleted file mode 100644 index 20297e54f..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/template/xhtml/controlfooter.vm +++ /dev/null @@ -1,5 +0,0 @@ -#if ($stack.findValue("#extraCol")) - -#else - -#end \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/tests/expr.jsp b/plexus-sandbox/plexus-webwork-application/src/main/webapp/tests/expr.jsp deleted file mode 100644 index f0c37bbb2..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/tests/expr.jsp +++ /dev/null @@ -1,606 +0,0 @@ -<%@ taglib uri="webwork" prefix="webwork" %> - - -WebWork Expression Language Test - - - -

WebWork Expression Language Test

- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ExpressionResultEmpty is correct
1webwork:if test="'hello' == 'hello'" - - Success -
-
2webwork:if test="'hello' != 'helloo'" - - Success - -
3webwork:if test="'hello' != 'hello hello'" - - Success - -
4webwork:if test="'1' < '2'" - - Success - -
5webwork:if test="1 < 2" - - Success - -
6webwork:if test="'10' < '2'" - - Success - -
7webwork:if test="10 > 2" - - Success - -
84.2) webwork:if test="-10 < -9" - - Success - -
9webwork:if test="'1' <= '1'" - - Success - -
10webwork:if test="'2' >= '2'" - - Success - -
11webwork:if test="settings['foo'] == 'bar'" - - Success - -
12webwork:elseIf test="settings['foo'] != 'bar'" - - Failure - - X
13webwork:if test="settings['foo'] == 'wrong'" - - Failure - - X
14webwork:else - - Success - -
15webwork:elseIf test="settings['foo'] == 'bar'" - - Failure - - X
16webwork:if test="settings['foo'] == 'wrong'" - - Failure - - X
17webwork:elseIf test="settings['foo'] != 'bar'" - - Failure - - X
18webwork:else - - Success - -
19webwork:if test="settings['foo'] == 'wrong'" - - Failure - - X
20webwork:else webwork:if test="settings['foo'] == 'bar'" - - - Success - - -
21webwork:if test="bool('true') == true" - - Success - -
22webwork:if test="bool('false') == false" - - Success - -
23webwork:if test="bool('true')/toString()/endsWith('e') == true" - - Success - -
24webwork:if test="!jibberish&&(settings['foo']=='bar'||settings['foo']=='wrong')" - - Success - -
25webwork:if test="!jibberish && settings['foo'] == 'bar' || settings['foo'] == 'wrong'" - - Success - -
26webwork:if test="!jibberish && settings['foo'] == 'wrong' || settings['foo'] == 'bar' && true == true" - - Success - -
27webwork:if test="(!jibberish ||(settings['foo']=='bar'||(settings['foo']=='wrong')))" - - Success - -
28webwork:if test="!jibberish" - - Success - -
29webwork:else - - Failure - - X
30webwork:if test="settings['foo']" - - Success - -
31webwork:if test="jibberish" - - Failure - - X
32webwork:else - - Success - -  
33webwork:if test="bool('true') == true" - - Success - -
34webwork:if test="bool('true') == true && (bool('false') == true || settings['foo'] == 'bar')" - - Success - -
35webwork:if test="true==true" webwork:if test="true==true" webwork:else webwork:else - - - Success - - - Failure - - - - Failure - -
36webwork:if test="true==true" webwork:if test="true==false" - - - Failure - - - Success - - - - Failure - -
37webwork:if test="true==false" webwork:if test="true==true" webwork:else webwork:else - - - Failure - - - Failure - - - - Success - -
38webwork:if test="true==true" webwork:if test="true==false" webwork:elseIf test="true==true" webwork:else - - - Failure - - - Success - - - - Failure - -
39webwork:if test="true==true" webwork:if test="true==false" webwork:elseIf test="true==false" webwork:else - - - Failure - - - Failure - - - - Failure - - X
40 Using id's: - - - - Failure - - - Success - -
41Testing if, elseif, else relationship: - - Success - - - Failure - - - Failure - -
42Testing if, elseif, else relationship: - - Failure - - - Success - - - Failure - -
43Testing if, elseif, else relationship - - Failures - - - Failure - - - Success - -
44Number comparisons (webwork:if test="1 == 1.0"): - - Success - -
45webwork:if test="1 < 1.1" - - Success - -
46webwork:if test=".9 < 1.0" - - Success - -
47webwork:if test="1.1 > 1.0" - - Success - -
48webwork:if test="-1.1 > -2.0" - - Success - -
49webwork:if test="0 > -1.0" - - Success - -
50webwork:if test="(1==1 && 2==2) || (2==2 && 3==2)" - - Success - -
51webwork:if test="(1==2 && 2==2) || (2==2 && 3==2)" - - Success - - X
- -

-Total time:ms -
-Next - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/valid.vm b/plexus-sandbox/plexus-webwork-application/src/main/webapp/valid.vm deleted file mode 100644 index 93636c2f1..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/valid.vm +++ /dev/null @@ -1,9 +0,0 @@ - -OpenSymphony WebWork2 Validation Test: Valid - -Input was valid! - - - - - diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/validationForm.vm b/plexus-sandbox/plexus-webwork-application/src/main/webapp/validationForm.vm deleted file mode 100644 index 3c2207d5a..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/validationForm.vm +++ /dev/null @@ -1,47 +0,0 @@ - -OpenSymphony WebWork2 Validation Example - -#if( $actionErrors.size() > 0 ) -

- -ERRORS:
-

    -#foreach( $error in $actionErrors ) -
  • $error
  • -#end -
- -

-#end -

-

- -Action Properties: -
- -#tag( TextField "label='Name'" "name='name'" "value=name" ) -
-Bean Properties: -#if( $stack.findValue("fieldErrors") ) - #set( $beanErrors = $stack.findValue("fieldErrors.get('bean')") ) - #if( $beanErrors.size() > 0 ) -
- - Bean Errors:
-
    - #foreach( $beanError in $beanErrors ) -
  • $beanError
  • - #end -
-
- #end -#end - -#tag( TextField "label='Bean.Text'" "name='bean.text'" "value=bean.text" )
-#tag( TextField "label='Bean.Date'" "name='bean.date'" "value=bean.date" )
-#tag( TextField "label='Bean.Number'" "name='bean.number'" "value=bean.number" )
-#tag( TextField "label='Bean.Number2'" "name='bean.number2'" "value=bean.number2" )
-
- -
- \ No newline at end of file diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/xslt/loanCalc.xslt b/plexus-sandbox/plexus-webwork-application/src/main/webapp/xslt/loanCalc.xslt deleted file mode 100644 index 83d11f74b..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/xslt/loanCalc.xslt +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - Loan Calculator - - - -

Loan Calculator

- -
- - - - - - - - - - - - - - - - - - - - - - - - -
Present Value - - - - - -
Interest Rate - - - - - -
Instalment - - - - - -
  - -
-
- - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -
MonthPresent ValueInterestRedemptionInstalment
-
- - - - - #CCCCCC - - - - - - - - - - - - - - - - - - - - - - - - - -

- -
-
diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/xslt/showTree.xslt b/plexus-sandbox/plexus-webwork-application/src/main/webapp/xslt/showTree.xslt deleted file mode 100644 index 9ac885f71..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/xslt/showTree.xslt +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - XML Showtree - - - - - - - - - - - - - -
- -
- -
- - - - - - -
- -
-
- - - - - - -
-
- - - - "" - - -
diff --git a/plexus-sandbox/plexus-webwork-application/src/main/webapp/xslt/simpleAction.xslt b/plexus-sandbox/plexus-webwork-application/src/main/webapp/xslt/simpleAction.xslt deleted file mode 100644 index 0ce484646..000000000 --- a/plexus-sandbox/plexus-webwork-application/src/main/webapp/xslt/simpleAction.xslt +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - Webwork XSLT Demot - Simple Actions - - - -

Webwork XSLT Demot - Simple Actions

-

This demonstrates the capabilites of the new XSLTResult for webwork2.

- - - - - - - -
- - -

Scalar

-

This is the property scalar

- -
- - -

MultiList

-

This is the property multiList

-
    - -
  • -
    -
-
- - -

List

-

This is a the property list

-
    - -
  • -
    -
-
- -
diff --git a/plexus-sandbox/plexus-xsiter/pom.xml b/plexus-sandbox/plexus-xsiter/pom.xml deleted file mode 100644 index 345f2b877..000000000 --- a/plexus-sandbox/plexus-xsiter/pom.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - 4.0.0 - - plexus - org.codehaus.plexus - 1.0.8 - - org.codehaus.plexus.xsiter - xsiter-parent - 1-SNAPSHOT - XSiter :: Parent - pom - - scm:svn:http://svn.codehaus.org/plexus/trunk/plexus-sandbox/plexus-xsiter - scm:svn:https://svn.codehaus.org/plexus/trunk/plexus-sandbox/plexus-xsiter - - - xsiter-vhost-component - xsiter-deployer-component - xsiter-application - - diff --git a/plexus-sandbox/plexus-xsiter/xsiter-application/LICENSE.txt b/plexus-sandbox/plexus-xsiter/xsiter-application/LICENSE.txt deleted file mode 100644 index cea0bde10..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-application/LICENSE.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2006 Rahul Thakur - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/plexus-sandbox/plexus-xsiter/xsiter-application/RUNNING.txt b/plexus-sandbox/plexus-xsiter/xsiter-application/RUNNING.txt deleted file mode 100644 index d3c0a1802..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-application/RUNNING.txt +++ /dev/null @@ -1,24 +0,0 @@ - -Running the XSiter Deployer application ---------------------------------------- - -1) On the checked out XSiter application source, run the following Maven goal - from command prompt - - > mvn clean package - - This will assemble the XSiter application along with all the requisite - dependencies. - -2) Copy the assembled XSiter application under target/xsiter-deployer to a - location of choice. - -3) Change directory to the new 'xsiter-deployer' location and run the - following command to invoke the deployer application. - - > ./bin/deployer - -4) Follow the prompts to invoke the operations on the deployer app. - -NOTE that the SCM url requested while setting up a deployment workspace is -expected to be entered in the same format as it appears inside a pom.xml \ No newline at end of file diff --git a/plexus-sandbox/plexus-xsiter/xsiter-application/pom.xml b/plexus-sandbox/plexus-xsiter/xsiter-application/pom.xml deleted file mode 100644 index 0ddc95a72..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-application/pom.xml +++ /dev/null @@ -1,136 +0,0 @@ - - 4.0.0 - - org.codehaus.plexus.xsiter - xsiter-parent - 1-SNAPSHOT - - org.codehaus.plexus.xsiter - xsiter-deployer-application - 1.0-SNAPSHOT - XSiter :: Deployer Application - - - - jar - - - - mail - -
rahul.thakur.xdev@gmail.com
-
-
-
-
- - - junit - junit - 3.8.1 - test - - - org.codehaus.plexus - plexus-container-default - 1.0-alpha-9 - - - plexus - plexus-utils - - - - - org.codehaus.plexus - plexus-interactivity-api - 1.0-alpha-5 - - - org.codehaus.plexus.xsiter - xsiter-deployer-component - 1.0.0-SNAPSHOT - - - - org.codehaus.plexus.xsiter - xsiter-vhost-component - 1.0.0-SNAPSHOT - - - - - - org.codehaus.plexus - plexus-appserver-maven-plugin - true - - src/conf - xsiter-deployer-application - - src/conf/application.xml - - - src/plexus.properties - - - - - org.codehaus.mojo - appassembler-maven-plugin - - - package - - assemble - - - - - target/xsiter-deployer - - true - - - - deployer - - org.codehaus.plexus.xsiter.Main - - - - - - - - - - - - codehaus-mojo-snapshots - Codehaus Snapshots - http://snapshots.repository.codehaus.org/ - - -
diff --git a/plexus-sandbox/plexus-xsiter/xsiter-application/src/conf/application.xml b/plexus-sandbox/plexus-xsiter/xsiter-application/src/conf/application.xml deleted file mode 100644 index 0704a4dcf..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-application/src/conf/application.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - org.codehaus.plexus.xsiter.deployer.DeployerApplication - - - - - ${plexus.home}/lib - - - - - jetty - - - - ${plexus.home}/lib/xsiter-deployer-webapp.war - / - ${plexus.home}/webapp - true - - - 8080 - - - - - - - - - - diff --git a/plexus-sandbox/plexus-xsiter/xsiter-application/src/main/java/org/codehaus/plexus/xsiter/Main.java b/plexus-sandbox/plexus-xsiter/xsiter-application/src/main/java/org/codehaus/plexus/xsiter/Main.java deleted file mode 100644 index 726394285..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-application/src/main/java/org/codehaus/plexus/xsiter/Main.java +++ /dev/null @@ -1,97 +0,0 @@ -package org.codehaus.plexus.xsiter; - -import java.util.Arrays; -import java.util.List; -import java.util.Properties; - -import org.codehaus.plexus.components.interactivity.Prompter; -import org.codehaus.plexus.embed.Embedder; -import org.codehaus.plexus.xsiter.deployer.DeployerApplication; -import org.codehaus.plexus.xsiter.deployer.model.DeployableProject; - -/** - * @author Rahul Thakur - * @dated: 22/09/2006, 4:45:57 PM - */ -public class Main -{ - - /** - * List of valid commands. - */ - private static final String[] validCommands = new String[] { - "setup", - "add-vhost", - "checkout", - "deploy", - "deploy-custom", - "remove" }; - - /** - * @param args - * @throws Exception - */ - public static void main( String[] args ) - throws Exception - { - - Embedder plexus = new Embedder(); - plexus.start(); - - Prompter prompter = (Prompter) plexus.getContainer().lookup( Prompter.ROLE ); - List list = Arrays.asList( validCommands ); - String choice = null; - while ( null == choice || choice.trim().equals( "" ) ) - { - choice = prompter.prompt( "Choose a command", list, (String) list.get( 0 ) ); - } - - String projectID = null; - while ( null == projectID || projectID.trim().equals( "" ) ) - { - projectID = prompter.prompt( "Enter a project ID" ); - } - - DeployerApplication deployer = (DeployerApplication) plexus.getContainer().lookup( DeployerApplication.ROLE ); - - if ( choice.equalsIgnoreCase( "setup" ) ) - { - Properties props = new Properties(); - props.setProperty( DeployableProject.ProjectProperties.PROP_LABEL.getName(), projectID ); - deployer.addProject( props ); - } - else if ( choice.equalsIgnoreCase( "add-vhost" ) ) - { - deployer.addVirtualHost( projectID ); - } - else if ( choice.equalsIgnoreCase( "deploy" ) ) - { - deployer.deployProject( projectID ); - } - else if ( choice.equalsIgnoreCase( "deploy-custom" ) ) - { - String goals = null; - while ( null == goals || goals.trim().equals( "" ) ) - { - goals = prompter.prompt( "Enter goals to use for custom deploy" ); - } - String tag = prompter.prompt( "Enter SCM tag to checkout" ); - if ( null == tag || tag.trim().equals( "" ) ) - tag = null; - deployer.deployProject( projectID, goals, tag ); - } - else if ( choice.equals( "checkout" ) ) - { - String tag = prompter.prompt( "Enter SCM tag to checkout" ); - if ( null == tag || tag.trim().equals( "" ) ) - tag = null; - deployer.checkoutProject( projectID, tag ); - } - else if ( choice.equals( "remove" ) ) - { - deployer.removeProject( projectID ); - } - - } - -} diff --git a/plexus-sandbox/plexus-xsiter/xsiter-application/src/plexus.properties b/plexus-sandbox/plexus-xsiter/xsiter-application/src/plexus.properties deleted file mode 100644 index c7fb5aeb4..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-application/src/plexus.properties +++ /dev/null @@ -1,3 +0,0 @@ -app.name = deployer -app.long.name = Effacy Deployer -app.description = Effacy Deployer - the Deployments Manager \ No newline at end of file diff --git a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/LICENSE.txt b/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/LICENSE.txt deleted file mode 100644 index cea0bde10..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/LICENSE.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2006 Rahul Thakur - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/pom.xml b/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/pom.xml deleted file mode 100644 index 4c941fe86..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/pom.xml +++ /dev/null @@ -1,182 +0,0 @@ - - - 4.0.0 - - org.codehaus.plexus.xsiter - xsiter-parent - 1-SNAPSHOT - - org.codehaus.plexus.xsiter - xsiter-deployer-component - XSiter :: Project Deployer Component - 1.0.0-SNAPSHOT - - - - mail - -
rahul.thakur.xdev@gmail.com
-
-
-
-
- - - org.codehaus.plexus.xsiter - xsiter-vhost-component - 1.0.0-SNAPSHOT - - - plexus - plexus-utils - - - - - org.codehaus.plexus - plexus-container-default - 1.0-alpha-9 - - - plexus - plexus-utils - - - - - org.codehaus.plexus - plexus-command-line - 1.0-alpha-2 - - - junit - junit - 3.8.1 - test - - - jdom - jdom - 1.0 - - - org.codehaus.plexus - plexus-utils - 1.3 - - - org.apache.maven.scm - maven-scm-api - ${maven-scm.version} - - - org.apache.maven.scm - maven-scm-manager-plexus - ${maven-scm.version} - - - org.apache.maven.scm - maven-scm-provider-bazaar - ${maven-scm.version} - - - org.apache.maven.scm - maven-scm-provider-clearcase - ${maven-scm.version} - - - org.apache.maven.scm - maven-scm-provider-cvsexe - ${maven-scm.version} - - - org.apache.maven.scm - maven-scm-provider-local - ${maven-scm.version} - - - org.apache.maven.scm - maven-scm-provider-perforce - ${maven-scm.version} - - - org.apache.maven.scm - maven-scm-provider-starteam - ${maven-scm.version} - - - org.apache.maven.scm - maven-scm-provider-svnexe - ${maven-scm.version} - - - - org.apache.maven.scm - maven-scm-test - ${maven-scm.version} - test - - - org.apache.maven.scm - maven-scm-provider-svntest - 1.0-SNAPSHOT - - - - - - org.apache.maven - maven-core - ${maven.version} - - - org.apache.maven - maven-project - ${maven.version} - - - org.apache.maven - maven-artifact - ${maven.version} - - - org.apache.maven - maven-model - ${maven.version} - - - org.apache.maven - maven-embedder - ${maven.version} - - - - - - maven-compiler-plugin - - 1.5 - 1.5 - - - - org.codehaus.plexus - plexus-maven-plugin - - true - - - - - descriptor - - - - - - - - 2.0.4 - 1.0-beta-3 - -
diff --git a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/AbstractDeployer.java b/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/AbstractDeployer.java deleted file mode 100644 index eff4e231a..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/AbstractDeployer.java +++ /dev/null @@ -1,458 +0,0 @@ -package org.codehaus.plexus.xsiter.deployer; - -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.apache.maven.model.Model; -import org.apache.maven.model.Plugin; -import org.apache.maven.model.io.xpp3.MavenXpp3Reader; -import org.apache.maven.project.MavenProject; -import org.apache.maven.scm.manager.NoSuchScmProviderException; -import org.apache.maven.scm.manager.ScmManager; -import org.apache.maven.scm.repository.ScmRepository; -import org.apache.maven.scm.repository.ScmRepositoryException; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.util.FileUtils; -import org.codehaus.plexus.util.StringUtils; -import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter; -import org.codehaus.plexus.util.xml.XMLWriter; -import org.codehaus.plexus.util.xml.Xpp3Dom; -import org.codehaus.plexus.util.xml.Xpp3DomBuilder; -import org.codehaus.plexus.xsiter.deployer.model.DeployableProject; -import org.codehaus.plexus.xsiter.deployer.model.DeployerResource; -import org.codehaus.plexus.xsiter.deployer.model.DeploymentWorkspace; -import org.codehaus.plexus.xsiter.deployer.model.DeployableProject.ProjectProperties; -import org.codehaus.plexus.xsiter.vhost.VirtualHostConfiguration; -import org.codehaus.plexus.xsiter.vhost.VirtualHostManager; - -/** - * Base for concrete {@link Deployer} implementation containing service methods. - * - * @author Rahul Thakur - * @version $Id$ - */ -public abstract class AbstractDeployer - extends AbstractLogEnabled - implements Deployer -{ - - /** - * Cargo Maven2 Plugin artifact ID. - */ - static final String ARTIFACT_ID_CARGO_MAVEN_2_PLUGIN = "cargo-maven2-plugin"; - - /** - * Cargo group ID. - */ - static final String GROUP_ID_ORG_CODEHAUS_CARGO = "org.codehaus.cargo"; - - /** - * Name of the deployment workspace descriptor. - */ - protected static final String DESCRIPTOR_WORKSPACE_XML = "workspace.xml"; - - /** - * Source Control Manager. - * - * @plexus.requirement - */ - protected ScmManager scmManager; - - /** - * Component to Manage Virtual Hosts for a Project. - * - * @plexus.requirement - */ - protected VirtualHostManager virtualHostManager; - - /** - * Directory where all the Project deployment workspaces are created. - * - * @plexus.configuration - */ - protected String workingDirectory; - - /** - * Default deplyment goal(s) to use in absence of any goal being specified - * - * @plexus.configuration default-value="clean compile war:war cargo:start" - */ - protected String defaultDeploymentGoals; - - public AbstractDeployer() - { - super(); - } - - /** - * Creates a deployment workspace if none exists for the specified DeployableProject. - * @return {@link DeploymentWorkspace} instance - * @throws Exception - */ - protected DeploymentWorkspace createDeploymentWorkspaceIfRequired( DeployerResource project ) - throws Exception - { - if ( !new File( workingDirectory, project.getLabel() ).exists() ) - return createDeploymentWorkspace( project ); - else - return loadWorkspaceFromDescriptor( project.getLabel() ); - } - - /** - * Creates a {@link DeploymentWorkspace} for the specified Project. - * - * @param project - * @param workspaceID - * @return created {@link DeploymentWorkspace} instance - * @throws Exception - */ - protected DeploymentWorkspace createDeploymentWorkspace( DeployerResource project ) - throws Exception - { - DeploymentWorkspace workspace = new DeploymentWorkspace(); - String id = project.getLabel(); - File rootDir = new File( workingDirectory, project.getLabel() ); - // set absolute path for the workspace root directory. - workspace.setRootDirectory( rootDir.getAbsolutePath() ); - createIfNonExistent( rootDir ); - createIfNonExistent( new File( workspace.getRootDirectory(), workspace.getTempDirectory() ) ); - createIfNonExistent( new File( workspace.getRootDirectory(), workspace.getWebappDirectory() ) ); - createIfNonExistent( new File( workspace.getRootDirectory(), workspace.getWebserverDirectory() ) ); - createIfNonExistent( new File( workspace.getRootDirectory(), workspace.getWorkingDirectory() ) ); - persistWorkspaceDescriptor( project, workspace ); - // setup other properties for workspace; - workspace = loadWorkspaceFromDescriptor( id ); - return workspace; - } - - /** - * @param dir - */ - private void createIfNonExistent( File dir ) - { - if ( !dir.exists() ) - { - getLogger().info( "Creating Deployment workspace dir: " + dir.getAbsolutePath() ); - FileUtils.mkdir( dir.getAbsolutePath() ); - } - } - - /** - * Persists DeploymentWorkspace for the Project to XML. - * - * @param workspace - */ - private void persistWorkspaceDescriptor( DeployerResource project, DeploymentWorkspace workspace ) - { - String LS = System.getProperty( "line.separator" ); - - try - { - File workspaceDesc = new File( workspace.getRootDirectory(), "workspace.xml" ); - FileWriter writer = new FileWriter( workspaceDesc ); - XMLWriter w = new PrettyPrintXMLWriter( writer ); - w.startElement( ELT_WORKSPACE ); - - w.startElement( ELT_ID ); - w.writeText( project.getLabel() ); - w.endElement(); - - w.startElement( ELT_SCM_URL ); - w.writeText( project.getScmURL() ); - w.endElement(); - - w.startElement( ELT_SCM_USERNAME ); - w.writeText( project.getScmUsername() ); - w.endElement(); - - w.startElement( ELT_SCM_PASSWORD ); - w.writeText( project.getScmPassword() ); - w.endElement(); - - w.startElement( ELT_ROOT_DIRECTORY ); - w.writeText( workspace.getRootDirectory() ); - w.endElement(); - - w.startElement( ELT_TEMP_DIRECTORY ); - w.writeText( workspace.getTempDirectory() ); - w.endElement(); - - w.startElement( ELT_WEBAPP_DIRECTORY ); - w.writeText( workspace.getWebappDirectory() ); - w.endElement(); - - w.startElement( ELT_WEBSERVER_DIRECTORY ); - w.writeText( workspace.getWebserverDirectory() ); - w.endElement(); - - w.startElement( ELT_WORKING_DIRECTORY ); - w.writeText( workspace.getWorkingDirectory() ); - w.endElement(); - - // close workspace element - w.endElement(); - - writer.write( LS ); - writer.close(); - } - catch ( Exception e ) - { - getLogger().error( "Error persisting Workspace Descriptor", e ); - } - } - - /** - * Reads the XML descriptor for the specified Project and creates a - * {@link DeploymentWorkspace} instance from it. - * - * @param workspaceId String identifier for the workspace for which to - * source the Workspace descriptor for. - * @return {@link DeploymentWorkspace} instance. - * @throws Exception - */ - protected DeploymentWorkspace loadWorkspaceFromDescriptor( String workspaceId ) - throws Exception - { - File desc = new File( new File( workingDirectory, workspaceId ), "workspace.xml" ); - if ( !desc.exists() ) - { - getLogger().error( "Workspace descriptor not found for workspace Id: " + workspaceId ); - throw new Exception( "Workspace descriptor not found for workspace Id: " + workspaceId ); - } - FileReader reader = new FileReader( desc ); - // root element is - Xpp3Dom eltWorkSpace = Xpp3DomBuilder.build( reader ); - String id = eltWorkSpace.getChild( ELT_ID ).getValue(); - String scmURL = eltWorkSpace.getChild( ELT_SCM_URL ).getValue(); - String scmUsername = eltWorkSpace.getChild( ELT_SCM_USERNAME ).getValue(); - String scmPassword = eltWorkSpace.getChild( ELT_SCM_PASSWORD ).getValue(); - String rootDir = eltWorkSpace.getChild( ELT_ROOT_DIRECTORY ).getValue(); - String tmpDir = eltWorkSpace.getChild( ELT_TEMP_DIRECTORY ).getValue(); - String webserverDir = eltWorkSpace.getChild( ELT_WEBSERVER_DIRECTORY ).getValue(); - String webappDir = eltWorkSpace.getChild( ELT_WEBAPP_DIRECTORY ).getValue(); - String workingDir = eltWorkSpace.getChild( ELT_WORKING_DIRECTORY ).getValue(); - - DeploymentWorkspace workspace = new DeploymentWorkspace(); - workspace.setLabel( id ); - workspace.setScmURL( scmURL ); - workspace.setScmUsername( scmUsername ); - workspace.setScmPassword( scmPassword ); - workspace.setRootDirectory( rootDir ); - workspace.setTempDirectory( tmpDir ); - workspace.setWebappDirectory( webappDir ); - workspace.setWebserverDirectory( webserverDir ); - workspace.setWebappDirectory( webappDir ); - workspace.setWorkingDirectory( workingDir ); - - return workspace; - } - - /** - * Return an {@link ScmRepository} from the SCM URL. - * - * @param project - * @return - * @throws ScmRepositoryException - * @throws NoSuchScmProviderException - */ - protected ScmRepository getScmRepository( DeployerResource project ) - throws ScmRepositoryException, NoSuchScmProviderException - { - ScmRepository repository = scmManager.makeScmRepository( project.getScmURL().trim() ); - - repository.getProviderRepository().setPersistCheckout( true ); - - if ( !StringUtils.isEmpty( project.getScmUsername() ) ) - { - repository.getProviderRepository().setUser( project.getScmUsername() ); - - if ( !StringUtils.isEmpty( project.getScmPassword() ) ) - { - repository.getProviderRepository().setPassword( project.getScmPassword() ); - } - else - { - repository.getProviderRepository().setPassword( "" ); - } - } - - return repository; - } - - /** - * Service method to translate and adjust the directory paths for the - * Virtual Host configuration to be relative from the Deployment workspaces - * ROOT dir. - *

- * Also deletes any existing vhost resources. - * - * @param config - * @param workspace - */ - protected void resetVirtualHostDirectory( VirtualHostConfiguration config, DeploymentWorkspace workspace ) - { - if ( config.getVhostDirectory().startsWith( "/" ) ) - { - config.setVhostDirectory( StringUtils.replace( workspace.getRootDirectory() + config.getVhostDirectory(), - "\\", "/" ) ); - } - else - { - config.setVhostDirectory( StringUtils.replace( workspace.getRootDirectory() + "/" - + config.getVhostDirectory(), "\\", "/" ) ); - } - if ( config.getVhostLogDirectory().startsWith( "/" ) ) - { - config.setVhostLogDirectory( StringUtils.replace( workspace.getRootDirectory() - + config.getVhostLogDirectory(), "\\", "/" ) ); - } - else - { - config.setVhostLogDirectory( StringUtils.replace( workspace.getRootDirectory() + "/" - + config.getVhostLogDirectory(), "\\", "/" ) ); - } - } - - /** - * Reads the pom.xml from the checked out project and returns a - * {@link MavenProject} instance. - * - * @param project - * @return - */ - protected MavenProject getMavenProjectForCheckedoutProject( DeployableProject project ) - { - MavenProject mavenProject = null; - // Build Maven Project - MavenXpp3Reader mavenReader = new MavenXpp3Reader(); - try - { - File checkoutDir = checkoutProjectIfRequired( project ); - File pomXml = new File( checkoutDir, "pom.xml" ); - if ( !pomXml.exists() ) - throw new Exception( "No Maven Project descriptor available for checked out project under: " - + checkoutDir.getAbsolutePath() ); - // getLogger ().info ("Reading pom.xml located at: " + - // pomXml.getAbsolutePath ()); - Model model = mavenReader.read( new FileReader( pomXml ), true ); - mavenProject = new MavenProject( model ); - } - catch ( Exception e ) - { - e.printStackTrace(); - getLogger().error( e.getMessage() ); - } - - return mavenProject; - } - - /** - * Checks out the project if its not yet checked out and returns the Project - * Check out directory. - * - * @param project - * @return Check out directory where the project was checked out to. - * @throws Exception - */ - protected File checkoutProjectIfRequired( DeployableProject project ) - throws Exception - { - DeploymentWorkspace workspace = loadWorkspaceFromDescriptor( project.getLabel() ); - project.setScmUsername( workspace.getScmUsername() ); - project.setScmPassword( workspace.getScmPassword() ); - project.setScmURL( workspace.getScmURL() ); - - File workspaceWorkingDir = new File( workspace.getRootDirectory(), workspace.getWorkingDirectory() ); - String scmTag = null != project.getScmTag() ? project.getScmTag() : "HEAD"; - - File checkoutDir = new File( workspaceWorkingDir, scmTag ); - - // check out project if it is not checked out yet - if ( !checkoutDir.exists() ) - { - getLogger().info( "No checked out dir found for Project: " + project.getLabel() + " , version: " + scmTag ); - checkoutProject( project ); - } - return checkoutDir; - } - - /** - * Service method to convert a String to a List - * - * @param list - * @param delim - * @return - */ - protected List string2List( String list, char delim ) - { - List v = new ArrayList(); - - if ( list == null ) - return v; - - int s = 0, l = list.length(), i = -1; - - while ( ( s < l ) && ( i = list.indexOf( delim, s ) ) != -1 ) - { - if ( s != i ) - v.add( list.substring( s, i ) ); - s = i + 1; - } - if ( s < l ) - v.add( list.substring( s, l ) ); - - return v; - } - - /** - * Returns true if there exists cargo plugin configuration in - * the Maven POM.xml which we need to deploy to appserver. - * - * @return - */ - protected boolean isCargoPluginConfigurationInPOM( DeployableProject project ) - throws Exception - { - MavenProject mavenProject = getMavenProjectForCheckedoutProject( project ); - List pomBuildPlugins = mavenProject.getBuildPlugins(); - for ( Iterator it = pomBuildPlugins.iterator(); it.hasNext(); ) - { - Plugin plugin = (Plugin) it.next(); - String groupId = plugin.getGroupId(); - String artifactId = plugin.getArtifactId(); - if ( groupId.equals( GROUP_ID_ORG_CODEHAUS_CARGO ) && artifactId.equals( ARTIFACT_ID_CARGO_MAVEN_2_PLUGIN ) ) - { - return true; - } - } - - return false; - } - - /** - * Service method that sets up properties for a {@link DeployableProject} - * instance. - * - * @param project - * @param property - * @param value - */ - private void assignProjectProperty( DeployerResource project, ProjectProperties property, String value ) - { - if ( property == ProjectProperties.PROP_LABEL ) - project.setLabel( value ); - if ( property == ProjectProperties.PROP_SCM_URL ) - project.setScmURL( value ); - if ( property == ProjectProperties.PROP_SCM_USER ) - project.setScmUsername( value ); - if ( property == ProjectProperties.PROP_SCM_PASSWORD ) - project.setScmPassword( value ); - if ( property == ProjectProperties.PROP_SCM_TAG ) - project.setScmTag( value ); - } - -} \ No newline at end of file diff --git a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/DefaultDeployer.java b/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/DefaultDeployer.java deleted file mode 100644 index f7b8ee202..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/DefaultDeployer.java +++ /dev/null @@ -1,394 +0,0 @@ -package org.codehaus.plexus.xsiter.deployer; - -import java.io.File; -import java.io.IOException; -import java.io.StringReader; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Properties; - -import org.apache.maven.project.MavenProject; -import org.apache.maven.scm.ScmFileSet; -import org.apache.maven.scm.ScmResult; -import org.apache.maven.scm.repository.ScmRepository; -import org.apache.velocity.app.Velocity; -import org.codehaus.plexus.util.FileUtils; -import org.codehaus.plexus.util.cli.CommandLineException; -import org.codehaus.plexus.util.cli.CommandLineUtils; -import org.codehaus.plexus.util.cli.Commandline; -import org.codehaus.plexus.util.cli.DefaultConsumer; -import org.codehaus.plexus.xsiter.deployer.model.DeployableProject; -import org.codehaus.plexus.xsiter.deployer.model.DeployedProject; -import org.codehaus.plexus.xsiter.deployer.model.DeploymentWorkspace; -import org.codehaus.plexus.xsiter.vhost.VirtualHostConfiguration; -import org.codehaus.plexus.xsiter.vhost.VirtualHostManager; - -/** - * Concrete implementation of a {@link Deployer} Role. - * - * @author Rahul Thakur - * @version $Id: DefaultDeployer.java,v 1.1 2006/09/14 05:11:37 rahul - * Exp $ - * @plexus.component - */ -public class DefaultDeployer - extends AbstractDeployer - -{ - - /** - * Date Formatter. - */ - private static final SimpleDateFormat sdf = new SimpleDateFormat( "dd-MM-yyyy, HH:mm:ss" ); - - /** - * @see org.codehaus.plexus.xsiter.deployer.Deployer#addProject(DeployableProject) - */ - public void addProject( DeployableProject project ) - throws Exception - { - if ( new File( workingDirectory, project.getLabel() ).exists() ) - throw new Exception( "Workspace with ID: '" + project.getLabel() + "' already exists." ); - createDeploymentWorkspace( project ); - } - - /** - * @see org.codehaus.plexus.xsiter.deployer.Deployer#removeProject(DeployableProject) - */ - public void removeProject( DeployableProject project ) - throws Exception - { - File targetDir = new File( workingDirectory, project.getLabel() ); - if ( targetDir.exists() ) - { - FileUtils.deleteDirectory( targetDir ); - } - else - { - getLogger().info( "No Deployment workspace found for Project '" + project.getLabel() + "'" ); - } - } - - /** - * @see org.codehaus.plexus.xsiter.deployer.Deployer#getDeploymentWorkspace(DeployableProject) - */ - public DeploymentWorkspace getDeploymentWorkspace( DeployableProject project ) - throws Exception - { - return loadWorkspaceFromDescriptor( project.getLabel() ); - } - - /** - * @return the workingDirectory - */ - public String getWorkingDirectory() - { - return workingDirectory; - } - - /** - * @param workingDirectory the workingDirectory to set - */ - public void setWorkingDirectory( String workingDirectory ) - { - this.workingDirectory = workingDirectory; - } - - /** - * @return the defaultDeploymentGoals - */ - public String getDefaultDeploymentGoals() - { - return defaultDeploymentGoals; - } - - /** - * @param defaultDeploymentGoals the defaultDeploymentGoals to set - */ - public void setDefaultDeploymentGoals( String defaultDeploymentGoals ) - { - this.defaultDeploymentGoals = defaultDeploymentGoals; - } - - /** - * @see org.codehaus.plexus.xsiter.deployer.Deployer#addVirtualHost(DeployableProject) - */ - public void addVirtualHost( DeployableProject project ) - throws Exception - { - createDeploymentWorkspaceIfRequired( project ); - // Updated Implementation, use configuration from pom.xml - MavenProject mavenProject = getMavenProjectForCheckedoutProject( project ); - Properties props = mavenProject.getProperties(); - - String vhostsConfig = (String) props.get( VirtualHostManager.ELT_POM_VHOSTS_CONFIG ); - getLogger().info( "Creating Virtual Host Configuration from XML snippet:\n" + vhostsConfig ); - StringReader sr = new StringReader( vhostsConfig ); - List list = virtualHostManager.loadVirtualHostConfigurations( sr ); - boolean appendVhost = false; - for ( Iterator it = list.iterator(); it.hasNext(); ) - { - VirtualHostConfiguration config = (VirtualHostConfiguration) it.next(); - DeploymentWorkspace workspace = loadWorkspaceFromDescriptor( project.getLabel() ); - File workspaceWorkingDir = new File( workspace.getRootDirectory(), workspace.getWorkingDirectory() ); - String scmTag = null != project.getScmTag() ? project.getScmTag() : "HEAD"; - File checkoutDir = new File( workspaceWorkingDir, scmTag ); - getLogger().info( "Adding Virtual Host for config ID: " + config.getId() ); - // Adjust the Velocity 'file.resource.loader.path' property to the - // checkout directory, so the Vhosts template could be found. - Velocity.setProperty( Velocity.FILE_RESOURCE_LOADER_PATH, checkoutDir.getAbsolutePath() ); - // Adjust other directory paths on the VirtualHostConfiguration - // instance - resetVirtualHostDirectory( config, workspace ); - virtualHostManager.addVirtualHost( config, appendVhost ); - // subsequent vhost configs to be appended - if ( !appendVhost ) - appendVhost = true; - } - } - - /** - * @see org.codehaus.plexus.xsiter.deployer.Deployer#checkoutProject(DeployableProject) - */ - public void checkoutProject( DeployableProject project ) - throws Exception - { - DeploymentWorkspace workspace = createDeploymentWorkspaceIfRequired( project ); - getLogger().info( "Checking out Project: " + project.getLabel() + ", Version: " + project.getScmTag() ); - - // TODO: refactor/add a method that creates a Deployable Project - // instance from a Workspace descriptor - - // sanity for SCM info, source from workspace - project.setScmURL( workspace.getScmURL() ); - project.setScmUsername( workspace.getScmUsername() ); - project.setScmPassword( workspace.getScmPassword() ); - - try - { - ScmRepository repository = getScmRepository( project ); - ScmResult result; - synchronized ( this ) - { - File checkoutDir = new File( workspace.getRootDirectory(), workspace.getWorkingDirectory() ); - try - { - if ( checkoutDir.exists() ) - FileUtils.cleanDirectory( checkoutDir ); - } - catch ( IOException e ) - { - throw new Exception( "Could not clean directory : " + workspace.getWorkingDirectory(), e ); - } - - // check out to a tagged directory - String scmTag = null != project.getScmTag() ? project.getScmTag() : "HEAD"; - ScmFileSet fileSet = new ScmFileSet( new File( checkoutDir, scmTag ) ); - result = scmManager.getProviderByRepository( repository ).checkOut( repository, fileSet, - project.getScmTag() ); - getLogger().info( result.getCommandOutput() ); - getLogger().info( result.getProviderMessage() ); - } - - if ( !result.isSuccess() ) - { - getLogger().warn( "Command output: " + result.getCommandOutput() ); - getLogger().warn( "Provider message: " + result.getProviderMessage() ); - } - else - { - getLogger().info( "Project checked out successfully." ); - } - - // return result; - } - catch ( Exception e ) - { - throw new Exception( "Cannot checkout sources.", e ); - } - } - - /** - * @see org.codehaus.plexus.xsiter.deployer.Deployer#deployProject(DeployableProject) - */ - public DeployedProject deployProject( DeployableProject project ) - throws Exception - { - getLogger().info( "Using default deployment goals: " + defaultDeploymentGoals ); - // Deploy the checked out Project to Appserver/Webserver - return deployProject( project, defaultDeploymentGoals ); - } - - /** - * @see org.codehaus.plexus.xsiter.deployer.Deployer#deployProject(DeployableProject, - * java.lang.String) - */ - public DeployedProject deployProject( DeployableProject project, String goals ) - throws Exception - { - createDeploymentWorkspaceIfRequired( project ); - // Deploy the checked out Project to Appserver/Webserver - if ( isCargoPluginConfigurationInPOM( project ) ) - { - buildProject( project, goals ); - } - else - { - getLogger() - .error( "Unable to deploy project to an Application server. (Missing Cargo Maven Plugin configuration)" ); - throw new Exception( - "Unable to deploy project to an Application server. (Missing Cargo Maven Plugin configuration)" ); - } - // TODO Add more stuff to deployed project - return new DeployedProject(); - } - - /** - * @see org.codehaus.plexus.xsiter.deployer.Deployer#buildProject(DeployableProject, - * java.lang.String) - */ - public void buildProject( DeployableProject project, String goals ) - throws Exception - { - DeploymentWorkspace workspace = createDeploymentWorkspaceIfRequired( project ); - checkoutProjectIfRequired( project ); - File workspaceWorkingDir = new File( workspace.getRootDirectory(), workspace.getWorkingDirectory() ); - String scmTag = null != project.getScmTag() ? project.getScmTag() : "HEAD"; - File checkoutDir = new File( workspaceWorkingDir, scmTag ); - - if ( !checkoutDir.exists() ) - throw new Exception( "No check out directory exists, nothing to build" ); - - // XXX: It would be nice to have an attempt to check that 'mvn' command - // was on $PATH - - Commandline cmd = new Commandline(); - cmd.setExecutable( MAVEN_EXECUTABLE ); - List argsList = string2List( goals, ' ' ); - for ( Iterator it = argsList.iterator(); it.hasNext(); ) - { - String arg = (String) it.next(); - cmd.createArgument().setValue( arg ); - } - cmd.setWorkingDirectory( checkoutDir.getAbsolutePath() ); - getLogger().debug( "Command to run is: " + cmd.toString() ); - int exitValue = -1; - try - { - exitValue = CommandLineUtils.executeCommandLine( cmd, new DefaultConsumer(), new DefaultConsumer() ); - getLogger().info( "Command returned exit value: " + exitValue ); - if ( exitValue != 0 ) - { - getLogger().error( "Unable to execute command: '" + goals + "'" ); - throw new Exception( "Unable to execute command: '" + goals + "'" ); - } - - // For some reason Plexus-Utils being pulled from transitive deps - // complains about getPid() method not present - //getLogger().debug( "Process ID : " + cmd.getPid() ); - //FileWriter fw = new FileWriter( new File( workspaceWorkingDir, "pid.txt" ), true ); - //fw.append( "# PID for goal(s): '" + goals + "' run on " + sdf.format( new Date() ) ); - //fw.write( "\n" + cmd.getPid() ); - //fw.close(); - - } - catch ( CommandLineException e ) - { - getLogger().error( "Unable to execute command: '" + cmd.toString() + "'", e ); - } - } - - /** - * @see org.codehaus.plexus.xsiter.deployer.Deployer#updateProject(org.codehaus.plexus.xsiter.deployer.model.DeployableProject) - */ - public void updateProject( DeployableProject project ) - throws Exception - { - DeploymentWorkspace workspace = createDeploymentWorkspaceIfRequired( project ); - String scmTag = null != project.getScmTag() ? project.getScmTag() : "HEAD"; - getLogger().info( "Updating Project: " + project.getLabel() + ", Version: " + scmTag ); - - // TODO: refactor/add a method that creates a Deployable Project - // instance from a Workspace descriptor - - // sanity for SCM info, source from workspace - project.setScmURL( workspace.getScmURL() ); - project.setScmUsername( workspace.getScmUsername() ); - project.setScmPassword( workspace.getScmPassword() ); - - try - { - ScmRepository repository = getScmRepository( project ); - ScmResult result; - synchronized ( this ) - { - File checkoutDir = new File( workspace.getRootDirectory(), workspace.getWorkingDirectory() ); - try - { - if ( checkoutDir.exists() ) - FileUtils.cleanDirectory( checkoutDir ); - } - catch ( IOException e ) - { - throw new Exception( "Could not clean directory : " + workspace.getWorkingDirectory(), e ); - } - - // check out to a tagged directory - ScmFileSet fileSet = new ScmFileSet( new File( checkoutDir, scmTag ) ); - result = scmManager.getProviderByRepository( repository ).update( repository, fileSet, scmTag ); - } - - if ( !result.isSuccess() ) - { - getLogger().warn( "Command output: " + result.getCommandOutput() ); - getLogger().warn( "Provider message: " + result.getProviderMessage() ); - } - else - { - getLogger().info( "Project checked out successfully." ); - } - - // return result; - } - catch ( Exception e ) - { - throw new Exception( "Cannot checkout sources.", e ); - } - } - - /** - * @see org.codehaus.plexus.xsiter.deployer.Deployer#getAllDeploymentWorkspaces() - */ - public List getAllDeploymentWorkspaces() - throws Exception - { - List list = new ArrayList(); - - File workingDir = new File( workingDirectory ); - File[] files = workingDir.listFiles(); - for ( int i = 0; i < files.length; i++ ) - { - File dir = files[i]; - if ( hasWorkspaceDescriptor( dir ) ) - list.add( loadWorkspaceFromDescriptor( dir.getName() ) ); - else if ( getLogger().isWarnEnabled() ) - getLogger().warn( "No workspace descriptor found under directory: " + dir.getName() ); - } - - return list; - } - - /** - * Tests if a directory under the Deployer working directory is a Deployment workspace. - * - * @param dir Directory to test if its a deployment workspace. - * @return true if the deployment workspace descriptor is found under specified directory. - */ - private boolean hasWorkspaceDescriptor( File dir ) - { - return new File( dir, DESCRIPTOR_WORKSPACE_XML ).exists(); - } - -} diff --git a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/DefaultDeployerApplication.java b/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/DefaultDeployerApplication.java deleted file mode 100644 index 37df0afea..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/DefaultDeployerApplication.java +++ /dev/null @@ -1,201 +0,0 @@ -/** - * - */ -package org.codehaus.plexus.xsiter.deployer; - -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; -import java.util.Properties; -import java.util.Vector; - -import org.codehaus.plexus.components.interactivity.Prompter; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.xsiter.deployer.model.DeployableProject; -import org.codehaus.plexus.xsiter.deployer.model.DeployerResource; -import org.codehaus.plexus.xsiter.deployer.model.DeployableProject.ProjectProperties; - -/** - * Facade to the underlying Deployer components. - * - * @author Rahul Thakur - * @dated: 22/09/2006, 11:01:53 AM - * @plexus.component - */ -public class DefaultDeployerApplication - extends AbstractLogEnabled - implements DeployerApplication -{ - - /** - * Deployment Manager to use to delegate calls to. - * - * @plexus.requirement - */ - private Deployer deploymentManager; - - /** - * Prompter for interactivity. - * - * @plexus.requirement - */ - private Prompter prompter; - - /** - * @see org.codehaus.plexus.xsiter.deployer.DeployerApplication#addProject(java.util.Properties) - */ - public void addProject( Properties properties ) - throws Exception - { - // List list = ProjectProperties.getRequiredProjectProperties (); - List list = Arrays.asList( ProjectProperties.values() ); - Vector v = new Vector( list ); - // track required properties not found - Vector v2 = (Vector) v.clone(); - DeployableProject project = new DeployableProject(); - - // check if we have all required properties - for ( Iterator it = v.iterator(); it.hasNext(); ) - { - ProjectProperties p = (ProjectProperties) it.next(); - String val = (String) properties.get( p.getName() ); - if ( null != val ) - { - v2.remove( p ); - } - assignProjectProperty( project, p, val ); - } - - // Prompt for missing properties - if ( v2.size() > 0 ) - { - prompter.showMessage( "Please provide the following properties for Deployment workspace setup." ); - for ( Iterator it = v2.iterator(); it.hasNext(); ) - { - ProjectProperties p = (ProjectProperties) it.next(); - String val = null; - //check if a valid input was obtained from the user - while ( null == val || ( p.isRequired() && val.trim().equals( "" ) ) ) - val = prompter.prompt( "Enter a value for " + p.getName() ); - assignProjectProperty( project, p, val ); - } - } - getLogger().debug( "adding project '" + project.getLabel() + "'" ); - - deploymentManager.addProject( project ); - } - - /** - * @see org.codehaus.plexus.xsiter.deployer.DeployerApplication#addVirtualHost(java.lang.String) - */ - public void addVirtualHost( String pid ) - throws Exception - { - DeployableProject project = new DeployableProject(); - project.setLabel( pid ); - deploymentManager.addVirtualHost( project ); - } - - /** - * @see org.codehaus.plexus.xsiter.deployer.DeployerApplication#checkoutProject(java.lang.String) - */ - public void checkoutProject( String pid ) - throws Exception - { - DeployableProject project = new DeployableProject(); - project.setLabel( pid ); - deploymentManager.checkoutProject( project ); - } - - /** - * @see org.codehaus.plexus.xsiter.deployer.DeployerApplication#deployProject(java.lang.String) - */ - public void deployProject( String pid ) - throws Exception - { - DeployableProject project = new DeployableProject(); - project.setLabel( pid ); - String tag = prompter.prompt( "Enter SCM tag" ); - if ( null == tag || tag.trim().equals( "" ) ) - tag = "HEAD"; - project.setScmTag( tag ); - deploymentManager.deployProject( project ); - } - - /** - * @see org.codehaus.plexus.xsiter.deployer.DeployerApplication#deployProject(java.lang.String, - * java.lang.String) - */ - public void deployProject( String pid, String goals ) - throws Exception - { - DeployableProject project = new DeployableProject(); - project.setLabel( pid ); - String tag = prompter.prompt( "Enter SCM tag" ); - if ( null == tag || tag.trim().equals( "" ) ) - tag = "HEAD"; - project.setScmTag( tag ); - deploymentManager.deployProject( project, goals ); - } - - /** - * @see org.codehaus.plexus.xsiter.deployer.DeployerApplication#removeProject(java.lang.String) - */ - public void removeProject( String pid ) - throws Exception - { - DeployableProject project = new DeployableProject(); - project.setLabel( pid ); - deploymentManager.removeProject( project ); - } - - /** - * @see org.codehaus.plexus.xsiter.deployer.DeployerApplication#checkoutProject(java.lang.String, - * java.lang.String) - */ - public void checkoutProject( String pid, String scmTag ) - throws Exception - { - DeployableProject project = new DeployableProject(); - project.setLabel( pid ); - project.setScmTag( scmTag ); - deploymentManager.checkoutProject( project ); - } - - /** - * @see org.codehaus.plexus.xsiter.deployer.DeployerApplication#deployProject(java.lang.String, - * java.lang.String, java.lang.String) - */ - public void deployProject( String pid, String goals, String scmTag ) - throws Exception - { - DeployableProject project = new DeployableProject(); - project.setLabel( pid ); - project.setScmTag( scmTag ); - // first checkout and then deploy - deploymentManager.checkoutProject( project ); - deploymentManager.deployProject( project, goals ); - } - - /** - * Service method that sets up properties for a {@link DeployableProject} - * instance. - * - * @param project - * @param property - * @param value - */ - private void assignProjectProperty( DeployerResource project, ProjectProperties property, String value ) - { - if ( property == ProjectProperties.PROP_LABEL ) - project.setLabel( value ); - if ( property == ProjectProperties.PROP_SCM_URL ) - project.setScmURL( value ); - if ( property == ProjectProperties.PROP_SCM_USER ) - project.setScmUsername( value ); - if ( property == ProjectProperties.PROP_SCM_PASSWORD ) - project.setScmPassword( value ); - if ( property == ProjectProperties.PROP_SCM_TAG ) - project.setScmTag( value ); - } -} diff --git a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/Deployer.java b/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/Deployer.java deleted file mode 100644 index dd555dc0e..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/Deployer.java +++ /dev/null @@ -1,148 +0,0 @@ -package org.codehaus.plexus.xsiter.deployer; - -import java.util.List; - -import org.codehaus.plexus.xsiter.deployer.model.DeployableProject; -import org.codehaus.plexus.xsiter.deployer.model.DeployedProject; -import org.codehaus.plexus.xsiter.deployer.model.DeploymentWorkspace; - -/** - * Deployment Manager Role. - * - * @author Rahul Thakur - * @version $$Id$$ - */ -public interface Deployer -{ - /** - * The role associated with the component. - */ - public static final String ROLE = Deployer.class.getName(); - - // workspace descriptor elements - public static final String ELT_WORKING_DIRECTORY = "workingDirectory"; - - public static final String ELT_WEBSERVER_DIRECTORY = "webserverDirectory"; - - public static final String ELT_WEBAPP_DIRECTORY = "webappDirectory"; - - public static final String ELT_TEMP_DIRECTORY = "tempDirectory"; - - public static final String ELT_ROOT_DIRECTORY = "rootDirectory"; - - public static final String ELT_SCM_URL = "scmURL"; - - public static final String ELT_SCM_PASSWORD = "scmPassword"; - - public static final String ELT_SCM_USERNAME = "scmUsername"; - - public static final String ELT_ID = "id"; - - public static final String ELT_WORKSPACE = "workspace"; - - /** - * Maven 2.x executable name that we expect to find to be able to build and - * deploy projects. - */ - public static final String MAVEN_EXECUTABLE = "mvn"; - - /** - * Deploys a Project to associated Deployment Workspace using the default - * goal(s). - *

- * This will create a deployment workspace if one does not exists. - * - * @param project project to deploy. - * @return an instance of {@link DeployedProject}. - * @throws Exception - */ - public DeployedProject deployProject( DeployableProject project ) - throws Exception; - - /** - * Deploys a Project to the associated Appserver in the Deployment Workspace - * using the specified goal(s). - * - * @param project - * @param goals - * @return - * @throws Exception - */ - public DeployedProject deployProject( DeployableProject project, String goals ) - throws Exception; - - /** - * Delegates the specified goal(s) on the checked out project. - * - * @param project - * @param goals - * @throws Exception - */ - public void buildProject( DeployableProject project, String goals ) - throws Exception; - - /** - * Sets up a Deployment Workspace for the specified Project - * - * @param project project to setup a Deployment Workspace for. - * @throws Exception if a Duplicate workspace exists - */ - public void addProject( DeployableProject project ) - throws Exception; - - /** - * Deletes a Deployment Workspace for the specified Project - * - * @param project Project whose deployment workspace is to be removed. - * @throws Exception if workspace could be deleted (is locked) - */ - public void removeProject( DeployableProject project ) - throws Exception; - - /** - * Checks out the specified project. - * - * @param project Project to check out - * @throws Exception - */ - public void checkoutProject( DeployableProject project ) - throws Exception; - - /** - * Updates an existing project.

- * - * @param project - * @throws Exception - */ - public void updateProject( DeployableProject project ) - throws Exception; - - /** - * Obtains and returns the deployment workspace for the project. - * - * @param project - * @return - * @throws Exception if workspace not found for the specified project. - */ - public DeploymentWorkspace getDeploymentWorkspace( DeployableProject project ) - throws Exception; - - /** - * Sets up a Virtual Host for a given Project with the specified - * configuration. - * - * @param project - * @throws Exception - */ - public void addVirtualHost( DeployableProject project ) - throws Exception; - - /** - * Lists all the Deployment workspaces under the Deployer's working directory. - * - * @return list of all {@link DeploymentWorkspace} being managed by Deployer. - * @throws Exception if there was an error obtaining list of workspaces. - */ - public List getAllDeploymentWorkspaces() - throws Exception; -} diff --git a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/DeployerApplication.java b/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/DeployerApplication.java deleted file mode 100644 index c98c99b0a..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/DeployerApplication.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * - */ -package org.codehaus.plexus.xsiter.deployer; - -import java.util.Properties; - -/** - * @author Rahul Thakur - * @dated: 22/09/2006, 11:01:19 AM - */ -public interface DeployerApplication -{ - - public static final String ROLE = DeployerApplication.class.getName(); - - /** - * Set up a Project Deployment workspace - * - * @param props - * @throws Exception - */ - public void addProject( Properties props ) - throws Exception; - - /** - * Set up a Virtual Host for the specified workspace/project Id - * - * @param pid - * @throws Exception - */ - public void addVirtualHost( String pid ) - throws Exception; - - /** - * Check out the project for the specified id. - * - * @param pid - * @throws Exception - */ - public void checkoutProject( String pid ) - throws Exception; - - /** - * Check out a particular version of SCM tag. - * - * @param pid - * @param scmTag - * @throws Exception - */ - public void checkoutProject( String pid, String scmTag ) - throws Exception; - - /** - * Deploy Project for the specified Id. - * - * @param pid - */ - public void deployProject( String pid ) - throws Exception; - - /** - * Deploy Project for the specified Id with custom goals. - *

- * Use this for deploying for target profiles. - * - * @param pid - * @param goals String that wraps up the goals to call for deployment. - * @throws Exception - */ - public void deployProject( String pid, String goals ) - throws Exception; - - /** - * Deploy project with custom goals on a specific version - * - * @param pid - * @param goals - * @param scmTag - * @throws Exception - */ - public void deployProject( String pid, String goals, String scmTag ) - throws Exception; - - /** - * Remove project for the specified Id - * - * @param pid - * @throws Exception - */ - public void removeProject( String pid ) - throws Exception; - -} diff --git a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/DeployerException.java b/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/DeployerException.java deleted file mode 100644 index 59693dcca..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/DeployerException.java +++ /dev/null @@ -1,22 +0,0 @@ -/** - * - */ -package org.codehaus.plexus.xsiter.deployer; - -/** - * Exception class that wraps up all error situations encountered while - * deployment. - * - * @author Rahul Thakur - * @dated: 21/09/2006, 3:33:03 PM - */ -public class DeployerException - extends Throwable -{ - - /** - * Serial Version ID - */ - private static final long serialVersionUID = 3440535312037023020L; - -} diff --git a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/model/DeployableProject.java b/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/model/DeployableProject.java deleted file mode 100644 index fa6beb70b..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/model/DeployableProject.java +++ /dev/null @@ -1,81 +0,0 @@ -package org.codehaus.plexus.xsiter.deployer.model; - -import java.util.ArrayList; -import java.util.List; - -import org.codehaus.plexus.xsiter.deployer.Deployer; - -/** - * Deployable Project entity. - *

- * This wraps the Project details required by the {@link Deployer} to - * deploy it. - * - * @author Rahul Thakur - * @dated: 14/09/2006, 3:43:05 PM - */ -public class DeployableProject - extends DeployerResource -{ - - // Required Project creation properties - public static enum ProjectProperties { - PROP_SCM_URL("scmURL", true), PROP_SCM_USER("scmUsername", false), PROP_SCM_PASSWORD("scmPassword", false), PROP_SCM_TAG( - "scmTag", false), PROP_LABEL("label", true); - - /** - * Property name - */ - private String name; - - /** - * Is Property required? - */ - private boolean required; - - /** - * @param name - * @param required - */ - private ProjectProperties( String name, boolean required ) - { - this.name = name; - this.required = required; - } - - /** - * @return the name - */ - public String getName() - { - return name; - } - - /** - * @return the required - */ - public boolean isRequired() - { - return required; - } - - /** - * Returns a List of required project properties - * - * @return - */ - public static List getRequiredProjectProperties() - { - List list = new ArrayList(); - ProjectProperties[] allProps = values(); - for ( int i = 0; i < allProps.length; i++ ) - { - if ( allProps[i].required ) - list.add( allProps[i] ); - } - return list; - } - - } - -} diff --git a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/model/DeployedProject.java b/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/model/DeployedProject.java deleted file mode 100644 index ed7f887ac..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/model/DeployedProject.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * - */ -package org.codehaus.plexus.xsiter.deployer.model; - -/** - * @author Rahul Thakur - * @dated: 14/09/2006, 3:59:42 PM - */ -public class DeployedProject -{ - - /** - * String Id, usually the composite of groupId, artifactId and version - * sourced from the pom.xml - */ - private String id; - - /** - * Workspace that this instance is currently deployed to. - */ - private DeploymentWorkspace workspace; - - /** - * Project that is deployed to the deployment workspace - */ - private DeployerResource project; - - private String state = "UNKNOWN"; - - /** - * @return the id - */ - public String getId() - { - return id; - } - - /** - * @param id the id to set - */ - public void setId( String id ) - { - this.id = id; - } - - /** - * @return the project - */ - public DeployerResource getProject() - { - return project; - } - - /** - * @param project the project to set - */ - public void setProject( DeployerResource project ) - { - this.project = project; - } - - /** - * @return the workspace - */ - public DeploymentWorkspace getWorkspace() - { - return workspace; - } - - /** - * @param workspace the workspace to set - */ - public void setWorkspace( DeploymentWorkspace workspace ) - { - this.workspace = workspace; - } - - /** - * @return the state - */ - public String getState() - { - return state; - } - - /** - * @param state the state to set - */ - public void setState( String state ) - { - this.state = state; - } - -} diff --git a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/model/DeployerResource.java b/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/model/DeployerResource.java deleted file mode 100644 index 05f4bc9e4..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/model/DeployerResource.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * - */ -package org.codehaus.plexus.xsiter.deployer.model; - -/** - * @author Rahul Thakur - * - */ -public abstract class DeployerResource -{ - - /** - * SCM URL for the project - */ - private String scmURL; - - /** - * Label/Id for this Project instance. - *

- * This is used in workspace creation for the project. - */ - private String label; - - /** - * Username to use for logging in to SCM - */ - private String scmUsername = "anonymous"; - - /** - * Password to use for logging in to SCM. - */ - private String scmPassword = ""; - - /** - * Source control repository tag to be used for checking out a project. - */ - private String scmTag = null; - - /** - * @return the scmURL - */ - public String getScmURL() - { - return scmURL; - } - - /** - * @param scmURL the scmURL to set - */ - public void setScmURL( String scmURL ) - { - this.scmURL = scmURL; - } - - /** - * @return the projectId - */ - public String getLabel() - { - return label; - } - - /** - * @param projectId the projectId to set - */ - public void setLabel( String projectId ) - { - this.label = projectId; - } - - /** - * SCM Username to use for logging into Source Control - * - * @return - */ - public String getScmUsername() - { - // TODO Auto-generated method stub - return this.scmUsername; - } - - /** - * SCM Password to user for logging into Source Control - * - * @return - */ - public String getScmPassword() - { - // TODO Auto-generated method stub - return this.scmPassword; - } - - /** - * @param scmPassword the scmPassword to set - */ - public void setScmPassword( String scmPassword ) - { - this.scmPassword = scmPassword; - } - - /** - * @param scmUsername the scmUsername to set - */ - public void setScmUsername( String scmUsername ) - { - this.scmUsername = scmUsername; - } - - /** - * @return the scmTag - */ - public String getScmTag() - { - return scmTag; - } - - /** - * @param scmTag the scmTag to set - */ - public void setScmTag( String scmTag ) - { - this.scmTag = scmTag; - } - -} diff --git a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/model/DeploymentWorkspace.java b/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/model/DeploymentWorkspace.java deleted file mode 100644 index 15201b96d..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/java/org/codehaus/plexus/xsiter/deployer/model/DeploymentWorkspace.java +++ /dev/null @@ -1,141 +0,0 @@ -/** - * - */ -package org.codehaus.plexus.xsiter.deployer.model; - -/** - * Deployment Workspace wraps up the requisite set of resources required to - * setup a Project for Deployment. - * - * @author Rahul Thakur - * @dated: 14/09/2006, 3:54:43 PM - */ -public class DeploymentWorkspace - extends DeployerResource -{ - - /** - * Root directory for the workspace. - *

- * Absolute path to the Deployment workspace. All other directories are - * resolved relative to this. - */ - private String rootDirectory = null; - - /** - * Webapp deployment directory for the workspace. - */ - private String webappDirectory = "deploy/webapp"; - - /** - * Directory where webserver config and log files are stored. - */ - private String webserverDirectory = "deploy/apache"; - - /** - * Temporary directory - */ - private String tempDirectory = "tmp"; - - /** - * Working directory under the workspace for checkouts. - */ - private String workingDirectory = "working"; - - /** - * @return the rootDir - */ - public String getRootDirectory() - { - return rootDirectory; - } - - /** - * @param rootDir the rootDir to set - */ - public void setRootDirectory( String rootDir ) - { - this.rootDirectory = rootDir; - } - - /** - * @return the tmpDir - */ - public String getTempDirectory() - { - return tempDirectory; - } - - /** - * @param tmpDir the tmpDir to set - */ - public void setTempDirectory( String tmpDir ) - { - this.tempDirectory = tmpDir; - } - - /** - * @return the webappDir - */ - public String getWebappDirectory() - { - return webappDirectory; - } - - /** - * @param webappDir the webappDir to set - */ - public void setWebappDirectory( String webappDir ) - { - this.webappDirectory = webappDir; - } - - /** - * @return the webserverDir - */ - public String getWebserverDirectory() - { - return webserverDirectory; - } - - /** - * @param webserverDir the webserverDir to set - */ - public void setWebserverDirectory( String webserverDir ) - { - this.webserverDirectory = webserverDir; - } - - /** - * @return the workingDirectoy - */ - public String getWorkingDirectory() - { - return workingDirectory; - } - - /** - * @param workingDirectoy the workingDirectoy to set - */ - public void setWorkingDirectory( String workingDirectoy ) - { - this.workingDirectory = workingDirectoy; - } - - /** - * @return the label - */ - public String getId() - { - return super.getLabel(); - } - - /** - * @param label the label to set - */ - public void setid( String id ) - { - super.setLabel( id ); - } - -} diff --git a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/resources/META-INF/plexus/components.xml b/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index 9f8e08d7d..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - org.codehaus.plexus.xsiter.deployer.DeployerApplication - - - org.codehaus.plexus.xsiter.deployer.DefaultDeployerApplication - - - - org.codehaus.plexus.xsiter.deployer.Deployer - - - - org.codehaus.plexus.components.interactivity.Prompter - - - - - - org.codehaus.plexus.xsiter.deployer.Deployer - - org.codehaus.plexus.xsiter.deployer.DefaultDeployer - - default - - - org.apache.maven.scm.manager.ScmManager - - - - org.codehaus.plexus.xsiter.vhost.VirtualHostManager - - - - - target/deployments - - clean compile war:war cargo:start - - - - - diff --git a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/test/java/org/codehaus/plexus/xsiter/deployer/AbstractDeployerTest.java b/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/test/java/org/codehaus/plexus/xsiter/deployer/AbstractDeployerTest.java deleted file mode 100644 index 21cd3cb8f..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/test/java/org/codehaus/plexus/xsiter/deployer/AbstractDeployerTest.java +++ /dev/null @@ -1,295 +0,0 @@ -package org.codehaus.plexus.xsiter.deployer; - -import java.io.File; -import java.io.FileWriter; -import java.io.PrintWriter; - -import org.apache.maven.scm.ScmException; -import org.apache.maven.scm.ScmFileSet; -import org.apache.maven.scm.ScmTestCase; -import org.apache.maven.scm.command.add.AddScmResult; -import org.apache.maven.scm.command.checkin.CheckInScmResult; -import org.apache.maven.scm.command.checkout.CheckOutScmResult; -import org.apache.maven.scm.command.tag.TagScmResult; -import org.apache.maven.scm.provider.ScmProvider; -import org.apache.maven.scm.provider.svn.SvnScmTestUtils; -import org.apache.maven.scm.repository.ScmRepository; -import org.codehaus.plexus.util.FileUtils; - -/** - * - * @author Rahul Thakur - * @version $Id$ - */ -public abstract class AbstractDeployerTest - extends ScmTestCase -{ - - /** - * SCM tag to test against. - */ - protected static final String TAG_VERSION_1_0_0 = "Version-1_0_0"; - - public void setUp() - throws Exception - { - super.setUp(); - - FileUtils.forceDelete( getRepositoryRoot().getAbsolutePath() ); - FileUtils.forceDelete( getWorkingCopy() ); - - SvnScmTestUtils.initializeRepository( getRepositoryRoot() ); - ScmProvider scmProvider = getScmManager().getProviderByRepository( getScmRepository() ); - - // create a working directory for checkouts - getWorkingCopy().mkdir(); - CheckOutScmResult result = scmProvider.checkOut( getScmRepository(), new ScmFileSet( getWorkingDirectory() ), - null ); - assertTrue( "Check result was successful, output: " + result.getCommandOutput(), result.isSuccess() ); - - createDeployableWebApp(); - - addWebAppToSVNRepo(); - - tagWebAppInSVNRepo(); - } - - /** - * Returns an SCM Url for the local repository for the unit test. - * @return - * @throws Exception - */ - protected String getScmUrl() - throws Exception - { - return SvnScmTestUtils.getScmUrl( getRepositoryRoot() ); - } - - /** - * Returns an {@link ScmRepository} from the Scm Url for the local repository. - * @return - * @throws Exception - */ - protected ScmRepository getScmRepository() - throws Exception - { - System.err.println( getScmUrl() ); - return getScmManager().makeScmRepository( getScmUrl() ); - } - - /** - * Sets up minimal set of resources that constitute a web app. - */ - private void createDeployableWebApp() - throws Exception - { - String webAppDir = getWorkingCopy().getAbsolutePath() + "/trunk/src/webapp/"; - FileUtils.mkdir( webAppDir ); - // create conf dir - String confDir = getWorkingDirectory().getAbsolutePath() + "/trunk/src/conf"; - FileUtils.mkdir( confDir ); - // create WEB-INF dir - String webInfDir = webAppDir + "/WEB-INF"; - FileUtils.mkdir( webInfDir ); - - FileWriter webXml = new FileWriter( new File( webInfDir, "web.xml" ) ); - PrintWriter printer = new PrintWriter( webXml ); - printer.println( "" ); - printer - .println( "" ); - printer.println( " Sample Web app " ); - printer.println( " " ); - printer.println( " index.html" ); - printer.println( " index.jsp" ); - printer.println( " " ); - printer.println( "" ); - - printer.close(); - webXml.close(); - - FileWriter indexJsp = new FileWriter( new File( webAppDir, "index.jsp" ) ); - printer = new PrintWriter( indexJsp ); - printer.println( " Hello World! " ); - - printer.close(); - indexJsp.close(); - - createPomXml( new File( getWorkingDirectory().getAbsolutePath() + "/trunk/", "pom.xml" ) ); - - createVirtualHostTemplate( new File( confDir, "vhosts.vm" ) ); - - } - - private void createVirtualHostTemplate( File vhostTemplate ) - throws Exception - { - - FileWriter vhostVm = new FileWriter( vhostTemplate ); - PrintWriter printer = new PrintWriter( vhostVm ); - - printer.println( "" ); - printer.println( " ServerName $vhostName" ); - printer.println( " ErrorLog $vhostLogDirectory/apache_error.log" ); - printer.println( " CustomLog $vhostLogDirectory/apache_access.log combined" ); - printer.println( " ProxyPass / $vhostConnectorProtocol://localhost:$vhostConnectorPort/" ); - printer.println( " ProxyPassReverse / $vhostConnectorProtocol://localhost:$vhostConnectorPort/" ); - printer.println( "" ); - - printer.close(); - vhostVm.close(); - } - - /** - * Creates pom.xml. - * @param pom - * @throws Exception - */ - private void createPomXml( File pom ) - throws Exception - { - FileWriter pomXml = new FileWriter( pom ); - PrintWriter printer = new PrintWriter( pomXml ); - - printer.println( "" ); - printer.println( " 4.0.0" ); - printer.println( " sample" ); - printer.println( " sample-webapp" ); - printer.println( " 1.0-SNAPSHOT" ); - printer.println( " war" ); - printer.println( " " ); - printer.println( " " ); - printer.println( " scm:svn:file:///" + getBasedir().replace( '\\', '/' ) - + "/target/scm-test/repository/trunk" ); - printer.println( " " ); - printer.println( " " ); - printer.println( " scm:svn:file:///" + getBasedir().replace( '\\', '/' ) - + "/target/scm-test/repository/trunk" ); - printer.println( " " ); - printer.println( " " ); - printer.println( " " ); - printer.println( " " ); - printer.println( " " ); - printer.println( " org.codehaus.cargo" ); - printer.println( " cargo-maven2-plugin" ); - printer.println( " " ); - printer.println( " " ); - printer.println( " " ); - printer.println( " tomcat5x" ); - printer.println( " " ); - printer.println( " " ); - printer - .println( " http://mirrors.ccs.neu.edu/Apache/dist/tomcat/tomcat-5/v5.5.16/bin/apache-tomcat-5.5.16.zip" ); - printer.println( " " ); - printer.println( " ${installDir}" ); - printer.println( " " ); - printer.println( " ${basedir}/tomcat5x.log" ); - printer.println( " ${basedir}/cargo.log" ); - printer.println( " " ); - printer.println( " " ); - printer.println( " " ); - printer.println( " ${basedir}/../../deploy/webapp/${artifactId}/tomcat5x/" ); - printer.println( " " ); - printer.println( " " ); - printer.println( " " ); - printer.println( " " ); - printer.println( " 9191" ); - printer.println( " 9090" ); - printer.println( " -Xmx256m -Xms256m" ); - printer.println( " " ); - printer.println( " " ); - printer.println( " " ); - printer.println( " " ); - printer.println( " ROOT" ); - printer.println( " " ); - printer.println( " " ); - printer.println( " " ); - printer.println( " " ); - printer.println( " " ); - printer.println( " " ); - printer.println( " " ); - printer.println( " " ); - printer.println( " " ); - printer.println( " /opt/tools/cargo" ); - printer.println( " " ); - printer.println( " " ); - printer.println( " " ); - printer.println( " integration" ); - printer.println( " src/conf/vhosts.vm" ); - printer.println( " deploy/apache" ); - printer.println( " 127.0.0.1" ); - printer.println( " staging.localhost.com" ); - printer.println( " deploy/apache/logs" ); - printer.println( " http" ); - printer.println( " 9090 " ); - printer.println( " " ); - printer.println( " ]]>" ); - printer.println( " " ); - printer.println( " " ); - printer.println( "" ); - - printer.close(); - pomXml.close(); - } - - /** - * Adds and commits the created webapp resources to local SVN repo. - * @throws ScmException - * @throws Exception - */ - private void addWebAppToSVNRepo() - throws ScmException, Exception - { - ScmProvider scmProvider = getScmManager().getProviderByRepository( getScmRepository() ); - File webappDir = new File( getWorkingDirectory().getAbsolutePath() + "/trunk/src", "webapp" ); - // add webapp dir - AddScmResult addScmResult = scmProvider.add( getScmRepository(), new ScmFileSet( getWorkingDirectory(), - webappDir ) ); - assertTrue( "Check result was successful, output: " + addScmResult.getCommandOutput(), addScmResult.isSuccess() ); - - // add files under webapp dir - addScmResult = scmProvider.add( getScmRepository(), new ScmFileSet( getWorkingDirectory(), webappDir - .listFiles() ) ); - assertTrue( "Check result was successful, output: " + addScmResult.getCommandOutput(), addScmResult.isSuccess() ); - - // add files under WEB-INF dir - File webInfDir = new File( webappDir, "WEB-INF" ); - addScmResult = scmProvider.add( getScmRepository(), new ScmFileSet( getWorkingDirectory(), webInfDir - .listFiles() ) ); - assertTrue( "Check result was successful, output: " + addScmResult.getCommandOutput(), addScmResult.isSuccess() ); - - // add src/conf dir - File confDir = new File( getWorkingDirectory().getAbsolutePath() + "/trunk/src", "conf" ); - addScmResult = scmProvider.add( getScmRepository(), new ScmFileSet( getWorkingDirectory(), confDir ) ); - assertTrue( "Check result was successful, output: " + addScmResult.getCommandOutput(), addScmResult.isSuccess() ); - - // add files under src/conf dir - addScmResult = scmProvider - .add( getScmRepository(), new ScmFileSet( getWorkingDirectory(), confDir.listFiles() ) ); - assertTrue( "Check result was successful, output: " + addScmResult.getCommandOutput(), addScmResult.isSuccess() ); - - // Commit all added files for the webapp. - CheckInScmResult checkInScmResult = scmProvider.checkIn( getScmRepository(), - new ScmFileSet( getWorkingDirectory() ), null, - "Added webapp" ); - assertTrue( "Check if result was successful, output: " + checkInScmResult.getCommandOutput(), checkInScmResult - .isSuccess() ); - } - - /** - * Create a Tag to test against. - * - * @throws ScmException - * @throws Exception - */ - private void tagWebAppInSVNRepo() - throws ScmException, Exception - { - ScmProvider scmProvider = getScmManager().getProviderByRepository( getScmRepository() ); - File sourcesToTag = new File( getWorkingDirectory(), "trunk" ); - TagScmResult tagScmResult = scmProvider.tag( getScmRepository(), new ScmFileSet( sourcesToTag ), - TAG_VERSION_1_0_0 ); - - assertTrue( tagScmResult.isSuccess() ); - } - -} \ No newline at end of file diff --git a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/test/java/org/codehaus/plexus/xsiter/deployer/DeployerTest.java b/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/test/java/org/codehaus/plexus/xsiter/deployer/DeployerTest.java deleted file mode 100644 index 3f143066a..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-deployer-component/src/test/java/org/codehaus/plexus/xsiter/deployer/DeployerTest.java +++ /dev/null @@ -1,268 +0,0 @@ -package org.codehaus.plexus.xsiter.deployer; - -import java.io.File; -import java.io.IOException; -import java.util.List; -import java.util.Properties; - -import org.apache.maven.project.MavenProject; -import org.codehaus.plexus.util.FileUtils; -import org.codehaus.plexus.xsiter.deployer.model.DeployableProject; -import org.codehaus.plexus.xsiter.deployer.model.DeploymentWorkspace; - -/** - * Tests for the {@link Deployer}. - * - * @author Rahul Thakur - * @version $Id$ - */ -public class DeployerTest - extends AbstractDeployerTest -{ - - /** - * Workspace/Deployable Project label. - */ - private static final String PROJECT_LABEL_SAMPLE_WEB = "sample-web"; - - /** - * SCM repository URL. - */ - private static final String SCM_SAMPLE_WEB = "scm:svn:file:///" + getBasedir().replace( '\\', '/' ) - + "/target/scm-test/repository/trunk"; - - public void testLookup() - throws Exception - { - Deployer component = (Deployer) lookup( Deployer.ROLE ); - assertNotNull( component ); - } - - public void testAddProject() - throws Exception - { - - FileUtils.forceDelete( new File( "target/deployments", PROJECT_LABEL_SAMPLE_WEB ) ); - Deployer component = (Deployer) lookup( Deployer.ROLE ); - DeployableProject project = new DeployableProject(); - project.setLabel( PROJECT_LABEL_SAMPLE_WEB ); - project.setScmURL( SCM_SAMPLE_WEB ); - component.addProject( project ); - - DefaultDeployer mgr = (DefaultDeployer) component; - DeploymentWorkspace workspace = mgr.getDeploymentWorkspace( project ); - assertNotNull( workspace ); - - String deployerWorkingDir = mgr.getWorkingDirectory(); - assertTrue( FileUtils.fileExists( deployerWorkingDir ) ); - - // verify the workspace structure was created as we expected - File projectDir = new File( workspace.getRootDirectory() ); - assertTrue( projectDir.exists() ); - assertTrue( new File( projectDir, workspace.getWebappDirectory() ).exists() ); - assertTrue( new File( projectDir, workspace.getTempDirectory() ).exists() ); - assertTrue( new File( projectDir, workspace.getWebserverDirectory() ).exists() ); - assertTrue( new File( projectDir, workspace.getWorkingDirectory() ).exists() ); - assertTrue( new File( projectDir, workspace.getWebappDirectory() ).exists() ); - } - - public void testRemoveProject() - throws Exception - { - DeployableProject project = new DeployableProject(); - project.setLabel( PROJECT_LABEL_SAMPLE_WEB ); - project.setScmURL( SCM_SAMPLE_WEB ); - Deployer component = (Deployer) lookup( Deployer.ROLE ); - component.removeProject( project ); - project.setLabel( "non-existent-component" ); - project.setScmURL( SCM_SAMPLE_WEB ); - component.removeProject( project ); - } - - public void testCheckoutProjectWithoutTag() - throws Exception - { - DeployableProject project = new DeployableProject(); - project.setLabel( PROJECT_LABEL_SAMPLE_WEB ); - project.setScmURL( SCM_SAMPLE_WEB ); - project.setScmUsername( "" ); - project.setScmPassword( "" ); - project.setScmTag( null ); - - checkoutProject( project ); - } - - public void testCheckoutProjectWithTag() - throws Exception - { - DeployableProject project = new DeployableProject(); - project.setLabel( PROJECT_LABEL_SAMPLE_WEB ); - project.setScmURL( SCM_SAMPLE_WEB ); - project.setScmUsername( "" ); - project.setScmPassword( "" ); - project.setScmTag( TAG_VERSION_1_0_0 ); - - checkoutProject( project ); - } - - /** - * Tests if a {@link MavenProject} instance can be obtained for a checked - * out project. - */ - public void testGetMavenProjectForCheckedoutProject() - throws Exception - { - Deployer component = (Deployer) lookup( Deployer.ROLE ); - DefaultDeployer mgr = (DefaultDeployer) component; - DeployableProject project = new DeployableProject(); - project.setLabel( PROJECT_LABEL_SAMPLE_WEB ); - project.setScmURL( SCM_SAMPLE_WEB ); - project.setScmUsername( "" ); - project.setScmPassword( "" ); - project.setScmTag( TAG_VERSION_1_0_0 ); - - MavenProject mavenProject = mgr.getMavenProjectForCheckedoutProject( project ); - assertNotNull( mavenProject ); - Properties props = mavenProject.getProperties(); - assertEquals( 2, props.size() ); - } - - /** - * Tests the Virtual Host set up for a checked out project constructing and - * then using the Virtual Host config from the Project's pom.xml - * - * @throws Exception - */ - public void testAddVirtualHostForCheckedoutproject() - throws Exception - { - Deployer component = (Deployer) lookup( Deployer.ROLE ); - DeployableProject project = new DeployableProject(); - project.setLabel( PROJECT_LABEL_SAMPLE_WEB ); - project.setScmURL( SCM_SAMPLE_WEB ); - project.setScmUsername( "" ); - project.setScmPassword( "" ); - project.setScmTag( TAG_VERSION_1_0_0 ); - - component.addVirtualHost( project ); - } - - /** - * Helper for checking out a {@link DeployableProject}. - * - * @param project - * @throws Exception - * @throws IOException - */ - private void checkoutProject( DeployableProject project ) - throws Exception, IOException - { - Deployer component = (Deployer) lookup( Deployer.ROLE ); - DefaultDeployer mgr = (DefaultDeployer) component; - String deployerWorkingDir = mgr.getWorkingDirectory(); - //start clean - FileUtils.forceDelete( deployerWorkingDir ); - - component.checkoutProject( project ); - assertTrue( FileUtils.fileExists( deployerWorkingDir ) ); - DeploymentWorkspace workspace = mgr.getDeploymentWorkspace( project ); - assertNotNull( workspace ); - - // verify the workspace structure was created as we expected - File projectDir = new File( workspace.getRootDirectory() ); - assertTrue( projectDir.exists() ); - - File workingDir = new File( projectDir, workspace.getWorkingDirectory() ); - assertTrue( workingDir.exists() ); - - File checkoutDir = new File( workingDir, ( null == project.getScmTag() ? "HEAD" : project.getScmTag() ) ); - assertTrue( checkoutDir.exists() ); - } - - /** - * Tests if the Deployer Component can delegate build goals to the checked - * out project. - * - * @throws Exception - */ - public void testBuildProject() - throws Exception - { - Deployer component = (Deployer) lookup( Deployer.ROLE ); - DeployableProject project = new DeployableProject(); - project.setLabel( PROJECT_LABEL_SAMPLE_WEB ); - project.setScmURL( SCM_SAMPLE_WEB ); - project.setScmUsername( "" ); - project.setScmPassword( "" ); - project.setScmTag( null ); - - component.buildProject( project, "clean" ); - } - - /** - * Tests the case of a non-existent project to build - * - * @throws Exception - */ - public void testBuildNonExistentProject() - throws Exception - { - Deployer component = (Deployer) lookup( Deployer.ROLE ); - DefaultDeployer mgr = (DefaultDeployer) component; - DeployableProject project = new DeployableProject(); - project.setLabel( "ghost-vhost-component" ); - project.setScmURL( SCM_SAMPLE_WEB + "/ghost-module" ); - project.setScmUsername( "" ); - project.setScmPassword( "" ); - - try - { - component.buildProject( project, "clean compile" ); - fail( "Expected Exception" ); - } - catch ( Exception e ) - { - // expected! - } - finally - { - // cleanup - FileUtils.deleteDirectory( new File( mgr.getWorkingDirectory(), project.getLabel() ) ); - } - } - - /** - * Tests a deployment to an application server. - * - * @throws Exception - */ - public void testDeployProject() - throws Exception - { - boolean bSkipped = true; - if ( bSkipped ) - { - System.out.println( "Deployment test skipped! This will else result lot of Tomcat instances to start up" ); - return; - } - Deployer component = (Deployer) lookup( Deployer.ROLE ); - DeployableProject project = new DeployableProject(); - project.setLabel( PROJECT_LABEL_SAMPLE_WEB ); - project.setScmURL( SCM_SAMPLE_WEB ); - project.setScmUsername( "" ); - project.setScmPassword( "" ); - project.setScmTag( null ); - - // should deploy successfully - component.deployProject( project ); - } - - public void testGetAllDeploymentWorkspaces() - throws Exception - { - Deployer component = (Deployer) lookup( Deployer.ROLE ); - DefaultDeployer mgr = (DefaultDeployer) component; - List workspaces = mgr.getAllDeploymentWorkspaces(); - assertEquals( 1, workspaces.size() ); - } -} diff --git a/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/LICENSE.txt b/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/LICENSE.txt deleted file mode 100644 index cea0bde10..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/LICENSE.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2006 Rahul Thakur - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/pom.xml b/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/pom.xml deleted file mode 100644 index dfcae198a..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/pom.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - 4.0.0 - - org.codehaus.plexus.xsiter - xsiter-parent - 1-SNAPSHOT - - org.codehaus.plexus.xsiter - xsiter-vhost-component - 1.0.0-SNAPSHOT - XSiter :: Virtual Host Component - - - - mail - -

rahul.thakur.xdev@gmail.com
- - - - - - - org.codehaus.plexus - plexus-container-default - 1.0-alpha-9 - - - plexus - plexus-utils - - - - - junit - junit - 3.8.1 - test - - - org.codehaus.plexus - plexus-velocity - 1.1.2 - - - org.codehaus.plexus - plexus-utils - 1.2 - - - - - - org.codehaus.plexus - plexus-maven-plugin - - true - - - - - descriptor - - - - - - - - 2.0.4 - 1.0-beta-3 - - diff --git a/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/src/conf/vhosts.vm b/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/src/conf/vhosts.vm deleted file mode 100644 index 0bef580ed..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/src/conf/vhosts.vm +++ /dev/null @@ -1,7 +0,0 @@ - - ServerName $vhostName - ErrorLog $vhostLogDirectory/apache_error.log - CustomLog $vhostLogDirectory/apache_access.log combined - ProxyPass / $vhostConnectorProtocol://localhost:$vhostConnectorPort/ - ProxyPassReverse / $vhostConnectorProtocol://localhost:$vhostConnectorPort/ - diff --git a/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/src/main/java/org/codehaus/plexus/xsiter/vhost/DefaultApacheVirtualHostManager.java b/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/src/main/java/org/codehaus/plexus/xsiter/vhost/DefaultApacheVirtualHostManager.java deleted file mode 100644 index 56a336368..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/src/main/java/org/codehaus/plexus/xsiter/vhost/DefaultApacheVirtualHostManager.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * - */ -package org.codehaus.plexus.xsiter.vhost; - -import java.io.File; -import java.io.FileWriter; -import java.io.Reader; -import java.io.StringWriter; -import java.util.ArrayList; -import java.util.List; - -import org.apache.velocity.Template; -import org.apache.velocity.VelocityContext; -import org.apache.velocity.app.Velocity; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.util.FileUtils; -import org.codehaus.plexus.util.xml.Xpp3Dom; -import org.codehaus.plexus.util.xml.Xpp3DomBuilder; - -/** - * @author Rahul Thakur - * @version $Id$ - * @plexus.component role-hint="default" - */ -public class DefaultApacheVirtualHostManager - extends AbstractLogEnabled - implements VirtualHostManager -{ - - /** - * @see org.codehaus.plexus.xsiter.vhost.VirtualHostManager#addVirtualHost(org.codehaus.plexus.xsiter.vhost.VirtualHostConfiguration, - * boolean) - */ - public void addVirtualHost( VirtualHostConfiguration config, boolean preserveExisting ) - throws Exception - { - Velocity.setProperty( Velocity.RUNTIME_LOG_LOGSYSTEM, this ); - try - { - Velocity.init(); - } - catch ( Exception e1 ) - { - if ( getLogger().isErrorEnabled() ) - getLogger().error( "Error initializing Velocity engine." ); - throw new Exception( "Error initializing Velocity engine." ); - } - - String vhostIP = config.getVhostIP(); - String vhostName = config.getVhostName(); - String vhostLogDirectory = config.getVhostLogDirectory(); - String vhostConnectorProtocol = config.getVhostConnectorProtocol(); - String vhostConnectorPort = config.getVhostConnectorPort(); - - VelocityContext context = new VelocityContext(); - // setup the Properties in Velocity Context. - context.put( PROP_VHOST_IP, vhostIP ); - context.put( PROP_VHOST_NAME, vhostName ); - context.put( PROP_VHOST_LOG_DIRECTORY, vhostLogDirectory ); - context.put( PROP_VHOST_CONNECTOR_PROTOCOL, vhostConnectorProtocol ); - context.put( PROP_VHOST_CONNECTOR_PORT, vhostConnectorPort ); - - // merge and write the output - Template template = null; - - template = Velocity.getTemplate( config.getVhostTemplate() ); - StringWriter sw = new StringWriter(); - String vhostDirectory = config.getVhostDirectory(); - // check if the vhost directory exists - if ( !new File( vhostDirectory ).exists() ) - { - getLogger().info( "Creating new vhost directory '" + vhostDirectory + "';" ); - FileUtils.mkdir( vhostDirectory ); - } - - FileWriter fw = new FileWriter( new File( vhostDirectory, "vhosts.conf" ), preserveExisting ); - // All went well if we are here. - if ( getLogger().isDebugEnabled() ) - { - getLogger().debug( PROP_VHOST_IP + " : " + vhostIP ); - getLogger().debug( PROP_VHOST_NAME + " : " + vhostName ); - getLogger().debug( PROP_VHOST_LOG_DIRECTORY + " : " + vhostDirectory ); - getLogger().debug( PROP_VHOST_CONNECTOR_PROTOCOL + " : " + vhostConnectorProtocol ); - getLogger().debug( PROP_VHOST_CONNECTOR_PORT + " : " + vhostConnectorPort ); - } - - template.merge( context, sw ); - - StringBuffer sb = new StringBuffer(); - sb.append( "# Virtual Host :: " + vhostName + "\n" ); - sb.append( sw.getBuffer() ); - sb.append( "\n" ); - if ( getLogger().isInfoEnabled() ) - getLogger().info( sb.toString() ); - - // write out to the file - fw.write( sb.toString() ); - fw.close(); - sw.close(); - // create the vhost log directory if it does not exist - if ( !new File( vhostLogDirectory ).exists() ) - { - if ( getLogger().isInfoEnabled() ) - getLogger().info( "Creating new vhost log directory '" + vhostLogDirectory + "'" ); - FileUtils.mkdir( vhostLogDirectory ); - } - - } - - /** - * @see org.codehaus.plexus.xsiter.vhost.VirtualHostManager#removeVirtualHost(java.lang.String) - */ - public void removeVirtualHost( String vhost ) - throws Exception - { - // TODO Auto-generated method stub - throw new UnsupportedOperationException( "Not yet implemented" ); - } - - /** - * @see org.codehaus.plexus.xsiter.vhost.VirtualHostManager#loadVirtualHostConfigurations(java.io.Reader) - */ - public List loadVirtualHostConfigurations( Reader reader ) - throws Exception - { - Xpp3Dom xmlConfig = Xpp3DomBuilder.build( reader ); - Xpp3Dom[] children = xmlConfig.getChildren( "vhost" ); - List list = new ArrayList(); - for ( int i = 0; i < children.length; i++ ) - { - Xpp3Dom vhostXml = children[i]; - - // verify all required properties exist - StringBuffer sb = new StringBuffer(); - if ( null == vhostXml.getChild( PROP_VHOST_ID ) ) - sb.append( "\nMissing Virtual Host configuration element: " + PROP_VHOST_ID ); - if ( null == vhostXml.getChild( PROP_VHOST_NAME ) ) - sb.append( "\nMissing Virtual Host configuration element: " + PROP_VHOST_NAME ); - if ( null == vhostXml.getChild( PROP_VHOST_CONNECTOR_PORT ) ) - sb.append( "\nMissing Virtual Host configuration element: " + PROP_VHOST_CONNECTOR_PORT ); - if ( null == vhostXml.getChild( PROP_VHOST_CONNECTOR_PROTOCOL ) ) - sb.append( "\nMissing Virtual Host configuration element: " + PROP_VHOST_CONNECTOR_PROTOCOL ); - if ( null == vhostXml.getChild( PROP_VHOST_DIRECTORY ) ) - sb.append( "\nMissing Virtual Host configuration element: " + PROP_VHOST_DIRECTORY ); - if ( null == vhostXml.getChild( PROP_VHOST_LOG_DIRECTORY ) ) - sb.append( "\nMissing Virtual Host configuration element: " + PROP_VHOST_LOG_DIRECTORY ); - if ( null == vhostXml.getChild( PROP_VHOST_IP ) ) - sb.append( "\nMissing Virtual Host configuration element: " + PROP_VHOST_IP ); - if ( null == vhostXml.getChild( PROP_VHOST_TEMPLATE ) ) - sb.append( "\nMissing Virtual Host configuration element: " + PROP_VHOST_TEMPLATE ); - - if ( sb.length() > 0 ) - throw new Exception( sb.toString() ); - - VirtualHostConfiguration config = new VirtualHostConfiguration(); - config.setId( vhostXml.getChild( PROP_VHOST_ID ).getValue() ); - config.setVhostName( vhostXml.getChild( PROP_VHOST_NAME ).getValue() ); - config.setVhostConnectorPort( vhostXml.getChild( PROP_VHOST_CONNECTOR_PORT ).getValue() ); - config.setVhostConnectorProtocol( vhostXml.getChild( PROP_VHOST_CONNECTOR_PROTOCOL ).getValue() ); - config.setVhostDirectory( vhostXml.getChild( PROP_VHOST_DIRECTORY ).getValue() ); - config.setVhostLogDirectory( vhostXml.getChild( PROP_VHOST_LOG_DIRECTORY ).getValue() ); - config.setVhostIP( vhostXml.getChild( PROP_VHOST_IP ).getValue() ); - config.setVhostTemplate( vhostXml.getChild( PROP_VHOST_TEMPLATE ).getValue() ); - - list.add( config ); - } - - return list; - } - -} diff --git a/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/src/main/java/org/codehaus/plexus/xsiter/vhost/VirtualHostConfiguration.java b/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/src/main/java/org/codehaus/plexus/xsiter/vhost/VirtualHostConfiguration.java deleted file mode 100644 index cd2841152..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/src/main/java/org/codehaus/plexus/xsiter/vhost/VirtualHostConfiguration.java +++ /dev/null @@ -1,208 +0,0 @@ -/** - * - */ -package org.codehaus.plexus.xsiter.vhost; - -/** - * Configuration POJO that wraps up the parameters required to create a Virtual - * Host. - * - * @author Rahul Thakur - * @dated: 14/09/2006, 12:12:00 PM - */ -public class VirtualHostConfiguration -{ - - /** - * Identifier for this {@link VirtualHostConfiguration} instance. - */ - private String id; - - /** - * Path the velocity template to use for Apache Virtual Host Config - * generation. - * - * @parameter - * @required - */ - private String vhostTemplate; - - /** - * Path where the resulting vhost configuration will be output. - * - * @parameter alias="vhostDir" default-value="deploy/apache/" - * @required - */ - private String vhostDirectory; - - /** - * IP to user for setting up IP based vhosts. - * - * @parameter default-value="127.0.0.1" - * @required - */ - private String vhostIP; - - /** - * Name for the virtual host. - * - * @parameter default-name="${artifactId}" - * @required - */ - private String vhostName; - - /** - * Location to the base directory where virtual host logs are generated. - * - * @parameter default-value="${basedir}/deploy/apache/logs" - * @required - */ - private String vhostLogDirectory; - - /** - * Protocol to be used by the Apache-[appserver] connector. - *

- * Defaults to Tomcat AJP Connector. - * - * @parameter default-value="ajp" - * @required - */ - private String vhostConnectorProtocol; - - /** - * Port number to used by Apache to talk to an Appserver's connector. - * - * @parameter - * @required - */ - private String vhostConnectorPort; - - /** - * @return the id - */ - public String getId() - { - return id; - } - - /** - * @param id the id to set - */ - public void setId( String id ) - { - this.id = id; - } - - /** - * @return the vhostConnectorPort - */ - public String getVhostConnectorPort() - { - return vhostConnectorPort; - } - - /** - * @param vhostConnectorPort the vhostConnectorPort to set - */ - public void setVhostConnectorPort( String vhostConnectorPort ) - { - this.vhostConnectorPort = vhostConnectorPort; - } - - /** - * @return the vhostConnectorProtocol - */ - public String getVhostConnectorProtocol() - { - return vhostConnectorProtocol; - } - - /** - * @param vhostConnectorProtocol the vhostConnectorProtocol to set - */ - public void setVhostConnectorProtocol( String vhostConnectorProtocol ) - { - this.vhostConnectorProtocol = vhostConnectorProtocol; - } - - /** - * @return the vhostDirectory - */ - public String getVhostDirectory() - { - return vhostDirectory; - } - - /** - * @param vhostDirectory the vhostDirectory to set - */ - public void setVhostDirectory( String vhostDirectory ) - { - this.vhostDirectory = vhostDirectory; - } - - /** - * @return the vhostIP - */ - public String getVhostIP() - { - return vhostIP; - } - - /** - * @param vhostIP the vhostIP to set - */ - public void setVhostIP( String vhostIP ) - { - this.vhostIP = vhostIP; - } - - /** - * @return the vhostLogDirectory - */ - public String getVhostLogDirectory() - { - return vhostLogDirectory; - } - - /** - * @param vhostLogDirectory the vhostLogDirectory to set - */ - public void setVhostLogDirectory( String vhostLogDirectory ) - { - this.vhostLogDirectory = vhostLogDirectory; - } - - /** - * @return the vhostName - */ - public String getVhostName() - { - return vhostName; - } - - /** - * @param vhostName the vhostName to set - */ - public void setVhostName( String vhostName ) - { - this.vhostName = vhostName; - } - - /** - * @return the vhostTemplate - */ - public String getVhostTemplate() - { - return vhostTemplate; - } - - /** - * @param vhostTemplate the vhostTemplate to set - */ - public void setVhostTemplate( String vhostTemplate ) - { - this.vhostTemplate = vhostTemplate; - } - -} diff --git a/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/src/main/java/org/codehaus/plexus/xsiter/vhost/VirtualHostManager.java b/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/src/main/java/org/codehaus/plexus/xsiter/vhost/VirtualHostManager.java deleted file mode 100644 index 21ec2754e..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/src/main/java/org/codehaus/plexus/xsiter/vhost/VirtualHostManager.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * - */ -package org.codehaus.plexus.xsiter.vhost; - -import java.io.Reader; -import java.util.List; - -/** - * @author Rahul Thakur - * @dated: 14/09/2006, 12:08:05 PM - */ -public interface VirtualHostManager -{ - - public String ROLE = VirtualHostManager.class.getName(); - - /** - * Name of the property element in th pom.xml that holds the Virtual Hosts - * configuration as XML. - */ - public static final String ELT_POM_VHOSTS_CONFIG = "vhosts.configuration"; - - /** - * Identifier for the configuration in case of multiple Virtual - * Configuration elements. - */ - public static final String PROP_VHOST_ID = "id"; - - /** - * Constant for Virtual Host Directory. - */ - public static final String PROP_VHOST_DIRECTORY = "vhostDirectory"; - - /** - * Constant for Virtual Host Connector Port property name. - */ - public static final String PROP_VHOST_CONNECTOR_PORT = "vhostConnectorPort"; - - /** - * Constant for Virtual Host Connector protocol property name. - */ - public static final String PROP_VHOST_CONNECTOR_PROTOCOL = "vhostConnectorProtocol"; - - /** - * Constant for Virtual Host Log Directory property name. - */ - public static final String PROP_VHOST_LOG_DIRECTORY = "vhostLogDirectory"; - - /** - * Constant for Virtual Host Name property name. - */ - public static final String PROP_VHOST_NAME = "vhostName"; - - /** - * Constant for Virtual Host IP property name. - */ - public static final String PROP_VHOST_IP = "vhostIP"; - - /** - * Constant for the Virutal Host Velocity Template name and location. - */ - public static final String PROP_VHOST_TEMPLATE = "vhostTemplate"; - - /** - * Creates a VirtualHost using the passed in - * {@link VirtualHostConfiguration}. - * - * @param config configuration that specifies the parameters for creation of - * a virtual host. - * @param preserveExisting true if existing Vhosts.conf - * contents are to be preserved. - * @throws Exception - */ - public void addVirtualHost( VirtualHostConfiguration config, boolean preserveExisting ) - throws Exception; - - /** - * Removes a Virtual Host given its name - * - * @param vhost name of the vhost to remove - * @throws Exception - */ - public void removeVirtualHost( String vhost ) - throws Exception; - - /** - * Creates a {@link VirtualHostConfiguration} instance from the reader. - * - * @param reader - * @return - * @throws Exception - */ - public List loadVirtualHostConfigurations( Reader reader ) - throws Exception; - -} diff --git a/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/src/main/resources/META-INF/plexus/components.xml b/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index 215910300..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - org.codehaus.plexus.xsiter.vhost.VirtualHostManager - - org.codehaus.plexus.xsiter.vhost.DefaultApacheVirtualHostManager - - default - - - diff --git a/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/src/test/java/org/codehaus/plexus/xsiter/vhost/ApacheVirtualHostManagerTest.java b/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/src/test/java/org/codehaus/plexus/xsiter/vhost/ApacheVirtualHostManagerTest.java deleted file mode 100644 index bbff885a7..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/src/test/java/org/codehaus/plexus/xsiter/vhost/ApacheVirtualHostManagerTest.java +++ /dev/null @@ -1,189 +0,0 @@ -/** - * - */ -package org.codehaus.plexus.xsiter.vhost; - -import java.io.File; -import java.io.StringReader; -import java.io.StringWriter; -import java.util.Iterator; -import java.util.List; - -import org.apache.velocity.Template; -import org.apache.velocity.VelocityContext; -import org.apache.velocity.app.Velocity; -import org.codehaus.plexus.PlexusTestCase; - -/** - * @author Rahul Thakur - * @version $Id$ - */ -public class ApacheVirtualHostManagerTest - extends PlexusTestCase -{ - - /** - * Tests of the component can be looked up properly. - * - * @throws Exception - */ - public void testLookup() - throws Exception - { - VirtualHostManager component = (VirtualHostManager) lookup( VirtualHostManager.ROLE ); - assertNotNull( component ); - } - - /** - * Tests if the vhost.vm template is being interpolated properly. - */ - public void testRawVelocityInterpolation() - { - try - { - Velocity.setProperty( Velocity.RUNTIME_LOG_LOGSYSTEM, this ); - Velocity.init(); - - VelocityContext context = new VelocityContext(); - // setup the Properties in Velocity Context. - context.put( "vhostIP", "127.0.0.1" ); - context.put( "vhostName", "xsiter.localhost.com" ); - context.put( "vhostLogDirectory", "test" ); - context.put( "vhostConnectorProtocol", "ajp" ); - context.put( "vhostConnectorPort", "9190" ); - - // Temlate location - String tpl = "src/test/resources/vhosts.vm"; - - Template t = Velocity.getTemplate( tpl ); - StringWriter sw = new StringWriter(); - t.merge( context, sw ); - StringBuffer sb = sw.getBuffer(); - // System.out.println (sb.toString ()); - sw.close(); - String lineSeparator = System.getProperty( "line.separator" ); - String expected = "" + lineSeparator + " ServerName xsiter.localhost.com" - + lineSeparator + " ErrorLog test/apache_error.log" + lineSeparator - + " CustomLog test/apache_access.log combined" + lineSeparator - + " ProxyPass / ajp://localhost:9190/" + lineSeparator - + " ProxyPassReverse / ajp://localhost:9190/" + lineSeparator + "" + lineSeparator; - System.out.println( sb.toString() ); - assertEquals( expected.length(), sb.toString().length() ); - assertEquals( expected, sb.toString() ); - } - catch ( Exception e ) - { - fail( e.getMessage() ); - } - } - - /** - * Tests if a Virtual host could be added as expected. - */ - public void testAddVritualHost() - throws Exception - { - VirtualHostConfiguration config = new VirtualHostConfiguration(); - config.setVhostIP( "127.0.0.1" ); - config.setVhostName( "xsiter.localhost.com" ); - config.setVhostLogDirectory( "apache/logs" ); - config.setVhostConnectorProtocol( "ajp" ); - config.setVhostConnectorPort( "9190" ); - config.setVhostTemplate( "src/test/resources/vhosts.vm" ); - config.setVhostDirectory( "target" ); - - VirtualHostManager mgr = (VirtualHostManager) lookup( VirtualHostManager.ROLE ); - assertNotNull( mgr ); - - mgr.addVirtualHost( config, false ); - File f = new File( "target", "vhosts.conf" ); - assertTrue( f.exists() ); - assertTrue( f.length() > 0 ); - } - - /** - * Tests if a Virtual host could be removed as expected. - */ - public void testRemoveVirtualHost() - { - // TODO: Not implemented yet - } - - /** - * @throws Exception - */ - public void testLoadVirtualHostConfigurations() - throws Exception - { - StringReader sr = new StringReader( "\r\n" + " \r\n" - + " integration\r\n" + " vhosts.vm\r\n" - + " deploy/apache\r\n" - + " 127.0.0.1\r\n" - + " mock.vhost.localhost\r\n" - + " deploy/apache/logs\r\n" - + " ajp\r\n" - + " 9090 \r\n" + " \r\n" - + " \r\n" + " development\r\n" - + " vhosts.vm\r\n" - + " deploy/apache\r\n" - + " 127.0.0.1\r\n" - + " mock.vhost.localhost\r\n" - + " dev.vhost.localhost\r\n" - + " ajp\r\n" - + " 9080 \r\n" + " \r\n" - + " " ); - VirtualHostManager component = (VirtualHostManager) lookup( VirtualHostManager.ROLE ); - assertNotNull( component ); - - List list = component.loadVirtualHostConfigurations( sr ); - assertNotNull( list ); - assertEquals( 2, list.size() ); - Iterator it = list.iterator(); - VirtualHostConfiguration cfg = (VirtualHostConfiguration) it.next(); - assertEquals( "9090", cfg.getVhostConnectorPort() ); - assertEquals( "ajp", cfg.getVhostConnectorProtocol() ); - assertEquals( "mock.vhost.localhost", cfg.getVhostName() ); - assertEquals( "deploy/apache/logs", cfg.getVhostLogDirectory() ); - assertEquals( "deploy/apache", cfg.getVhostDirectory() ); - assertEquals( "127.0.0.1", cfg.getVhostIP() ); - assertEquals( "vhosts.vm", cfg.getVhostTemplate() ); - - // test with invalid configuration - sr = new StringReader( "\r\n" + " \r\n" + " integration\r\n" - + " vhosts.vm\r\n" - + " deploy/apache\r\n" - + " 127.0.0.1\r\n" - + " mock.vhost.localhost\r\n" - + " deploy/apache/logs\r\n" - + " ajp\r\n" - + " 9090 \r\n" - + " \r\n" - + " \r\n" - + " development\r\n" - + " vhosts.vm\r\n" - + " deploy/apache\r\n" - + " 127.0.0.1\r\n" - // missing vhost name - // + " - // mock.vhost.localhost\r\n" - + " dev.vhost.localhost\r\n" - + " ajp\r\n" - // missing port - // + " - // 9080 - // \r\n" - + " \r\n" + " " ); - - try - { - component.loadVirtualHostConfigurations( sr ); - fail( "Expected Exception (for Missing Configuration elements)" ); - } - catch ( Exception e ) - { - // System.err.println (e.getMessage ()); - // do nothing expected - } - - } -} diff --git a/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/src/test/resources/vhosts.vm b/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/src/test/resources/vhosts.vm deleted file mode 100644 index 0bef580ed..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-vhost-component/src/test/resources/vhosts.vm +++ /dev/null @@ -1,7 +0,0 @@ - - ServerName $vhostName - ErrorLog $vhostLogDirectory/apache_error.log - CustomLog $vhostLogDirectory/apache_access.log combined - ProxyPass / $vhostConnectorProtocol://localhost:$vhostConnectorPort/ - ProxyPassReverse / $vhostConnectorProtocol://localhost:$vhostConnectorPort/ - diff --git a/plexus-sandbox/plexus-xsiter/xsiter-web/LICENSE.txt b/plexus-sandbox/plexus-xsiter/xsiter-web/LICENSE.txt deleted file mode 100644 index cea0bde10..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-web/LICENSE.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2006 Rahul Thakur - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/plexus-sandbox/plexus-xsiter/xsiter-web/docs/jetty_file_locked_error.txt b/plexus-sandbox/plexus-xsiter/xsiter-web/docs/jetty_file_locked_error.txt deleted file mode 100644 index 9dd9db323..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-web/docs/jetty_file_locked_error.txt +++ /dev/null @@ -1,46 +0,0 @@ - -Error Description: -If you get an error in Eclipse on Windows with following message -"The requested operation cannot be performed on a file with a user-mapped section open" - -then, read on .... - -Alternatively, see: http://docs.codehaus.org/display/JETTY/Files+locked+on+Windows - -=============================================================================== -Detailed Description - -Jetty buffers static content for webapps such as html files, css files, images etc and uses memory mapped files to do this if the NIO connectors are being used. The problem is that on Windows, memory mapping a file causes the file to be locked, so that the file cannot be updated or replaced. This means that effectively you have to stop Jetty in order to update a file. -Remedy - -Jetty provides a configuration switch in the webdefault.xml file for the DefaultServlet which enables or disables the use of memory mapped files. If you are running on Windows and are having file locking problems, you should set this switch to disable memory mapped file buffers. - -The default webdefault.xml file is found in the lib/jetty.jar at org/mortbay/jetty/webapp/webdefault.xml. Extract it to a convenient disk location and edit it to change useFileMappedBuffer to false: - - - useFileMappedBuffer - true - - -Then, ensure that your custom webdefault.xml file is applied to all of your webapps by editing all of your relevant jetty configuration files (eg etc/jetty.xml, etc/jetty-plus.xml and any custom files you may have) and indicating the location of the custom file: - - - - ./webapps - org/mortbay/jetty/webapp/webdefault.xml - True - False - - -Alternatively, if you have individually configured your webapps, you need to call the WebAppContext.setDefaultsDescriptor(String path) method: - - - / - ./webapps/fredapp - /home/fred/jetty/mywebdefaults.xml - . - . - . - - -=============================================================================== \ No newline at end of file diff --git a/plexus-sandbox/plexus-xsiter/xsiter-web/docs/notes.txt b/plexus-sandbox/plexus-xsiter/xsiter-web/docs/notes.txt deleted file mode 100644 index 07f51708e..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-web/docs/notes.txt +++ /dev/null @@ -1,62 +0,0 @@ - -[This document is in no way defintive. Will evolve as we go!] - -Webwork n00b notes -================== - -1) Setting up a Plexus WW webapp - - 1-1) see the following resources under - 'plexus-security-webapp-example' - - src/main/resources/webwork.properties - (TODO: expand on setting theme and devMode) - src/main/resources/xwork.xml - (TODO: expand on using the interceptors from pss module) - src/webapp/WEB-INF/web.xml - (This can be copied verbatim to get started) - - 1-2) Setup Sitemesh resources - - See following resources and corresponding sitemesh config under - 'plexus-security-webapp-example' - http://www.opensymphony.com/sitemesh/index.html - http://www.opensymphony.com/sitemesh/install.html - http://www.opensymphony.com/sitemesh/decorators.html - - - 1-3) Add following resources from the example app to your app - - src/main/webapp/css/main.css - (This is referenced in the sitemesh layout template) - src/main/webapp/WEB-INF/jsp/decorators/default.jsp - (This is the sitemesh layout template. We will modify this later to - suit our needs.) - -2) Setting up xwork.xml - - 2-1) Create a simple action under 'src/main/java'. - (See org.codehaus.plexus.security.example.web.action.MainAction under - example app. Note how 'role' and 'role-hint' in particular are setup - in javadoc annotations.) - - 2-2) Update and replace references to 'main' in your 'xwork.xml' with the - 'role-hint' value of your simple action created in (2-1). - - - -10) Running the webapp -====================== - - 10-1) To run your application - - 10-1-1) from command prompt change directory to the root of the web - application. - - 10-1-2) Run the following Maven goal. - > mvn clean war:inplace jetty:run - - NOTE: that this depends on the requisite Plugin configuration(s) to - be setup in your web application's pom.xml. (See pom.xml for the - 'plexus-security-webapp-example' webapp) - diff --git a/plexus-sandbox/plexus-xsiter/xsiter-web/pom.xml b/plexus-sandbox/plexus-xsiter/xsiter-web/pom.xml deleted file mode 100644 index 38b60c063..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-web/pom.xml +++ /dev/null @@ -1,319 +0,0 @@ - - 4.0.0 - org.codehaus.plexus.xsiter - xsiter-web - 1.0.0-SNAPSHOT - XSiter :: Web Application - war - - - javax.servlet - servlet-api - 2.4 - provided - - - opensymphony - sitemesh - 2.2.1 - - - taglibs - standard - 1.1.2 - - - javax.servlet - jstl - 1.1.2 - - - org.codehaus.plexus - plexus-xwork-integration - 1.0-alpha-2 - - - org.codehaus.plexus - plexus-log4j-logging - 1.1-alpha-2 - - - opensymphony - webwork - 2.2.4 - - - org.codehaus.plexus - plexus-container-default - 1.0-alpha-10 - - - org.apache.maven - maven-project - ${maven.version} - - - org.apache.maven.plugins - maven-project-info-reports-plugin - 2.1-SNAPSHOT - - - plexus - plexus-utils - - - - - - org.codehaus.plexus.security - plexus-security-system - ${plexus.security.version} - - - org.codehaus.plexus.security - plexus-security-ui-web - ${plexus.security.version} - war - - - org.codehaus.plexus.security - plexus-security-ui-web-integration - ${plexus.security.version} - - - org.codehaus.plexus.security - plexus-security-ui-web-taglib - ${plexus.security.version} - - - - org.codehaus.plexus.security - plexus-security-authentication-provider-user-manager - ${plexus.security.version} - - - org.codehaus.plexus.security - plexus-security-user-management-api - ${plexus.security.version} - - - org.codehaus.plexus.security - plexus-security-user-management-provider-jdo - ${plexus.security.version} - - - org.codehaus.plexus.security - plexus-security-authorization-rbac-store-jdo - ${plexus.security.version} - - - org.codehaus.plexus.security - plexus-security-authorization-api - ${plexus.security.version} - - - org.codehaus.plexus.security - plexus-security-authorization-rbac-authorizer - ${plexus.security.version} - - - org.codehaus.plexus - plexus-jdo2 - 1.0-alpha-7 - - - xerces - xercesImpl - - - xerces - xmlParserAPIs - - - - - org.codehaus.plexus.security - plexus-security-keys-jdo - ${plexus.security.version} - - - org.codehaus.plexus - plexus-utils - 1.2 - - - org.codehaus.plexus - plexus-mail-sender-javamail - 1.0-alpha-3 - - - org.apache.derby - derby - 10.1.3.1 - - - jpox - jpox - 1.1.1 - - - - javax.sql - jdbc-stdext - - - - - - org.codehaus.plexus.xsiter - xsiter-deployer-component - 1.0.0-SNAPSHOT - - - - - - maven-clean-plugin - 2.1 - - - - ${basedir}/ - - derby.log - - - - ${basedir}/src/main/webapp - - META-INF - WEB-INF/classes - WEB-INF/lib - WEB-INF/database - WEB-INF/logs - WEB-INF/temp - - - - - - - maven-war-plugin - 2.0.1 - - - compile - - inplace - - - - - false - WEB-INF/web.xml - - - - org.codehaus.plexus - plexus-maven-plugin - - - generate - - descriptor - - - - - - - com.opensymphony.xwork.Action - per-lookup - - - - - - org.mortbay.jetty - maven-jetty-plugin - 6.0.1 - - 10 - / - - - 9090 - 60000 - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - - - - tomcat5x - - http://mirrors.ccs.neu.edu/Apache/dist/tomcat/tomcat-5/v5.5.16/bin/apache-tomcat-5.5.16.zip - ${installDir} - - ${basedir}/target/tomcat5x.log - ${basedir}/target/cargo.log - - - ${basedir}/target/webapp/${artifactId}/tomcat5x/ - - - - 9191 - 9192 - - - - - xsiter - - - - - - - - - - - - codehaus.snapshots - http://snapshots.repository.codehaus.org - - - - - 2.0.4 - 1.0-alpha-6-SNAPSHOT - D:\cargo-installs - - - - staging - src/conf/vhosts.vm - deploy/apache - 127.0.0.1 - xsiter.localhost - deploy/apache/logs - http - 9192 - - ]]> - - - diff --git a/plexus-sandbox/plexus-xsiter/xsiter-web/src/conf/vhosts.vm b/plexus-sandbox/plexus-xsiter/xsiter-web/src/conf/vhosts.vm deleted file mode 100644 index 0bef580ed..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-web/src/conf/vhosts.vm +++ /dev/null @@ -1,7 +0,0 @@ - - ServerName $vhostName - ErrorLog $vhostLogDirectory/apache_error.log - CustomLog $vhostLogDirectory/apache_access.log combined - ProxyPass / $vhostConnectorProtocol://localhost:$vhostConnectorPort/ - ProxyPassReverse / $vhostConnectorProtocol://localhost:$vhostConnectorPort/ - diff --git a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/java/org/codehaus/plexus/xsiter/web/action/ListWorkspacesAction.java b/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/java/org/codehaus/plexus/xsiter/web/action/ListWorkspacesAction.java deleted file mode 100644 index a3d708d25..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/java/org/codehaus/plexus/xsiter/web/action/ListWorkspacesAction.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * - */ -package org.codehaus.plexus.xsiter.web.action; - -import org.codehaus.plexus.xsiter.deployer.Deployer; -import org.codehaus.plexus.xwork.action.PlexusActionSupport; - -/** - * @author Rahul Thakur - * @plexus.component role="com.opensymphony.xwork.Action" role-hint="listWorkspaces" - */ -public class ListWorkspacesAction - extends PlexusActionSupport -{ - - /** - * Deployer that manages deployment workspaces and deployments of - * projects/artifacts. - * @plexus.requirement - */ - private Deployer deployer; - - public String listWorkspaces() - { - getLogger().debug( "Obtaining list of workspaces..." ); - // TODO: Obtain workspaces - return SUCCESS; - } -} diff --git a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/resources/META-INF/plexus/application.xml b/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/resources/META-INF/plexus/application.xml deleted file mode 100644 index 05345b80f..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/resources/META-INF/plexus/application.xml +++ /dev/null @@ -1,373 +0,0 @@ - - - - - org.codehaus.plexus.security.system.ApplicationDetails - org.codehaus.plexus.security.system.DefaultApplicationDetails - DefaultApplicationDetails - - Unconfigured Application Name - - http://localhost:9090 - EEE, d MMM yyyy HH:mm:ss Z - - - - - org.codehaus.plexus.security.system.EmailSettings - org.codehaus.plexus.security.system.DefaultEmailSettings - DefaultEmailSettings - - /feedback.action - security@unconfigured.com - Unconfigured Username - - - - - org.codehaus.plexus.security.system.SecuritySystem - org.codehaus.plexus.security.system.DefaultSecuritySystem - default - - - org.codehaus.plexus.security.authentication.AuthenticationManager - default - authnManager - - - org.codehaus.plexus.security.authorization.Authorizer - rbac - authorizer - - - org.codehaus.plexus.security.user.UserManager - jdo - userManager - - - org.codehaus.plexus.security.keys.KeyManager - jdo - keyManager - - - org.codehaus.plexus.security.policy.UserSecurityPolicy - default - policy - - - org.codehaus.plexus.security.system.ApplicationDetails - applicationDetails - - - org.codehaus.plexus.security.system.EmailSettings - emailSettings - - - - - - org.codehaus.plexus.security.authorization.Authorizer - rbac - org.codehaus.plexus.security.authorization.rbac.RbacAuthorizer - - - org.codehaus.plexus.security.rbac.RBACManager - jdo - - - org.codehaus.plexus.security.user.UserManager - jdo - userManager - - - org.codehaus.plexus.security.authorization.rbac.evaluator.PermissionEvaluator - default - - - - - - org.codehaus.plexus.security.policy.PasswordRule - character-length - org.codehaus.plexus.security.policy.rules.CharacterLengthPasswordRule - Basic Password Rule, Checks for non-empty passwords that have between {@link #setMinimumCharacters(int)} and {@link #setMaximumCharacters(int)} characters in length. - - true - 1 - 8 - - - - - org.codehaus.plexus.security.policy.PasswordRule - reuse - org.codehaus.plexus.security.policy.rules.ReusePasswordRule - Password Rule, Checks supplied password found at {@link User#getPassword()} against the {@link User#getPreviousEncodedPasswords()} to ensure that a password is not reused. - - true - - - - - org.codehaus.plexus.security.policy.PasswordRule - numerical-count - org.codehaus.plexus.security.policy.rules.NumericalPasswordRule - Basic Password Rule, Checks for non-empty passwords that have at least {@link #setMinimumCount(int)} of numerical characters contained within. - - true - 1 - - - - - org.codehaus.plexus.security.policy.PasswordRule - must-have - org.codehaus.plexus.security.policy.rules.MustHavePasswordRule - Basic Password Rule, Checks for non-empty Passwords in non guest users. - - true - - - - - org.codehaus.plexus.security.policy.PasswordRule - alpha-count - org.codehaus.plexus.security.policy.rules.AlphaPasswordRule - Basic Password Rule, Checks for non-empty passwords that have at least {@link #setMinimumCount(int)} of alpha characters contained within. - - true - 1 - - - - - org.codehaus.plexus.security.policy.UserSecurityPolicy - default - org.codehaus.plexus.security.policy.DefaultUserSecurityPolicy - User Security Policy. - - - org.codehaus.plexus.security.policy.PasswordEncoder - sha256 - passwordEncoder - - - org.codehaus.plexus.security.policy.UserValidationSettings - userValidationSettings - - - org.codehaus.plexus.security.policy.RememberMeSettings - rememberMeSettings - - - org.codehaus.plexus.security.policy.SingleSignOnSettings - singleSignOnSettings - - - org.codehaus.plexus.security.policy.PasswordRule - rules - - - - 6 - 3 - 90 - - - - - org.codehaus.plexus.security.policy.UserValidationSettings - org.codehaus.plexus.security.policy.DefaultUserValidationSettings - DefaultUserValidationSettings - - true - - 2880 - /security/login!login.action - Unconfigured Subject Line - - - - - org.codehaus.plexus.security.policy.RememberMeSettings - org.codehaus.plexus.security.policy.DefaultRememberMeSettings - DefaultRememberMeSettings - - true - 525600 - - - - - org.codehaus.plexus.security.policy.SingleSignOnSettings - org.codehaus.plexus.security.policy.DefaultSingleSignOnSettings - DefaultSingleSignOnSettings - - true - 30 - - - - - org.codehaus.plexus.mailsender.MailSender - org.codehaus.plexus.mailsender.javamail.JavamailMailSender - - localhost - 25 - com.sun.net.ssl.internal.ssl.Provider - - - - - - - org.codehaus.plexus.jdo.JdoFactory - users - org.codehaus.plexus.jdo.DefaultConfigurableJdoFactory - - - - - - - - org.apache.derby.jdbc.EmbeddedDriver - jdbc:derby:${plexus.home}/database;create=true - sa - - - - - - - org.jpox.PersistenceManagerFactoryImpl - - - org.jpox.autoCreateSchema - true - - - org.jpox.autoStartMechanism - SchemaTable - - - org.jpox.autoStartMechanismMode - Ignored - - - org.jpox.validateTables - false - - - org.jpox.validateConstraints - false - - - org.jpox.transactionIsolation - READ_UNCOMMITTED - - - org.jpox.poid.transactionIsolation - READ_UNCOMMITTED - - - org.jpox.rdbms.dateTimezone - JDK_DEFAULT_TIMEZONE - - - - - - - - - org.codehaus.plexus.logging.LoggerManager - org.codehaus.plexus.logging.log4j.Log4JLoggerManager - basic - - - DEBUG - console - - - console - INFO - org.apache.log4j.ConsoleAppender - %d [%t] %-5p %-30c{1} - %m%n - - - - - org.codehaus.plexus.security - DEBUG - - - org.codehaus.plexus.velocity - WARN - - - com.opensymphony.xwork - INFO - - - com.opensymphony.webwork - INFO - - - - - - - - - webapp - - - webapp - Web Application Component Lifecycle Handler - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/resources/webwork.properties b/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/resources/webwork.properties deleted file mode 100644 index d82af73c0..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/resources/webwork.properties +++ /dev/null @@ -1,17 +0,0 @@ -webwork.objectFactory = org.codehaus.plexus.xwork.PlexusObjectFactory -#webwork.tag.altSyntax = true - -# Theme -webwork.ui.theme = xhtml - -webwork.devMode = true - -# Locale -#webwork.locale=en_EN - -# Upload -webwork.multipart.parser = jakarta -# default saveDir is defined by javax.servlet.context.tempdir property -#webwork.multipart.saveDir = -# default max size is 2097152 (2MB) -#webwork.multipart.maxSize = diff --git a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/resources/xwork.xml b/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/resources/xwork.xml deleted file mode 100644 index 2606eeadc..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/resources/xwork.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - listWorkspaces - listWorkspaces - listWorkspaces - listWorkspaces - listWorkspaces - listWorkspaces - listWorkspaces - listWorkspaces - listWorkspaces - - - addadmin - /security - - - /WEB-INF/jsp/pss/generalError.jsp - /WEB-INF/jsp/requiresAuthentication.jsp - /WEB-INF/jsp/accessDenied.jsp - - - - listWorkspaces - - - - /WEB-INF/jsp/mainpage.jsp - - - diff --git a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/WEB-INF/decorators.xml b/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/WEB-INF/decorators.xml deleted file mode 100644 index 93e144659..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/WEB-INF/decorators.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - /* - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/WEB-INF/jsp/decorators/default.jsp b/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/WEB-INF/jsp/decorators/default.jsp deleted file mode 100644 index 35a4779a1..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/WEB-INF/jsp/decorators/default.jsp +++ /dev/null @@ -1,124 +0,0 @@ -<%-- - ~ Copyright 2005-2006 The Codehaus. - ~ - ~ Licensed under the Apache License, Version 2.0 (the "License"); - ~ you may not use this file except in compliance with the License. - ~ You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, software - ~ distributed under the License is distributed on an "AS IS" BASIS, - ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ~ See the License for the specific language governing permissions and - ~ limitations under the License. - --%> -<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %> -<%@ taglib uri="/webwork" prefix="ww" %> -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> -<%@ taglib prefix="pss" uri="/plexusSecuritySystem" %> - - - Plexus xSiter :: <decorator:title default="Management Console"/> - - - - -"> - -

- - -
- - -
-
-
- - -
- - session scope: -
    - -
  • - : - - - ( )
    -       -
    - - <null> - -
    -
  • -
    -
- - request scope: -
    - -
  • - : - - - ( )
    -       -
    - - <null> - -
    -
  • -
    -
- - page scope: -
    - -
  • - : - - - ( )
    -       -
    - - <null> - -
    -
  • -
    -
- -
- - -
-
- - - - diff --git a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/WEB-INF/jsp/includes/navigation.jsp b/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/WEB-INF/jsp/includes/navigation.jsp deleted file mode 100644 index f1cdf17aa..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/WEB-INF/jsp/includes/navigation.jsp +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/WEB-INF/jsp/mainpage.jsp b/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/WEB-INF/jsp/mainpage.jsp deleted file mode 100644 index 8b807e8e3..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/WEB-INF/jsp/mainpage.jsp +++ /dev/null @@ -1,49 +0,0 @@ -<%-- - ~ Copyright 2005-2006 The Apache Software Foundation. - ~ - ~ Licensed under the Apache License, Version 2.0 (the "License"); - ~ you may not use this file except in compliance with the License. - ~ You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, software - ~ distributed under the License is distributed on an "AS IS" BASIS, - ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ~ See the License for the specific language governing permissions and - ~ limitations under the License. - --%> - -<%@ taglib prefix="ww" uri="/webwork" %> -<%@ taglib prefix="pss" uri="/plexusSecuritySystem" %> - - -
- <%-- This is where the "Account Created Successfully" type message goes. --%> -
- -
- <%-- This is where errors from the action and other non-form field specific errors appear. --%> -
- -
-
- -
    -
  1. - - You are authorized to see this content! -

    - - -

      -
    • Go see the userlist.
    • -
    - -
    - - - Go Ahead Login. - -
  2. -
diff --git a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/WEB-INF/plexus.xml b/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/WEB-INF/plexus.xml deleted file mode 100644 index 339a976e3..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/WEB-INF/plexus.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/WEB-INF/web.xml b/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index a00bc935b..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - Plexus XSiter - - - webwork-cleanup - com.opensymphony.webwork.dispatcher.ActionContextCleanUp - - - - sitemesh - com.opensymphony.module.sitemesh.filter.PageFilter - - - - webwork - com.opensymphony.webwork.dispatcher.FilterDispatcher - - - - webwork-cleanup - /* - - - - sitemesh - /* - - - - webwork - /* - - - - org.codehaus.plexus.xwork.PlexusLifecycleListener - - diff --git a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/css/main.css b/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/css/main.css deleted file mode 100644 index 195ce4717..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/css/main.css +++ /dev/null @@ -1,103 +0,0 @@ -body { - /*background-color: #dddddd;*/ - color: #777777; -} - -.clear { - clear: both; -} - -#banner { - padding: 10px 5px 0px 5px; - margin: 0px; -} - -#banner h1 { - font-size: 1.5em; -} - -#banner a { - color: #888888; - text-decoration: none; -} -/* -#breadcrumbs { - background-color: #cccccc; - margin: 0px; - font-size: 0.9em; - padding: 5px; - border-bottom: 1px solid #aaaaaa; -} - -#breadcrumbs a { - color: #888888; -} - -#breadcrumbs .xright { - float:right; -} -*/ - -.securityLinks { - background-color: white; - border: 1px solid black; - padding: 2px; - color: black; -} - -.securityLinks a { - color: black !important; -} - -.securityLinks .admin { - background-color: #ffdddd; - color: red; -} - -.securityLinks .admin a { - color: red !important; -} - -#nestedContent { - margin: 0px 30px 30px 30px; - padding: 5px; - border: 1px solid black; - background-color: white; - color: black; -} - -#nestedContent .wwFormTable .errorMessage { - font-size: 0.8em; - font-weight: bold; -} - - -#xworkinfo { - font-size: 0.7em; -} - -#footer { - border-top: 1px solid #aaaaaa; - font-size: 0.9em; -} - -#footer .xright { - float: right; -} - -.note { - margin: 30px 0px 0px 30px; - padding-bottom: 0px; - font-size: 0.6em; - color: gray; - font-style: italic; -} - -.errorMessage, -.errorLabel { - color: red; -} - -.required { - color: red; -} diff --git a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/css/xsiter.css b/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/css/xsiter.css deleted file mode 100644 index e07bf74b6..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/css/xsiter.css +++ /dev/null @@ -1,163 +0,0 @@ -/* - ~ Copyright 2005-2006 Rahul Thakur. - ~ - ~ Licensed under the Apache License, Version 2.0 (the "License"); - ~ you may not use this file except in compliance with the License. - ~ You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, software - ~ distributed under the License is distributed on an "AS IS" BASIS, - ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ~ See the License for the specific language governing permissions and - ~ limitations under the License. -*/ /* -* ~ -* Styles for xSiter webapp. -* TODO: Remove main.css after we have moved over all CSS styles. -* ~ -*/ /* -* ~~~~~~~~~~~~~~~ -* HTML tag styles -* ~~~~~~~~~~~~~~~ -*/ -body { - -} - -p { - font-family: Arial, Helvetica, sans-serif; - font-size: 12px; - color: #000000; -} - -/* -* ~~~~~~~~~~~~~~~~~~~~~~~~~ -* Independent Style Classes -* ~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ -.errorLabel { - font-family: Arial, Helvetica, sans-serif; - color: red; -} - -.errorMessage { - font-family: Arial, Helvetica, sans-serif; - text-align: left; - color: red; -} - -.button { - background-color: rgb(169, 219, 12); - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-style: solid; - border-right-style: solid; - border-bottom-style: solid; - border-left-style: solid; - border-top-color: rgb(102, 102, 0); - border-right-color: rgb(102, 102, 0); - border-bottom-color: rgb(102, 102, 0); - border-left-color: rgb(102, 102, 0); -} - -/* -* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -* Style applied for specified elements -* based on their 'id' attribute -* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ -#banner { - font-family: Arial, Helvetica, sans-serif; - padding: 10px 5px 0px 5px; - margin: 0px; -} - -#breadcrumbs { - font-family: Arial, Helvetica, sans-serif; - font-size: 11px; - color: #425507; - padding-left: 5px; - padding-top: 15px; - padding-bottom: 15px; - border-bottom: 1px solid #aaaaaa; - color: #425507; -} - -#breadcrumbs .xright { - float: right; -} - -#breadcrumbs .xleft { - float: left; -} - -#content { - font-family: Arial, Helvetica, sans-serif; - font-size: 12px; - color: #000000; - padding-top: 5px; -} - -#content h2 { - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - font-weight: bold; - letter-spacing: 2px; - color: rgb(133, 133, 0); - margin-top: 5px; -} - -#navigation { - float: left; - padding-top: 20px; - padding-right: 10px; - padding-left: 5px; - padding-bottom: 10px; - /* - border-top: 1px dotted #aaaaaa; - border-right: 1px dotted #aaaaaa; - border-bottom: 1px dotted #aaaaaa; - border-left: 1px dotted #aaaaaa; - */ -} - -#navigation .menuItem { - font-family: Arial, Helvetica, sans-serif; - font-size: 12px; - color: #637F0E; - padding-top: 5px; -} - -#navigation .menuItem a:link { - color: rgb(66, 85, 7); -} - -#adminCreateForm input{ - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-style: solid; - border-right-style: solid; - border-bottom-style: solid; - border-left-style: solid; - border-top-color: rgb(102, 102, 0); - border-right-color: rgb(102, 102, 0); - border-bottom-color: rgb(102, 102, 0); - border-left-color: rgb(102, 102, 0); -} - -#adminCreateForm input[type="submit"]{ - background-color: rgb(189, 183, 107); -} - -/* -* WebWork dev.mode debug info formatting -*/ -.xworkinfo { - -} \ No newline at end of file diff --git a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/index.jsp b/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/index.jsp deleted file mode 100644 index 30eabe3a1..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/index.jsp +++ /dev/null @@ -1,17 +0,0 @@ -<%-- - ~ Copyright 2005-2006 The Apache Software Foundation. - ~ - ~ Licensed under the Apache License, Version 2.0 (the "License"); - ~ you may not use this file except in compliance with the License. - ~ You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, software - ~ distributed under the License is distributed on an "AS IS" BASIS, - ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ~ See the License for the specific language governing permissions and - ~ limitations under the License. - --%> - -<%response.sendRedirect( request.getContextPath() + "/listWorkspaces.action" );%> diff --git a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/success.jsp b/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/success.jsp deleted file mode 100644 index e54cbff24..000000000 --- a/plexus-sandbox/plexus-xsiter/xsiter-web/src/main/webapp/success.jsp +++ /dev/null @@ -1,4 +0,0 @@ -<%@ taglib uri="/webwork" prefix="ww" %> - -Hello -
diff --git a/plexus-sandbox/plexus-xwork-integration/pom.xml b/plexus-sandbox/plexus-xwork-integration/pom.xml deleted file mode 100644 index e03552c4d..000000000 --- a/plexus-sandbox/plexus-xwork-integration/pom.xml +++ /dev/null @@ -1,66 +0,0 @@ - - 4.0.0 - - plexus-components - org.codehaus.plexus - 1.1.6 - ../../plexus-components/pom.xml - - org.codehaus.plexus - plexus-xwork-integration - 1.0-alpha-3-SNAPSHOT - Plexus XWork Integration - - - org.easymock - easymock - 2.2 - test - - - org.codehaus.plexus - plexus-container-default - 1.0-alpha-10 - - - opensymphony - xwork - 1.2.1 - - - - opensymphony - webwork - 2.2.4 - - - javax.servlet - servlet-api - 2.4 - provided - - - - - - - maven-compiler-plugin - - 1.4 - 1.4 - - - - org.codehaus.plexus - plexus-maven-plugin - - - - descriptor - - - - - - - diff --git a/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/ComponentCreationException.java b/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/ComponentCreationException.java deleted file mode 100644 index dcda88f9f..000000000 --- a/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/ComponentCreationException.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.codehaus.plexus.xwork; - -/* - * Copyright 2001-2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; - -/** - * ComponentCreationException - Component Lookup Failed due to Creation error. - * - * @author Joakim Erdfelt - * @version $Id$ - */ -public class ComponentCreationException - extends ComponentLookupException -{ - - public ComponentCreationException( String message, Throwable cause ) - { - super( message, cause ); - } - - public ComponentCreationException( String message ) - { - super( message ); - } -} diff --git a/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/ComponentNotFoundException.java b/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/ComponentNotFoundException.java deleted file mode 100644 index d808f5071..000000000 --- a/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/ComponentNotFoundException.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.codehaus.plexus.xwork; - -/* - * Copyright 2001-2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; - -/** - * ComponentNotFoundException - Component Lookup Failed due to lack of matching implementation for specified role/class. - * - * @author Joakim Erdfelt - * @version $Id$ - */ -public class ComponentNotFoundException - extends ComponentLookupException -{ - - public ComponentNotFoundException( String message, Throwable cause ) - { - super( message, cause ); - } - - public ComponentNotFoundException( String message ) - { - super( message ); - } - -} diff --git a/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/ConfigurationPhase.java b/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/ConfigurationPhase.java deleted file mode 100644 index 3ebcfd4e9..000000000 --- a/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/ConfigurationPhase.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.codehaus.plexus.xwork; - -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.ComponentConfigurator; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.context.ContextException; -import org.codehaus.plexus.lifecycle.phase.AbstractPhase; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.PhaseExecutionException; -import org.codehaus.plexus.util.StringUtils; - -import javax.servlet.ServletContext; - -/** - * Configure a component using the servlet expression evaluator. - * - * @todo this is not an ideal way to do this - it would be good for the expression evaluation parts of Plexus - * to be customisable without modifying the lifecycle - */ -public class ConfigurationPhase - extends AbstractPhase -{ - public static final String DEFAULT_CONFIGURATOR_ID = "basic"; - - public void execute( Object component, ComponentManager manager ) - throws PhaseExecutionException - { - try - { - ComponentDescriptor descriptor = manager.getComponentDescriptor(); - - String configuratorId = descriptor.getComponentConfigurator(); - - if ( StringUtils.isEmpty( configuratorId ) ) - { - configuratorId = DEFAULT_CONFIGURATOR_ID; - } - - ComponentConfigurator componentConfigurator = - (ComponentConfigurator) manager.getContainer().lookup( ComponentConfigurator.ROLE, configuratorId ); - - if ( manager.getComponentDescriptor().hasConfiguration() ) - { - ServletContext servletContext = - (ServletContext) manager.getContainer().getContext().get( ServletContext.class.getName() ); - - componentConfigurator.configureComponent( component, - manager.getComponentDescriptor().getConfiguration(), - new ServletExpressionEvaluator( servletContext ), - manager.getContainer().getContainerRealm() ); - } - } - catch ( ComponentLookupException e ) - { - throw new PhaseExecutionException( - "Unable to auto-configure component as its configurator could not be found", e ); - } - catch ( ComponentConfigurationException e ) - { - throw new PhaseExecutionException( "Unable to auto-configure component", e ); - } - catch ( ContextException e ) - { - throw new PhaseExecutionException( "Unable to auto-configure component", e ); - } - } -} diff --git a/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/PlexusLifecycleListener.java b/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/PlexusLifecycleListener.java deleted file mode 100644 index eed80eeee..000000000 --- a/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/PlexusLifecycleListener.java +++ /dev/null @@ -1,181 +0,0 @@ -package org.codehaus.plexus.xwork; - -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.URL; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; - -import javax.servlet.ServletContext; -import javax.servlet.ServletContextEvent; -import javax.servlet.ServletContextListener; -import javax.servlet.http.HttpSessionEvent; -import javax.servlet.http.HttpSessionListener; - -import org.codehaus.plexus.DefaultPlexusContainer; -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.PlexusContainerException; -import org.codehaus.plexus.configuration.PlexusConfigurationResourceException; -import org.codehaus.plexus.util.PropertyUtils; - -/** - * Web listener that will initialize the Plexus container. - * - * @version $Id$ - */ -public class PlexusLifecycleListener - implements ServletContextListener, HttpSessionListener -{ - private static final String PLEXUS_HOME = "plexus.home"; - - private static final String PLEXUS_PROPERTIES_PARAM = "plexus-properties"; - - private static final String DEFAULT_PLEXUS_PROPERTIES = "/WEB-INF/plexus.properties"; - - public static final String KEY = "webwork.plexus.container"; - - private static boolean loaded = false; - - private static void setLoaded( boolean loaded ) - { - PlexusLifecycleListener.loaded = loaded; - } - - public static boolean isLoaded() - { - return loaded; - } - - public void contextInitialized( ServletContextEvent servletContextEvent ) - { - try - { - ServletContext ctx = servletContextEvent.getServletContext(); - - PlexusContainer pc = new DefaultPlexusContainer( "default", getClass().getClassLoader(), setConfigurationStream( ctx ), initializeContext( ctx, resolveContextProperties( ctx ) ) ); - - ctx.setAttribute( KEY, pc ); - } - catch ( PlexusContainerException e ) - { - throw new RuntimeException( e ); - } - catch ( PlexusConfigurationResourceException e ) - { - throw new RuntimeException( e ); - } - setLoaded( true ); - } - - private Map initializeContext( ServletContext ctx, Properties properties ) - { - Map map = new HashMap(); - - // When run inside a Maven plugin (eg, the Jetty plugin), this will pick up the Maven core class - // configuration instead of the webapp. While ideally Maven would isolate the plugin classes from itself, - // this prevents Plexus from attempting to load a container configuration file as a workaround. - map.put( PlexusConstants.IGNORE_CONTAINER_CONFIGURATION, Boolean.TRUE ); - - // used by the servlet configuration phase - map.put( ServletContext.class.getName(), ctx ); - - map.putAll( properties ); - - return map; - } - - private static Properties resolveContextProperties( ServletContext context ) - { - Properties properties = new Properties(); - - String filename = context.getInitParameter( PLEXUS_PROPERTIES_PARAM ); - - if ( filename == null ) - { - filename = DEFAULT_PLEXUS_PROPERTIES; - } - - context.log( "Loading plexus context properties from: '" + filename + "'" ); - - try - { - URL url = context.getResource( filename ); - // bwalding: I think we'd be better off not using this exception swallower! - properties = PropertyUtils.loadProperties( url ); - } - catch ( Exception e ) - { - // michal: I don't think it is that good idea to ignore this error. - // bwalding: it's actually pretty difficult to get here as the PropertyUtils.loadProperties absorbs all Exceptions - context.log( "Could not load plexus context properties from: '" + filename + "'" ); - } - - if ( properties == null ) - { - context.log( "Could not load plexus context properties from: '" + filename + "'" ); - properties = new Properties(); - } - - if ( !properties.containsKey( PLEXUS_HOME ) ) - { - setPlexusHome( context, properties ); - } - - return properties; - } - - /** - * Set plexus.home context variable - */ - private static void setPlexusHome( ServletContext context, Properties contexProperties ) - { - String realPath = context.getRealPath( "/WEB-INF" ); - - if ( realPath != null ) - { - File f = new File( realPath ); - - contexProperties.setProperty( PLEXUS_HOME, f.getAbsolutePath() ); - } - else - { - context.log( "Not setting 'plexus.home' as plexus is running inside webapp with no 'real path'." ); - } - } - - private InputStreamReader setConfigurationStream( ServletContext ctx ) - throws PlexusConfigurationResourceException - { - InputStream is = - Thread.currentThread().getContextClassLoader().getResourceAsStream( "META-INF/plexus/application.xml" ); - if ( is == null ) - { - ctx.log( "Could not find " + "META-INF/plexus/application.xml" + ", skipping" ); - is = new ByteArrayInputStream( "".getBytes() ); - } - return new InputStreamReader( is ); - } - - public void contextDestroyed( ServletContextEvent servletContextEvent ) - { - ServletContext ctx = servletContextEvent.getServletContext(); - PlexusContainer pc = (PlexusContainer) ctx.getAttribute( KEY ); - if ( pc != null ) - { - pc.dispose(); - } - setLoaded( false ); - } - - public void sessionCreated( HttpSessionEvent httpSessionEvent ) - { - } - - public void sessionDestroyed( HttpSessionEvent httpSessionEvent ) - { - } -} diff --git a/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/PlexusObjectFactory.java b/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/PlexusObjectFactory.java deleted file mode 100644 index 58468e9da..000000000 --- a/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/PlexusObjectFactory.java +++ /dev/null @@ -1,413 +0,0 @@ -package org.codehaus.plexus.xwork; - -import com.opensymphony.webwork.util.ObjectFactoryInitializable; -import com.opensymphony.xwork.Action; -import com.opensymphony.xwork.ObjectFactory; -import com.opensymphony.xwork.Result; -import com.opensymphony.xwork.config.ConfigurationException; -import com.opensymphony.xwork.config.entities.ActionConfig; -import com.opensymphony.xwork.config.entities.InterceptorConfig; -import com.opensymphony.xwork.config.entities.ResultConfig; -import com.opensymphony.xwork.interceptor.Interceptor; -import com.opensymphony.xwork.util.OgnlUtil; -import com.opensymphony.xwork.validator.Validator; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.component.composition.CompositionException; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.logging.Logger; -import org.codehaus.plexus.util.StringUtils; - -import javax.servlet.ServletContext; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -/** - * @author Trygve Laugstøl - * @author Emmanuel Venisse - * @version $Id$ - */ -public class PlexusObjectFactory - extends ObjectFactory - implements ObjectFactoryInitializable -{ - private static final String PLEXUS_COMPONENT_TYPE = "plexus.component.type"; - - private static final String PLEXUS_NOT_LOADED_ERROR_MSG = "********** FATAL ERROR STARTING UP " - + "PLEXUS-WEBWORK INTEGRATION **********\n" - + "Looks like the Plexus listener was not configured for your web app! \n" - + "You need to add the following to web.xml: \n" + "\n" + " \n" - + " org.codehaus.plexus.xwork.PlexusLifecycleListener\n" - + " "; - - // ---------------------------------------------------------------------- - // Privates - // ---------------------------------------------------------------------- - - private PlexusContainer base; - - private List plexusComponents = new ArrayList(); - - private List otherComponents = new ArrayList(); - - // ---------------------------------------------------------------------- - // ObjectFactory overrides - // ---------------------------------------------------------------------- - - public void init( ServletContext servletContext ) - { - if ( !PlexusLifecycleListener.isLoaded() ) - { - // uh oh! looks like the lifecycle listener wasn't installed. Let's inform the user - servletContext.log( PLEXUS_NOT_LOADED_ERROR_MSG ); - return; - } - - base = (PlexusContainer) servletContext.getAttribute( PlexusLifecycleListener.KEY ); - } - - public Object buildAction( String actionName, String namespace, ActionConfig config, Map extraContext ) - throws Exception - { - if ( extraContext == null ) - { - extraContext = new HashMap(); - } - - extraContext.put( PLEXUS_COMPONENT_TYPE, Action.class.getName() ); - - return super.buildAction( actionName, namespace, config, extraContext ); - } - - public Interceptor buildInterceptor( InterceptorConfig interceptorConfig, Map interceptorRefParams ) - throws ConfigurationException - { - String interceptorClassName = interceptorConfig.getClassName(); - Map thisInterceptorClassParams = interceptorConfig.getParams(); - Map params = thisInterceptorClassParams == null ? new HashMap() : new HashMap( thisInterceptorClassParams ); - params.putAll( interceptorRefParams ); - - String message; - Throwable cause; - - try - { - Map extraContext = new HashMap(); - extraContext.put( PLEXUS_COMPONENT_TYPE, Interceptor.class.getName() ); - Interceptor interceptor = (Interceptor) buildBean( interceptorClassName, extraContext ); - OgnlUtil.setProperties( params, interceptor ); - interceptor.init(); - - return interceptor; - } - catch ( InstantiationException e ) - { - cause = e; - message = "Unable to instantiate an instance of Interceptor class [" + interceptorClassName + "]."; - } - catch ( IllegalAccessException e ) - { - cause = e; - message = "IllegalAccessException while attempting to instantiate an instance of Interceptor class [" + - interceptorClassName + "]."; - } - catch ( ClassCastException e ) - { - cause = e; - message = "Class [" + interceptorClassName + - "] does not implement com.opensymphony.xwork.interceptor.Interceptor"; - } - catch ( Exception e ) - { - cause = e; - message = "Caught Exception while registering Interceptor class " + interceptorClassName; - } - catch ( NoClassDefFoundError e ) - { - cause = e; - message = "Could not load class " + interceptorClassName + - ". Perhaps it exists but certain dependencies are not available?"; - } - - throw new ConfigurationException( message, cause ); - } - - public Result buildResult( ResultConfig resultConfig, Map extraContext ) - throws Exception - { - if ( extraContext == null ) - { - extraContext = new HashMap(); - } - - extraContext.put( PLEXUS_COMPONENT_TYPE, Result.class.getName() ); - - return super.buildResult( resultConfig, extraContext ); - } - - public Validator buildValidator( String className, Map params, Map extraContext ) - throws Exception - { - Map context = new HashMap(); - context.put( PLEXUS_COMPONENT_TYPE, Validator.class.getName() ); - Validator validator = (Validator) buildBean( className, context ); - OgnlUtil.setProperties( params, validator ); - - return validator; - } - - public Object buildBean( String className, Map extraContext ) - throws Exception - { - if ( extraContext != null ) - { - String type = (String) extraContext.get( PLEXUS_COMPONENT_TYPE ); - - if ( type != null ) - { - return lookup( type, className, extraContext ); - } - } - - return super.buildBean( className, extraContext ); - } - - public Object buildBean( Class clazz, Map extraContext ) - throws Exception - { - if ( extraContext != null ) - { - String type = (String) extraContext.get( PLEXUS_COMPONENT_TYPE ); - - if ( type != null ) - { - return lookup( type, clazz.getName(), extraContext ); - } - } - - return lookup( clazz.getName(), extraContext ); - } - - /** - * Used to provide useful exception messages to a web-app during a lookup in {@link #getClassInstance(String)} - * - * @param clazz the type of class to look up - * @param className the name of the specific class (or plexus role) to look up. - * @return the class that was found. - * - * @throws ComponentNotFoundException if the component was simply not found. - * @throws ComponentCreationException if the component was found, but failed to be created correctly. - */ - private Class lookupClass( Class clazz, String className ) - throws ComponentNotFoundException, ComponentCreationException - { - return lookup( base, clazz.getName(), className ).getClass(); - } - - public Class getClassInstance( String className ) - throws ClassNotFoundException - { - List exceptions = new ArrayList(); - - try - { - return lookupClass( Class.class, className ); - } - catch ( ComponentCreationException e ) - { - getLogger().error( e.getMessage(), e ); - throw new ClassNotFoundException( className, e ); - } - catch ( ComponentNotFoundException e ) - { - exceptions.add( e ); - // Fall Thru to next lookup Technique. - } - - try - { - return lookupClass( Action.class, className ); - } - catch ( ComponentCreationException e ) - { - getLogger().error( e.getMessage(), e ); - throw new ClassNotFoundException( className, e ); - } - catch ( ComponentNotFoundException e ) - { - exceptions.add( e ); - // Fall Thru to next lookup Technique. - } - - try - { - return lookupClass( Interceptor.class, className ); - } - catch ( ComponentCreationException e ) - { - getLogger().error( e.getMessage(), e ); - throw new ClassNotFoundException( className, e ); - } - catch ( ComponentNotFoundException e ) - { - exceptions.add( e ); - // Fall Thru to next lookup Technique. - } - - try - { - return lookupClass( Validator.class, className ); - } - catch ( ComponentCreationException e ) - { - getLogger().error( e.getMessage(), e ); - throw new ClassNotFoundException( className, e ); - } - catch ( ComponentNotFoundException e ) - { - exceptions.add( e ); - // Fall Thru to next lookup Technique. - } - - try - { - return lookupClass( Result.class, className ); - } - catch ( ComponentCreationException e ) - { - getLogger().error( e.getMessage(), e ); - throw new ClassNotFoundException( className, e ); - } - catch ( ComponentNotFoundException e ) - { - exceptions.add( e ); - // Fall Thru to next lookup Technique. - } - - getLogger().debug( "All standard lookups have failed for getClassInstance( \"" + className - + "\" ), the following exceptions detail the problem." ); - - Iterator it = exceptions.iterator(); - while ( it.hasNext() ) - { - Exception e = (Exception) it.next(); - getLogger().debug( e.getMessage(), e ); - } - - // Try the xwork component lookup as a fallback. - return super.getClassInstance( className ); - } - - private Object lookup( String role, Map extraContext ) - throws Exception - { - return lookup( role, null, extraContext ); - } - - private Object lookup( String role, String roleHint, Map extraContext ) - throws Exception - { - String id = role + ":" + roleHint; - - if ( plexusComponents.contains( id ) ) - { - return loadComponentWithPlexus( base, role, roleHint ); - } - - if ( otherComponents.contains( id ) ) - { - return loadComponentWithXWork( base, role, roleHint, extraContext ); - } - - try - { - Object o = loadComponentWithPlexus( base, role, roleHint ); - plexusComponents.add( id ); - return o; - } - catch ( ComponentCreationException e ) - { - getLogger().error( e.getMessage(), e ); - throw e; - } - catch ( ComponentNotFoundException e ) - { - Object o = loadComponentWithXWork( base, role, roleHint, extraContext ); - otherComponents.add( id ); - return o; - } - } - - private Object loadComponentWithPlexus( PlexusContainer pc, String role, String roleHint ) - throws ComponentNotFoundException, ComponentCreationException - { - return lookup( pc, role, roleHint ); - } - - private Object loadComponentWithXWork( PlexusContainer pc, String role, String roleHint, Map extraContext ) - throws Exception - { - String className = role; - - if ( Action.class.getName().equals( role ) || Interceptor.class.getName().equals( role ) || - Result.class.getName().equals( role ) || Validator.class.getName().equals( role ) ) - { - className = roleHint; - } - - Object o = super.buildBean( super.getClassInstance( className ), extraContext ); - pc.autowire( o ); - return o; - } - - /** - * Specialized Lookup supplement for standard plexus process, used to differentiate between an object - * that just doesn't match the provided criteria, and one that did match, but failed to be created due to - * component composition issues. - * - * Used to provide useful exception messages to a web-app during a lookup in {@link #getClassInstance(String)} and - * {@link #lookup(String, String, Map)} - * - * @param clazz the type of class to look up - * @param className the name of the specific class (or plexus role) to look up. - * @return the class that was found. - * - * @throws ComponentNotFoundException if the component was simply not found. - * @throws ComponentCreationException if the component was found, but failed to be created correctly. - */ - private Object lookup( PlexusContainer plexus, String role, String roleHint ) - throws ComponentNotFoundException, ComponentCreationException - { - if ( StringUtils.isEmpty( role ) ) - { - throw new ComponentNotFoundException( "Unable to find component for empty role." ); - } - - try - { - return plexus.lookup( role, roleHint ); - } - catch ( ComponentLookupException e ) - { - Throwable cause = e.getCause(); - while ( cause != null ) - { - if ( cause instanceof CompositionException ) - { - throw new ComponentCreationException( "Unable look up " + role + ":" + roleHint - + " due to plexus misconfiguration.", e ); - } - cause = cause.getCause(); - } - throw new ComponentNotFoundException( "Failed lookup for " + role + ":" + roleHint + ".", e ); - } - } - - private Logger getLogger() - { - // Cheating here... - return base.getLoggerManager().getLoggerForComponent( ObjectFactory.class.getName(), "plexus" ); - } -} diff --git a/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/ServletExpressionEvaluator.java b/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/ServletExpressionEvaluator.java deleted file mode 100644 index 7bc1578ca..000000000 --- a/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/ServletExpressionEvaluator.java +++ /dev/null @@ -1,113 +0,0 @@ -package org.codehaus.plexus.xwork; - -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; - -import javax.servlet.ServletContext; -import java.io.File; - -/** - * Looks for expression values from the servlet context, and from system properties. - * - * @author Brett Porter - * @todo possibly general purpose somewhere else in plexus, and it should be part of a delegating chain to a pure sysprop evaluator - */ -public class ServletExpressionEvaluator - implements ExpressionEvaluator -{ - private final ServletContext servletContext; - - public ServletExpressionEvaluator( ServletContext servletContext ) - { - this.servletContext = servletContext; - } - - private String stripTokens( String expression ) - { - String newExpression = expression; - if ( newExpression.startsWith( "${" ) && newExpression.indexOf( "}" ) == newExpression.length() - 1 ) - { - newExpression = newExpression.substring( 2, newExpression.length() - 1 ); - } - return newExpression; - } - - public Object evaluate( String expression ) - throws ExpressionEvaluationException - { - // Heavily borrowed from Maven PluginParameterExpressionEvaluator - // Should be a common class somewhere - - String value = null; - - if ( expression != null ) - { - String newExpression = stripTokens( expression ); - if ( newExpression.equals( expression ) ) - { - int index = expression.indexOf( "${" ); - if ( index >= 0 ) - { - int lastIndex = expression.indexOf( "}", index ); - if ( lastIndex >= 0 ) - { - String retVal = expression.substring( 0, index ); - - if ( index > 0 && expression.charAt( index - 1 ) == '$' ) - { - retVal += expression.substring( index + 1, lastIndex + 1 ); - } - else - { - retVal += evaluate( expression.substring( index, lastIndex + 1 ) ); - } - - retVal += evaluate( expression.substring( lastIndex + 1 ) ); - return retVal; - } - } - - // Was not an expression - if ( newExpression.indexOf( "$$" ) > -1 ) - { - return newExpression.replaceAll( "\\$\\$", "\\$" ); - } - else - { - return newExpression; - } - } - - value = servletContext.getInitParameter( newExpression ); - if ( value == null ) - { - value = System.getProperty( newExpression ); - } - - if ( value != null ) - { - int exprStartDelimiter = value.indexOf( "${" ); - - if ( exprStartDelimiter >= 0 ) - { - if ( exprStartDelimiter > 0 ) - { - value = value.substring( 0, exprStartDelimiter ) + - evaluate( value.substring( exprStartDelimiter ) ); - } - else - { - value = (String) evaluate( value.substring( exprStartDelimiter ) ); - } - } - } - } - - return value; - } - - public File alignToBaseDirectory( File file ) - { - return file; - } -} diff --git a/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/action/PlexusActionSupport.java b/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/action/PlexusActionSupport.java deleted file mode 100644 index 5818ec5c4..000000000 --- a/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/action/PlexusActionSupport.java +++ /dev/null @@ -1,70 +0,0 @@ -package org.codehaus.plexus.xwork.action; - -/* - * Copyright 2005 The Codehaus. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import com.opensymphony.webwork.interceptor.SessionAware; -import com.opensymphony.xwork.ActionSupport; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.context.Context; -import org.codehaus.plexus.context.ContextException; -import org.codehaus.plexus.logging.LogEnabled; -import org.codehaus.plexus.logging.Logger; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable; - -import java.util.Map; - -/** - * PlexusActionSupport - * - * @author Jesse McConnell - * @version $Id:$ - */ -public abstract class PlexusActionSupport - extends ActionSupport - implements Contextualizable, LogEnabled, SessionAware -{ - protected PlexusContainer container; - - protected Map session; - - private Logger logger; - - public void setSession( Map map ) - { - this.session = map; - } - - public void enableLogging( Logger logger ) - { - this.logger = logger; - } - - protected Logger getLogger() - { - return logger; - } - - public void contextualize( Context context ) - throws ContextException - { - // this ought to work, but we could also get the context from the ActionContext this way - // container = (PlexusContainer) ActionContext.getContext().getApplication().get( PlexusLifecycleListener.KEY ); - container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY ); - } - - -} diff --git a/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/filter/FilterToComponentProxy.java b/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/filter/FilterToComponentProxy.java deleted file mode 100644 index 4630d8012..000000000 --- a/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/filter/FilterToComponentProxy.java +++ /dev/null @@ -1,210 +0,0 @@ -package org.codehaus.plexus.xwork.filter; - -/* - * Copyright 2004-2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.IOException; - -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.xwork.PlexusLifecycleListener; - -/** - *

Delegates Filter requests to a Plexus component.

- * - *

This class acts as a proxy on behalf of a - * target {@link Filter} that is instantiated by the Plexus container. It is necessary to specify which target - * {@link Filter} should be proxied as a filter initialization parameter.

- * - *

To use this filter, it is necessary to specify the following filter initialization parameter: - *

    - *
  • component indicates the name of the target Filter defined in the container. - * The only requirements are that this component implements the javax.servlet.Filter - * interface and is available in the Container under that name.
  • - *
- *

- * - *

A final optional initialization parameter, lifecycle, determines whether the servlet container - * or the IoC container manages the lifecycle of the proxied filter. When possible you should write your filters to be - * managed via the IoC container interfaces. If you cannot control the filters you wish to proxy (eg - * you do not have their source code) you might need to allow the servlet container to manage lifecycle via the {@link - * javax.servlet.Filter#init(javax.servlet.FilterConfig)} and {@link javax.servlet.Filter#destroy()} methods. If this - * case, set the lifecycle initialization parameter to servlet-container-managed. If the - * parameter is any other value, servlet container lifecycle methods will not be delegated through to the proxy.

- * - * @author Ben Alex - * @author Emmanuel Venisse (evenisse at apache dot org) - * @author Carlos Sanchez - * @version $Id$ - */ -public class FilterToComponentProxy - implements Filter -{ - private static final Log log = LogFactory.getLog( FilterToComponentProxy.class ); - - private ServletContext ctx; - - private Filter delegate; - - private FilterConfig filterConfig; - - private boolean initialized = false; - - private boolean servletContainerManaged = false; - - public void init( FilterConfig filterConfig ) - throws ServletException - { - this.filterConfig = filterConfig; - - doInit(); - } - - /** - * Lookup the delegate {@link Filter} in Plexus container - * - * @throws ServletException if this Filter or the delegate Filter are not correctly configured - */ - private synchronized void doInit() - throws ServletException - { - if ( initialized ) - { - // already initialized, so don't re-initialize - return; - } - - String componentName = null; - - String param = filterConfig.getInitParameter( "component" ); - - if ( ( param != null ) && !param.equals( "" ) ) - { - componentName = param; - } - - if ( componentName == null ) - { - throw new ServletException( this.getClass().getName() + " require a \"component\" init-param." ); - } - - String lifecycle = filterConfig.getInitParameter( "lifecycle" ); - - if ( "servlet-container-managed".equals( lifecycle ) ) - { - servletContainerManaged = true; - } - - PlexusContainer container = getContainer( filterConfig ); - - if ( container == null ) - { - throw new ServletException( "Plexus container not found" ); - } - - Object object = null; - try - { - object = container.lookup( componentName ); - } - catch ( ComponentLookupException e ) - { - /* need to log as the web server doesn't print the cause */ - log.error( "Component '" + componentName + "' not found in container", e ); - throw new ServletException( "Component '" + componentName + "' not found in container", e ); - } - - if ( object == null ) - { - throw new ServletException( "Component '" + componentName + "' not found in container" ); - } - - if ( !( object instanceof Filter ) ) - { - throw new ServletException( "Component '" + componentName + "' does not implement javax.servlet.Filter" ); - } - - delegate = (Filter) object; - - if ( servletContainerManaged ) - { - delegate.init( filterConfig ); - } - - // Set initialized to true at the end of the synchronized method, so - // that invocations of doFilter() before this method has completed will not - // cause NullPointerException - initialized = true; - } - - public void doFilter( ServletRequest request, ServletResponse response, FilterChain chain ) - throws IOException, ServletException - { - if ( !initialized ) - { - doInit(); - } - - delegate.doFilter( request, response, chain ); - } - - public void destroy() - { - if ( ( delegate != null ) && servletContainerManaged ) - { - delegate.destroy(); - } - } - - /** - * Allows test cases to override where container is obtained from. - * - * @param filterConfig which can be used to find the ServletContext - * - * @return the Plexus container - */ - protected PlexusContainer getContainer( FilterConfig filterConfig ) - { - ctx = filterConfig.getServletContext(); - - return (PlexusContainer) ctx.getAttribute( PlexusLifecycleListener.KEY ); - } -} diff --git a/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/interceptor/ExceptionLoggingInterceptor.java b/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/interceptor/ExceptionLoggingInterceptor.java deleted file mode 100644 index ebaee6444..000000000 --- a/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/interceptor/ExceptionLoggingInterceptor.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.codehaus.plexus.xwork.interceptor; - -/* - * Copyright 2006 The Codehaus. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.logging.LogEnabled; -import org.codehaus.plexus.logging.Logger; - -import com.opensymphony.xwork.ActionInvocation; -import com.opensymphony.xwork.interceptor.ExceptionHolder; - -/** - * Exception interceptor that will also log the exception. - * - * @author Napoleon Esmundo C. Ramirez - * @version $Id$ - * @plexus.component role="com.opensymphony.xwork.interceptor.Interceptor" role-hint="exceptionLogging" - */ -public class ExceptionLoggingInterceptor - extends ExceptionMappingInterceptor - implements LogEnabled -{ - private Logger logger; - - private static final long serialVersionUID = -1776743136472264546L; - - protected void publishException( ActionInvocation invocation, ExceptionHolder exceptionHolder ) - { - Throwable e = exceptionHolder.getException(); - logger.info( "Error ocurred during execution", e ); - - super.publishException( invocation, exceptionHolder ); - } - - public void enableLogging( Logger logger ) - { - this.logger = logger; - } -} diff --git a/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/interceptor/ExceptionMappingInterceptor.java b/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/interceptor/ExceptionMappingInterceptor.java deleted file mode 100644 index c4ea4bd99..000000000 --- a/plexus-sandbox/plexus-xwork-integration/src/main/java/org/codehaus/plexus/xwork/interceptor/ExceptionMappingInterceptor.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2002-2006 by OpenSymphony - * All rights reserved. - */ - -package org.codehaus.plexus.xwork.interceptor; - -/* - * Copyright 2006 The Codehaus. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.Iterator; -import java.util.List; - -import com.opensymphony.xwork.ActionInvocation; -import com.opensymphony.xwork.config.entities.ExceptionMappingConfig; -import com.opensymphony.xwork.interceptor.ExceptionHolder; - -/** - *

- * Exception interceptor that allows ignoring exceptions. Set the result to ignore - * in your xwork.xml file to ignore an exception when you are catching a more general - * one. - *

- * - *

- * - * <exception-mapping exception="MyException" result="ignore"/> - * - *

- * - * @author Carlos Sanchez - * @version $Id$ - * @plexus.component role="com.opensymphony.xwork.interceptor.Interceptor" role-hint="exceptionInterceptor" - */ -public class ExceptionMappingInterceptor - extends com.opensymphony.xwork.interceptor.ExceptionMappingInterceptor -{ - public static final String IGNORE = "ignore"; - - private static final long serialVersionUID = 235443833909815141L; - - public String intercept( ActionInvocation invocation ) - throws Exception - { - String result; - - try - { - result = invocation.invoke(); - } - catch ( Exception e ) - { - List exceptionMappings = invocation.getProxy().getConfig().getExceptionMappings(); - String mappedResult = this.findResultFromExceptions( exceptionMappings, e ); - if ( mappedResult != null ) - { - result = mappedResult; - if ( result.equals( IGNORE ) ) - { - throw e; - } - publishException( invocation, new ExceptionHolder( e ) ); - } - else - { - throw e; - } - } - - return result; - } - - private String findResultFromExceptions( List exceptionMappings, Throwable t ) - { - String result = null; - - // Check for specific exception mappings. - if ( exceptionMappings != null ) - { - int deepest = Integer.MAX_VALUE; - for ( Iterator iter = exceptionMappings.iterator(); iter.hasNext(); ) - { - ExceptionMappingConfig exceptionMappingConfig = (ExceptionMappingConfig) iter.next(); - int depth = getDepth( exceptionMappingConfig.getExceptionClassName(), t ); - if ( depth >= 0 && depth < deepest ) - { - deepest = depth; - result = exceptionMappingConfig.getResult(); - } - } - } - - return result; - } - -} diff --git a/plexus-sandbox/plexus-xwork-integration/src/test/java/org/codehaus/plexus/xwork/action/ActionLoggingTest.java b/plexus-sandbox/plexus-xwork-integration/src/test/java/org/codehaus/plexus/xwork/action/ActionLoggingTest.java deleted file mode 100644 index 71ece7c4a..000000000 --- a/plexus-sandbox/plexus-xwork-integration/src/test/java/org/codehaus/plexus/xwork/action/ActionLoggingTest.java +++ /dev/null @@ -1,101 +0,0 @@ -package org.codehaus.plexus.xwork.action; - -/* - * Copyright 2005 The Codehaus. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.PlexusTestCase; - -import java.io.PrintStream; -import java.io.BufferedOutputStream; -import java.io.FileOutputStream; -import java.io.FilterOutputStream; -import java.io.OutputStream; -import java.io.IOException; - -/** - * ActionLoggingTest: - * - * @author Jesse McConnell - * @version $Id$ - */ -public class ActionLoggingTest - extends PlexusTestCase -{ - - StringBuffer testOutput = new StringBuffer(); - - - public void setUp() throws Exception - { - super.setUp(); - - PrintStream systemPrintStream = new PrintStream( new FilteredStream( System.out ), true ); - System.setOut( systemPrintStream ); - } - - - public void tearDown() - { - System.setOut( new PrintStream( - new BufferedOutputStream( new FileOutputStream( java.io.FileDescriptor.out ), 128 ), true ) ); - } - - - public void testActionLogging() - { - try - { - TestPlexusAction testAction = (TestPlexusAction) lookup( "com.opensymphony.xwork.Action", "testAction" ); - String testString = "action test string"; - testAction.setTestString( testString ); - - testAction.execute(); - - assertTrue( testOutput.toString().indexOf( testString ) != -1 ); - } - catch ( Exception e ) - { - fail( e.getMessage() ); - } - } - - - class FilteredStream - extends FilterOutputStream - { - OutputStream stream; - - public FilteredStream( OutputStream stream ) - { - super( stream ); - this.stream = stream; - } - - public void write( byte byteArray[] ) - throws IOException - { - testOutput.append( new String ( byteArray ) ); - stream.write( byteArray ); - } - - public void write( byte byteArray[], int offset, int length ) - throws IOException - { - testOutput.append( new String( byteArray, offset, length ) ); - stream.write( byteArray, offset, length ); - } - } -} diff --git a/plexus-sandbox/plexus-xwork-integration/src/test/java/org/codehaus/plexus/xwork/action/TestPlexusAction.java b/plexus-sandbox/plexus-xwork-integration/src/test/java/org/codehaus/plexus/xwork/action/TestPlexusAction.java deleted file mode 100644 index 840e70de5..000000000 --- a/plexus-sandbox/plexus-xwork-integration/src/test/java/org/codehaus/plexus/xwork/action/TestPlexusAction.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.codehaus.plexus.xwork.action; - -/* - * Copyright 2001-2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * TestPlexusAction: - * - * @author Jesse McConnell - * @version $Id$ - */ -public class TestPlexusAction - extends PlexusActionSupport -{ - private String testString; - - public String execute() - throws Exception - { - getLogger().info( testString ); - - return INPUT; - } - - public String getTestString() - { - return testString; - } - - public void setTestString( String testString ) - { - this.testString = testString; - } -} diff --git a/plexus-sandbox/plexus-xwork-integration/src/test/java/org/codehaus/plexus/xwork/interceptor/CustomInterceptorTest.java b/plexus-sandbox/plexus-xwork-integration/src/test/java/org/codehaus/plexus/xwork/interceptor/CustomInterceptorTest.java deleted file mode 100644 index 875657caa..000000000 --- a/plexus-sandbox/plexus-xwork-integration/src/test/java/org/codehaus/plexus/xwork/interceptor/CustomInterceptorTest.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * - */ -package org.codehaus.plexus.xwork.interceptor; - -import java.util.HashMap; - -import javax.servlet.ServletContext; -import javax.servlet.ServletContextEvent; - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.component.composition.CompositionException; -import org.codehaus.plexus.xwork.PlexusLifecycleListener; -import org.codehaus.plexus.xwork.PlexusObjectFactory; -import org.easymock.EasyMock; - -import com.opensymphony.xwork.config.entities.InterceptorConfig; -import com.opensymphony.xwork.interceptor.Interceptor; - -/** - * Test for {@link PlexusObjectFactory} when it attempts to lookup Custom Xwork interceptors. - * @author Rahul Thakur - * @version $Id$ - */ -public class CustomInterceptorTest - extends PlexusTestCase -{ - - /** - * Tests a plain Interceptor lookup that does not use the {@link PlexusObjectFactory} - */ - public void testLookup() - { - try - { - MockCustomInterceptor component = (MockCustomInterceptor) lookup( Interceptor.class.getName(), - "testCustomInterceptor" ); - assertNotNull( component ); - - } - catch ( Exception e ) - { - e.printStackTrace(); - fail( "Unexpected Exception" ); - } - - } - - /** - * Tests an Interceptor lookup using the {@link PlexusObjectFactory}. - * @throws Exception - */ - public void testLookupWithPlexusObjectFactory() - throws Exception - { - PlexusObjectFactory objFactory = new PlexusObjectFactory(); - - InterceptorConfig config = new InterceptorConfig( "testCustomInterceptor", MockCustomInterceptor.class, - new HashMap() ); - - ServletContext servletContext = (ServletContext) EasyMock.createNiceMock( ServletContext.class ); - - ServletContextEvent servletContextEvent = new ServletContextEvent( servletContext ); - - EasyMock.expect( servletContext.getAttribute( "webwork.plexus.container" ) ).andReturn( container ).anyTimes(); - - EasyMock.replay( new Object[] { servletContext } ); - - PlexusLifecycleListener listener = new PlexusLifecycleListener(); - - listener.contextInitialized( servletContextEvent ); - - objFactory.init( servletContext ); - - try - { - Interceptor interceptor = objFactory.buildInterceptor( config, new HashMap() ); - - fail( "Expected CompositionException" ); - //assertNotNull( interceptor ); - } - catch ( Exception e ) - { - assertEquals( CompositionException.class.getName(), e.getCause().getClass().getName() ); - } - - } -} diff --git a/plexus-sandbox/plexus-xwork-integration/src/test/java/org/codehaus/plexus/xwork/interceptor/MockComponent.java b/plexus-sandbox/plexus-xwork-integration/src/test/java/org/codehaus/plexus/xwork/interceptor/MockComponent.java deleted file mode 100644 index 10156c1c1..000000000 --- a/plexus-sandbox/plexus-xwork-integration/src/test/java/org/codehaus/plexus/xwork/interceptor/MockComponent.java +++ /dev/null @@ -1,16 +0,0 @@ -/** - * - */ -package org.codehaus.plexus.xwork.interceptor; - -/** - * @author Rahul Thakur - * - */ -public interface MockComponent -{ - String ROLE = MockComponent.class.getName(); - - public void displayResult( String result ); - -} diff --git a/plexus-sandbox/plexus-xwork-integration/src/test/java/org/codehaus/plexus/xwork/interceptor/MockComponentImpl.java b/plexus-sandbox/plexus-xwork-integration/src/test/java/org/codehaus/plexus/xwork/interceptor/MockComponentImpl.java deleted file mode 100644 index 043ec6e29..000000000 --- a/plexus-sandbox/plexus-xwork-integration/src/test/java/org/codehaus/plexus/xwork/interceptor/MockComponentImpl.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * - */ -package org.codehaus.plexus.xwork.interceptor; - -/** - * @author Rahul Thakur - * @version $Id$ - * @plexus.component - */ -public class MockComponentImpl - implements MockComponent -{ - - /* (non-Javadoc) - * @see org.codehaus.plexus.xwork.interceptor.TestComponent#execute() - */ - public void displayResult( String result ) - { - System.out.println( result ); - } - -} diff --git a/plexus-sandbox/plexus-xwork-integration/src/test/java/org/codehaus/plexus/xwork/interceptor/MockCustomInterceptor.java b/plexus-sandbox/plexus-xwork-integration/src/test/java/org/codehaus/plexus/xwork/interceptor/MockCustomInterceptor.java deleted file mode 100644 index 9c36b1576..000000000 --- a/plexus-sandbox/plexus-xwork-integration/src/test/java/org/codehaus/plexus/xwork/interceptor/MockCustomInterceptor.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.codehaus.plexus.xwork.interceptor; - -/* - * Copyright 2001-2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import com.opensymphony.xwork.ActionInvocation; -import com.opensymphony.xwork.interceptor.Interceptor; - -/** - * @author Rahul Thakur - * @version $Id$ - * @plexus.component role="com.opensymphony.xwork.interceptor.Interceptor role-hint="testCustomInterceptor" - - */ -public class MockCustomInterceptor - implements Interceptor -{ - - /** - * @plexus.requirement - */ - MockComponent testComponent; - - /* (non-Javadoc) - * @see com.opensymphony.xwork.interceptor.Interceptor#destroy() - */ - public void destroy() - { - // do nothing - } - - /* (non-Javadoc) - * @see com.opensymphony.xwork.interceptor.Interceptor#init() - */ - public void init() - { - // do nothing - } - - /* (non-Javadoc) - * @see com.opensymphony.xwork.interceptor.Interceptor#intercept(com.opensymphony.xwork.ActionInvocation) - */ - public String intercept( ActionInvocation invocation ) - throws Exception - { - String result = "Hello Custom Interceptor"; - - try - { - testComponent.displayResult( result ); - - } - catch ( Exception e ) - { - throw e; - } - - return result; - } - - public MockComponent getTestComponent() - { - return testComponent; - } - - // Introduce a Composition Exception , see PLX - 278 - // public void setTestComponent( MockComponent testComponent ) - // { - // this.testComponent = testComponent; - // } - -} diff --git a/plexus-sandbox/plexus-xwork-integration/src/test/resources/META-INF/plexus/components.xml b/plexus-sandbox/plexus-xwork-integration/src/test/resources/META-INF/plexus/components.xml deleted file mode 100644 index f0521001b..000000000 --- a/plexus-sandbox/plexus-xwork-integration/src/test/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - com.opensymphony.xwork.Action - testAction - org.codehaus.plexus.xwork.action.TestPlexusAction - - - com.opensymphony.xwork.interceptor.Interceptor - testCustomInterceptor - org.codehaus.plexus.xwork.interceptor.MockCustomInterceptor - - - org.codehaus.plexus.xwork.interceptor.MockComponent - - - - - org.codehaus.plexus.xwork.interceptor.MockComponent - org.codehaus.plexus.xwork.interceptor.MockComponentImpl - - - diff --git a/plexus-sandbox/plexus-xwork-integration/src/test/resources/plexus.properties b/plexus-sandbox/plexus-xwork-integration/src/test/resources/plexus.properties deleted file mode 100644 index b1cfe267e..000000000 --- a/plexus-sandbox/plexus-xwork-integration/src/test/resources/plexus.properties +++ /dev/null @@ -1 +0,0 @@ -# Empty \ No newline at end of file diff --git a/plexus-servers/dnsd/project.properties b/plexus-servers/dnsd/project.properties deleted file mode 100644 index dac88eddb..000000000 --- a/plexus-servers/dnsd/project.properties +++ /dev/null @@ -1,2 +0,0 @@ -maven.xdoc.date=left -maven.xdoc.version=${pom.currentVersion} diff --git a/plexus-servers/dnsd/project.xml b/plexus-servers/dnsd/project.xml deleted file mode 100644 index 6ff2d9f62..000000000 --- a/plexus-servers/dnsd/project.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - ${maven.repo.local}/plexus/poms/plexus-server-1.0.pom - plexus-dnsd - plexus-dnsd - Plexus DNS Server - 1.0-SNAPSHOT - - - - Jason van Zyl - jvanzyl - jason@zenplex.com - Zenplex - - Java Developer - - - - - - - - james - james - 3.0a1 - - - - plexus - plexus - 0.14-SNAPSHOT - - - - dnsjava - dnsjava - 1.3.2 - - - - - diff --git a/plexus-servers/dnsd/src/java/org/codehaus/plexus/dns/DNSServer.java b/plexus-servers/dnsd/src/java/org/codehaus/plexus/dns/DNSServer.java deleted file mode 100644 index 01457b915..000000000 --- a/plexus-servers/dnsd/src/java/org/codehaus/plexus/dns/DNSServer.java +++ /dev/null @@ -1,360 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2000-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache", "Jakarta", "JAMES" and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * Portions of this software are based upon public domain software - * originally written at the National Center for Supercomputing Applications, - * University of Illinois, Urbana-Champaign. - */ - -package org.codehaus.plexus.dns; - -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.xbill.DNS.Cache; -import org.xbill.DNS.Credibility; -import org.xbill.DNS.DClass; -import org.xbill.DNS.ExtendedResolver; -import org.xbill.DNS.FindServer; -import org.xbill.DNS.Message; -import org.xbill.DNS.MXRecord; -import org.xbill.DNS.Name; -import org.xbill.DNS.Rcode; -import org.xbill.DNS.Record; -import org.xbill.DNS.Resolver; -import org.xbill.DNS.RRset; -import org.xbill.DNS.SetResponse; -import org.xbill.DNS.TextParseException; -import org.xbill.DNS.Type; - -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.*; - -/** - * Provides DNS client functionality to services running - * inside James - */ -public class DNSServer - extends AbstractLogEnabled - implements Configurable, Initializable, - org.apache.james.services.DNSServer { - - /** - * A resolver instance used to retrieve DNS records. This - * is a reference to a third party library object. - */ - private Resolver resolver; - - /** - * A TTL cache of results received from the DNS server. This - * is a reference to a third party library object. - */ - private Cache cache; - - /** - * Whether the DNS response is required to be authoritative - */ - private byte dnsCredibility; - - /** - * The DNS servers to be used by this service - */ - private List dnsServers = new ArrayList(); - - /** - * The MX Comparator used in the MX sort. - */ - private Comparator mxComparator = new MXRecordComparator(); - - /** - * @see org.apache.avalon.framework.configuration.Configurable#configure(Configuration) - */ - public void configure( final Configuration configuration ) - throws ConfigurationException { - - final boolean autodiscover = - configuration.getChild( "autodiscover" ).getValueAsBoolean( true ); - - if (autodiscover) { - getLogger().info("Autodiscovery is enabled - trying to discover your system's DNS Servers"); - String[] serversArray = FindServer.servers(); - if (serversArray != null) { - for ( int i = 0; i < serversArray.length; i++ ) { - dnsServers.add(serversArray[ i ]); - getLogger().info("Adding autodiscovered server " + serversArray[i]); - } - } - } - - // Get the DNS servers that this service will use for lookups - final Configuration serversConfiguration = configuration.getChild( "servers" ); - final Configuration[] serverConfigurations = - serversConfiguration.getChildren( "server" ); - - for ( int i = 0; i < serverConfigurations.length; i++ ) { - dnsServers.add( serverConfigurations[ i ].getValue() ); - } - - if (dnsServers.isEmpty()) { - getLogger().info("No DNS servers have been specified or found by autodiscovery - adding 127.0.0.1"); - dnsServers.add("127.0.0.1"); - } - - final boolean authoritative = - configuration.getChild( "authoritative" ).getValueAsBoolean( false ); - // TODO: Check to see if the credibility field is being used correctly. From the - // docs I don't think so - dnsCredibility = authoritative ? Credibility.AUTH_ANSWER : Credibility.NONAUTH_ANSWER; - } - - /** - * @see org.apache.avalon.framework.activity.Initializable#initialize() - */ - public void initialize() - throws Exception { - - getLogger().debug("DNSServer init..."); - - // If no DNS servers were configured, default to local host - if (dnsServers.isEmpty()) { - try { - dnsServers.add( InetAddress.getLocalHost().getHostName() ); - } catch ( UnknownHostException ue ) { - dnsServers.add( "127.0.0.1" ); - } - } - - //Create the extended resolver... - final String[] serversArray = (String[])dnsServers.toArray(new String[0]); - - if (getLogger().isInfoEnabled()) { - for(int c = 0; c < serversArray.length; c++) { - getLogger().info("DNS Server is: " + serversArray[c]); - } - } - - try { - resolver = new ExtendedResolver( serversArray ); - } catch (UnknownHostException uhe) { - getLogger().fatalError("DNS service could not be initialized. The DNS servers specified are not recognized hosts.", uhe); - throw uhe; - } - - cache = new Cache (DClass.IN); - - getLogger().debug("DNSServer ...init end"); - } - - /** - *

Return a prioritized unmodifiable list of MX records - * obtained from the server.

- * - * @param hostname domain name to look up - * - * @return a unmodifiable list of MX records corresponding to - * this mail domain name - */ - public Collection findMXRecords(String hostname) { - Record answers[] = lookup(hostname, Type.MX); - List servers = new ArrayList(); - try { - if (answers == null) { - return servers; - } - - MXRecord mxAnswers[] = new MXRecord[answers.length]; - for (int i = 0; i < answers.length; i++) { - mxAnswers[i] = (MXRecord)answers[i]; - } - - Arrays.sort(mxAnswers, mxComparator); - - for (int i = 0; i < mxAnswers.length; i++) { - servers.add(mxAnswers[i].getTarget ().toString ()); - getLogger().debug(new StringBuffer("Found MX record ").append(mxAnswers[i].getTarget ().toString ()).toString()); - } - return Collections.unmodifiableCollection(servers); - } finally { - //If we found no results, we'll add the original domain name if - //it's a valid DNS entry - if (servers.size () == 0) { - StringBuffer logBuffer = - new StringBuffer(128) - .append("Couldn't resolve MX records for domain ") - .append(hostname) - .append("."); - getLogger().error(logBuffer.toString()); - try { - InetAddress.getByName(hostname); - servers.add(hostname); - } catch (UnknownHostException uhe) { - // The original domain name is not a valid host, - // so we can't add it to the server list. In this - // case we return an empty list of servers - logBuffer = new StringBuffer(128) - .append("Couldn't resolve IP address for host ") - .append(hostname) - .append("."); - getLogger().error(logBuffer.toString()); - } - } - } - } - - /** - * Looks up DNS records of the specified type for the specified name. - * - * This method is a public wrapper for the private implementation - * method - * - * @param name the name of the host to be looked up - * @param type the type of record desired - */ - public Record[] lookup(String name, short type) { - return rawDNSLookup(name,false,type); - } - - /** - * Looks up DNS records of the specified type for the specified name - * - * @param namestr the name of the host to be looked up - * @param querysent whether the query has already been sent to the DNS servers - * @param type the type of record desired - */ - private Record[] rawDNSLookup(String namestr, boolean querysent, short type) { - Name name = null; - try { - name = Name.fromString(namestr, Name.root); - } catch (TextParseException tpe) { - // TODO: Figure out how to handle this correctly. - getLogger().error("Couldn't parse name " + namestr, tpe); - return null; - } - short dclass = DClass.IN; - - Record [] answers; - int answerCount = 0, n = 0; - - SetResponse cached = cache.lookupRecords(name, type, dnsCredibility); - if (cached.isSuccessful()) { - getLogger().debug(new StringBuffer(256) - .append("Retrieving MX record for ") - .append(name).append(" from cache") - .toString()); - RRset [] rrsets = cached.answers(); - answerCount = 0; - for (int i = 0; i < rrsets.length; i++) { - answerCount += rrsets[i].size(); - } - - answers = new Record[answerCount]; - - for (int i = 0; i < rrsets.length; i++) { - Iterator iter = rrsets[i].rrs(); - while (iter.hasNext()) { - Record r = (Record)iter.next(); - answers[n++] = r; - } - } - } - else if (cached.isNXDOMAIN() || cached.isNXRRSET()) { - return null; - } - else if (querysent) { - return null; - } - else { - getLogger().debug(new StringBuffer(256) - .append("Looking up MX record for ") - .append(name) - .toString()); - Record question = Record.newRecord(name, type, dclass); - Message query = Message.newQuery(question); - Message response = null; - - try { - response = resolver.send(query); - } - catch (Exception ex) { - getLogger().warn("Query error!", ex); - return null; - } - - short rcode = response.getHeader().getRcode(); - if (rcode == Rcode.NOERROR || rcode == Rcode.NXDOMAIN) { - cache.addMessage(response); - } - - if (rcode != Rcode.NOERROR) { - return null; - } - - return rawDNSLookup(namestr, true, type); - } - - return answers; - } - - private static class MXRecordComparator - implements Comparator { - - public int compare (Object a, Object b) { - MXRecord ma = (MXRecord)a; - MXRecord mb = (MXRecord)b; - return ma.getPriority () - mb.getPriority (); - } - } -} diff --git a/plexus-servers/ftpd/project.xml b/plexus-servers/ftpd/project.xml deleted file mode 100644 index d99648fdf..000000000 --- a/plexus-servers/ftpd/project.xml +++ /dev/null @@ -1,111 +0,0 @@ - - - ${maven.repo.local}/plexus/poms/plexus-server-1.0.pom - plexus-ftp - plexus - plexus-ftp - Plexus FTP Server - 1.0-SNAPSHOT - - - - - avalon - avalon-framework - 4.1.4 - - - - cornerstone-threads - cornerstone-threads-api - 1.0 - - - - cornerstone-threads - cornerstone-threads-impl - 1.0 - - - - excalibur-thread - excalibur-thread - 1.1.1 - - - - excalibur-pool - excalibur-pool-api - 2.0 - - - - excalibur-pool - excalibur-pool-impl - 2.0 - - - - cornerstone-connection - cornerstone-connection-api - 1.0 - - - - cornerstone-connection - cornerstone-connection-impl - 1.0 - - - - cornerstone-sockets - cornerstone-sockets-api - 1.0 - - - - cornerstone-sockets - cornerstone-sockets-impl - 1.0 - - - - concurrent - concurrent - 1.3.2 - - - - plexus - plexus-avalon-personality - 0.12 - - - - commons-collections - commons-collections - 3.0 - - - - - - src/main - src/test/java - - - - **/*Test.java - - - - src/test/java - - **/*.xml - - - - - - - diff --git a/plexus-servers/ftpd/src/conf/assembly.xml b/plexus-servers/ftpd/src/conf/assembly.xml deleted file mode 100644 index 1efc615e2..000000000 --- a/plexus-servers/ftpd/src/conf/assembly.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plexus-servers/ftpd/src/conf/config.xml b/plexus-servers/ftpd/src/conf/config.xml deleted file mode 100644 index 0ac5c2690..000000000 --- a/plexus-servers/ftpd/src/conf/config.xml +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - - default - - - 5 - - - false - - 40 - - 20 - 20 - - - - - - - - - - - - - - - - - - - - - - - - - 21 - - - - - 20 - - - 10 - - - true - - - true - - - false - - - 1099 - - - 120 - - - 300 - - - ../ - - - - - - - - - - - - file - - - OBJECT - - - SYNCHRONOUS - ASYNCHRONOUS - CACHE - - - - - - - file - - - STREAM - - - SYNCHRONOUS - ASYNCHRONOUS - CACHE - - - - - - - - - - - admin - - - true - - - - - - - - - - - - - false - - - diff --git a/plexus-servers/ftpd/src/conf/environment.xml b/plexus-servers/ftpd/src/conf/environment.xml deleted file mode 100644 index 78a2d99b0..000000000 --- a/plexus-servers/ftpd/src/conf/environment.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/plexus-servers/ftpd/src/conf/ftp-db.ldif b/plexus-servers/ftpd/src/conf/ftp-db.ldif deleted file mode 100644 index c283dcc7c..000000000 --- a/plexus-servers/ftpd/src/conf/ftp-db.ldif +++ /dev/null @@ -1,51 +0,0 @@ -# ldapmodify -v -h localhost -p 389 -D "cn=Directory Manager" -w -f ftp-db.ldif - -# -# Add enable flag attribute type -# -dn: cn=schema -changetype: modify -add: attributetypes -attributetypes: ( enableflag-oid NAME 'enableflag' SYNTAX '1.3.6.1.4.1.1466.115.121.1.26' SINGLE-VALUE ) - -# -# Add write permission attribute type -# -dn: cn=schema -changetype: modify -add: attributetypes -attributetypes: ( writepermission-oid NAME 'writepermission' SYNTAX '1.3.6.1.4.1.1466.115.121.1.26' SINGLE-VALUE ) - -# -# Add idle time attribute type -# -dn: cn=schema -changetype: modify -add: attributetypes -attributetypes: ( idletime-oid NAME 'idletime' SYNTAX '1.3.6.1.4.1.1466.115.121.1.27' SINGLE-VALUE ) - -# -# Add upload rate attribute type -# -dn: cn=schema -changetype: modify -add: attributetypes -attributetypes: ( uploadrate-oid NAME 'uploadrate' SYNTAX '1.3.6.1.4.1.1466.115.121.1.27' SINGLE-VALUE ) - -# -# Add download rate attribute type -# -dn: cn=schema -changetype: modify -add: attributetypes -attributetypes: ( downloadrate-oid NAME 'downloadrate' SYNTAX '1.3.6.1.4.1.1466.115.121.1.27' SINGLE-VALUE ) - -# -# Add ftp users object class -# -dn: cn=schema -changetype: modify -add: objectclasses -objectclasses: ( ftpusers-oid NAME 'ftpUsers' DESC 'Ftp user class' SUP 'inetOrgPerson' MUST ( memberuid $ enableflag $ homedirectory $ writepermission $ idletime $ uploadrate $ downloadrate ) ) - - diff --git a/plexus-servers/ftpd/src/conf/ftp-db.sql b/plexus-servers/ftpd/src/conf/ftp-db.sql deleted file mode 100644 index 1114aff0b..000000000 --- a/plexus-servers/ftpd/src/conf/ftp-db.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE FTP_USER ( - LOGIN_ID VARCHAR(64) NOT NULL PRIMARY KEY, - PASSWORD VARCHAR(64), - HOME_DIR VARCHAR(128) NOT NULL, - ENABLED VARCHAR(8) NOT NULL, - WRITE_PERM VARCHAR(8) NOT NULL, - IDLE_TIME INT NOT NULL, - UPLOAD_RATE INT NOT NULL, - DOWNLOAD_RATE INT NOT NULL -) diff --git a/plexus-servers/ftpd/src/documentation/README.txt b/plexus-servers/ftpd/src/documentation/README.txt deleted file mode 100644 index 4545b58cb..000000000 --- a/plexus-servers/ftpd/src/documentation/README.txt +++ /dev/null @@ -1,10 +0,0 @@ -This is the base documentation directory. It usually contains two files: - -skinconf.xml # This file customizes Forrest for your project. In it, you - # tell forrest the project name, logo, copyright info, etc - -sitemap.xmap # Optional. This sitemap overrides the default one bundled - # with Forrest. Typically, one would copy a sitemap from - # xml-forrest/src/resources/conf/sitemap.xmap, and customize - # it. - diff --git a/plexus-servers/ftpd/src/documentation/content/xdocs/admin.xml b/plexus-servers/ftpd/src/documentation/content/xdocs/admin.xml deleted file mode 100644 index 9dbbc85e9..000000000 --- a/plexus-servers/ftpd/src/documentation/content/xdocs/admin.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - -
- FtpServer Remote Admin - Introduction - - - - - FtpServer documentation is under construction. Everything you - can find outside this page is to be considered obsolete. - -
- -
Overview -

- All the FTP server administrative tasks can be performed using remote admin - user interface. We can also use SITE command to do that. You can start the admin - console using java -jar ftp-admin.jar. -

-

- The admin UI uses RMI to connect to the server. It also displays the server - real-time data. -

-
-
Configuration Parameters - To be done. -
-
Screenshots - To be done. -
- -
diff --git a/plexus-servers/ftpd/src/documentation/content/xdocs/conf.xml b/plexus-servers/ftpd/src/documentation/content/xdocs/conf.xml deleted file mode 100644 index bf7e52061..000000000 --- a/plexus-servers/ftpd/src/documentation/content/xdocs/conf.xml +++ /dev/null @@ -1,201 +0,0 @@ - - - - -
- FtpServer Configuration - - - -
- -
Overview -

- The configuration file is ftp-config.xml. Each configurable component has a xml element - to configure that component. -

-
thread-manager -

- As we are using a single thread pool, we have only one default thread-group xml element. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDefault ValueDescription
nameN/Athread pool name (don't change)
priority5thread priority - normal priority = 5, max-priority = 10 (don't change)
is-daemonfalsedeamon thread or not (don't change)
max-threads10maximum number of threads
min-threads5minimum number of threads
min-spare-threadsmaxThreads - minThreadsminimum number of spare threads
-
-
sockets -

- It configures the socket factories (both server and client). So we have two xml elements - - one for server socket factory and another for client socket factory. Please don't change anything here. -

-
-
ftp-server -

- This is the ftp server configuration block. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDefault ValueDescription
ftp-host127.0.0.1server IP. This is required if we want multihome support.
ftp-port21server port
max-connection20maximum number of ftp client connections
anonymous-max-connection10maximum number of anonymous ftp client connections
anonymous-login-allowedtruedoes it allow anonymous connection
remote-admin-allowedtruedoes it allow RMI based remote administration
remote-admin-port1099port number to be used for remote administration
create-user-homefalsecreate user home if necessary (ie. user home does not exist)
poll-interval120interval in seconds to kick out idle users and reload user manager if necessary
default-idle-time300default idle timeout in seconds
default-user-root/default user root directory
-
-
objectstorage -

- This is used by the file based object repository. This object storage is used - by the object store based file manager. As the default file manager is the - properties file based user manager, this is not used normally. Please don't - change anything here. -

-
-
user-manager -

- This is used by the user manager component. Currently we have four user manager implementations. - All the user manager implementations are in org.apache.ftpserver.usermanager package. -

-
    -
  • - PropertiesUserManager - properties file - based user manager. This is the default user manager. -
  • -
  • - ObjStoreUserManager - object store based user manager. -
  • -
  • - DbUserManager - databased based user manager. - Please see "DB Support" for more details. -
  • -
  • - LdapUserManager - LDAP based user manager. - Please see "LDAP Support" for more details. -
  • -
- - - - - - - - - - - - - - - - -
NameDefault ValueDescription
ftp-admin-nameadminadmin user name
encryptfalsepassword encryption flag - used by the properties file based user manager. The algorithm is MD5.
-
-
ip-restrictor -

- IP restrictor allows/bans specified IPs. - IPs can be specified using a simplified regular expression (*?[^-]). -

- - - - - - - - - - - -
NameDefault ValueDescription
allow-ipfalse"false" value bans the ftp requests from the specified IPs
- and "true" value allows the ftp requests only from the specified Ips.
-
-
- -
diff --git a/plexus-servers/ftpd/src/documentation/content/xdocs/index.xml b/plexus-servers/ftpd/src/documentation/content/xdocs/index.xml deleted file mode 100644 index 3386f7812..000000000 --- a/plexus-servers/ftpd/src/documentation/content/xdocs/index.xml +++ /dev/null @@ -1,146 +0,0 @@ - - - - -
- Apache FtpServer - FTP server based on Apache Avalon - - - - - FtpServer documentation is under construction. Everything you - can find outside this page is to be considered obsolete. - -
- -
Overview -

- FtpServer is a server component for Avalon Phoenix that allows remote FTP client to - attach and download files. The client software can be any type of FTP client - written in any language. The criteria for eligibility is RFC compliance. -

-

- The server uses several components. Some of the components have multiple - implementations. For example user management has implementations that will use - LDAP, JDBC and Cornerstone's Store facility for storage. -

-

- The server has a management console (GUI) that can connect over RMI to the - server. -

-
-
Features -
    -
  1. 100% pure Java, free, open source resumable FTP server!!!
  2. -
  3. Multi platform support and multithreaded design.
  4. -
  5. User virtual directory, write permission, idle time-out and upload/download bandwidth limitation support.
  6. -
  7. You can monitor all the user activities.
  8. -
  9. Anonymous login support.
  10. -
  11. Both upload and download files are resumable.
  12. -
  13. Handles both ASCII and binary data transfers.
  14. -
  15. IP restriction support. You can use a limited set of regular expressions (*?[^-]) to specify the allowed/banned IPs.
  16. -
  17. The server reloads the user data at a regular interval if necessary.
  18. -
  19. Database and LDAP can be used to store user data.
  20. -
  21. Default users admin/admin and anonymous will be created by the server when you start it for the first time.
  22. -
  23. New user managers can be added very easily by adding new user manager.
  24. -
  25. Supports SITE commands. Use SITE HELP to get the available commands.
  26. -
-
-
Components -

- The ftp server consists of several components. The component - implementations and dependencies are declared in ftp-assembly.xml file. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescription
thread-managerManages a set of thread pools
socketsA service to manage the socket factories
connectionsThis is the service through which connection management occurs.
objectstorageManages object repository.
user-managerHandles all ftp server user management.
ip-restrictorIt allows/bans the specified IPs depending on the configuration.
ftp-serverThis is the ftp server starting point.
-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Name>Interfaces
thread-managerorg.apache.avalon.cornerstone.services.threads.ThreadManager
socketsorg.apache.avalon.cornerstone.services.sockets.SocketManager
connectionsorg.apache.avalon.cornerstone.services.connection.ConnectionManager
objectstorageorg.apache.avalon.cornerstone.services.store.Store
user-managerorg.apache.ftpserver.usermanager.UserManagerInterface
ip-restrictororg.apache.ftpserver.ip.IpRestrictorInterface
ftp-serverorg.apache.ftpserver.ip.FtpServerInterface
-

- - - - - - - - - - - - - - - - - -
NameDependency
connectionsthread-manager
user-managerobjectstorage (if we use object store based user manager)
ftp-serversockets, connections, ip-restrictor, user-manager
-

-

- -
diff --git a/plexus-servers/ftpd/src/documentation/content/xdocs/ip_restr.xml b/plexus-servers/ftpd/src/documentation/content/xdocs/ip_restr.xml deleted file mode 100644 index c1029cca1..000000000 --- a/plexus-servers/ftpd/src/documentation/content/xdocs/ip_restr.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - -
- IP Restriction - - - -
- -
Overview -

- You can either ban or allow IPs to access the FTP server. - You can use a limited set of regular expressions (*?[^-]) to specify the allowed/banned IPs. -

-

- The IP restrictor component name is ip-restrictor. - The configuration parameter - allow-ip specifies whether to allow/deny - IPs. IP informations are stored in ip.properties file. -

-
-
Examples -

If allow-ip value is false, the server bans all the specified IPs.

-
    -
  1. 123.234.111.* will ban all IPs from 123.234.111.0 to 123.234.111.255
  2. -
  3. 123.234.111.22? will ban all IPs from 123.234.111.220 to 123.234.111.229
  4. -
  5. 123.234.111.2[1-3]1 will ban 123.234.111.211, 123.234.111.221, 123.234.111.231
  6. -
  7. 123.234.111.2[^1-7]1 will ban 123.234.111.201, 123.234.111.281, 123.234.111.291
  8. -
-

Similarly, allow-ip=true will only allow the specified IPs.

-
- -
diff --git a/plexus-servers/ftpd/src/documentation/content/xdocs/jdbc_conf.xml b/plexus-servers/ftpd/src/documentation/content/xdocs/jdbc_conf.xml deleted file mode 100644 index be13c3132..000000000 --- a/plexus-servers/ftpd/src/documentation/content/xdocs/jdbc_conf.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - -
- Database Support - - - -
- -
Overview -

- DbUserManager is a JDBC based user manager. You would use this module if you have your - username, password and other informations in a JDBC accessible database. -

-

- This user manager has been tested using Oracle 8i and mySQL server. - All the user informations are stored in FTP_USER table. The SQL file is ftp-db.sql. -

- - - - - - - - - - - -
FTP_USER
NameDatatype
LOGIN_IDVARCHAR(64), Primary key
PASSWORDVARCHAR(64)
HOME_DIRVARCHAR(128)
ENABLEDVARCHAR(8)
WRITE_PERMVARCHAR(8)
IDLE_TIMEINT
UPLOAD_RATEINT
DOWNLOAD_RATEINT
-
-
Configurations -
ftp-assembly.xml -

- The first step is to make sure that we are using the right user manager implementation. - The fully qualified name of the LDAP based user manager is org.apache.ftpserver.DbUserManager. - So we have to use this class name in ftp-assembly.xml file. The user-manager block should be: -

- -<!-- user manager block --> -<block class="org.apache.ftpserver.usermanager.DbUserManager" name="user-manager"/> - -
-
ftp-config.xml -

- The next step is to use appropriate configuration parameters. So we have to modify ftp-config.xml file. - The sample block is for MySQL database. -

- -<!-- Database based user manager --> -<driver>org.gjt.mm.mysql.Driver</driver> -<url>jdbc:mysql://localhost/ftpDB</url> -<user>user</user> -<password>password</password> - -

- Configuration parameters : -

-
    -
  • driver : Fully qualified name of the JDBC driver to be used.
  • -
  • url : JDBC database URL.
  • -
  • user : Database user.
  • -
  • password : Database password.
  • -
-

- Besides these, you need to copy the driver jar file in the lib directory. -

-
-
- -
diff --git a/plexus-servers/ftpd/src/documentation/content/xdocs/ldap_conf.xml b/plexus-servers/ftpd/src/documentation/content/xdocs/ldap_conf.xml deleted file mode 100644 index ccab18ad1..000000000 --- a/plexus-servers/ftpd/src/documentation/content/xdocs/ldap_conf.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - -
- LDAP Support - - - -
- -
Overview -

- The LdapUserManager is an user manager implementation that authenticates against an - LDAP server using JNDI login using the ftp server configuration options. You would use - the LdapUserManager if your username and credential information are store in an LDAP - server that is accessible using a JNDI LDAP provider. -

-

- This user manager has been tested using Netscape Directory Server 4.1. - LDAP requires the password to be nonempty for simple authentication. - So instead of using empty string password (""), we will be using single space (" "). - The required LDAP attribute types: -

-
    -
  • memberuid
  • -
  • uid
  • -
  • cn
  • -
  • sn
  • -
  • userpassword
  • -
  • objectclass
  • -
  • enableflag (created by ftp-db.ldif file)
  • -
  • homedirectory
  • -
  • writepermission (created by ftp-db.ldif file)
  • -
  • idletime (created by ftp-db.ldif file)
  • -
  • uploadrate (created by ftp-db.ldif file)
  • -
  • downloadrate (created by ftp-db.ldif file)
  • -
-

- Some of the above mentioned attribute types are created by ftp-db.ldif schema file. - The schema file also creates an object class called ftpUsers derived from - inetOrgPerson and have all these attributes. Assumed LDAP objectclass hierarchy: -

- - top - | - person - | -organizationalPerson - | - inetOrgPerson - | - ftpUsers - -

- Load LDAP schema ftp-db.ldif to add user manager attributes. The commands to load the schema is -

- -ldapmodify -v -h localhost -p 389 -D "cn=Directory Manager" -w <password> -f ftp-db.ldif - -

- Please change host, port, user and password parameters. -

-
-
Configuration -
ftp-assembly.xml -

- The first step is to make sure that we are using the right user manager implementation. - The fully qualified name of the LDAP based user manager is org.apache.ftpserver.LdapUserManager. - So we have to use this class name in ftp-assembly.xml file. The user-manager block should be: -

- -<!-- user manager block --> -<block class="org.apache.ftpserver.usermanager.LdapUserManager" name="user-manager"/> - -
-
ftp-config.xml -

- The next step is to use appropriate configuration parameters. So we have to modify ftp-config.xml file. -

- -<!-- LDAP based user manager --> -<url>ldap://localhost:389</url> -<admin>cn=Directory Manager</admin> -<password>password</password> -<authentication>simple</authentication> -<root>ou=people,o=apache.org</root> -<prefix>uid=</prefix> -<suffix>,ou=people,o=apache.org</suffix> - -

- Configuration parameters : -

-
    -
  • url : The ldap URL for the LDAP server. - For example, ldap://localhost:389 URL means LDAP has been installed in the local machine and the port is 389.
  • -
  • admin : This is the distinguished name (DN) of the LDAP administrator.
  • -
  • password : LDAP administrator's password.
  • -
  • authentication : Security level to use. This defaults to "simple".
  • -
  • root : The LDAP root where the ftp users will be stored.
  • -
  • prefix : A prefix to add to the username to form the user distinguished name (DN). - See suffix for more info..
  • -
  • suffix : Suffix to add to the username when forming the user distiguished name (DN). - This is useful if you prompt a user for a username and you don't want the user to have to enter the - fully distinguished name. Using this property and prefix the userDN will be formed as String userDN = prefix + username + suffix;
  • -
-
-
- -
diff --git a/plexus-servers/ftpd/src/documentation/content/xdocs/rfc765.xml b/plexus-servers/ftpd/src/documentation/content/xdocs/rfc765.xml deleted file mode 100644 index fd49175b2..000000000 --- a/plexus-servers/ftpd/src/documentation/content/xdocs/rfc765.xml +++ /dev/null @@ -1,3906 +0,0 @@ - - - -
- RFC 765 - - - - -
- -
RFC 765 text - -| User | - |\----^----/| -------- - ---------- | | | - |/------\| FTP Commands |/----V----\| - ||Server|<---------------->| User || - || PI || FTP Replies || PI || - |\--^---/| |\----^----/| - | | | | | | - -------- |/--V---\| Data |/----V----\| -------- - | File |<--->|Server|<---------------->| User |<--->| File | - |System| || DTP || Connection || DTP || |System| - -------- |\------/| |\---------/| -------- - ---------- ------------- - - Server-FTP USER-FTP - - NOTES: 1. The data connection may be used in either direction. - 2. The data connection need not exist all of the time. - - Figure 1 Model for FTP Use - - In the model described in Figure 1, the user-protocol interpreter - initiates the control connection. The control connection follows - the Telnet protocol. At the initiation of the user, standard FTP - commands are generated by the user-PI and transmitted to the - server process via the control connection. (The user may - establish a direct control connection to the server-FTP, from a - TAC terminal for example, and generate standard FTP commands - independently, bypassing the user-FTP process.) Standard replies - are sent from the server-PI to the user-PI over the control - connection in response to the commands. - - The FTP commands specify the parameters for the data connection - (data port, transfer mode, representation type, and structure) and - the nature of file system operation (store, retrieve, append, - delete, etc.). The user-DTP or its designate should "listen" on - the specified data port, and the server initiate the data - connection and data transfer in accordance with the specified - parameters. It should be noted that the data port need not be in - - -Postel & Reynolds [Page 8] - - - -RFC 959 October 1985 -File Transfer Protocol - - - the same host that initiates the FTP commands via the control - connection, but the user or the user-FTP process must ensure a - "listen" on the specified data port. It ought to also be noted - that the data connection may be used for simultaneous sending and - receiving. - - In another situation a user might wish to transfer files between - two hosts, neither of which is a local host. The user sets up - control connections to the two servers and then arranges for a - data connection between them. In this manner, control information - is passed to the user-PI but data is transferred between the - server data transfer processes. Following is a model of this - server-server interaction. - - - Control ------------ Control - ---------->| User-FTP |<----------- - | | User-PI | | - | | "C" | | - V ------------ V - -------------- -------------- - | Server-FTP | Data Connection | Server-FTP | - | "A" |<---------------------->| "B" | - -------------- Port (A) Port (B) -------------- - - - Figure 2 - - The protocol requires that the control connections be open while - data transfer is in progress. It is the responsibility of the - user to request the closing of the control connections when - finished using the FTP service, while it is the server who takes - the action. The server may abort data transfer if the control - connections are closed without command. - - The Relationship between FTP and Telnet: - - The FTP uses the Telnet protocol on the control connection. - This can be achieved in two ways: first, the user-PI or the - server-PI may implement the rules of the Telnet Protocol - directly in their own procedures; or, second, the user-PI or - the server-PI may make use of the existing Telnet module in the - system. - - Ease of implementaion, sharing code, and modular programming - argue for the second approach. Efficiency and independence - - - -Postel & Reynolds [Page 9] - - - -RFC 959 October 1985 -File Transfer Protocol - - - argue for the first approach. In practice, FTP relies on very - little of the Telnet Protocol, so the first approach does not - necessarily involve a large amount of code. - -3. DATA TRANSFER FUNCTIONS - - Files are transferred only via the data connection. The control - connection is used for the transfer of commands, which describe the - functions to be performed, and the replies to these commands (see the - Section on FTP Replies). Several commands are concerned with the - transfer of data between hosts. These data transfer commands include - the MODE command which specify how the bits of the data are to be - transmitted, and the STRUcture and TYPE commands, which are used to - define the way in which the data are to be represented. The - transmission and representation are basically independent but the - "Stream" transmission mode is dependent on the file structure - attribute and if "Compressed" transmission mode is used, the nature - of the filler byte depends on the representation type. - - 3.1. DATA REPRESENTATION AND STORAGE - - Data is transferred from a storage device in the sending host to a - storage device in the receiving host. Often it is necessary to - perform certain transformations on the data because data storage - representations in the two systems are different. For example, - NVT-ASCII has different data storage representations in different - systems. DEC TOPS-20s's generally store NVT-ASCII as five 7-bit - ASCII characters, left-justified in a 36-bit word. IBM Mainframe's - store NVT-ASCII as 8-bit EBCDIC codes. Multics stores NVT-ASCII - as four 9-bit characters in a 36-bit word. It is desirable to - convert characters into the standard NVT-ASCII representation when - transmitting text between dissimilar systems. The sending and - receiving sites would have to perform the necessary - transformations between the standard representation and their - internal representations. - - A different problem in representation arises when transmitting - binary data (not character codes) between host systems with - different word lengths. It is not always clear how the sender - should send data, and the receiver store it. For example, when - transmitting 32-bit bytes from a 32-bit word-length system to a - 36-bit word-length system, it may be desirable (for reasons of - efficiency and usefulness) to store the 32-bit bytes - right-justified in a 36-bit word in the latter system. In any - case, the user should have the option of specifying data - representation and transformation functions. It should be noted - - - -Postel & Reynolds [Page 10] - - - -RFC 959 October 1985 -File Transfer Protocol - - - that FTP provides for very limited data type representations. - Transformations desired beyond this limited capability should be - performed by the user directly. - - 3.1.1. DATA TYPES - - Data representations are handled in FTP by a user specifying a - representation type. This type may implicitly (as in ASCII or - EBCDIC) or explicitly (as in Local byte) define a byte size for - interpretation which is referred to as the "logical byte size." - Note that this has nothing to do with the byte size used for - transmission over the data connection, called the "transfer - byte size", and the two should not be confused. For example, - NVT-ASCII has a logical byte size of 8 bits. If the type is - Local byte, then the TYPE command has an obligatory second - parameter specifying the logical byte size. The transfer byte - size is always 8 bits. - - 3.1.1.1. ASCII TYPE - - This is the default type and must be accepted by all FTP - implementations. It is intended primarily for the transfer - of text files, except when both hosts would find the EBCDIC - type more convenient. - - The sender converts the data from an internal character - representation to the standard 8-bit NVT-ASCII - representation (see the Telnet specification). The receiver - will convert the data from the standard form to his own - internal form. - - In accordance with the NVT standard, the sequence - should be used where necessary to denote the end of a line - of text. (See the discussion of file structure at the end - of the Section on Data Representation and Storage.) - - Using the standard NVT-ASCII representation means that data - must be interpreted as 8-bit bytes. - - The Format parameter for ASCII and EBCDIC types is discussed - below. - - - - - - - - -Postel & Reynolds [Page 11] - - - -RFC 959 October 1985 -File Transfer Protocol - - - 3.1.1.2. EBCDIC TYPE - - This type is intended for efficient transfer between hosts - which use EBCDIC for their internal character - representation. - - For transmission, the data are represented as 8-bit EBCDIC - characters. The character code is the only difference - between the functional specifications of EBCDIC and ASCII - types. - - End-of-line (as opposed to end-of-record--see the discussion - of structure) will probably be rarely used with EBCDIC type - for purposes of denoting structure, but where it is - necessary the character should be used. - - 3.1.1.3. IMAGE TYPE - - The data are sent as contiguous bits which, for transfer, - are packed into the 8-bit transfer bytes. The receiving - site must store the data as contiguous bits. The structure - of the storage system might necessitate the padding of the - file (or of each record, for a record-structured file) to - some convenient boundary (byte, word or block). This - padding, which must be all zeros, may occur only at the end - of the file (or at the end of each record) and there must be - a way of identifying the padding bits so that they may be - stripped off if the file is retrieved. The padding - transformation should be well publicized to enable a user to - process a file at the storage site. - - Image type is intended for the efficient storage and - retrieval of files and for the transfer of binary data. It - is recommended that this type be accepted by all FTP - implementations. - - 3.1.1.4. LOCAL TYPE - - The data is transferred in logical bytes of the size - specified by the obligatory second parameter, Byte size. - The value of Byte size must be a decimal integer; there is - no default value. The logical byte size is not necessarily - the same as the transfer byte size. If there is a - difference in byte sizes, then the logical bytes should be - packed contiguously, disregarding transfer byte boundaries - and with any necessary padding at the end. - - - -Postel & Reynolds [Page 12] - - - -RFC 959 October 1985 -File Transfer Protocol - - - When the data reaches the receiving host, it will be - transformed in a manner dependent on the logical byte size - and the particular host. This transformation must be - invertible (i.e., an identical file can be retrieved if the - same parameters are used) and should be well publicized by - the FTP implementors. - - For example, a user sending 36-bit floating-point numbers to - a host with a 32-bit word could send that data as Local byte - with a logical byte size of 36. The receiving host would - then be expected to store the logical bytes so that they - could be easily manipulated; in this example putting the - 36-bit logical bytes into 64-bit double words should - suffice. - - In another example, a pair of hosts with a 36-bit word size - may send data to one another in words by using TYPE L 36. - The data would be sent in the 8-bit transmission bytes - packed so that 9 transmission bytes carried two host words. - - 3.1.1.5. FORMAT CONTROL - - The types ASCII and EBCDIC also take a second (optional) - parameter; this is to indicate what kind of vertical format - control, if any, is associated with a file. The following - data representation types are defined in FTP: - - A character file may be transferred to a host for one of - three purposes: for printing, for storage and later - retrieval, or for processing. If a file is sent for - printing, the receiving host must know how the vertical - format control is represented. In the second case, it must - be possible to store a file at a host and then retrieve it - later in exactly the same form. Finally, it should be - possible to move a file from one host to another and process - the file at the second host without undue trouble. A single - ASCII or EBCDIC format does not satisfy all these - conditions. Therefore, these types have a second parameter - specifying one of the following three formats: - - 3.1.1.5.1. NON PRINT - - This is the default format to be used if the second - (format) parameter is omitted. Non-print format must be - accepted by all FTP implementations. - - - - -Postel & Reynolds [Page 13] - - - -RFC 959 October 1985 -File Transfer Protocol - - - The file need contain no vertical format information. If - it is passed to a printer process, this process may - assume standard values for spacing and margins. - - Normally, this format will be used with files destined - for processing or just storage. - - 3.1.1.5.2. TELNET FORMAT CONTROLS - - The file contains ASCII/EBCDIC vertical format controls - (i.e., , , , , ) which the printer - process will interpret appropriately. , in exactly - this sequence, also denotes end-of-line. - - 3.1.1.5.2. CARRIAGE CONTROL (ASA) - - The file contains ASA (FORTRAN) vertical format control - characters. (See RFC 740 Appendix C; and Communications - of the ACM, Vol. 7, No. 10, p. 606, October 1964.) In a - line or a record formatted according to the ASA Standard, - the first character is not to be printed. Instead, it - should be used to determine the vertical movement of the - paper which should take place before the rest of the - record is printed. - - The ASA Standard specifies the following control - characters: - - Character Vertical Spacing - - blank Move paper up one line - 0 Move paper up two lines - 1 Move paper to top of next page - + No movement, i.e., overprint - - Clearly there must be some way for a printer process to - distinguish the end of the structural entity. If a file - has record structure (see below) this is no problem; - records will be explicitly marked during transfer and - storage. If the file has no record structure, the - end-of-line sequence is used to separate printing lines, - but these format effectors are overridden by the ASA - controls. - - - - - - -Postel & Reynolds [Page 14] - - - -RFC 959 October 1985 -File Transfer Protocol - - - 3.1.2. DATA STRUCTURES - - In addition to different representation types, FTP allows the - structure of a file to be specified. Three file structures are - defined in FTP: - - file-structure, where there is no internal structure and - the file is considered to be a - continuous sequence of data bytes, - - record-structure, where the file is made up of sequential - records, - - and page-structure, where the file is made up of independent - indexed pages. - - File-structure is the default to be assumed if the STRUcture - command has not been used but both file and record structures - must be accepted for "text" files (i.e., files with TYPE ASCII - or EBCDIC) by all FTP implementations. The structure of a file - will affect both the transfer mode of a file (see the Section - on Transmission Modes) and the interpretation and storage of - the file. - - The "natural" structure of a file will depend on which host - stores the file. A source-code file will usually be stored on - an IBM Mainframe in fixed length records but on a DEC TOPS-20 - as a stream of characters partitioned into lines, for example - by . If the transfer of files between such disparate - sites is to be useful, there must be some way for one site to - recognize the other's assumptions about the file. - - With some sites being naturally file-oriented and others - naturally record-oriented there may be problems if a file with - one structure is sent to a host oriented to the other. If a - text file is sent with record-structure to a host which is file - oriented, then that host should apply an internal - transformation to the file based on the record structure. - Obviously, this transformation should be useful, but it must - also be invertible so that an identical file may be retrieved - using record structure. - - In the case of a file being sent with file-structure to a - record-oriented host, there exists the question of what - criteria the host should use to divide the file into records - which can be processed locally. If this division is necessary, - the FTP implementation should use the end-of-line sequence, - - -Postel & Reynolds [Page 15] - - - -RFC 959 October 1985 -File Transfer Protocol - - - for ASCII, or for EBCDIC text files, as the - delimiter. If an FTP implementation adopts this technique, it - must be prepared to reverse the transformation if the file is - retrieved with file-structure. - - 3.1.2.1. FILE STRUCTURE - - File structure is the default to be assumed if the STRUcture - command has not been used. - - In file-structure there is no internal structure and the - file is considered to be a continuous sequence of data - bytes. - - 3.1.2.2. RECORD STRUCTURE - - Record structures must be accepted for "text" files (i.e., - files with TYPE ASCII or EBCDIC) by all FTP implementations. - - In record-structure the file is made up of sequential - records. - - 3.1.2.3. PAGE STRUCTURE - - To transmit files that are discontinuous, FTP defines a page - structure. Files of this type are sometimes known as - "random access files" or even as "holey files". In these - files there is sometimes other information associated with - the file as a whole (e.g., a file descriptor), or with a - section of the file (e.g., page access controls), or both. - In FTP, the sections of the file are called pages. - - To provide for various page sizes and associated - information, each page is sent with a page header. The page - header has the following defined fields: - - Header Length - - The number of logical bytes in the page header - including this byte. The minimum header length is 4. - - Page Index - - The logical page number of this section of the file. - This is not the transmission sequence number of this - page, but the index used to identify this page of the - file. - - -Postel & Reynolds [Page 16] - - - -RFC 959 October 1985 -File Transfer Protocol - - - Data Length - - The number of logical bytes in the page data. The - minimum data length is 0. - - Page Type - - The type of page this is. The following page types - are defined: - - 0 = Last Page - - This is used to indicate the end of a paged - structured transmission. The header length must - be 4, and the data length must be 0. - - 1 = Simple Page - - This is the normal type for simple paged files - with no page level associated control - information. The header length must be 4. - - 2 = Descriptor Page - - This type is used to transmit the descriptive - information for the file as a whole. - - 3 = Access Controlled Page - - This type includes an additional header field - for paged files with page level access control - information. The header length must be 5. - - Optional Fields - - Further header fields may be used to supply per page - control information, for example, per page access - control. - - All fields are one logical byte in length. The logical byte - size is specified by the TYPE command. See Appendix I for - further details and a specific case at the page structure. - - A note of caution about parameters: a file must be stored and - retrieved with the same parameters if the retrieved version is to - - - - -Postel & Reynolds [Page 17] - - - -RFC 959 October 1985 -File Transfer Protocol - - - be identical to the version originally transmitted. Conversely, - FTP implementations must return a file identical to the original - if the parameters used to store and retrieve a file are the same. - - 3.2. ESTABLISHING DATA CONNECTIONS - - The mechanics of transferring data consists of setting up the data - connection to the appropriate ports and choosing the parameters - for transfer. Both the user and the server-DTPs have a default - data port. The user-process default data port is the same as the - control connection port (i.e., U). The server-process default - data port is the port adjacent to the control connection port - (i.e., L-1). - - The transfer byte size is 8-bit bytes. This byte size is relevant - only for the actual transfer of the data; it has no bearing on - representation of the data within a host's file system. - - The passive data transfer process (this may be a user-DTP or a - second server-DTP) shall "listen" on the data port prior to - sending a transfer request command. The FTP request command - determines the direction of the data transfer. The server, upon - receiving the transfer request, will initiate the data connection - to the port. When the connection is established, the data - transfer begins between DTP's, and the server-PI sends a - confirming reply to the user-PI. - - Every FTP implementation must support the use of the default data - ports, and only the USER-PI can initiate a change to non-default - ports. - - It is possible for the user to specify an alternate data port by - use of the PORT command. The user may want a file dumped on a TAC - line printer or retrieved from a third party host. In the latter - case, the user-PI sets up control connections with both - server-PI's. One server is then told (by an FTP command) to - "listen" for a connection which the other will initiate. The - user-PI sends one server-PI a PORT command indicating the data - port of the other. Finally, both are sent the appropriate - transfer commands. The exact sequence of commands and replies - sent between the user-controller and the servers is defined in the - Section on FTP Replies. - - In general, it is the server's responsibility to maintain the data - connection--to initiate it and to close it. The exception to this - - - - -Postel & Reynolds [Page 18] - - - -RFC 959 October 1985 -File Transfer Protocol - - - is when the user-DTP is sending the data in a transfer mode that - requires the connection to be closed to indicate EOF. The server - MUST close the data connection under the following conditions: - - 1. The server has completed sending data in a transfer mode - that requires a close to indicate EOF. - - 2. The server receives an ABORT command from the user. - - 3. The port specification is changed by a command from the - user. - - 4. The control connection is closed legally or otherwise. - - 5. An irrecoverable error condition occurs. - - Otherwise the close is a server option, the exercise of which the - server must indicate to the user-process by either a 250 or 226 - reply only. - - 3.3. DATA CONNECTION MANAGEMENT - - Default Data Connection Ports: All FTP implementations must - support use of the default data connection ports, and only the - User-PI may initiate the use of non-default ports. - - Negotiating Non-Default Data Ports: The User-PI may specify a - non-default user side data port with the PORT command. The - User-PI may request the server side to identify a non-default - server side data port with the PASV command. Since a connection - is defined by the pair of addresses, either of these actions is - enough to get a different data connection, still it is permitted - to do both commands to use new ports on both ends of the data - connection. - - Reuse of the Data Connection: When using the stream mode of data - transfer the end of the file must be indicated by closing the - connection. This causes a problem if multiple files are to be - transfered in the session, due to need for TCP to hold the - connection record for a time out period to guarantee the reliable - communication. Thus the connection can not be reopened at once. - - There are two solutions to this problem. The first is to - negotiate a non-default port. The second is to use another - transfer mode. - - A comment on transfer modes. The stream transfer mode is - - -Postel & Reynolds [Page 19] - - - -RFC 959 October 1985 -File Transfer Protocol - - - inherently unreliable, since one can not determine if the - connection closed prematurely or not. The other transfer modes - (Block, Compressed) do not close the connection to indicate the - end of file. They have enough FTP encoding that the data - connection can be parsed to determine the end of the file. - Thus using these modes one can leave the data connection open - for multiple file transfers. - - 3.4. TRANSMISSION MODES - - The next consideration in transferring data is choosing the - appropriate transmission mode. There are three modes: one which - formats the data and allows for restart procedures; one which also - compresses the data for efficient transfer; and one which passes - the data with little or no processing. In this last case the mode - interacts with the structure attribute to determine the type of - processing. In the compressed mode, the representation type - determines the filler byte. - - All data transfers must be completed with an end-of-file (EOF) - which may be explicitly stated or implied by the closing of the - data connection. For files with record structure, all the - end-of-record markers (EOR) are explicit, including the final one. - For files transmitted in page structure a "last-page" page type is - used. - - NOTE: In the rest of this section, byte means "transfer byte" - except where explicitly stated otherwise. - - For the purpose of standardized transfer, the sending host will - translate its internal end of line or end of record denotation - into the representation prescribed by the transfer mode and file - structure, and the receiving host will perform the inverse - translation to its internal denotation. An IBM Mainframe record - count field may not be recognized at another host, so the - end-of-record information may be transferred as a two byte control - code in Stream mode or as a flagged bit in a Block or Compressed - mode descriptor. End-of-line in an ASCII or EBCDIC file with no - record structure should be indicated by or , - respectively. Since these transformations imply extra work for - some systems, identical systems transferring non-record structured - text files might wish to use a binary representation and stream - mode for the transfer. - - - - - - -Postel & Reynolds [Page 20] - - - -RFC 959 October 1985 -File Transfer Protocol - - - The following transmission modes are defined in FTP: - - 3.4.1. STREAM MODE - - The data is transmitted as a stream of bytes. There is no - restriction on the representation type used; record structures - are allowed. - - In a record structured file EOR and EOF will each be indicated - by a two-byte control code. The first byte of the control code - will be all ones, the escape character. The second byte will - have the low order bit on and zeros elsewhere for EOR and the - second low order bit on for EOF; that is, the byte will have - value 1 for EOR and value 2 for EOF. EOR and EOF may be - indicated together on the last byte transmitted by turning both - low order bits on (i.e., the value 3). If a byte of all ones - was intended to be sent as data, it should be repeated in the - second byte of the control code. - - If the structure is a file structure, the EOF is indicated by - the sending host closing the data connection and all bytes are - data bytes. - - 3.4.2. BLOCK MODE - - The file is transmitted as a series of data blocks preceded by - one or more header bytes. The header bytes contain a count - field, and descriptor code. The count field indicates the - total length of the data block in bytes, thus marking the - beginning of the next data block (there are no filler bits). - The descriptor code defines: last block in the file (EOF) last - block in the record (EOR), restart marker (see the Section on - Error Recovery and Restart) or suspect data (i.e., the data - being transferred is suspected of errors and is not reliable). - This last code is NOT intended for error control within FTP. - It is motivated by the desire of sites exchanging certain types - of data (e.g., seismic or weather data) to send and receive all - the data despite local errors (such as "magnetic tape read - errors"), but to indicate in the transmission that certain - portions are suspect). Record structures are allowed in this - mode, and any representation type may be used. - - The header consists of the three bytes. Of the 24 bits of - header information, the 16 low order bits shall represent byte - count, and the 8 high order bits shall represent descriptor - codes as shown below. - - - -Postel & Reynolds [Page 21] - - - -RFC 959 October 1985 -File Transfer Protocol - - - Block Header - - +----------------+----------------+----------------+ - | Descriptor | Byte Count | - | 8 bits | 16 bits | - +----------------+----------------+----------------+ - - - The descriptor codes are indicated by bit flags in the - descriptor byte. Four codes have been assigned, where each - code number is the decimal value of the corresponding bit in - the byte. - - Code Meaning - - 128 End of data block is EOR - 64 End of data block is EOF - 32 Suspected errors in data block - 16 Data block is a restart marker - - With this encoding, more than one descriptor coded condition - may exist for a particular block. As many bits as necessary - may be flagged. - - The restart marker is embedded in the data stream as an - integral number of 8-bit bytes representing printable - characters in the language being used over the control - connection (e.g., default--NVT-ASCII). (Space, in the - appropriate language) must not be used WITHIN a restart marker. - - For example, to transmit a six-character marker, the following - would be sent: - - +--------+--------+--------+ - |Descrptr| Byte count | - |code= 16| = 6 | - +--------+--------+--------+ - - +--------+--------+--------+ - | Marker | Marker | Marker | - | 8 bits | 8 bits | 8 bits | - +--------+--------+--------+ - - +--------+--------+--------+ - | Marker | Marker | Marker | - | 8 bits | 8 bits | 8 bits | - +--------+--------+--------+ - - -Postel & Reynolds [Page 22] - - - -RFC 959 October 1985 -File Transfer Protocol - - - 3.4.3. COMPRESSED MODE - - There are three kinds of information to be sent: regular data, - sent in a byte string; compressed data, consisting of - replications or filler; and control information, sent in a - two-byte escape sequence. If n>0 bytes (up to 127) of regular - data are sent, these n bytes are preceded by a byte with the - left-most bit set to 0 and the right-most 7 bits containing the - number n. - - Byte string: - - 1 7 8 8 - +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ - |0| n | | d(1) | ... | d(n) | - +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ - ^ ^ - |---n bytes---| - of data - - String of n data bytes d(1),..., d(n) - Count n must be positive. - - To compress a string of n replications of the data byte d, the - following 2 bytes are sent: - - Replicated Byte: - - 2 6 8 - +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ - |1 0| n | | d | - +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ - - A string of n filler bytes can be compressed into a single - byte, where the filler byte varies with the representation - type. If the type is ASCII or EBCDIC the filler byte is - (Space, ASCII code 32, EBCDIC code 64). If the type is Image - or Local byte the filler is a zero byte. - - Filler String: - - 2 6 - +-+-+-+-+-+-+-+-+ - |1 1| n | - +-+-+-+-+-+-+-+-+ - - The escape sequence is a double byte, the first of which is the - - -Postel & Reynolds [Page 23] - - - -RFC 959 October 1985 -File Transfer Protocol - - - escape byte (all zeros) and the second of which contains - descriptor codes as defined in Block mode. The descriptor - codes have the same meaning as in Block mode and apply to the - succeeding string of bytes. - - Compressed mode is useful for obtaining increased bandwidth on - very large network transmissions at a little extra CPU cost. - It can be most effectively used to reduce the size of printer - files such as those generated by RJE hosts. - - 3.5. ERROR RECOVERY AND RESTART - - There is no provision for detecting bits lost or scrambled in data - transfer; this level of error control is handled by the TCP. - However, a restart procedure is provided to protect users from - gross system failures (including failures of a host, an - FTP-process, or the underlying network). - - The restart procedure is defined only for the block and compressed - modes of data transfer. It requires the sender of data to insert - a special marker code in the data stream with some marker - information. The marker information has meaning only to the - sender, but must consist of printable characters in the default or - negotiated language of the control connection (ASCII or EBCDIC). - The marker could represent a bit-count, a record-count, or any - other information by which a system may identify a data - checkpoint. The receiver of data, if it implements the restart - procedure, would then mark the corresponding position of this - marker in the receiving system, and return this information to the - user. - - In the event of a system failure, the user can restart the data - transfer by identifying the marker point with the FTP restart - procedure. The following example illustrates the use of the - restart procedure. - - The sender of the data inserts an appropriate marker block in the - data stream at a convenient point. The receiving host marks the - corresponding data point in its file system and conveys the last - known sender and receiver marker information to the user, either - directly or over the control connection in a 110 reply (depending - on who is the sender). In the event of a system failure, the user - or controller process restarts the server at the last server - marker by sending a restart command with server's marker code as - its argument. The restart command is transmitted over the control - - - - -Postel & Reynolds [Page 24] - - - -RFC 959 October 1985 -File Transfer Protocol - - - connection and is immediately followed by the command (such as - RETR, STOR or LIST) which was being executed when the system - failure occurred. - -4. FILE TRANSFER FUNCTIONS - - The communication channel from the user-PI to the server-PI is - established as a TCP connection from the user to the standard server - port. The user protocol interpreter is responsible for sending FTP - commands and interpreting the replies received; the server-PI - interprets commands, sends replies and directs its DTP to set up the - data connection and transfer the data. If the second party to the - data transfer (the passive transfer process) is the user-DTP, then it - is governed through the internal protocol of the user-FTP host; if it - is a second server-DTP, then it is governed by its PI on command from - the user-PI. The FTP replies are discussed in the next section. In - the description of a few of the commands in this section, it is - helpful to be explicit about the possible replies. - - 4.1. FTP COMMANDS - - 4.1.1. ACCESS CONTROL COMMANDS - - The following commands specify access control identifiers - (command codes are shown in parentheses). - - USER NAME (USER) - - The argument field is a Telnet string identifying the user. - The user identification is that which is required by the - server for access to its file system. This command will - normally be the first command transmitted by the user after - the control connections are made (some servers may require - this). Additional identification information in the form of - a password and/or an account command may also be required by - some servers. Servers may allow a new USER command to be - entered at any point in order to change the access control - and/or accounting information. This has the effect of - flushing any user, password, and account information already - supplied and beginning the login sequence again. All - transfer parameters are unchanged and any file transfer in - progress is completed under the old access control - parameters. - - - - - - -Postel & Reynolds [Page 25] - - - -RFC 959 October 1985 -File Transfer Protocol - - - PASSWORD (PASS) - - The argument field is a Telnet string specifying the user's - password. This command must be immediately preceded by the - user name command, and, for some sites, completes the user's - identification for access control. Since password - information is quite sensitive, it is desirable in general - to "mask" it or suppress typeout. It appears that the - server has no foolproof way to achieve this. It is - therefore the responsibility of the user-FTP process to hide - the sensitive password information. - - ACCOUNT (ACCT) - - The argument field is a Telnet string identifying the user's - account. The command is not necessarily related to the USER - command, as some sites may require an account for login and - others only for specific access, such as storing files. In - the latter case the command may arrive at any time. - - There are reply codes to differentiate these cases for the - automation: when account information is required for login, - the response to a successful PASSword command is reply code - 332. On the other hand, if account information is NOT - required for login, the reply to a successful PASSword - command is 230; and if the account information is needed for - a command issued later in the dialogue, the server should - return a 332 or 532 reply depending on whether it stores - (pending receipt of the ACCounT command) or discards the - command, respectively. - - CHANGE WORKING DIRECTORY (CWD) - - This command allows the user to work with a different - directory or dataset for file storage or retrieval without - altering his login or accounting information. Transfer - parameters are similarly unchanged. The argument is a - pathname specifying a directory or other system dependent - file group designator. - - CHANGE TO PARENT DIRECTORY (CDUP) - - This command is a special case of CWD, and is included to - simplify the implementation of programs for transferring - directory trees between operating systems having different - - - - -Postel & Reynolds [Page 26] - - - -RFC 959 October 1985 -File Transfer Protocol - - - syntaxes for naming the parent directory. The reply codes - shall be identical to the reply codes of CWD. See - Appendix II for further details. - - STRUCTURE MOUNT (SMNT) - - This command allows the user to mount a different file - system data structure without altering his login or - accounting information. Transfer parameters are similarly - unchanged. The argument is a pathname specifying a - directory or other system dependent file group designator. - - REINITIALIZE (REIN) - - This command terminates a USER, flushing all I/O and account - information, except to allow any transfer in progress to be - completed. All parameters are reset to the default settings - and the control connection is left open. This is identical - to the state in which a user finds himself immediately after - the control connection is opened. A USER command may be - expected to follow. - - LOGOUT (QUIT) - - This command terminates a USER and if file transfer is not - in progress, the server closes the control connection. If - file transfer is in progress, the connection will remain - open for result response and the server will then close it. - If the user-process is transferring files for several USERs - but does not wish to close and then reopen connections for - each, then the REIN command should be used instead of QUIT. - - An unexpected close on the control connection will cause the - server to take the effective action of an abort (ABOR) and a - logout (QUIT). - - 4.1.2. TRANSFER PARAMETER COMMANDS - - All data transfer parameters have default values, and the - commands specifying data transfer parameters are required only - if the default parameter values are to be changed. The default - value is the last specified value, or if no value has been - specified, the standard default value is as stated here. This - implies that the server must "remember" the applicable default - values. The commands may be in any order except that they must - precede the FTP service request. The following commands - specify data transfer parameters: - - -Postel & Reynolds [Page 27] - - - -RFC 959 October 1985 -File Transfer Protocol - - - DATA PORT (PORT) - - The argument is a HOST-PORT specification for the data port - to be used in data connection. There are defaults for both - the user and server data ports, and under normal - circumstances this command and its reply are not needed. If - this command is used, the argument is the concatenation of a - 32-bit internet host address and a 16-bit TCP port address. - This address information is broken into 8-bit fields and the - value of each field is transmitted as a decimal number (in - character string representation). The fields are separated - by commas. A port command would be: - - PORT h1,h2,h3,h4,p1,p2 - - where h1 is the high order 8 bits of the internet host - address. - - PASSIVE (PASV) - - This command requests the server-DTP to "listen" on a data - port (which is not its default data port) and to wait for a - connection rather than initiate one upon receipt of a - transfer command. The response to this command includes the - host and port address this server is listening on. - - REPRESENTATION TYPE (TYPE) - - The argument specifies the representation type as described - in the Section on Data Representation and Storage. Several - types take a second parameter. The first parameter is - denoted by a single Telnet character, as is the second - Format parameter for ASCII and EBCDIC; the second parameter - for local byte is a decimal integer to indicate Bytesize. - The parameters are separated by a (Space, ASCII code - 32). - - The following codes are assigned for type: - - \ / - A - ASCII | | N - Non-print - |-><-| T - Telnet format effectors - E - EBCDIC| | C - Carriage Control (ASA) - / \ - I - Image - - L - Local byte Byte size - - -Postel & Reynolds [Page 28] - - - -RFC 959 October 1985 -File Transfer Protocol - - - The default representation type is ASCII Non-print. If the - Format parameter is changed, and later just the first - argument is changed, Format then returns to the Non-print - default. - - FILE STRUCTURE (STRU) - - The argument is a single Telnet character code specifying - file structure described in the Section on Data - Representation and Storage. - - The following codes are assigned for structure: - - F - File (no record structure) - R - Record structure - P - Page structure - - The default structure is File. - - TRANSFER MODE (MODE) - - The argument is a single Telnet character code specifying - the data transfer modes described in the Section on - Transmission Modes. - - The following codes are assigned for transfer modes: - - S - Stream - B - Block - C - Compressed - - The default transfer mode is Stream. - - 4.1.3. FTP SERVICE COMMANDS - - The FTP service commands define the file transfer or the file - system function requested by the user. The argument of an FTP - service command will normally be a pathname. The syntax of - pathnames must conform to server site conventions (with - standard defaults applicable), and the language conventions of - the control connection. The suggested default handling is to - use the last specified device, directory or file name, or the - standard default defined for local users. The commands may be - in any order except that a "rename from" command must be - followed by a "rename to" command and the restart command must - be followed by the interrupted service command (e.g., STOR or - RETR). The data, when transferred in response to FTP service - - -Postel & Reynolds [Page 29] - - - -RFC 959 October 1985 -File Transfer Protocol - - - commands, shall always be sent over the data connection, except - for certain informative replies. The following commands - specify FTP service requests: - - RETRIEVE (RETR) - - This command causes the server-DTP to transfer a copy of the - file, specified in the pathname, to the server- or user-DTP - at the other end of the data connection. The status and - contents of the file at the server site shall be unaffected. - - STORE (STOR) - - This command causes the server-DTP to accept the data - transferred via the data connection and to store the data as - a file at the server site. If the file specified in the - pathname exists at the server site, then its contents shall - be replaced by the data being transferred. A new file is - created at the server site if the file specified in the - pathname does not already exist. - - STORE UNIQUE (STOU) - - This command behaves like STOR except that the resultant - file is to be created in the current directory under a name - unique to that directory. The 250 Transfer Started response - must include the name generated. - - APPEND (with create) (APPE) - - This command causes the server-DTP to accept the data - transferred via the data connection and to store the data in - a file at the server site. If the file specified in the - pathname exists at the server site, then the data shall be - appended to that file; otherwise the file specified in the - pathname shall be created at the server site. - - ALLOCATE (ALLO) - - This command may be required by some servers to reserve - sufficient storage to accommodate the new file to be - transferred. The argument shall be a decimal integer - representing the number of bytes (using the logical byte - size) of storage to be reserved for the file. For files - sent with record or page structure a maximum record or page - size (in logical bytes) might also be necessary; this is - indicated by a decimal integer in a second argument field of - - -Postel & Reynolds [Page 30] - - - -RFC 959 October 1985 -File Transfer Protocol - - - the command. This second argument is optional, but when - present should be separated from the first by the three - Telnet characters R . This command shall be - followed by a STORe or APPEnd command. The ALLO command - should be treated as a NOOP (no operation) by those servers - which do not require that the maximum size of the file be - declared beforehand, and those servers interested in only - the maximum record or page size should accept a dummy value - in the first argument and ignore it. - - RESTART (REST) - - The argument field represents the server marker at which - file transfer is to be restarted. This command does not - cause file transfer but skips over the file to the specified - data checkpoint. This command shall be immediately followed - by the appropriate FTP service command which shall cause - file transfer to resume. - - RENAME FROM (RNFR) - - This command specifies the old pathname of the file which is - to be renamed. This command must be immediately followed by - a "rename to" command specifying the new file pathname. - - RENAME TO (RNTO) - - This command specifies the new pathname of the file - specified in the immediately preceding "rename from" - command. Together the two commands cause a file to be - renamed. - - ABORT (ABOR) - - This command tells the server to abort the previous FTP - service command and any associated transfer of data. The - abort command may require "special action", as discussed in - the Section on FTP Commands, to force recognition by the - server. No action is to be taken if the previous command - has been completed (including data transfer). The control - connection is not to be closed by the server, but the data - connection must be closed. - - There are two cases for the server upon receipt of this - command: (1) the FTP service command was already completed, - or (2) the FTP service command is still in progress. - - - -Postel & Reynolds [Page 31] - - - -RFC 959 October 1985 -File Transfer Protocol - - - In the first case, the server closes the data connection - (if it is open) and responds with a 226 reply, indicating - that the abort command was successfully processed. - - In the second case, the server aborts the FTP service in - progress and closes the data connection, returning a 426 - reply to indicate that the service request terminated - abnormally. The server then sends a 226 reply, - indicating that the abort command was successfully - processed. - - DELETE (DELE) - - This command causes the file specified in the pathname to be - deleted at the server site. If an extra level of protection - is desired (such as the query, "Do you really wish to - delete?"), it should be provided by the user-FTP process. - - REMOVE DIRECTORY (RMD) - - This command causes the directory specified in the pathname - to be removed as a directory (if the pathname is absolute) - or as a subdirectory of the current working directory (if - the pathname is relative). See Appendix II. - - MAKE DIRECTORY (MKD) - - This command causes the directory specified in the pathname - to be created as a directory (if the pathname is absolute) - or as a subdirectory of the current working directory (if - the pathname is relative). See Appendix II. - - PRINT WORKING DIRECTORY (PWD) - - This command causes the name of the current working - directory to be returned in the reply. See Appendix II. - - LIST (LIST) - - This command causes a list to be sent from the server to the - passive DTP. If the pathname specifies a directory or other - group of files, the server should transfer a list of files - in the specified directory. If the pathname specifies a - file then the server should send current information on the - file. A null argument implies the user's current working or - default directory. The data transfer is over the data - connection in type ASCII or type EBCDIC. (The user must - - -Postel & Reynolds [Page 32] - - - -RFC 959 October 1985 -File Transfer Protocol - - - ensure that the TYPE is appropriately ASCII or EBCDIC). - Since the information on a file may vary widely from system - to system, this information may be hard to use automatically - in a program, but may be quite useful to a human user. - - NAME LIST (NLST) - - This command causes a directory listing to be sent from - server to user site. The pathname should specify a - directory or other system-specific file group descriptor; a - null argument implies the current directory. The server - will return a stream of names of files and no other - information. The data will be transferred in ASCII or - EBCDIC type over the data connection as valid pathname - strings separated by or . (Again the user must - ensure that the TYPE is correct.) This command is intended - to return information that can be used by a program to - further process the files automatically. For example, in - the implementation of a "multiple get" function. - - SITE PARAMETERS (SITE) - - This command is used by the server to provide services - specific to his system that are essential to file transfer - but not sufficiently universal to be included as commands in - the protocol. The nature of these services and the - specification of their syntax can be stated in a reply to - the HELP SITE command. - - SYSTEM (SYST) - - This command is used to find out the type of operating - system at the server. The reply shall have as its first - word one of the system names listed in the current version - of the Assigned Numbers document [4]. - - STATUS (STAT) - - This command shall cause a status response to be sent over - the control connection in the form of a reply. The command - may be sent during a file transfer (along with the Telnet IP - and Synch signals--see the Section on FTP Commands) in which - case the server will respond with the status of the - operation in progress, or it may be sent between file - transfers. In the latter case, the command may have an - argument field. If the argument is a pathname, the command - is analogous to the "list" command except that data shall be - - -Postel & Reynolds [Page 33] - - - -RFC 959 October 1985 -File Transfer Protocol - - - transferred over the control connection. If a partial - pathname is given, the server may respond with a list of - file names or attributes associated with that specification. - If no argument is given, the server should return general - status information about the server FTP process. This - should include current values of all transfer parameters and - the status of connections. - - HELP (HELP) - - This command shall cause the server to send helpful - information regarding its implementation status over the - control connection to the user. The command may take an - argument (e.g., any command name) and return more specific - information as a response. The reply is type 211 or 214. - It is suggested that HELP be allowed before entering a USER - command. The server may use this reply to specify - site-dependent parameters, e.g., in response to HELP SITE. - - NOOP (NOOP) - - This command does not affect any parameters or previously - entered commands. It specifies no action other than that the - server send an OK reply. - - The File Transfer Protocol follows the specifications of the Telnet - protocol for all communications over the control connection. Since - the language used for Telnet communication may be a negotiated - option, all references in the next two sections will be to the - "Telnet language" and the corresponding "Telnet end-of-line code". - Currently, one may take these to mean NVT-ASCII and . No other - specifications of the Telnet protocol will be cited. - - FTP commands are "Telnet strings" terminated by the "Telnet end of - line code". The command codes themselves are alphabetic characters - terminated by the character (Space) if parameters follow and - Telnet-EOL otherwise. The command codes and the semantics of - commands are described in this section; the detailed syntax of - commands is specified in the Section on Commands, the reply sequences - are discussed in the Section on Sequencing of Commands and Replies, - and scenarios illustrating the use of commands are provided in the - Section on Typical FTP Scenarios. - - FTP commands may be partitioned as those specifying access-control - identifiers, data transfer parameters, or FTP service requests. - Certain commands (such as ABOR, STAT, QUIT) may be sent over the - control connection while a data transfer is in progress. Some - - -Postel & Reynolds [Page 34] - - - -RFC 959 October 1985 -File Transfer Protocol - - - servers may not be able to monitor the control and data connections - simultaneously, in which case some special action will be necessary - to get the server's attention. The following ordered format is - tentatively recommended: - - 1. User system inserts the Telnet "Interrupt Process" (IP) signal - in the Telnet stream. - - 2. User system sends the Telnet "Synch" signal. - - 3. User system inserts the command (e.g., ABOR) in the Telnet - stream. - - 4. Server PI, after receiving "IP", scans the Telnet stream for - EXACTLY ONE FTP command. - - (For other servers this may not be necessary but the actions listed - above should have no unusual effect.) - - 4.2. FTP REPLIES - - Replies to File Transfer Protocol commands are devised to ensure - the synchronization of requests and actions in the process of file - transfer, and to guarantee that the user process always knows the - state of the Server. Every command must generate at least one - reply, although there may be more than one; in the latter case, - the multiple replies must be easily distinguished. In addition, - some commands occur in sequential groups, such as USER, PASS and - ACCT, or RNFR and RNTO. The replies show the existence of an - intermediate state if all preceding commands have been successful. - A failure at any point in the sequence necessitates the repetition - of the entire sequence from the beginning. - - The details of the command-reply sequence are made explicit in - a set of state diagrams below. - - An FTP reply consists of a three digit number (transmitted as - three alphanumeric characters) followed by some text. The number - is intended for use by automata to determine what state to enter - next; the text is intended for the human user. It is intended - that the three digits contain enough encoded information that the - user-process (the User-PI) will not need to examine the text and - may either discard it or pass it on to the user, as appropriate. - In particular, the text may be server-dependent, so there are - likely to be varying texts for each reply code. - - A reply is defined to contain the 3-digit code, followed by Space - - -Postel & Reynolds [Page 35] - - - -RFC 959 October 1985 -File Transfer Protocol - - - , followed by one line of text (where some maximum line length - has been specified), and terminated by the Telnet end-of-line - code. There will be cases however, where the text is longer than - a single line. In these cases the complete text must be bracketed - so the User-process knows when it may stop reading the reply (i.e. - stop processing input on the control connection) and go do other - things. This requires a special format on the first line to - indicate that more than one line is coming, and another on the - last line to designate it as the last. At least one of these must - contain the appropriate reply code to indicate the state of the - transaction. To satisfy all factions, it was decided that both - the first and last line codes should be the same. - - Thus the format for multi-line replies is that the first line - will begin with the exact required reply code, followed - immediately by a Hyphen, "-" (also known as Minus), followed by - text. The last line will begin with the same code, followed - immediately by Space , optionally some text, and the Telnet - end-of-line code. - - For example: - 123-First line - Second line - 234 A line beginning with numbers - 123 The last line - - The user-process then simply needs to search for the second - occurrence of the same reply code, followed by (Space), at - the beginning of a line, and ignore all intermediary lines. If - an intermediary line begins with a 3-digit number, the Server - must pad the front to avoid confusion. - - This scheme allows standard system routines to be used for - reply information (such as for the STAT reply), with - "artificial" first and last lines tacked on. In rare cases - where these routines are able to generate three digits and a - Space at the beginning of any line, the beginning of each - text line should be offset by some neutral text, like Space. - - This scheme assumes that multi-line replies may not be nested. - - The three digits of the reply each have a special significance. - This is intended to allow a range of very simple to very - sophisticated responses by the user-process. The first digit - denotes whether the response is good, bad or incomplete. - (Referring to the state diagram), an unsophisticated user-process - will be able to determine its next action (proceed as planned, - - -Postel & Reynolds [Page 36] - - - -RFC 959 October 1985 -File Transfer Protocol - - - redo, retrench, etc.) by simply examining this first digit. A - user-process that wants to know approximately what kind of error - occurred (e.g. file system error, command syntax error) may - examine the second digit, reserving the third digit for the finest - gradation of information (e.g., RNTO command without a preceding - RNFR). - - There are five values for the first digit of the reply code: - - 1yz Positive Preliminary reply - - The requested action is being initiated; expect another - reply before proceeding with a new command. (The - user-process sending another command before the - completion reply would be in violation of protocol; but - server-FTP processes should queue any commands that - arrive while a preceding command is in progress.) This - type of reply can be used to indicate that the command - was accepted and the user-process may now pay attention - to the data connections, for implementations where - simultaneous monitoring is difficult. The server-FTP - process may send at most, one 1yz reply per command. - - 2yz Positive Completion reply - - The requested action has been successfully completed. A - new request may be initiated. - - 3yz Positive Intermediate reply - - The command has been accepted, but the requested action - is being held in abeyance, pending receipt of further - information. The user should send another command - specifying this information. This reply is used in - command sequence groups. - - 4yz Transient Negative Completion reply - - The command was not accepted and the requested action did - not take place, but the error condition is temporary and - the action may be requested again. The user should - return to the beginning of the command sequence, if any. - It is difficult to assign a meaning to "transient", - particularly when two distinct sites (Server- and - User-processes) have to agree on the interpretation. - Each reply in the 4yz category might have a slightly - different time value, but the intent is that the - - -Postel & Reynolds [Page 37] - - - -RFC 959 October 1985 -File Transfer Protocol - - - user-process is encouraged to try again. A rule of thumb - in determining if a reply fits into the 4yz or the 5yz - (Permanent Negative) category is that replies are 4yz if - the commands can be repeated without any change in - command form or in properties of the User or Server - (e.g., the command is spelled the same with the same - arguments used; the user does not change his file access - or user name; the server does not put up a new - implementation.) - - 5yz Permanent Negative Completion reply - - The command was not accepted and the requested action did - not take place. The User-process is discouraged from - repeating the exact request (in the same sequence). Even - some "permanent" error conditions can be corrected, so - the human user may want to direct his User-process to - reinitiate the command sequence by direct action at some - point in the future (e.g., after the spelling has been - changed, or the user has altered his directory status.) - - The following function groupings are encoded in the second - digit: - - x0z Syntax - These replies refer to syntax errors, - syntactically correct commands that don't fit any - functional category, unimplemented or superfluous - commands. - - x1z Information - These are replies to requests for - information, such as status or help. - - x2z Connections - Replies referring to the control and - data connections. - - x3z Authentication and accounting - Replies for the login - process and accounting procedures. - - x4z Unspecified as yet. - - x5z File system - These replies indicate the status of the - Server file system vis-a-vis the requested transfer or - other file system action. - - The third digit gives a finer gradation of meaning in each of - the function categories, specified by the second digit. The - list of replies below will illustrate this. Note that the text - - -Postel & Reynolds [Page 38] - - - -RFC 959 October 1985 -File Transfer Protocol - - - associated with each reply is recommended, rather than - mandatory, and may even change according to the command with - which it is associated. The reply codes, on the other hand, - must strictly follow the specifications in the last section; - that is, Server implementations should not invent new codes for - situations that are only slightly different from the ones - described here, but rather should adapt codes already defined. - - A command such as TYPE or ALLO whose successful execution - does not offer the user-process any new information will - cause a 200 reply to be returned. If the command is not - implemented by a particular Server-FTP process because it - has no relevance to that computer system, for example ALLO - at a TOPS20 site, a Positive Completion reply is still - desired so that the simple User-process knows it can proceed - with its course of action. A 202 reply is used in this case - with, for example, the reply text: "No storage allocation - necessary." If, on the other hand, the command requests a - non-site-specific action and is unimplemented, the response - is 502. A refinement of that is the 504 reply for a command - that is implemented, but that requests an unimplemented - parameter. - - 4.2.1 Reply Codes by Function Groups - - 200 Command okay. - 500 Syntax error, command unrecognized. - This may include errors such as command line too long. - 501 Syntax error in parameters or arguments. - 202 Command not implemented, superfluous at this site. - 502 Command not implemented. - 503 Bad sequence of commands. - 504 Command not implemented for that parameter. - - - - - - - - - - - - - - - - -Postel & Reynolds [Page 39] - - - -RFC 959 October 1985 -File Transfer Protocol - - - 110 Restart marker reply. - In this case, the text is exact and not left to the - particular implementation; it must read: - MARK yyyy = mmmm - Where yyyy is User-process data stream marker, and mmmm - server's equivalent marker (note the spaces between markers - and "="). - 211 System status, or system help reply. - 212 Directory status. - 213 File status. - 214 Help message. - On how to use the server or the meaning of a particular - non-standard command. This reply is useful only to the - human user. - 215 NAME system type. - Where NAME is an official system name from the list in the - Assigned Numbers document. - - 120 Service ready in nnn minutes. - 220 Service ready for new user. - 221 Service closing control connection. - Logged out if appropriate. - 421 Service not available, closing control connection. - This may be a reply to any command if the service knows it - must shut down. - 125 Data connection already open; transfer starting. - 225 Data connection open; no transfer in progress. - 425 Can't open data connection. - 226 Closing data connection. - Requested file action successful (for example, file - transfer or file abort). - 426 Connection closed; transfer aborted. - 227 Entering Passive Mode (h1,h2,h3,h4,p1,p2). - - 230 User logged in, proceed. - 530 Not logged in. - 331 User name okay, need password. - 332 Need account for login. - 532 Need account for storing files. - - - - - - - - - - -Postel & Reynolds [Page 40] - - - -RFC 959 October 1985 -File Transfer Protocol - - - 150 File status okay; about to open data connection. - 250 Requested file action okay, completed. - 257 "PATHNAME" created. - 350 Requested file action pending further information. - 450 Requested file action not taken. - File unavailable (e.g., file busy). - 550 Requested action not taken. - File unavailable (e.g., file not found, no access). - 451 Requested action aborted. Local error in processing. - 551 Requested action aborted. Page type unknown. - 452 Requested action not taken. - Insufficient storage space in system. - 552 Requested file action aborted. - Exceeded storage allocation (for current directory or - dataset). - 553 Requested action not taken. - File name not allowed. - - - 4.2.2 Numeric Order List of Reply Codes - - 110 Restart marker reply. - In this case, the text is exact and not left to the - particular implementation; it must read: - MARK yyyy = mmmm - Where yyyy is User-process data stream marker, and mmmm - server's equivalent marker (note the spaces between markers - and "="). - 120 Service ready in nnn minutes. - 125 Data connection already open; transfer starting. - 150 File status okay; about to open data connection. - - - - - - - - - - - - - - - - - - -Postel & Reynolds [Page 41] - - - -RFC 959 October 1985 -File Transfer Protocol - - - 200 Command okay. - 202 Command not implemented, superfluous at this site. - 211 System status, or system help reply. - 212 Directory status. - 213 File status. - 214 Help message. - On how to use the server or the meaning of a particular - non-standard command. This reply is useful only to the - human user. - 215 NAME system type. - Where NAME is an official system name from the list in the - Assigned Numbers document. - 220 Service ready for new user. - 221 Service closing control connection. - Logged out if appropriate. - 225 Data connection open; no transfer in progress. - 226 Closing data connection. - Requested file action successful (for example, file - transfer or file abort). - 227 Entering Passive Mode (h1,h2,h3,h4,p1,p2). - 230 User logged in, proceed. - 250 Requested file action okay, completed. - 257 "PATHNAME" created. - - 331 User name okay, need password. - 332 Need account for login. - 350 Requested file action pending further information. - - 421 Service not available, closing control connection. - This may be a reply to any command if the service knows it - must shut down. - 425 Can't open data connection. - 426 Connection closed; transfer aborted. - 450 Requested file action not taken. - File unavailable (e.g., file busy). - 451 Requested action aborted: local error in processing. - 452 Requested action not taken. - Insufficient storage space in system. - - - - - - - - - - - -Postel & Reynolds [Page 42] - - - -RFC 959 October 1985 -File Transfer Protocol - - - 500 Syntax error, command unrecognized. - This may include errors such as command line too long. - 501 Syntax error in parameters or arguments. - 502 Command not implemented. - 503 Bad sequence of commands. - 504 Command not implemented for that parameter. - 530 Not logged in. - 532 Need account for storing files. - 550 Requested action not taken. - File unavailable (e.g., file not found, no access). - 551 Requested action aborted: page type unknown. - 552 Requested file action aborted. - Exceeded storage allocation (for current directory or - dataset). - 553 Requested action not taken. - File name not allowed. - - -5. DECLARATIVE SPECIFICATIONS - - 5.1. MINIMUM IMPLEMENTATION - - In order to make FTP workable without needless error messages, the - following minimum implementation is required for all servers: - - TYPE - ASCII Non-print - MODE - Stream - STRUCTURE - File, Record - COMMANDS - USER, QUIT, PORT, - TYPE, MODE, STRU, - for the default values - RETR, STOR, - NOOP. - - The default values for transfer parameters are: - - TYPE - ASCII Non-print - MODE - Stream - STRU - File - - All hosts must accept the above as the standard defaults. - - - - - - - - -Postel & Reynolds [Page 43] - - - -RFC 959 October 1985 -File Transfer Protocol - - - 5.2. CONNECTIONS - - The server protocol interpreter shall "listen" on Port L. The - user or user protocol interpreter shall initiate the full-duplex - control connection. Server- and user- processes should follow the - conventions of the Telnet protocol as specified in the - ARPA-Internet Protocol Handbook [1]. Servers are under no - obligation to provide for editing of command lines and may require - that it be done in the user host. The control connection shall be - closed by the server at the user's request after all transfers and - replies are completed. - - The user-DTP must "listen" on the specified data port; this may be - the default user port (U) or a port specified in the PORT command. - The server shall initiate the data connection from his own default - data port (L-1) using the specified user data port. The direction - of the transfer and the port used will be determined by the FTP - service command. - - Note that all FTP implementation must support data transfer using - the default port, and that only the USER-PI may initiate the use - of non-default ports. - - When data is to be transferred between two servers, A and B (refer - to Figure 2), the user-PI, C, sets up control connections with - both server-PI's. One of the servers, say A, is then sent a PASV - command telling him to "listen" on his data port rather than - initiate a connection when he receives a transfer service command. - When the user-PI receives an acknowledgment to the PASV command, - which includes the identity of the host and port being listened - on, the user-PI then sends A's port, a, to B in a PORT command; a - reply is returned. The user-PI may then send the corresponding - service commands to A and B. Server B initiates the connection - and the transfer proceeds. The command-reply sequence is listed - below where the messages are vertically synchronous but - horizontally asynchronous: - - - - - - - - - - - - - -Postel & Reynolds [Page 44] - - - -RFC 959 October 1985 -File Transfer Protocol - - - User-PI - Server A User-PI - Server B - ------------------ ------------------ - - C->A : Connect C->B : Connect - C->A : PASV - A->C : 227 Entering Passive Mode. A1,A2,A3,A4,a1,a2 - C->B : PORT A1,A2,A3,A4,a1,a2 - B->C : 200 Okay - C->A : STOR C->B : RETR - B->A : Connect to HOST-A, PORT-a - - Figure 3 - - The data connection shall be closed by the server under the - conditions described in the Section on Establishing Data - Connections. If the data connection is to be closed following a - data transfer where closing the connection is not required to - indicate the end-of-file, the server must do so immediately. - Waiting until after a new transfer command is not permitted - because the user-process will have already tested the data - connection to see if it needs to do a "listen"; (remember that the - user must "listen" on a closed data port BEFORE sending the - transfer request). To prevent a race condition here, the server - sends a reply (226) after closing the data connection (or if the - connection is left open, a "file transfer completed" reply (250) - and the user-PI should wait for one of these replies before - issuing a new transfer command). - - Any time either the user or server see that the connection is - being closed by the other side, it should promptly read any - remaining data queued on the connection and issue the close on its - own side. - - 5.3. COMMANDS - - The commands are Telnet character strings transmitted over the - control connections as described in the Section on FTP Commands. - The command functions and semantics are described in the Section - on Access Control Commands, Transfer Parameter Commands, FTP - Service Commands, and Miscellaneous Commands. The command syntax - is specified here. - - The commands begin with a command code followed by an argument - field. The command codes are four or fewer alphabetic characters. - Upper and lower case alphabetic characters are to be treated - identically. Thus, any of the following may represent the - retrieve command: - - -Postel & Reynolds [Page 45] - - - -RFC 959 October 1985 -File Transfer Protocol - - - RETR Retr retr ReTr rETr - - This also applies to any symbols representing parameter values, - such as A or a for ASCII TYPE. The command codes and the argument - fields are separated by one or more spaces. - - The argument field consists of a variable length character string - ending with the character sequence (Carriage Return, Line - Feed) for NVT-ASCII representation; for other negotiated languages - a different end of line character might be used. It should be - noted that the server is to take no action until the end of line - code is received. - - The syntax is specified below in NVT-ASCII. All characters in the - argument field are ASCII characters including any ASCII - represented decimal integers. Square brackets denote an optional - argument field. If the option is not taken, the appropriate - default is implied. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Postel & Reynolds [Page 46] - - - -RFC 959 October 1985 -File Transfer Protocol - - - 5.3.1. FTP COMMANDS - - The following are the FTP commands: - - USER - PASS - ACCT - CWD - CDUP - SMNT - QUIT - REIN - PORT - PASV - TYPE - STRU - MODE - RETR - STOR - STOU - APPE - ALLO - [ R ] - REST - RNFR - RNTO - ABOR - DELE - RMD - MKD - PWD - LIST [ ] - NLST [ ] - SITE - SYST - STAT [ ] - HELP [ ] - NOOP - - - - - - - - - - - -Postel & Reynolds [Page 47] - - - -RFC 959 October 1985 -File Transfer Protocol - - - 5.3.2. FTP COMMAND ARGUMENTS - - The syntax of the above argument fields (using BNF notation - where applicable) is: - - ::= - ::= - ::= - ::= | - ::= any of the 128 ASCII characters except and - - ::= - ::= | - ::= printable characters, any - ASCII code 33 through 126 - ::= - ::= , - ::= ,,, - ::= , - ::= any decimal integer 1 through 255 - ::= N | T | C - ::= A [ ] - | E [ ] - | I - | L - ::= F | R | P - ::= S | B | C - ::= - ::= any decimal integer - - - - - - - - - - - - - - - - - - - - -Postel & Reynolds [Page 48] - - - -RFC 959 October 1985 -File Transfer Protocol - - - 5.4. SEQUENCING OF COMMANDS AND REPLIES - - The communication between the user and server is intended to be an - alternating dialogue. As such, the user issues an FTP command and - the server responds with a prompt primary reply. The user should - wait for this initial primary success or failure response before - sending further commands. - - Certain commands require a second reply for which the user should - also wait. These replies may, for example, report on the progress - or completion of file transfer or the closing of the data - connection. They are secondary replies to file transfer commands. - - One important group of informational replies is the connection - greetings. Under normal circumstances, a server will send a 220 - reply, "awaiting input", when the connection is completed. The - user should wait for this greeting message before sending any - commands. If the server is unable to accept input right away, a - 120 "expected delay" reply should be sent immediately and a 220 - reply when ready. The user will then know not to hang up if there - is a delay. - - Spontaneous Replies - - Sometimes "the system" spontaneously has a message to be sent - to a user (usually all users). For example, "System going down - in 15 minutes". There is no provision in FTP for such - spontaneous information to be sent from the server to the user. - It is recommended that such information be queued in the - server-PI and delivered to the user-PI in the next reply - (possibly making it a multi-line reply). - - The table below lists alternative success and failure replies for - each command. These must be strictly adhered to; a server may - substitute text in the replies, but the meaning and action implied - by the code numbers and by the specific command reply sequence - cannot be altered. - - Command-Reply Sequences - - In this section, the command-reply sequence is presented. Each - command is listed with its possible replies; command groups are - listed together. Preliminary replies are listed first (with - their succeeding replies indented and under them), then - positive and negative completion, and finally intermediary - - - - -Postel & Reynolds [Page 49] - - - -RFC 959 October 1985 -File Transfer Protocol - - - replies with the remaining commands from the sequence - following. This listing forms the basis for the state - diagrams, which will be presented separately. - - Connection Establishment - 120 - 220 - 220 - 421 - Login - USER - 230 - 530 - 500, 501, 421 - 331, 332 - PASS - 230 - 202 - 530 - 500, 501, 503, 421 - 332 - ACCT - 230 - 202 - 530 - 500, 501, 503, 421 - CWD - 250 - 500, 501, 502, 421, 530, 550 - CDUP - 200 - 500, 501, 502, 421, 530, 550 - SMNT - 202, 250 - 500, 501, 502, 421, 530, 550 - Logout - REIN - 120 - 220 - 220 - 421 - 500, 502 - QUIT - 221 - 500 - - - - -Postel & Reynolds [Page 50] - - - -RFC 959 October 1985 -File Transfer Protocol - - - Transfer parameters - PORT - 200 - 500, 501, 421, 530 - PASV - 227 - 500, 501, 502, 421, 530 - MODE - 200 - 500, 501, 504, 421, 530 - TYPE - 200 - 500, 501, 504, 421, 530 - STRU - 200 - 500, 501, 504, 421, 530 - File action commands - ALLO - 200 - 202 - 500, 501, 504, 421, 530 - REST - 500, 501, 502, 421, 530 - 350 - STOR - 125, 150 - (110) - 226, 250 - 425, 426, 451, 551, 552 - 532, 450, 452, 553 - 500, 501, 421, 530 - STOU - 125, 150 - (110) - 226, 250 - 425, 426, 451, 551, 552 - 532, 450, 452, 553 - 500, 501, 421, 530 - RETR - 125, 150 - (110) - 226, 250 - 425, 426, 451 - 450, 550 - 500, 501, 421, 530 - - - - -Postel & Reynolds [Page 51] - - - -RFC 959 October 1985 -File Transfer Protocol - - - LIST - 125, 150 - 226, 250 - 425, 426, 451 - 450 - 500, 501, 502, 421, 530 - NLST - 125, 150 - 226, 250 - 425, 426, 451 - 450 - 500, 501, 502, 421, 530 - APPE - 125, 150 - (110) - 226, 250 - 425, 426, 451, 551, 552 - 532, 450, 550, 452, 553 - 500, 501, 502, 421, 530 - RNFR - 450, 550 - 500, 501, 502, 421, 530 - 350 - RNTO - 250 - 532, 553 - 500, 501, 502, 503, 421, 530 - DELE - 250 - 450, 550 - 500, 501, 502, 421, 530 - RMD - 250 - 500, 501, 502, 421, 530, 550 - MKD - 257 - 500, 501, 502, 421, 530, 550 - PWD - 257 - 500, 501, 502, 421, 550 - ABOR - 225, 226 - 500, 501, 502, 421 - - - - - - -Postel & Reynolds [Page 52] - - - -RFC 959 October 1985 -File Transfer Protocol - - - Informational commands - SYST - 215 - 500, 501, 502, 421 - STAT - 211, 212, 213 - 450 - 500, 501, 502, 421, 530 - HELP - 211, 214 - 500, 501, 502, 421 - Miscellaneous commands - SITE - 200 - 202 - 500, 501, 530 - NOOP - 200 - 500 421 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Postel & Reynolds [Page 53] - - - -RFC 959 October 1985 -File Transfer Protocol - - -6. STATE DIAGRAMS - - Here we present state diagrams for a very simple minded FTP - implementation. Only the first digit of the reply codes is used. - There is one state diagram for each group of FTP commands or command - sequences. - - The command groupings were determined by constructing a model for - each command then collecting together the commands with structurally - identical models. - - For each command or command sequence there are three possible - outcomes: success (S), failure (F), and error (E). In the state - diagrams below we use the symbol B for "begin", and the symbol W for - "wait for reply". - - We first present the diagram that represents the largest group of FTP - commands: - - - 1,3 +---+ - ----------->| E | - | +---+ - | - +---+ cmd +---+ 2 +---+ - | B |---------->| W |---------->| S | - +---+ +---+ +---+ - | - | 4,5 +---+ - ----------->| F | - +---+ - - - This diagram models the commands: - - ABOR, ALLO, DELE, CWD, CDUP, SMNT, HELP, MODE, NOOP, PASV, - QUIT, SITE, PORT, SYST, STAT, RMD, MKD, PWD, STRU, and TYPE. - - - - - - - - - - - - -Postel & Reynolds [Page 54] - - - -RFC 959 October 1985 -File Transfer Protocol - - - The other large group of commands is represented by a very similar - diagram: - - - 3 +---+ - ----------->| E | - | +---+ - | - +---+ cmd +---+ 2 +---+ - | B |---------->| W |---------->| S | - +---+ --->+---+ +---+ - | | | - | | | 4,5 +---+ - | 1 | ----------->| F | - ----- +---+ - - - This diagram models the commands: - - APPE, LIST, NLST, REIN, RETR, STOR, and STOU. - - Note that this second model could also be used to represent the first - group of commands, the only difference being that in the first group - the 100 series replies are unexpected and therefore treated as error, - while the second group expects (some may require) 100 series replies. - Remember that at most, one 100 series reply is allowed per command. - - The remaining diagrams model command sequences, perhaps the simplest - of these is the rename sequence: - - - +---+ RNFR +---+ 1,2 +---+ - | B |---------->| W |---------->| E | - +---+ +---+ -->+---+ - | | | - 3 | | 4,5 | - -------------- ------ | - | | | +---+ - | ------------->| S | - | | 1,3 | | +---+ - | 2| -------- - | | | | - V | | | - +---+ RNTO +---+ 4,5 ----->+---+ - | |---------->| W |---------->| F | - +---+ +---+ +---+ - - - -Postel & Reynolds [Page 55] - - - -RFC 959 October 1985 -File Transfer Protocol - - - The next diagram is a simple model of the Restart command: - - - +---+ REST +---+ 1,2 +---+ - | B |---------->| W |---------->| E | - +---+ +---+ -->+---+ - | | | - 3 | | 4,5 | - -------------- ------ | - | | | +---+ - | ------------->| S | - | | 3 | | +---+ - | 2| -------- - | | | | - V | | | - +---+ cmd +---+ 4,5 ----->+---+ - | |---------->| W |---------->| F | - +---+ -->+---+ +---+ - | | - | 1 | - ------ - - - Where "cmd" is APPE, STOR, or RETR. - - We note that the above three models are similar. The Restart differs - from the Rename two only in the treatment of 100 series replies at - the second stage, while the second group expects (some may require) - 100 series replies. Remember that at most, one 100 series reply is - allowed per command. - - - - - - - - - - - - - - - - - - - -Postel & Reynolds [Page 56] - - - -RFC 959 October 1985 -File Transfer Protocol - - - The most complicated diagram is for the Login sequence: - - - 1 - +---+ USER +---+------------->+---+ - | B |---------->| W | 2 ---->| E | - +---+ +---+------ | -->+---+ - | | | | | - 3 | | 4,5 | | | - -------------- ----- | | | - | | | | | - | | | | | - | --------- | - | 1| | | | - V | | | | - +---+ PASS +---+ 2 | ------>+---+ - | |---------->| W |------------->| S | - +---+ +---+ ---------->+---+ - | | | | | - 3 | |4,5| | | - -------------- -------- | - | | | | | - | | | | | - | ----------- - | 1,3| | | | - V | 2| | | - +---+ ACCT +---+-- | ----->+---+ - | |---------->| W | 4,5 -------->| F | - +---+ +---+------------->+---+ - - - - - - - - - - - - - - - - - - - - -Postel & Reynolds [Page 57] - - - -RFC 959 October 1985 -File Transfer Protocol - - - Finally, we present a generalized diagram that could be used to model - the command and reply interchange: - - - ------------------------------------ - | | - Begin | | - | V | - | +---+ cmd +---+ 2 +---+ | - -->| |------->| |---------->| | | - | | | W | | S |-----| - -->| | -->| |----- | | | - | +---+ | +---+ 4,5 | +---+ | - | | | | | | | - | | | 1| |3 | +---+ | - | | | | | | | | | - | | ---- | ---->| F |----- - | | | | | - | | | +---+ - ------------------- - | - | - V - End - - - - - - - - - - - - - - - - - - - - - - - - - -Postel & Reynolds [Page 58] - - - -RFC 959 October 1985 -File Transfer Protocol - - -7. TYPICAL FTP SCENARIO - - User at host U wanting to transfer files to/from host S: - - In general, the user will communicate to the server via a mediating - user-FTP process. The following may be a typical scenario. The - user-FTP prompts are shown in parentheses, '---->' represents - commands from host U to host S, and '<----' represents replies from - host S to host U. - - LOCAL COMMANDS BY USER ACTION INVOLVED - - ftp (host) multics Connect to host S, port L, - establishing control connections. - <---- 220 Service ready . - username Doe USER Doe----> - <---- 331 User name ok, - need password. - password mumble PASS mumble----> - <---- 230 User logged in. - retrieve (local type) ASCII - (local pathname) test 1 User-FTP opens local file in ASCII. - (for. pathname) test.pl1 RETR test.pl1 ----> - <---- 150 File status okay; - about to open data - connection. - Server makes data connection - to port U. - - <---- 226 Closing data connection, - file transfer successful. - type Image TYPE I ----> - <---- 200 Command OK - store (local type) image - (local pathname) file dump User-FTP opens local file in Image. - (for.pathname) >udd>cn>fd STOR >udd>cn>fd ----> - <---- 550 Access denied - terminate QUIT ----> - Server closes all - connections. - -8. CONNECTION ESTABLISHMENT - - The FTP control connection is established via TCP between the user - process port U and the server process port L. This protocol is - assigned the service port 21 (25 octal), that is L=21. - - - -Postel & Reynolds [Page 59] - - - -RFC 959 October 1985 -File Transfer Protocol - - -APPENDIX I - PAGE STRUCTURE - - The need for FTP to support page structure derives principally from - the need to support efficient transmission of files between TOPS-20 - systems, particularly the files used by NLS. - - The file system of TOPS-20 is based on the concept of pages. The - operating system is most efficient at manipulating files as pages. - The operating system provides an interface to the file system so that - many applications view files as sequential streams of characters. - However, a few applications use the underlying page structures - directly, and some of these create holey files. - - A TOPS-20 disk file consists of four things: a pathname, a page - table, a (possibly empty) set of pages, and a set of attributes. - - The pathname is specified in the RETR or STOR command. It includes - the directory name, file name, file name extension, and generation - number. - - The page table contains up to 2**18 entries. Each entry may be - EMPTY, or may point to a page. If it is not empty, there are also - some page-specific access bits; not all pages of a file need have the - same access protection. - - A page is a contiguous set of 512 words of 36 bits each. - - The attributes of the file, in the File Descriptor Block (FDB), - contain such things as creation time, write time, read time, writer's - byte-size, end-of-file pointer, count of reads and writes, backup - system tape numbers, etc. - - Note that there is NO requirement that entries in the page table be - contiguous. There may be empty page table slots between occupied - ones. Also, the end of file pointer is simply a number. There is no - requirement that it in fact point at the "last" datum in the file. - Ordinary sequential I/O calls in TOPS-20 will cause the end of file - pointer to be left after the last datum written, but other operations - may cause it not to be so, if a particular programming system so - requires. - - In fact, in both of these special cases, "holey" files and - end-of-file pointers NOT at the end of the file, occur with NLS data - files. - - - - - -Postel & Reynolds [Page 60] - - - -RFC 959 October 1985 -File Transfer Protocol - - - The TOPS-20 paged files can be sent with the FTP transfer parameters: - TYPE L 36, STRU P, and MODE S (in fact, any mode could be used). - - Each page of information has a header. Each header field, which is a - logical byte, is a TOPS-20 word, since the TYPE is L 36. - - The header fields are: - - Word 0: Header Length. - - The header length is 5. - - Word 1: Page Index. - - If the data is a disk file page, this is the number of that - page in the file's page map. Empty pages (holes) in the file - are simply not sent. Note that a hole is NOT the same as a - page of zeros. - - Word 2: Data Length. - - The number of data words in this page, following the header. - Thus, the total length of the transmission unit is the Header - Length plus the Data Length. - - Word 3: Page Type. - - A code for what type of chunk this is. A data page is type 3, - the FDB page is type 2. - - Word 4: Page Access Control. - - The access bits associated with the page in the file's page - map. (This full word quantity is put into AC2 of an SPACS by - the program reading from net to disk.) - - After the header are Data Length data words. Data Length is - currently either 512 for a data page or 31 for an FDB. Trailing - zeros in a disk file page may be discarded, making Data Length less - than 512 in that case. - - - - - - - - - -Postel & Reynolds [Page 61] - - - -RFC 959 October 1985 -File Transfer Protocol - - -APPENDIX II - DIRECTORY COMMANDS - - Since UNIX has a tree-like directory structure in which directories - are as easy to manipulate as ordinary files, it is useful to expand - the FTP servers on these machines to include commands which deal with - the creation of directories. Since there are other hosts on the - ARPA-Internet which have tree-like directories (including TOPS-20 and - Multics), these commands are as general as possible. - - Four directory commands have been added to FTP: - - MKD pathname - - Make a directory with the name "pathname". - - RMD pathname - - Remove the directory with the name "pathname". - - PWD - - Print the current working directory name. - - CDUP - - Change to the parent of the current working directory. - - The "pathname" argument should be created (removed) as a - subdirectory of the current working directory, unless the "pathname" - string contains sufficient information to specify otherwise to the - server, e.g., "pathname" is an absolute pathname (in UNIX and - Multics), or pathname is something like "" to - TOPS-20. - - REPLY CODES - - The CDUP command is a special case of CWD, and is included to - simplify the implementation of programs for transferring directory - trees between operating systems having different syntaxes for - naming the parent directory. The reply codes for CDUP be - identical to the reply codes of CWD. - - The reply codes for RMD be identical to the reply codes for its - file analogue, DELE. - - The reply codes for MKD, however, are a bit more complicated. A - freshly created directory will probably be the object of a future - - -Postel & Reynolds [Page 62] - - - -RFC 959 October 1985 -File Transfer Protocol - - - CWD command. Unfortunately, the argument to MKD may not always be - a suitable argument for CWD. This is the case, for example, when - a TOPS-20 subdirectory is created by giving just the subdirectory - name. That is, with a TOPS-20 server FTP, the command sequence - - MKD MYDIR - CWD MYDIR - - will fail. The new directory may only be referred to by its - "absolute" name; e.g., if the MKD command above were issued while - connected to the directory , the new subdirectory - could only be referred to by the name . - - Even on UNIX and Multics, however, the argument given to MKD may - not be suitable. If it is a "relative" pathname (i.e., a pathname - which is interpreted relative to the current directory), the user - would need to be in the same current directory in order to reach - the subdirectory. Depending on the application, this may be - inconvenient. It is not very robust in any case. - - To solve these problems, upon successful completion of an MKD - command, the server should return a line of the form: - - 257"" - - That is, the server will tell the user what string to use when - referring to the created directory. The directory name can - contain any character; embedded double-quotes should be escaped by - double-quotes (the "quote-doubling" convention). - - For example, a user connects to the directory /usr/dm, and creates - a subdirectory, named pathname: - - CWD /usr/dm - 200 directory changed to /usr/dm - MKD pathname - 257 "/usr/dm/pathname" directory created - - An example with an embedded double quote: - - MKD foo"bar - 257 "/usr/dm/foo""bar" directory created - CWD /usr/dm/foo"bar - 200 directory changed to /usr/dm/foo"bar - - - - - -Postel & Reynolds [Page 63] - - - -RFC 959 October 1985 -File Transfer Protocol - - - The prior existence of a subdirectory with the same name is an - error, and the server must return an "access denied" error reply - in that case. - - CWD /usr/dm - 200 directory changed to /usr/dm - MKD pathname - 521-"/usr/dm/pathname" directory already exists; - 521 taking no action. - - The failure replies for MKD are analogous to its file creating - cousin, STOR. Also, an "access denied" return is given if a file - name with the same name as the subdirectory will conflict with the - creation of the subdirectory (this is a problem on UNIX, but - shouldn't be one on TOPS-20). - - Essentially because the PWD command returns the same type of - information as the successful MKD command, the successful PWD - command uses the 257 reply code as well. - - SUBTLETIES - - Because these commands will be most useful in transferring - subtrees from one machine to another, carefully observe that the - argument to MKD is to be interpreted as a sub-directory of the - current working directory, unless it contains enough information - for the destination host to tell otherwise. A hypothetical - example of its use in the TOPS-20 world: - - CWD - 200 Working directory changed - MKD overrainbow - 257 "" directory created - CWD overrainbow - 431 No such directory - CWD - 200 Working directory changed - - CWD - 200 Working directory changed to - MKD - 257 "" directory created - CWD - - Note that the first example results in a subdirectory of the - connected directory. In contrast, the argument in the second - example contains enough information for TOPS-20 to tell that the - - -Postel & Reynolds [Page 64] - - - -RFC 959 October 1985 -File Transfer Protocol - - - directory is a top-level directory. Note also that - in the first example the user "violated" the protocol by - attempting to access the freshly created directory with a name - other than the one returned by TOPS-20. Problems could have - resulted in this case had there been an directory; - this is an ambiguity inherent in some TOPS-20 implementations. - Similar considerations apply to the RMD command. The point is - this: except where to do so would violate a host's conventions for - denoting relative versus absolute pathnames, the host should treat - the operands of the MKD and RMD commands as subdirectories. The - 257 reply to the MKD command must always contain the absolute - pathname of the created directory. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Postel & Reynolds [Page 65] - - - -RFC 959 October 1985 -File Transfer Protocol - - -APPENDIX III - RFCs on FTP - - Bhushan, Abhay, "A File Transfer Protocol", RFC 114 (NIC 5823), - MIT-Project MAC, 16 April 1971. - - Harslem, Eric, and John Heafner, "Comments on RFC 114 (A File - Transfer Protocol)", RFC 141 (NIC 6726), RAND, 29 April 1971. - - Bhushan, Abhay, et al, "The File Transfer Protocol", RFC 172 - (NIC 6794), MIT-Project MAC, 23 June 1971. - - Braden, Bob, "Comments on DTP and FTP Proposals", RFC 238 (NIC 7663), - UCLA/CCN, 29 September 1971. - - Bhushan, Abhay, et al, "The File Transfer Protocol", RFC 265 - (NIC 7813), MIT-Project MAC, 17 November 1971. - - McKenzie, Alex, "A Suggested Addition to File Transfer Protocol", - RFC 281 (NIC 8163), BBN, 8 December 1971. - - Bhushan, Abhay, "The Use of "Set Data Type" Transaction in File - Transfer Protocol", RFC 294 (NIC 8304), MIT-Project MAC, - 25 January 1972. - - Bhushan, Abhay, "The File Transfer Protocol", RFC 354 (NIC 10596), - MIT-Project MAC, 8 July 1972. - - Bhushan, Abhay, "Comments on the File Transfer Protocol (RFC 354)", - RFC 385 (NIC 11357), MIT-Project MAC, 18 August 1972. - - Hicks, Greg, "User FTP Documentation", RFC 412 (NIC 12404), Utah, - 27 November 1972. - - Bhushan, Abhay, "File Transfer Protocol (FTP) Status and Further - Comments", RFC 414 (NIC 12406), MIT-Project MAC, 20 November 1972. - - Braden, Bob, "Comments on File Transfer Protocol", RFC 430 - (NIC 13299), UCLA/CCN, 7 February 1973. - - Thomas, Bob, and Bob Clements, "FTP Server-Server Interaction", - RFC 438 (NIC 13770), BBN, 15 January 1973. - - Braden, Bob, "Print Files in FTP", RFC 448 (NIC 13299), UCLA/CCN, - 27 February 1973. - - McKenzie, Alex, "File Transfer Protocol", RFC 454 (NIC 14333), BBN, - 16 February 1973. - - -Postel & Reynolds [Page 66] - - - -RFC 959 October 1985 -File Transfer Protocol - - - Bressler, Bob, and Bob Thomas, "Mail Retrieval via FTP", RFC 458 - (NIC 14378), BBN-NET and BBN-TENEX, 20 February 1973. - - Neigus, Nancy, "File Transfer Protocol", RFC 542 (NIC 17759), BBN, - 12 July 1973. - - Krilanovich, Mark, and George Gregg, "Comments on the File Transfer - Protocol", RFC 607 (NIC 21255), UCSB, 7 January 1974. - - Pogran, Ken, and Nancy Neigus, "Response to RFC 607 - Comments on the - File Transfer Protocol", RFC 614 (NIC 21530), BBN, 28 January 1974. - - Krilanovich, Mark, George Gregg, Wayne Hathaway, and Jim White, - "Comments on the File Transfer Protocol", RFC 624 (NIC 22054), UCSB, - Ames Research Center, SRI-ARC, 28 February 1974. - - Bhushan, Abhay, "FTP Comments and Response to RFC 430", RFC 463 - (NIC 14573), MIT-DMCG, 21 February 1973. - - Braden, Bob, "FTP Data Compression", RFC 468 (NIC 14742), UCLA/CCN, - 8 March 1973. - - Bhushan, Abhay, "FTP and Network Mail System", RFC 475 (NIC 14919), - MIT-DMCG, 6 March 1973. - - Bressler, Bob, and Bob Thomas "FTP Server-Server Interaction - II", - RFC 478 (NIC 14947), BBN-NET and BBN-TENEX, 26 March 1973. - - White, Jim, "Use of FTP by the NIC Journal", RFC 479 (NIC 14948), - SRI-ARC, 8 March 1973. - - White, Jim, "Host-Dependent FTP Parameters", RFC 480 (NIC 14949), - SRI-ARC, 8 March 1973. - - Padlipsky, Mike, "An FTP Command-Naming Problem", RFC 506 - (NIC 16157), MIT-Multics, 26 June 1973. - - Day, John, "Memo to FTP Group (Proposal for File Access Protocol)", - RFC 520 (NIC 16819), Illinois, 25 June 1973. - - Merryman, Robert, "The UCSD-CC Server-FTP Facility", RFC 532 - (NIC 17451), UCSD-CC, 22 June 1973. - - Braden, Bob, "TENEX FTP Problem", RFC 571 (NIC 18974), UCLA/CCN, - 15 November 1973. - - - - -Postel & Reynolds [Page 67] - - - -RFC 959 October 1985 -File Transfer Protocol - - - McKenzie, Alex, and Jon Postel, "Telnet and FTP Implementation - - Schedule Change", RFC 593 (NIC 20615), BBN and MITRE, - 29 November 1973. - - Sussman, Julie, "FTP Error Code Usage for More Reliable Mail - Service", RFC 630 (NIC 30237), BBN, 10 April 1974. - - Postel, Jon, "Revised FTP Reply Codes", RFC 640 (NIC 30843), - UCLA/NMC, 5 June 1974. - - Harvey, Brian, "Leaving Well Enough Alone", RFC 686 (NIC 32481), - SU-AI, 10 May 1975. - - Harvey, Brian, "One More Try on the FTP", RFC 691 (NIC 32700), SU-AI, - 28 May 1975. - - Lieb, J., "CWD Command of FTP", RFC 697 (NIC 32963), 14 July 1975. - - Harrenstien, Ken, "FTP Extension: XSEN", RFC 737 (NIC 42217), SRI-KL, - 31 October 1977. - - Harrenstien, Ken, "FTP Extension: XRSQ/XRCP", RFC 743 (NIC 42758), - SRI-KL, 30 December 1977. - - Lebling, P. David, "Survey of FTP Mail and MLFL", RFC 751, MIT, - 10 December 1978. - - Postel, Jon, "File Transfer Protocol Specification", RFC 765, ISI, - June 1980. - - Mankins, David, Dan Franklin, and Buzz Owen, "Directory Oriented FTP - Commands", RFC 776, BBN, December 1980. - - Padlipsky, Michael, "FTP Unique-Named Store Command", RFC 949, MITRE, - July 1985. - - - -Postel & Reynolds [Page 68] - - - -RFC 959 October 1985 -File Transfer Protocol - - -REFERENCES - - [1] Feinler, Elizabeth, "Internet Protocol Transition Workbook", - Network Information Center, SRI International, March 1982. - - [2] Postel, Jon, "Transmission Control Protocol - DARPA Internet - Program Protocol Specification", RFC 793, DARPA, September 1981. - - [3] Postel, Jon, and Joyce Reynolds, "Telnet Protocol - Specification", RFC 854, ISI, May 1983. - - [4] Reynolds, Joyce, and Jon Postel, "Assigned Numbers", RFC 943, - ISI, April 1985. - - -Postel & Reynolds [Page 69] - -]]> -
- - -
diff --git a/plexus-servers/ftpd/src/documentation/content/xdocs/site.xml b/plexus-servers/ftpd/src/documentation/content/xdocs/site.xml deleted file mode 100644 index 0ea8a5f2d..000000000 --- a/plexus-servers/ftpd/src/documentation/content/xdocs/site.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plexus-servers/ftpd/src/documentation/content/xdocs/site_cmd.xml b/plexus-servers/ftpd/src/documentation/content/xdocs/site_cmd.xml deleted file mode 100644 index 0468f0571..000000000 --- a/plexus-servers/ftpd/src/documentation/content/xdocs/site_cmd.xml +++ /dev/null @@ -1,204 +0,0 @@ - - - - - -
- SITE Command - - - -
- -
Overview -

SITE command is used by the server to provide services specific to the system. Most of the SITE commands - can be used by the admin only. You can get all the available SITE commands by "SITE HELP". -

-

All the server administrative tasks can be performed by the SITE command. So the administrator - can monitor, control the server remotely. All the available SITE commands descriptions with sample outputs are as follows: -

-
-
SITE HELP -

- This is the only SITE command that can be executed by non-admin user. It returns all the available SITE commands. -

- -ftp> quote SITE HELP -200- -ADDIP <IP> : add banned IP entry -ADDUSER <userName> : add user -DELIP <IP> : delete banned IP entry -DELUSER <userName> : delete user -DESCUSER <userName> : describe user -HELP : display this message -KICK <userName> : close the connection -LISTIP : display all banned IPs -LISTUSER : display all user names -SETATTR <userName> <attrName> <attrValue> : set user attributes -STAT : show statistics -WHO : display all connected users -200 -ftp> - -
- -
SITE WHO -

- You can get the list of all the currently connected user by this SITE command. It returns user name, client IP, login time and last access time. - You can disconnect a client connection using SITE KICK <userName>. If an user has logged-in multiple times, all these connections will - get disconnected. -

- -ftp> quote SITE WHO -200- -admin 127.0.0.1 10/17 19:45:42 10/17 20:17:37 -admin 127.0.0.1 10/17 19:46:13 10/17 20:17:24 -anonymous 127.0.0.1 10/17 19:46:21 10/17 20:16:45 -anonymous 127.0.0.1 10/17 19:46:42 10/17 20:02:50 -ranab 127.0.0.1 10/17 20:09:39 10/17 20:09:40 -200 -ftp> quote SITE KICK ranab -200 Command SITE okay -ftp> quote SITE WHO -200- -admin 127.0.0.1 10/17 19:45:42 10/17 20:17:37 -admin 127.0.0.1 10/17 19:46:13 10/17 20:18:33 -anonymous 127.0.0.1 10/17 19:46:21 10/17 20:18:16 -anonymous 127.0.0.1 10/17 19:46:42 10/17 20:02:50 -200 -ftp> - -
-
SITE LISTIP -

- SITE LISTIP returns all the banned/allowed IPs. - New entries can be added by SITE ADDIP <entry>. - Similarly existing entries can be removed by SITE DELIP <entry>. -

- -ftp> quote SITE LISTIP -200- -200 -ftp> quote SITE ADDIP 111.222.* -200 Command SITE okay -ftp> quote SITE ADDIP 222.111.100.* -200 Command SITE okay -ftp> quote SITE LISTIP -200- -111.222.* -222.111.100.* -200 -ftp> quote SITE DELIP 111.222.* -200 Command SITE okay -ftp> quote SITE LISTIP -200- -222.111.100.* -200 -ftp> - -
-
SITE LISTUSER -

- This command returns all the user names in the user store. - By executing SITE DESCUSER <userName> we can get the user parameters (except password). - Existing users can be removed by SITE DELUSER <userName>. -

- -ftp> quote SITE LISTUSER -200- -admin -anonymous -ranab -user1 -200 -ftp> quote SITE DESCUSER user1 -200- -login : user1 -password : ****** -home : C:/ -writepermission : true -enable : true -maxidletime : 1800 -maxuploadrate : 0 -maxdownloadrate : 0 -200 -ftp> quote SITE DELUSER user1 -200 Command SITE okay -ftp> quote SITE LISTUSER -200- -admin -anonymous -ranab -200 -ftp> - -
- -
SITE ADDUSER -

- New users can be added using this command. - The newly created user will have default parameters. The attributes are : -

-
    -
  • password (default - empty string : "")
  • -
  • home (default - configured default root)
  • -
  • writepermission (default - false)
  • -
  • enable (default - false)
  • -
  • maxidletime (default - configured default idle time)
  • -
  • maxuploadrate (default - no limit)
  • -
  • maxdownloadrate (default - no limit)
  • -
-

- We can change any user attribute by SITE SETATTR <userName> <attrName> <attrValue> command. -

- -ftp> quote SITE LISTUSER -200- -admin -anonymous -ranab -200 -ftp> quote SITE ADDUSER user2 -200 Command SITE okay -ftp> quote SITE DESCUSER user2 -200- -login : user2 -password : ****** -home : C:/ -writepermission : false -enable : false -maxidletime : 300 -maxuploadrate : 0 -maxdownloadrate : 0 -200 -ftp> quote SITE SETATTR user2 password userpassword -200 Command SITE okay -ftp> quote SITE SETATTR user2 home C:/myCode -200 Command SITE okay -ftp> quote SITE SETATTR user2 enable true -200 Command SITE okay -ftp> quote SITE SETATTR user2 maxuploadrate 5600 -200 Command SITE okay -ftp> quote SITE DESCUSER user2 -200- -login : user2 -password : ****** -home : C:/myCode/ -writepermission : false -enable : true -maxidletime : 300 -maxuploadrate : 5600 -maxdownloadrate : 0 -200 -ftp> quote SITE LISTUSER -200- -admin -anonymous -ranab -user2 -200 -ftp> - -
- -
diff --git a/plexus-servers/ftpd/src/documentation/content/xdocs/tabs.xml b/plexus-servers/ftpd/src/documentation/content/xdocs/tabs.xml deleted file mode 100644 index fd14e590a..000000000 --- a/plexus-servers/ftpd/src/documentation/content/xdocs/tabs.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - diff --git a/plexus-servers/ftpd/src/documentation/content/xdocs/user_manager.xml b/plexus-servers/ftpd/src/documentation/content/xdocs/user_manager.xml deleted file mode 100644 index 0eba67109..000000000 --- a/plexus-servers/ftpd/src/documentation/content/xdocs/user_manager.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - -
- User Manager - - - -
- -
User Manager -

- The default user manager is properties file based. All the user - informations (login, password, home directory, upload/download rate etc.) are stored in - user.properties file. The default user manager class is org.apache.ftpserver.usermanager.PropertiesUserManager - If you want to use different user manager, please change the user-manager block in assembly.xml file. -

-

- You can encrypt the password in properties based user manager by specifying - encrypt key in config.xml file. The encryption algorithm is MD5. -

-

- If you are using property file based default user manager, - make sure that the user properties file is not accesible by the FTP users. Otherwise it will be - a security problem. Keep it below the user virtual root directory. -

-

- You can change the default user manager or even write your own user manager - by implementating org.apache.ftpserver.usermanager.UserManagerInterface class. - You have to specify your user manager class (fully qualified) in the assembly file too. -

-
- -
diff --git a/plexus-servers/ftpd/src/documentation/content/xdocs/weare.xml b/plexus-servers/ftpd/src/documentation/content/xdocs/weare.xml deleted file mode 100644 index 6e074d23e..000000000 --- a/plexus-servers/ftpd/src/documentation/content/xdocs/weare.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - -
- We Are - - - -
- -
This list -

- Special thanks go to the following people for their contributions to this project. - We also appreciate documentation, feedback, and bug reports. This is a living document - that describes the key contributors to James. Last Updated March 2003. -

-
-
Active Commiters -
    -
  • Rana Bhattacharyya (rana_b at yahoo.com)
  • -
  • Paul Hammant
  • -
-
- -
diff --git a/plexus-servers/ftpd/src/documentation/resources/images/ftpserver-logo.gif b/plexus-servers/ftpd/src/documentation/resources/images/ftpserver-logo.gif deleted file mode 100644 index 01bc01607..000000000 Binary files a/plexus-servers/ftpd/src/documentation/resources/images/ftpserver-logo.gif and /dev/null differ diff --git a/plexus-servers/ftpd/src/documentation/resources/images/incubator-logo.gif b/plexus-servers/ftpd/src/documentation/resources/images/incubator-logo.gif deleted file mode 100644 index 310b42661..000000000 Binary files a/plexus-servers/ftpd/src/documentation/resources/images/incubator-logo.gif and /dev/null differ diff --git a/plexus-servers/ftpd/src/documentation/skinconf.xml b/plexus-servers/ftpd/src/documentation/skinconf.xml deleted file mode 100644 index de4f75838..000000000 --- a/plexus-servers/ftpd/src/documentation/skinconf.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ]> - - - - false - - false - - false - - true - - false - - incubator.apache.org - Incubator - - - FTPServer - http://incubator.apache.org/projects/ftpserver/ - images/ftpserver-logo.gif - - - Apache Incubator - http://incubator.apache.org - images/incubator-logo.gif - - - - - - - 2003 - The Apache Software Foundation. - - - - - - - - - - - - Built with Apache Forrest - http://xml.apache.org/forrest/ - images/built-with-forrest-button.png - 88 - 31 - - - - - diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/BaseFtpConnection.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/BaseFtpConnection.java deleted file mode 100644 index 3dc80a386..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/BaseFtpConnection.java +++ /dev/null @@ -1,336 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */package org.apache.ftpserver; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.net.InetAddress; -import java.net.Socket; - -import org.apache.avalon.cornerstone.services.connection.ConnectionHandler; -import org.apache.ftpserver.interfaces.FtpConnectionObserver; -import org.apache.ftpserver.interfaces.SpyConnectionInterface; -import org.apache.ftpserver.util.IoUtils; -import org.apache.ftpserver.util.Message; -import org.apache.ftpserver.util.StreamConnectorObserver; - - -/** - * This is a generic ftp connection handler. It delegates - * the request to appropriate methods in subclasses. - * - * @author Rana Bhattacharyya - */ -public -class BaseFtpConnection implements ConnectionHandler, StreamConnectorObserver { - - protected static final Class[] METHOD_INPUT_SIG = new Class[] {FtpRequest.class, FtpWriter.class}; - - protected FtpConfig mConfig = null; - protected FtpStatus mFtpStatus = null; - protected FtpDataConnection mDataConnection = null; - protected FtpUser mUser = null; - protected SpyConnectionInterface mSpy = null; - protected FtpConnectionObserver mObserver = null; - protected Socket mControlSocket = null; - protected FtpWriter mWriter = null; - protected boolean mbStopRequest = false; - - - /** - * Set configuration file and the control socket. - */ - public BaseFtpConnection(FtpConfig ftpConfig) { - mConfig = ftpConfig; - mFtpStatus = mConfig.getStatus(); - mUser = new FtpUser(); - } - - /** - * Server one FTP connection. - */ - public void handleConnection(final Socket socket) { - mControlSocket = socket; - InetAddress clientAddress = mControlSocket.getInetAddress(); - mConfig.getLogger().info("Handling new request from " + clientAddress.getHostAddress()); - mDataConnection = new FtpDataConnection(mConfig); - mUser.setClientAddress(clientAddress); - mConfig.getConnectionService().newConnection(this); - - BufferedReader in = null; - try { - in = new BufferedReader(new InputStreamReader(mControlSocket.getInputStream(), "ASCII")); - mWriter = new FtpWriter(mControlSocket, mConfig); - - // permission check - if( !mConfig.getIpRestrictor().hasPermission(mControlSocket.getInetAddress()) ) { - mWriter.write(mFtpStatus.getResponse(530, null, mUser, null)); - return; - } - mWriter.write(mFtpStatus.getResponse(220, null, mUser, null)); - - do { - notifyObserver(); - String commandLine = in.readLine(); - - // test command line - if(commandLine == null) { - break; - } - - spyRequest(commandLine); - if(commandLine.equals("")) { - continue; - } - - FtpRequest request = new FtpRequest(commandLine); - if(!hasPermission(request)) { - mWriter.write(mFtpStatus.getResponse(530, request, mUser, null)); - break; - } - - // execute command - service(request, mWriter); - } - while(!mbStopRequest); - } - catch(Exception ex) { - } - finally { - IoUtils.close(in); - IoUtils.close(mWriter); - ConnectionService conService = mConfig.getConnectionService(); - if (conService != null) { - conService.closeConnection(mUser.getSessionId()); - } - } - } - - - /** - * Execute the ftp command. - */ - public void service(FtpRequest request, FtpWriter writer) throws IOException { - try { - String metName = "do" + request.getCommand(); - Method actionMet = getClass().getDeclaredMethod(metName, METHOD_INPUT_SIG); - actionMet.invoke(this, new Object[] {request, writer}); - } - catch(NoSuchMethodException ex) { - writer.write(mFtpStatus.getResponse(502, request, mUser, null)); - } - catch(InvocationTargetException ex) { - writer.write(mFtpStatus.getResponse(500, request, mUser, null)); - Throwable th = ex.getTargetException(); - if (th instanceof java.io.IOException) { - throw (IOException)th; - } - else { - mConfig.getLogger().warn("BaseFtpConnection.service()", th); - } - } - catch(Exception ex) { - writer.write(mFtpStatus.getResponse(500, request, mUser, null)); - if (ex instanceof java.io.IOException) { - throw (IOException)ex; - } - else { - mConfig.getLogger().warn("BaseFtpConnection.service()", ex); - } - } - } - - /** - * Check permission - default implementation - does nothing. - */ - protected boolean hasPermission(FtpRequest request) { - return true; - } - - /** - * User logout and stop this thread. - */ - public void stop() { - mbStopRequest = true; - if (mDataConnection != null) { - mDataConnection.dispose(); - mDataConnection = null; - } - if (mControlSocket != null) { - try { - mControlSocket.close(); - } - catch(Exception ex) { - } - mControlSocket = null; - } - if (mUser.hasLoggedIn()) { - mUser.logout(); - } - mObserver = null; - } - - /** - * Is the connection closed? - */ - public boolean isClosed() { - return mbStopRequest; - } - - /** - * Monitor the user request. - */ - protected void spyRequest(final String str) { - final SpyConnectionInterface spy = mSpy; - if (spy != null) { - Message msg = new Message() { - public void execute() { - try { - spy.request(str + '\n'); - } - catch(Exception ex) { - mSpy = null; - mConfig.getLogger().error("BaseFtpConnection.spyPrint()", ex); - } - } - }; - mConfig.getMessageQueue().add(msg); - } - } - - /** - * Get user object - */ - public FtpUser getUser() { - return mUser; - } - - /** - * Get connection spy object - */ - public SpyConnectionInterface getSpyObject() { - return mSpy; - } - - /** - * Set spy object - */ - public void setSpyObject(SpyConnectionInterface spy) { - mWriter.setSpyObject(spy); - mSpy = spy; - } - - /** - * Get observer - */ - public FtpConnectionObserver getObserver() { - return mObserver; - } - - /** - * Set observer - */ - public void setObserver(FtpConnectionObserver obsr) { - mObserver = obsr; - } - - /** - * Notify observer. - */ - public void notifyObserver() { - mUser.hitUser(); - final FtpUser thisUser = mUser; - final FtpConnectionObserver obsr = mObserver; - - if (obsr != null) { - Message msg = new Message() { - public void execute() { - obsr.updateConnection(thisUser); - } - }; - mConfig.getMessageQueue().add(msg); - } - } - - /** - * This method tracks data transfer. - */ - public void dataTransferred(int sz) { - notifyObserver(); - } - - /** - * Get config object - */ - public FtpConfig getConfig() { - return mConfig; - } - - /** - * Get status object - */ - public FtpStatus getStatus() { - return mFtpStatus; - } - -} - - - - diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/ConnectionService.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/ConnectionService.java deleted file mode 100644 index 5ee18def7..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/ConnectionService.java +++ /dev/null @@ -1,500 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver; - -import java.io.File; -import java.util.List; -import java.util.Vector; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.Timer; -import java.util.TimerTask; -import org.apache.ftpserver.util.Message; -import org.apache.ftpserver.interfaces.FtpConnectionObserver; -import org.apache.ftpserver.interfaces.SpyConnectionInterface; -import org.apache.ftpserver.usermanager.User; -import org.apache.ftpserver.usermanager.UserManagerInterface; - -/** - * Ftp connection service class. It tracks all ftp connections. - * - * @author Rana Bhattacharyya - */ -public -class ConnectionService { - - private FtpConnectionObserver mObserver; - private FtpConfig mConfig; - private Timer mTimer; - private Vector mConList; - - - /** - * Constructor. Start scheduler job. - */ - public ConnectionService(FtpConfig cfg) throws Exception { - mConfig = cfg; - mConList = new Vector(); - - // default users creation - createDefaultUsers(); - - // set timer to remove inactive users and load data - mTimer = new Timer(); - TimerTask timerTask = new TimerTask() { - public void run() { - timerTask(); - } - }; - mTimer.schedule(timerTask, 0, mConfig.getSchedulerInterval()*1000); - } - - /** - * Create default users (admin/anonymous) if necessary - */ - private void createDefaultUsers() throws Exception { - UserManagerInterface userManager = mConfig.getUserManager(); - - // create admin user - String adminName = userManager.getAdminName(); - if(!userManager.doesExist(adminName)) { - mConfig.getLogger().info("Creating user " + adminName); - User adminUser = new User(); - adminUser.setName(adminName); - adminUser.setPassword(adminName); - adminUser.setEnabled(true); - adminUser.getVirtualDirectory().setWritePermission(true); - adminUser.setMaxUploadRate(0); - adminUser.setMaxDownloadRate(0); - adminUser.getVirtualDirectory().setRootDirectory(mConfig.getDefaultRoot()); - adminUser.setMaxIdleTime(mConfig.getDefaultIdleTime()); - userManager.save(adminUser); - } - - // create anonymous user - if(!userManager.doesExist(FtpUser.ANONYMOUS)) { - mConfig.getLogger().info("Creating user " + FtpUser.ANONYMOUS); - User anonUser = new User(); - anonUser.setName(FtpUser.ANONYMOUS); - anonUser.setPassword(""); - anonUser.setEnabled(true); - anonUser.getVirtualDirectory().setWritePermission(false); - anonUser.setMaxUploadRate(4800); - anonUser.setMaxDownloadRate(4800); - anonUser.getVirtualDirectory().setRootDirectory(mConfig.getDefaultRoot()); - anonUser.setMaxIdleTime(mConfig.getDefaultIdleTime()); - userManager.save(anonUser); - } - } - - /** - * It returns a list of all the currently connected users. - */ - public List getAllUsers() { - List userList = new ArrayList(); - synchronized(mConList) { - for(Iterator conIt=mConList.iterator(); conIt.hasNext(); ) { - BaseFtpConnection conObj = (BaseFtpConnection)conIt.next(); - if (conObj != null) { - userList.add(conObj.getUser()); - } - } - } - return userList; - } - - /** - * Set user manager observer. - */ - public void setObserver(FtpConnectionObserver obsr ) { - mObserver = obsr; - synchronized(mConList) { - for(Iterator conIt=mConList.iterator(); conIt.hasNext(); ) { - BaseFtpConnection conObj = (BaseFtpConnection)conIt.next(); - if (conObj != null) { - conObj.setObserver(mObserver); - } - } - } - } - - /** - * Get the observer. - */ - public FtpConnectionObserver getObserver() { - return mObserver; - } - - /** - * User login method. If successfull, populates the user object. - */ - public boolean login(final FtpUser thisUser) { - - // already logged in - if(thisUser.hasLoggedIn()) { - return true; - } - - // get name and password - String user = thisUser.getName(); - String password = thisUser.getPassword(); - if( (user == null) || (password == null) ) { - return false; - } - - // authenticate user - UserManagerInterface userManager = mConfig.getUserManager(); - boolean bAnonymous = thisUser.getIsAnonymous(); - if ( !(bAnonymous || userManager.authenticate(user, password)) ) { - mConfig.getLogger().warn("Authentication failed - " + user); - return false; - } - - // populate user properties - if (!populateProperties(thisUser, user)){ - return false; - } - - // user enable check - if(!thisUser.getEnabled()) { - return false; - } - - // connection limit check - if (!checkConnection(thisUser)){ - return false; - } - - thisUser.login(); - thisUser.setPassword(null); - - // create user home if necessary - if( !createHome(thisUser) ) { - return false; - } - mConfig.getLogger().info("User login - " + thisUser.getClientAddress().getHostAddress() + " - " + thisUser.getName()); - - // update global statistics - mConfig.getStatistics().setLogin(thisUser.getIsAnonymous()); - return true; - } - - /** - * Close ftp connection for this session id. - */ - public void closeConnection(final String sessId) { - BaseFtpConnection con = null; - synchronized(mConList) { - con = getConnection(sessId); - if (con != null) { - mConList.remove(con); - } - } - - // close connection - if (con != null) { - - // logout notification - final FtpUser thisUser = con.getUser(); - if (thisUser.hasLoggedIn()) { - mConfig.getStatistics().setLogout(thisUser.getIsAnonymous()); - } - - // close socket - con.stop(); - - // send message - Message msg = new Message() { - public void execute() { - FtpConnectionObserver observer = mObserver; - if(observer != null) { - observer.removeConnection(thisUser); - } - } - }; - mConfig.getMessageQueue().add(msg); - mConfig.getStatistics().setCloseConnection(); - } - } - - - /** - * Close all - close all the connections. - */ - public void closeAllConnections() { - List allUsers = getAllUsers(); - for( Iterator userIt = allUsers.iterator(); userIt.hasNext(); ) { - FtpUser user = (FtpUser)userIt.next(); - closeConnection(user.getSessionId()); - } - } - - /** - * Populate user properties - */ - private boolean populateProperties(FtpUser thisUser, String user) { - - // get the existing user - UserManagerInterface userManager = mConfig.getUserManager(); - User existUser = userManager.getUserByName(user); - if(existUser == null) { - return false; - } - - // map properties - thisUser.getVirtualDirectory().setRootDirectory(new File(existUser.getVirtualDirectory().getRootDirectory())); - thisUser.setEnabled(existUser.getEnabled()); - thisUser.getVirtualDirectory().setWritePermission(existUser.getVirtualDirectory().getWritePermission()); - thisUser.setMaxIdleTime(existUser.getMaxIdleTime()); - thisUser.setMaxUploadRate(existUser.getMaxUploadRate()); - thisUser.setMaxDownloadRate(existUser.getMaxDownloadRate()); - return true; - } - - /** - * Connection limit check. - */ - private boolean checkConnection(FtpUser thisUser) { - int maxLogins = mConfig.getMaxConnections(); - int maxAnonLogins = mConfig.getMaxAnonymousLogins(); - int anonNbr = mConfig.getStatistics().getAnonLoginNbr(); - int totalNbr = mConfig.getStatistics().getLoginNbr(); - - // final check - if(thisUser.getIsAnonymous()) { - if(!mConfig.isAnonymousLoginAllowed()) { - return false; - } - if( (anonNbr>=maxAnonLogins) || (totalNbr>=maxLogins) ) { - return false; - } - mConfig.getLogger().info("Anonymous connection - " + thisUser.getClientAddress().getHostAddress() + " - " + thisUser.getPassword()); - } - else { - if(totalNbr>=maxLogins) { - return false; - } - } - return true; - } - - - /** - * Create user home directory if necessary - */ - private boolean createHome(FtpUser user) { - - File userHome = new File( user.getVirtualDirectory().getRootDirectory() ); - if( userHome.exists() ) { - if( !userHome.isDirectory() ) { - mConfig.getLogger().warn("User home (" + userHome.getAbsolutePath() + ") for user " + user.getName() + " is not a directory."); - return false; - } - } - else { - if( mConfig.isCreateHome() ) { - mConfig.getLogger().info("Creating home (" + userHome.getAbsolutePath() + ") for user " + user.getName()); - if( !userHome.mkdirs() ) { - mConfig.getLogger().warn("Cannot create home (" + userHome.getAbsolutePath() + ") for user " + user.getName()); - return false; - } - } - else { - mConfig.getLogger().warn("Cannot find home (" + userHome.getAbsolutePath() + ") for user " + user.getName()); - return false; - } - } - - return true; - } - - - /** - * New connection has been established - not yet logged-in. - */ - public void newConnection(final BaseFtpConnection newCon) { - - // null user - ignore - if (newCon == null) { - return; - } - - final FtpUser newUser = newCon.getUser(); - - mConList.add(newCon); - newUser.setMaxIdleTime(mConfig.getDefaultIdleTime()); - newUser.getVirtualDirectory().setRootDirectory(mConfig.getDefaultRoot()); - newCon.setObserver(mObserver); - mConfig.getLogger().info("New connection from " + newUser.getClientAddress().getHostAddress()); - - // notify observer about a new connection - final FtpConnectionObserver observer = mObserver; - if (observer != null) { - Message msg = new Message() { - public void execute() { - observer.newConnection(newUser); - } - }; - mConfig.getMessageQueue().add(msg); - } - - // update global statistics - mConfig.getStatistics().setOpenConnection(); - } - - - /** - * Set connection spy object - */ - public void setSpyObject(String sessId, SpyConnectionInterface spy) { - BaseFtpConnection con = getConnection(sessId); - if (con != null) { - con.setSpyObject(spy); - } - } - - /** - * Get connection object - */ - public BaseFtpConnection getConnection(String sessId) { - BaseFtpConnection con = null; - synchronized(mConList) { - for(Iterator conIt=mConList.iterator(); conIt.hasNext(); ) { - BaseFtpConnection conObj = (BaseFtpConnection)conIt.next(); - if (conObj != null) { - if ( conObj.getUser().getSessionId().equals(sessId) ) { - con = conObj; - break; - } - } - } - } - return con; - } - - /** - * Reset all spy objects - */ - public void resetAllSpyObjects() { - synchronized(mConList) { - for(Iterator conIt=mConList.iterator(); conIt.hasNext(); ) { - BaseFtpConnection conObj = (BaseFtpConnection)conIt.next(); - if (conObj != null) { - conObj.setSpyObject(null); - } - } - } - } - - /** - * Timer thread will call this method periodically to - * close inactice connections and load user information. - */ - public void timerTask() { - - // get inactive user list - ArrayList inactiveUserList = new ArrayList(); - long currTime = System.currentTimeMillis(); - synchronized(mConList) { - for( Iterator conIt=mConList.iterator(); conIt.hasNext(); ) { - BaseFtpConnection con = (BaseFtpConnection)conIt.next(); - if (con != null) { - FtpUser user = con.getUser(); - if (!user.isActive(currTime)) { - inactiveUserList.add(user); - } - } - } - } - - // remove inactive users - for( Iterator userIt=inactiveUserList.iterator(); userIt.hasNext(); ) { - FtpUser user = (FtpUser)userIt.next(); - mConfig.getLogger().info("Removing idle user " + user); - closeConnection(user.getSessionId()); - } - - // reload user data - UserManagerInterface userManager = mConfig.getUserManager(); - try { - userManager.reload(); - } - catch(Exception ex) { - mConfig.getLogger().error("ConnectionService.timerTask()", ex); - } - } - - /** - * Dispose connection service. If logs out all the connected - * users and stops the cleaner thread. - */ - public void dispose() { - - // close all connections - if (mConList != null) { - closeAllConnections(); - mConList = null; - } - - // stop timer - if (mTimer != null) { - mTimer.cancel(); - mTimer = null; - } - } - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpConfig.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpConfig.java deleted file mode 100644 index 4a804336a..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpConfig.java +++ /dev/null @@ -1,507 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver; - -import java.io.File; -import java.io.IOException; -import java.net.InetAddress; -import java.util.StringTokenizer; - -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.context.Context; -import org.apache.avalon.framework.logger.Logger; -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.ftpserver.ip.IpRestrictorInterface; -import org.apache.ftpserver.remote.RemoteHandler; -import org.apache.ftpserver.usermanager.UserManagerInterface; -import org.apache.ftpserver.util.AsyncMessageQueue; - -/** - * Ftp configuration class. It has all ftp server configuration - * parameters. This is not hot-editable. parameters will be loaded - * once during server startup. We can add our own config parameters. - * - * @author Rana Bhattacharyya - */ -public -class FtpConfig { - - private FtpStatus mStatus = null; - private ConnectionService mConService = null; - private IpRestrictorInterface mIpRestrictor = null; - private UserManagerInterface mUserManager = null; - - private InetAddress mServerAddress = null; - private InetAddress mSelfAddress = null; - - private Configuration mConf = null; - private Context mContext = null; - private Logger mLogger = null; - - private FtpStatistics mStatistics = null; - - private RemoteHandler mRemoteHandler = null; - - private int miServerPort; - private int miDataPort[][]; - private int miRmiPort; - private int miMaxLogin; - private int miAnonLogin; - private int miPollInterval; - private int miDefaultIdle; - private boolean mbAnonAllowed; - private boolean mbCreateHome; - private boolean mbRemoteAdminAllowed; - private File mDefaultRoot; - private AsyncMessageQueue mQueue; - - /** - * Default constructor - first step. - */ - public FtpConfig() throws IOException { - mStatus = new FtpStatus(); - mQueue = new AsyncMessageQueue(); - mQueue.setMaxSize(4096); - } - - /** - * Set logger - second step. - */ - public void setLogger(Logger logger) { - mLogger = logger; - } - - /** - * Set context - third step. - */ - public void setContext(Context ctx) { - mContext = ctx; - } - - /** - * Set component manager - fourth step. - * TODO - case for more blocks here? - PJH - */ - public void setServiceManager(ServiceManager serviceManager) throws ServiceException { - mIpRestrictor = (IpRestrictorInterface)serviceManager.lookup(IpRestrictorInterface.ROLE); - mUserManager = (UserManagerInterface)serviceManager.lookup(UserManagerInterface.ROLE); - } - - - /** - * Set configuration - fifth step. - */ - public void setConfiguration(Configuration conf) throws Exception { - mConf = conf; - Configuration tmpConf = null; - - // get server address - tmpConf = conf.getChild("server-host", false); - if(tmpConf != null) { - mServerAddress = InetAddress.getByName(tmpConf.getValue()); - } - - // get self address - tmpConf = conf.getChild("self-host", false); - if(tmpConf != null) { - mSelfAddress = InetAddress.getByName(tmpConf.getValue()); - } - - // get server port - miServerPort = 21; - tmpConf = conf.getChild("ftp-port", false); - if(tmpConf != null) { - miServerPort = tmpConf.getValueAsInteger(miServerPort); - } - - // get maximum number of connections - miMaxLogin = 20; - tmpConf = conf.getChild("max-connection", false); - if(tmpConf != null) { - miMaxLogin = tmpConf.getValueAsInteger(miMaxLogin); - } - - // get anonymous login allow flag - mbAnonAllowed = true; - tmpConf = conf.getChild("anonymous-login-allowed", false); - if(tmpConf != null) { - mbAnonAllowed = tmpConf.getValueAsBoolean(mbAnonAllowed); - } - - // get maximum number of anonymous connections - miAnonLogin = 10; - tmpConf = conf.getChild("anonymous-max-connection", false); - if(tmpConf != null) { - miAnonLogin = tmpConf.getValueAsInteger(miAnonLogin); - } - - // get scheduler interval - miPollInterval = 120; - tmpConf = conf.getChild("poll-interval", false); - if(tmpConf != null) { - miPollInterval = tmpConf.getValueAsInteger(miPollInterval); - } - - // get rmi port - miRmiPort = java.rmi.registry.Registry.REGISTRY_PORT; - tmpConf = conf.getChild("remote-admin-port", false); - if(tmpConf != null) { - miRmiPort = tmpConf.getValueAsInteger(miRmiPort); - } - - // get remote admin allow flag - mbRemoteAdminAllowed = true; - tmpConf = conf.getChild("remote-admin-allowed", false); - if(tmpConf != null) { - mbRemoteAdminAllowed = tmpConf.getValueAsBoolean(mbRemoteAdminAllowed); - } - - // get autometic user home creation flag - mbCreateHome = false; - tmpConf = conf.getChild("create-user-home", false); - if(tmpConf != null) { - mbCreateHome = tmpConf.getValueAsBoolean(mbCreateHome); - } - - // get default idle time - miDefaultIdle = 300; - tmpConf = conf.getChild("default-idle-time", false); - if(tmpConf != null) { - miDefaultIdle = tmpConf.getValueAsInteger(miDefaultIdle); - } - - // get default root - String defaultRoot = "/"; - tmpConf = conf.getChild("default-user-root", false); - if(tmpConf != null) { - defaultRoot = tmpConf.getValue(defaultRoot); - } - mDefaultRoot = new File(defaultRoot); - - // get data port number - String dataPort = "0"; - tmpConf = conf.getChild("data-port-pool", false); - if(tmpConf != null) { - dataPort = tmpConf.getValue(dataPort); - } - StringTokenizer st = new StringTokenizer(dataPort, ", \t\n\r\f"); - miDataPort = new int[st.countTokens()][2]; - for(int i=0; i= 0) && (!currThread.isInterrupted()) ) { - - // search for a free port - for(int i=0; iFtpServer.stop() method will call this method. - */ - public void dispose() { - - // close remote handler - if (mRemoteHandler != null) { - mRemoteHandler.dispose(); - mRemoteHandler = null; - } - - // close connection service - if(mConService != null) { - mConService.dispose(); - mConService = null; - } - - // close message queue - if (mQueue != null) { - mQueue.stop(); - mQueue = null; - } - } - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpConnection.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpConnection.java deleted file mode 100644 index 07068e1c3..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpConnection.java +++ /dev/null @@ -1,1351 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver; - -import java.io.File; -import java.io.RandomAccessFile; -import java.io.InputStream; -import java.io.FileInputStream; -import java.io.OutputStream; -import java.io.FileOutputStream; -import java.io.Writer; -import java.io.OutputStreamWriter; -import java.io.IOException; -import java.net.Socket; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.StringTokenizer; - -import org.apache.ftpserver.util.IoUtils; -import org.apache.ftpserver.util.StreamConnector; - -/** - * This class handles each ftp connection. Here all the ftp command - * methods take two arguments - a ftp request and a writer object. - * This is the main backbone of the ftp server. - *
- * The ftp command method signature is: - * public void doXYZ(FtpRequest request, FtpWriter out) throws IOException. - *
- * Here XYZ is the capitalized ftp command. - * - * @author Rana Bhattacharyya - */ -public -class FtpConnection extends BaseFtpConnection { - - // as SimpleDateFormat is not thread-safe we have to use ThreadLocal - private final static ThreadLocal DATE_FMT = new ThreadLocal() { - protected Object initialValue() { - return new SimpleDateFormat("yyyyMMddHHmmss.SSS"); - } - }; - - // command state specific temporary variables - private boolean mbReset = false; - private long mlSkipLen = 0; - - private boolean mbRenFr = false; - private String mstRenFr = null; - - private boolean mbUser = false; - private boolean mbPass = false; - - /** - * Set configuration file and the control socket. - */ - public FtpConnection(FtpConfig cfg) { - super(cfg); - } - - /** - * Check the user permission to execute this command. - */ - protected boolean hasPermission(FtpRequest request) { - String cmd = request.getCommand(); - return mUser.hasLoggedIn() || - cmd.equals("USER") || - cmd.equals("PASS") || - cmd.equals("AUTH") || - cmd.equals("HELP") || - cmd.equals("SYST"); - } - - /** - * Reset temporary state variables. - */ - private void resetState() { - mbRenFr = false; - mstRenFr = null; - - mbReset = false; - mlSkipLen = 0; - - mbUser = false; - mbPass = false; - } - - //////////////////////////////////////////////////////////// - ///////////////// all the FTP handlers ///////////////// - //////////////////////////////////////////////////////////// - /** - * ABOR <CRLF>
- * - * This command tells the server to abort the previous FTP - * service command and any associated transfer of data. - * No action is to be taken if the previous command - * has been completed (including data transfer). The control - * connection is not to be closed by the server, but the data - * connection must be closed. - * Current implementation does not do anything. As here data - * transfers are not multi-threaded. - */ - public void doABOR(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // and abort any data connection - mDataConnection.closeDataSocket(); - out.write(mFtpStatus.getResponse(225, request, mUser, null)); - } - - - /** - * APPE <SP> <pathname> <CRLF>
- * - * This command causes the server-DTP to accept the data - * transferred via the data connection and to store the data in - * a file at the server site. If the file specified in the - * pathname exists at the server site, then the data shall be - * appended to that file; otherwise the file specified in the - * pathname shall be created at the server site. - */ - public void doAPPE(FtpRequest request, FtpWriter out) throws IOException { - - InputStream is = null; - OutputStream os = null; - String[] args = null; - - try { - - // reset state variables - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // get filenames - String fileName = request.getArgument(); - fileName = mUser.getVirtualDirectory().getAbsoluteName(fileName); - String physicalName = mUser.getVirtualDirectory().getPhysicalName(fileName); - File requestedFile = new File(physicalName); - args = new String[] {fileName}; - - // check file existance - if(!(requestedFile.exists() && requestedFile.isFile())) { - out.write(mFtpStatus.getResponse(550, request, mUser, args)); - return ; - } - - // check permission - if(!mUser.getVirtualDirectory().hasWritePermission(physicalName, true)) { - out.write(mFtpStatus.getResponse(450, request, mUser, args)); - return ; - } - - // now transfer file data - out.write(mFtpStatus.getResponse(150, request, mUser, args)); - Socket dataSoc = mDataConnection.getDataSocket(); - if(dataSoc == null) { - out.write(mFtpStatus.getResponse(550, request, mUser, args)); - return ; - } - - // go to the end of the file - is = dataSoc.getInputStream(); - RandomAccessFile raf = new RandomAccessFile(requestedFile, "rw"); - raf.seek(raf.length()); - os = mUser.getOutputStream(new FileOutputStream(raf.getFD())); - - // receive data from client - StreamConnector msc = new StreamConnector(is, os); - msc.setMaxTransferRate(mUser.getMaxUploadRate()); - msc.setObserver(this); - msc.connect(); - - if(msc.hasException()) { - out.write(mFtpStatus.getResponse(451, request, mUser, args)); - } - else { - mConfig.getStatistics().setUpload(requestedFile, mUser, msc.getTransferredSize()); - } - - out.write(mFtpStatus.getResponse(226, request, mUser, args)); - } - catch(IOException ex) { - out.write(mFtpStatus.getResponse(425, request, mUser, args)); - } - finally { - IoUtils.close(is); - IoUtils.close(os); - mDataConnection.closeDataSocket(); - } - } - - - /** - * CDUP <CRLF>
- * - * This command is a special case of CWD, and is included to - * simplify the implementation of programs for transferring - * directory trees between operating systems having different - * syntaxes for naming the parent directory. The reply codes - * shall be identical to the reply codes of CWD. - */ - public void doCDUP(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // change directory - if(mUser.getVirtualDirectory().changeDirectory("..")) { - String args[] = {mUser.getVirtualDirectory().getCurrentDirectory()}; - out.write(mFtpStatus.getResponse(250, request, mUser, args)); - } - else { - out.write(mFtpStatus.getResponse(550, request, mUser, null)); - } - } - - - /** - * CWD <SP> <pathname> <CRLF>
- * - * This command allows the user to work with a different - * directory for file storage or retrieval without - * altering his login or accounting information. Transfer - * parameters are similarly unchanged. The argument is a - * pathname specifying a directory. - */ - public void doCWD(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // get new directory name - String dirName = "/"; - if(request.hasArgument()) { - dirName = request.getArgument(); - } - - // change directory - if(mUser.getVirtualDirectory().changeDirectory(dirName)) { - String args[] = {mUser.getVirtualDirectory().getCurrentDirectory()}; - out.write(mFtpStatus.getResponse(250, request, mUser, args)); - } - else { - out.write(mFtpStatus.getResponse(550, request, mUser, null)); - } - } - - - /** - * DELE <SP> <pathname> <CRLF>
- * - * This command causes the file specified in the pathname to be - * deleted at the server site. - */ - public void doDELE(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // get filenames - String fileName = request.getArgument(); - fileName = mUser.getVirtualDirectory().getAbsoluteName(fileName); - String physicalName = mUser.getVirtualDirectory().getPhysicalName(fileName); - File requestedFile = new File(physicalName); - String[] args = {fileName}; - - // check file existance - if( !(requestedFile.exists() && requestedFile.isFile()) ) { - out.write(mFtpStatus.getResponse(550, request, mUser, args)); - return; - } - - // check permission - if(!mUser.getVirtualDirectory().hasWritePermission(physicalName, true)) { - out.write(mFtpStatus.getResponse(450, request, mUser, args)); - return ; - } - - // now delete - if(requestedFile.delete()) { - out.write(mFtpStatus.getResponse(250, request, mUser, args)); - mConfig.getStatistics().setDelete(requestedFile, mUser); - } - else { - out.write(mFtpStatus.getResponse(450, request, mUser, args)); - } - } - - - /** - * HELP [<SP> ] <CRLF>
- * - * This command shall cause the server to send helpful - * information regarding its implementation status over the - * control connection to the user. The command may take an - * argument (e.g., any command name) and return more specific - * information as a response. - */ - public void doHELP(FtpRequest request, FtpWriter out) throws IOException { - resetState(); - - // print global help - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(214, null, mUser, null)); - return ; - } - - // print command specific help - String ftpCmd = request.getArgument().toUpperCase(); - String args[] = null; - FtpRequest tempRequest = new FtpRequest(ftpCmd); - out.write(mFtpStatus.getResponse(214, tempRequest, mUser, args)); - return ; - } - - - /** - * LIST [<SP> <pathname>] <CRLF>
- * - * This command causes a list to be sent from the server to the - * passive DTP. If the pathname specifies a directory or other - * group of files, the server should transfer a list of files - * in the specified directory. If the pathname specifies a - * file then the server should send current information on the - * file. A null argument implies the user's current working or - * default directory. The data transfer is over the data - * connection - */ - public void doLIST(FtpRequest request, FtpWriter out) throws IOException { - - Writer os = null; - try { - - // reset state variables - resetState(); - - // get data connection - out.write(mFtpStatus.getResponse(150, request, mUser, null)); - Socket dataSoc = mDataConnection.getDataSocket(); - if(dataSoc == null) { - out.write(mFtpStatus.getResponse(550, request, mUser, null)); - return ; - } - - // transfer listing data - os = new OutputStreamWriter(dataSoc.getOutputStream()); - if(!mUser.getVirtualDirectory().printList(request.getArgument(), os)) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - } - else { - out.write(mFtpStatus.getResponse(226, request, mUser, null)); - } - } - catch(IOException ex) { - out.write(mFtpStatus.getResponse(425, request, mUser, null)); - } - finally { - IoUtils.close(os); - mDataConnection.closeDataSocket(); - } - } - - - /** - * MDTM <SP> <pathname> <CRLF>
- * - * Returns the date and time of when a file was modified. - */ - public void doMDTM(FtpRequest request, FtpWriter out) throws IOException { - - // reset state - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // get filenames - String fileName = request.getArgument(); - fileName = mUser.getVirtualDirectory().getAbsoluteName(fileName); - String physicalName = mUser.getVirtualDirectory().getPhysicalName(fileName); - File reqFile = new File(physicalName); - - // now print date - if(reqFile.exists()) { - SimpleDateFormat fmt = (SimpleDateFormat)DATE_FMT.get(); - String args[] = {fmt.format(new Date(reqFile.lastModified()))}; - out.write(mFtpStatus.getResponse(213, request, mUser, args)); - } - else { - out.write(mFtpStatus.getResponse(550, request, mUser, null)); - } - } - - - /** - * MKD <SP> <pathname> <CRLF>
- * - * This command causes the directory specified in the pathname - * to be created as a directory (if the pathname is absolute) - * or as a subdirectory of the current working directory (if - * the pathname is relative). - */ - public void doMKD(FtpRequest request, FtpWriter out) throws IOException { - - // reset state - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // get filename - String fileName = request.getArgument(); - fileName = mUser.getVirtualDirectory().getAbsoluteName(fileName); - String physicalName = mUser.getVirtualDirectory().getPhysicalName(fileName); - String args[] = {fileName}; - - // check permission - if(!mUser.getVirtualDirectory().hasCreatePermission(physicalName, true)) { - out.write(mFtpStatus.getResponse(450, request, mUser, args)); - return ; - } - - // now create directory - if(new File(physicalName).mkdirs()) { - out.write(mFtpStatus.getResponse(250, request, mUser, args)); - } - else { - out.write(mFtpStatus.getResponse(450, request, mUser, args)); - } - } - - - /** - * MODE <SP> <CRLF>
- * - * The argument is a single Telnet character code specifying - * the data transfer modes described in the Section on - * Transmission Modes. - */ - public void doMODE(FtpRequest request, FtpWriter out) throws IOException { - - // reset state - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // set mode - if(mUser.setMode(request.getArgument().charAt(0))) { - out.write(mFtpStatus.getResponse(200, request, mUser, null)); - } - else { - out.write(mFtpStatus.getResponse(504, request, mUser, null)); - } - } - - - /** - * NLST [<SP> <pathname>] <CRLF>
- * - * This command causes a directory listing to be sent from - * server to user site. The pathname should specify a - * directory or other system-specific file group descriptor; a - * null argument implies the current directory. The server - * will return a stream of names of files and no other - * information. - */ - public void doNLST(FtpRequest request, FtpWriter out) throws IOException { - - Writer os = null; - try { - - // reset state - resetState(); - - // get data connection - out.write(mFtpStatus.getResponse(150, request, mUser, null)); - Socket dataSoc = mDataConnection.getDataSocket(); - if(dataSoc == null) { - out.write(mFtpStatus.getResponse(550, request, mUser, null)); - return ; - } - - // print listing data - os = new OutputStreamWriter(dataSoc.getOutputStream()); - if(!mUser.getVirtualDirectory().printNList(request.getArgument(), os)) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - } - else { - out.write(mFtpStatus.getResponse(226, request, mUser, null)); - } - } - catch(IOException ex) { - out.write(mFtpStatus.getResponse(425, request, mUser, null)); - } - finally { - IoUtils.close(os); - mDataConnection.closeDataSocket(); - } - } - - - /** - * NOOP <CRLF>
- * - * This command does not affect any parameters or previously - * entered commands. It specifies no action other than that the - * server send an OK reply. - */ - public void doNOOP(FtpRequest request, FtpWriter out) throws IOException { - resetState(); - out.write(mFtpStatus.getResponse(200, request, mUser, null)); - } - - - /** - * PASS <SP> <CRLF>
- * - * The argument field is a Telnet string specifying the user's - * password. This command must be immediately preceded by the - * user name command. - */ - public void doPASS(FtpRequest request, FtpWriter out) throws IOException { - - // set state variables - if(!mbUser) { - out.write(mFtpStatus.getResponse(500, request, mUser, null)); - resetState(); - return ; - } - resetState(); - mbPass = true; - - // set user password and login - String pass = request.hasArgument() ? request.getArgument() : ""; - mUser.setPassword(pass); - - // login failure - close connection - String args[] = {mUser.getName()}; - if(mConfig.getConnectionService().login(mUser)) { - out.write(mFtpStatus.getResponse(230, request, mUser, args)); - } - else { - out.write(mFtpStatus.getResponse(530, request, mUser, args)); - ConnectionService conService = mConfig.getConnectionService(); - if(conService != null) { - conService.closeConnection(mUser.getSessionId()); - } - } - } - - - /** - * PASV <CRLF>
- * - * This command requests the server-DTP to "listen" on a data - * port (which is not its default data port) and to wait for a - * connection rather than initiate one upon receipt of a - * transfer command. The response to this command includes the - * host and port address this server is listening on. - */ - public void doPASV(FtpRequest request, FtpWriter out) throws IOException { - - // reset state - resetState(); - - // set data connection - if(!mDataConnection.setPasvCommand()) { - out.write(mFtpStatus.getResponse(550, request, mUser, null)); - return ; - } - - // get connection info - InetAddress servAddr = mDataConnection.getInetAddress(); - if(servAddr == null) { - servAddr = mConfig.getSelfAddress(); - } - - int servPort = mDataConnection.getPort(); - - // send connection info to client - String addrStr = servAddr.getHostAddress().replace('.', ',') + ',' + (servPort >> 8) + ',' + (servPort & 0xFF); - String[] args = {addrStr}; - out.write(mFtpStatus.getResponse(227, request, mUser, args)); - } - - - /** - * PORT <SP> <CRLF>
- * - * The argument is a HOST-PORT specification for the data port - * to be used in data connection. There are defaults for both - * the user and server data ports, and under normal - * circumstances this command and its reply are not needed. If - * this command is used, the argument is the concatenation of a - * 32-bit internet host address and a 16-bit TCP port address. - * This address information is broken into 8-bit fields and the - * value of each field is transmitted as a decimal number (in - * character string representation). The fields are separated - * by commas. A port command would be: - * - * PORT h1,h2,h3,h4,p1,p2 - * - * where h1 is the high order 8 bits of the internet host address. - */ - public void doPORT(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - StringTokenizer st = new StringTokenizer(request.getArgument(), ","); - if(st.countTokens() != 6) { - out.write(mFtpStatus.getResponse(510, request, mUser, null)); - return ; - } - - // get data server - String dataSrvName = st.nextToken() + '.' + st.nextToken() + '.' + - st.nextToken() + '.' + st.nextToken(); - InetAddress clientAddr = null; - try { - clientAddr = InetAddress.getByName(dataSrvName); - } - catch(UnknownHostException ex) { - out.write(mFtpStatus.getResponse(553, request, mUser, null)); - return ; - } - - // get data server port - int clientPort = 0; - try { - int hi = Integer.parseInt(st.nextToken()); - int lo = Integer.parseInt(st.nextToken()); - clientPort = (hi << 8) | lo; - } - catch(NumberFormatException ex) { - out.write(mFtpStatus.getResponse(552, request, mUser, null)); - return ; - } - - mDataConnection.setPortCommand(clientAddr, clientPort); - out.write(mFtpStatus.getResponse(200, request, mUser, null)); - } - - - /** - * PWD <CRLF>
- * - * This command causes the name of the current working - * directory to be returned in the reply. - */ - public void doPWD(FtpRequest request, FtpWriter out) throws IOException { - resetState(); - String args[] = {mUser.getVirtualDirectory().getCurrentDirectory()}; - out.write(mFtpStatus.getResponse(257, request, mUser, args)); - } - - - /** - * QUIT <CRLF>
- * - * This command terminates a USER and if file transfer is not - * in progress, the server closes the control connection. - */ - public void doQUIT(FtpRequest request, FtpWriter out) throws IOException { - resetState(); - out.write(mFtpStatus.getResponse(221, request, mUser, null)); - ConnectionService conService = mConfig.getConnectionService(); - if(conService != null) { - conService.closeConnection(mUser.getSessionId()); - } - } - - - /** - * REST <SP> <CRLF>
- * - * The argument field represents the server marker at which - * file transfer is to be restarted. This command does not - * cause file transfer but skips over the file to the specified - * data checkpoint. This command shall be immediately followed - * by the appropriate FTP service command which shall cause - * file transfer to resume. - */ - public void doREST(FtpRequest request, FtpWriter out) throws IOException { - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - resetState(); - mlSkipLen = 0; - String skipNum = request.getArgument(); - try { - mlSkipLen = Long.parseLong(skipNum); - } - catch(NumberFormatException ex) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - if(mlSkipLen < 0) { - mlSkipLen = 0; - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - mbReset = true; - out.write(mFtpStatus.getResponse(350, request, mUser, null)); - } - - - /** - * RETR <SP> <pathname> <CRLF>
- * - * This command causes the server-DTP to transfer a copy of the - * file, specified in the pathname, to the server- or user-DTP - * at the other end of the data connection. The status and - * contents of the file at the server site shall be unaffected. - */ - public void doRETR(FtpRequest request, FtpWriter out) throws IOException { - - InputStream is = null; - OutputStream os = null; - try { - - // set state variables - long skipLen = (mbReset) ? mlSkipLen : 0; - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // get filename - String fileName = request.getArgument(); - fileName = mUser.getVirtualDirectory().getAbsoluteName(fileName); - String physicalName = mUser.getVirtualDirectory().getPhysicalName(fileName); - File requestedFile = new File(physicalName); - String args[] = {fileName}; - - // check file existance - if(!(requestedFile.exists() && requestedFile.isFile())) { - out.write(mFtpStatus.getResponse(550, request, mUser, args)); - return ; - } - - // check permission - if(!mUser.getVirtualDirectory().hasReadPermission(physicalName, true)) { - out.write(mFtpStatus.getResponse(550, request, mUser, args)); - return ; - } - - // now transfer file data - out.write(mFtpStatus.getResponse(150, request, mUser, null)); - Socket dataSoc = mDataConnection.getDataSocket(); - if(dataSoc == null) { - out.write(mFtpStatus.getResponse(550, request, mUser, args)); - return ; - } - - os = mUser.getOutputStream(dataSoc.getOutputStream()); - - // move to the appropriate offset - RandomAccessFile raf = new RandomAccessFile(requestedFile, "r"); - raf.seek(skipLen); - is = new FileInputStream(raf.getFD()); - - - // send file data to client - StreamConnector msc = new StreamConnector(is, os); - msc.setMaxTransferRate(mUser.getMaxDownloadRate()); - msc.setObserver(this); - msc.connect(); - - if(msc.hasException()) { - out.write(mFtpStatus.getResponse(451, request, mUser, args)); - return ; - } - else { - mConfig.getStatistics().setDownload(requestedFile, mUser, msc.getTransferredSize()); - } - - out.write(mFtpStatus.getResponse(226, request, mUser, null)); - } - catch(IOException ex) { - out.write(mFtpStatus.getResponse(425, request, mUser, null)); - } - finally { - IoUtils.close(is); - IoUtils.close(os); - mDataConnection.closeDataSocket(); - } - } - - - /** - * RMD <SP> <pathname> <CRLF>
- * - * This command causes the directory specified in the pathname - * to be removed as a directory (if the pathname is absolute) - * or as a subdirectory of the current working directory (if - * the pathname is relative). - */ - public void doRMD(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // get file names - String fileName = request.getArgument(); - fileName = mUser.getVirtualDirectory().getAbsoluteName(fileName); - String physicalName = mUser.getVirtualDirectory().getPhysicalName(fileName); - File requestedFile = new File(physicalName); - String args[] = {fileName}; - - // check permission - if(!mUser.getVirtualDirectory().hasWritePermission(physicalName, true)) { - out.write(mFtpStatus.getResponse(450, request, mUser, args)); - return ; - } - - // now delete - if(requestedFile.delete()) { - out.write(mFtpStatus.getResponse(250, request, mUser, args)); - } - else { - out.write(mFtpStatus.getResponse(450, request, mUser, args)); - } - } - - - /** - * RNFR <SP> <pathname> <CRLF>
- * - * This command specifies the old pathname of the file which is - * to be renamed. This command must be immediately followed by - * a "rename to" command specifying the new file pathname. - */ - public void doRNFR(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variable - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // set state variable - mbRenFr = true; - - // get filename - String fileName = request.getArgument(); - fileName = mUser.getVirtualDirectory().getAbsoluteName(fileName); - mstRenFr = mUser.getVirtualDirectory().getPhysicalName(fileName); - String args[] = {fileName}; - - out.write(mFtpStatus.getResponse(350, request, mUser, args)); - } - - - /** - * RNTO <SP> <pathname> <CRLF>
- * - * This command specifies the new pathname of the file - * specified in the immediately preceding "rename from" - * command. Together the two commands cause a file to be - * renamed. - */ - public void doRNTO(FtpRequest request, FtpWriter out) throws IOException { - - // argument check - if(!request.hasArgument()) { - resetState(); - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // set state variables - if((!mbRenFr) || (mstRenFr == null)) { - resetState(); - out.write(mFtpStatus.getResponse(100, request, mUser, null)); - return ; - } - - // get filenames - String fromFileStr = mUser.getVirtualDirectory().getVirtualName(mstRenFr); - String toFileStr = request.getArgument(); - toFileStr = mUser.getVirtualDirectory().getAbsoluteName(toFileStr); - String physicalToFileStr = mUser.getVirtualDirectory().getPhysicalName(toFileStr); - File fromFile = new File(mstRenFr); - File toFile = new File(physicalToFileStr); - String args[] = {fromFileStr, toFileStr}; - - resetState(); - - // check permission - if(!mUser.getVirtualDirectory().hasCreatePermission(physicalToFileStr, true)) { - out.write(mFtpStatus.getResponse(553, request, mUser, null)); - return ; - } - - // now rename - if(fromFile.renameTo(toFile)) { - out.write(mFtpStatus.getResponse(250, request, mUser, args)); - } - else { - out.write(mFtpStatus.getResponse(553, request, mUser, args)); - } - } - - - /** - * SITE <SP> <CRLF>
- * - * This command is used by the server to provide services - * specific to his system that are essential to file transfer - * but not sufficiently universal to be included as commands in - * the protocol. - */ - public void doSITE(FtpRequest request, FtpWriter out) throws IOException { - resetState(); - SiteCommandHandler siteCmd = new SiteCommandHandler(mConfig, mUser); - out.write(siteCmd.getResponse(request)); - } - - - /** - * SIZE <SP> <pathname> <CRLF>
- * - * Returns the size of the file in bytes. - */ - public void doSIZE(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // get filenames - String fileName = request.getArgument(); - fileName = mUser.getVirtualDirectory().getAbsoluteName(fileName); - String physicalName = mUser.getVirtualDirectory().getPhysicalName(fileName); - File reqFile = new File(physicalName); - - // print file size - if(reqFile.exists()) { - String args[] = {String.valueOf(reqFile.length())}; - out.write(mFtpStatus.getResponse(213, request, mUser, args)); - } - else { - out.write(mFtpStatus.getResponse(550, request, mUser, null)); - } - } - - - /** - * STAT [<SP> <pathname>] <CRLF>
- * - * This command shall cause a status response to be sent over - * the control connection in the form of a reply. - */ - public void doSTAT(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // write the status info - String args[] = { - mConfig.getSelfAddress().getHostAddress(), - mControlSocket.getInetAddress().getHostAddress(), - mUser.getName() - }; - out.write(mFtpStatus.getResponse(211, request, mUser, args)); - } - - - /** - * STOR <SP> <pathname> <CRLF>
- * - * This command causes the server-DTP to accept the data - * transferred via the data connection and to store the data as - * a file at the server site. If the file specified in the - * pathname exists at the server site, then its contents shall - * be replaced by the data being transferred. A new file is - * created at the server site if the file specified in the - * pathname does not already exist. - */ - public void doSTOR(FtpRequest request, FtpWriter out) throws IOException { - - InputStream is = null; - OutputStream os = null; - try { - - // set state variables - long skipLen = (mbReset) ? mlSkipLen : 0; - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // get filenames - String fileName = request.getArgument(); - fileName = mUser.getVirtualDirectory().getAbsoluteName(fileName); - String physicalName = mUser.getVirtualDirectory().getPhysicalName(fileName); - File requestedFile = new File(physicalName); - - // get permission - if(!mUser.getVirtualDirectory().hasCreatePermission(physicalName, true)) { - out.write(mFtpStatus.getResponse(550, request, mUser, null)); - return ; - } - - // now transfer file data - out.write(mFtpStatus.getResponse(150, request, mUser, null)); - - // get data connection - Socket dataSoc = mDataConnection.getDataSocket(); - if(dataSoc == null) { - out.write(mFtpStatus.getResponse(550, request, mUser, null)); - return ; - } - is = dataSoc.getInputStream(); - - // go to the appropriate offset - RandomAccessFile raf = new RandomAccessFile(requestedFile, "rw"); - raf.setLength(skipLen); - raf.seek(skipLen); - os = mUser.getOutputStream(new FileOutputStream(raf.getFD())); - - // get data from client - StreamConnector msc = new StreamConnector(is, os); - msc.setMaxTransferRate(mUser.getMaxUploadRate()); - msc.setObserver(this); - msc.connect(); - if(msc.hasException()) { - out.write(mFtpStatus.getResponse(451, request, mUser, null)); - return ; - } - else { - mConfig.getStatistics().setUpload(requestedFile, mUser, msc.getTransferredSize()); - } - - out.write(mFtpStatus.getResponse(226, request, mUser, null)); - } - catch(IOException ex) { - out.write(mFtpStatus.getResponse(425, request, mUser, null)); - } - finally { - IoUtils.close(is); - IoUtils.close(os); - mDataConnection.closeDataSocket(); - } - } - - - /** - * STOU <CRLF>
- * - * This command behaves like STOR except that the resultant - * file is to be created in the current directory under a name - * unique to that directory. The 250 Transfer Started response - * must include the name generated. - */ - public void doSTOU(FtpRequest request, FtpWriter out) throws IOException { - - InputStream is = null; - OutputStream os = null; - try { - - // reset state variables - resetState(); - - // get filenames - String fileName = mUser.getVirtualDirectory().getAbsoluteName("ftp.dat"); - String physicalName = mUser.getVirtualDirectory().getPhysicalName(fileName); - File requestedFile = new File(physicalName); - requestedFile = IoUtils.getUniqueFile(requestedFile); - fileName = mUser.getVirtualDirectory().getVirtualName(requestedFile.getAbsolutePath()); - String args[] = {fileName}; - - // check permission - if(!mUser.getVirtualDirectory().hasCreatePermission(fileName, false)) { - out.write(mFtpStatus.getResponse(550, request, mUser, null)); - return ; - } - - // now transfer file data - out.write(mFtpStatus.getResponse(150, request, mUser, null)); - Socket dataSoc = mDataConnection.getDataSocket(); - if(dataSoc == null) { - out.write(mFtpStatus.getResponse(550, request, mUser, args)); - return ; - } - - // receive data from client - is = dataSoc.getInputStream(); - os = mUser.getOutputStream(new FileOutputStream(requestedFile)); - - StreamConnector msc = new StreamConnector(is, os); - msc.setMaxTransferRate(mUser.getMaxUploadRate()); - msc.setObserver(this); - msc.connect(); - if(msc.hasException()) { - out.write(mFtpStatus.getResponse(451, request, mUser, null)); - return ; - } - else { - mConfig.getStatistics().setUpload(requestedFile, mUser, msc.getTransferredSize()); - } - - out.write(mFtpStatus.getResponse(226, request, mUser, null)); - mDataConnection.closeDataSocket(); - out.write(mFtpStatus.getResponse(250, request, mUser, args)); - } - catch(IOException ex) { - out.write(mFtpStatus.getResponse(425, request, mUser, null)); - } - finally { - IoUtils.close(is); - IoUtils.close(os); - mDataConnection.closeDataSocket(); - } - } - - - /** - * STRU <SP> <structure-code> <CRLF>
- * - * The argument is a single Telnet character code specifying - * file structure. - */ - public void doSTRU(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // set structure - if(mUser.setStructure(request.getArgument().charAt(0))) { - out.write(mFtpStatus.getResponse(200, request, mUser, null)); - } - else { - out.write(mFtpStatus.getResponse(504, request, mUser, null)); - } - } - - - /** - * SYST <CRLF>
- * - * This command is used to find out the type of operating - * system at the server. - */ - public void doSYST(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // and print server system info - String args[] = {mConfig.getSystemName()}; - out.write(mFtpStatus.getResponse(215, request, mUser, args)); - } - - - /** - * TYPE <SP> <type-code> <CRLF>
- * - * The argument specifies the representation type. - */ - public void doTYPE(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // get type from argument - char type = 'A'; - if(request.hasArgument()) { - type = request.getArgument().charAt(0); - } - - // set it - if(mUser.setType(type)) { - out.write(mFtpStatus.getResponse(200, request, mUser, null)); - } - else { - out.write(mFtpStatus.getResponse(504, request, mUser, null)); - } - } - - - /** - * USER <SP> <username> <CRLF>
- * - * The argument field is a Telnet string identifying the user. - * The user identification is that which is required by the - * server for access to its file system. This command will - * normally be the first command transmitted by the user after - * the control connections are made. - */ - public void doUSER(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // check user login status - mbUser = true; - if(mUser.hasLoggedIn()) { - if(mUser.getName().equals(request.getArgument())) { - out.write(mFtpStatus.getResponse(230, request, mUser, null)); - return ; - } - else { - mConfig.getConnectionService().closeConnection(mUser.getSessionId()); - } - } - - // set user name and send appropriate message - mUser.setName(request.getArgument()); - if(mUser.getIsAnonymous()) { - if(mConfig.isAnonymousLoginAllowed()) { - FtpRequest anoRequest = new FtpRequest(mUser.getName()); - out.write(mFtpStatus.getResponse(331, anoRequest, mUser, null)); - } - else { - out.write(mFtpStatus.getResponse(530, request, mUser, null)); - ConnectionService conService = mConfig.getConnectionService(); - if(conService != null) { - conService.closeConnection(mUser.getSessionId()); - } - } - } - else { - out.write(mFtpStatus.getResponse(331, request, mUser, null)); - } - } - -} - diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpDataConnection.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpDataConnection.java deleted file mode 100644 index 994c56630..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpDataConnection.java +++ /dev/null @@ -1,226 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver; - -import java.net.InetAddress; -import java.net.ServerSocket; -import java.net.Socket; - - -/** - * We can get the ftp data connection using this class. - * It uses either PORT or PASV command. - * - * @author Rana Bhattacharyya - */ -class FtpDataConnection { - - private FtpConfig mConfig = null; - private Socket mDataSoc = null; - private ServerSocket mServSoc = null; - - private InetAddress mAddress = null; - private int miPort = 0; - - private boolean mbPort = false; - private boolean mbPasv = false; - - - /** - * Constructor. - * @param cfg ftp config object. - */ - public FtpDataConnection(FtpConfig cfg) { - mConfig = cfg; - } - - - /** - * Close data socket. - */ - public void closeDataSocket() { - - // close client socket if any - if(mDataSoc != null) { - try { - mDataSoc.close(); - } - catch(Exception ex) { - mConfig.getLogger().warn("FtpDataConnection.closeDataSocket()", ex); - } - mDataSoc = null; - } - - // close server socket if any - if(mServSoc != null) { - try { - mServSoc.close(); - } - catch(Exception ex) { - mConfig.getLogger().warn("FtpDataConnection.closeDataSocket()", ex); - } - mConfig.releaseDataPort(miPort); - mServSoc = null; - } - } - - - /** - * Port command. - */ - public void setPortCommand(InetAddress addr, int port) { - - // close old sockets if any - closeDataSocket(); - - // set variables - mbPort = true; - mbPasv = false; - mAddress = addr; - miPort = port; - } - - - /** - * Passive command. It returns the success flag. - */ - public boolean setPasvCommand() { - boolean bRet = false; - - // close old sockets if any - closeDataSocket(); - - try { - - // open passive server socket and get parameters - int port = getPassivePort(); - if(port == -1) { - throw new Exception("No available port found for PASV connection."); - } - mServSoc = new ServerSocket(port, 1, mConfig.getSelfAddress()); - mAddress = mConfig.getServerAddress(); - miPort = mServSoc.getLocalPort(); - - // set different state variables - mbPort = false; - mbPasv = true; - bRet = true; - } - catch(Exception ex) { - mServSoc = null; - mConfig.getLogger().warn("FtpDataConnection.setPasvCommand()", ex); - } - return bRet; - } - - - /** - * Get client address. - */ - public InetAddress getInetAddress() { - return mAddress; - } - - - /** - * Get port number. - */ - public int getPort() { - return miPort; - } - - - /** - * Get the data socket. In case of error returns null. - */ - public Socket getDataSocket() { - - try { - - // get socket depending on the selection - if(mbPort) { - mDataSoc = new Socket(mAddress, miPort); - } - else if(mbPasv) { - mDataSoc = mServSoc.accept(); - } - } - catch(Exception ex) { - mConfig.getLogger().warn("FtpDataConnection.getDataSocket()", ex); - mDataSoc = null; - } - - return mDataSoc; - } - - - /** - * Get the passive port. Get it from the port pool. - */ - private int getPassivePort() { - return mConfig.getDataPort(); - } - - /** - * Dispose data connection - */ - public void dispose() { - closeDataSocket(); - } - -} - diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpRequest.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpRequest.java deleted file mode 100644 index b5a6ed0f3..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpRequest.java +++ /dev/null @@ -1,132 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver; - -/** - * Ftp command request class. We can access command, line and argument using - * {CMD}, {ARG} within ftp status file. This represents - * single Ftp request. - * - * @author Rana Bhattacharyya - */ -public -class FtpRequest { - - private String mstLine = null; - private String mstCommand = null; - private String mstArgument = null; - - - /** - * Constructor. - * - * @param commandLine ftp input command line. - */ - public FtpRequest(String commandLine) { - mstLine = commandLine.trim(); - parse(); - } - - /** - * Parse the ftp command line. - */ - private void parse() { - int spInd = mstLine.indexOf(' '); - - if(spInd != -1) { - mstArgument = mstLine.substring(spInd + 1); - mstCommand = mstLine.substring(0, spInd).toUpperCase(); - } - else { - mstCommand = mstLine.toUpperCase(); - } - - if( (mstCommand.length()>0) && (mstCommand.charAt(0)=='X') ) { - mstCommand = mstCommand.substring(1); - } - } - - - /** - * Get the ftp command. - */ - public String getCommand() { - return mstCommand; - } - - /** - * Get ftp input argument. - */ - public String getArgument() { - return mstArgument; - } - - /** - * Get the ftp request line. - */ - public String getCommandLine() { - return mstLine; - } - - /** - * Has argument. - */ - public boolean hasArgument() { - return getArgument() != null; - } - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpServerImpl.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpServerImpl.java deleted file mode 100644 index 684a209b8..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpServerImpl.java +++ /dev/null @@ -1,233 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver; - -import java.net.InetAddress; -import java.net.ServerSocket; - -import org.apache.avalon.cornerstone.services.connection.ConnectionHandler; -import org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory; -import org.apache.avalon.cornerstone.services.connection.ConnectionManager; -import org.apache.avalon.cornerstone.services.sockets.ServerSocketFactory; -import org.apache.avalon.cornerstone.services.sockets.SocketManager; -import org.apache.avalon.cornerstone.blocks.connection.DefaultConnectionManager; -import org.apache.avalon.framework.activity.Disposable; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.context.Context; -import org.apache.avalon.framework.context.ContextException; -import org.apache.avalon.framework.context.Contextualizable; -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.service.Serviceable; -import org.apache.ftpserver.interfaces.FtpServerInterface; - -/** - * Ftp server starting point. Avalon framework will load this - * from the jar file. This is also the starting point of remote - * admin. - * - * @author Rana Bhattacharyya - * @author Paul Hammant - * @version 1.0 - * @phoenix:block - * @phoenix:service name="org.apache.ftpserver.interfaces.FtpServerInterface" - */ -public class FtpServerImpl - extends AbstractLogEnabled - implements FtpServerInterface, Contextualizable, Serviceable, Configurable, Disposable, ConnectionHandlerFactory -{ - private ServerSocket serverSocket = null; - private SocketManager socketManager = null; - private ConnectionManager connectionManager = null; - private Context context = null; - private FtpConfig configuration = null; - - /** - * Default constructor - does nothing. - */ - public FtpServerImpl() - { - } - - /** - * Set application context - first spep. - */ - public void contextualize( Context context ) throws ContextException - { - try - { - configuration = new FtpConfig(); - configuration.setLogger( getLogger() ); - this.context = context; - configuration.setContext( this.context ); - } - catch ( Exception ex ) - { - getLogger().error( "FtpServerImpl.contextualize()", ex ); - throw new ContextException( "FtpServerImpl.contextualize()", ex ); - } - } - - - /** - * Get all managers - second step. - * - * @phoenix:dependency name="org.apache.avalon.cornerstone.services.sockets.SocketManager" - * @phoenix:dependency name="org.apache.avalon.cornerstone.services.connection.ConnectionManager" - * @phoenix:dependency name="org.apache.ftpserver.usermanager.UserManagerInterface" - * @phoenix:dependency name="org.apache.ftpserver.ip.IpRestrictorInterface" - */ - public void service( ServiceManager serviceManager ) throws ServiceException - { - configuration.setServiceManager( serviceManager ); - - socketManager = (SocketManager) serviceManager.lookup( SocketManager.ROLE ); - - connectionManager = (ConnectionManager) serviceManager.lookup( ConnectionManager.ROLE ); - } - - /** - * Configure the server - third step. - * - * @param conf the XML configuration block - */ - public void configure( Configuration conf ) throws ConfigurationException - { - try - { - configuration.setConfiguration( conf ); - - // open server socket - ServerSocketFactory factory = socketManager.getServerSocketFactory( "plain" ); - - InetAddress serverAddress = configuration.getSelfAddress(); - - if ( serverAddress == null ) - { - serverSocket = factory.createServerSocket( configuration.getServerPort(), 5 ); - } - else - { - serverSocket = factory.createServerSocket( configuration.getServerPort(), 5, serverAddress ); - } - - connectionManager.connect( DISPLAY_NAME, serverSocket, this ); - - System.out.println( "FTP server ready!" ); - - if ( configuration.isRemoteAdminAllowed() ) - { - System.out.println( "You can start the remote admin by executing \"java -jar ftp-admin.jar\"." ); - } - } - catch ( Exception ex ) - { - getLogger().error( "FtpServerImpl.configure()", ex ); - - throw new ConfigurationException( ex.getMessage(), ex ); - } - } - - /** - * Release all resources. - */ - public void dispose() - { - getLogger().info( "Closing Ftp server..." ); - - if ( configuration != null ) - { - try - { - configuration.dispose(); - - ((DefaultConnectionManager)connectionManager).dispose(); - - serverSocket.close(); - } - catch ( Exception ex ) - { - getLogger().warn( "FtpServerImpl.dispose()", ex ); - } - } - } - - /** - * Construct an appropriate ConnectionHandler - * to handle a new connection. - * - * @return the new ConnectionHandler - * @throws Exception if an error occurs - */ - public ConnectionHandler createConnectionHandler() throws Exception - { - BaseFtpConnection conHandle = new FtpConnection( configuration ); - return conHandle; - } - - /** - * Release a previously created ConnectionHandler. - * e.g. for spooling. - */ - public void releaseConnectionHandler( ConnectionHandler connectionHandler ) - { - } -} - diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpStatistics.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpStatistics.java deleted file mode 100644 index 3820b65f0..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpStatistics.java +++ /dev/null @@ -1,410 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ - package org.apache.ftpserver; - -import java.io.File; -import java.util.Date; -import org.apache.ftpserver.util.Message; -import org.apache.ftpserver.interfaces.FtpStatisticsListener; -import org.apache.ftpserver.interfaces.FtpFileListener; - -/** - * This class encapsulates all the global statistics. - * - * @author Rana Bhattacharyya - */ -public -class FtpStatistics { - - private FtpStatisticsListener mListener = null; - private FtpFileListener mFileListener = null; - private FtpConfig mConfig = null; - - private Date mStartTime = new Date(); - - private int miNbrUpload = 0; - private int miNbrDownload = 0; - private int miNbrDelete = 0; - - private int miLogins = 0; - private int miTotalLogins = 0; - - private int miAnonLogins = 0; - private int miTotalAnonLogins = 0; - - private int miConnections = 0; - private int miTotalConnections = 0; - - private long mlBytesUpload = 0L; - private long mlBytesDownload = 0L; - - /** - * Default constructor. - */ - public FtpStatistics(FtpConfig cfg) { - mConfig = cfg; - } - - - ///////////////// All get methods ///////////////// - /** - * Get server start time. - */ - public Date getStartTime() { - return mStartTime; - } - - /** - * Get number of files uploaded. - */ - public int getFileUploadNbr() { - return miNbrUpload; - } - - /** - * Get number of files downloaded. - */ - public int getFileDownloadNbr() { - return miNbrDownload; - } - - /** - * Get number of files deleted. - */ - public int getFileDeleteNbr() { - return miNbrDelete; - } - - /** - * Get total number of bytes uploaded. - */ - public long getFileUploadSize() { - return mlBytesUpload; - } - - /** - * Get total number of bytes downloaded. - */ - public long getFileDownloadSize() { - return mlBytesDownload; - } - - /** - * Get current number of connections. - */ - public int getConnectionNbr() { - return miConnections; - } - - /** - * Get total connection number - */ - public int getTotalConnectionNbr() { - return miTotalConnections; - } - - /** - * Get current number of logins - */ - public int getLoginNbr() { - return miLogins; - } - - /** - * Get total number of logins - */ - public int getTotalLoginNbr() { - return miTotalLogins; - } - - /** - * Get current anonymous logins. - */ - public int getAnonLoginNbr() { - return miAnonLogins; - } - - /** - * Get total anonymous logins - */ - public int getTotalAnonLoginNbr() { - return miTotalAnonLogins; - } - - - ///////////////// All set methods /////////////////// - /** - * Increment upload count. - */ - void setUpload(File fl, FtpUser user, long sz) { - ++miNbrUpload; - mlBytesUpload += sz; - mConfig.getLogger().info("File upload : " + user.getName() + " - " + fl.getAbsolutePath()); - notifyUpload(fl, user); - } - - /** - * Increment download count. - */ - void setDownload(File fl, FtpUser user, long sz) { - ++miNbrDownload; - mlBytesDownload += sz; - mConfig.getLogger().info("File download : " + user.getName() + " - " + fl.getAbsolutePath()); - notifyDownload(fl, user); - } - - /** - * Increment delete count. - */ - void setDelete(File fl, FtpUser user) { - ++miNbrDelete; - mConfig.getLogger().info("File delete : " + user.getName() + " - " + fl.getAbsolutePath()); - notifyDelete(fl, user); - } - - /** - * New login. - */ - void setLogin(boolean anonymous) { - ++miLogins; - ++miTotalLogins; - if(anonymous) { - ++miAnonLogins; - ++miTotalAnonLogins; - } - notifyLogin(); - } - - /** - * User logout - */ - void setLogout(boolean anonymous) { - --miLogins; - if(anonymous) { - --miAnonLogins; - } - notifyLogout(); - } - - /** - * New connection - */ - void setOpenConnection() { - ++miConnections; - ++miTotalConnections; - notifyConnection(); - } - - /** - * Close connection - */ - void setCloseConnection() { - --miConnections; - notifyConnection(); - } - - //////////////////////////////////////////////////////////// - // Event listener methods // - //////////////////////////////////////////////////////////// - /** - * Add a listener object. - */ - public void setListener(FtpStatisticsListener listener) { - mListener = listener; - } - - /** - * Get listener object. - */ - public FtpStatisticsListener getListener() { - return mListener; - } - - /** - * Get file listener - */ - public void setFileListener(FtpFileListener listener) { - mFileListener = listener; - } - - /** - * Set file listener - */ - public FtpFileListener getFileListener() { - return mFileListener; - } - - /** - * Listener upload notification. - */ - private void notifyUpload(final File fl, final FtpUser user) { - final FtpStatisticsListener listener = mListener; - if (listener != null) { - Message msg = new Message() { - public void execute() { - listener.notifyUpload(); - } - }; - mConfig.getMessageQueue().add(msg); - } - - final FtpFileListener fileListener = mFileListener; - if (fileListener != null) { - Message msg = new Message() { - public void execute() { - fileListener.notifyUpload(fl, user.getSessionId()); - } - }; - mConfig.getMessageQueue().add(msg); - } - } - - /** - * Listener download notification. - */ - private void notifyDownload(final File fl, final FtpUser user) { - final FtpStatisticsListener listener = mListener; - if (listener != null) { - Message msg = new Message() { - public void execute() { - listener.notifyDownload(); - } - }; - mConfig.getMessageQueue().add(msg); - } - - final FtpFileListener fileListener = mFileListener; - if (fileListener != null) { - Message msg = new Message() { - public void execute() { - fileListener.notifyDownload(fl, user.getSessionId()); - } - }; - mConfig.getMessageQueue().add(msg); - } - } - - /** - * Listener delete notification. - */ - private void notifyDelete(final File fl, final FtpUser user) { - final FtpStatisticsListener listener = mListener; - if (listener != null) { - Message msg = new Message() { - public void execute() { - listener.notifyDelete(); - } - }; - mConfig.getMessageQueue().add(msg); - } - - final FtpFileListener fileListener = mFileListener; - if (fileListener != null) { - Message msg = new Message() { - public void execute() { - fileListener.notifyDelete(fl, user.getSessionId()); - } - }; - mConfig.getMessageQueue().add(msg); - } - } - - /** - * Listener user login notification. - */ - private void notifyLogin() { - final FtpStatisticsListener listener = mListener; - if (listener != null) { - Message msg = new Message() { - public void execute() { - listener.notifyLogin(); - } - }; - mConfig.getMessageQueue().add(msg); - } - } - - /** - * Listener user logout notification. - */ - private void notifyLogout() { - final FtpStatisticsListener listener = mListener; - if (listener != null) { - Message msg = new Message() { - public void execute() { - listener.notifyLogout(); - } - }; - mConfig.getMessageQueue().add(msg); - } - } - - /** - * Listener user connection open/close notification. - */ - private void notifyConnection() { - final FtpStatisticsListener listener = mListener; - if (listener != null) { - Message msg = new Message() { - public void execute() { - listener.notifyConnection(); - } - }; - mConfig.getMessageQueue().add(msg); - } - } -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpStatus.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpStatus.java deleted file mode 100644 index a5b2fe59b..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpStatus.java +++ /dev/null @@ -1,240 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver; - -import java.io.IOException; -import java.io.InputStream; -import java.io.BufferedReader; -import java.io.StringReader; -import java.util.Properties; - -/** - * Ftp status line parser class. This class loads FtpStatus.properties - * file from the classpath. It generates the descriptive ftp status for - * astatus code. The actual response depends on the status code, the ftp - * command and the passed argument list. - * - * @author Rana Bhattacharyya - */ -public -class FtpStatus extends Properties { - - private static final String RESOURCE = "org/apache/ftpserver/FtpStatus.properties"; - private static final String PREFIX = "FtpServer.status."; - private static final String EMPTY = ""; - private static final String CRLF = "\r\n"; - - private static final String CMD = "CMD"; - private static final String ARG = "ARG"; - - /** - * Load status propeties file from the classpath. - */ - public FtpStatus() throws IOException { - InputStream pis = getClass().getClassLoader().getResourceAsStream(RESOURCE); - load(pis); - pis.close(); - } - - - /** - * Process ftp response new line character. - */ - public String processNewLine(String msg, int status) { - - // no newline - if(msg.indexOf('\n') == -1) { - return status + " " + msg + CRLF; - } - - StringBuffer sw = new StringBuffer(256); - - try { - BufferedReader sr = new BufferedReader(new StringReader(msg)); - - sw.append(String.valueOf(status)); - sw.append('-'); - - String line = sr.readLine(); - for(;;) { - String nextLine = sr.readLine(); - - if(nextLine != null) { - sw.append(line); - sw.append(CRLF); - } - else { - sw.append(String.valueOf(status)); - sw.append(' '); - sw.append(line); - sw.append(CRLF); - break; - } - line = nextLine; - } - sr.close(); - } - catch(IOException ex) { - } - - return sw.toString(); - } - - - /** - * Get ftp message from the properties file and replace the variables. - */ - private String getMessage(int status, FtpRequest cmdLine, String[] args) { - - // make the key from the passed parameters - String key = PREFIX + status; - String keyc = key; - if(cmdLine != null) { - keyc = keyc + '.' + cmdLine.getCommand(); - } - - // get status property - String str = getProperty(keyc); - if(str == null) { - str = getProperty(key); - } - if(str == null) { - str = EMPTY; - } - - // replace variables - int startIndex = 0; - int openIndex = str.indexOf('{', startIndex); - if (openIndex == -1) { - return str; - } - - int closeIndex = str.indexOf('}', startIndex); - if( (closeIndex == -1) || (openIndex > closeIndex) ) { - return str; - } - - StringBuffer sb = new StringBuffer(); - sb.append(str.substring(startIndex, openIndex)); - while(true) { - String intStr = str.substring(openIndex+1, closeIndex); - sb.append(getParam(cmdLine, args, intStr)); - - startIndex = closeIndex + 1; - openIndex = str.indexOf('{', startIndex); - if (openIndex == -1) { - sb.append(str.substring(startIndex)); - break; - } - - closeIndex = str.indexOf('}', startIndex); - if( (closeIndex == -1) || (openIndex > closeIndex) ) { - sb.append(str.substring(startIndex)); - break; - } - sb.append(str.substring(startIndex, openIndex)); - } - return sb.toString(); - } - - - /** - * Get variable value. - */ - private String getParam(FtpRequest cmdLine, String[] elms, String intStr) { - - // command line param - if(cmdLine != null) { - if(intStr.equals(CMD)) { - return cmdLine.getCommand(); - } - if(intStr.equals(ARG)) { - return cmdLine.getArgument(); - } - } - - // list param - if(elms == null) { - return EMPTY; - } - - int index = 0; - try { - index = Integer.parseInt(intStr); - } - catch(NumberFormatException ex) { - return EMPTY; - } - if( (index < 0) || (index >= elms.length) ) { - return EMPTY; - } - return elms[index]; - } - - - /** - * Get ftp response. - * @param status ftp status code. - * @param cmd ftp request object (may be null). - * @param ars variable arguent list (may be null). - */ - public String getResponse(int status, FtpRequest cmd, FtpUser user, String[] args) { - String strRes = getMessage(status, cmd, args); - return processNewLine(strRes, status); - } - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpStatus.properties b/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpStatus.properties deleted file mode 100644 index 32b4c4fa5..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpStatus.properties +++ /dev/null @@ -1,126 +0,0 @@ -# Ftp server status properties -# Change if necessary -# {CMD} => FTP command -# {ARG} => FTP command argument -# {n} => the n-th element of the passed list - -# Positive Preliminary Replies -FtpServer.status.110=Restart marker reply -FtpServer.status.120=Service ready in {0} minutes -FtpServer.status.125=Data connection already open; transfer starting -FtpServer.status.150=File status okay; about to open data connection - - -# Positive Completion Replies -FtpServer.status.200=Command {CMD} okay - -FtpServer.status.202=Command {CMD} not implemented, superfluous at this site - -FtpServer.status.211=System status, or system help reply -FtpServer.status.211.STAT=FtpServer\nConnected to {0}\nConnected from {1}\nLogged in as {2}\nEnd of status - -FtpServer.status.212=Directory status - -FtpServer.status.213=File status -FtpServer.status.213.SIZE={0} -FtpServer.status.213.MDTM={0} - -FtpServer.status.214=The following commands are implemented.\nABOR APPE CDUP CWD DELE HELP LIST MDTM\nMKD MODE NLST NOOP PASS PASV PORT PWD\nQUIT REST RETR RMD RNFR RNTO SITE SIZE\nSTAT STOR STOU STRU SYST TYPE USER\nEnd of help - -FtpServer.status.214.ABOR=Syntax: ABOR -FtpServer.status.214.APPE=Syntax: APPE -FtpServer.status.214.CDUP=Syntax: CDUP -FtpServer.status.214.CWD=Syntax: CWD -FtpServer.status.214.DELE=Syntax: DELE -FtpServer.status.214.HELP=Syntax: HELP [ ] -FtpServer.status.214.LIST=Syntax: LIST [ ] -FtpServer.status.214.MDTM=Syntax: MDTM -FtpServer.status.214.MKD=Syntax: MKD -FtpServer.status.214.MODE=Syntax: MODE -FtpServer.status.214.NLST=Syntax: NLST [ ] -FtpServer.status.214.NOOP=Syntax: NOOP -FtpServer.status.214.PASS=Syntax: PASS -FtpServer.status.214.PASV=Syntax: PASV -FtpServer.status.214.PORT=Syntax: PORT -FtpServer.status.214.PWD=Syntax: PWD -FtpServer.status.214.QUIT=Syntax: QUIT -FtpServer.status.214.REST=Syntax: RETR -FtpServer.status.214.RETR=Syntax: RETR -FtpServer.status.214.RMD=Syntax: RMD -FtpServer.status.214.RNFR=Syntax: RNFR -FtpServer.status.214.RNTO=Syntax: RNTO -FtpServer.status.214.SITE=Syntax: SITE -FtpServer.status.214.STOR=Syntax: STOR -FtpServer.status.214.STOU=Syntax: STOU -FtpServer.status.214.SYST=Syntax: SYST -FtpServer.status.214.TYPE=Syntax: TYPE -FtpServer.status.214.USER=Syntax: USER - -FtpServer.status.214.UNKNOWN=Unknown command {0} - -FtpServer.status.215=UNIX Type: FtpServer -FtpServer.status.220=Service ready for new user -FtpServer.status.221=Service closing control connection -FtpServer.status.221.QUIT=Goodbye -FtpServer.status.225=Can't open data connection -FtpServer.status.225.ABOR=ABOR command successful -FtpServer.status.226=Closing data connection -FtpServer.status.227.PASV=Entering Passive Mode ({0}) -FtpServer.status.230=User logged in, proceed - -FtpServer.status.250=Requested file action okay, completed -FtpServer.status.250.STOU=Requested file action okay, completed. Generated file: {0} -FtpServer.status.250.CWD=Directory changed to {0} -FtpServer.status.250.CDUP=Directory changed to {0} - -FtpServer.status.257.MKD=\"{0}\" created -FtpServer.status.257.PWD=\"{0}\" is current directory -FtpServer.status.257.PWD=\"{0}\" is current directory -FtpServer.status.257.RMD=\"{0}\" deleted - - -# Positive Intermediate Replies -FtpServer.status.331=User name okay, need password for {ARG} -FtpServer.status.331.ANONYMOUS=Guest login ok, send your complete e-mail address as password - -FtpServer.status.332=Need account for login - -FtpServer.status.350=Requested file action pending further information -FtpServer.status.350.REST=Restarting at {ARG}. Send STORE or RETRIEVE to initiate transfer - - -# Transient Negative Completion Replies -FtpServer.status.421=Service not available, closing control connection -FtpServer.status.425=Can't open data connection -FtpServer.status.426=Connection closed; transfer aborted -FtpServer.status.450=Requested file action not taken -FtpServer.status.451=Requested action aborted. Local error in processing -FtpServer.status.452=Requested action not taken - - -# Permanent Negative Completion Replies -FtpServer.status.500=Syntax error, command {CMD} unrecognized - -FtpServer.status.501=Syntax error in parameters or arguments -FtpServer.status.501.REST=\"{ARG}\" is not a valid argument -FtpServer.status.501.MLST=\"{ARG}\" is not a valid pathname -FtpServer.status.501.MLSD=\"{ARG}\" is not a valid directory - -FtpServer.status.502=Command {CMD} not implemented -FtpServer.status.503=Bad sequence of commands -FtpServer.status.504=Command {CMD} not implemented for that parameter -FtpServer.status.521.MKD=\"{0}\" already exists -FtpServer.status.530=Access denied -FtpServer.status.532=Need account for storing files - -FtpServer.status.550=Requested action not taken -FtpServer.status.550.CDUP=No such directory -FtpServer.status.550.CWD=No such directory -FtpServer.status.550.RETR=File {ARG} unavailable -FtpServer.status.550.APPE=File {ARG} unavailable -FtpServer.status.550.DELE=File {ARG} unavailable -FtpServer.status.550.SIZE=File {ARG} unavailable -FtpServer.status.550.MDTM=File {ARG} unavailable - -FtpServer.status.552=Requested file action aborted -FtpServer.status.553=Requested action not taken diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpUser.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpUser.java deleted file mode 100644 index d60e79f6c..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpUser.java +++ /dev/null @@ -1,170 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ - package org.apache.ftpserver; - -import java.io.OutputStream; -import java.io.Serializable; - -import org.apache.ftpserver.usermanager.User; -import org.apache.ftpserver.util.AsciiOutputStream; -import org.apache.ftpserver.util.IoUtils; - - -/** - * Ftp user class. It handles all user specific file system task. - * It supports user virtual root directory. - * - * @author Rana Bhattacharyya - */ -public -class FtpUser extends User implements Serializable { - - public static final String ANONYMOUS = "anonymous"; - - private char mcDataType = 'A'; - private char mcStructure = 'F'; - private char mcMode = 'S'; - - /** - * Constructor - does nothing. - */ - public FtpUser() { - } - - /** - * Get the user data type. - */ - public char getType() { - return mcDataType; - } - - /** - * Set the data type. Supported types are A (ascii) and I (binary). - * @return true if success - */ - public boolean setType(char type) { - type = Character.toUpperCase(type); - if( (type != 'A') && (type != 'I') ) { - return false; - } - mcDataType = type; - return true; - } - - - /** - * Get the file structure. - */ - public char getStructure() { - return mcStructure; - } - - /** - * Set the file structure. Supported structure type is F (file). - * @return true if success - */ - public boolean setStructure(char stru) { - stru = Character.toUpperCase(stru); - if(stru != 'F') { - return false; - } - mcStructure = stru; - return true; - } - - - /** - * Get the transfer mode. - */ - public char getMode() { - return mcMode; - } - - /** - * Set the transfer type. Supported transfer type is S (stream). - * @return true if success - */ - public boolean setMode(char md) { - md = Character.toUpperCase(md); - if(md != 'S') { - return false; - } - mcMode = md; - return true; - } - - /** - * Get output stream. Returns ftpserver.util.AsciiOutputStream - * if the transfer type is ASCII. - */ - public OutputStream getOutputStream(OutputStream os) { - os = IoUtils.getBufferedOutputStream(os); - if(mcDataType == 'A') { - os = new AsciiOutputStream(os); - } - return os; - } - - /** - * Is an anonymous user? - */ - public boolean getIsAnonymous() { - return ANONYMOUS.equals(getName()); - } -} - - diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpWriter.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpWriter.java deleted file mode 100644 index 7085f5228..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/FtpWriter.java +++ /dev/null @@ -1,185 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver; - -import java.io.IOException; -import java.io.Writer; -import java.io.OutputStreamWriter; -import java.net.Socket; - -import org.apache.ftpserver.util.Message; -import org.apache.ftpserver.interfaces.SpyConnectionInterface; - -/** - * Writer object used by the server. It has the spying capability. - * - * @author Rana Bhattacharyya - */ -public -class FtpWriter extends Writer { - - private OutputStreamWriter mOriginalWriter; - private SpyConnectionInterface mSpy; - private FtpConfig mConfig; - - /** - * Constructor - set the actual writer object - */ - public FtpWriter(Socket soc, FtpConfig config) throws IOException { - mOriginalWriter = new OutputStreamWriter(soc.getOutputStream()); - mConfig = config; - } - - /** - * Get the spy object to get what the user is writing. - */ - public SpyConnectionInterface getSpyObject() { - return mSpy; - } - - /** - * Set the connection spy object. - */ - public void setSpyObject(SpyConnectionInterface spy) { - mSpy = spy; - } - - /** - * Spy print. Monitor server response. - */ - private void spyResponse(final String str) throws IOException { - final SpyConnectionInterface spy = mSpy; - if (spy != null) { - Message msg = new Message() { - public void execute() { - try { - spy.response(str); - } - catch(Exception ex) { - mSpy = null; - mConfig.getLogger().error("FtpWriter.spyResponse()", ex); - } - } - }; - mConfig.getMessageQueue().add(msg); - } - } - - /** - * Write a character array. - */ - public void write(char[] cbuf) throws IOException { - String str = new String(cbuf); - spyResponse(str); - mOriginalWriter.write(cbuf); - mOriginalWriter.flush(); - } - - /** - * Write a portion of character array - */ - public void write(char[] cbuf, int off, int len) throws IOException { - String str = new String(cbuf, off, len); - spyResponse(str); - mOriginalWriter.write(cbuf, off, len); - mOriginalWriter.flush(); - } - - /** - * Write a single character - */ - public void write(int c) throws IOException { - String str = "" + (char)c; - spyResponse(str); - mOriginalWriter.write(c); - mOriginalWriter.flush(); - } - - /** - * Write a string - */ - public void write(String str) throws IOException { - spyResponse(str); - mOriginalWriter.write(str); - mOriginalWriter.flush(); - } - - /** - * Write a portion of the string. - */ - public void write(String str, int off, int len) throws IOException { - String strpart = str.substring(off, len); - spyResponse(strpart); - mOriginalWriter.write(str, off, len); - mOriginalWriter.flush(); - } - - /** - * Close writer. - */ - public void close() throws IOException { - mOriginalWriter.close(); - } - - /** - * Flush the stream - */ - public void flush() throws IOException { - mOriginalWriter.flush(); - } - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/SiteCommandHandler.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/SiteCommandHandler.java deleted file mode 100644 index 28f05d23e..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/SiteCommandHandler.java +++ /dev/null @@ -1,475 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver; - -import java.util.Date; -import java.util.List; -import java.util.Collection; -import java.util.Iterator; -import java.util.StringTokenizer; -import java.text.SimpleDateFormat; -import java.lang.reflect.Method; - -import org.apache.ftpserver.util.StringUtils; -import org.apache.ftpserver.ip.IpRestrictorInterface; -import org.apache.ftpserver.usermanager.User; -import org.apache.ftpserver.usermanager.UserManagerInterface; - -/** - * Handle ftp site command. - * - * @author Rana Bhattacharyya - */ -public -class SiteCommandHandler { - - // as SimpleDateFormat is not thread-safe we have to use ThreadLocal - private final static ThreadLocal DATE_FMT = new ThreadLocal() { - protected Object initialValue() { - return new SimpleDateFormat("MM/dd HH:mm:ss"); - } - }; - - protected final static Class[] INPUT_SIG = new Class[] {String[].class, FtpRequest.class}; - - private FtpConfig mConfig; - private FtpUser mUser; - - - /** - * Constructor - set the configuration object - */ - public SiteCommandHandler(FtpConfig cfg, FtpUser user) { - mConfig = cfg; - mUser = user; - } - - - /** - * Handle site. - */ - public String getResponse(FtpRequest request) { - String argArray[] = parseArg(request.getArgument()); - - String response = ""; - if(hasPermission(argArray)) { - if((argArray != null) && (argArray.length != 0)) { - try { - String metName = "do" + argArray[0].toUpperCase(); - Method actionMet = getClass().getDeclaredMethod(metName, INPUT_SIG); - response = (String)actionMet.invoke(this, new Object[] {argArray, request}); - } - catch(Throwable th) { - mConfig.getLogger().warn("SiteCommandHandler.getResponse()", th); - response = mConfig.getStatus().getResponse(530, request, mUser, null); - } - } - else { - response = mConfig.getStatus().getResponse(200, request, mUser, null); - } - } - else { - response = mConfig.getStatus().getResponse(530, request, mUser, null); - } - - return response; - } - - - /** - * Parse all the tokens. - */ - private String[] parseArg(String arg) { - if(arg == null) { - return null; - } - - StringTokenizer st = new StringTokenizer(arg, " "); - String[] args = new String[st.countTokens()]; - for(int i = 0;i < args.length;i++) { - args[i] = st.nextToken(); - } - - return args; - } - - - /** - * Has permission - */ - private boolean hasPermission(String args[]) { - UserManagerInterface userManager = mConfig.getUserManager(); - String adminName = userManager.getAdminName(); - if(args == null || mUser.getName().equals(adminName)) { - return true; - } - return ((args.length > 0) && "HELP".equalsIgnoreCase(args[0])); - } - - - //////////////////////////////////////////////////////////////////////////// - //////////////////////// All site command handlers //////////////////////// - /** - * Add banned IP - */ - public String doADDIP(String[] args, FtpRequest cmd) { - if(args.length != 2) { - return mConfig.getStatus().getResponse(501, cmd, mUser, null); - } - - String response = ""; - try { - IpRestrictorInterface ipRestrictor = mConfig.getIpRestrictor(); - ipRestrictor.addEntry(args[1]); - ipRestrictor.save(); - response = mConfig.getStatus().getResponse(200, cmd, mUser, null); - } - catch(Exception ex) { - mConfig.getLogger().warn("SiteCommandHandler.doADDIP()", ex); - response = mConfig.getStatus().getResponse(451, cmd, mUser, null); - } - return response; - } - - - /** - * Add user - */ - public String doADDUSER(String[] args, FtpRequest cmd) { - if(args.length != 2) { - return mConfig.getStatus().getResponse(501, cmd, mUser, null); - } - - String response = ""; - try { - String userName = args[1]; - UserManagerInterface userManager = mConfig.getUserManager(); - if(!userManager.doesExist(userName)) { - User user = new User(); - user.setName(userName); - user.setPassword(""); - user.setEnabled(false); - user.getVirtualDirectory().setWritePermission(false); - user.setMaxUploadRate(0); - user.setMaxDownloadRate(0); - user.getVirtualDirectory().setRootDirectory(mConfig.getDefaultRoot()); - user.setMaxIdleTime(mConfig.getDefaultIdleTime()); - mConfig.getUserManager().save(user); - } - response = mConfig.getStatus().getResponse(200, cmd, mUser, null); - } - catch(Exception ex) { - mConfig.getLogger().warn("SiteCommandHandler.doADDUSER()", ex); - response = mConfig.getStatus().getResponse(451, cmd, mUser, null); - } - return response; - } - - - /** - * Add banned IP - */ - public String doDELIP(String[] args, FtpRequest cmd) { - if(args.length != 2) { - return mConfig.getStatus().getResponse(501, cmd, mUser, null); - } - - String response = ""; - try { - IpRestrictorInterface ipRestrictor = mConfig.getIpRestrictor(); - ipRestrictor.removeEntry(args[1]); - ipRestrictor.save(); - response = mConfig.getStatus().getResponse(200, cmd, mUser, null); - } - catch(Exception ex) { - mConfig.getLogger().warn("SiteCommandHandler.doDELIP()", ex); - response = mConfig.getStatus().getResponse(451, cmd, mUser, null); - } - return response; - } - - - /** - * Delete user from repository. - */ - public String doDELUSER(String[] args, FtpRequest cmd) { - if(args.length != 2) { - return mConfig.getStatus().getResponse(501, cmd, mUser, null); - } - - String response = ""; - try { - mConfig.getUserManager().delete(args[1]); - response = mConfig.getStatus().getResponse(200, cmd, mUser, null); - } - catch(Exception ex) { - mConfig.getLogger().warn("SiteCommandHandler.doDELUSER()", ex); - response = mConfig.getStatus().getResponse(451, cmd, mUser, null); - } - return response; - } - - /** - * Describe user. - */ - public String doDESCUSER(String[] args, FtpRequest cmd) { - if(args.length != 2) { - return mConfig.getStatus().getResponse(501, cmd, mUser, null); - } - - StringBuffer sb = new StringBuffer(); - sb.append('\n'); - User user = mConfig.getUserManager().getUserByName(args[1]); - if(user != null) { - sb.append(User.ATTR_LOGIN).append(" : ").append(user.getName()).append('\n'); - sb.append(User.ATTR_PASSWORD).append(" : ").append("******").append('\n'); - sb.append(User.ATTR_HOME).append(" : ").append(user.getVirtualDirectory().getRootDirectory()).append('\n'); - sb.append(User.ATTR_WRITE_PERM).append(" : ").append(user.getVirtualDirectory().getWritePermission()).append('\n'); - sb.append(User.ATTR_ENABLE).append(" : ").append(user.getEnabled()).append('\n'); - sb.append(User.ATTR_MAX_IDLE_TIME).append(" : ").append(user.getMaxIdleTime()).append('\n'); - sb.append(User.ATTR_MAX_UPLOAD_RATE).append(" : ").append(user.getMaxUploadRate()).append('\n'); - sb.append(User.ATTR_MAX_DOWNLOAD_RATE).append(" : ").append(user.getMaxDownloadRate()).append('\n'); - } - sb.append('\n'); - return mConfig.getStatus().processNewLine(sb.toString(), 200); - } - - - /** - * Display site help. - */ - public String doHELP(String[] args, FtpRequest cmd) { - StringBuffer sb = new StringBuffer(); - sb.append('\n'); - sb.append("ADDIP : add banned IP entry").append('\n'); - sb.append("ADDUSER : add user").append('\n'); - sb.append("DELIP : delete banned IP entry").append('\n'); - sb.append("DELUSER : delete user").append('\n'); - sb.append("DESCUSER : describe user").append('\n'); - sb.append("HELP : display this message").append('\n'); - sb.append("KICK : close the connection").append('\n'); - sb.append("LISTIP : display all banned IPs").append('\n'); - sb.append("LISTUSER : display all user names").append('\n'); - sb.append("SETATTR : set user attributes").append('\n'); - sb.append("STAT : show statistics").append('\n'); - sb.append("WHO : display all connected users").append('\n'); - sb.append('\n'); - return mConfig.getStatus().processNewLine(sb.toString(), 200); - } - - /** - * Disconnect ftp connections - */ - public String doKICK(String[] args, FtpRequest cmd) { - if(args.length != 2) { - return mConfig.getStatus().getResponse(501, cmd, mUser, null); - } - String userName = args[1]; - List allUsers = mConfig.getConnectionService().getAllUsers(); - for(Iterator userIt = allUsers.iterator();userIt.hasNext();) { - FtpUser user = (FtpUser)userIt.next(); - if(userName.equals(user.getName())) { - mConfig.getConnectionService().closeConnection(user.getSessionId()); - } - } - return mConfig.getStatus().getResponse(200, cmd, mUser, null); - } - - - /** - * List all banned IPs. - */ - public String doLISTIP(String[] args, FtpRequest cmd) { - StringBuffer sb = new StringBuffer(); - sb.append('\n'); - for(Iterator ipIt = mConfig.getIpRestrictor().getAllEntries().iterator();ipIt.hasNext();) { - sb.append(ipIt.next()).append('\n'); - } - sb.append('\n'); - return mConfig.getStatus().processNewLine(sb.toString(), 200); - } - - - /** - * List all the users. - */ - public String doLISTUSER(String[] args, FtpRequest cmd) { - Collection userNames = mConfig.getUserManager().getAllUserNames(); - StringBuffer sb = new StringBuffer(); - sb.append('\n'); - for(Iterator userIt = userNames.iterator();userIt.hasNext();) { - sb.append(userIt.next()).append('\n'); - } - sb.append('\n'); - return mConfig.getStatus().processNewLine(sb.toString(), 200); - } - - - /** - * Delete user from repository. - */ - public String doSETATTR(String[] args, FtpRequest cmd) { - if(args.length != 4) { - return mConfig.getStatus().getResponse(501, cmd, mUser, null); - } - - boolean bSuccess = true; - try { - User user = mConfig.getUserManager().getUserByName(args[1]); - if(user != null) { - - if ( User.ATTR_PASSWORD.equals(args[2]) ) { - user.setPassword(args[3]); - } - else if ( User.ATTR_HOME.equals(args[2]) ) { - user.getVirtualDirectory().setRootDirectory(args[3]); - } - else if ( User.ATTR_WRITE_PERM.equals(args[2]) ) { - user.getVirtualDirectory().setWritePermission("true".equals(args[3])); - } - else if ( User.ATTR_ENABLE.equals(args[2]) ) { - user.setEnabled("true".equals(args[3])); - } - else if ( User.ATTR_MAX_IDLE_TIME.equals(args[2]) ) { - user.setMaxIdleTime(Integer.parseInt(args[3])); - } - else if ( User.ATTR_MAX_UPLOAD_RATE.equals(args[2]) ) { - user.setMaxUploadRate(Integer.parseInt(args[3])); - } - else if ( User.ATTR_MAX_DOWNLOAD_RATE.equals(args[2]) ) { - user.setMaxDownloadRate(Integer.parseInt(args[3])); - } - else { - bSuccess = false; - } - - if(bSuccess) { - mConfig.getUserManager().save(user); - } - } - else { - bSuccess = false; - } - } - catch(Exception ex) { - mConfig.getLogger().warn("SiteCommandHandler.doSETATTR()", ex); - bSuccess = false; - } - - String response = ""; - if(bSuccess) { - response = mConfig.getStatus().getResponse(200, cmd, mUser, null); - } - else { - response = mConfig.getStatus().getResponse(451, cmd, mUser, null); - } - - return response; - } - - - /** - * Delete user from repository. - */ - public String doSTAT(String[] args, FtpRequest cmd) { - FtpStatistics stat = mConfig.getStatistics(); - StringBuffer sb = new StringBuffer(); - sb.append('\n'); - sb.append("Start Time : ").append(((SimpleDateFormat)DATE_FMT.get()).format(stat.getStartTime())).append('\n'); - sb.append("Upload Number : ").append(stat.getFileUploadNbr()).append('\n'); - sb.append("Download Number : ").append(stat.getFileDownloadNbr()).append('\n'); - sb.append("Delete Number : ").append(stat.getFileDeleteNbr()).append('\n'); - sb.append("Uploade Bytes : ").append(stat.getFileUploadSize()).append('\n'); - sb.append("Downloaded Bytes : ").append(stat.getFileDownloadSize()).append('\n'); - sb.append("Current Logins : ").append(stat.getLoginNbr()).append('\n'); - sb.append("Total Logins : ").append(stat.getTotalLoginNbr()).append('\n'); - sb.append("Current Anonymous Logins : ").append(stat.getAnonLoginNbr()).append('\n'); - sb.append("Total Anonymous Logins : ").append(stat.getTotalAnonLoginNbr()).append('\n'); - sb.append("Current Connections : ").append(stat.getConnectionNbr()).append('\n'); - sb.append("Total Connections : ").append(stat.getTotalConnectionNbr()).append('\n'); - sb.append('\n'); - return mConfig.getStatus().processNewLine(sb.toString(), 200); - } - - - /** - * Display all connected users. - */ - public String doWHO(String[] args, FtpRequest cmd) { - StringBuffer sb = new StringBuffer(); - List allUsers = mConfig.getConnectionService().getAllUsers(); - - sb.append('\n'); - for(Iterator userIt = allUsers.iterator();userIt.hasNext();) { - FtpUser user = (FtpUser)userIt.next(); - if(!user.hasLoggedIn()) { - continue; - } - - SimpleDateFormat fmt = (SimpleDateFormat)DATE_FMT.get(); - sb.append(StringUtils.pad(user.getName(), ' ', true, 16)); - sb.append(StringUtils.pad(user.getClientAddress().getHostAddress(), ' ', true, 16)); - sb.append(StringUtils.pad(fmt.format(new Date(user.getLoginTime())), ' ', true, 16)); - sb.append(StringUtils.pad(fmt.format(new Date(user.getLastAccessTime())), ' ', true, 16)); - sb.append('\n'); - } - sb.append('\n'); - return mConfig.getStatus().processNewLine(sb.toString(), 200); - } - -} - diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/interfaces/FtpConnectionObserver.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/interfaces/FtpConnectionObserver.java deleted file mode 100644 index c7c7ff502..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/interfaces/FtpConnectionObserver.java +++ /dev/null @@ -1,86 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.interfaces; - -import org.apache.ftpserver.FtpUser; - -/** - * This observer interface monitors all the ftp connections. - * - * @author Rana Bhattacharyya - */ -public -interface FtpConnectionObserver { - - /** - * New connection notification. - * @param user new connected user. - */ - void newConnection(final FtpUser user); - - /** - * Close connection notification - * @param user closed user object - */ - void removeConnection(final FtpUser user); - - /** - * Update connection notification - * @param user updated user object - */ - void updateConnection(final FtpUser user); -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/interfaces/FtpFileListener.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/interfaces/FtpFileListener.java deleted file mode 100644 index 350c54a48..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/interfaces/FtpFileListener.java +++ /dev/null @@ -1,84 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.interfaces; - -import java.io.File; - -/** - * Ftp file upload/download/delete listener interface. - * - * @author Rana Bhattacharyya - */ -public -interface FtpFileListener { - - /** - * User file upload notification. - */ - void notifyUpload(final File file, final String sessionId); - - /** - * User file download notification. - */ - void notifyDownload(final File file, final String sessionId); - - /** - * User file delete notification. - */ - void notifyDelete(final File file, final String sessionId); -} - diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/interfaces/FtpServerInterface.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/interfaces/FtpServerInterface.java deleted file mode 100644 index cfc386982..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/interfaces/FtpServerInterface.java +++ /dev/null @@ -1,76 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.interfaces; - - -/** - * Ftp server interface. - * @author Rana Bhattacharyya - */ -public -interface FtpServerInterface { - - /** - * Service role name. It will be used for RMI binding too. - */ - String ROLE = "org.apache.ftpserver.interfaces.FtpServerInterface"; - - /** - * Ftp server name - */ - String DISPLAY_NAME = "Ftp"; -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/interfaces/FtpStatisticsListener.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/interfaces/FtpStatisticsListener.java deleted file mode 100644 index 3577a2d03..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/interfaces/FtpStatisticsListener.java +++ /dev/null @@ -1,98 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.interfaces; - - -/** - * Ftp statistics listener interface. - * - * @author Rana Bhattacharyya - */ -public -interface FtpStatisticsListener { - - /** - * User file upload notification. - */ - void notifyUpload(); - - /** - * User file download notification. - */ - void notifyDownload(); - - /** - * User file delete notification. - */ - void notifyDelete(); - - /** - * New user login notification. - */ - void notifyLogin(); - - /** - * User logout notification. - */ - void notifyLogout(); - - /** - * Connection open/close notification - */ - void notifyConnection(); - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/interfaces/SpyConnectionInterface.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/interfaces/SpyConnectionInterface.java deleted file mode 100644 index 3319ca991..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/interfaces/SpyConnectionInterface.java +++ /dev/null @@ -1,78 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.interfaces; - -import java.io.IOException; - -/** - * This interface is used to monitor user activities; - * - * @author Rana Bhattacharyya - */ -public -interface SpyConnectionInterface { - - /** - * Write user request. - */ - void request(final String msg) throws IOException; - - /** - * Write server response. - */ - void response(final String msg) throws IOException; -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/ip/AbstractIpRestrictor.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/ip/AbstractIpRestrictor.java deleted file mode 100644 index 7ce751198..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/ip/AbstractIpRestrictor.java +++ /dev/null @@ -1,158 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ - -package org.apache.ftpserver.ip; - -import java.io.IOException; - -import org.apache.avalon.framework.activity.Disposable; -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.context.Context; -import org.apache.avalon.framework.context.ContextException; -import org.apache.avalon.framework.context.Contextualizable; -import org.apache.avalon.framework.logger.AbstractLogEnabled; -//import org.apache.avalon.phoenix.BlockContext; - -/** - * Abstract ip restrictor class. - * - * @author Rana Bhattacharyya - */ -public -abstract class AbstractIpRestrictor extends AbstractLogEnabled - implements IpRestrictorInterface, - Contextualizable, - Configurable, - Initializable, - Disposable { - - protected Configuration mConfig; - protected boolean mbAllowIp; - private String mBaseDirectory = null; - - /** - * Set context object - first step. - */ - public void contextualize(Context context) throws ContextException { -// mBlockContext = (BlockContext) context; - } - - - /** - * Configure user manager - third step. - */ - public void configure(Configuration config) throws ConfigurationException { - mConfig = config; - - // get server address - Configuration tmpConf = mConfig.getChild("allow-ip", false); - mbAllowIp = false; - if(tmpConf != null) { - mbAllowIp = tmpConf.getValueAsBoolean(mbAllowIp); - } - - mBaseDirectory = config.getChild("base-directory").getValue(null); - - if(mBaseDirectory == null) - throw new ConfigurationException("Missing configuration element 'base-directory'"); - } - - /** - * Get allow/ban IP flag. - */ - public boolean isAllowIp() { - return mbAllowIp; - } - - /** - * Get config object. - */ - public Configuration getConfig() { - return mConfig; - } - - - /** - * - */ - public String getBaseDirectory() { - return mBaseDirectory; - } - - /** - * Initialize - fourth step. - */ - public void initialize() throws Exception { - } - - /** - * Reload banned ip list - dummy implementation - */ - public void reload() throws IOException { - } - - /** - * Close user manager - dummy implementation. - */ - public void dispose() { - getLogger().info("Closing ip restrictor..."); - } - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/ip/FileIpRestrictor.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/ip/FileIpRestrictor.java deleted file mode 100644 index dec4552fe..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/ip/FileIpRestrictor.java +++ /dev/null @@ -1,211 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.ip; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.net.InetAddress; -import java.util.Collection; -import java.util.Vector; - -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.context.Context; -import org.apache.avalon.framework.context.ContextException; -import org.apache.ftpserver.util.IoUtils; -import org.apache.ftpserver.util.RegularExpr; -//import org.apache.avalon.phoenix.BlockContext; - - -/** - * This class provides IP restriction functionality. - * - * @phoenix:block - * @phoenix:service name="org.apache.ftpserver.ip.IpRestrictorInterface" - * - * @author Rana Bhattacharyya - */ -public class FileIpRestrictor extends AbstractIpRestrictor { - - private static final String LINE_SEP = System.getProperty("line.separator", "\n"); - - private File mIpFile = null; - private Vector mAllEntries = new Vector(); - - /** - * Set application context. - */ - public void contextualize(Context context) throws ContextException { - super.contextualize(context); - - mIpFile = new File( getBaseDirectory(), "ip.properties" ); - try { - reload(); - } - catch(IOException ex) { - getLogger().error("IpRestrictor:contextualize()", ex); - throw new ContextException("IpRestrictor:contextualize()", ex); - } - getLogger().info("IP restrictor file = " + mIpFile); - } - - /** - * Read the list from the file. - */ - public synchronized void reload() throws IOException { - BufferedReader br = null; - Vector newEntries = new Vector(); - try { - if (mIpFile.exists()) { - br = IoUtils.getBufferedReader(new FileReader(mIpFile)); - String line = null; - while((line = br.readLine()) != null) { - line = line.trim(); - if(!line.equals("")) { - newEntries.add(line); - } - } - } - mAllEntries = newEntries; - } - finally { - IoUtils.close(br); - } - } - - /** - * Get IP resrictor file object. - */ - public File getFile() { - return mIpFile; - } - - /** - * Save this IP restriction list. - */ - public synchronized void save() throws IOException { - FileWriter fw = null; - try { - fw = new FileWriter(mIpFile); - Object[] entries = mAllEntries.toArray(); - for(int i=entries.length; --i>=0; ) { - fw.write(entries[i].toString()); - fw.write(LINE_SEP); - } - } - finally { - IoUtils.close(fw); - } - } - - /** - * Check IP permission. Compare it with all the entries in the list. - */ - public boolean hasPermission(InetAddress addr) { - boolean bMatch = false; - Object[] entries = mAllEntries.toArray(); - for(int i=entries.length; --i>=0; ) { - RegularExpr regExp = new RegularExpr(entries[i].toString()); - bMatch = regExp.isMatch(addr.getHostAddress()); - if(bMatch) { - break; - } - } - - if (isAllowIp()) { - return bMatch; - } - else { - return !bMatch; - } - } - - /** - * Add a new entry. - */ - public void addEntry(String entry) { - entry = entry.trim(); - if(entry.equals("")) { - return; - } - mAllEntries.add(entry); - } - - /** - * Remove entry - */ - public void removeEntry(String entry) { - mAllEntries.remove(entry); - } - - /** - * Get all entries - */ - public Collection getAllEntries() { - return (Collection)mAllEntries.clone(); - } - - /** - * Remove all entries - */ - public void clear() { - mAllEntries.clear(); - } -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/ip/IpRestrictorInterface.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/ip/IpRestrictorInterface.java deleted file mode 100644 index a18e73fca..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/ip/IpRestrictorInterface.java +++ /dev/null @@ -1,114 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.ip; - -import java.io.IOException; -import java.net.InetAddress; -import java.util.Collection; - - -/** - * IP Restrictor interface - * - * @author Rana Bhattacharyya - */ - -public -interface IpRestrictorInterface { - - String ROLE = IpRestrictorInterface.class.getName(); - - /** - * Allow/ban the listed IPs flag. - */ - boolean isAllowIp(); - - /** - * Reload data from store. - */ - void reload() throws IOException; - - /** - * Save data into store. - */ - void save() throws IOException; - - /** - * Check IP permission. - */ - boolean hasPermission(InetAddress addr); - - /** - * Clear all entries. - */ - void clear(); - - /** - * Add new entry - */ - void addEntry(String str); - - /** - * Remove entry - */ - void removeEntry(String str); - - /** - * Get all entries - */ - Collection getAllEntries(); -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/ConnectionService.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/ConnectionService.java deleted file mode 100644 index ddb00abeb..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/ConnectionService.java +++ /dev/null @@ -1,159 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote; - -import java.util.List; -import java.rmi.RemoteException; -import java.rmi.server.UnicastRemoteObject; - -import org.apache.ftpserver.FtpUser; -import org.apache.ftpserver.BaseFtpConnection; -import org.apache.ftpserver.remote.adapter.FtpConnectionObserverAdapter; -import org.apache.ftpserver.remote.adapter.SpyConnectionAdapter; -import org.apache.ftpserver.remote.interfaces.SpyConnectionInterface; -import org.apache.ftpserver.remote.interfaces.FtpConnectionObserver; - -/** - * Ftp remote user service adapter class - used by remote admin GUI. - * - * @author Rana Bhattacharyya - */ -public -class ConnectionService implements org.apache.ftpserver.remote.interfaces.ConnectionServiceInterface { - - private org.apache.ftpserver.ConnectionService mConnectionService; - private FtpConnectionObserverAdapter mConnectionObserverAdapter; - - - /** - * Constructor - sets the actual connection service object - */ - public ConnectionService(final org.apache.ftpserver.ConnectionService conService) throws RemoteException { - mConnectionService = conService; - mConnectionObserverAdapter = new FtpConnectionObserverAdapter(); - UnicastRemoteObject.exportObject(this); - } - - /** - * Get the actual object. - */ - public org.apache.ftpserver.ConnectionService getConnectionService() { - return mConnectionService; - } - - /** - * It returns a list of all the currently connected users. - */ - public List getAllUsers() { - return mConnectionService.getAllUsers(); - } - - /** - * Set connection observer. - */ - public void setObserver(final FtpConnectionObserver obsr) { - mConnectionObserverAdapter.setConnectionObserver(obsr); - if (obsr == null) { - mConnectionService.setObserver(null); - } - else { - mConnectionService.setObserver(mConnectionObserverAdapter); - } - } - - /** - * Get the observer. - */ - public FtpConnectionObserver getObserver() { - return mConnectionObserverAdapter.getConnectionObserver(); - } - - /** - * Get connected user - */ - public FtpUser getUser(final String sessId) { - BaseFtpConnection con = mConnectionService.getConnection(sessId); - return (con != null) ? con.getUser() : null; - } - - /** - * Set spy object - */ - public void setSpyObject(final String sessId, final SpyConnectionInterface spy) { - if (spy == null) { - mConnectionService.setSpyObject(sessId, null); - } - else { - SpyConnectionAdapter newAdapter = new SpyConnectionAdapter(spy); - mConnectionService.setSpyObject(sessId, newAdapter); - } - } - - /** - * Close ftp connection for this session id. - */ - public void closeConnection(final String sessionId) { - mConnectionService.closeConnection(sessionId); - } - - /** - * Close all - close all the connections. - */ - public void closeAllConnections() { - mConnectionService.closeAllConnections(); - } -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/FtpConfig.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/FtpConfig.java deleted file mode 100644 index b90cc24f1..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/FtpConfig.java +++ /dev/null @@ -1,208 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote; - -import java.rmi.RemoteException; -import java.rmi.server.UnicastRemoteObject; -import java.net.InetAddress; - -import org.apache.ftpserver.remote.interfaces.FtpConfigInterface; -import org.apache.ftpserver.remote.interfaces.IpRestrictorInterface; -import org.apache.ftpserver.remote.interfaces.ConnectionServiceInterface; -import org.apache.ftpserver.remote.interfaces.UserManagerInterface; -import org.apache.ftpserver.remote.interfaces.FtpStatisticsInterface; - -/** - * Ftp configuration remote adapter. It is used by remote admin GUI. - * - * @author Rana Bhattacharyya - */ -public -class FtpConfig implements FtpConfigInterface { - - private org.apache.ftpserver.FtpConfig mConfig; - - private IpRestrictor mIpRestrictor; - private UserManager mUserManager; - private ConnectionService mConService; - private FtpStatistics mStatistics; - - /** - * Constructor - sets the actual config object. - */ - public FtpConfig(org.apache.ftpserver.FtpConfig config) throws RemoteException { - mConfig = config; - mIpRestrictor = new IpRestrictor(config.getIpRestrictor()); - mUserManager = new UserManager(config.getUserManager()); - mConService = new ConnectionService(config.getConnectionService()); - mStatistics = new FtpStatistics(config.getStatistics()); - - UnicastRemoteObject.exportObject(this); - } - - /** - * Get config - */ - public org.apache.ftpserver.FtpConfig getConfig() { - return mConfig; - } - - /** - * Get user manager - */ - public UserManagerInterface getUserManager() { - return mUserManager; - } - - /** - * Get IP restrictor object. - */ - public IpRestrictorInterface getIpRestrictor() { - return mIpRestrictor; - } - - /** - * Get server bind address. - */ - public InetAddress getServerAddress() { - return mConfig.getServerAddress(); - } - - /** - * Get address string - */ - public String getAddressString() { - return mConfig.getSelfAddress().toString(); - } - - /** - * Get server port. - */ - public int getServerPort() { - return mConfig.getServerPort(); - } - - /** - * Check annonymous login support. - */ - public boolean isAnonymousLoginAllowed() { - return mConfig.isAnonymousLoginAllowed(); - } - - /** - * Get the connection handler - */ - public ConnectionServiceInterface getConnectionService() { - return mConService; - } - - /** - * Get maximum number of connections. - */ - public int getMaxConnections() { - return mConfig.getMaxConnections(); - } - - /** - * Get maximum number of anonymous connections. - */ - public int getMaxAnonymousLogins() { - return mConfig.getMaxAnonymousLogins(); - } - - /** - * Get poll interval in seconds. - */ - public int getSchedulerInterval() { - return mConfig.getSchedulerInterval(); - } - - /** - * Get default idle time in seconds. - */ - public int getDefaultIdleTime() { - return mConfig.getDefaultIdleTime(); - } - - /** - * Get default root directory - */ - public String getDefaultRoot() { - return mConfig.getDefaultRoot().getAbsolutePath(); - } - - /** - * Get global statistics object. - */ - public FtpStatisticsInterface getStatistics() { - return mStatistics; - } - - /** - * Get rmi port - */ - public int getRemoteAdminPort() { - return mConfig.getRemoteAdminPort(); - } - - /** - * Is remote admin allowed - */ - public boolean isRemoteAdminAllowed() { - return mConfig.isRemoteAdminAllowed(); - } -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/FtpStatistics.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/FtpStatistics.java deleted file mode 100644 index 4decc4c2f..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/FtpStatistics.java +++ /dev/null @@ -1,219 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote; - -import java.rmi.RemoteException; -import java.rmi.server.UnicastRemoteObject; -import java.util.Date; - -import org.apache.ftpserver.remote.adapter.FtpFileListenerAdapter; -import org.apache.ftpserver.remote.adapter.FtpStatisticsListenerAdapter; -import org.apache.ftpserver.remote.interfaces.FtpStatisticsInterface; -import org.apache.ftpserver.remote.interfaces.FtpStatisticsListener; -import org.apache.ftpserver.remote.interfaces.FtpFileListener; - -/** - * Ftp statistis remote adapter class. - * - * @author Rana Bhattacharyya - */ -public -class FtpStatistics implements FtpStatisticsInterface { - - private org.apache.ftpserver.FtpStatistics mStatistics; - - private FtpStatisticsListenerAdapter mStatisticsListener; - private FtpFileListenerAdapter mFileListener; - - /** - * Constructor - sets the actual statistics object - */ - public FtpStatistics(final org.apache.ftpserver.FtpStatistics statistics) throws RemoteException { - mStatistics = statistics; - - mStatisticsListener = new FtpStatisticsListenerAdapter(); - mFileListener = new FtpFileListenerAdapter(); - - UnicastRemoteObject.exportObject(this); - } - - /** - * Get server start time. - */ - public Date getStartTime() { - return mStatistics.getStartTime(); - } - - /** - * Get number of files uploaded. - */ - public int getFileUploadNbr() { - return mStatistics.getFileUploadNbr(); - } - - /** - * Get number of files downloaded. - */ - public int getFileDownloadNbr() { - return mStatistics.getFileDownloadNbr(); - } - - /** - * Get number of files deleted. - */ - public int getFileDeleteNbr() { - return mStatistics.getFileDeleteNbr(); - } - - /** - * Get total number of bytes uploaded. - */ - public long getFileUploadSize() { - return mStatistics.getFileUploadSize(); - } - - /** - * Get total number of bytes downloaded. - */ - public long getFileDownloadSize() { - return mStatistics.getFileDownloadSize(); - } - - /** - * Get current number of connections. - */ - public int getConnectionNbr() { - return mStatistics.getConnectionNbr(); - } - - /** - * Get total number of connections - */ - public int getTotalConnectionNbr() { - return mStatistics.getTotalConnectionNbr(); - } - - /** - * Get current number of logins - */ - public int getLoginNbr() { - return mStatistics.getLoginNbr(); - } - - /** - * Get total number of logins - */ - public int getTotalLoginNbr() { - return mStatistics.getTotalLoginNbr(); - } - - /** - * Get current number of anonymous logins. - */ - public int getAnonLoginNbr() { - return mStatistics.getAnonLoginNbr(); - } - - /** - * Get total number of anonymous logins - */ - public int getTotalAnonLoginNbr() { - return mStatistics.getTotalAnonLoginNbr(); - } - - /** - * Set a listener object. - */ - public void setListener(FtpStatisticsListener listener) { - mStatisticsListener.setStatisticsListener(listener); - if (listener == null) { - mStatistics.setListener(null); - } - else { - mStatistics.setListener(mStatisticsListener); - } - } - - /** - * Get listener object. - */ - public FtpStatisticsListener getListener() { - return mStatisticsListener.getStatisticsListener(); - } - - /** - * Get file listener - */ - public void setFileListener(FtpFileListener listener) { - mFileListener.setFileListener(listener); - if (listener == null) { - mStatistics.setFileListener(null); - } - else { - mStatistics.setFileListener(mFileListener); - } - } - - /** - * Set file listener - */ - public FtpFileListener getFileListener() { - return mFileListener.getFileListener(); - } - - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/IpRestrictor.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/IpRestrictor.java deleted file mode 100644 index bd9cffb48..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/IpRestrictor.java +++ /dev/null @@ -1,145 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote; - -import java.io.IOException; -import java.net.InetAddress; -import java.util.Collection; -import java.rmi.RemoteException; -import java.rmi.server.UnicastRemoteObject; - -/** - * IP Restrictor remotr adapter class. Used by admin GUI. - * - * @author Rana Bhattacharyya - */ -public -class IpRestrictor implements org.apache.ftpserver.remote.interfaces.IpRestrictorInterface{ - - private org.apache.ftpserver.ip.IpRestrictorInterface mIpRestrictor; - - /** - * Constructor - sets the actual ip restrictor object - */ - public IpRestrictor(org.apache.ftpserver.ip.IpRestrictorInterface ipRestrictor) throws RemoteException { - mIpRestrictor = ipRestrictor; - UnicastRemoteObject.exportObject(this); - } - - /** - * Get the actual object. - */ - public org.apache.ftpserver.ip.IpRestrictorInterface getActualObject() { - return mIpRestrictor; - } - - /** - * Allow/ban IP flag - */ - public boolean isAllowIp() { - return mIpRestrictor.isAllowIp(); - } - - /** - * Reload data from store. - */ - public void reload() throws IOException { - mIpRestrictor.reload(); - } - - /** - * Save data into store. - */ - public void save() throws IOException { - mIpRestrictor.save(); - } - - /** - * Check IP permission. - */ - public boolean hasPermission(InetAddress addr) { - return mIpRestrictor.hasPermission(addr); - } - - /** - * Clear all entries. - */ - public void clear() { - mIpRestrictor.clear(); - } - - /** - * Add new entry - */ - public void addEntry(String str) { - mIpRestrictor.addEntry(str); - } - - /** - * Remove entry - */ - public void removeEntry(String str) { - mIpRestrictor.removeEntry(str); - } - - /** - * Get all entries - */ - public Collection getAllEntries() { - return mIpRestrictor.getAllEntries(); - } -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/RemoteHandler.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/RemoteHandler.java deleted file mode 100644 index e57b650fb..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/RemoteHandler.java +++ /dev/null @@ -1,209 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote; - -import java.rmi.RemoteException; -import java.rmi.registry.Registry; -import java.rmi.registry.LocateRegistry; -import java.rmi.server.UnicastRemoteObject; -import java.rmi.server.Unreferenced; -import java.rmi.server.UID; - -import org.apache.ftpserver.usermanager.User; -import org.apache.ftpserver.usermanager.UserManagerInterface; -import org.apache.ftpserver.remote.interfaces.FtpConfigInterface; -import org.apache.ftpserver.remote.interfaces.RemoteHandlerInterface; - -/** - * Ftp server remote admin adapter. This is the starting point of remote admin. - * - * @author Rana Bhattacharyya - */ -public -class RemoteHandler implements RemoteHandlerInterface, Unreferenced { - - private FtpConfig mFtpConfig; - private String mstAdminSession; - private Registry mRegistry; - - /** - * Constructor - set the actual user config object - */ - public RemoteHandler(org.apache.ftpserver.FtpConfig config) throws RemoteException { - - // open registry - int rmiPort = config.getRemoteAdminPort(); - try { - mRegistry = LocateRegistry.getRegistry(rmiPort); - mRegistry.list(); - } - catch(RemoteException ex) { - mRegistry = null; - } - - if(mRegistry == null) { - mRegistry = LocateRegistry.createRegistry(rmiPort); - } - - UnicastRemoteObject.exportObject(this); - mRegistry.rebind(BIND_NAME, this); - mFtpConfig = new FtpConfig(config); - } - - /** - * Remote admin login - */ - public synchronized String login(String id, String password) throws Exception { - try { - mFtpConfig.getConfig().getLogger().info("Remote admin login request from " + UnicastRemoteObject.getClientHost()); - } - catch(Exception ex) { - mFtpConfig.getConfig().getLogger().error("RemoteHandler.login()", ex); - } - - // data validation - if(mstAdminSession != null) { - throw new Exception("Multiple admin session is not possible."); - } - if(id == null) { - throw new Exception("Please specify user Id"); - } - if(password == null) { - throw new Exception("Please specify password"); - } - - // admin login - UserManagerInterface userManager = mFtpConfig.getConfig().getUserManager(); - String adminName = userManager.getAdminName(); - boolean bSuccess = false; - if ( id.equals(adminName) ) { - bSuccess = userManager.authenticate(id, password); - } - if(!bSuccess) { - throw new Exception("Login failure."); - } - - try { - mFtpConfig.getConfig().getLogger().info("Remote admin login from " + UnicastRemoteObject.getClientHost()); - } - catch(Exception ex) { - mFtpConfig.getConfig().getLogger().error("RemoteHandler.login()", ex); - } - mstAdminSession = new UID().toString(); - return mstAdminSession; - } - - /** - * Remote admin logout - */ - public synchronized boolean logout(String sessId) { - if( (sessId == null) || (!sessId.equals(mstAdminSession)) ) { - return false; - } - mFtpConfig.getConfig().getLogger().info("Remote admin logout"); - resetObservers(); - mstAdminSession = null; - return true; - } - - /** - * Get configuration interface - */ - public FtpConfigInterface getConfigInterface(String sessId) { - if( (sessId == null) || (!sessId.equals(mstAdminSession)) ) { - return null; - } - return mFtpConfig; - } - - /** - * Reset observers - */ - private void resetObservers() { - ConnectionService conService = (ConnectionService)mFtpConfig.getConnectionService(); - conService.setObserver(null); - conService.getConnectionService().resetAllSpyObjects(); - - FtpStatistics statistics = (FtpStatistics)mFtpConfig.getStatistics(); - statistics.setListener(null); - statistics.setFileListener(null); - } - - /** - * Close the remote handler - */ - public void dispose() { - mFtpConfig.getConfig().getLogger().info("Closing remote handler..."); - resetObservers(); - try { - if (mRegistry != null) { - mRegistry.unbind(BIND_NAME); - mRegistry = null; - } - } - catch(Exception ex) { - } - } - - /** - * Unreferenced - admin user idle timeout - */ - public synchronized void unreferenced() { - mFtpConfig.getConfig().getLogger().info("Remote admin timeout"); - logout(mstAdminSession); - } -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/UserManager.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/UserManager.java deleted file mode 100644 index f5c755ec4..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/UserManager.java +++ /dev/null @@ -1,151 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote; - -import java.util.List; -import java.rmi.RemoteException; -import java.rmi.server.UnicastRemoteObject; -import org.apache.ftpserver.usermanager.User; -import org.apache.ftpserver.remote.interfaces.UserManagerInterface; - -/** - * This is user manager remote adapter class. This is used by remote admin GUI. - * - * @author Rana Bhattacharyya - */ -public -class UserManager implements UserManagerInterface { - - private org.apache.ftpserver.usermanager.UserManagerInterface mUserManager; - - /** - * Constructor - sets the actual user manager - */ - public UserManager(org.apache.ftpserver.usermanager.UserManagerInterface userManager) throws RemoteException { - mUserManager = userManager; - UnicastRemoteObject.exportObject(this); - } - - /** - * Get the actual user manager - */ - public org.apache.ftpserver.usermanager.UserManagerInterface getUserManager() { - return mUserManager; - } - - /** - * Save the user. If a new user, create it else update the - * existing user. - */ - public void save(User user) throws Exception { - mUserManager.save(user); - } - - /** - * Delete the user from the system. - * - * @param name name of the user to be deleted. - */ - public void delete(String userName) throws Exception { - mUserManager.delete(userName); - } - - /** - * Get user by name. - */ - public User getUserByName(String name) { - return mUserManager.getUserByName(name); - } - - /** - * Get all user names in the system. - */ - public List getAllUserNames() { - return mUserManager.getAllUserNames(); - } - - /** - * User existance check. - * - * @param name user name - */ - public boolean doesExist(String name) { - return mUserManager.doesExist(name); - } - - /** - * Authenticate user - */ - public boolean authenticate(String login, String password) { - return mUserManager.authenticate(login, password); - } - - /** - * Load the user data again - */ - public void reload() throws Exception { - mUserManager.reload(); - } - - /** - * Get admin name - */ - public String getAdminName() { - return mUserManager.getAdminName(); - } - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/adapter/FtpConnectionObserverAdapter.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/adapter/FtpConnectionObserverAdapter.java deleted file mode 100644 index f4a25a0c3..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/adapter/FtpConnectionObserverAdapter.java +++ /dev/null @@ -1,141 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote.adapter; - -import java.rmi.RemoteException; -import org.apache.ftpserver.FtpUser; -import org.apache.ftpserver.remote.interfaces.FtpConnectionObserver; - - -/** - * This connection observer remote adapter class. - * - * @author Rana Bhattacharyya - */ -public -class FtpConnectionObserverAdapter implements org.apache.ftpserver.interfaces.FtpConnectionObserver { - - private FtpConnectionObserver mObserver; - - /** - * Default constructor. - */ - public FtpConnectionObserverAdapter() { - } - - /** - * Get observer - */ - public FtpConnectionObserver getConnectionObserver() { - return mObserver; - } - - /** - * Set observer - */ - public void setConnectionObserver(FtpConnectionObserver observer) { - mObserver = observer; - } - - /** - * New connection notification. - * @param user newly connected user - */ - public void newConnection(final FtpUser user) { - FtpConnectionObserver observer = mObserver; - if (observer != null) { - try { - observer.newConnection(user); - } - catch(RemoteException ex) { - mObserver = null; - } - } - } - - /** - * Close connection notification - * @param user closed user object. - */ - public void removeConnection(final FtpUser user) { - FtpConnectionObserver observer = mObserver; - if (observer != null) { - try { - observer.removeConnection(user); - } - catch(RemoteException ex) { - mObserver = null; - } - } - } - - /** - * Update connection notification - * @param user updated user object - */ - public void updateConnection(final FtpUser user) { - FtpConnectionObserver observer = mObserver; - if (observer != null) { - try { - observer.updateConnection(user); - } - catch(RemoteException ex) { - mObserver = null; - } - } - } -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/adapter/FtpFileListenerAdapter.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/adapter/FtpFileListenerAdapter.java deleted file mode 100644 index de6c8c741..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/adapter/FtpFileListenerAdapter.java +++ /dev/null @@ -1,139 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote.adapter; - -import java.io.File; -import java.rmi.RemoteException; -import org.apache.ftpserver.remote.interfaces.FtpFileListener; - -/** - * Ftp file upload/download/delete listener remote interface. - * - * @author Rana Bhattacharyya - */ -public -class FtpFileListenerAdapter implements org.apache.ftpserver.interfaces.FtpFileListener { - - private FtpFileListener mFileListener = null; - - /** - * Default constructor. - */ - public FtpFileListenerAdapter() { - } - - /** - * Get actual listener object - */ - public FtpFileListener getFileListener() { - return mFileListener; - } - - /** - * Set file listener - */ - public void setFileListener(FtpFileListener listener) { - mFileListener = listener; - } - - /** - * User file upload notification. - */ - public void notifyUpload(final File file, final String sessionId) { - FtpFileListener listener = mFileListener; - if (listener != null) { - try { - listener.notifyUpload(file.getAbsolutePath(), sessionId); - } - catch(RemoteException ex) { - mFileListener = null; - } - } - } - - /** - * User file download notification. - */ - public void notifyDownload(final File file, final String sessionId) { - FtpFileListener listener = mFileListener; - if (listener != null) { - try { - listener.notifyDownload(file.getAbsolutePath(), sessionId); - } - catch(RemoteException ex) { - mFileListener = null; - } - } - } - - /** - * User file delete notification. - */ - public void notifyDelete(final File file, final String sessionId) { - FtpFileListener listener = mFileListener; - if (listener != null) { - try { - listener.notifyDelete(file.getAbsolutePath(), sessionId); - } - catch(RemoteException ex) { - mFileListener = null; - } - } - } - -} - diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/adapter/FtpStatisticsListenerAdapter.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/adapter/FtpStatisticsListenerAdapter.java deleted file mode 100644 index 6063f16b1..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/adapter/FtpStatisticsListenerAdapter.java +++ /dev/null @@ -1,183 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote.adapter; - - -import java.rmi.RemoteException; -import org.apache.ftpserver.remote.interfaces.FtpStatisticsListener; - -/** - * Ftp statistics listener remote interface. - * - * @author Rana Bhattacharyya - */ -public -class FtpStatisticsListenerAdapter implements org.apache.ftpserver.interfaces.FtpStatisticsListener { - - private FtpStatisticsListener mListener = null; - - /** - * Constructor - set the actual listener object - */ - public FtpStatisticsListenerAdapter() { - } - - /** - * Get the actual listener object - */ - public FtpStatisticsListener getStatisticsListener() { - return mListener; - } - - /** - * Set the actual listener object. - */ - public void setStatisticsListener(FtpStatisticsListener listener) { - mListener = listener; - } - - /** - * User file upload notification. - */ - public void notifyUpload() { - FtpStatisticsListener listener = mListener; - if (listener != null) { - try { - listener.notifyUpload(); - } - catch(RemoteException ex) { - mListener = null; - } - } - } - - /** - * User file download notification. - */ - public void notifyDownload() { - FtpStatisticsListener listener = mListener; - if (listener != null) { - try { - listener.notifyDownload(); - } - catch(RemoteException ex) { - mListener = null; - } - } - } - - /** - * User file delete notification. - */ - public void notifyDelete() { - FtpStatisticsListener listener = mListener; - if (listener != null) { - try { - listener.notifyDelete(); - } - catch(RemoteException ex) { - mListener = null; - } - } - } - - /** - * New user login notification. - */ - public void notifyLogin() { - FtpStatisticsListener listener = mListener; - if (listener != null) { - try { - listener.notifyLogin(); - } - catch(RemoteException ex) { - mListener = null; - } - } - } - - /** - * User logout notification. - */ - public void notifyLogout() { - FtpStatisticsListener listener = mListener; - if (listener != null) { - try { - listener.notifyLogout(); - } - catch(RemoteException ex) { - mListener = null; - } - } - } - - /** - * Connection open/close notification - */ - public void notifyConnection() { - FtpStatisticsListener listener = mListener; - if (listener != null) { - try { - listener.notifyConnection(); - } - catch(RemoteException ex){ - mListener = null; - } - } - } - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/adapter/SpyConnectionAdapter.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/adapter/SpyConnectionAdapter.java deleted file mode 100644 index f9fbd3f7d..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/adapter/SpyConnectionAdapter.java +++ /dev/null @@ -1,122 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote.adapter; - -import java.io.IOException; -import java.rmi.RemoteException; -import org.apache.ftpserver.remote.interfaces.SpyConnectionInterface; - -/** - * This remote spy user adapter. - */ -public -class SpyConnectionAdapter implements org.apache.ftpserver.interfaces.SpyConnectionInterface { - - private SpyConnectionInterface mSpy; - - /** - * Default constructor. - */ - public SpyConnectionAdapter(SpyConnectionInterface spy) { - mSpy = spy; - } - - /** - * Get spy user - */ - public SpyConnectionInterface getSpyObject() { - return mSpy; - } - - /** - * Get spy user - */ - public void setSpyObject(SpyConnectionInterface spy) { - mSpy = spy; - } - - /** - * Write user request. - */ - public void request(final String msg) throws IOException { - SpyConnectionInterface spy = mSpy; - if(spy != null) { - try { - spy.request(msg); - } - catch(RemoteException ex) { - mSpy = null; - } - } - } - - - /** - * Write server response. - */ - public void response(final String msg) throws IOException { - SpyConnectionInterface spy = mSpy; - if(spy != null) { - try { - spy.response(msg); - } - catch(RemoteException ex) { - mSpy = null; - } - } - } -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/ConnectionServiceInterface.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/ConnectionServiceInterface.java deleted file mode 100644 index cd7477fd7..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/ConnectionServiceInterface.java +++ /dev/null @@ -1,107 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ - -package org.apache.ftpserver.remote.interfaces; - -import java.util.List; -import java.rmi.Remote; -import java.rmi.RemoteException; -import org.apache.ftpserver.FtpUser; - -/** - * Ftp user service interface - used by remote admin GUI. - * - * @author Rana Bhattacharyya - */ -public -interface ConnectionServiceInterface extends Remote { - - /** - * It returns a list of all the currently connected user objects. - */ - List getAllUsers() throws RemoteException; - - /** - * Set user manager observer. - */ - void setObserver(final FtpConnectionObserver obsr) throws RemoteException; - - /** - * Get the observer. - */ - FtpConnectionObserver getObserver() throws RemoteException; - - /** - * Close ftp connection for this session id. - */ - void closeConnection(final String sessionId) throws RemoteException; - - /** - * Close all - close all the connections. - */ - void closeAllConnections() throws RemoteException; - - /** - * Get connected user - */ - FtpUser getUser(String sessId) throws RemoteException; - - /** - * Set spy object - */ - void setSpyObject(String sessId, SpyConnectionInterface spy) throws RemoteException; -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/FtpConfigInterface.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/FtpConfigInterface.java deleted file mode 100644 index 26979cea5..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/FtpConfigInterface.java +++ /dev/null @@ -1,147 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ - -package org.apache.ftpserver.remote.interfaces; - -import java.rmi.Remote; -import java.rmi.RemoteException; -import java.net.InetAddress; - -/** - * Ftp configuration remote interface. It is used by remote admin GUI. - * - * @author Rana Bhattacharyya - */ -public -interface FtpConfigInterface extends Remote { - - /** - * Get user manager - */ - UserManagerInterface getUserManager() throws RemoteException; - - /** - * Get ip restrictor - */ - IpRestrictorInterface getIpRestrictor() throws RemoteException; - - /** - * Get server bind address. - */ - InetAddress getServerAddress() throws RemoteException; - - /** - * Get address string - */ - String getAddressString() throws RemoteException; - - /** - * Get server port. - */ - int getServerPort() throws RemoteException; - - /** - * Check annonymous login support. - */ - boolean isAnonymousLoginAllowed() throws RemoteException; - - /** - * Get user properties. - */ - ConnectionServiceInterface getConnectionService() throws RemoteException; - - /** - * Get maximum number of connections. - */ - int getMaxConnections() throws RemoteException; - - /** - * Get maximum number of anonymous connections. - */ - int getMaxAnonymousLogins() throws RemoteException; - - /** - * Get poll interval in seconds. - */ - int getSchedulerInterval() throws RemoteException; - - /** - * Get default idle time in seconds. - */ - int getDefaultIdleTime() throws RemoteException; - - /** - * Get default root directory - */ - String getDefaultRoot() throws RemoteException; - - /** - * Get global statistics object. - */ - FtpStatisticsInterface getStatistics() throws RemoteException; - - /** - * Get rmi port - */ - int getRemoteAdminPort() throws RemoteException; - - /** - * Is remote admin allowed - */ - boolean isRemoteAdminAllowed() throws RemoteException; -} - diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/FtpConnectionObserver.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/FtpConnectionObserver.java deleted file mode 100644 index 1e1364344..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/FtpConnectionObserver.java +++ /dev/null @@ -1,88 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote.interfaces; - -import java.rmi.Remote; -import java.rmi.RemoteException; -import org.apache.ftpserver.FtpUser; - -/** - * This observer interface monitors all the ftp connections. - * - * @author Rana Bhattacharyya - */ -public -interface FtpConnectionObserver extends Remote { - - /** - * New connection notification. - * @param user new connected user. - */ - void newConnection(final FtpUser user) throws RemoteException; - - /** - * Close connection notification - * @param user closed user object - */ - void removeConnection(final FtpUser user) throws RemoteException; - - /** - * Update connection notification - * @param user updated user - */ - void updateConnection(final FtpUser user) throws RemoteException; -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/FtpFileListener.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/FtpFileListener.java deleted file mode 100644 index 17973bd13..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/FtpFileListener.java +++ /dev/null @@ -1,86 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote.interfaces; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -/** - * Ftp file upload/download/delete listener remote interface. - * - * @author Rana Bhattacharyya - */ -public -interface FtpFileListener extends Remote { - - /** - * User file upload notification. - */ - void notifyUpload(final String file, final String sessionId) throws RemoteException; - - /** - * User file download notification. - */ - void notifyDownload(final String file, final String sessionId) throws RemoteException; - - /** - * User file delete notification. - */ - void notifyDelete(final String file, final String sessionId) throws RemoteException; - -} - diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/FtpStatisticsInterface.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/FtpStatisticsInterface.java deleted file mode 100644 index a8dc235bc..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/FtpStatisticsInterface.java +++ /dev/null @@ -1,152 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote.interfaces; - -import java.rmi.Remote; -import java.rmi.RemoteException; -import java.util.Date; - - -/** - * Ftp statistis remote interface. - * - * @author Rana Bhattacharyya - */ -public -interface FtpStatisticsInterface extends Remote { - - /** - * Get server start time. - */ - Date getStartTime() throws RemoteException; - - /** - * Get number of files uploaded. - */ - int getFileUploadNbr() throws RemoteException; - - /** - * Get number of files downloaded. - */ - int getFileDownloadNbr() throws RemoteException; - - /** - * Get number of files deleted. - */ - int getFileDeleteNbr() throws RemoteException; - - /** - * Get total number of bytes uploaded. - */ - long getFileUploadSize() throws RemoteException; - - /** - * Get total number of bytes downloaded. - */ - long getFileDownloadSize() throws RemoteException; - - /** - * Get current number of connections. - */ - int getConnectionNbr() throws RemoteException; - - /** - * Get total number of connections - */ - int getTotalConnectionNbr() throws RemoteException; - - /** - * Get current number of logins - */ - int getLoginNbr() throws RemoteException; - - /** - * Get total number of logins - */ - int getTotalLoginNbr() throws RemoteException; - - /** - * Get current number of anonymous logins. - */ - int getAnonLoginNbr() throws RemoteException; - - /** - * Get total number of anonymous logins - */ - int getTotalAnonLoginNbr() throws RemoteException; - - /** - * Set a listener object. - */ - void setListener(FtpStatisticsListener listener) throws RemoteException; - - /** - * Get listener object. - */ - FtpStatisticsListener getListener() throws RemoteException; - - /** - * Get file listener - */ - void setFileListener(FtpFileListener listener) throws RemoteException; - - /** - * Set file listener - */ - FtpFileListener getFileListener() throws RemoteException; - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/FtpStatisticsListener.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/FtpStatisticsListener.java deleted file mode 100644 index c8d7d6188..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/FtpStatisticsListener.java +++ /dev/null @@ -1,101 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ - -package org.apache.ftpserver.remote.interfaces; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -/** - * Ftp statistics listener remote interface. - * - * @author Rana Bhattacharyya - */ -public -interface FtpStatisticsListener extends Remote { - - /** - * User file upload notification. - */ - void notifyUpload() throws RemoteException; - - /** - * User file download notification. - */ - void notifyDownload() throws RemoteException; - - /** - * User file delete notification. - */ - void notifyDelete() throws RemoteException; - - /** - * New user login notification. - */ - void notifyLogin() throws RemoteException; - - /** - * User logout notification. - */ - void notifyLogout() throws RemoteException; - - /** - * Connection open/close notification - */ - void notifyConnection() throws RemoteException; - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/IpRestrictorInterface.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/IpRestrictorInterface.java deleted file mode 100644 index 687995c81..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/IpRestrictorInterface.java +++ /dev/null @@ -1,113 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote.interfaces; - -import java.io.IOException; -import java.net.InetAddress; -import java.util.Collection; -import java.rmi.Remote; -import java.rmi.RemoteException; - -/** - * IP Restrictor remotr interface. Used by admin GUI. - * - * @author Rana Bhattacharyya - */ - -public -interface IpRestrictorInterface extends Remote { - - /** - * Allow/ban IP flag - */ - boolean isAllowIp() throws RemoteException; - - /** - * Reload data from store. - */ - void reload() throws IOException; - - /** - * Save data into store. - */ - void save() throws IOException; - - /** - * Check IP permission. - */ - boolean hasPermission(final InetAddress addr) throws RemoteException; - - /** - * Clear all entries. - */ - void clear() throws RemoteException; - - /** - * Add new entry - */ - void addEntry(final String str) throws RemoteException; - - /** - * Remove entry - */ - void removeEntry(final String str) throws RemoteException; - - /** - * Get all entries - */ - Collection getAllEntries() throws RemoteException; -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/RemoteHandlerInterface.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/RemoteHandlerInterface.java deleted file mode 100644 index 1982f3ff1..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/RemoteHandlerInterface.java +++ /dev/null @@ -1,109 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote.interfaces; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -/** - * Ftp server remote admin interface. This is the starting point of remote admin. - * Call stack: - *
- *    RemoteHandlerInterface
- *    |
- *    +---- FtpConfigInterface
- *          |
- *          +---- FtpStatisticsInterface <- FtpStatisticsListener, FtpFileListener
- *          |
- *          +---- ConnectionServiceInterface <- FtpConnectionObserver
- *          |
- *          +---- IpRestrictorInterface
- *          |
- *          +---- UserManagerInterface
- * 
- * - * @author Rana Bhattacharyya - */ -public -interface RemoteHandlerInterface extends Remote { - - /** - * Remote interface ID - */ - String BIND_NAME = "ftp_admin"; - - /** - * Display server name - */ - String DISPLAY_NAME = "Ftp"; - - /** - * Remote admin login - */ - String login(final String id, final String password) throws Exception; - - /** - * Remote admin logout - */ - boolean logout(final String sessId) throws RemoteException; - - /** - * Get configuration interface - */ - FtpConfigInterface getConfigInterface(final String sessId) throws RemoteException; - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/SpyConnectionInterface.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/SpyConnectionInterface.java deleted file mode 100644 index c57ca325c..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/SpyConnectionInterface.java +++ /dev/null @@ -1,79 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ - -package org.apache.ftpserver.remote.interfaces; - -import java.io.IOException; -import java.rmi.Remote; - - -/** - * This interface is used to monitor user activities - remote admin. - */ -public -interface SpyConnectionInterface extends Remote { - - /** - * Write user request. - */ - void request(final String msg) throws IOException; - - /** - * Write server response. - */ - void response(final String msg) throws IOException; -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/UserManagerInterface.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/UserManagerInterface.java deleted file mode 100644 index 22ed9f4e1..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/remote/interfaces/UserManagerInterface.java +++ /dev/null @@ -1,117 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote.interfaces; - -import java.util.List; -import java.rmi.Remote; -import java.rmi.RemoteException; -import org.apache.ftpserver.usermanager.User; - -/** - * This is user manager remote interface. This is used by remote admin GUI. - * - * @author Rana Bhattacharyya - */ -public -interface UserManagerInterface extends Remote { - - /** - * Save the user. If a new user, create it else update the - * existing user. - */ - void save(final User user) throws Exception; - - /** - * Delete the user from the system. - * - * @param name name of the user to be deleted. - */ - void delete(final String userName) throws Exception; - - /** - * Get user by name. - */ - User getUserByName(final String name) throws RemoteException; - - /** - * Get all user names in the system. - */ - List getAllUserNames() throws RemoteException; - - /** - * User existance check. - * - * @param name user name - */ - boolean doesExist(final String name) throws RemoteException; - - /** - * Authenticate user - */ - boolean authenticate(final String login, final String password) throws RemoteException; - - /** - * Load the user data again - */ - void reload() throws Exception; - - /** - * Get admin user name - */ - String getAdminName() throws RemoteException; - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/usermanager/AbstractUserManager.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/usermanager/AbstractUserManager.java deleted file mode 100644 index b322dd104..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/usermanager/AbstractUserManager.java +++ /dev/null @@ -1,161 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.usermanager; - -//import org.apache.avalon.phoenix.BlockContext; - -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.activity.Disposable; - -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; - -import org.apache.avalon.framework.service.Serviceable; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.service.ServiceException; - -import org.apache.avalon.framework.context.Contextualizable; -import org.apache.avalon.framework.context.Context; -import org.apache.avalon.framework.context.ContextException; - -/** - * Abstract user manager class. - * - * @author Paul Hammant Paul_Hammant@yahoo.com - */ -public -abstract class AbstractUserManager extends AbstractLogEnabled - implements UserManagerInterface, - Contextualizable, - Configurable, - Initializable, - Disposable { - - protected Configuration mConfig; - protected String mstAdminName; - private String mBaseDirectory; - - /** - * Set context object - first step. - */ - public void contextualize(Context context) throws ContextException { - } - - - /** - * Configure user manager - third step. - */ - public void configure(Configuration config) throws ConfigurationException { - mConfig = config; - - Configuration adminConf = mConfig.getChild("ftp-admin-name", false); - mstAdminName = "admin"; - if(adminConf != null) { - mstAdminName = adminConf.getValue(mstAdminName); - } - - mBaseDirectory = config.getChild("base-directory").getValue(null); - - if(mBaseDirectory == null) - throw new ConfigurationException("Missing configuration element 'base-directory'"); - } - - - /** - * Get config object. - */ - public Configuration getConfig() { - return mConfig; - } - - /** - * Get the basedir. - */ - public String getBaseDirectory() { - return mBaseDirectory; - } - - /** - * Initialize - fourth step. - */ - public void initialize() throws Exception { - } - - - /** - * Reload user data - dummy implementation. - */ - public void reload() throws Exception { - } - - /** - * Get admin name - */ - public String getAdminName() { - return mstAdminName; - } - - /** - * Close user manager - dummy implementation. - */ - public void dispose() { - getLogger().info("Closing user manager..."); - } - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/usermanager/DbUserManager.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/usermanager/DbUserManager.java deleted file mode 100644 index 7d21c3d97..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/usermanager/DbUserManager.java +++ /dev/null @@ -1,420 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.usermanager; - -import java.io.File; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.ftpserver.util.StringUtils; - -/** - * This is another database based user manager class. I have - * tested it using MySQL and Oracle database. The sql file is ftp-db.sql - * - * @phoenix:block - * @phoenix:service name="org.apache.ftpserver.usermanager.UserManagerInterface" - * - * @author Rana Bhattacharyya - */ -public -class DbUserManager extends AbstractUserManager { - - private Connection mDbConnection = null; - - private String mInsUserStmt = null; - private String mDelUserStmt = null; - private String mSelUserStmt = null; - private String mGetAllStmt = null; - private String mUpdUserStmt = null; - - private String mUrl = null; - private String mUser = null; - private String mPassword = null; - - - /** - * Instantiate user manager - default constructor. - * - * @param cfg Ftp config object. - */ - public DbUserManager() throws Exception { - } - - - /** - * Set configuration - open database connection - */ - public void configure(Configuration conf) throws ConfigurationException { - super.configure(conf); - - String className = conf.getChild("driver").getValue(); - mUrl = conf.getChild("url").getValue(); - mUser = conf.getChild("user").getValue(); - mPassword = conf.getChild("password").getValue(); - mInsUserStmt = conf.getChild("sql-insert").getValue(); - mDelUserStmt = conf.getChild("sql-delete").getValue(); - mSelUserStmt = conf.getChild("sql-select").getValue(); - mGetAllStmt = conf.getChild("sql-all").getValue(); - mUpdUserStmt = conf.getChild("sql-update").getValue(); - - try { - Class.forName(className); - - openDbConnection(); - getLogger().info("Database user manager opened."); - } - catch(Exception ex) { - throw new ConfigurationException("DbUserManager.configure()", ex); - } - } - - /** - * Open connection to database. - */ - private void openDbConnection() throws SQLException { - mDbConnection = DriverManager.getConnection(mUrl, mUser, mPassword); - mDbConnection.setAutoCommit(true); - getLogger().info("Connection opened."); - } - - /** - * Close connection to database. - */ - private void closeDbConnection() { - if (mDbConnection != null) { - try {mDbConnection.close(); } catch(SQLException ex) {} - mDbConnection = null; - } - - getLogger().info("Connection closed."); - } - - /** - * Prepare connection to database. - */ - private void prepareDbConnection() throws SQLException { - boolean closed = false; - try { - if ( (null == mDbConnection) || mDbConnection.isClosed() ) { - closed = true; - } - } - catch ( final SQLException se ) { - closed = true; - } - - if ( closed ) { - closeDbConnection(); - openDbConnection(); - } - } - - /** - * Delete user. Delete the row from the table. - */ - public synchronized void delete(String name) throws SQLException { - HashMap map = new HashMap(); - map.put(User.ATTR_LOGIN, name); - String sql = StringUtils.replaceString(mDelUserStmt, map); - - prepareDbConnection(); - Statement stmt = mDbConnection.createStatement(); - stmt.executeUpdate(sql); - stmt.close(); - } - - - /** - * Save user. If new insert a new row, else update the existing row. - */ - public synchronized void save(User user) throws SQLException { - - // null value check - if(user.getName() == null) { - throw new NullPointerException("User name is null."); - } - - prepareDbConnection(); - - HashMap map = new HashMap(); - map.put(User.ATTR_LOGIN, user.getName()); - map.put(User.ATTR_PASSWORD, getPassword(user)); - map.put(User.ATTR_HOME, user.getVirtualDirectory().getRootDirectory()); - map.put(User.ATTR_ENABLE, String.valueOf(user.getEnabled())); - map.put(User.ATTR_WRITE_PERM, String.valueOf(user.getVirtualDirectory().getWritePermission())); - map.put(User.ATTR_MAX_IDLE_TIME, new Long(user.getMaxIdleTime())); - map.put(User.ATTR_MAX_UPLOAD_RATE, new Integer(user.getMaxUploadRate())); - map.put(User.ATTR_MAX_DOWNLOAD_RATE, new Integer(user.getMaxDownloadRate())); - - String sql = null; - if( !doesExist(user.getName()) ) { - sql = StringUtils.replaceString(mInsUserStmt, map); - } - else { - sql = StringUtils.replaceString(mUpdUserStmt, map); - } - - Statement stmt = mDbConnection.createStatement(); - stmt.executeUpdate(sql); - stmt.close(); - } - - - /** - * Get the user object. Fetch the row from the table. - */ - public synchronized User getUserByName(String name) { - - Statement stmt = null; - ResultSet rs = null; - try { - User thisUser = null; - HashMap map = new HashMap(); - map.put(User.ATTR_LOGIN, name); - String sql = StringUtils.replaceString(mSelUserStmt, map); - - prepareDbConnection(); - stmt = mDbConnection.createStatement(); - rs = stmt.executeQuery(sql); - - if(rs.next()) { - thisUser = new User(); - thisUser.setName(rs.getString(1)); - thisUser.getVirtualDirectory().setRootDirectory(new File(rs.getString(3))); - thisUser.setEnabled(rs.getString(4).equals(Boolean.TRUE.toString())); - thisUser.getVirtualDirectory().setWritePermission(rs.getString(5).equals(Boolean.TRUE.toString())); - thisUser.setMaxIdleTime(rs.getInt(6)); - thisUser.setMaxUploadRate(rs.getInt(7)); - thisUser.setMaxDownloadRate(rs.getInt(8)); - } - return thisUser; - } - catch(Exception ex) { - getLogger().error("DbUserManager.getUserByName()", ex); - } - finally { - if(rs != null) { - try { rs.close(); } catch(Exception ex) {} - } - if(stmt != null) { - try { stmt.close(); } catch(Exception ex) {} - } - } - - return null; - } - - - /** - * User existance check - */ - public synchronized boolean doesExist(String name) { - - boolean bValid = false; - Statement stmt = null; - ResultSet rs = null; - - try { - HashMap map = new HashMap(); - map.put(User.ATTR_LOGIN, name); - String sql = StringUtils.replaceString(mSelUserStmt, map); - - prepareDbConnection(); - stmt = mDbConnection.createStatement(); - rs = stmt.executeQuery(sql); - bValid = rs.next(); - - } - catch(Exception ex) { - bValid = false; - getLogger().error("DbUserManager.doesExist()", ex); - } - finally { - if(rs != null) { - try { rs.close(); } catch(Exception ex) {} - } - if(stmt != null) { - try { stmt.close(); } catch(Exception ex) {} - } - } - - return bValid; - } - - - /** - * Get all user names from the database. - */ - public synchronized List getAllUserNames() { - - ArrayList names = new ArrayList(); - Statement stmt = null; - ResultSet rs = null; - - try { - String sql = mGetAllStmt; - - prepareDbConnection(); - stmt = mDbConnection.createStatement(); - rs = stmt.executeQuery(sql); - while(rs.next()) { - names.add(rs.getString(1)); - } - } - catch(Exception ex) { - getLogger().error("DbUserManager.getAllUserNames()", ex); - } - finally { - if(rs != null) { - try { rs.close(); } catch(Exception ex) {} - } - if(stmt != null) { - try { stmt.close(); } catch(Exception ex) {} - } - } - - return names; - } - - - /** - * Get user password. - *
-     * If the password value is not null
-     *    password = new password
-     * else
-     *   if user does exist
-     *     password = old password
-     *   else
-     *     password = ""
-     * 
- */ - private synchronized String getPassword(User user) throws SQLException { - if (user.getPassword() != null) { - return user.getPassword(); - } - - String password = ""; - HashMap map = new HashMap(); - map.put(User.ATTR_LOGIN, user.getName()); - String sql = StringUtils.replaceString(mSelUserStmt, map); - - prepareDbConnection(); - Statement stmt = mDbConnection.createStatement(); - ResultSet rs = stmt.executeQuery(sql); - if (rs.next()) { - password = rs.getString(2); - } - rs.close(); - stmt.close(); - - if (password == null) { - password = ""; - } - return password; - } - - /** - * User authentication - */ - public synchronized boolean authenticate(String user, String password) { - - String existPassword = null; - - try { - HashMap map = new HashMap(); - map.put(User.ATTR_LOGIN, user); - String sql = StringUtils.replaceString(mSelUserStmt, map); - - prepareDbConnection(); - Statement stmt = mDbConnection.createStatement(); - ResultSet rs = stmt.executeQuery(sql); - if (rs.next()) { - existPassword = rs.getString(2); - } - rs.close(); - stmt.close(); - } - catch(Exception ex) { - getLogger().error("DbUserManager.authenticate()", ex); - return false; - } - - if (existPassword == null) { - existPassword = ""; - } - - return existPassword.equals(password); - } - - - /** - * Close this user manager. Close the database statements and connection. - */ - public synchronized void dispose() { - closeDbConnection(); - } -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/usermanager/LdapUserManager.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/usermanager/LdapUserManager.java deleted file mode 100644 index d2e8186c5..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/usermanager/LdapUserManager.java +++ /dev/null @@ -1,425 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.usermanager; - - -import java.io.File; -import java.util.List; -import java.util.ArrayList; -import java.util.Properties; -import java.util.Collections; -import javax.naming.NamingException; -import javax.naming.Context; -import javax.naming.NamingEnumeration; -import javax.naming.directory.Attribute; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.DirContext; -import javax.naming.directory.InitialDirContext; -import javax.naming.directory.Attributes; -import javax.naming.directory.BasicAttributes; -import javax.naming.directory.SearchResult; -import javax.naming.directory.ModificationItem; - -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.ftpserver.util.StringUtils; - -/** - * Ldap based user manager class. Tested using Netscape Directory Server 4.1. - * The LDAP requires the password to be nonempty for simple authentication. So - * instead of using empty string password (""), we will be using single space (" "). - *
- * The required LDAP attribute types: - *
    - *
  • memberuid
  • - *
  • uid
  • - *
  • cn
  • - *
  • sn
  • - *
  • userpassword
  • - *
  • objectclass
  • - *
  • enableflag (created by ftp-db.ldif file)
  • - *
  • homedirectory
  • - *
  • writepermission (created by ftp-db.ldif file)
  • - *
  • idletime (created by ftp-db.ldif file)
  • - *
  • uploadrate (created by ftp-db.ldif file)
  • - *
  • downloadrate (created by ftp-db.ldif file)
  • - *
- * - * Some of the above mentioned attribute types are created by ftd-db.ldif schema file. - * The schema file also creates an object class called ftpUsers derived from - * inetOrgPerson and have all these attributes.
- * Assumed LDAP objectclass hierarchy:
- *
- *        top
- *         |
- *       person
- *         |
- * organizationalPerson
- *         |
- *    inetOrgPerson
- *         |
- *      ftpUsers
- * 
- * - * @phoenix:block - * @phoenix:service name="org.apache.ftpserver.usermanager.UserManagerInterface" - * - * @author Rana Bhattacharyya - */ -public -class LdapUserManager extends AbstractUserManager { - - - // LDAP attributes - private final static String LOGIN = "memberuid"; - private final static String CN = "cn"; - private final static String SN = "sn"; - private final static String OBJ_CLASS = "objectclass"; - - private final static String[] ALL_ATTRS = { - User.ATTR_LOGIN, - User.ATTR_ENABLE, - User.ATTR_HOME, - User.ATTR_WRITE_PERM, - User.ATTR_MAX_IDLE_TIME, - User.ATTR_MAX_UPLOAD_RATE, - User.ATTR_MAX_DOWNLOAD_RATE - }; - - private final static String[] UID_ATTRS = { - User.ATTR_LOGIN - }; - - - // Currently we are using only one connection. - // So all the methods are synchronized. - private DirContext mAdminContext; - private Properties mAdminEnv; - private String mstRoot; - private String mstDnPrefix; - private String mstDnSuffix; - private Attribute mObjClassAttr; - - - /** - * Default constructor - */ - public LdapUserManager() { - } - - - /** - * Instantiate UserManager implementation. - * Open LDAP connection. - */ - public void configure(Configuration conf) throws ConfigurationException { - super.configure(conf); - - // get ldap parameters - String url = conf.getChild("url").getValue(); - String admin = conf.getChild("admin").getValue(); - String password = conf.getChild("password").getValue(); - String auth = conf.getChild("authentication").getValue(); - - mstRoot = conf.getChild("root").getValue(); - mstDnPrefix = conf.getChild("prefix").getValue(); - mstDnSuffix = conf.getChild("suffix").getValue(); - - try { - mAdminEnv = new Properties(); - mAdminEnv.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); - mAdminEnv.setProperty(Context.PROVIDER_URL, url); - mAdminEnv.setProperty(Context.SECURITY_AUTHENTICATION, auth); - mAdminEnv.setProperty(Context.SECURITY_PRINCIPAL, admin); - mAdminEnv.setProperty(Context.SECURITY_CREDENTIALS, password); - mAdminContext = new InitialDirContext(mAdminEnv); - - - // create objectClass attribute - mObjClassAttr = new BasicAttribute(OBJ_CLASS, false); - mObjClassAttr.add("ftpUsers"); - mObjClassAttr.add("inetOrgPerson"); - mObjClassAttr.add("organizationalPerson"); - mObjClassAttr.add("person"); - mObjClassAttr.add("top"); - - getLogger().info("LDAP user manager opened."); - } - catch(NamingException ex) { - throw new ConfigurationException("LdapUserManager.configure()", ex); - } - } - - - /** - * Get all user names. - */ - public synchronized List getAllUserNames() { - ArrayList allUsers = new ArrayList(); - - try { - Attributes matchAttrs = new BasicAttributes(true); - matchAttrs.put(mObjClassAttr); - NamingEnumeration answers = mAdminContext.search(mstRoot, matchAttrs, UID_ATTRS); - while (answers.hasMore()) { - SearchResult sr = (SearchResult)answers.next(); - String uid = sr.getAttributes().get(User.ATTR_LOGIN).get().toString(); - allUsers.add(uid); - } - } - catch(Exception ex) { - getLogger().error("LdapUserManager.getAllUserNames()", ex); - } - - Collections.sort(allUsers); - return allUsers; - } - - - /** - * Get user object. - */ - public synchronized User getUserByName(String name) { - User user = null; - - try { - String dn = getDN(name); - Attributes attrs = mAdminContext.getAttributes(dn, ALL_ATTRS); - - user = new User(); - user.setName(attrs.get(User.ATTR_LOGIN).get().toString()); - user.getVirtualDirectory().setRootDirectory(new File(attrs.get(User.ATTR_HOME).get().toString())); - user.setEnabled(Boolean.TRUE.toString().equals(attrs.get(User.ATTR_ENABLE).get().toString())); - user.getVirtualDirectory().setWritePermission(Boolean.TRUE.toString().equals(attrs.get(User.ATTR_WRITE_PERM).get().toString())); - user.setMaxIdleTime( Integer.parseInt(attrs.get(User.ATTR_MAX_IDLE_TIME).get().toString()) ); - user.setMaxUploadRate( Integer.parseInt(attrs.get(User.ATTR_MAX_UPLOAD_RATE).get().toString()) ); - user.setMaxDownloadRate( Integer.parseInt(attrs.get(User.ATTR_MAX_DOWNLOAD_RATE).get().toString()) ); - } - catch(Exception ex) { - getLogger().error("LdapUserManager.getUserByName()", ex); - user = null; - } - - return user; - } - - - /** - * User authentication. - */ - public boolean authenticate(String login, String password) { - - // empty password string is not allowed - if (password == null) { - password = " "; - } - if (password.equals("")) { - password = " "; - } - - try { - if( doesExist(login) ) { - Properties userProp = (Properties)mAdminEnv.clone(); - String dn = getDN(login); - userProp.setProperty(Context.SECURITY_PRINCIPAL, dn); - userProp.setProperty(Context.SECURITY_CREDENTIALS, password); - - DirContext userContext = new InitialDirContext(userProp); - userContext.close(); - return true; - } - } - catch(NamingException ex) { - } - return false; - } - - - /** - * Save user - */ - public synchronized void save(User user) throws NamingException { - if (doesExist(user.getName())) { - update(user); - } - else { - add(user); - } - } - - - /** - * Add a new user - */ - private synchronized void add(User user) throws NamingException { - - // empty password is not allowed - if (user.getPassword() == null) { - user.setPassword(" "); - } - if (user.getPassword().equals("")) { - user.setPassword(" "); - } - - String dn = getDN(user.getName()); - - Attributes attrs = new BasicAttributes(true); - attrs.put(new BasicAttribute(LOGIN, user.getName())); - attrs.put(new BasicAttribute(User.ATTR_LOGIN, user.getName())); - attrs.put(new BasicAttribute(CN, user.getName())); - attrs.put(new BasicAttribute(SN, user.getName())); - attrs.put(new BasicAttribute(User.ATTR_PASSWORD, user.getPassword())); - - attrs.put(mObjClassAttr); - - attrs.put(new BasicAttribute(User.ATTR_ENABLE, String.valueOf(user.getEnabled()))); - attrs.put(new BasicAttribute(User.ATTR_HOME, user.getVirtualDirectory().getRootDirectory())); - attrs.put(new BasicAttribute(User.ATTR_WRITE_PERM, String.valueOf(user.getVirtualDirectory().getWritePermission()))); - attrs.put(new BasicAttribute(User.ATTR_MAX_IDLE_TIME, String.valueOf(user.getMaxIdleTime()))); - attrs.put(new BasicAttribute(User.ATTR_MAX_UPLOAD_RATE, String.valueOf(user.getMaxUploadRate()))); - attrs.put(new BasicAttribute(User.ATTR_MAX_DOWNLOAD_RATE, String.valueOf(user.getMaxDownloadRate()))); - - mAdminContext.bind(dn, null, attrs); - } - - - /** - * Update an existing user - */ - private synchronized void update(User user) throws NamingException { - String dn = getDN(user.getName()); - ArrayList mods = new ArrayList(); - - if (user.getPassword() != null) { - if (user.getPassword().equals("")) { - user.setPassword(" "); - } - mods.add(new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute(User.ATTR_PASSWORD, user.getPassword()))); - } - mods.add(new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute(User.ATTR_ENABLE, String.valueOf(user.getEnabled())))); - mods.add(new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute(User.ATTR_HOME, user.getVirtualDirectory().getRootDirectory()))); - mods.add(new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute(User.ATTR_WRITE_PERM, String.valueOf(user.getVirtualDirectory().getWritePermission())))); - mods.add(new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute(User.ATTR_MAX_IDLE_TIME, String.valueOf(user.getMaxIdleTime())))); - mods.add(new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute(User.ATTR_MAX_UPLOAD_RATE, String.valueOf(user.getMaxUploadRate())))); - mods.add(new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute(User.ATTR_MAX_DOWNLOAD_RATE, String.valueOf(user.getMaxDownloadRate())))); - - - ModificationItem modArr[] = new ModificationItem[mods.size()]; - for(int i=0; i", "\\>"); - userName = StringUtils.replaceString(userName, ";", "\\;"); - - return mstDnPrefix + userName + mstDnSuffix; - } - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/usermanager/PropertiesUserManager.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/usermanager/PropertiesUserManager.java deleted file mode 100644 index ec6b7b640..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/usermanager/PropertiesUserManager.java +++ /dev/null @@ -1,327 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.usermanager; - -import java.io.File; -import java.io.IOException; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.util.List; -import java.util.Collections; -import java.util.Enumeration; -import java.util.ArrayList; -import java.util.Iterator; - -import org.apache.avalon.framework.context.Context; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.context.ContextException; - -//import org.apache.avalon.phoenix.BlockContext; - -import org.apache.ftpserver.util.IoUtils; -import org.apache.ftpserver.util.BaseProperties; -import org.apache.ftpserver.util.EncryptUtils; - -/** - * Properties file based UserManager - * implementation. We use user.properties file - * to store user data. - * - * @phoenix:block - * @phoenix:service name="org.apache.ftpserver.usermanager.UserManagerInterface" - * - * @author Rana Bhattacharyya - */ -public class PropertiesUserManager extends AbstractUserManager { - - private static final String PREFIX = "FtpServer.user."; - private static final String USER_PROP = "user.properties"; - - private BaseProperties mUserData; - private File mUserDataFile; - private boolean mbEncrypt; - - private long mlLastModified; - - /** - * Instantiate user manager - default constructor. - * - * @param cfg Ftp config object. - */ - public PropertiesUserManager() throws Exception { - } - - /** - * Set application context - */ - public void contextualize(Context context) throws ContextException { - super.contextualize(context); - } - - /** - * Set configuration - */ - public void configure(Configuration conf) throws ConfigurationException { - super.configure(conf); - mbEncrypt = conf.getChild("encrypt").getValueAsBoolean(false); - - try { - mUserDataFile = new File(getBaseDirectory(), USER_PROP); - mUserDataFile.createNewFile(); - mUserData = new BaseProperties(mUserDataFile); - mlLastModified = mUserDataFile.lastModified(); - getLogger().info("Loaded user data file - " + mUserDataFile); - } - catch(IOException ex) { - getLogger().error(ex.getMessage(), ex); - throw new ConfigurationException(ex.getMessage()); - } - } - - - /** - * Save user data. Store the properties. - */ - public synchronized void save(User usr) throws IOException { - - // null value check - if(usr.getName() == null) { - throw new NullPointerException("User name is null."); - } - String thisPrefix = PREFIX + usr.getName() + '.'; - - // set other properties - mUserData.setProperty(thisPrefix + User.ATTR_PASSWORD, getPassword(usr)); - mUserData.setProperty(thisPrefix + User.ATTR_HOME, usr.getVirtualDirectory().getRootDirectory()); - mUserData.setProperty(thisPrefix + User.ATTR_ENABLE, usr.getEnabled()); - mUserData.setProperty(thisPrefix + User.ATTR_WRITE_PERM, usr.getVirtualDirectory().getWritePermission()); - mUserData.setProperty(thisPrefix + User.ATTR_MAX_IDLE_TIME, usr.getMaxIdleTime()); - mUserData.setProperty(thisPrefix + User.ATTR_MAX_UPLOAD_RATE, usr.getMaxUploadRate()); - mUserData.setProperty(thisPrefix + User.ATTR_MAX_DOWNLOAD_RATE, usr.getMaxDownloadRate()); - - // save user data - FileOutputStream fos = null; - try { - fos = new FileOutputStream(mUserDataFile); - mUserData.store(fos, "Generated file - don't edit (please)"); - mlLastModified = mUserDataFile.lastModified(); - } - finally { - IoUtils.close(fos); - } - } - - - /** - * Delete an user. Removes all this user entries from the properties. - * After removing the corresponding from the properties, save the data. - */ - public synchronized void delete(String usrName) throws IOException { - - // remove entries from properties - String thisPrefix = PREFIX + usrName + '.'; - Enumeration propNames = mUserData.propertyNames(); - ArrayList remKeys = new ArrayList(); - while(propNames.hasMoreElements()) { - String thisKey = propNames.nextElement().toString(); - if(thisKey.startsWith(thisPrefix)) { - remKeys.add(thisKey); - } - } - Iterator remKeysIt = remKeys.iterator(); - while (remKeysIt.hasNext()) { - mUserData.remove(remKeysIt.next().toString()); - } - - // save user data - FileOutputStream fos = null; - try { - fos = new FileOutputStream(mUserDataFile); - mUserData.store(fos, "Generated file - don't edit (please)"); - mlLastModified = mUserDataFile.lastModified(); - } - finally { - IoUtils.close(fos); - } - } - - - /** - * Get user password. Returns the encrypted value. - *
-     * If the password value is not null
-     *    password = new password
-     * else
-     *   if user does exist
-     *     password = old password
-     *   else
-     *     password = ""
-     * 
- */ - private String getPassword(User usr) { - String password = usr.getPassword(); - if (password != null) { - if (mbEncrypt) { - password = EncryptUtils.encryptMD5(password); - } - } - else if ( doesExist(usr.getName()) ) { - String key = PREFIX + usr.getName() + '.' + User.ATTR_PASSWORD; - password = mUserData.getProperty(key, ""); - } - - if (password == null) { - password = ""; - } - - return password; - } - - - /** - * Get all user names. - */ - public synchronized List getAllUserNames() { - - // get all user names - String suffix = '.' + User.ATTR_HOME; - ArrayList ulst = new ArrayList(); - Enumeration allKeys = mUserData.propertyNames(); - while(allKeys.hasMoreElements()) { - String key = (String)allKeys.nextElement(); - if(key.endsWith(suffix)) { - String name = key.substring(PREFIX.length()); - int endIndex = name.length() - suffix.length(); - name = name.substring(0, endIndex); - ulst.add(name); - } - } - - Collections.sort(ulst); - return ulst; - } - - - /** - * Load user data. - */ - public synchronized User getUserByName(String userName) { - - if (!doesExist(userName)) { - return null; - } - - String baseKey = PREFIX + userName + '.'; - User user = new User(); - user.setName(userName); - user.setEnabled(mUserData.getBoolean(baseKey + User.ATTR_ENABLE, true)); - user.getVirtualDirectory().setRootDirectory( mUserData.getFile(baseKey + User.ATTR_HOME, new File("/")) ); - user.getVirtualDirectory().setWritePermission(mUserData.getBoolean(baseKey + User.ATTR_WRITE_PERM, false)); - user.setMaxIdleTime(mUserData.getInteger(baseKey + User.ATTR_MAX_IDLE_TIME, 0)); - user.setMaxUploadRate(mUserData.getInteger(baseKey + User.ATTR_MAX_UPLOAD_RATE, 0)); - user.setMaxDownloadRate(mUserData.getInteger(baseKey + User.ATTR_MAX_DOWNLOAD_RATE, 0)); - return user; - } - - - /** - * User existance check - */ - public synchronized boolean doesExist(String name) { - String key = PREFIX + name + '.' + User.ATTR_HOME; - return mUserData.containsKey(key); - } - - - /** - * User authenticate method - */ - public synchronized boolean authenticate(String user, String password) { - String passVal = mUserData.getProperty(PREFIX + user + '.' + User.ATTR_PASSWORD); - if (mbEncrypt) { - password = EncryptUtils.encryptMD5(password); - } - return password.equals(passVal); - } - - /** - * Reload the user data if necessary - */ - public synchronized void reload() throws Exception { - long lastModified = mUserDataFile.lastModified(); - if (lastModified > mlLastModified) { - FileInputStream fis = new FileInputStream(mUserDataFile); - mUserData.load(fis); - fis.close(); - mlLastModified = lastModified; - getLogger().info("File modified - loading " + mUserDataFile.getAbsolutePath()); - } - } - - /** - * Close the user manager - remove existing entries. - */ - public void dispose() { - getLogger().info("Closing properties user manager..."); - if (mUserData != null) { - mUserData.clear(); - mUserData = null; - } - } -} - diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/usermanager/User.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/usermanager/User.java deleted file mode 100644 index fd8955588..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/usermanager/User.java +++ /dev/null @@ -1,355 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.usermanager; - -import java.io.Serializable; -import java.net.InetAddress; -import java.rmi.server.UID; -import org.apache.ftpserver.util.VirtualDirectory; - -/** - * Generic user class. All the application specific user classes will - * be derived from this. - *
    - *
  • uid
  • - *
  • userpassword
  • - *
  • objectclass
  • - *
  • enableflag
  • - *
  • homedirectory
  • - *
  • writepermission
  • - *
  • idletime
  • - *
  • uploadrate
  • - *
  • downloadrate
  • - *
- * @author Rana Bhattacharyya - */ - -public -class User implements Serializable { - - /** - * uid - */ - public static final String ATTR_LOGIN = "uid"; - - /** - * userpassword - */ - public static final String ATTR_PASSWORD = "userpassword"; - - /** - * homedirectory - */ - public static final String ATTR_HOME = "homedirectory"; - - /** - * writepermission - */ - public static final String ATTR_WRITE_PERM = "writepermission"; - - /** - * enableflag - */ - public static final String ATTR_ENABLE = "enableflag"; - - /** - * idletime - */ - public static final String ATTR_MAX_IDLE_TIME = "idletime"; - - /** - * uploadrate - */ - public static final String ATTR_MAX_UPLOAD_RATE = "uploadrate"; - - /** - * downloadrate - */ - public static final String ATTR_MAX_DOWNLOAD_RATE = "downloadrate"; - - private String mstUserName = null; - private String mstPassword = null; - - private long mlIdleTime = 0; // no limit - private int miUploadRateLimit = 0; // no limit - private int miDownloadRateLimit = 0; // no limit - - private long mlLoginTime = 0; - private long mlLastAccessTime = 0; - - private boolean mbEnabled = true; - - private VirtualDirectory mUserDirectory = null; - private String mstSessionId = null; - private InetAddress mClientAddress = null; - - /** - * Constructor, set session id and default virtual directory object. - */ - public User() { - mUserDirectory = new VirtualDirectory(); - mstSessionId = new UID().toString(); - } - - - /** - * Get the user name. - */ - public String getName() { - return mstUserName; - } - - /** - * Set user name. - */ - public void setName(String name) { - mstUserName = name; - } - - - /** - * Get the user password. - */ - public String getPassword() { - return mstPassword; - } - - /** - * Set user password - */ - public void setPassword(String pass) { - mstPassword = pass; - } - - - /** - * Get the maximum idle time in second. - */ - public int getMaxIdleTime() { - return (int)(mlIdleTime/1000); - } - - /** - * Set the maximum idle time in second. - */ - public void setMaxIdleTime(int idleSec) { - if(idleSec < 0L) { - mlIdleTime = 0L; - } - mlIdleTime = idleSec * 1000L; - } - - - /** - * Get the user enable status. - */ - public boolean getEnabled() { - return mbEnabled; - } - - /** - * Set the user enable status - */ - public void setEnabled(boolean enb) { - mbEnabled = enb; - } - - - /** - * Get maximum user upload rate in bytes/sec. - */ - public int getMaxUploadRate() { - return miUploadRateLimit; - } - - /** - * Set user maximum upload rate limit. - * Less than or equal to zero means no limit. - */ - public void setMaxUploadRate(int rate) { - miUploadRateLimit = rate; - } - - - /** - * Get maximum user download rate in bytes/sec - */ - public int getMaxDownloadRate() { - return miDownloadRateLimit; - } - - /** - * Set user maximum download rate limit. - * Less than or equal to zero means no limit. - */ - public void setMaxDownloadRate(int rate) { - miDownloadRateLimit = rate; - } - - - /** - * Get client address - */ - public InetAddress getClientAddress() { - return mClientAddress; - } - - /** - * Set client address - */ - public void setClientAddress(InetAddress clientAddress) { - mClientAddress = clientAddress; - } - - - /** - * get user filesystem view - */ - public VirtualDirectory getVirtualDirectory() { - return mUserDirectory; - } - - /** - * Get session id. - */ - public String getSessionId() { - return mstSessionId; - } - - /** - * Get user loglin time. - */ - public long getLoginTime() { - return mlLoginTime; - } - - /** - * Get last access time - */ - public long getLastAccessTime() { - return mlLastAccessTime; - } - - /** - * Check the user login status. - */ - public boolean hasLoggedIn() { - return mlLoginTime != 0; - } - - /** - * User login. - */ - public void login() { - mlLoginTime = System.currentTimeMillis(); - mlLastAccessTime = mlLoginTime; - } - - /** - * User logout - */ - public void logout() { - mlLoginTime = 0; - } - - - /** - * Is an active user (is removable)? - * Compares the last access time with the specified time. - */ - public boolean isActive(long currTime) { - boolean bActive = true; - long maxIdleTime = getMaxIdleTime() * 1000; // milliseconds - if(maxIdleTime != 0L) { - long idleTime = currTime - mlLastAccessTime; - bActive = maxIdleTime > idleTime; - } - return bActive; - } - - /** - * Is still active. Compares the last access time with the - * current time. - */ - public boolean isActive() { - return isActive(System.currentTimeMillis()); - } - - /** - * Hit user - update last access time - */ - public void hitUser() { - mlLastAccessTime = System.currentTimeMillis(); - } - - /** - * Equality check. - */ - public boolean equals(Object obj) { - if (obj instanceof User) { - return ((User)obj).mstSessionId.equals(mstSessionId); - } - return false; - } - - /** - * String representation - */ - public String toString() { - return mstUserName; - } -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/usermanager/UserManagerInterface.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/usermanager/UserManagerInterface.java deleted file mode 100644 index 771b5e8d1..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/usermanager/UserManagerInterface.java +++ /dev/null @@ -1,117 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.usermanager; - -import java.util.List; - -/** - * This is user manager interface. All the user manager classes - * implement this interface. If we want to add a new user manager, - * we have to implement this class. - * - * @author Rana Bhattacharyya - */ -public -interface UserManagerInterface { - - String ROLE = UserManagerInterface.class.getName(); - - /** - * Save the user. If a new user, create it else update the - * existing user. - */ - void save(User user) throws Exception; - - /** - * Delete the user from the system. - * - * @param name name of the user to be deleted. - */ - void delete(String userName) throws Exception; - - /** - * Get user by name. - */ - User getUserByName(String name); - - /** - * Get all user names in the system. - */ - List getAllUserNames(); - - /** - * User existance check. - * - * @param name user name - */ - boolean doesExist(String name); - - /** - * Authenticate user - */ - boolean authenticate(String login, String password); - - /** - * Load the user data again - */ - void reload() throws Exception; - - /** - * Get admin user name - */ - String getAdminName(); -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/AsciiOutputStream.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/AsciiOutputStream.java deleted file mode 100644 index d5763bc6b..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/AsciiOutputStream.java +++ /dev/null @@ -1,151 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -import java.io.IOException; -import java.io.OutputStream; - -/** - * Write ASCII data. Before writing it filters the data. - * - * @author Rana Bhattacharyya - */ -public -class AsciiOutputStream extends OutputStream { - - private long mlActualByteWritten = 0; - private boolean mbIgnoreNonAscii = true; - private OutputStream mOutputStream; - - /** - * Constructor. - * @param os java.io.OutputStream to be filtered. - */ - public AsciiOutputStream(OutputStream os) { - mOutputStream = os; - } - - /** - * Write a single byte. - * ASCII characters are defined to be - * the lower half of an eight-bit code set (i.e., the most - * significant bit is zero). Change "\n" to "\r\n". - */ - public void write(int i) throws IOException { - - if (mbIgnoreNonAscii && (i > 0x7F) ) { - return; - } - - if (i == '\r') { - return; - } - if (i == '\n') { - actualWrite('\r'); - } - actualWrite(i); - - } - - /** - * Close stream - */ - public void close() throws IOException { - mOutputStream.close(); - } - - /** - * Flush stream data - */ - public void flush() throws IOException { - mOutputStream.flush(); - } - - /** - * write actual data. - */ - private void actualWrite(int b) throws IOException { - mOutputStream.write(b); - ++mlActualByteWritten; - } - - - /** - * Get actual byte written. - */ - public long getByteWritten() { - return mlActualByteWritten; - } - - /** - * Is non ascii character ignored. - * If true don't write non-ascii character. - * Else first convert it to ascii by ANDing with 0x7F. - */ - public boolean getIsIgnoreNonAscii() { - return mbIgnoreNonAscii; - } - - /** - * Set non-ascii ignore boolean value. - */ - public void setIsIgnoreNonAscii(boolean ig) { - mbIgnoreNonAscii = ig; - } - -} - diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/AsyncMessageQueue.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/AsyncMessageQueue.java deleted file mode 100644 index 39b7e9a39..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/AsyncMessageQueue.java +++ /dev/null @@ -1,148 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -/** - * Simple message queue implementation. - * - * @author Rana Bhattacharyya - */ -public -class AsyncMessageQueue implements Runnable { - - private Queue mMsgQueue; - private boolean mbStopRequest; - private Thread mThread; - - /** - * Constructor - instantiate the queue and start the thread. - */ - public AsyncMessageQueue() { - mMsgQueue = new Queue(true); - mbStopRequest = false; - mThread = new Thread(this); - mThread.start(); - } - - /** - * Add a new message object. - */ - public void add(Message msg) { - if(mbStopRequest) { - throw new IllegalArgumentException("Message queue has been stopped."); - } - mMsgQueue.put(msg); - } - - /** - * Get the number of elements in the queue. - */ - public int size() { - return mMsgQueue.size(); - } - - /** - * Get max size - */ - public int getMaxSize() { - return mMsgQueue.getMaxSize(); - } - - /** - * Set max size - */ - public void setMaxSize(int maxSize) { - mMsgQueue.setMaxSize(maxSize); - } - - /** - * Thread starting point - get message ant execute. - */ - public void run() { - while(!mbStopRequest) { - Message msg = (Message)mMsgQueue.get(); - if(msg == null) { - return; - } - try { - msg.execute(); - } catch(Exception ex) { - ex.printStackTrace(); - } - } - } - - /** - * Stop the message queue. - */ - public void stop() { - mbStopRequest = true; - mMsgQueue.clear(); - if(mThread != null) { - mThread.interrupt(); - mThread = null; - } - } - - /** - * Check whether the message queue is active or not. - */ - public boolean isDisposed() { - return mbStopRequest; - } - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/BaseProperties.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/BaseProperties.java deleted file mode 100644 index fda3e744c..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/BaseProperties.java +++ /dev/null @@ -1,431 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -import java.io.*; -import java.net.*; -import java.util.*; -import java.text.*; - -/** - * This class encapsulates java.util.Properties to - * add java primitives and some other java classes. - * - * @author Rana Bhattacharyya - */ -public -class BaseProperties extends Properties { - - - /** - * Default constructor. - */ - public BaseProperties() { - } - - /** - * Load existing property. - */ - public BaseProperties(Properties prop) { - super(prop); - } - - /** - * Load properties from file - */ - public BaseProperties(File fl) throws IOException { - FileInputStream fis = new FileInputStream(fl); - load(fis); - fis.close(); - } - - /** - * Load properties from InputStream - */ - public BaseProperties(InputStream is) throws IOException { - load(is); - } - - /** - * Get all property key names. - */ - public List getAllKeys() { - Vector keys = new Vector(); - for(Enumeration en = propertyNames(); en.hasMoreElements(); ) { - keys.add(en.nextElement().toString()); - } - return keys; - } - - - ////////////////////////////////////////// - //////// Properties Get Methods //////// - ////////////////////////////////////////// - /** - * Get boolean value. - */ - public boolean getBoolean(String str) throws PropertiesException { - str = getProperty(str); - if (str == null) { - throw new PropertiesException(str + " : not found"); - } - - return str.toLowerCase().equals("true"); - } - - public boolean getBoolean(String str, boolean bol) { - try { - return getBoolean(str); - } catch (PropertiesException ex) { - return bol; - } - } - - - /** - * Get integer value. - */ - public int getInteger(String str) throws PropertiesException { - str = getProperty(str); - if (str == null) { - throw new PropertiesException(str + " : not found"); - } - - try { - return Integer.parseInt(str); - } catch (NumberFormatException ex) { - throw new PropertiesException(ex); - } - } - - public int getInteger(String str, int intVal) { - try { - return getInteger(str); - } catch (PropertiesException ex) { - return intVal; - } - } - - - /** - * Get long value. - */ - public long getLong(String str) throws PropertiesException { - str = getProperty(str); - if (str == null) { - throw new PropertiesException(str + " : not found"); - } - - try { - return Long.parseLong(str); - } catch (NumberFormatException ex) { - throw new PropertiesException(ex); - } - } - - public long getLong(String str, long val) { - try { - return getLong(str); - } catch (PropertiesException ex) { - return val; - } - } - - - /** - * Get double value. - */ - public double getDouble(String str) throws PropertiesException { - str = getProperty(str); - if (str == null) { - throw new PropertiesException(str + " : not found"); - } - - try { - return Double.parseDouble(str); - } catch (NumberFormatException ex) { - throw new PropertiesException(ex); - } - } - - public double getDouble(String str, double doubleVal) { - try { - return getDouble(str); - } catch (PropertiesException ex) { - return doubleVal; - } - } - - /** - * Get InetAddress. - */ - public InetAddress getInetAddress(String str) throws PropertiesException { - str = getProperty(str); - if(str == null) { - throw new PropertiesException(str + " : not found"); - } - - try { - return InetAddress.getByName(str); - } - catch(UnknownHostException ex) { - throw new PropertiesException("Host " + str + " not found"); - } - } - - public InetAddress getInetAddress(String str, InetAddress addr) { - try { - return getInetAddress(str); - } - catch(PropertiesException ex) { - return addr; - } - } - - /** - * Get File object. - */ - public File getFile(String str) throws PropertiesException { - str = getProperty(str); - if (str == null) { - throw new PropertiesException(str + " : not found"); - } - return new File(str); - } - - public File getFile(String str, File fl) { - try { - return getFile(str); - } catch (PropertiesException ex) { - return fl; - } - - } - - - /** - * Get Class object - */ - public Class getClass(String str) throws PropertiesException { - str = getProperty(str); - if (str == null) { - throw new PropertiesException(str + " : not found"); - } - - try { - return Class.forName(str); - } catch (ClassNotFoundException ex) { - throw new PropertiesException(ex); - } - } - - public Class getClass(String str, Class cls) { - try { - return getClass(str); - } catch (PropertiesException ex) { - return cls; - } - } - - - /** - * Get TimeZone - */ - public TimeZone getTimeZone(String str) throws PropertiesException { - str = getProperty(str); - if (str == null) { - throw new PropertiesException(str + " : not found"); - } - return TimeZone.getTimeZone(str); - } - - public TimeZone getTimeZone(String str, TimeZone tz) { - try { - return getTimeZone(str); - } catch (PropertiesException ex) { - return tz; - } - } - - - /** - * Get DateFormat object. - */ - public SimpleDateFormat getDateFormat(String str) throws PropertiesException { - str = getProperty(str); - if (str == null) { - throw new PropertiesException(str + " : not found"); - } - return new SimpleDateFormat(str); - } - - public SimpleDateFormat getDateFormat(String str, SimpleDateFormat fmt) { - try { - return getDateFormat(str); - } catch (PropertiesException ex) { - return fmt; - } - } - - - /** - * Get Date object. - */ - public Date getDate(String str, DateFormat fmt) throws PropertiesException { - str = getProperty(str); - if (str == null) { - throw new PropertiesException(str + " : not found"); - } - - try { - return fmt.parse(str); - } catch (ParseException ex) { - throw new PropertiesException(ex); - } - } - - public Date getDate(String str, DateFormat fmt, Date dt) { - try { - return getDate(str, fmt); - } catch (PropertiesException ex) { - return dt; - } - } - - - ////////////////////////////////////////// - //////// Properties Set Methods //////// - ////////////////////////////////////////// - /** - * Set boolean value. - */ - public void setProperty(String key, boolean val) { - setProperty(key, String.valueOf(val)); - } - - /** - * Set integer value. - */ - public void setProperty(String key, int val) { - setProperty(key, String.valueOf(val)); - } - - - /** - * Set double value. - */ - public void setProperty(String key, double val) { - setProperty(key, String.valueOf(val)); - } - - /** - * Set float value. - */ - public void setProperty(String key, float val) { - setProperty(key, String.valueOf(val)); - } - - /** - * Set long value. - */ - public void setProperty(String key, long val) { - setProperty(key, String.valueOf(val)); - } - - /** - * Set InetAddress. - */ - public void setInetAddress(String key, InetAddress val) { - setProperty(key, val.getHostAddress()); - } - - /** - * Set File object. - */ - public void setProperty(String key, File val) { - setProperty(key, val.getAbsolutePath()); - } - - /** - * Set DateFormat object. - */ - public void setProperty(String key, SimpleDateFormat val) { - setProperty(key, val.toPattern()); - } - - /** - * Set TimeZone object. - */ - public void setProperty(String key, TimeZone val) { - setProperty(key, val.getID()); - } - - /** - * Set Date object. - */ - public void setProperty(String key, Date val, DateFormat fmt) { - setProperty(key, fmt.format(val)); - } - - /** - * Set Class object. - */ - public void setProperty(String key, Class val) { - setProperty(key, val.getName()); - } - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/DateUtils.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/DateUtils.java deleted file mode 100644 index 31168ff8c..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/DateUtils.java +++ /dev/null @@ -1,201 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -import java.util.*; -import java.text.*; - -/** - * This is a timezone conversion utility class. - * - * @author Rana Bhattacharyya - */ - -public class DateUtils { - - private static final String[] MONTHS = { - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" - }; - - // as SimpleDateFormat is not thread-safe - we have to use ThreadLocal - private final static ThreadLocal AFTER_SIX = new ThreadLocal() { - protected Object initialValue() { - return new SimpleDateFormat(" yyyy"); - } - }; - private final static ThreadLocal BEFORE_SIX = new ThreadLocal() { - protected Object initialValue() { - return new SimpleDateFormat("HH:mm"); - } - }; - - - /** - * Get unix style date string. - */ - public static String getUnixDate(Date date) { - long dateTime = date.getTime(); - if (dateTime < 0) { - return "------------"; - } - - Calendar cal = new GregorianCalendar(); - cal.setTime(date); - String firstPart = MONTHS[cal.get(Calendar.MONTH)] + ' '; - - String dateStr = String.valueOf(cal.get(Calendar.DATE)); - if (dateStr.length() == 1) { - dateStr = ' ' + dateStr; - } - firstPart += dateStr + ' '; - - long nowTime = System.currentTimeMillis(); - if ( Math.abs(nowTime - dateTime) > 183L * 24L * 60L * 60L * 1000L) { - DateFormat fmt = (DateFormat)AFTER_SIX.get(); - return firstPart + fmt.format(date); - } - else { - DateFormat fmt = (DateFormat)BEFORE_SIX.get(); - return firstPart + fmt.format(date); - } - } - - /** - * Get the timezone specific string. - */ - public static String getString(Date dt, DateFormat df, TimeZone to) { - df.setTimeZone(to); - return df.format(dt); - } - - /** - * Get the timezone specific calendar. - */ - public static Calendar getCalendar(Date dt, TimeZone to) { - Calendar cal = Calendar.getInstance(to); - cal.setTime(dt); - return cal; - } - - /** - * Get date object. - */ - public static Date getDate(String str, DateFormat df, TimeZone from) - throws java.text.ParseException { - df.setTimeZone(from); - return df.parse(str); - } - - /** - * Get date difference => d1 - d2. - */ - public static String getDifference(Date d1, Date d2) { - Calendar calendar = new GregorianCalendar(); - calendar.setTime(d2); - int year2 = calendar.get(Calendar.YEAR); - int day2 = calendar.get(Calendar.DAY_OF_YEAR); - int hour2 = calendar.get(Calendar.HOUR_OF_DAY); - int min2 = calendar.get(Calendar.MINUTE); - - calendar.setTime(d1); - int year1 = calendar.get(Calendar.YEAR); - int day1 = calendar.get(Calendar.DAY_OF_YEAR); - int hour1 = calendar.get(Calendar.HOUR_OF_DAY); - int min1 = calendar.get(Calendar.MINUTE); - - int leftDays = (day1-day2)+(year1-year2)*365; - int leftHours = hour1-hour2; - int leftMins = min1 - min2; - - if(leftMins < 0) { - leftMins += 60; - --leftHours; - } - if(leftHours < 0) { - leftHours += 24; - --leftDays; - } - - String interval = ""; - if(leftDays > 0) { - interval = leftDays + " Days"; - } - else if((leftHours > 0) && (leftDays == 0)) { - interval = leftHours + " Hours"; - } - else if((leftMins > 0) && (leftHours == 0) && (leftDays == 0)) { - interval = leftMins + " Minutes"; - } - else { - interval = ""; - } - return interval; - } - - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/EncryptUtils.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/EncryptUtils.java deleted file mode 100644 index 2976cc529..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/EncryptUtils.java +++ /dev/null @@ -1,125 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; - -/** - * String encryption utility methods. - * - * @author Rana Bhattacharyya - */ - -public -class EncryptUtils { - - /** - * Encrypt byte array. - */ - public static byte[] encrypt(byte[] source, String algorithm) throws NoSuchAlgorithmException { - MessageDigest md = MessageDigest.getInstance(algorithm); - md.reset(); - md.update(source); - return md.digest(); - } - - /** - * Encrypt string - */ - public static String encrypt(String source, String algorithm) throws NoSuchAlgorithmException { - byte[] resByteArray = encrypt(source.getBytes(), algorithm); - return StringUtils.toHexString(resByteArray); - } - - /** - * Encrypt string using MD5 algorithm - */ - public static String encryptMD5(String source) { - if (source == null) { - source = ""; - } - - String result = ""; - try { - result = encrypt(source, "MD5"); - } - catch(NoSuchAlgorithmException ex) { - ex.printStackTrace(); - } - return result; - } - - /** - * Encrypt string using SHA algorithm - */ - public static String encryptSHA(String source) { - if (source == null) { - source = ""; - } - - String result = ""; - try { - result = encrypt(source, "SHA"); - } - catch(NoSuchAlgorithmException ex) { - ex.printStackTrace(); - } - return result; - } - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/FileRegularFilter.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/FileRegularFilter.java deleted file mode 100644 index 205f1c0dd..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/FileRegularFilter.java +++ /dev/null @@ -1,97 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -import java.io.File; -import java.io.FilenameFilter; -import org.apache.ftpserver.util.RegularExpr; - -/** - * This is regular expression filename filter. - * - * @author Rana Bhattacharyya - */ -public -class FileRegularFilter implements FilenameFilter { - - private RegularExpr mRegularExpr = null; - - /** - * Constructor. - * @param pattern regular expression - */ - public FileRegularFilter(String pattern) { - if ((pattern == null) || pattern.equals("") || pattern.equals("*")) { - mRegularExpr = null; - } - else { - mRegularExpr = new RegularExpr(pattern); - } - } - - /** - * Tests if a specified file should be included in a file list. - * @param dir - the directory in which the file was found - * @param name - the name of the file. - */ - public boolean accept(File dir, String name) { - if (mRegularExpr == null) { - return true; - } - return mRegularExpr.isMatch(name); - } -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/IoUtils.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/IoUtils.java deleted file mode 100644 index 17b8ffc71..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/IoUtils.java +++ /dev/null @@ -1,254 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -import java.io.*; -import java.util.Random; - -/** - * IO utility methods. - * - * @author Rana Bhattacharyya - */ -public -class IoUtils { - - /** - * Random number generator to make unique file name - */ - private static final Random RANDOM_GEN = new Random(System.currentTimeMillis()); - - - /** - * Get a BufferedInputStream. - */ - public static BufferedInputStream getBufferedInputStream(InputStream in) { - BufferedInputStream bin = null; - if(in instanceof java.io.BufferedInputStream) { - bin = (BufferedInputStream)in; - } - else { - bin = new BufferedInputStream(in); - } - return bin; - } - - - /** - * Get a BufferedOutputStream. - */ - public static BufferedOutputStream getBufferedOutputStream(OutputStream out) { - BufferedOutputStream bout = null; - if(out instanceof java.io.BufferedOutputStream) { - bout = (BufferedOutputStream)out; - } - else { - bout = new BufferedOutputStream(out); - } - return bout; - } - - - /** - * Get BufferedReader. - */ - public static BufferedReader getBufferedReader(Reader rd) { - BufferedReader br = null; - if(br instanceof java.io.BufferedReader) { - br = (BufferedReader)rd; - } - else { - br = new BufferedReader(rd); - } - return br; - } - - - /** - * Get BufferedWriter. - */ - public static BufferedWriter getBufferedWriter(Writer wr) { - BufferedWriter bw = null; - if(wr instanceof java.io.BufferedWriter) { - bw = (BufferedWriter)wr; - } - else { - bw = new BufferedWriter(wr); - } - return bw; - } - - - /** - * Get unique file object. - */ - public static File getUniqueFile(File oldFile) { - File newFile = oldFile; - while (true) { - if (!newFile.exists()) { - break; - } - newFile = new File(oldFile.getAbsolutePath() + '.' + Math.abs(RANDOM_GEN.nextLong())); - } - return newFile; - } - - - /** - * No exception InputStream close method. - */ - public static void close(InputStream is) { - if(is != null) { - try { is.close(); } catch(Exception ex) {} - } - } - - /** - * No exception OutputStream close method. - */ - public static void close(OutputStream os) { - if(os != null) { - try { os.close(); } catch(Exception ex) {} - } - } - - /** - * No exception java.io.Reader close method. - */ - public static void close(Reader rd) { - if(rd != null) { - try { rd.close(); } catch(Exception ex) {} - } - } - - - /** - * No exception java.io.Writer close method. - */ - public static void close(Writer wr) { - if(wr != null) { - try { wr.close(); } catch(Exception ex) {} - } - } - - - /** - * Get exception stack trace. - */ - public static String getStackTrace(Throwable ex) { - String result = ""; - try { - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - ex.printStackTrace(pw); - pw.close(); - sw.close(); - result = sw.toString(); - } - catch(Exception e) { - e.printStackTrace(); - } - return result; - } - - - /** - * Copy chars from a Reader to a Writer. - * @param bufferSize Size of internal buffer to use. - */ - public static void copy(Reader input, Writer output, int bufferSize ) throws IOException { - char buffer[] = new char[bufferSize]; - int n = 0; - while( (n=input.read(buffer)) != -1) { - output.write(buffer, 0, n); - } - } - - /** - * Copy chars from a InputStream to a OutputStream. - * @param bufferSize Size of internal buffer to use. - */ - public static void copy(InputStream input, OutputStream output, int bufferSize ) throws IOException { - byte buffer[] = new byte[bufferSize]; - int n = 0; - while( (n=input.read(buffer)) != -1) { - output.write(buffer, 0, n); - } - } - - - /** - * Read fully from reader - */ - public static String readFully(Reader reader) throws IOException { - StringWriter writer = new StringWriter(); - copy(reader, writer, 1024); - return writer.toString(); - } - - - /** - * Read fully from stream - */ - public static String readFully(InputStream input) throws IOException { - StringWriter writer = new StringWriter(); - InputStreamReader reader = new InputStreamReader(input); - copy(reader, writer, 1024); - return writer.toString(); - } - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/Message.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/Message.java deleted file mode 100644 index 4540c4fe1..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/Message.java +++ /dev/null @@ -1,68 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -/** - * Message interface - used in message queue. - * - * @author Rana Bhattacharyya - */ - -public -interface Message { - void execute() throws Exception; -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/PropertiesException.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/PropertiesException.java deleted file mode 100644 index 2b3d74554..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/PropertiesException.java +++ /dev/null @@ -1,73 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -public -class PropertiesException extends Exception { - - public PropertiesException() { - super(); - } - - public PropertiesException(String msg) { - super(msg); - } - - public PropertiesException(Exception ex) { - super(ex.getMessage()); - } -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/Queue.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/Queue.java deleted file mode 100644 index 194c5bb6c..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/Queue.java +++ /dev/null @@ -1,184 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -import java.util.LinkedList; - -/** - * Queue (first in first out) implementation. It supports two types of queues. - *
    - *
  • Queue is empty : throws NoSuchElementException.
  • - *
  • Queue is empty : waits for the new element.
  • - *
- * Null values cannot be inserted. - * - * @author Rana Bhattacharyya - */ - -public -class Queue { - - private LinkedList mList = new LinkedList(); - private boolean mbWait; - private int miMaxSize = 0; - - /** - * Constructor. - * @param bWait - thread will wait or not - */ - public Queue(boolean bWait) { - mbWait = bWait; - } - - - /** - * Try to get the first element. If the list is empty, - * the thread will wait. If interrupted returns null. - */ - public synchronized Object get() { - if(mbWait) { - while(mList.size() == 0) { - try { - wait(); - } - catch(InterruptedException ex) { - return null; - } - } - return mList.removeFirst(); - } - else { - return mList.removeFirst(); - } - } - - /** - * Try to get the first element. If the list is empty, - * the thread will wait. If interrupted returns null. - */ - public synchronized Object get(long waitTimeMillis) { - if(mbWait) { - if(mList.size() == 0) { - try { - wait(waitTimeMillis); - } - catch(InterruptedException ex) { - return null; - } - } - - if(mList.size() == 0) { - return null; - } - else { - return mList.removeFirst(); - } - } - else { - return mList.removeFirst(); - } - } - - /** - * Put an object into the queue and notify the waiting thread. - */ - public synchronized void put(Object obj) { - if(obj == null) { - throw new NullPointerException("Queue element cannot be null"); - } - - if (miMaxSize <= 0 || mList.size() < miMaxSize) { - mList.addLast(obj); - notify(); - } - } - - /** - * Get the number of elements in the queue. - */ - public synchronized int size() { - return mList.size(); - } - - /** - * Get max size - */ - public int getMaxSize() { - return miMaxSize; - } - - /** - * Set max size - */ - public void setMaxSize(int maxSize) { - miMaxSize = maxSize; - } - - /** - * Is the list empty (size == 0) - */ - public synchronized boolean isEmpty() { - return mList.size() == 0; - } - - /** - * Remove all the elements. - */ - public synchronized void clear() { - mList.clear(); - } -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/RegularExpr.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/RegularExpr.java deleted file mode 100644 index c56acaf3f..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/RegularExpr.java +++ /dev/null @@ -1,243 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -/** - * This is a simplified regular character mattching class. - * Supports *?^[]- pattern characters. - * - * @author Rana Bhattacharyya - */ -public -class RegularExpr { - - private char[] mcPattern; - - /** - * Constructor. - * @param pattern regular expression - */ - public RegularExpr(String pattern) { - mcPattern = pattern.toCharArray(); - } - - /** - * Compare string with a regular expression. - */ - public boolean isMatch(String name) { - - // common pattern - * - if( (mcPattern.length == 1) && (mcPattern[0] == '*') ) { - return true; - } - - return isMatch(name.toCharArray(), 0, 0); - } - - - /** - * Is a match? - */ - private boolean isMatch(char[] strName, int strIndex, int patternIndex) { - - while(true) { - - // no more pattern characters - // if no more strName characters - return true - if(patternIndex >= mcPattern.length) { - return strIndex == strName.length; - } - - char pc = mcPattern[patternIndex++]; - switch(pc) { - - // Match a single character in the range - // If no more strName character - return false - case '[' : - - // no more string character - returns false - // example : pattern = ab[^c] and string = ab - if(strIndex >= strName.length) { - return false; - } - - char fc = strName[strIndex++]; - char lastc = 0; - boolean bMatch = false; - boolean bNegete = false; - boolean bFirst = true; - - while(true) { - - // single character match - // no more pattern character - error condition. - if(patternIndex>=mcPattern.length) { - return false; - } - pc = mcPattern[patternIndex++]; - - // end character - break out the loop - // if end bracket is the first character - always a match. - // example pattern - [], [^] - if(pc == ']') { - if (bFirst) { - bMatch = true; - } - break; - } - - // if already matched - just read the rest till we get ']'. - if(bMatch) { - continue; - } - - // if the first character is the negete - // character - inverse the matching condition - if((pc == '^') && bFirst) { - bNegete = true; - continue; - } - bFirst = false; - - // '-' range check - if(pc == '-') { - - // pattern string is [a- error condition. - if(patternIndex>=mcPattern.length) { - return false; - } - - // read the high range character and compare. - pc = mcPattern[patternIndex++]; - bMatch = (fc>=lastc) && (fc<=pc); - lastc = pc; - } - - // Single character match check. It might also be the - // low range character. - else { - lastc = pc; - bMatch = (pc == fc); - } - } - - // no match - return false. - if(bNegete) { - if(bMatch) { - return false; - } - } - else { - if(!bMatch) { - return false; - } - } - break; - - - // * - skip zero or more characters - // No more patern character - return true - // Increment strIndex till the rest of the pattern matches. - case '*' : - - // no more string character remaining - returns true - if(patternIndex >= mcPattern.length) { - return true; - } - - // compare rest of the string - do { - if(isMatch(strName, strIndex++, patternIndex)) { - return true; - } - } - while(strIndex < strName.length); - - // Example pattern is (a*b) and the string is (adfdc). - return false; - - - // ? - skip one character - increment strIndex. - // If no more strName character - return false. - case '?' : - - // already at the end - no more character - returns false - if(strIndex >= strName.length) { - return false; - } - strIndex++; - break; - - - // match character. - default: - - // already at the end - no match - if (strIndex >= strName.length) { - return false; - } - - // the characters are not equal - no match - if(strName[strIndex++] != pc) { - return false; - } - break; - } - } - } - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/StreamConnector.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/StreamConnector.java deleted file mode 100644 index d787bd9ac..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/StreamConnector.java +++ /dev/null @@ -1,301 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -import java.io.InputStream; -import java.io.OutputStream; - -/** - * Connect one java.io.InputStream with a - * java.io.OutputStream. - * - * Features: - *
    - *
  • Buffered transfer or not (default unbuffered).
  • - *
  • Threaded transfer or not (default false).
  • - *
  • Set transfer rate limit (default no limit).
  • - *
  • Stop transfer at any time.
  • - *
  • Get current byte transferred.
  • - *
  • Transfer notification
  • - *
- * @author Rana Bhattacharyya - */ -public -class StreamConnector implements Runnable { - - private InputStream mInStream; - private OutputStream mOutStream; - - private boolean mbThreaded = false; - private boolean mbBuffered = false; - private boolean mbStopRequest = false; - - private int miTransferLimit = 0; - private long mlTransferSize = 0; - - private Exception mExp = null; - private Thread mConThread = null; // stream conneector thread - - private StreamConnectorObserver mObserver = null; - - - /** - * Constructors - * @param in pipe input - * @param out pipe output - */ - public StreamConnector(InputStream in, OutputStream out) { - mInStream = in; - mOutStream = out; - } - - /** - * Set stream connector observer. - */ - public synchronized void setObserver(StreamConnectorObserver obsr) { - mObserver = obsr; - } - - /** - * Set buffered transferred property. - */ - public void setIsBuffered(boolean buf) { - mbBuffered = buf; - } - - /** - * Get is buffered. - */ - public boolean getIsBuffered() { - return mbBuffered; - } - - /** - * Set threaded transfer property. - */ - public void setIsThreaded(boolean thr) { - mbThreaded = thr; - } - - /** - * Is the data transfer threaded? - */ - public boolean getIsThreaded() { - return mbThreaded; - } - - /** - * Get exception. - */ - public Exception getException() { - return mExp; - } - - /** - * Get transferred size in bytes. - */ - public long getTransferredSize() { - return mlTransferSize; - } - - /** - * Get transfer limit in bytes/second. - */ - public int getMaxTransferRate() { - return miTransferLimit; - } - - /** - * Set transfer limit - bytes/second. - */ - public void setMaxTransferRate(int limit) { - miTransferLimit = limit; - } - - /** - * Check exception status. - */ - public boolean hasException() { - return mExp != null; - } - - /** - * Stop data transfer. - */ - public synchronized void stopTransfer() { - mbStopRequest = true; - if(mConThread != null) { - mConThread.interrupt(); - } - IoUtils.close(mInStream); - IoUtils.close(mOutStream); - mConThread = null; - mInStream = null; - mOutStream = null; - } - - /** - * Is stopped? - */ - public boolean isStopped() { - return mbStopRequest; - } - - /** - * Connect two streams. - */ - public void connect() { - - // error test - if(mbStopRequest) { - throw new IllegalStateException("Data already transferred."); - } - if(mConThread != null) { - throw new IllegalStateException("Streams already connected."); - } - - // now connect - if(mbThreaded) { - new Thread(this).start(); - } - else { - run(); - } - } - - - /** - * Transfer data from one stream to another. - */ - public void run() { - long startTime = System.currentTimeMillis(); - mConThread = Thread.currentThread(); - InputStream in = mInStream; - OutputStream out = mOutStream; - byte[] buff = new byte[4096]; - - if(mbBuffered) { - in = IoUtils.getBufferedInputStream(in); - out = IoUtils.getBufferedOutputStream(out); - } - - try { - while(! (mbStopRequest || mConThread.isInterrupted()) ) { - - // check transfer rate - if(miTransferLimit > 0) { - long interval = System.currentTimeMillis() - startTime; - - // prevent "divide by zero" exception - if(interval == 0) { - interval = 1; - } - - int rate = (int)((mlTransferSize*1000)/interval); - if(rate > miTransferLimit) { - try { Thread.sleep(100); } catch(InterruptedException ex) {break;} - continue; - } - } - - // read data - int count = in.read(buff); - if(count == -1) { - break; - } - - // write data - out.write(buff, 0, count); - mlTransferSize += count; - notifyObserver(count); - } - out.flush(); - } - catch(Exception ex) { - mExp = ex; - } - finally { - synchronized (this) { - mbStopRequest = true; - IoUtils.close(in); - IoUtils.close(out); - notifyObserver(-1); - mConThread = null; - } - } - } - - /** - * Notify the observer. - * @param sz bytes transferred - */ - private void notifyObserver(int sz) { - StreamConnectorObserver observer = mObserver; - if(observer != null) { - observer.dataTransferred(sz); - } - } - - /** - * Last defense to stop thread. - */ - protected void finalize() throws Throwable { - stopTransfer(); - super.finalize(); - } - -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/StreamConnectorObserver.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/StreamConnectorObserver.java deleted file mode 100644 index 614018927..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/StreamConnectorObserver.java +++ /dev/null @@ -1,72 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -/** - * This interface observes stream connector activity. - * - * @author Rana Bhattacharyya - */ -public -interface StreamConnectorObserver { - /** - * Data has been transferred. - * - * @size transferred byte size. If finished, it is -1. - */ - void dataTransferred(int size); -} diff --git a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/StringUtils.java b/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/StringUtils.java deleted file mode 100644 index 9796e7b11..000000000 --- a/plexus-servers/ftpd/src/main/org/apache/ftpserver/util/StringUtils.java +++ /dev/null @@ -1,284 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -import java.util.Map; - -/** - * String utility methods. - * - * @author Rana Bhattacharyya - */ - -public -class StringUtils { - - private static final char SEPARATOR = '\n'; - - /** - * This is a string replacement method. - */ - public static String replaceString(String source, String oldStr, String newStr) { - StringBuffer sb = new StringBuffer(source.length()); - int sind = 0; - int cind = 0; - while ((cind=source.indexOf(oldStr, sind)) != -1) { - sb.append(source.substring(sind, cind)); - sb.append(newStr); - sind = cind + oldStr.length(); - } - sb.append(source.substring(sind)); - return sb.toString(); - } - - /** - * Replace string - */ - public static String replaceString(String source, Object[] args) { - int startIndex = 0; - int openIndex = source.indexOf('{', startIndex); - if (openIndex == -1) { - return source; - } - - int closeIndex = source.indexOf('}', startIndex); - if( (closeIndex == -1) || (openIndex > closeIndex) ) { - return source; - } - - StringBuffer sb = new StringBuffer(); - sb.append(source.substring(startIndex, openIndex)); - while(true) { - String intStr = source.substring(openIndex+1, closeIndex); - int index = Integer.parseInt(intStr); - sb.append(args[index]); - - startIndex = closeIndex + 1; - openIndex = source.indexOf('{', startIndex); - if (openIndex == -1) { - sb.append(source.substring(startIndex)); - break; - } - - closeIndex = source.indexOf('}', startIndex); - if( (closeIndex == -1) || (openIndex > closeIndex) ) { - sb.append(source.substring(startIndex)); - break; - } - sb.append(source.substring(startIndex, openIndex)); - } - return sb.toString(); - } - - - /** - * Replace string - */ - public static String replaceString(String source, Map args) { - int startIndex = 0; - int openIndex = source.indexOf('{', startIndex); - if (openIndex == -1) { - return source; - } - - int closeIndex = source.indexOf('}', startIndex); - if( (closeIndex == -1) || (openIndex > closeIndex) ) { - return source; - } - - StringBuffer sb = new StringBuffer(); - sb.append(source.substring(startIndex, openIndex)); - while(true) { - String key = source.substring(openIndex+1, closeIndex); - Object val = args.get(key); - if(val != null) { - sb.append(val); - } - - startIndex = closeIndex + 1; - openIndex = source.indexOf('{', startIndex); - if (openIndex == -1) { - sb.append(source.substring(startIndex)); - break; - } - - closeIndex = source.indexOf('}', startIndex); - if( (closeIndex == -1) || (openIndex > closeIndex) ) { - sb.append(source.substring(startIndex)); - break; - } - sb.append(source.substring(startIndex, openIndex)); - } - return sb.toString(); - } - - - /** - * This method is used to insert HTML block dynamically - * - * @param source the HTML code to be processes - * @param bReplaceNl if true '\n' will be replaced by
- * @param bReplaceTag if true '<' will be replaced by < and - * '>' will be replaced by > - * @param bReplaceQuote if true '\"' will be replaced by " - */ - public static String formatHtml(String source, - boolean bReplaceNl, - boolean bReplaceTag, - boolean bReplaceQuote) { - - StringBuffer sb = new StringBuffer(); - int len = source.length(); - for (int i=0; i': - if (bReplaceTag) sb.append(">"); - else sb.append(c); - break; - - case '\n': - if (bReplaceNl) { - if (bReplaceTag) sb.append("<br>"); - else sb.append("
"); - } else { - sb.append(c); - } - break; - - case '\r': - break; - - case '&': - sb.append("&"); - break; - - default: - sb.append(c); - break; - } - } - return sb.toString(); - } - - /** - * Pad string object - */ - public static String pad(String src, - char padChar, - boolean rightPad, - int totalLength) { - - int srcLength = src.length(); - if (srcLength >= totalLength) { - return src; - } - - int padLength = totalLength - srcLength; - StringBuffer sb = new StringBuffer(padLength); - for(int i=0; i> 1; - byte buff[] = new byte[arrLength]; - for(int i=0; i. - * - * $Id$ - */ -package org.apache.ftpserver.util; - -import java.io.File; -import java.io.Writer; -import java.io.IOException; -import java.io.Serializable; -import java.util.Comparator; -import java.util.Arrays; -import java.util.Date; -import java.util.StringTokenizer; - -/** - * This class is responsible to handle all virtual directory activities. - * - * @author Rana Bhattacharyya - */ -public -class VirtualDirectory implements Serializable { - - private static final String NEWLINE = "\r\n"; - private static final String DELIM = " "; - - private String mstRoot = "/"; - private String mstCurrDir = "/"; - - private boolean mbWritePerm = false; - - - /** - * Default constructor does nothing - */ - public VirtualDirectory() { - } - - /** - * Set write permission. - */ - public void setWritePermission(boolean perm) { - mbWritePerm = perm; - } - - /** - * Set root directory. Root directory string will always - * end with '/'. - */ - public void setRootDirectory(File root) { - - if(root == null) { - root = new File("/"); - } - mstRoot = normalizeSeparateChar(root.getAbsolutePath()); - - // if not ends with '/' - add one - if(mstRoot.charAt(mstRoot.length()-1) != '/') { - mstRoot = mstRoot + '/'; - } - mstCurrDir = "/"; - } - - /** - * Set root directory. - */ - public void setRootDirectory(String root) throws IOException { - mstRoot = normalizeSeparateChar(root); - - // if not ends with '/' - add one - if(mstRoot.charAt(mstRoot.length()-1) != '/') { - mstRoot = mstRoot + '/'; - } - mstCurrDir = "/"; - } - - /** - * Get write permission in this system - */ - public boolean getWritePermission() { - return mbWritePerm; - } - - /** - * Get current working directory. - */ - public String getCurrentDirectory() { - return mstCurrDir; - } - - - /** - * Get root directory. - */ - public String getRootDirectory() { - return mstRoot; - } - - - /** - * Get physical name (wrt the machine root). - */ - public String getPhysicalName(String virtualName) { - virtualName = normalizeSeparateChar(virtualName); - return replaceDots(virtualName); - } - - - /** - * Get virtual name (wrt the virtual root). - * The return value will never end with '/' unless it is '/'. - */ - public String getAbsoluteName(String virtualName) { - virtualName = normalizeSeparateChar(virtualName); - String physicalName = replaceDots(virtualName); - - String absoluteName = physicalName.substring(mstRoot.length()-1).trim(); - return removeLastSlash(absoluteName); - } - - - /** - * Get virtual name (wrt the virtual root). The virtual - * name will never end with '/' unless it is '/'. - */ - public String getVirtualName(String physicalName) { - physicalName = normalizeSeparateChar(physicalName); - if (!physicalName.startsWith(mstRoot)) { - return null; - } - - String virtualName = physicalName.substring(mstRoot.length()-1).trim(); - return removeLastSlash(virtualName); - } - - - /** - * Change directory. The current directory will never have '/' - * at the end unless it is '/'. - * @param dirName change the current working directory. - * @return true if success - */ - public boolean changeDirectory(String virtualDir) { - - String physcialDir = getPhysicalName(virtualDir); - if (physcialDir.equals("")) { - physcialDir = "/"; - } - - File dirFl = new File(physcialDir); - if (dirFl.exists() && dirFl.isDirectory()) { - mstCurrDir = physcialDir.substring(mstRoot.length() - 1).trim(); - mstCurrDir = removeLastSlash(mstCurrDir); - return true; - } - - return false; - } - - - /** - * Check read permission. - */ - public boolean hasReadPermission(String fileName, boolean bPhysical) { - if(bPhysical) { - fileName = normalizeSeparateChar(fileName); - } - else { - fileName = getPhysicalName(fileName); - } - - if(!fileName.startsWith(mstRoot)) { - return false; - } - - return new File(fileName).canRead(); - } - - - /** - * Chech file write/delete permission. - */ - public boolean hasWritePermission(String fileName, boolean bPhysical) { - - // no write permission - if(!mbWritePerm) { - return false; - } - - // if virtual name - get the physical name - if(bPhysical) { - fileName = normalizeSeparateChar(fileName); - } - else { - fileName = getPhysicalName(fileName); - } - - if(!fileName.startsWith(mstRoot)) { - return false; - } - - return new File(fileName).canWrite(); - } - - - /** - * Check file create permission. - */ - public boolean hasCreatePermission(String fileName, boolean bPhysical) { - - // no write permission - if(!mbWritePerm) { - return false; - } - - // if virtual name - get the physical name - if(bPhysical) { - fileName = normalizeSeparateChar(fileName); - } - else { - fileName = getPhysicalName(fileName); - } - - return fileName.startsWith(mstRoot); - } - - - /** - * Print file list. Detail listing. - *
-     *   -a : display all (including hidden files)
-     * 
- * @return true if success - */ - public boolean printList(String argument, Writer out) throws IOException { - - FileLister lister = new FileLister(argument); - File[] flLst = lister.getFiles(); - if (flLst == null) { - return false; - } - else { - for(int i=0; i - * -l : detail listing - * -a : display all (including hidden files) - * - * @return true if success - */ - public boolean printNList(String argument, Writer out) throws IOException { - - FileLister lister = new FileLister(argument); - File[] flLst = lister.getFiles(); - if (flLst == null) { - return false; - } - else { - for(int i=0; i initStr.length()) { - return szStr; - } - return initStr.substring(0, initStr.length() - szStr.length()) + szStr; - } - - - /** - * Get last modified date string. - */ - private String getLastModified(File fl) { - long modTime = fl.lastModified(); - Date date = new Date(modTime); - return DateUtils.getUnixDate(date); - } - - - /** - * Get file name. - */ - private String getName(File fl) { - return fl.getName(); - } - - - /** - * Get permission string. - */ - private String getPermission(File fl) { - - StringBuffer sb = new StringBuffer(13); - if(fl.isDirectory()) { - sb.append('d'); - } - else { - sb.append('-'); - } - - if (fl.canRead()) { - sb.append('r'); - } - else { - sb.append('-'); - } - - if (mbWritePerm && fl.canWrite()) { - sb.append('w'); - } - else { - sb.append('-'); - } - sb.append("-------"); - return sb.toString(); - } - - - /** - * Normalize separate characher. Separate character should be '/' always. - */ - private String normalizeSeparateChar(String pathName) { - pathName = pathName.replace(File.separatorChar, '/'); - pathName = pathName.replace('\\', '/'); - return pathName; - } - - - /** - * Replace dots. Returns physical name. - * @param inArg the virtaul name - */ - private String replaceDots(String inArg) { - - // get the starting directory - String resArg; - if(inArg.charAt(0) != '/') { - resArg = mstRoot + mstCurrDir.substring(1); - } - else { - resArg = mstRoot; - } - - // strip last '/' - if(resArg.charAt(resArg.length() -1) == '/') { - resArg = resArg.substring(0, resArg.length()-1); - } - - // replace ., ~ and .. - StringTokenizer st = new StringTokenizer(inArg, "/"); - while(st.hasMoreTokens()) { - - String tok = st.nextToken().trim(); - - // . => current directory - if(tok.equals(".")) { - continue; - } - - // .. => parent directory (if not root) - if(tok.equals("..")) { - if(resArg.startsWith(mstRoot)) { - int slashIndex = resArg.lastIndexOf('/'); - if(slashIndex != -1) { - resArg = resArg.substring(0, slashIndex); - } - } - continue; - } - - // ~ => home directory (in this case /) - if (tok.equals("~")) { - resArg = mstRoot.substring(0, mstRoot.length()-1).trim(); - continue; - } - - resArg = resArg + '/' + tok; - } - - // add last slash if necessary - if( !inArg.equals("") && (inArg.charAt(inArg.length()-1)=='/') ) { - resArg = resArg + '/'; - } - - // final check - if (resArg.length() < mstRoot.length()) { - resArg = mstRoot; - } - - return resArg; - } - - - /** - * Get each directory line. - */ - private void printLine(File fl, Writer out) throws IOException { - out.write(getPermission(fl)); - out.write(DELIM); - out.write(DELIM); - out.write(DELIM); - out.write(getLinkCount(fl)); - out.write(DELIM); - out.write(getOwner(fl)); - out.write(DELIM); - out.write(getGroup(fl)); - out.write(DELIM); - out.write(getLength(fl)); - out.write(DELIM); - out.write(getLastModified(fl)); - out.write(DELIM); - out.write(getName(fl)); - } - - /** - * If the string is not '/', remove last slash. - */ - private String removeLastSlash(String str) { - if ( (str.length()>1) && (str.charAt(str.length()-1)=='/') ) { - str = str.substring(0, str.length()-1); - } - return str; - } - - - - ////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////// - /** - * Inner class to compare files - */ - private class FileComparator implements Comparator { - public int compare(Object o1, Object o2) { - String s1 = ((File)o1).getName(); - String s2 = ((File)o2).getName(); - return s1.compareTo(s2); - } - } - - - ///////////////////////////////////////////////////////////////////// - ///////////////////////////////////////////////////////////////////// - /** - * File lister to list files properly - */ - private class FileLister { - - private File[] files = null; - private boolean bAll = false; - private boolean bDetail = false; - - /** - * Parse arguments - get options and get file list. - */ - public FileLister(String argument) { - String lsDirName = "./"; - String options = ""; - String pattern = "*"; - - // get options, directory name and pattern - if(argument != null) { - argument = argument.trim(); - StringBuffer optionsSb = new StringBuffer(4); - StringTokenizer st = new StringTokenizer(argument, " "); - while(st.hasMoreTokens()) { - String token = st.nextToken(); - if(token.charAt(0) == '-') { - if (token.length() > 1) { - optionsSb.append(token.substring(1)); - } - } - else { - lsDirName = token; - } - } - options = optionsSb.toString(); - } - - // check options - bAll = options.indexOf('a') != -1; - bDetail = options.indexOf('l') != -1; - - // check pattern - lsDirName = getPhysicalName(lsDirName); - File lstDirObj = new File(lsDirName); - if ( !(lstDirObj.exists() && lstDirObj.isDirectory()) ) { - int slashIndex = lsDirName.lastIndexOf('/'); - if( (slashIndex != -1) && (slashIndex != (lsDirName.length() -1)) ) { - pattern = lsDirName.substring(slashIndex+1); - lsDirName = lsDirName.substring(0, slashIndex+1); - } - } - - // check directory - lstDirObj = new File(lsDirName); - if(!lstDirObj.exists()) { - return; - } - if(!lstDirObj.isDirectory()) { - return; - } - - // get file list - if ( (pattern == null) || pattern.equals("*") || pattern.equals("") ) { - files = lstDirObj.listFiles(); - } - else { - files = lstDirObj.listFiles(new FileRegularFilter(pattern)); - } - //Arrays.sort(files, new FileComparator()); - } - - - /** - * Get files - */ - public File[] getFiles() { - return files; - } - - /** - * Display all flag - */ - public boolean isAll() { - return bAll; - } - - /** - * Display detail flag - */ - public boolean isDetail() { - return bDetail; - } - } - -} diff --git a/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/connection/AbstractHandlerFactory.java b/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/connection/AbstractHandlerFactory.java deleted file mode 100644 index 9fb336429..000000000 --- a/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/connection/AbstractHandlerFactory.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Jakarta", "Apache Avalon", "Avalon Cornerstone", "Avalon - Framework" and "Apache Software Foundation" must not be used to endorse - or promote products derived from this software without prior written - permission. For written permission, please contact apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation. For more information on the - Apache Software Foundation, please see . - -*/ - -package org.apache.avalon.cornerstone.services.connection; - -import org.apache.avalon.framework.component.WrapperComponentManager; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.container.ContainerUtil; -import org.apache.avalon.framework.context.Context; -import org.apache.avalon.framework.context.Contextualizable; -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.service.Serviceable; - -/** - * Helper class to extend to create handler factorys. - * - * @author Peter Donald - */ -public abstract class AbstractHandlerFactory - extends AbstractLogEnabled - implements Contextualizable, Serviceable, Configurable, ConnectionHandlerFactory -{ - private Context m_context; - private ServiceManager m_serviceManager; - private Configuration m_configuration; - - public void contextualize( final Context context ) - { - m_context = context; - } - - public void service( final ServiceManager serviceManager ) - throws ServiceException - { - m_serviceManager = serviceManager; - } - - public void configure( final Configuration configuration ) - throws ConfigurationException - { - m_configuration = configuration; - } - - /** - * Construct an appropriate ConnectionHandler. - * - * @return the new ConnectionHandler - * @exception Exception if an error occurs - */ - public ConnectionHandler createConnectionHandler() - throws Exception - { - final ConnectionHandler handler = newHandler(); - ContainerUtil.enableLogging( handler, getLogger() ); - ContainerUtil.contextualize( handler, m_context ); - ContainerUtil.service( handler, m_serviceManager ); - ContainerUtil.compose( handler, new WrapperComponentManager( m_serviceManager ) ); - ContainerUtil.configure( handler, m_configuration ); - ContainerUtil.initialize( handler ); - - return handler; - } - - public void releaseConnectionHandler( ConnectionHandler connectionHandler ) - { - ContainerUtil.dispose( connectionHandler ); - } - - /** - * Overide this method to create actual instance of connection handler. - * - * @return the new ConnectionHandler - * @exception Exception if an error occurs - */ - protected abstract ConnectionHandler newHandler() - throws Exception; -} diff --git a/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/connection/AbstractService.java b/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/connection/AbstractService.java deleted file mode 100644 index 4c1e83336..000000000 --- a/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/connection/AbstractService.java +++ /dev/null @@ -1,217 +0,0 @@ -/* - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Jakarta", "Apache Avalon", "Avalon Cornerstone", "Avalon - Framework" and "Apache Software Foundation" must not be used to endorse - or promote products derived from this software without prior written - permission. For written permission, please contact apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation. For more information on the - Apache Software Foundation, please see . - -*/ - -package org.apache.avalon.cornerstone.services.connection; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.ServerSocket; -import org.apache.avalon.cornerstone.services.sockets.ServerSocketFactory; -import org.apache.avalon.cornerstone.services.sockets.SocketManager; -import org.apache.avalon.cornerstone.services.threads.ThreadManager; -import org.apache.avalon.excalibur.thread.ThreadPool; -import org.apache.avalon.framework.activity.Disposable; -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.component.ComponentException; -import org.apache.avalon.framework.component.WrapperComponentManager; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.container.ContainerUtil; -import org.apache.avalon.framework.context.Context; -import org.apache.avalon.framework.context.ContextException; -import org.apache.avalon.framework.context.Contextualizable; -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.avalon.framework.logger.Logger; -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.service.Serviceable; - -/** - * Helper class to create protocol services. - * - * @author Peter Donald - */ -public abstract class AbstractService - extends AbstractLogEnabled - implements Contextualizable, Serviceable, Configurable, Initializable, Disposable -{ - protected ConnectionManager m_connectionManager; - protected SocketManager m_socketManager; - protected ConnectionHandlerFactory m_factory; - protected ThreadManager m_threadManager; - protected ThreadPool m_threadPool; - protected String m_serverSocketType; - protected int m_port; - protected InetAddress m_bindTo; //network interface to bind to - protected ServerSocket m_serverSocket; - protected String m_connectionName; - - public AbstractService() - { - m_factory = createFactory(); - m_serverSocketType = "plain"; - } - - protected String getThreadPoolName() - { - return null; - } - - protected abstract ConnectionHandlerFactory createFactory(); - - public void enableLogging( final Logger logger ) - { - super.enableLogging( logger ); - ContainerUtil.enableLogging( m_factory, logger ); - } - - public void contextualize( final Context context ) - throws ContextException - { - ContainerUtil.contextualize( m_factory, context ); - } - - public void service( final ServiceManager serviceManager ) - throws ServiceException - { - m_connectionManager = (ConnectionManager)serviceManager.lookup( ConnectionManager.ROLE ); - m_socketManager = (SocketManager)serviceManager.lookup( SocketManager.ROLE ); - if( null != getThreadPoolName() ) - { - m_threadManager = - (ThreadManager)serviceManager.lookup( ThreadManager.ROLE ); - m_threadPool = m_threadManager.getThreadPool( getThreadPoolName() ); - } - ContainerUtil.service( m_factory, serviceManager ); - try - { - ContainerUtil.compose( m_factory, new WrapperComponentManager( serviceManager ) ); - } - catch( final ComponentException ce ) - { - throw new ServiceException( ConnectionHandlerFactory.class.getName(), ce.getMessage(), ce ); - } - } - - public void configure( final Configuration configuration ) - throws ConfigurationException - { - ContainerUtil.configure( m_factory, configuration ); - } - - public void initialize() - throws Exception - { - ContainerUtil.initialize( m_factory ); - - if( null == m_connectionName ) - { - final StringBuffer sb = new StringBuffer(); - sb.append( m_serverSocketType ); - sb.append( ':' ); - sb.append( m_port ); - - if( null != m_bindTo ) - { - sb.append( '/' ); - sb.append( m_bindTo ); - } - - m_connectionName = sb.toString(); - } - - final ServerSocketFactory factory = - m_socketManager.getServerSocketFactory( m_serverSocketType ); - - if( null == m_bindTo ) - { - m_serverSocket = factory.createServerSocket( m_port ); - } - else - { - m_serverSocket = factory.createServerSocket( m_port, 5, m_bindTo ); - } - - if( null == m_threadPool ) - { - m_connectionManager.connect( m_connectionName, m_serverSocket, - m_factory ); - } - else - { - m_connectionManager.connect( m_connectionName, m_serverSocket, - m_factory, m_threadPool ); - } - } - - public void dispose() - { - try - { - m_connectionManager.disconnect( m_connectionName ); - } - catch( final Exception e ) - { - final String message = "Error disconnecting"; - getLogger().warn( message, e ); - } - - try - { - m_serverSocket.close(); - } - catch( final IOException ioe ) - { - final String message = "Error closing server socket"; - getLogger().warn( message, ioe ); - } - } -} diff --git a/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/connection/ConnectionHandler.java b/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/connection/ConnectionHandler.java deleted file mode 100644 index ae9cc7e2c..000000000 --- a/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/connection/ConnectionHandler.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Jakarta", "Apache Avalon", "Avalon Cornerstone", "Avalon - Framework" and "Apache Software Foundation" must not be used to endorse - or promote products derived from this software without prior written - permission. For written permission, please contact apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation. For more information on the - Apache Software Foundation, please see . - -*/ - -package org.apache.avalon.cornerstone.services.connection; - -import java.io.IOException; -import java.net.ProtocolException; -import java.net.Socket; - -/** - * This interface is the way in which incoming connections are processed. - * - * @author Peter Donald - */ -public interface ConnectionHandler -{ - /** - * Processes connections as they occur. The handler should not - * close the connection, the caller will do that. - * - * @param connection the connection - * @exception IOException if an error reading from socket occurs - * @exception ProtocolException if an error handling connection occurs - */ - void handleConnection( Socket connection ) - throws IOException, ProtocolException; -} diff --git a/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/connection/ConnectionHandlerFactory.java b/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/connection/ConnectionHandlerFactory.java deleted file mode 100644 index 1c5b34766..000000000 --- a/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/connection/ConnectionHandlerFactory.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Jakarta", "Apache Avalon", "Avalon Cornerstone", "Avalon - Framework" and "Apache Software Foundation" must not be used to endorse - or promote products derived from this software without prior written - permission. For written permission, please contact apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation. For more information on the - Apache Software Foundation, please see . - -*/ - -package org.apache.avalon.cornerstone.services.connection; - -/** - * This interface is the way in which handlers are created. - * - * @author Peter Donald - */ -public interface ConnectionHandlerFactory -{ - /** - * Construct an appropriate ConnectionHandler. - * - * @return the new ConnectionHandler - * @exception Exception if an error occurs - */ - ConnectionHandler createConnectionHandler() - throws Exception; - - /** - * Release a previously created ConnectionHandler. - * e.g. for spooling. - */ - void releaseConnectionHandler( ConnectionHandler connectionHandler ); - -} - diff --git a/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/connection/ConnectionManager.java b/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/connection/ConnectionManager.java deleted file mode 100644 index 55dd61933..000000000 --- a/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/connection/ConnectionManager.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Jakarta", "Apache Avalon", "Avalon Cornerstone", "Avalon - Framework" and "Apache Software Foundation" must not be used to endorse - or promote products derived from this software without prior written - permission. For written permission, please contact apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation. For more information on the - Apache Software Foundation, please see . - -*/ - -package org.apache.avalon.cornerstone.services.connection; - -import java.net.ServerSocket; -import org.apache.avalon.excalibur.thread.ThreadPool; - -/** - * This is the service through which ConnectionManagement occurs. - * - * @author Peter Donald - */ -public interface ConnectionManager -{ - String ROLE = ConnectionManager.class.getName(); - - /** - * Start managing a connection. - * Management involves accepting connections and farming them out to threads - * from pool to be handled. - * - * @param name the name of connection - * @param socket the ServerSocket from which to - * @param handlerFactory the factory from which to aquire handlers - * @param threadPool the thread pool to use - * @exception Exception if an error occurs - */ - void connect( String name, - ServerSocket socket, - ConnectionHandlerFactory handlerFactory, - ThreadPool threadPool ) - throws Exception; - - /** - * Start managing a connection. - * This is similar to other connect method except that it uses default thread pool. - * - * @param name the name of connection - * @param socket the ServerSocket from which to - * @param handlerFactory the factory from which to aquire handlers - * @exception Exception if an error occurs - */ - void connect( String name, - ServerSocket socket, - ConnectionHandlerFactory handlerFactory ) - throws Exception; - - /** - * This shuts down all handlers and socket, waiting for each to gracefully shutdown. - * - * @param name the name of connection - * @exception Exception if an error occurs - */ - void disconnect( String name ) - throws Exception; - - /** - * This shuts down all handlers and socket. - * If tearDown is true then it will forcefully shutdown all connections and try - * to return as soon as possible. Otherwise it will behave the same as - * void disconnect( String name ); - * - * @param name the name of connection - * @param tearDown if true will forcefully tear down all handlers - * @exception Exception if an error occurs - */ - void disconnect( String name, boolean tearDown ) - throws Exception; -} diff --git a/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/connection/DefaultHandlerFactory.java b/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/connection/DefaultHandlerFactory.java deleted file mode 100644 index 8e4a6540d..000000000 --- a/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/connection/DefaultHandlerFactory.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Jakarta", "Apache Avalon", "Avalon Cornerstone", "Avalon - Framework" and "Apache Software Foundation" must not be used to endorse - or promote products derived from this software without prior written - permission. For written permission, please contact apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation. For more information on the - Apache Software Foundation, please see . - -*/ - -package org.apache.avalon.cornerstone.services.connection; - -/** - * Default Hnalder factory that creates instances via reflection. - * - * @author Peter Donald - */ -public class DefaultHandlerFactory - extends AbstractHandlerFactory -{ - protected Class m_handlerClass; - - public DefaultHandlerFactory( final Class handlerClass ) - { - m_handlerClass = handlerClass; - } - - /** - * Overide this method to create actual instance of connection handler. - * - * @return the new ConnectionHandler - * @exception Exception if an error occurs - */ - protected ConnectionHandler newHandler() - throws Exception - { - return (ConnectionHandler)m_handlerClass.newInstance(); - } - - /** - * Release a previously created ConnectionHandler. - * e.g. for spooling. - */ - public void releaseConnectionHandler( ConnectionHandler connectionHandler ) - { - } -} diff --git a/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/sockets/ServerSocketFactory.java b/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/sockets/ServerSocketFactory.java deleted file mode 100644 index 23f62fac5..000000000 --- a/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/sockets/ServerSocketFactory.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Jakarta", "Apache Avalon", "Avalon Cornerstone", "Avalon - Framework" and "Apache Software Foundation" must not be used to endorse - or promote products derived from this software without prior written - permission. For written permission, please contact apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation. For more information on the - Apache Software Foundation, please see . - -*/ - -package org.apache.avalon.cornerstone.services.sockets; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.ServerSocket; - -/** - * The interface used to create server sockets. - * - * @author Peter Donald - */ -public interface ServerSocketFactory -{ - /** - * Creates a socket on specified port. - * - * @param port the port - * @return the created ServerSocket - * @exception IOException if an error occurs - */ - ServerSocket createServerSocket( int port ) - throws IOException; - - /** - * Creates a socket on specified port with a specified backLog. - * - * @param port the port - * @param backLog the backLog - * @return the created ServerSocket - * @exception IOException if an error occurs - */ - ServerSocket createServerSocket( int port, int backLog ) - throws IOException; - - /** - * Creates a socket on a particular network interface on specified port - * with a specified backLog. - * - * @param port the port - * @param backLog the backLog - * @param bindAddress the network interface to bind to. - * @return the created ServerSocket - * @exception IOException if an error occurs - */ - ServerSocket createServerSocket( int port, int backLog, InetAddress bindAddress ) - throws IOException; -} - diff --git a/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/sockets/SocketFactory.java b/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/sockets/SocketFactory.java deleted file mode 100644 index f33db4255..000000000 --- a/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/sockets/SocketFactory.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Jakarta", "Apache Avalon", "Avalon Cornerstone", "Avalon - Framework" and "Apache Software Foundation" must not be used to endorse - or promote products derived from this software without prior written - permission. For written permission, please contact apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation. For more information on the - Apache Software Foundation, please see . - -*/ - -package org.apache.avalon.cornerstone.services.sockets; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.Socket; - -/** - * The interface used to create client sockets. - * - * @author Peter Donald - */ -public interface SocketFactory -{ - /** - * Create a socket and connect to remote address specified. - * - * @param address the remote address - * @param port the remote port - * @return the socket - * @exception IOException if an error occurs - */ - Socket createSocket( InetAddress address, int port ) - throws IOException; - - /** - * Create a socket and connect to remote address specified - * originating from specified local address. - * - * @param address the remote address - * @param port the remote port - * @param localAddress the local address - * @param localPort the local port - * @return the socket - * @exception IOException if an error occurs - */ - Socket createSocket( InetAddress address, int port, - InetAddress localAddress, int localPort ) - throws IOException; -} diff --git a/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/sockets/SocketManager.java b/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/sockets/SocketManager.java deleted file mode 100644 index b89f9a467..000000000 --- a/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/sockets/SocketManager.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Jakarta", "Apache Avalon", "Avalon Cornerstone", "Avalon - Framework" and "Apache Software Foundation" must not be used to endorse - or promote products derived from this software without prior written - permission. For written permission, please contact apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation. For more information on the - Apache Software Foundation, please see . - -*/ - -package org.apache.avalon.cornerstone.services.sockets; - -/** - * Service to manager the socket factories. - * - * @author Peter Donald - */ -public interface SocketManager -{ - String ROLE = SocketManager.class.getName(); - - /** - * Retrieve a server socket factory by name. - * - * @param name the name of server socket factory - * @return the ServerSocketFactory - * @exception Exception if server socket factory is not available - */ - ServerSocketFactory getServerSocketFactory( String name ) - throws Exception; - - /** - * Retrieve a client socket factory by name. - * - * @param name the name of client socket factory - * @return the SocketFactory - * @exception Exception if socket factory is not available - */ - SocketFactory getSocketFactory( String name ) - throws Exception; -} diff --git a/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/threads/ThreadManager.java b/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/threads/ThreadManager.java deleted file mode 100644 index 999bf697f..000000000 --- a/plexus-servers/ftpd/src/old/org/apache/avalon/cornerstone/threads/ThreadManager.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Jakarta", "Apache Avalon", "Avalon Cornerstone", "Avalon - Framework" and "Apache Software Foundation" must not be used to endorse - or promote products derived from this software without prior written - permission. For written permission, please contact apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation. For more information on the - Apache Software Foundation, please see . - -*/ - -package org.apache.avalon.cornerstone.services.threads; - -import org.apache.avalon.excalibur.thread.ThreadPool; - -/** - * Manage a set of ThreadPools. - * - * @author Peter Donald - */ -public interface ThreadManager -{ - String ROLE = ThreadManager.class.getName(); - - /** - * Retrieve a thread pool by name. - * - * @param name the name of thread pool - * @return the threadpool - * @exception IllegalArgumentException if the name of thread pool is - * invalid or named pool does not exist - */ - ThreadPool getThreadPool( String name ) - throws IllegalArgumentException; - - /** - * Retrieve the default thread pool. - * - * @return the thread pool - */ - ThreadPool getDefaultThreadPool(); -} diff --git a/plexus-servers/ftpd/src/old/org/apache/avalon/excalibur/thread/ThreadControl.java b/plexus-servers/ftpd/src/old/org/apache/avalon/excalibur/thread/ThreadControl.java deleted file mode 100644 index cf9f2ec9b..000000000 --- a/plexus-servers/ftpd/src/old/org/apache/avalon/excalibur/thread/ThreadControl.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and - "Apache Software Foundation" must not be used to endorse or promote - products derived from this software without prior written - permission. For written permission, please contact apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation. For more information on the - Apache Software Foundation, please see . - -*/ - -package org.apache.avalon.excalibur.thread; - -/** - * This interface defines the method through which Threads can be controlled. - * - * @author Avalon Development Team - * @author Peter Donald - * @deprecated Replaced with org.apache.excalibur.thread.ThreadControl - */ -public interface ThreadControl -{ - /** - * Wait for specified time for thread to complete it's work. - * - * @param milliSeconds the duration in milliseconds to wait until the thread has finished work - * @throws IllegalStateException if isValid() == false - * @throws InterruptedException if another thread has interrupted the current thread. - * The interrupted status of the current thread is cleared when this exception - * is thrown. - */ - void join( long milliSeconds ) - throws IllegalStateException, InterruptedException; - - /** - * Call {@link Thread#interrupt()} on thread being controlled. - * - * @throws IllegalStateException if isValid() == false - * @throws SecurityException if caller does not have permission to call interupt() - */ - void interrupt() - throws IllegalStateException, SecurityException; - - /** - * Determine if thread has finished execution - * - * @return true if thread is finished, false otherwise - */ - boolean isFinished(); - - /** - * Retrieve throwable that caused thread to cease execution. - * Only valid when true == isFinished() - * - * @return the throwable that caused thread to finish execution - */ - Throwable getThrowable(); -} diff --git a/plexus-servers/ftpd/src/old/org/apache/avalon/excalibur/thread/ThreadPool.java b/plexus-servers/ftpd/src/old/org/apache/avalon/excalibur/thread/ThreadPool.java deleted file mode 100644 index 755ddcf15..000000000 --- a/plexus-servers/ftpd/src/old/org/apache/avalon/excalibur/thread/ThreadPool.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and - "Apache Software Foundation" must not be used to endorse or promote - products derived from this software without prior written - permission. For written permission, please contact apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation. For more information on the - Apache Software Foundation, please see . - -*/ - -package org.apache.avalon.excalibur.thread; - -import org.apache.avalon.framework.activity.Executable; -import org.apache.excalibur.thread.ThreadControl; - -/** - * This class is the public frontend for the thread pool code. - * - * @author Avalon Development Team - * @author Peter Donald - * @deprecated Replaced with org.apache.excalibur.thread.ThreadPool - */ -public interface ThreadPool - extends org.apache.excalibur.thread.ThreadPool -{ - /** - * Run work in separate thread. - * Return a valid ThreadControl to control work thread. - * - * @param work the work to be executed. - * @return the ThreadControl - */ - ThreadControl execute( Executable work ); -} diff --git a/plexus-servers/ftpd/src/old/org/apache/avalon/phoenix/BlockContext.java b/plexus-servers/ftpd/src/old/org/apache/avalon/phoenix/BlockContext.java deleted file mode 100644 index 32e16db86..000000000 --- a/plexus-servers/ftpd/src/old/org/apache/avalon/phoenix/BlockContext.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1997-2003 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Avalon", "Phoenix" and "Apache Software Foundation" - must not be used to endorse or promote products derived from this - software without prior written permission. For written permission, please - contact apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation. For more information on the - Apache Software Foundation, please see . - -*/ - -package org.apache.avalon.phoenix; - -import java.io.File; -import java.io.InputStream; -import org.apache.avalon.framework.context.Context; -import org.apache.avalon.framework.logger.Logger; - -/** - * Context via which Blocks communicate with container. - * - * @author Peter Donald - */ -public interface BlockContext - extends Context -{ - String APP_NAME = "app.name"; - String APP_HOME_DIR = "app.home"; - String NAME = "block.name"; - - /** - * Base directory of .sar application. - * - * TODO: Should this be getHomeDirectory() or getWorkingDirectory() or other? - * TODO: Should a Block be able to declare it doesn't use the Filesystem? If - * it declares this then it would be an error to call this method. - * - * @return the base directory - */ - File getBaseDirectory(); - - /** - * Retrieve name of block. - * - * @return the name of block - */ - String getName(); - - /** - * A block can request that the application it resides in be - * shut down. This method will schedule the blocks application - * for shutdown. Note that this is just a request and the kernel - * may or may not honour the request (by default the request will - * be honored). - */ - void requestShutdown(); - - /** - * Retrieve a resource from the SAR file. The specified - * name is relative the root of the archive. So you could - * use it to retrieve a html page from within sar by loading - * the resource named "data/main.html" or similar. - * Names may be prefixed with '/' character. - * - * @param name the name of resource - * @return the InputStream for resource or null if no such resource - */ - InputStream getResourceAsStream( String name ); - - /** - * Retrieve logger coresponding to named category. - * - * @return the logger - * @deprecated This allows block writers to "break-out" of their logging - * hierarchy which is considered bad form. Replace by - * Logger.getChildLogger(String) where original logger is aquired - * via AbstractLogEnabled. - */ - Logger getLogger( String name ); - - /** - * This method gives the block access to a named {@link ClassLoader}. - * The {@link ClassLoader}s for an application are declared in the - * environment.xml descriptor. See the Specification for details. - * - * @param name the name of the classloader - * @return the classloader - * @throws Exception if no such {@link ClassLoader} - */ - ClassLoader getClassLoader( String name ) - throws Exception; - - /** - * Retrieve the proxy for this object. - * Each Block is referenced by other Blocks via their Proxy. When Phoenix - * shuts down the Block, it can automatically invalidate the proxy. Thus - * any attempt to call a method on a "dead"/shutdown object will result in - * an {@link IllegalStateException}. This is desirable as it will - * stop objects from using the Block when it is in an invalid state. - * - *

The proxy also allows Phoenix to associate "Context" information with - * the object. For instance, a Block may expect to run with a - * specific ContextClassLoader set. However if this Block were to be passed - * to another component that processed the Block in a thread that did not - * have the correct context information setup, then the Block could fail - * to perform as expected. By passing the proxy instead, the correct context - * information is maintained by Phoenix.

- * - *

Note that only interfaces that the Block declares as offered services - * will actually be implemented by the proxy.

- */ - //Object getProxy(); - - /** - * This method is similar to {@link #getProxy()} except that it operates - * on arbitrary objects. It will in effect proxy all interfaces that the - * component supports. - * - *

Proxying arbitrary objects is useful for the same reason it is useful - * to proxy the Block. Thus it is recomended that when needed you pass - * Proxys of objects to minimize the chance of incorrect behaviour.

- */ - //Object getProxy( Object other ); - - /** - * This method generates a Proxy of the specified object using the - * specified interfaces. In other respects it is identical to - * getProxy( Object other ) - */ - //Object getProxy( Object other, Class[] interfaces ); - - /** - * Retrieve the MBeanServer for this application. - * - * NOTE: Unsure if this will ever be implemented - * may be retrievable via CM instead, or perhaps in - * a directory or whatever. - */ - //MBeanServer getMBeanServer(); -} diff --git a/plexus-servers/ftpd/src/old/org/apache/excalibur/thread/Executable.java b/plexus-servers/ftpd/src/old/org/apache/excalibur/thread/Executable.java deleted file mode 100644 index 3f39c2b4f..000000000 --- a/plexus-servers/ftpd/src/old/org/apache/excalibur/thread/Executable.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and - "Apache Software Foundation" must not be used to endorse or promote - products derived from this software without prior written - permission. For written permission, please contact apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation. For more information on the - Apache Software Foundation, please see . - -*/ - -package org.apache.excalibur.thread; - -/** - * The Executable can be implemented by components that need to perform - * some work. In many respects it is similar to Runnable except that it - * also allows an application to throw a non-Runtime Exception. - * - *

The work done may be short lived (ie a simple task) or it could - * be a long running.

- * - * @author Avalon Development Team - * @author Peter Donald - */ -public interface Executable -{ - /** - * Execute the action associated with this component. - * - * @throws Exception if an error occurs - */ - void execute() - throws Exception; -} diff --git a/plexus-servers/ftpd/src/old/org/apache/excalibur/thread/ThreadControl.java b/plexus-servers/ftpd/src/old/org/apache/excalibur/thread/ThreadControl.java deleted file mode 100644 index 7742913f5..000000000 --- a/plexus-servers/ftpd/src/old/org/apache/excalibur/thread/ThreadControl.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and - "Apache Software Foundation" must not be used to endorse or promote - products derived from this software without prior written - permission. For written permission, please contact apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation. For more information on the - Apache Software Foundation, please see . - -*/ - -package org.apache.excalibur.thread; - -/** - * This interface defines the method through which Threads can be controller. - * - * @author Avalon Development Team - * @author Peter Donald - */ -public interface ThreadControl - extends org.apache.avalon.excalibur.thread.ThreadControl -{ - /** - * Wait for specified time for thread to complete it's work. - * - * @param milliSeconds the duration in milliseconds to wait until the thread has finished work - * @throws IllegalStateException if isValid() == false - * @throws InterruptedException if another thread has interrupted the current thread. - * The interrupted status of the current thread is cleared when this exception - * is thrown. - */ - void join( long milliSeconds ) - throws IllegalStateException, InterruptedException; - - /** - * Call {@link Thread#interrupt()} on thread being controlled. - * - * @throws IllegalStateException if isValid() == false - * @throws SecurityException if caller does not have permission to call interupt() - */ - void interrupt() - throws IllegalStateException, SecurityException; - - /** - * Determine if thread has finished execution - * - * @return true if thread is finished, false otherwise - */ - boolean isFinished(); - - /** - * Retrieve throwable that caused thread to cease execution. - * Only valid when true == isFinished() - * - * @return the throwable that caused thread to finish execution - */ - Throwable getThrowable(); -} diff --git a/plexus-servers/ftpd/src/old/org/apache/excalibur/thread/ThreadPool.java b/plexus-servers/ftpd/src/old/org/apache/excalibur/thread/ThreadPool.java deleted file mode 100644 index 52ae4bc8a..000000000 --- a/plexus-servers/ftpd/src/old/org/apache/excalibur/thread/ThreadPool.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and - "Apache Software Foundation" must not be used to endorse or promote - products derived from this software without prior written - permission. For written permission, please contact apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation. For more information on the - Apache Software Foundation, please see . - -*/ - -package org.apache.excalibur.thread; - -/** - * This class is the public frontend for the thread pool code. - * - * @author Avalon Development Team - * @author Peter Donald - */ -public interface ThreadPool -{ - /** - * Run work in separate thread. - * Return a valid ThreadControl to control work thread. - * - * @param work the work to be executed. - * @return the ThreadControl - */ - ThreadControl execute( Runnable work ); - - /** - * Run work in separate thread. - * Return a valid ThreadControl to control work thread. - * - * @param work the work to be executed. - * @return the ThreadControl - */ - ThreadControl execute( Executable work ); -} diff --git a/plexus-servers/ftpd/src/test/java/org/apache/ftpserver/FtpServerImplTest.java b/plexus-servers/ftpd/src/test/java/org/apache/ftpserver/FtpServerImplTest.java deleted file mode 100644 index c56eacfbe..000000000 --- a/plexus-servers/ftpd/src/test/java/org/apache/ftpserver/FtpServerImplTest.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.apache.ftpserver; - -/* - * LICENSE - */ - -import java.net.URL; - -import org.apache.ftpserver.interfaces.FtpServerInterface; - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.util.IOUtil; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class FtpServerImplTest - extends PlexusTestCase -{ - public void testBasic() - throws Exception - { - FtpServerInterface server = (FtpServerInterface)lookup( FtpServerInterface.ROLE ); - - URL url = new URL( "ftp", "localhost", 10021, "test-file.txt" ); - - String contents = IOUtil.toString( url.openStream() ); - - assertEquals( "Hello World!", contents ); - - release( server ); - } -} diff --git a/plexus-servers/ftpd/src/test/java/org/apache/ftpserver/FtpServerImplTest.xml b/plexus-servers/ftpd/src/test/java/org/apache/ftpserver/FtpServerImplTest.xml deleted file mode 100644 index caa362e18..000000000 --- a/plexus-servers/ftpd/src/test/java/org/apache/ftpserver/FtpServerImplTest.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - avalon - - - avalon - Avalon Lifecycle Handler - - - - - - - - - - - - - - - - - - - - - - - - - - - - org.apache.avalon.cornerstone.services.threads.ThreadManager - org.apache.avalon.cornerstone.blocks.threads.DefaultThreadManager - - - default - - 5 - - false - 40 - - 20 - 20 - - - - - - org.apache.avalon.cornerstone.services.connection.ConnectionManager - org.apache.avalon.cornerstone.blocks.connection.DefaultConnectionManager - - - - - org.apache.avalon.cornerstone.services.sockets.SocketManager - org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketManager - - - - - - - - - - - - org.apache.ftpserver.usermanager.UserManagerInterface - org.apache.ftpserver.usermanager.PropertiesUserManager - - ${plexus.home} - - - - - org.apache.ftpserver.ip.IpRestrictorInterface - org.apache.ftpserver.ip.FileIpRestrictor - - ${plexus.home}/../../src/test/resources - - - - - org.apache.ftpserver.interfaces.FtpServerInterface - org.apache.ftpserver.FtpServerImpl - - - localhost - localhost - false - 10021 - ${plexus.home}/../../src/test/resources - - - - diff --git a/plexus-servers/ftpd/src/test/resources/test-file.txt b/plexus-servers/ftpd/src/test/resources/test-file.txt deleted file mode 100644 index c57eff55e..000000000 --- a/plexus-servers/ftpd/src/test/resources/test-file.txt +++ /dev/null @@ -1 +0,0 @@ -Hello World! \ No newline at end of file diff --git a/plexus-servers/httpd/project.properties b/plexus-servers/httpd/project.properties deleted file mode 100644 index dac88eddb..000000000 --- a/plexus-servers/httpd/project.properties +++ /dev/null @@ -1,2 +0,0 @@ -maven.xdoc.date=left -maven.xdoc.version=${pom.currentVersion} diff --git a/plexus-servers/httpd/project.xml b/plexus-servers/httpd/project.xml deleted file mode 100644 index 90c684b8f..000000000 --- a/plexus-servers/httpd/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - ${maven.repo.local}/plexus/poms/plexus-server-1.0.pom - plexus-httpd - plexus-httpd - Plexus Httpd Server - 1.0-alpha-5 - - - - - commons-logging - commons-logging - 1.0.2 - - - - velocity - velocity - 1.4-rc1 - - - - - diff --git a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/AdaptorServerSocketFactory.java b/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/AdaptorServerSocketFactory.java deleted file mode 100644 index 939ea2d7e..000000000 --- a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/AdaptorServerSocketFactory.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) MX4J. - * All rights reserved. - * - * This software is distributed under the terms of the MX4J License version 1.0. - * See the terms of the MX4J License in the documentation provided with this software. - */ - -package org.codehaus.plexus.httpd; - -import java.net.ServerSocket; -import java.io.IOException; - -/** - * The ServerSocket factory interface.

- * It allows to create ServerSocket for JMX adaptors - * - * @author Carlos Quiroz - * @author Simone Bordet - * @version $Revision$ - */ -public interface AdaptorServerSocketFactory -{ - /** - * Creates a new ServerSocket on the specified port, with the specified backlog and on the given host.
- * The last parameter is useful for hosts with more than one IP address. - */ - public ServerSocket createServerSocket(int port, int backlog, String host) throws IOException; -} diff --git a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/Base64.java b/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/Base64.java deleted file mode 100644 index c1e23f57d..000000000 --- a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/Base64.java +++ /dev/null @@ -1,943 +0,0 @@ -/* - * Copyright (C) MX4J. - * All rights reserved. - * - * This software is distributed under the terms of the MX4J License version 1.0. - * See the terms of the MX4J License in the documentation provided with this software. - */ -package org.codehaus.plexus.httpd; - -/** - * Base 64 processor. Taken from Public Domain - * - * Please visit http://iharder.net/xmlizable - * periodically to check for updates or to contribute improvements. - *

- * - * @author Robert Harder - * @author rharder@usa.net - * @version 1.3 - */ -public class Base64 -{ - - /** Specify encoding (value is true). */ - public final static boolean ENCODE = true; - - - /** Specify decoding (value is false). */ - public final static boolean DECODE = false; - - - /** Maximum line length (76) of Base64 output. */ - private final static int MAX_LINE_LENGTH = 76; - - - /** The equals sign (=) as a byte. */ - private final static byte EQUALS_SIGN = (byte) '='; - - - /** The new line character (\n) as a byte. */ - private final static byte NEW_LINE = (byte) '\n'; - - - /** The 64 valid Base64 values. */ - private final static byte[] ALPHABET = - { - (byte) 'A', (byte) 'B', (byte) 'C', (byte) 'D', (byte) 'E', (byte) 'F', (byte) 'G', - (byte) 'H', (byte) 'I', (byte) 'J', (byte) 'K', (byte) 'L', (byte) 'M', (byte) 'N', - (byte) 'O', (byte) 'P', (byte) 'Q', (byte) 'R', (byte) 'S', (byte) 'T', (byte) 'U', - (byte) 'V', (byte) 'W', (byte) 'X', (byte) 'Y', (byte) 'Z', - (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f', (byte) 'g', - (byte) 'h', (byte) 'i', (byte) 'j', (byte) 'k', (byte) 'l', (byte) 'm', (byte) 'n', - (byte) 'o', (byte) 'p', (byte) 'q', (byte) 'r', (byte) 's', (byte) 't', (byte) 'u', - (byte) 'v', (byte) 'w', (byte) 'x', (byte) 'y', (byte) 'z', - (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', - (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) '+', (byte) '/' - }; - - /** - * Translates a Base64 value to either its 6-bit reconstruction value - * or a negative number indicating some other meaning. - **/ - private final static byte[] DECODABET = - { - -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 0 - 8 - -5, -5, // Whitespace: Tab and Linefeed - -9, -9, // Decimal 11 - 12 - -5, // Whitespace: Carriage Return - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 14 - 26 - -9, -9, -9, -9, -9, // Decimal 27 - 31 - -5, // Whitespace: Space - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 33 - 42 - 62, // Plus sign at decimal 43 - -9, -9, -9, // Decimal 44 - 46 - 63, // Slash at decimal 47 - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, // Numbers zero through nine - -9, -9, -9, // Decimal 58 - 60 - -1, // Equals sign at decimal 61 - -9, -9, -9, // Decimal 62 - 64 - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, // Letters 'A' through 'N' - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, // Letters 'O' through 'Z' - -9, -9, -9, -9, -9, -9, // Decimal 91 - 96 - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, // Letters 'a' through 'm' - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, // Letters 'n' through 'z' - -9, -9, -9, -9 // Decimal 123 - 126 - /*,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 127 - 139 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 140 - 152 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 153 - 165 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 166 - 178 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 179 - 191 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 192 - 204 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 205 - 217 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 218 - 230 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 231 - 243 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9 // Decimal 244 - 255 */ - }; - - private final static byte BAD_ENCODING = -9; // Indicates error in encoding - private final static byte WHITE_SPACE_ENC = -5; // Indicates white space in encoding - private final static byte EQUALS_SIGN_ENC = -1; // Indicates equals sign in encoding - - - /** Defeats instantiation. */ - private Base64() - { - } - - - /** Testing. */ - public static void main( String[] args ) - { - String s = "Hello, world"; - s = "abcd"; - //s = System.getProperties().toString(); - //System.out.println( s + ": \n [" + encode( s ) + "]\n [" + decode(encode(s)) + "]" ); - - byte[] b = encodeString( s ).getBytes(); - byte[] c = decode( b, 0, b.length ); - - System.out.println( "\n\n" + s + ":" + new String( b ) + ":" + new String( c ) ); - - try - { - java.io.FileInputStream fis = new java.io.FileInputStream( "c:\\abcd.txt" ); - Base64.InputStream b64is = new Base64.InputStream( fis, DECODE ); - int ib = 0; - while ( ( ib = b64is.read() ) > 0 ) - { - //System.out.print( new String( ""+(char)ib ) ); - ib += (char) ib; - } - } // end try - catch ( Exception e ) - { - e.printStackTrace(); - } - } - - -/* ******** E N C O D I N G M E T H O D S ******** */ - - - /** - * Encodes the first three bytes of array threeBytes - * and returns a four-byte array in Base64 notation. - * - * @param threeBytes the array to convert - * @return four byte array in Base64 notation. - * @since 1.3 - */ - private static byte[] encode3to4( byte[] threeBytes ) - { - return encode3to4( threeBytes, 3 ); - } // end encodeToBytes - - - /** - * Encodes up to the first three bytes of array threeBytes - * and returns a four-byte array in Base64 notation. - * The actual number of significant bytes in your array is - * given by numSigBytes. - * The array threeBytes needs only be as big as - * numSigBytes. - * - * @param threeBytes the array to convert - * @param numSigBytes the number of significant bytes in your array - * @return four byte array in Base64 notation. - * @since 1.3 - */ - private static byte[] encode3to4( byte[] threeBytes, int numSigBytes ) - { - byte[] dest = new byte[4]; - encode3to4( threeBytes, 0, numSigBytes, dest, 0 ); - return dest; - } - - - /** - * Encodes up to three bytes of the array source - * and writes the resulting four Base64 bytes to destination. - * The source and destination arrays can be manipulated - * anywhere along their length by specifying - * srcOffset and destOffset. - * This method does not check to make sure your arrays - * are large enough to accomodate srcOffset + 3 for - * the source array or destOffset + 4 for - * the destination array. - * The actual number of significant bytes in your array is - * given by numSigBytes. - * - * @param source the array to convert - * @param srcOffset the index where conversion begins - * @param numSigBytes the number of significant bytes in your array - * @param destination the array to hold the conversion - * @param destOffset the index where output will be put - * @return the destination array - * @since 1.3 - */ - private static byte[] encode3to4( - byte[] source, int srcOffset, int numSigBytes, - byte[] destination, int destOffset ) - { - // 1 2 3 - // 01234567890123456789012345678901 Bit position - // --------000000001111111122222222 Array position from threeBytes - // --------| || || || | Six bit groups to index ALPHABET - // >>18 >>12 >> 6 >> 0 Right shift necessary - // 0x3f 0x3f 0x3f Additional AND - - // Create buffer with zero-padding if there are only one or two - // significant bytes passed in the array. - // We have to shift left 24 in order to flush out the 1's that appear - // when Java treats a value as negative that is cast from a byte to an int. - int inBuff = ( numSigBytes > 0 ? ( ( source[srcOffset] << 24 ) >>> 8 ) : 0 ) - | ( numSigBytes > 1 ? ( ( source[srcOffset + 1] << 24 ) >>> 16 ) : 0 ) - | ( numSigBytes > 2 ? ( ( source[srcOffset + 2] << 24 ) >>> 24 ) : 0 ); - - switch ( numSigBytes ) - { - case 3: - destination[destOffset] = ALPHABET[( inBuff >>> 18 )]; - destination[destOffset + 1] = ALPHABET[( inBuff >>> 12 ) & 0x3f]; - destination[destOffset + 2] = ALPHABET[( inBuff >>> 6 ) & 0x3f]; - destination[destOffset + 3] = ALPHABET[( inBuff ) & 0x3f]; - return destination; - - case 2: - destination[destOffset] = ALPHABET[( inBuff >>> 18 )]; - destination[destOffset + 1] = ALPHABET[( inBuff >>> 12 ) & 0x3f]; - destination[destOffset + 2] = ALPHABET[( inBuff >>> 6 ) & 0x3f]; - destination[destOffset + 3] = EQUALS_SIGN; - return destination; - - case 1: - destination[destOffset] = ALPHABET[( inBuff >>> 18 )]; - destination[destOffset + 1] = ALPHABET[( inBuff >>> 12 ) & 0x3f]; - destination[destOffset + 2] = EQUALS_SIGN; - destination[destOffset + 3] = EQUALS_SIGN; - return destination; - - default: - return destination; - } // end switch - } // end encode3to4 - - - /** - * Serializes an object and returns the Base64-encoded - * version of that serialized object. If the object - * cannot be serialized or there is another error, - * the method will return null. - * - * @param serializableObject The object to encode - * @return The Base64-encoded object - * @since 1.4 - */ - public static String encodeObject( java.io.Serializable serializableObject ) - { - java.io.ByteArrayOutputStream baos = null; - java.io.OutputStream b64os = null; - java.io.ObjectOutputStream oos = null; - - try - { - baos = new java.io.ByteArrayOutputStream(); - b64os = new Base64.OutputStream( baos, Base64.ENCODE ); - oos = new java.io.ObjectOutputStream( b64os ); - - oos.writeObject( serializableObject ); - } // end try - catch ( java.io.IOException e ) - { - e.printStackTrace(); - return null; - } // end catch - finally - { - try - { - oos.close(); - } - catch ( Exception e ) - { - } - try - { - b64os.close(); - } - catch ( Exception e ) - { - } - try - { - baos.close(); - } - catch ( Exception e ) - { - } - } // end finally - - return new String( baos.toByteArray() ); - } // end encode - - - /** - * Encodes a byte array into Base64 notation. - * Equivalen to calling - * encodeBytes( source, 0, source.length ) - * - * @param source The data to convert - * @since 1.4 - */ - public static String encodeBytes( byte[] source ) - { - return encodeBytes( source, 0, source.length ); - } // end encodeBytes - - - /** - * Encodes a byte array into Base64 notation. - * - * @param source The data to convert - * @param off Offset in array where conversion should begin - * @param len Length of data to convert - * @since 1.4 - */ - public static String encodeBytes( byte[] source, int off, int len ) - { - int len43 = len * 4 / 3; - byte[] outBuff = new byte[( len43 ) // Main 4:3 - + ( ( len % 3 ) > 0 ? 4 : 0 ) // Account for padding - + ( len43 / MAX_LINE_LENGTH )]; // New lines - int d = 0; - int e = 0; - int len2 = len - 2; - int lineLength = 0; - for ( ; d < len2; d += 3, e += 4 ) - { - encode3to4( source, d, 3, outBuff, e ); - - lineLength += 4; - if ( lineLength == MAX_LINE_LENGTH ) - { - outBuff[e + 4] = NEW_LINE; - e++; - lineLength = 0; - } // end if: end of line - } // en dfor: each piece of array - - if ( d < len ) - { - encode3to4( source, d, len - d, outBuff, e ); - e += 4; - } // end if: some padding needed - - return new String( outBuff, 0, e ); - } // end encodeBytes - - - /** - * Encodes a string in Base64 notation with line breaks - * after every 75 Base64 characters. - * - * @param s the string to encode - * @return the encoded string - * @since 1.3 - */ - public static String encodeString( String s ) - { - return encodeBytes( s.getBytes() ); - } // end encodeString - - - - -/* ******** D E C O D I N G M E T H O D S ******** */ - - - /** - * Decodes the first four bytes of array fourBytes - * and returns an array up to three bytes long with the - * decoded values. - * - * @param fourBytes the array with Base64 content - * @return array with decoded values - * @since 1.3 - */ - private static byte[] decode4to3( byte[] fourBytes ) - { - byte[] outBuff1 = new byte[3]; - int count = decode4to3( fourBytes, 0, outBuff1, 0 ); - byte[] outBuff2 = new byte[count]; - - for ( int i = 0; i < count; i++ ) - outBuff2[i] = outBuff1[i]; - - return outBuff2; - } - - - /** - * Decodes four bytes from array source - * and writes the resulting bytes (up to three of them) - * to destination. - * The source and destination arrays can be manipulated - * anywhere along their length by specifying - * srcOffset and destOffset. - * This method does not check to make sure your arrays - * are large enough to accomodate srcOffset + 4 for - * the source array or destOffset + 3 for - * the destination array. - * This method returns the actual number of bytes that - * were converted from the Base64 encoding. - * - * - * @param source the array to convert - * @param srcOffset the index where conversion begins - * @param destination the array to hold the conversion - * @param destOffset the index where output will be put - * @return the number of decoded bytes converted - * @since 1.3 - */ - private static int decode4to3( byte[] source, int srcOffset, byte[] destination, int destOffset ) - { - // Example: Dk== - if ( source[srcOffset + 2] == EQUALS_SIGN ) - { - int outBuff = ( ( DECODABET[source[srcOffset]] << 24 ) >>> 6 ) - | ( ( DECODABET[source[srcOffset + 1]] << 24 ) >>> 12 ); - - destination[destOffset] = (byte) ( outBuff >>> 16 ); - return 1; - } - - // Example: DkL= - else if ( source[srcOffset + 3] == EQUALS_SIGN ) - { - int outBuff = ( ( DECODABET[source[srcOffset]] << 24 ) >>> 6 ) - | ( ( DECODABET[source[srcOffset + 1]] << 24 ) >>> 12 ) - | ( ( DECODABET[source[srcOffset + 2]] << 24 ) >>> 18 ); - - destination[destOffset] = (byte) ( outBuff >>> 16 ); - destination[destOffset + 1] = (byte) ( outBuff >>> 8 ); - return 2; - } - - // Example: DkLE - else - { - int outBuff = ( ( DECODABET[source[srcOffset]] << 24 ) >>> 6 ) - | ( ( DECODABET[source[srcOffset + 1]] << 24 ) >>> 12 ) - | ( ( DECODABET[source[srcOffset + 2]] << 24 ) >>> 18 ) - | ( ( DECODABET[source[srcOffset + 3]] << 24 ) >>> 24 ); - - destination[destOffset] = (byte) ( outBuff >> 16 ); - destination[destOffset + 1] = (byte) ( outBuff >> 8 ); - destination[destOffset + 2] = (byte) ( outBuff ); - return 3; - } - } // end decodeToBytes - - - /** - * Decodes data from Base64 notation. - * - * @param s the string to decode - * @return the decoded data - * @since 1.4 - */ - public static byte[] decode( String s ) - { - byte[] bytes = s.getBytes(); - return decode( bytes, 0, bytes.length ); - } // end decode - - - /** - * Decodes data from Base64 notation and - * returns it as a string. - * Equivlaent to calling - * new String( decode( s ) ) - * - * @param s the strind to decode - * @return The data as a string - * @since 1.4 - */ - public static String decodeToString( String s ) - { - return new String( decode( s ) ); - } // end decodeToString - - - /** - * Attempts to decode Base64 data and deserialize a Java - * Object within. Returns null if there was an error. - * - * @param encodedObject The Base64 data to decode - * @return The decoded and deserialized object - * @since 1.4 - */ - public static Object decodeToObject( String encodedObject ) - { - byte[] objBytes = decode( encodedObject ); - - java.io.ByteArrayInputStream bais = null; - java.io.ObjectInputStream ois = null; - - try - { - bais = new java.io.ByteArrayInputStream( objBytes ); - ois = new java.io.ObjectInputStream( bais ); - - return ois.readObject(); - } // end try - catch ( java.io.IOException e ) - { - e.printStackTrace(); - return null; - } // end catch - catch ( java.lang.ClassNotFoundException e ) - { - e.printStackTrace(); - return null; - } // end catch - finally - { - try - { - bais.close(); - } - catch ( Exception e ) - { - } - try - { - ois.close(); - } - catch ( Exception e ) - { - } - } // end finally - } // end decodeObject - - - /** - * Decodes Base64 content in byte array format and returns - * the decoded byte array. - * - * @param source The Base64 encoded data - * @param off The offset of where to begin decoding - * @param len The length of characters to decode - * @return decoded data - * @since 1.3 - */ - public static byte[] decode( byte[] source, int off, int len ) - { - int len34 = len * 3 / 4; - byte[] outBuff = new byte[len34]; // Upper limit on size of output - int outBuffPosn = 0; - - byte[] b4 = new byte[4]; - int b4Posn = 0; - int i = 0; - byte sbiCrop = 0; - byte sbiDecode = 0; - for ( i = 0; i < len; i++ ) - { - sbiCrop = (byte) ( source[i] & 0x7f ); // Only the low seven bits - sbiDecode = DECODABET[sbiCrop]; - - if ( sbiDecode >= WHITE_SPACE_ENC ) // White space, Equals sign or better - { - if ( sbiDecode >= EQUALS_SIGN_ENC ) - { - b4[b4Posn++] = sbiCrop; - if ( b4Posn > 3 ) - { - outBuffPosn += decode4to3( b4, 0, outBuff, outBuffPosn ); - b4Posn = 0; - - // If that was the equals sign, break out of 'for' loop - if ( sbiCrop == EQUALS_SIGN ) - break; - } // end if: quartet built - - } // end if: equals sign or better - - } // end if: white space, equals sign or better - else - { - System.err.println( "Bad Base64 input character at " + i + ": " + source[i] + "(decimal)" ); - return null; - } // end else: - } // each input character - - byte[] out = new byte[outBuffPosn]; - System.arraycopy( outBuff, 0, out, 0, outBuffPosn ); - return out; - } // end decode - - - - - /* ******** I N N E R C L A S S I N P U T S T R E A M ******** */ - - - - /** - * A {@link Base64.InputStream} will read data from another - * {@link java.io.InputStream}, given in the constructor, - * and encode/decode to/from Base64 notation on the fly. - * - * @see Base64 - * @see java.io.FilterInputStream - * @since 1.3 - */ - public static class InputStream extends java.io.FilterInputStream - { - private boolean encode; // Encoding or decoding - private int position; // Current position in the buffer - private byte[] buffer; // Small buffer holding converted data - private int bufferLength; // Length of buffer (3 or 4) - private int numSigBytes; // Number of meaningful bytes in the buffer - - - /** - * Constructs a {@link Base64.InputStream} in DECODE mode. - * - * @param in the {@link java.io.InputStream} from which to read data. - * @since 1.3 - */ - public InputStream( java.io.InputStream in ) - { - this( in, Base64.DECODE ); - } // end constructor - - - /** - * Constructs a {@link Base64.InputStream} in - * either ENCODE or DECODE mode. - * - * @param in the {@link java.io.InputStream} from which to read data. - * @param encode Conversion direction - * @see Base64#ENCODE - * @see Base64#DECODE - * @since 1.3 - */ - public InputStream( java.io.InputStream in, boolean encode ) - { - super( in ); - this.encode = encode; - this.bufferLength = encode ? 4 : 3; - this.buffer = new byte[bufferLength]; - this.position = -1; - } // end constructor - - /** - * Reads enough of the input stream to convert - * to/from Base64 and returns the next byte. - * - * @return next byte - * @since 1.3 - */ - public int read() throws java.io.IOException - { - // Do we need to get data? - if ( position < 0 ) - { - if ( encode ) - { - byte[] b3 = new byte[3]; - numSigBytes = 0; - for ( int i = 0; i < 3; i++ ) - { - try - { - int b = in.read(); - - // If end of stream, b is -1. - if ( b >= 0 ) - { - b3[i] = (byte) b; - numSigBytes++; - } // end if: not end of stream - - } // end try: read - catch ( java.io.IOException e ) - { - // Only a problem if we got no data at all. - if ( i == 0 ) - throw e; - - } // end catch - } // end for: each needed input byte - - if ( numSigBytes > 0 ) - { - encode3to4( b3, 0, numSigBytes, buffer, 0 ); - position = 0; - } // end if: got data - } // end if: encoding - - // Else decoding - else - { - byte[] b4 = new byte[4]; - int i = 0; - for ( i = 0; i < 4; i++ ) - { - int b = 0; - do - { - b = in.read(); - } - while ( b >= 0 && DECODABET[b & 0x7f] < WHITE_SPACE_ENC ); - - if ( b < 0 ) - break; // Reads a -1 if end of stream - - b4[i] = (byte) b; - } // end for: each needed input byte - - if ( i == 4 ) - { - numSigBytes = decode4to3( b4, 0, buffer, 0 ); - position = 0; - } // end if: got four characters - - } // end else: decode - } // end else: get data - - // Got data? - if ( position >= 0 ) - { - // End of relevant data? - if ( position >= numSigBytes ) - return -1; - - int b = buffer[position++]; - - if ( position >= bufferLength ) - position = -1; - - return b; - } // end if: position >= 0 - - // Else error - else - return -1; - } // end read - - - /** - * Calls {@link #read} repeatedly until the end of stream - * is reached or len bytes are read. - * Returns number of bytes read into array or -1 if - * end of stream is encountered. - * - * @param dest array to hold values - * @param off offset for array - * @param len max number of bytes to read into array - * @return bytes read into array or -1 if end of stream is encountered. - * @since 1.3 - */ - public int read( byte[] dest, int off, int len ) throws java.io.IOException - { - int i; - int b; - for ( i = 0; i < len; i++ ) - { - b = read(); - - if ( b < 0 ) - return -1; - - dest[off + i] = (byte) b; - } // end for: each byte read - return i; - } // end read - - } // end inner class InputStream - - - - - - - /* ******** I N N E R C L A S S O U T P U T S T R E A M ******** */ - - - - /** - * A {@link Base64.OutputStream} will write data to another - * {@link java.io.OutputStream}, given in the constructor, - * and encode/decode to/from Base64 notation on the fly. - * - * @see Base64 - * @see java.io.FilterOutputStream - * @since 1.3 - */ - public static class OutputStream extends java.io.FilterOutputStream - { - private boolean encode; - private int position; - private byte[] buffer; - private int bufferLength; - private int lineLength; - - - /** - * Constructs a {@link Base64.OutputStream} in ENCODE mode. - * - * @param out the {@link java.io.OutputStream} to which data will be written. - * @since 1.3 - */ - public OutputStream( java.io.OutputStream out ) - { - this( out, Base64.ENCODE ); - } // end constructor - - - /** - * Constructs a {@link Base64.OutputStream} in - * either ENCODE or DECODE mode. - * - * @param out the {@link java.io.OutputStream} to which data will be written. - * @param encode Conversion direction - * @see Base64#ENCODE - * @see Base64#DECODE - * @since 1.3 - */ - public OutputStream( java.io.OutputStream out, boolean encode ) - { - super( out ); - this.encode = encode; - this.bufferLength = encode ? 3 : 4; - this.buffer = new byte[bufferLength]; - this.position = 0; - this.lineLength = 0; - } // end constructor - - - /** - * Writes the byte to the output stream after - * converting to/from Base64 notation. - * When encoding, bytes are buffered three - * at a time before the output stream actually - * gets a write() call. - * When decoding, bytes are buffered four - * at a time. - * - * @param theByte the byte to write - * @since 1.3 - */ - public void write( int theByte ) throws java.io.IOException - { - buffer[position++] = (byte) theByte; - if ( position >= bufferLength ) - { - if ( encode ) - { - out.write( Base64.encode3to4( buffer, bufferLength ) ); - - lineLength += 4; - if ( lineLength >= MAX_LINE_LENGTH ) - { - out.write( NEW_LINE ); - lineLength = 0; - } // end if: end o fline - } // end if: encoding - else - out.write( Base64.decode4to3( buffer ) ); - - position = 0; - } // end if: convert and flush - } // end write - - - /** - * Calls {@link #write} repeatedly until len - * bytes are written. - * - * @param theBytes array from which to read bytes - * @param off offset for array - * @param len max number of bytes to read into array - * @since 1.3 - */ - public void write( byte[] theBytes, int off, int len ) throws java.io.IOException - { - for ( int i = 0; i < len; i++ ) - { - write( theBytes[off + i] ); - } // end for: each byte written - - } // end write - - - /** - * Appropriately pads Base64 notation when encoding - * or throws an exception if Base64 input is not - * properly padded when decoding. - * - * @since 1.3 - */ - public void flush() throws java.io.IOException - { - if ( position > 0 ) - { - if ( encode ) - { - out.write( Base64.encode3to4( buffer, position ) ); - } // end if: encoding - else - { - throw new java.io.IOException( "Base64 input not properly padded." ); - } // end else: decoding - } // end if: buffer partially full - - super.flush(); - out.flush(); - } // end flush - - - /** - * Flushes and closes stream. - * - * @since 1.3 - */ - public void close() throws java.io.IOException - { - this.flush(); - - super.close(); - out.close(); - - buffer = null; - out = null; - } // end close - - } // end inner class OutputStream - - -} // end class Base64 diff --git a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/DefaultProcessor.java b/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/DefaultProcessor.java deleted file mode 100644 index a6226c4ff..000000000 --- a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/DefaultProcessor.java +++ /dev/null @@ -1,229 +0,0 @@ -package org.codehaus.plexus.httpd; - -import org.apache.velocity.app.VelocityEngine; -import org.apache.velocity.context.Context; - -import java.io.BufferedInputStream; -import java.io.BufferedOutputStream; -import java.io.BufferedWriter; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStreamWriter; -import java.io.Writer; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; - -public class DefaultProcessor - implements Processor -{ - // I'm emulating mx4j but why is the default page hidden in the processor. jvz. - private String defaultPage = "server"; - - private VelocityEngine velocity; - - private static String root = "org/apache/plexus/manager/adaptor/processor"; - - private Map mimeTypes = new HashMap(); - - // Set the classloader as we need to make this work in plexus correctly. - private ClassLoader targetClassLoader = ClassLoader.getSystemClassLoader(); - - /** Indicated whether the file are read from a file */ - private boolean useJar = true; - - - public DefaultProcessor() - { - mimeTypes.put( ".gif", "image/gif" ); - mimeTypes.put( ".jpg", "image/jpg" ); - mimeTypes.put( ".png", "image/png" ); - mimeTypes.put( ".tif", "image/tiff" ); - mimeTypes.put( ".tiff", "image/tiff" ); - mimeTypes.put( ".html", "text/html" ); - mimeTypes.put( ".htm", "text/html" ); - mimeTypes.put( ".txt", "text/plain" ); - mimeTypes.put( ".xml", "text/xml" ); - mimeTypes.put( ".xsl", "text/xsl" ); - mimeTypes.put( ".css", "text/css" ); - mimeTypes.put( ".js", "text/x-javascript" ); - mimeTypes.put( ".jar", "application/java-archive" ); - - // Velocity engine setup. - velocity = new VelocityEngine(); - - Properties p = new Properties(); - - try - { - p.load( Thread.currentThread() - .getContextClassLoader().getResourceAsStream( root + "/velocity.properties" ) ); - - System.out.println( "properties loaded!" ); - - velocity.init( p ); - } - catch ( Exception e ) - { - e.printStackTrace(); - } - - - } - - public String getName() - { - return "Velocity Processor"; - } - - public void writeResponse( HttpOutputStream out, - HttpInputStream in, - Context context, - String template ) - throws Exception - { - template = root + "/vsl/" + template + ".vsl"; - - Writer w = new BufferedWriter( new OutputStreamWriter( out ) ); - - out.setCode( HttpConstants.STATUS_OKAY ); - out.setHeader( "Content-Type", "text/html" ); - // added some caching attributes to fornce not to cache - out.setHeader( "Cache-Control", "no-cache" ); - out.setHeader( "expires", "now" ); - out.setHeader( "pragma", "no-cache" ); - out.sendHeaders(); - - velocity.mergeTemplate( template, context, w ); - - w.flush(); - //w.close(); - } - - public void writeError( HttpOutputStream out, - HttpInputStream in, - Exception e ) - throws IOException - { - } - - public String preProcess( String path ) - { - if ( path.equals( "/" ) ) - { - path = "/" + defaultPage; - } - - return path; - } - - public String notFoundElement( String path, - HttpOutputStream out, - HttpInputStream in ) - throws IOException, HttpException - { - File file = new File( this.root, path ); - //if ( log.isEnabledFor( Logger.INFO ) ) log.info( "Processing file request " + file ); - String name = file.getName(); - int extensionIndex = name.lastIndexOf( '.' ); - String mime = null; - if ( extensionIndex < 0 ) - { - //log.warn( "Filename has no extensions " + file.toString() ); - mime = "text/plain"; - } - else - { - String extension = name.substring( extensionIndex, name.length() ); - if ( mimeTypes.containsKey( extension ) ) - { - mime = (String) mimeTypes.get( extension ); - } - else - { - //log.warn( "MIME type not found " + extension ); - mime = "text/plain"; - } - } - try - { - //if ( log.isEnabledFor( Logger.DEBUG ) ) log.debug( "Trying to read file " + file ); - BufferedInputStream fileIn = new BufferedInputStream( getInputStream( path ) ); - ByteArrayOutputStream outArray = new ByteArrayOutputStream(); - BufferedOutputStream outBuffer = new BufferedOutputStream( outArray ); - int piece = 0; - while ( ( piece = fileIn.read() ) >= 0 ) - { - outBuffer.write( piece ); - } - outBuffer.flush(); - out.setCode( HttpConstants.STATUS_OKAY ); - out.setHeader( "Content-type", mime ); - out.sendHeaders(); - //if ( log.isEnabledFor( Logger.DEBUG ) ) log.debug( "File output " + mime ); - outArray.writeTo( out ); - fileIn.close(); - } - catch ( Exception e ) - { - //log.warn( "Exception loading file " + file, e ); - throw new HttpException( HttpConstants.STATUS_NOT_FOUND, "file " + file + " not found" ); - } - return null; - } - - protected InputStream getInputStream( String path ) - { - InputStream file = null; - if ( !useJar ) - { - try - { - // load from a dir - file = new FileInputStream( new File( this.root, path ) ); - } - catch ( FileNotFoundException e ) - { - //Logger log = getLogger(); - //log.error( "File not found", e ); - } - } - else - { - // load from a jar - String targetFile = this.root; - // workaround, should tought of somehting better - if ( path.startsWith( "/" ) ) - { - targetFile += path; - } - else - { - targetFile += "/" + path; - } - if ( root != null ) - { - file = targetClassLoader.getResourceAsStream( targetFile ); - } - if ( file == null ) - { - ClassLoader cl = getClass().getClassLoader(); - if ( cl == null ) - { - file = ClassLoader.getSystemClassLoader().getResourceAsStream( targetFile ); - } - else - { - file = getClass().getClassLoader().getResourceAsStream( targetFile ); - } - file = getClass().getClassLoader().getResourceAsStream( targetFile ); - } - } - - return file; - } -} diff --git a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/HttpCommandProcessor.java b/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/HttpCommandProcessor.java deleted file mode 100644 index 2c4c67781..000000000 --- a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/HttpCommandProcessor.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) MX4J. - * All rights reserved. - * - * This software is distributed under the terms of the MX4J License version 1.0. - * See the terms of the MX4J License in the documentation provided with this software. - */ -package org.codehaus.plexus.httpd; - -import java.io.IOException; - -import org.apache.velocity.context.Context; - -/** - * HttpCommandProcessor sets the structure of a command processor - * - * @author Carlos Quiroz - * @version $Revision$ - */ -public interface HttpCommandProcessor -{ - - /** - * Executes an HTTP request. It assumes the request is well formed - * - * @param in Input request - * @return An XML Document - * @exception java.io.IOException - */ - public Context executeRequest( HttpInputStream in ) throws IOException; -} diff --git a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/HttpConstants.java b/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/HttpConstants.java deleted file mode 100644 index 436323f85..000000000 --- a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/HttpConstants.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (C) MX4J. - * All rights reserved. - * - * This software is distributed under the terms of the MX4J License version 1.0. - * See the terms of the MX4J License in the documentation provided with this software. - */ -package org.codehaus.plexus.httpd; - -/** - * Define constants for the HTTP request processing - * - * @author Carlos Quiroz - * @version $Revision$ - */ -public class HttpConstants -{ - /** - * Server info header - */ - public final static String SERVER_INFO = "MX4J-HTTPD/1.0"; - - /** - * HTTP implemented version - */ - public final static String HTTP_VERSION = "HTTP/1.0 "; - - /** - * Get method header - */ - public final static String METHOD_GET = "GET"; - - /** - * Post method header - */ - public final static String METHOD_POST = "POST"; - - /** - * Status code OK - */ - public final static int STATUS_OKAY = 200; - - /** - * Status code NO CONTENT - */ - public final static int STATUS_NO_CONTENT = 204; - - /** - * Status code MOVED PERMANENTLY - */ - public final static int STATUS_MOVED_PERMANENTLY = 301; - - /** - * Status code MOVED TEMPORARILY - */ - public final static int STATUS_MOVED_TEMPORARILY = 302; - - /** - * Status code BAD REQUEST - */ - public final static int STATUS_BAD_REQUEST = 400; - - /** - * Status code AUTHENTICATE - */ - public final static int STATUS_AUTHENTICATE = 401; - - /** - * Status code FORBIDDEN - */ - public final static int STATUS_FORBIDDEN = 403; - - /** - * Status code NOT FOUND - */ - public final static int STATUS_NOT_FOUND = 404; - - /** - * Status code NOT ALLOWED - */ - public final static int STATUS_NOT_ALLOWED = 405; - - /** - * Status code INTERNAL ERROR - */ - public final static int STATUS_INTERNAL_ERROR = 500; - - /** - * Status code NOT IMPLEMENTED - */ - public final static int STATUS_NOT_IMPLEMENTED = 501; - -} diff --git a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/HttpException.java b/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/HttpException.java deleted file mode 100644 index 4aadfce46..000000000 --- a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/HttpException.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) MX4J. - * All rights reserved. - * - * This software is distributed under the terms of the MX4J License version 1.0. - * See the terms of the MX4J License in the documentation provided with this software. - */ -package org.codehaus.plexus.httpd; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import java.io.IOException; - -/** - * HttpException is emitted when an error parsing an HTTP request appears - * - * @author Carlos Quiroz - * @version $Revision$ - */ -public class HttpException extends IOException -{ - /** Error code */ - protected int code; - - /** - * Constructor for the HttpException object - * - * @param code Error code - * @param description Description - */ - public HttpException( int code, String description ) - { - super( description ); - this.code = code; - } - - /** - * Return the exception code - */ - public int getCode() - { - return code; - } - - public Document getResponseDoc() - { - try - { - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - DocumentBuilder builder = factory.newDocumentBuilder(); - Document document = builder.newDocument(); - - Element root = document.createElement( "HttpException" ); - root.setAttribute( "code", Integer.toString( code ) ); - root.setAttribute( "description", getMessage() ); - document.appendChild( root ); - return document; - } - catch ( ParserConfigurationException e ) - { - return null; - } - } -} diff --git a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/HttpInputStream.java b/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/HttpInputStream.java deleted file mode 100644 index efec7fa9b..000000000 --- a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/HttpInputStream.java +++ /dev/null @@ -1,391 +0,0 @@ -/* - * Copyright (C) MX4J. - * All rights reserved. - * - * This software is distributed under the terms of the MX4J License version 1.0. - * See the terms of the MX4J License in the documentation provided with this software. - */ -package org.codehaus.plexus.httpd; - -import java.io.BufferedInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.URLDecoder; -import java.util.HashMap; -import java.util.Map; -import java.util.NoSuchElementException; -import java.util.StringTokenizer; - -/** - * HttpInputStream processes an HTTP request - * - * @author Carlos Quiroz - * @version $Revision$ - */ -public class HttpInputStream extends BufferedInputStream -{ - - /** Http method. only GET, POST implemented */ - private String method; - - /** Path of the request */ - private String path; - - /** Query string */ - private String queryString; - - /** Request version */ - private float version; - - /** Current headers */ - private Map headers = new HashMap(); - - private Map variables = new HashMap(); - - /** - * Constructs a new HttpInputStream - * - * @param in InputStream - */ - public HttpInputStream( InputStream in ) - { - super( in ); - } - - - /** - * Returns the method of the request - * - * @return the method of the request GET/POST - */ - public String getMethod() - { - return method; - } - - - /** - * Returns the path of the request - * - * @return the path of the request - */ - public String getPath() - { - return path; - } - - - /** - * Returns the query string - * - * @return The queryString value - */ - public String getQueryString() - { - return queryString; - } - - - /** - * Returns the version of the request - * - * @return The version value 1.0/1.1 - */ - public float getVersion() - { - return version; - } - - - /** - * Returns a given header by name, assumes lower case - * - * @param name Name of the header - * @return The header value - */ - public String getHeader( String name ) - { - return (String) headers.get( name ); - } - - /** - * Returns a given header by name, assumes lower case - * - * @return The header value - */ - public Map getHeaders() - { - return headers; - } - - - /** - * Reads the request parsing the headers - * - * @exception IOException Description of Exception - */ - public void readRequest() throws IOException - { - String request = readLine(); - if ( request == null ) - { - throw new HttpException( HttpConstants.STATUS_BAD_REQUEST, "Null query" ); - } - // Parses the request - StringTokenizer parts = new StringTokenizer( request ); - try - { - parseMethod( parts.nextToken() ); - parseRequest( parts.nextToken() ); - } - catch ( NoSuchElementException ex ) - { - throw new HttpException( HttpConstants.STATUS_BAD_REQUEST, request ); - } - if ( parts.hasMoreTokens() ) - { - parseVersion( parts.nextToken() ); - } - else - { - version = 0.9f; - } - if ( version >= 1.0f ) - { - readHeaders(); - parseVariables(); - } - } - - - /** - * Reads an HTTP line - * - * @return A read line - * @exception IOException Emmited in case of errors reading the stream - */ - public String readLine() throws IOException - { - StringBuffer line = new StringBuffer( 64 ); - line.delete( 0, line.length() ); - int c; - while ( ( ( c = read() ) != -1 ) && ( c != '\n' ) && ( c != '\r' ) ) - { - line.append( (char) c ); - } - if ( ( c == '\r' ) && ( ( c = read() ) != '\n' ) && ( c != -1 ) ) - { - --pos; - } - if ( ( c == -1 ) && ( line.length() == 0 ) ) - { - return null; - } - else - { - return line.toString(); - } - } - - /** - * Returns a map with the variables passed in the request. - * - * @return A map containing variables/value pairs. If a variable is - * present only once in the request the value will be a String. - * If it is present many times the variable will be a String[] - */ - public Map getVariables() - { - return variables; - } - - /** - * Returns one variable value. If the variable is present many times, the first - * instance will be returned - * - * @return A String with the variable value - */ - public String getVariable( String name ) - { - if ( variables.containsKey( name ) ) - { - Object variable = variables.get( name ); - if ( variable instanceof String ) - { - return (String) variable; - } - else if ( variable instanceof String[] ) - { - return ( (String[]) variable )[0]; - } - } - return null; - } - - /** - * Returns one variable values. - * - * @return A String array with all variable instances - */ - public String[] getVariableValues( String name ) - { - if ( variables.containsKey( name ) ) - { - Object variable = variables.get( name ); - if ( variable instanceof String[] ) - { - return (String[]) variable; - } - else if ( variable instanceof String ) - { - String[] result = new String[1]; - result[0] = (String) variable; - return result; - } - } - return null; - } - - /** - * Parses the request parameters - */ - protected void parseVariables() throws HttpException - { - try - { - // get request variables - StringTokenizer parser = new StringTokenizer( getQueryString(), "&" ); - while ( parser.hasMoreTokens() ) - { - String command = parser.nextToken(); - int equalIndex = command.indexOf( '=' ); - if ( equalIndex > 0 ) - { - String variableName = URLDecoder.decode( command.substring( 0, equalIndex ) ); - String variableValue = URLDecoder.decode( command.substring( equalIndex + 1, command.length() ) ); - variableValue = new String( variableValue.getBytes(), "UTF-8" ); - if ( variables.get( variableName ) != null ) - { - Object value = variables.get( variableName ); - String[] newValue = null; - if ( value instanceof String ) - { - newValue = new String[2]; - newValue[0] = variableValue; - newValue[1] = (String) value; - } - else - { - String[] oldValue = (String[]) value; - newValue = new String[oldValue.length + 1]; - System.arraycopy( oldValue, 0, newValue, 1, oldValue.length ); - newValue[0] = variableValue; - } - variables.put( variableName, newValue ); - } - else - { - variables.put( variableName, variableValue ); - } - } - } - } - catch ( Exception e ) - { - throw new HttpException( HttpConstants.STATUS_BAD_REQUEST, getQueryString() ); - } - } - - - /** - * Parses the connection method. GET/POST are allowed - * - * @param method Description of Parameter - * @exception HttpException Description of Exception - */ - protected void parseMethod( String method ) throws HttpException - { - if ( method.equals( HttpConstants.METHOD_GET ) ) - { - this.method = HttpConstants.METHOD_GET; - } - else if ( method.equals( HttpConstants.METHOD_POST ) ) - { - this.method = HttpConstants.METHOD_POST; - } - else - { - throw new HttpException( HttpConstants.STATUS_NOT_IMPLEMENTED, method ); - } - } - - - /** - * Parses the request - * - * @param request Request string - * @exception HttpException Thrown if an error ocurr - */ - protected void parseRequest( String request ) throws HttpException - { - if ( !request.startsWith( "/" ) ) - { - throw new HttpException( HttpConstants.STATUS_BAD_REQUEST, request ); - } - int queryIdx = request.indexOf( '?' ); - if ( queryIdx == -1 ) - { - path = HttpUtil.canonicalizePath( request ); - queryString = ""; - } - else - { - path = HttpUtil.canonicalizePath( request.substring( 0, queryIdx ) ); - queryString = request.substring( queryIdx + 1 ); - } - } - - - /** - * Parses the request HttpConstants version - * - * @param verStr String containing the HTTP version - * @exception HttpException - */ - protected void parseVersion( String verStr ) throws HttpException - { - if ( !verStr.startsWith( "HTTP/" ) ) - { - throw new HttpException( HttpConstants.STATUS_BAD_REQUEST, verStr ); - } - try - { - version = Float.valueOf( verStr.substring( 5 ) ).floatValue(); - } - catch ( NumberFormatException ex ) - { - throw new HttpException( HttpConstants.STATUS_BAD_REQUEST, verStr ); - } - } - - - /** - * Reads the headers - * - * @exception IOException - */ - protected void readHeaders() throws IOException - { - String header; - while ( ( ( header = readLine() ) != null ) && !header.equals( "" ) ) - { - int colonIdx = header.indexOf( ':' ); - if ( colonIdx != -1 ) - { - String name = header.substring( 0, colonIdx ); - String value = header.substring( colonIdx + 1 ); - headers.put( name.toLowerCase(), value.trim() ); - } - } - } -} diff --git a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/HttpOutputStream.java b/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/HttpOutputStream.java deleted file mode 100644 index fc25d6bec..000000000 --- a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/HttpOutputStream.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (C) MX4J. - * All rights reserved. - * - * This software is distributed under the terms of the MX4J License version 1.0. - * See the terms of the MX4J License in the documentation provided with this software. - */ -package org.codehaus.plexus.httpd; - -import java.io.BufferedOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -/** - * HttpAdaptor sets the basic adaptor listening for HTTP requests - * - * @author Carlos Quiroz - * @version $Revision$ - */ -public class HttpOutputStream - extends BufferedOutputStream -{ - /** Answer code */ - protected int code; - - /** whether to send the headers*/ - protected boolean sendHeaders; - - /** Headers to be sent */ - protected Map headers = new HashMap( 7 ); - - - /** - * Creates a new HttpOutputStream with a given OutputStream and an InputStream - * - * @param out The OutputStream normally associated with the output socket - * stream of the incoming connection - * @param in HttpInputStream containing the incoming request - */ - public HttpOutputStream( OutputStream out, HttpInputStream in ) - { - super( out ); - code = HttpConstants.STATUS_OKAY; - setHeader( "Server", HttpConstants.SERVER_INFO ); - sendHeaders = ( in.getVersion() >= 1.0 ); - } - - - /** - * Sets the answer code - * - * @param code The new code value - */ - public void setCode( int code ) - { - this.code = code; - } - - - /** - * Sets a given header code - * - * @param attr The new header name - * @param value The new header value - */ - public void setHeader( String attr, String value ) - { - headers.put( attr, value ); - } - - - /** - * Sends the headers - * - * @return Description of the Returned Value - * @exception IOException Description of Exception - */ - public boolean sendHeaders() throws IOException - { - if ( sendHeaders ) - { - StringBuffer buffer = new StringBuffer( 512 ); - buffer.append( HttpConstants.HTTP_VERSION ); - buffer.append( code ); - buffer.append( " " ); - buffer.append( HttpUtil.getCodeMessage( code ) ); - buffer.append( "\r\n" ); - Iterator attrs = headers.keySet().iterator(); - int size = headers.size(); - - for ( int i = 0; i < size; i++ ) - { - String attr = (String) attrs.next(); - buffer.append( attr ); - buffer.append( ": " ); - buffer.append( headers.get( attr ) ); - buffer.append( "\r\n" ); - } - buffer.append( "\n" ); - write( buffer.toString() ); - } - return sendHeaders; - } - - - /** - * Writes a given message line - * - * @param msg The message to be written - * @exception IOException - */ - public void write( String msg ) throws IOException - { - write( msg.getBytes( "latin1" ) ); - } - - - /** - * Writes the content of the input stream to the output stream - * - * @param in The input stream - * @exception IOException - */ - public void write( InputStream in ) throws IOException - { - int n; - int length = buf.length; - while ( ( n = in.read( buf, count, length - count ) ) >= 0 ) - { - if ( ( count += n ) >= length ) - { - out.write( buf, count = 0, length ); - } - } - } -} diff --git a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/HttpUtil.java b/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/HttpUtil.java deleted file mode 100644 index 5e9f3ced9..000000000 --- a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/HttpUtil.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (C) MX4J. - * All rights reserved. - * - * This software is distributed under the terms of the MX4J License version 1.0. - * See the terms of the MX4J License in the documentation provided with this software. - */ -package org.codehaus.plexus.httpd; - -/** - * Utility methods for the HTTP adaptor - * - * @author Carlos Quiroz - * @version $Revision$ - */ -public class HttpUtil -{ - - /** - * Gets a message apropriate for a give HTTP code - * - * @param code Reference Code - * @return The result message - * @see HttpConstants - */ - public static String getCodeMessage( int code ) - { - switch ( code ) - { - case HttpConstants.STATUS_OKAY: - return "OK"; - case HttpConstants.STATUS_NO_CONTENT: - return "No Content"; - case HttpConstants.STATUS_MOVED_PERMANENTLY: - return "Moved Permanently"; - case HttpConstants.STATUS_MOVED_TEMPORARILY: - return "Moved Temporarily"; - case HttpConstants.STATUS_BAD_REQUEST: - return "Bad Request"; - case HttpConstants.STATUS_FORBIDDEN: - return "Forbidden"; - case HttpConstants.STATUS_NOT_FOUND: - return "Not Found"; - case HttpConstants.STATUS_NOT_ALLOWED: - return "Method Not Allowed"; - case HttpConstants.STATUS_INTERNAL_ERROR: - return "Internal Server Error"; - case HttpConstants.STATUS_AUTHENTICATE: - return "Authentication requested"; - case HttpConstants.STATUS_NOT_IMPLEMENTED: - return "Not Implemented"; - default: - return "Unknown Code (" + code + ")"; - } - } - - - /** - * Makes a path canonical - * - * @param path Target path - * @return The canonicalized path - */ - public static String canonicalizePath( String path ) - { - char[] chars = path.toCharArray(); - int length = chars.length; - int idx; - int odx = 0; - while ( ( idx = indexOf( chars, length, '/', odx ) ) < length - 1 ) - { - int ndx = indexOf( chars, length, '/', idx + 1 ); - int kill = -1; - if ( ndx == idx + 1 ) - { - kill = 1; - } - else if ( ( ndx >= idx + 2 ) && ( chars[idx + 1] == '.' ) ) - { - if ( ndx == idx + 2 ) - { - kill = 2; - } - else if ( ( ndx == idx + 3 ) && ( chars[idx + 2] == '.' ) ) - { - kill = 3; - while ( ( idx > 0 ) && ( chars[--idx] != '/' ) ) - { - ++kill; - } - } - } - if ( kill == -1 ) - { - odx = ndx; - } - else if ( idx + kill >= length ) - { - length = odx = idx + 1; - } - else - { - length -= kill; - System.arraycopy( chars, idx + 1 + kill, - chars, idx + 1, length - idx - 1 ); - odx = idx; - } - } - return new String( chars, 0, length ); - } - - - protected static int indexOf( char[] chars, int length, char chr, int from ) - { - while ( ( from < length ) && ( chars[from] != chr ) ) - { - ++from; - } - return from; - } - - /** - * Returns whether a boolean variable is in the variables. It tries to find - * it. If not found the the default is used. If found is tested to check if - * it is true or 1 and the answer is true. - * Otherwise is false - */ - public static boolean booleanVariableValue( HttpInputStream in, String variable, boolean defaultValue ) - { - if ( in.getVariables().containsKey( variable ) ) - { - String result = (String) in.getVariables().get( variable ); - return result.equals( "true" ) || result.equals( "1" ); - } - return defaultValue; - } -} diff --git a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/Httpd.java b/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/Httpd.java deleted file mode 100644 index 38dccdf56..000000000 --- a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/Httpd.java +++ /dev/null @@ -1,725 +0,0 @@ -/* - * Copyright (C) MX4J. - * All rights reserved. - * - * This software is distributed under the terms of the MX4J License version 1.0. - * See the terms of the MX4J License in the documentation provided with this software. - */ -package org.codehaus.plexus.httpd; - -import java.io.IOException; -import java.io.InputStream; -import java.io.InterruptedIOException; -import java.io.OutputStream; -import java.net.ServerSocket; -import java.net.Socket; -import java.util.Date; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.StringTokenizer; - -import org.apache.velocity.context.Context; - -import org.codehaus.plexus.logging.AbstractLogEnabled; - -/** - * HttpAdaptor sets the basic adaptor listening for HTTP requests - * - * @author Carlos Quiroz - * @version $Revision$ - */ -public class Httpd - extends AbstractLogEnabled -{ - private static final String VERSION = "1.1.1"; - - /** Port to listen for connections */ - private int port = 8080; - - /** Host where to set the server socket */ - private String host = "localhost"; - - /** Server socket */ - private ServerSocket serverSocket; - - /** Indicates whether the server is running */ - private boolean alive; - - /** Map of commands indexed by the request path */ - private Map commands = new HashMap(); - - private String authenticationMethod = "none"; - - // Should be dependant on the server? - private String realm = "MX4J"; - - private Map authorizations = new HashMap(); - - private AdaptorServerSocketFactory socketFactory = null; - - private String processorClass; - - private Date startDate; - - private long requestsCount; - - private Processor defaultProcessor; - - private String[][] defaultCommandProcessors = { - {"server", "org.apache.plexus.manager.adaptor.processor.ServerCommandProcessor"}, - {"mbean", "org.apache.plexus.manager.adaptor.processor.MBeanCommandProcessor"}, - }; - - /** - * Default Constructor added so that we can have some additional - * constructors as well. - */ - public Httpd() - { - } - - /** - * Overloaded constructor to allow the port to be set. - * The reason this was added was to allow the loading of this adaptor by - * the dynamic loading service of the MBean server and have the port set - * from a param in the mlet file. Example: (replaced lt & gt symbol with []) - *
[mlet code="org.apache.plexus.manager.HttpAdaptor" - *
archive="mx4j.jar" - *
name="Server:name=HttpAdaptor"] - *
[arg type="int" value="12345"] - *
[/mlet] - * - *

This constructor uses the default host or the host must be set later. - * @param port The port on which the HttpAdaptor should listen - */ - public Httpd( int port ) - { - this.port = port; - } - - - /** - * Overloaded constructor to allow the host to be set. - * The reason this was added was to allow the loading of this adaptor by - * the dynamic loading service of the MBean server and have the host set - * from a param in the mlet file. Example: (replaced lt & gt symbol with []) - *
[mlet code="org.apache.plexus.manager.HttpAdaptor" - *
archive="mx4j.jar" - *
name="Server:name=HttpAdaptor"] - *
[arg type="java.lang.String" value="someserver.somehost.com"] - *
[/mlet] - * - *

This constructor uses the default port or the port must be set later. - * @param host The host on which the HttpAdaptor should listen - */ - public Httpd( String host ) - { - this.host = host; - } - - - /** - * Overloaded constructor to allow the port to be set. - * The reason this was added was to allow the loading of this adaptor by - * the dynamic loading service of the MBean server and have the port set - * from a param in the mlet file. Example: (replaced lt & gt symbol with []) - * NOTE that the port must come before the host in the arg list of the mlet - *
[mlet code="org.apache.plexus.manager.HttpAdaptor" - *
archive="mx4j.jar" - *
name="Server:name=HttpAdaptor"] - *
[arg type="int" value="12345"] - *
[arg type="java.lang.String" value="someserver.somehost.com"] - *
[/mlet] - * - * @param port The port on which the HttpAdaptor should listen - * @param host The host on which the HttpAdaptor should listen - */ - public Httpd( int port, String host ) - { - this.port = port; - this.host = host; - } - - /** - * Sets the value of the server's port - * - * @param port the new port's value - */ - public void setPort( int port ) - { - if ( alive ) - { - throw new IllegalArgumentException( "Not possible to change port with the server running" ); - } - this.port = port; - } - - - /** - * Returns the port where the server is running on. Default is 8080 - * - * @return HTTPServer's port - */ - public int getPort() - { - return port; - } - - - /** - * Sets the host name where the server will be listening - * - * @param host Server's host - */ - public void setHost( String host ) - { - if ( alive ) - { - throw new IllegalArgumentException( "Not possible to change port with the server running" ); - } - this.host = host; - } - - - /** - * Return the host name the server will be listening to. If null the server - * listen at the localhost - * - * @return the current hostname - */ - public String getHost() - { - return host; - } - - - /** - * Sets the Authentication Method. - * - * @param method none/basic/digest - */ - public void setAuthenticationMethod( String method ) - { - if ( alive ) - { - throw new IllegalArgumentException( "Not possible to change authentication method with the server running" ); - } - if ( method == null - || - !( method.equals( "none" ) - || method.equals( "basic" ) - || method.equals( "digest" ) ) ) - { - throw new IllegalArgumentException( "Only accept methods none/basic/digest" ); - } - this.authenticationMethod = method; - } - - - /** - * Authentication Method - * - * @return authentication method - */ - public String getAuthenticationMethod() - { - return authenticationMethod; - } - - - /** - * Sets the object which create the server sockets - * - * @param factory the socket factory - */ - public void setSocketFactory( AdaptorServerSocketFactory factory ) - { - this.socketFactory = factory; - } - - - /** - * Indicates whether the server's running - * - * @return The active value - */ - public boolean isActive() - { - return alive; - } - - - /** - * Starting date - * - * @return The date when the server was started - */ - public Date getStartDate() - { - return startDate; - } - - - /** - * Requests count - * - * @return The total of requests served so far - */ - public long getRequestsCount() - { - return requestsCount; - } - - - /** - * Gets the HttpAdaptor version - * - * @return HttpAdaptor's version - */ - public String getVersion() - { - return VERSION; - } - - - /** - * Adds a command processor object - */ - public void addCommandProcessor( String path, HttpCommandProcessor processor ) - { - commands.put( path, processor ); - - if ( alive ) - { - } - } - - - /** - * Adds a command processor object by class - */ - public void addCommandProcessor( String path, String processorClass ) - { - try - { - HttpCommandProcessor processor = (HttpCommandProcessor) Class.forName( processorClass ).newInstance(); - addCommandProcessor( path, processor ); - } - catch ( Exception e ) - { - getLogger().error( "Exception creating Command Processor of class " + processorClass, e ); - } - } - - - /** - * Removes a command processor object by class - * - */ - public void removeCommandProcessor( String path ) - { - if ( commands.containsKey( path ) ) - { - commands.remove( path ); - } - } - - - /** - * Starts the server - */ - public void start() - throws IOException - { - serverSocket = createServerSocket(); - - if ( serverSocket == null ) - { - getLogger().error( "Server socket is null" ); - return; - } - - if ( processorClass != null ) - { - // We need to created the processor - } - - Iterator i = commands.values().iterator(); - while ( i.hasNext() ) - { - HttpCommandProcessor processor = (HttpCommandProcessor) i.next(); - } - - getLogger().info( "HttpAdaptor server listening on port " + port ); - alive = true; - Thread serverThread = new Thread( - new Runnable() - { - public void run() - { - getLogger().info( "HttpAdaptor version " + VERSION + " started" ); - - startDate = new Date(); - requestsCount = 0; - - while ( alive ) - { - try - { - Socket client = null; - client = serverSocket.accept(); - if ( !alive ) - { - break; - } - requestsCount++; - new HttpClient( client ).start(); - } - catch ( InterruptedIOException e ) - { - continue; - } - catch ( IOException e ) - { - continue; - } - catch ( Exception e ) - { - getLogger().warn( "Exception during request processing", e ); - continue; - } - catch ( Error e ) - { - getLogger().error( "Error during request processing", e ); - continue; - } - } - try - { - serverSocket.close(); - } - catch ( IOException e ) - { - getLogger().warn( "Exception closing the server", e ); - } - serverSocket = null; - alive = false; - - getLogger().info( "Server stopped" ); - } - } ); - serverThread.start(); - } - - - /** - * Restarts the server. Useful when changing the Server parameters - * - * @deprecated as of RC 1 - */ - public void restart() - throws IOException - { - stop(); - start(); - } - - - /** - * Stops the HTTP daemon - */ - public void stop() - { - try - { - if ( alive ) - { - alive = false; - // force the close with a socket call - new Socket( host, port ); - if ( serverSocket != null ) - { - serverSocket.close(); - } - } - } - catch ( Exception e ) - { - e.printStackTrace(); - } - } - - - /** - * Adds an authorization pair as username/password - */ - public void addAuthorization( String username, String password ) - { - if ( username == null || password == null ) - { - throw new IllegalArgumentException( "username and passwords cannot be null" ); - } - authorizations.put( username, password ); - } - - - public void postRegister( Boolean registrationDone ) - { - } - - - public void preDeregister() - throws java.lang.Exception - { - // stop the server - stop(); - } - - - public void postDeregister() - { - } - - private ServerSocket createServerSocket() throws IOException - { - if ( socketFactory == null ) - { - } - else - { - } - - return null; - } - - - private boolean isUsernameValid( String username, String password ) - { - if ( authorizations.containsKey( username ) ) - { - return password.equals( authorizations.get( username ) ); - } - return false; - } - - - protected HttpCommandProcessor getProcessor( String path ) - { - return (HttpCommandProcessor) commands.get( path ); - } - - - /** - * Build the commands - */ - protected void buildCommands() - { - for ( int i = 0; i < defaultCommandProcessors.length; i++ ) - { - try - { - HttpCommandProcessor processor = - (HttpCommandProcessor) Class.forName( defaultCommandProcessors[i][1] ).newInstance(); - commands.put( defaultCommandProcessors[i][0], processor ); - } - catch ( Exception e ) - { - getLogger().warn( "Exception building command procesor", e ); - } - } - } - - - protected void postProcess( HttpOutputStream out, - HttpInputStream in, - Context context, - String template ) - throws IOException, Exception - { - defaultProcessor.writeResponse( out, in, context, template ); - } - - - protected void findUnknownElement( String path, HttpOutputStream out, HttpInputStream in ) - throws IOException - { - defaultProcessor.notFoundElement( path, out, in ); - } - - - protected String preProcess( String path ) - throws IOException - { - return defaultProcessor.preProcess( path ); - } - - protected void postProcess( HttpOutputStream out, HttpInputStream in, Exception e ) - throws IOException - { - defaultProcessor.writeError( out, in, e ); - } - - - private class HttpClient extends Thread - { - private Socket client; - - - HttpClient( Socket client ) - { - this.client = client; - } - - public boolean isValid( String authorizationString ) - { - if ( authenticationMethod.startsWith( "basic" ) ) - { - authorizationString = authorizationString.substring( 5, authorizationString.length() ); - String decodeString = Base64.decodeToString( authorizationString ); - if ( decodeString.indexOf( ":" ) > 0 ) - { - try - { - StringTokenizer tokens = new StringTokenizer( decodeString, ":" ); - String username = tokens.nextToken(); - String password = tokens.nextToken(); - return isUsernameValid( username, password ); - } - catch ( Exception e ) - { - return false; - } - } - } - return false; - } - - - private boolean handleAuthentication( HttpInputStream in, - HttpOutputStream out ) - throws IOException - { - if ( authenticationMethod.equals( "basic" ) ) - { - String result = in.getHeader( "authorization" ); - if ( result != null ) - { - if ( isValid( result ) ) - { - return true; - } - throw new HttpException( HttpConstants.STATUS_FORBIDDEN, "Authentication failed" ); - } - - out.setCode( HttpConstants.STATUS_AUTHENTICATE ); - out.setHeader( "WWW-Authenticate", "Basic realm=\"" + realm + "\"" ); - out.sendHeaders(); - out.flush(); - return false; - } - if ( authenticationMethod.equals( "digest" ) ) - { - // not implemented - } - return true; - } - - - public void run() - { - HttpInputStream httpIn = null; - HttpOutputStream httpOut = null; - try - { - // get input streams - InputStream in = client.getInputStream(); - httpIn = new HttpInputStream( in ); - httpIn.readRequest(); - - // Find a suitable command processor - String path = httpIn.getPath(); - String queryString = httpIn.getQueryString(); - getLogger().info( "Request " + path + ( ( queryString == null ) ? "" : ( "?" + queryString ) ) ); - String postPath = preProcess( path ); - - if ( !postPath.equals( path ) ) - { - getLogger().info( "Processor replaced path " + path + " with the path " + postPath ); - path = postPath; - } - - OutputStream out = client.getOutputStream(); - httpOut = new HttpOutputStream( out, httpIn ); - - if ( !handleAuthentication( httpIn, httpOut ) ) - { - return; - } - - String command = path.substring( 1, path.length() ); - HttpCommandProcessor processor = getProcessor( command ); - - if ( processor == null ) - { - getLogger().info( "No suitable command processor found, requesting from processor path " + path ); - findUnknownElement( path, httpOut, httpIn ); - } - else - { - Context context = processor.executeRequest( httpIn ); - postProcess( httpOut, httpIn, context, command ); - } - } - catch ( Exception ex ) - { - getLogger().warn( "Exception during http request", ex ); - if ( httpOut != null ) - { - try - { - postProcess( httpOut, httpIn, ex ); - } - catch ( IOException e ) - { - getLogger().warn( "IOException during http request", e ); - } - catch ( RuntimeException rte ) - { - getLogger().error( "RuntimeException during http request", rte ); - } - catch ( Error er ) - { - getLogger().error( "Error during http request ", er ); - } - catch ( Throwable t ) - { - getLogger().fatalError( "Throwable during http request ", t ); - } - } - } - catch ( Error ex ) - { - getLogger().error( "Error during http request ", ex ); - } - finally - { - try - { - if ( httpOut != null ) - { - httpOut.flush(); - } - // always close the socket - client.close(); - } - catch ( IOException e ) - { - getLogger().warn( "Exception during request processing", e ); - } - } - } - } - -} - diff --git a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/PlainAdaptorServerSocketFactory.java b/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/PlainAdaptorServerSocketFactory.java deleted file mode 100644 index 80a51651d..000000000 --- a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/PlainAdaptorServerSocketFactory.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) MX4J. - * All rights reserved. - * - * This software is distributed under the terms of the MX4J License version 1.0. - * See the terms of the MX4J License in the documentation provided with this software. - */ - -package org.codehaus.plexus.httpd; - -import java.net.ServerSocket; -import java.net.InetAddress; -import java.io.IOException; - -/** - * Creates plain ServerSockets. - * - * @author Carlos Quiroz - * @author Simone Bordet - * @version $Revision$ - */ -public class PlainAdaptorServerSocketFactory implements AdaptorServerSocketFactory -{ - public ServerSocket createServerSocket(int port, int backlog, String host) throws IOException - { - return new ServerSocket(port, backlog, InetAddress.getByName(host)); - } -} diff --git a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/Processor.java b/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/Processor.java deleted file mode 100644 index fc953f9d9..000000000 --- a/plexus-servers/httpd/src/java/org/codehaus/plexus/httpd/Processor.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) MX4J. - * All rights reserved. - * - * This software is distributed under the terms of the MX4J License version 1.0. - * See the terms of the MX4J License in the documentation provided with this software. - */ -package org.codehaus.plexus.httpd; - -import org.apache.velocity.context.Context; - -import java.io.IOException; - -/** - * Processor ManagementBean, just defines a generic description - * - * @author Carlos Quiroz - * @version $Revision$ - */ -public interface Processor -{ - public String getName(); - - /** - * The method will process the result string and produce an output. The - * implementor is also responsible to set the mime type, response code and - * send the headers before answering as follow: - * - * out.setCode(HttpConstants.STATUS_OKAY); - * out.setHeader("Content-type", "text/html"); - * out.sendHeaders(); - * out.write("some text"); - * - * - * @param out The output stream - * @param in The input stream - * @param context - */ - public void writeResponse( HttpOutputStream out, - HttpInputStream in, - Context context, - String template ) - throws Exception; - - /** - * The method will process the result exception and produce output. The - * implementor is also responsible to set the mime type, response code and - * send the headers before answering as follow: - * - * out.setCode(HttpConstants.STATUS_OKAY); - * out.setHeader("Content-type", "text/html"); - * out.sendHeaders(); - * out.write("some text"); - * - * - * @param out The output stream - * @param in The input stream - * @param e The exception to be reported - */ - public void writeError( HttpOutputStream out, - HttpInputStream in, - Exception e ) - throws IOException; - - /** - * Preprocess a path and return a replacement path. For instance the / path - * could be replaced by the server path - * - * @param path The original path - * @return the replacement path. If not modification the path param should - * be returned - */ - public String preProcess( String path ); - - /** - * Let the processor load internally a not found element. This can be used - * to load images, stylesheets and so on. If return is not null, the path is - * processed - * - * @param path The request element - * @param out The output stream - * @param in The input stream - */ - public String notFoundElement( String path, HttpOutputStream out, HttpInputStream in ) throws IOException, HttpException; - -} diff --git a/plexus-servers/ircd/clients.txt b/plexus-servers/ircd/clients.txt deleted file mode 100644 index f0656ffd1..000000000 --- a/plexus-servers/ircd/clients.txt +++ /dev/null @@ -1,5 +0,0 @@ -irssi -xchat -vIRC -Colloquy -mIRC diff --git a/plexus-servers/ircd/log.xml b/plexus-servers/ircd/log.xml deleted file mode 100644 index bf2c21526..000000000 --- a/plexus-servers/ircd/log.xml +++ /dev/null @@ -1,108103 +0,0 @@ - - - - - 2003-12-15T16:01:03 - 1071522063328 - 0 - org.codehaus.logger - INFO - Listening - run - 10 - start run - - - 2003-12-15T16:01:03 - 1071522063333 - 1 - org.codehaus.logger - INFO - Talking - run - 11 - start run - - - 2003-12-15T16:01:03 - 1071522063333 - 2 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:01:03 - 1071522063384 - 3 - org.codehaus.logger - INFO - Listening - receive - 10 - <----NICK jason -USER jvanzyl localhost.localdomain 192.168.1.103 :jvanzyl - - - - 2003-12-15T16:01:03 - 1071522063450 - 4 - org.codehaus.logger - INFO - Processing - run - 12 - start run - - - 2003-12-15T16:01:03 - 1071522063576 - 5 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:01:03 - 1071522063577 - 6 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:localhost NOTICE jason :Your nickname has been set to jason - - - - 2003-12-15T16:01:03 - 1071522063578 - 7 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:localhost 375 jason :- localhost Message of the day - - - - - 2003-12-15T16:01:03 - 1071522063611 - 8 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:localhost 372 jason :- Welcome to my IRC Network jason!~jvanzyl@192.168.1.103 - - - - 2003-12-15T16:01:03 - 1071522063612 - 9 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:localhost 422 jason :MOTD File is missing - - - - 2003-12-15T16:01:03 - 1071522063612 - 10 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:localhost 376 jason :End of /MOTD command - - - - 2003-12-15T16:01:03 - 1071522063644 - 11 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:01:03 - 1071522063645 - 12 - org.codehaus.logger - INFO - Listening - receive - 10 - <----MODE jason +i - - - - 2003-12-15T16:01:03 - 1071522063646 - 13 - org.codehaus.logger - INFO - Processing - run - 13 - start run - - - 2003-12-15T16:01:03 - 1071522063683 - 14 - org.codehaus.logger - INFO - Processing - run - 13 - end run - - - 2003-12-15T16:01:03 - 1071522063717 - 15 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:01:03 - 1071522063748 - 16 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:localhost 433 jason jason :Nickname is already in use - - - - 2003-12-15T16:01:03 - 1071522063782 - 17 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:01:03 - 1071522063782 - 18 - org.codehaus.logger - INFO - Processing - run - 12 - end run - - - 2003-12-15T16:01:10 - 1071522070054 - 19 - org.codehaus.logger - INFO - Listening - receive - 10 - <----JOIN #test - - - - 2003-12-15T16:01:10 - 1071522070055 - 20 - org.codehaus.logger - INFO - Processing - run - 14 - start run - - - 2003-12-15T16:01:10 - 1071522070075 - 21 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:01:10 - 1071522070080 - 22 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:jason!~jvanzyl@192.168.1.103 JOIN :#test - - - - 2003-12-15T16:01:10 - 1071522070081 - 23 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:01:10 - 1071522070174 - 24 - org.codehaus.logger - INFO - Listening - receive - 10 - <----MODE #test -WHO #test - - - - 2003-12-15T16:01:10 - 1071522070175 - 25 - org.codehaus.logger - INFO - Processing - run - 15 - start run - - - 2003-12-15T16:01:10 - 1071522070180 - 26 - org.codehaus.logger - INFO - Processing - run - 15 - end run - - - 2003-12-15T16:01:10 - 1071522070180 - 27 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:01:10 - 1071522070215 - 28 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:localhost 324 jason #test + - - - - 2003-12-15T16:01:10 - 1071522070216 - 29 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:01:10 - 1071522070249 - 30 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:01:10 - 1071522070249 - 31 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:localhost 332 jason #test :My topic - - - - 2003-12-15T16:01:10 - 1071522070250 - 32 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:localhost 353 jason = #test :@jason - - - - 2003-12-15T16:01:10 - 1071522070250 - 33 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:localhost 366 jason #test :End of /NAMES list - - - - 2003-12-15T16:01:10 - 1071522070250 - 34 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:01:10 - 1071522070286 - 35 - org.codehaus.logger - INFO - Processing - run - 14 - end run - - - 2003-12-15T16:01:15 - 1071522075544 - 36 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2289194201 - - - - 2003-12-15T16:01:15 - 1071522075546 - 37 - org.codehaus.logger - INFO - Processing - run - 16 - start run - - - 2003-12-15T16:01:15 - 1071522075547 - 38 - org.codehaus.logger - INFO - Processing - run - 16 - end run - - - 2003-12-15T16:01:15 - 1071522075548 - 39 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:01:15 - 1071522075548 - 40 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:01:16 - 1071522076624 - 41 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PRIVMSG #test :howdy - - - - 2003-12-15T16:01:16 - 1071522076625 - 42 - org.codehaus.logger - INFO - Processing - run - 17 - start run - - - 2003-12-15T16:01:16 - 1071522076627 - 43 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:01:16 - 1071522076627 - 44 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:01:16 - 1071522076692 - 45 - org.codehaus.logger - INFO - Processing - run - 17 - end run - - - 2003-12-15T16:01:45 - 1071522105684 - 46 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2319334252 - - - - 2003-12-15T16:01:45 - 1071522105686 - 47 - org.codehaus.logger - INFO - Processing - run - 18 - start run - - - 2003-12-15T16:01:45 - 1071522105686 - 48 - org.codehaus.logger - INFO - Processing - run - 18 - end run - - - 2003-12-15T16:01:45 - 1071522105687 - 49 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:01:45 - 1071522105687 - 50 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:02:15 - 1071522135834 - 51 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2349504455 - - - - 2003-12-15T16:02:15 - 1071522135835 - 52 - org.codehaus.logger - INFO - Processing - run - 19 - start run - - - 2003-12-15T16:02:15 - 1071522135836 - 53 - org.codehaus.logger - INFO - Processing - run - 19 - end run - - - 2003-12-15T16:02:15 - 1071522135836 - 54 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:02:15 - 1071522135836 - 55 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:02:45 - 1071522165985 - 56 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2379644664 - - - - 2003-12-15T16:02:45 - 1071522165987 - 57 - org.codehaus.logger - INFO - Processing - run - 20 - start run - - - 2003-12-15T16:02:45 - 1071522165990 - 58 - org.codehaus.logger - INFO - Processing - run - 20 - end run - - - 2003-12-15T16:02:45 - 1071522165990 - 59 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:02:46 - 1071522166015 - 60 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:03:16 - 1071522196135 - 61 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2409794911 - - - - 2003-12-15T16:03:16 - 1071522196136 - 62 - org.codehaus.logger - INFO - Processing - run - 21 - start run - - - 2003-12-15T16:03:16 - 1071522196138 - 63 - org.codehaus.logger - INFO - Processing - run - 21 - end run - - - 2003-12-15T16:03:16 - 1071522196139 - 64 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:03:16 - 1071522196139 - 65 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:03:46 - 1071522226316 - 66 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2439965075 - - - - 2003-12-15T16:03:46 - 1071522226317 - 67 - org.codehaus.logger - INFO - Processing - run - 22 - start run - - - 2003-12-15T16:03:46 - 1071522226317 - 68 - org.codehaus.logger - INFO - Processing - run - 22 - end run - - - 2003-12-15T16:03:46 - 1071522226318 - 69 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:03:46 - 1071522226318 - 70 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:04:16 - 1071522256445 - 71 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2470115279 - - - - 2003-12-15T16:04:16 - 1071522256446 - 72 - org.codehaus.logger - INFO - Processing - run - 23 - start run - - - 2003-12-15T16:04:16 - 1071522256446 - 73 - org.codehaus.logger - INFO - Processing - run - 23 - end run - - - 2003-12-15T16:04:16 - 1071522256447 - 74 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:04:16 - 1071522256447 - 75 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:04:28 - 1071522268025 - 76 - org.codehaus.logger - INFO - Listening - receive - 10 - <----TOPIC #test :test java ircd - - - - 2003-12-15T16:04:28 - 1071522268026 - 77 - org.codehaus.logger - INFO - Processing - run - 24 - start run - - - 2003-12-15T16:04:28 - 1071522268028 - 78 - org.codehaus.logger - INFO - Processing - run - 24 - end run - - - 2003-12-15T16:04:28 - 1071522268029 - 79 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:04:28 - 1071522268029 - 80 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:jason TOPIC #test :test java ircd - - - - 2003-12-15T16:04:28 - 1071522268029 - 81 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:04:36 - 1071522276913 - 82 - org.codehaus.logger - INFO - Talking - run - 25 - start run - - - 2003-12-15T16:04:36 - 1071522276913 - 83 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T16:04:36 - 1071522276915 - 84 - org.codehaus.logger - INFO - Listening - run - 26 - start run - - - 2003-12-15T16:04:37 - 1071522277006 - 85 - org.codehaus.logger - INFO - Listening - receive - 26 - <----NICK trygvis - - - - 2003-12-15T16:04:37 - 1071522277007 - 86 - org.codehaus.logger - INFO - Processing - run - 27 - start run - - - 2003-12-15T16:04:37 - 1071522277008 - 87 - org.codehaus.logger - INFO - Processing - run - 27 - end run - - - 2003-12-15T16:04:37 - 1071522277041 - 88 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T16:04:37 - 1071522277041 - 89 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:localhost NOTICE trygvis :Your nickname has been set to trygvis - - - - 2003-12-15T16:04:37 - 1071522277042 - 90 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T16:04:37 - 1071522277666 - 91 - org.codehaus.logger - INFO - Listening - receive - 26 - <----USER trygvis kyle.trygvis.homedns.org 24.102.210.93 :Trygve Laugst� - - - 2003-12-15T16:04:37 - 1071522277673 - 92 - org.codehaus.logger - INFO - Processing - run - 28 - start run - - - 2003-12-15T16:04:37 - 1071522277743 - 93 - org.codehaus.logger - INFO - Processing - run - 28 - end run - - - 2003-12-15T16:04:37 - 1071522277809 - 94 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T16:04:37 - 1071522277809 - 95 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:localhost 375 trygvis :- localhost Message of the day - - - - - 2003-12-15T16:04:37 - 1071522277810 - 96 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:localhost 372 trygvis :- Welcome to my IRC Network trygvis!~trygvis@80.202.80.80 - - - - 2003-12-15T16:04:37 - 1071522277810 - 97 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:localhost 422 trygvis :MOTD File is missing - - - - 2003-12-15T16:04:37 - 1071522277844 - 98 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:localhost 376 trygvis :End of /MOTD command - - - - 2003-12-15T16:04:37 - 1071522277844 - 99 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T16:04:39 - 1071522279576 - 100 - org.codehaus.logger - INFO - Listening - receive - 26 - <----MODE trygvis +i - - - - 2003-12-15T16:04:39 - 1071522279576 - 101 - org.codehaus.logger - INFO - Processing - run - 29 - start run - - - 2003-12-15T16:04:39 - 1071522279578 - 102 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T16:04:39 - 1071522279612 - 103 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:localhost 433 trygvis trygvis :Nickname is already in use - - - - 2003-12-15T16:04:39 - 1071522279645 - 104 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T16:04:39 - 1071522279646 - 105 - org.codehaus.logger - INFO - Processing - run - 29 - end run - - - 2003-12-15T16:04:42 - 1071522282162 - 106 - org.codehaus.logger - INFO - Listening - run - 30 - start run - - - 2003-12-15T16:04:42 - 1071522282162 - 107 - org.codehaus.logger - INFO - Talking - run - 31 - start run - - - 2003-12-15T16:04:42 - 1071522282163 - 108 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:04:42 - 1071522282217 - 109 - org.codehaus.logger - INFO - Listening - receive - 30 - <----NICK noah - - - - 2003-12-15T16:04:42 - 1071522282286 - 110 - org.codehaus.logger - INFO - Processing - run - 32 - start run - - - 2003-12-15T16:04:42 - 1071522282287 - 111 - org.codehaus.logger - INFO - Processing - run - 32 - end run - - - 2003-12-15T16:04:42 - 1071522282402 - 112 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:04:42 - 1071522282404 - 113 - org.codehaus.logger - INFO - Talking - send - 31 - ------>:localhost NOTICE noah :Your nickname has been set to noah - - - - 2003-12-15T16:04:42 - 1071522282692 - 114 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:04:44 - 1071522284126 - 115 - org.codehaus.logger - INFO - Listening - receive - 30 - <----USER noah * * :New Now Know How - - - - 2003-12-15T16:04:44 - 1071522284128 - 116 - org.codehaus.logger - INFO - Processing - run - 33 - start run - - - 2003-12-15T16:04:44 - 1071522284196 - 117 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:04:44 - 1071522284229 - 118 - org.codehaus.logger - INFO - Talking - send - 31 - ------>:localhost 375 noah :- localhost Message of the day - - - - - 2003-12-15T16:04:44 - 1071522284263 - 119 - org.codehaus.logger - INFO - Talking - send - 31 - ------>:localhost 372 noah :- Welcome to my IRC Network noah!~noah@24.100.197.137 - - - - 2003-12-15T16:04:44 - 1071522284263 - 120 - org.codehaus.logger - INFO - Talking - send - 31 - ------>:localhost 422 noah :MOTD File is missing - - - - 2003-12-15T16:04:44 - 1071522284263 - 121 - org.codehaus.logger - INFO - Talking - send - 31 - ------>:localhost 376 noah :End of /MOTD command - - - - 2003-12-15T16:04:44 - 1071522284264 - 122 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:04:44 - 1071522284297 - 123 - org.codehaus.logger - INFO - Processing - run - 33 - end run - - - 2003-12-15T16:04:46 - 1071522286536 - 124 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2500235495 - - - - 2003-12-15T16:04:46 - 1071522286536 - 125 - org.codehaus.logger - INFO - Listening - receive - 26 - <----JOIN #test - - - - 2003-12-15T16:04:46 - 1071522286537 - 126 - org.codehaus.logger - INFO - Processing - run - 34 - start run - - - 2003-12-15T16:04:46 - 1071522286538 - 127 - org.codehaus.logger - INFO - Processing - run - 34 - end run - - - 2003-12-15T16:04:46 - 1071522286538 - 128 - org.codehaus.logger - INFO - Processing - run - 35 - start run - - - 2003-12-15T16:04:46 - 1071522286539 - 129 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:04:46 - 1071522286539 - 130 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:04:46 - 1071522286568 - 131 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T16:04:46 - 1071522286579 - 132 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:trygvis!~trygvis@80.202.80.80 JOIN :#test - - - - 2003-12-15T16:04:46 - 1071522286581 - 133 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T16:04:46 - 1071522286614 - 134 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:04:46 - 1071522286614 - 135 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:trygvis!~trygvis@80.202.80.80 JOIN :#test - - - - 2003-12-15T16:04:46 - 1071522286614 - 136 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:04:46 - 1071522286688 - 137 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T16:04:46 - 1071522286688 - 138 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:localhost 332 trygvis #test :test java ircd - - - - 2003-12-15T16:04:46 - 1071522286688 - 139 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:localhost 353 trygvis = #test :trygvis @jason - - - - 2003-12-15T16:04:46 - 1071522286689 - 140 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:localhost 366 trygvis #test :End of /NAMES list - - - - 2003-12-15T16:04:46 - 1071522286689 - 141 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T16:04:46 - 1071522286689 - 142 - org.codehaus.logger - INFO - Processing - run - 35 - end run - - - 2003-12-15T16:04:47 - 1071522287996 - 143 - org.codehaus.logger - INFO - Listening - receive - 26 - <----MODE #test - - - - 2003-12-15T16:04:47 - 1071522287996 - 144 - org.codehaus.logger - INFO - Processing - run - 36 - start run - - - 2003-12-15T16:04:47 - 1071522287999 - 145 - org.codehaus.logger - INFO - Processing - run - 36 - end run - - - 2003-12-15T16:04:47 - 1071522287999 - 146 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T16:04:47 - 1071522287999 - 147 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:localhost 324 trygvis #test + - - - - 2003-12-15T16:04:48 - 1071522288000 - 148 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T16:04:48 - 1071522288726 - 149 - org.codehaus.logger - INFO - Listening - receive - 26 - <----WHO #test - - - - 2003-12-15T16:04:48 - 1071522288786 - 150 - org.codehaus.logger - INFO - Processing - run - 37 - start run - - - 2003-12-15T16:04:48 - 1071522288787 - 151 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T16:04:48 - 1071522288787 - 152 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T16:04:48 - 1071522288798 - 153 - org.codehaus.logger - INFO - Processing - run - 37 - end run - - - 2003-12-15T16:04:58 - 1071522298536 - 154 - org.codehaus.logger - INFO - Listening - receive - 30 - <----WHOIS jason - - - - 2003-12-15T16:04:58 - 1071522298536 - 155 - org.codehaus.logger - INFO - Processing - run - 38 - start run - - - 2003-12-15T16:04:58 - 1071522298544 - 156 - org.codehaus.logger - INFO - Processing - run - 38 - end run - - - 2003-12-15T16:04:58 - 1071522298571 - 157 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:04:58 - 1071522298571 - 158 - org.codehaus.logger - INFO - Talking - send - 31 - ------>:localhost 311 noah jason jvanzyl 192.168.1.103 * :jvanzyl - - - - 2003-12-15T16:04:58 - 1071522298572 - 159 - org.codehaus.logger - INFO - Talking - send - 31 - ------>:localhost 319 noah jason :@#test - - - - 2003-12-15T16:04:58 - 1071522298572 - 160 - org.codehaus.logger - INFO - Talking - send - 31 - ------>:localhost 317 noah jason 12 :seconds idle - - - - 2003-12-15T16:04:58 - 1071522298572 - 161 - org.codehaus.logger - INFO - Talking - send - 31 - ------>:localhost 318 noah jason :End of /WHOIS list - - - - 2003-12-15T16:04:58 - 1071522298572 - 162 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:04:59 - 1071522299556 - 163 - org.codehaus.logger - INFO - Listening - receive - 26 - <----PRIVMSG #test :yoyo - - - - 2003-12-15T16:04:59 - 1071522299556 - 164 - org.codehaus.logger - INFO - Processing - run - 39 - start run - - - 2003-12-15T16:04:59 - 1071522299557 - 165 - org.codehaus.logger - INFO - Processing - run - 39 - end run - - - 2003-12-15T16:04:59 - 1071522299558 - 166 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:04:59 - 1071522299558 - 167 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T16:04:59 - 1071522299559 - 168 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:trygvis PRIVMSG #test :yoyo - - - - 2003-12-15T16:04:59 - 1071522299568 - 170 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:04:59 - 1071522299559 - 169 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T16:05:05 - 1071522305616 - 171 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PRIVMSG #test :howdy - - - - 2003-12-15T16:05:05 - 1071522305617 - 172 - org.codehaus.logger - INFO - Processing - run - 40 - start run - - - 2003-12-15T16:05:05 - 1071522305618 - 173 - org.codehaus.logger - INFO - Processing - run - 40 - end run - - - 2003-12-15T16:05:05 - 1071522305619 - 174 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T16:05:05 - 1071522305619 - 175 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:05:05 - 1071522305619 - 176 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:05:05 - 1071522305620 - 177 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:jason PRIVMSG #test :howdy - - - - 2003-12-15T16:05:05 - 1071522305621 - 178 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T16:05:06 - 1071522306186 - 179 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PRIVMSG jason :looks like it working - - - - 2003-12-15T16:05:06 - 1071522306187 - 180 - org.codehaus.logger - INFO - Processing - run - 41 - start run - - - 2003-12-15T16:05:06 - 1071522306188 - 181 - org.codehaus.logger - INFO - Processing - run - 41 - end run - - - 2003-12-15T16:05:06 - 1071522306189 - 182 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:05:06 - 1071522306189 - 183 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:noah PRIVMSG jason :looks like it working - - - - 2003-12-15T16:05:06 - 1071522306189 - 184 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:05:06 - 1071522306189 - 185 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:05:06 - 1071522306189 - 186 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:05:12 - 1071522312926 - 187 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PRIVMSG #test :still have that empty name thing up there but oh well - - - - 2003-12-15T16:05:12 - 1071522312927 - 188 - org.codehaus.logger - INFO - Processing - run - 42 - start run - - - 2003-12-15T16:05:12 - 1071522312928 - 189 - org.codehaus.logger - INFO - Processing - run - 42 - end run - - - 2003-12-15T16:05:12 - 1071522312929 - 190 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T16:05:12 - 1071522312929 - 191 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:jason PRIVMSG #test :still have that empty name thing up there but oh well - - - - 2003-12-15T16:05:12 - 1071522312929 - 192 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T16:05:12 - 1071522312929 - 193 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:05:12 - 1071522312929 - 194 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:05:16 - 1071522316706 - 195 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2530375699 - - - - 2003-12-15T16:05:16 - 1071522316707 - 196 - org.codehaus.logger - INFO - Processing - run - 43 - start run - - - 2003-12-15T16:05:16 - 1071522316707 - 197 - org.codehaus.logger - INFO - Processing - run - 43 - end run - - - 2003-12-15T16:05:16 - 1071522316708 - 198 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:05:16 - 1071522316708 - 199 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:05:26 - 1071522326326 - 200 - org.codehaus.logger - INFO - Listening - receive - 30 - <----JOIN #test - - - - 2003-12-15T16:05:26 - 1071522326326 - 201 - org.codehaus.logger - INFO - Processing - run - 44 - start run - - - 2003-12-15T16:05:26 - 1071522326328 - 202 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T16:05:26 - 1071522326328 - 203 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:noah!~noah@24.100.197.137 JOIN :#test - - - - 2003-12-15T16:05:26 - 1071522326328 - 204 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T16:05:26 - 1071522326329 - 205 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:05:26 - 1071522326400 - 206 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:noah!~noah@24.100.197.137 JOIN :#test - - - - 2003-12-15T16:05:26 - 1071522326401 - 207 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:05:26 - 1071522326403 - 208 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:05:26 - 1071522326403 - 209 - org.codehaus.logger - INFO - Talking - send - 31 - ------>:noah!~noah@24.100.197.137 JOIN :#test - - - - 2003-12-15T16:05:26 - 1071522326403 - 210 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:05:26 - 1071522326438 - 211 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:05:26 - 1071522326439 - 212 - org.codehaus.logger - INFO - Talking - send - 31 - ------>:localhost 332 noah #test :test java ircd - - - - 2003-12-15T16:05:26 - 1071522326439 - 213 - org.codehaus.logger - INFO - Talking - send - 31 - ------>:localhost 353 noah = #test :trygvis @jason noah - - - - 2003-12-15T16:05:26 - 1071522326439 - 214 - org.codehaus.logger - INFO - Talking - send - 31 - ------>:localhost 366 noah #test :End of /NAMES list - - - - 2003-12-15T16:05:26 - 1071522326440 - 215 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:05:26 - 1071522326440 - 216 - org.codehaus.logger - INFO - Processing - run - 44 - end run - - - 2003-12-15T16:05:27 - 1071522327866 - 217 - org.codehaus.logger - INFO - Listening - receive - 30 - <----MODE #test - - - - 2003-12-15T16:05:27 - 1071522327866 - 218 - org.codehaus.logger - INFO - Processing - run - 45 - start run - - - 2003-12-15T16:05:27 - 1071522327867 - 219 - org.codehaus.logger - INFO - Processing - run - 45 - end run - - - 2003-12-15T16:05:27 - 1071522327868 - 220 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:05:27 - 1071522327869 - 221 - org.codehaus.logger - INFO - Talking - send - 31 - ------>:localhost 324 noah #test + - - - - 2003-12-15T16:05:27 - 1071522327869 - 222 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:05:35 - 1071522335406 - 223 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PRIVMSG noah :coolio - - - - 2003-12-15T16:05:35 - 1071522335407 - 224 - org.codehaus.logger - INFO - Processing - run - 46 - start run - - - 2003-12-15T16:05:35 - 1071522335409 - 225 - org.codehaus.logger - INFO - Processing - run - 46 - end run - - - 2003-12-15T16:05:35 - 1071522335409 - 226 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:05:35 - 1071522335409 - 227 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:05:35 - 1071522335475 - 228 - org.codehaus.logger - INFO - Talking - send - 31 - ------>:jason PRIVMSG noah :coolio - - - - 2003-12-15T16:05:35 - 1071522335475 - 229 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:05:35 - 1071522335475 - 230 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:05:43 - 1071522343876 - 231 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PRIVMSG noah :all thanks to doug shmidt - - - - 2003-12-15T16:05:43 - 1071522343877 - 232 - org.codehaus.logger - INFO - Processing - run - 47 - start run - - - 2003-12-15T16:05:43 - 1071522343877 - 233 - org.codehaus.logger - INFO - Processing - run - 47 - end run - - - 2003-12-15T16:05:43 - 1071522343878 - 234 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:05:43 - 1071522343878 - 235 - org.codehaus.logger - INFO - Talking - send - 31 - ------>:jason PRIVMSG noah :all thanks to doug shmidt - - - - 2003-12-15T16:05:43 - 1071522343878 - 236 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:05:43 - 1071522343878 - 237 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:05:43 - 1071522343879 - 238 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:05:46 - 1071522346826 - 239 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2560525961 - - - - 2003-12-15T16:05:46 - 1071522346827 - 240 - org.codehaus.logger - INFO - Processing - run - 48 - start run - - - 2003-12-15T16:05:46 - 1071522346832 - 241 - org.codehaus.logger - INFO - Processing - run - 48 - end run - - - 2003-12-15T16:05:46 - 1071522346832 - 242 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:05:46 - 1071522346857 - 243 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:06:06 - 1071522366026 - 244 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PRIVMSG #test :i'll leave it running for a while again - - - - 2003-12-15T16:06:06 - 1071522366027 - 245 - org.codehaus.logger - INFO - Processing - run - 49 - start run - - - 2003-12-15T16:06:06 - 1071522366028 - 246 - org.codehaus.logger - INFO - Processing - run - 49 - end run - - - 2003-12-15T16:06:06 - 1071522366029 - 247 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T16:06:06 - 1071522366029 - 248 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:jason PRIVMSG #test :i'll leave it running for a while again - - - - 2003-12-15T16:06:06 - 1071522366029 - 249 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T16:06:06 - 1071522366029 - 250 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:06:06 - 1071522366029 - 251 - org.codehaus.logger - INFO - Talking - send - 31 - ------>:jason PRIVMSG #test :i'll leave it running for a while again - - - - 2003-12-15T16:06:06 - 1071522366030 - 252 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:06:06 - 1071522366030 - 253 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:06:06 - 1071522366030 - 254 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:06:14 - 1071522374236 - 255 - org.codehaus.logger - INFO - Listening - receive - 30 - <----WHOIS @jason - - - - 2003-12-15T16:06:14 - 1071522374237 - 256 - org.codehaus.logger - INFO - Processing - run - 50 - start run - - - 2003-12-15T16:06:14 - 1071522374238 - 257 - org.codehaus.logger - INFO - Processing - run - 50 - end run - - - 2003-12-15T16:06:14 - 1071522374239 - 258 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:06:14 - 1071522374239 - 259 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:06:16 - 1071522376996 - 260 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2590676118 - - - - 2003-12-15T16:06:16 - 1071522376998 - 261 - org.codehaus.logger - INFO - Processing - run - 51 - start run - - - 2003-12-15T16:06:17 - 1071522377004 - 262 - org.codehaus.logger - INFO - Processing - run - 51 - end run - - - 2003-12-15T16:06:17 - 1071522377005 - 263 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:06:17 - 1071522377005 - 264 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:06:20 - 1071522380366 - 265 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PRIVMSG @jason :poo - - - - 2003-12-15T16:06:20 - 1071522380367 - 266 - org.codehaus.logger - INFO - Processing - run - 52 - start run - - - 2003-12-15T16:06:20 - 1071522380368 - 267 - org.codehaus.logger - INFO - Processing - run - 52 - end run - - - 2003-12-15T16:06:20 - 1071522380369 - 268 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:06:20 - 1071522380369 - 269 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:06:41 - 1071522401906 - 270 - org.codehaus.logger - INFO - Listening - receive - 26 - <----MODE #test +o trygvis - - - - 2003-12-15T16:06:41 - 1071522401907 - 271 - org.codehaus.logger - INFO - Processing - run - 53 - start run - - - 2003-12-15T16:06:41 - 1071522401909 - 272 - org.codehaus.logger - INFO - Processing - run - 53 - end run - - - 2003-12-15T16:06:41 - 1071522401909 - 273 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T16:06:41 - 1071522401910 - 274 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:localhost 482 trygvis #test :You're not channel operator - - - - 2003-12-15T16:06:41 - 1071522401910 - 275 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T16:06:47 - 1071522407127 - 276 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2620826334 - - - - 2003-12-15T16:06:47 - 1071522407127 - 277 - org.codehaus.logger - INFO - Processing - run - 54 - start run - - - 2003-12-15T16:06:47 - 1071522407128 - 278 - org.codehaus.logger - INFO - Processing - run - 54 - end run - - - 2003-12-15T16:06:47 - 1071522407128 - 279 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:06:47 - 1071522407128 - 280 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:07:17 - 1071522437307 - 281 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2650976565 - - - - 2003-12-15T16:07:17 - 1071522437308 - 282 - org.codehaus.logger - INFO - Processing - run - 55 - start run - - - 2003-12-15T16:07:17 - 1071522437308 - 283 - org.codehaus.logger - INFO - Processing - run - 55 - end run - - - 2003-12-15T16:07:17 - 1071522437309 - 284 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:07:17 - 1071522437311 - 285 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:07:47 - 1071522467437 - 286 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2681126753 - - - - 2003-12-15T16:07:47 - 1071522467437 - 287 - org.codehaus.logger - INFO - Processing - run - 56 - start run - - - 2003-12-15T16:07:47 - 1071522467438 - 288 - org.codehaus.logger - INFO - Processing - run - 56 - end run - - - 2003-12-15T16:07:47 - 1071522467438 - 289 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:07:47 - 1071522467438 - 290 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:08:17 - 1071522497577 - 291 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2711276969 - - - - 2003-12-15T16:08:17 - 1071522497578 - 292 - org.codehaus.logger - INFO - Processing - run - 57 - start run - - - 2003-12-15T16:08:17 - 1071522497579 - 293 - org.codehaus.logger - INFO - Processing - run - 57 - end run - - - 2003-12-15T16:08:17 - 1071522497579 - 294 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:08:17 - 1071522497581 - 295 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:08:47 - 1071522527767 - 296 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2741427178 - - - - 2003-12-15T16:08:47 - 1071522527768 - 297 - org.codehaus.logger - INFO - Processing - run - 58 - start run - - - 2003-12-15T16:08:47 - 1071522527770 - 298 - org.codehaus.logger - INFO - Processing - run - 58 - end run - - - 2003-12-15T16:08:47 - 1071522527770 - 299 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:08:47 - 1071522527771 - 300 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:09:17 - 1071522557878 - 301 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2771577397 - - - - 2003-12-15T16:09:17 - 1071522557878 - 302 - org.codehaus.logger - INFO - Processing - run - 59 - start run - - - 2003-12-15T16:09:17 - 1071522557879 - 303 - org.codehaus.logger - INFO - Processing - run - 59 - end run - - - 2003-12-15T16:09:17 - 1071522557879 - 304 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:09:17 - 1071522557879 - 305 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:09:41 - 1071522581998 - 306 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T16:09:41 - 1071522581999 - 307 - org.codehaus.logger - INFO - Processing - run - 60 - start run - - - 2003-12-15T16:09:41 - 1071522581999 - 308 - org.codehaus.logger - INFO - Processing - run - 60 - end run - - - 2003-12-15T16:09:41 - 1071522581999 - 309 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:09:42 - 1071522582000 - 310 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:09:48 - 1071522588058 - 311 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2801727603 - - - - 2003-12-15T16:09:48 - 1071522588058 - 312 - org.codehaus.logger - INFO - Processing - run - 61 - start run - - - 2003-12-15T16:09:48 - 1071522588059 - 313 - org.codehaus.logger - INFO - Processing - run - 61 - end run - - - 2003-12-15T16:09:48 - 1071522588059 - 314 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:09:48 - 1071522588059 - 315 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:10:18 - 1071522618208 - 316 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2831867820 - - - - 2003-12-15T16:10:18 - 1071522618209 - 317 - org.codehaus.logger - INFO - Processing - run - 62 - start run - - - 2003-12-15T16:10:18 - 1071522618209 - 318 - org.codehaus.logger - INFO - Processing - run - 62 - end run - - - 2003-12-15T16:10:18 - 1071522618209 - 319 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:10:18 - 1071522618209 - 320 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:10:48 - 1071522648318 - 321 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2862018032 - - - - 2003-12-15T16:10:48 - 1071522648319 - 322 - org.codehaus.logger - INFO - Processing - run - 63 - start run - - - 2003-12-15T16:10:48 - 1071522648320 - 323 - org.codehaus.logger - INFO - Processing - run - 63 - end run - - - 2003-12-15T16:10:48 - 1071522648320 - 324 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:10:48 - 1071522648320 - 325 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:11:18 - 1071522678508 - 326 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2892168255 - - - - 2003-12-15T16:11:18 - 1071522678512 - 327 - org.codehaus.logger - INFO - Processing - run - 64 - start run - - - 2003-12-15T16:11:18 - 1071522678512 - 328 - org.codehaus.logger - INFO - Processing - run - 64 - end run - - - 2003-12-15T16:11:18 - 1071522678512 - 329 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:11:18 - 1071522678513 - 330 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:11:48 - 1071522708648 - 331 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2922318459 - - - - 2003-12-15T16:11:48 - 1071522708650 - 332 - org.codehaus.logger - INFO - Processing - run - 65 - start run - - - 2003-12-15T16:11:48 - 1071522708652 - 333 - org.codehaus.logger - INFO - Processing - run - 65 - end run - - - 2003-12-15T16:11:48 - 1071522708652 - 334 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:11:48 - 1071522708652 - 335 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:12:18 - 1071522738789 - 336 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2952478676 - - - - 2003-12-15T16:12:18 - 1071522738789 - 337 - org.codehaus.logger - INFO - Processing - run - 66 - start run - - - 2003-12-15T16:12:18 - 1071522738790 - 338 - org.codehaus.logger - INFO - Processing - run - 66 - end run - - - 2003-12-15T16:12:18 - 1071522738790 - 339 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:12:18 - 1071522738790 - 340 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:12:35 - 1071522755423 - 341 - org.codehaus.logger - INFO - Listening - run - 67 - start run - - - 2003-12-15T16:12:35 - 1071522755423 - 342 - org.codehaus.logger - INFO - Talking - run - 68 - start run - - - 2003-12-15T16:12:35 - 1071522755423 - 343 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:12:35 - 1071522755479 - 344 - org.codehaus.logger - INFO - Listening - receive - 67 - <----NICK jt -USER james bubblehouse.local 24.102.210.93 :James Taylor - - - - 2003-12-15T16:12:35 - 1071522755480 - 345 - org.codehaus.logger - INFO - Processing - run - 69 - start run - - - 2003-12-15T16:12:35 - 1071522755515 - 346 - org.codehaus.logger - INFO - Processing - run - 69 - end run - - - 2003-12-15T16:12:35 - 1071522755548 - 347 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:12:35 - 1071522755581 - 348 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:localhost NOTICE jt :Your nickname has been set to jt - - - - 2003-12-15T16:12:35 - 1071522755582 - 349 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:localhost 375 jt :- localhost Message of the day - - - - - 2003-12-15T16:12:35 - 1071522755582 - 350 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:localhost 372 jt :- Welcome to my IRC Network jt!~james@68.168.170.80 - - - - 2003-12-15T16:12:35 - 1071522755582 - 351 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:localhost 422 jt :MOTD File is missing - - - - 2003-12-15T16:12:35 - 1071522755617 - 352 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:localhost 376 jt :End of /MOTD command - - - - 2003-12-15T16:12:35 - 1071522755650 - 353 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:12:42 - 1071522762778 - 354 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2966643792 -JOIN #test - - - - 2003-12-15T16:12:42 - 1071522762779 - 355 - org.codehaus.logger - INFO - Processing - run - 70 - start run - - - 2003-12-15T16:12:42 - 1071522762781 - 356 - org.codehaus.logger - INFO - Processing - run - 70 - end run - - - 2003-12-15T16:12:42 - 1071522762782 - 357 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T16:12:42 - 1071522762783 - 358 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:jt!~james@68.168.170.80 JOIN :#test - - - - 2003-12-15T16:12:42 - 1071522762789 - 362 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T16:12:42 - 1071522762783 - 359 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:12:42 - 1071522762817 - 363 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:jt!~james@68.168.170.80 JOIN :#test - - - - 2003-12-15T16:12:42 - 1071522762817 - 364 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:localhost 332 jt #test :test java ircd - - - - 2003-12-15T16:12:42 - 1071522762817 - 365 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:localhost 353 jt = #test :trygvis jt @jason noah - - - - 2003-12-15T16:12:42 - 1071522762817 - 366 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:localhost 366 jt #test :End of /NAMES list - - - - 2003-12-15T16:12:42 - 1071522762818 - 367 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:12:42 - 1071522762783 - 360 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:12:42 - 1071522762783 - 361 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:12:42 - 1071522762971 - 369 - org.codehaus.logger - INFO - Talking - send - 31 - ------>:jt!~james@68.168.170.80 JOIN :#test - - - - 2003-12-15T16:12:42 - 1071522762971 - 370 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:12:42 - 1071522762971 - 368 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:jt!~james@68.168.170.80 JOIN :#test - - - - 2003-12-15T16:12:42 - 1071522762972 - 371 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:12:43 - 1071522763078 - 372 - org.codehaus.logger - INFO - Listening - receive - 67 - <----MODE #test - - - - 2003-12-15T16:12:43 - 1071522763080 - 373 - org.codehaus.logger - INFO - Processing - run - 71 - start run - - - 2003-12-15T16:12:43 - 1071522763081 - 374 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:12:43 - 1071522763085 - 375 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:localhost 324 jt #test + - - - - 2003-12-15T16:12:43 - 1071522763086 - 376 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:12:43 - 1071522763115 - 377 - org.codehaus.logger - INFO - Processing - run - 71 - end run - - - 2003-12-15T16:12:43 - 1071522763148 - 378 - org.codehaus.logger - INFO - Listening - receive - 67 - <----WHO #test - - - - 2003-12-15T16:12:43 - 1071522763149 - 379 - org.codehaus.logger - INFO - Processing - run - 72 - start run - - - 2003-12-15T16:12:43 - 1071522763150 - 380 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:12:43 - 1071522763150 - 381 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:12:43 - 1071522763182 - 382 - org.codehaus.logger - INFO - Processing - run - 72 - end run - - - 2003-12-15T16:12:48 - 1071522768969 - 383 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2982648890 - - - - 2003-12-15T16:12:48 - 1071522768976 - 384 - org.codehaus.logger - INFO - Processing - run - 73 - start run - - - 2003-12-15T16:12:48 - 1071522768977 - 385 - org.codehaus.logger - INFO - Processing - run - 73 - end run - - - 2003-12-15T16:12:48 - 1071522768977 - 386 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:12:48 - 1071522768977 - 387 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:12:57 - 1071522777759 - 388 - org.codehaus.logger - INFO - Listening - receive - 67 - <----TOPIC #test :still got a blank... - - - - 2003-12-15T16:12:57 - 1071522777760 - 389 - org.codehaus.logger - INFO - Processing - run - 74 - start run - - - 2003-12-15T16:12:57 - 1071522777760 - 390 - org.codehaus.logger - INFO - Processing - run - 74 - end run - - - 2003-12-15T16:12:57 - 1071522777761 - 391 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T16:12:57 - 1071522777761 - 392 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:jt TOPIC #test :still got a blank... - - - - 2003-12-15T16:12:57 - 1071522777761 - 393 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T16:12:57 - 1071522777762 - 394 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:12:57 - 1071522777762 - 395 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:12:57 - 1071522777762 - 396 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:12:57 - 1071522777828 - 397 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:jt TOPIC #test :still got a blank... - - - - 2003-12-15T16:12:57 - 1071522777829 - 398 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:12:57 - 1071522777829 - 399 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:jt TOPIC #test :still got a blank... - - - - 2003-12-15T16:12:57 - 1071522777829 - 400 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:12:57 - 1071522777829 - 401 - org.codehaus.logger - INFO - Talking - send - 31 - ------>:jt TOPIC #test :still got a blank... - - - - 2003-12-15T16:12:57 - 1071522777830 - 402 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:13:10 - 1071522790260 - 403 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2996662445 - - - - 2003-12-15T16:13:10 - 1071522790261 - 404 - org.codehaus.logger - INFO - Processing - run - 75 - start run - - - 2003-12-15T16:13:10 - 1071522790262 - 405 - org.codehaus.logger - INFO - Processing - run - 75 - end run - - - 2003-12-15T16:13:10 - 1071522790262 - 406 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:13:10 - 1071522790263 - 407 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:13:19 - 1071522799139 - 408 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3012809020 - - - - 2003-12-15T16:13:19 - 1071522799140 - 409 - org.codehaus.logger - INFO - Processing - run - 76 - start run - - - 2003-12-15T16:13:19 - 1071522799141 - 410 - org.codehaus.logger - INFO - Processing - run - 76 - end run - - - 2003-12-15T16:13:19 - 1071522799141 - 411 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:13:19 - 1071522799141 - 412 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:13:40 - 1071522820329 - 413 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3026700167 - - - - 2003-12-15T16:13:40 - 1071522820330 - 414 - org.codehaus.logger - INFO - Processing - run - 77 - start run - - - 2003-12-15T16:13:40 - 1071522820330 - 415 - org.codehaus.logger - INFO - Processing - run - 77 - end run - - - 2003-12-15T16:13:40 - 1071522820331 - 416 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:13:40 - 1071522820331 - 417 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:13:49 - 1071522829309 - 418 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3042959141 - - - - 2003-12-15T16:13:49 - 1071522829310 - 419 - org.codehaus.logger - INFO - Processing - run - 78 - start run - - - 2003-12-15T16:13:49 - 1071522829310 - 420 - org.codehaus.logger - INFO - Processing - run - 78 - end run - - - 2003-12-15T16:13:49 - 1071522829311 - 421 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:13:49 - 1071522829311 - 422 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:14:10 - 1071522850559 - 423 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3056953060 - - - - 2003-12-15T16:14:10 - 1071522850560 - 424 - org.codehaus.logger - INFO - Processing - run - 79 - start run - - - 2003-12-15T16:14:10 - 1071522850560 - 425 - org.codehaus.logger - INFO - Processing - run - 79 - end run - - - 2003-12-15T16:14:10 - 1071522850561 - 426 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:14:10 - 1071522850561 - 427 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:14:19 - 1071522859439 - 428 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3073119255 - - - - 2003-12-15T16:14:19 - 1071522859442 - 429 - org.codehaus.logger - INFO - Processing - run - 80 - start run - - - 2003-12-15T16:14:19 - 1071522859444 - 430 - org.codehaus.logger - INFO - Processing - run - 80 - end run - - - 2003-12-15T16:14:19 - 1071522859444 - 431 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:14:19 - 1071522859444 - 432 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:14:40 - 1071522880559 - 433 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3086959159 - - - - 2003-12-15T16:14:40 - 1071522880560 - 434 - org.codehaus.logger - INFO - Processing - run - 81 - start run - - - 2003-12-15T16:14:40 - 1071522880561 - 435 - org.codehaus.logger - INFO - Processing - run - 81 - end run - - - 2003-12-15T16:14:40 - 1071522880562 - 436 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:14:40 - 1071522880562 - 437 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:14:41 - 1071522881819 - 438 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T16:14:41 - 1071522881822 - 439 - org.codehaus.logger - INFO - Processing - run - 82 - start run - - - 2003-12-15T16:14:41 - 1071522881822 - 440 - org.codehaus.logger - INFO - Processing - run - 82 - end run - - - 2003-12-15T16:14:41 - 1071522881822 - 441 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:14:41 - 1071522881822 - 442 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:14:49 - 1071522889579 - 443 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3103269373 - - - - 2003-12-15T16:14:49 - 1071522889581 - 444 - org.codehaus.logger - INFO - Processing - run - 83 - start run - - - 2003-12-15T16:14:49 - 1071522889581 - 445 - org.codehaus.logger - INFO - Processing - run - 83 - end run - - - 2003-12-15T16:14:49 - 1071522889582 - 446 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:14:49 - 1071522889582 - 447 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:15:10 - 1071522910819 - 448 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3117166940 - - - - 2003-12-15T16:15:10 - 1071522910821 - 449 - org.codehaus.logger - INFO - Processing - run - 84 - start run - - - 2003-12-15T16:15:10 - 1071522910821 - 450 - org.codehaus.logger - INFO - Processing - run - 84 - end run - - - 2003-12-15T16:15:10 - 1071522910822 - 451 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:15:10 - 1071522910822 - 452 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:15:19 - 1071522919710 - 453 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3133409502 - - - - 2003-12-15T16:15:19 - 1071522919711 - 454 - org.codehaus.logger - INFO - Processing - run - 85 - start run - - - 2003-12-15T16:15:19 - 1071522919711 - 455 - org.codehaus.logger - INFO - Processing - run - 85 - end run - - - 2003-12-15T16:15:19 - 1071522919711 - 456 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:15:19 - 1071522919711 - 457 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:15:42 - 1071522942810 - 458 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3147168479 - - - - 2003-12-15T16:15:42 - 1071522942810 - 459 - org.codehaus.logger - INFO - Processing - run - 86 - start run - - - 2003-12-15T16:15:42 - 1071522942811 - 460 - org.codehaus.logger - INFO - Processing - run - 86 - end run - - - 2003-12-15T16:15:42 - 1071522942811 - 461 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:15:42 - 1071522942811 - 462 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:15:49 - 1071522949900 - 463 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3163559644 - - - - 2003-12-15T16:15:49 - 1071522949900 - 464 - org.codehaus.logger - INFO - Processing - run - 87 - start run - - - 2003-12-15T16:15:49 - 1071522949901 - 465 - org.codehaus.logger - INFO - Processing - run - 87 - end run - - - 2003-12-15T16:15:49 - 1071522949901 - 466 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:15:49 - 1071522949901 - 467 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:16:12 - 1071522972770 - 468 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3177173286 - - - - 2003-12-15T16:16:12 - 1071522972770 - 469 - org.codehaus.logger - INFO - Processing - run - 88 - start run - - - 2003-12-15T16:16:12 - 1071522972772 - 470 - org.codehaus.logger - INFO - Processing - run - 88 - end run - - - 2003-12-15T16:16:12 - 1071522972772 - 471 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:16:12 - 1071522972773 - 472 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:16:20 - 1071522980040 - 473 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3193709739 - - - - 2003-12-15T16:16:20 - 1071522980040 - 474 - org.codehaus.logger - INFO - Processing - run - 89 - start run - - - 2003-12-15T16:16:20 - 1071522980041 - 475 - org.codehaus.logger - INFO - Processing - run - 89 - end run - - - 2003-12-15T16:16:20 - 1071522980041 - 476 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:16:20 - 1071522980041 - 477 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:16:40 - 1071523000800 - 478 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3207179975 - - - - 2003-12-15T16:16:40 - 1071523000801 - 479 - org.codehaus.logger - INFO - Processing - run - 90 - start run - - - 2003-12-15T16:16:40 - 1071523000801 - 480 - org.codehaus.logger - INFO - Processing - run - 90 - end run - - - 2003-12-15T16:16:40 - 1071523000802 - 481 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:16:40 - 1071523000802 - 482 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:16:50 - 1071523010170 - 483 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3223859870 - - - - 2003-12-15T16:16:50 - 1071523010171 - 484 - org.codehaus.logger - INFO - Processing - run - 91 - start run - - - 2003-12-15T16:16:50 - 1071523010171 - 485 - org.codehaus.logger - INFO - Processing - run - 91 - end run - - - 2003-12-15T16:16:50 - 1071523010171 - 486 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:16:50 - 1071523010171 - 487 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:17:10 - 1071523030810 - 488 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3237182400 - - - - 2003-12-15T16:17:10 - 1071523030811 - 489 - org.codehaus.logger - INFO - Processing - run - 92 - start run - - - 2003-12-15T16:17:10 - 1071523030811 - 490 - org.codehaus.logger - INFO - Processing - run - 92 - end run - - - 2003-12-15T16:17:10 - 1071523030811 - 491 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:17:10 - 1071523030812 - 492 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:17:20 - 1071523040350 - 493 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3254019985 - - - - 2003-12-15T16:17:20 - 1071523040351 - 494 - org.codehaus.logger - INFO - Processing - run - 93 - start run - - - 2003-12-15T16:17:20 - 1071523040351 - 495 - org.codehaus.logger - INFO - Processing - run - 93 - end run - - - 2003-12-15T16:17:20 - 1071523040351 - 496 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:17:20 - 1071523040352 - 497 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:17:42 - 1071523062310 - 498 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3267203511 - - - - 2003-12-15T16:17:42 - 1071523062311 - 499 - org.codehaus.logger - INFO - Processing - run - 94 - start run - - - 2003-12-15T16:17:42 - 1071523062313 - 500 - org.codehaus.logger - INFO - Processing - run - 94 - end run - - - 2003-12-15T16:17:42 - 1071523062313 - 501 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:17:42 - 1071523062330 - 502 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:17:50 - 1071523070470 - 503 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3284170147 - - - - 2003-12-15T16:17:50 - 1071523070471 - 504 - org.codehaus.logger - INFO - Processing - run - 95 - start run - - - 2003-12-15T16:17:50 - 1071523070472 - 505 - org.codehaus.logger - INFO - Processing - run - 95 - end run - - - 2003-12-15T16:17:50 - 1071523070472 - 506 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:17:50 - 1071523070472 - 507 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:18:10 - 1071523090920 - 508 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3297260718 - - - - 2003-12-15T16:18:10 - 1071523090922 - 509 - org.codehaus.logger - INFO - Processing - run - 96 - start run - - - 2003-12-15T16:18:10 - 1071523090923 - 510 - org.codehaus.logger - INFO - Processing - run - 96 - end run - - - 2003-12-15T16:18:10 - 1071523090923 - 511 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:18:10 - 1071523090923 - 512 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:18:20 - 1071523100670 - 513 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3314320242 - - - - 2003-12-15T16:18:20 - 1071523100671 - 514 - org.codehaus.logger - INFO - Processing - run - 97 - start run - - - 2003-12-15T16:18:20 - 1071523100672 - 515 - org.codehaus.logger - INFO - Processing - run - 97 - end run - - - 2003-12-15T16:18:20 - 1071523100672 - 516 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:18:20 - 1071523100673 - 517 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:18:41 - 1071523121000 - 518 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3327330316 - - - - 2003-12-15T16:18:41 - 1071523121001 - 519 - org.codehaus.logger - INFO - Processing - run - 98 - start run - - - 2003-12-15T16:18:41 - 1071523121001 - 520 - org.codehaus.logger - INFO - Processing - run - 98 - end run - - - 2003-12-15T16:18:41 - 1071523121002 - 521 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:18:41 - 1071523121002 - 522 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:18:50 - 1071523130800 - 523 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3344460367 - - - - 2003-12-15T16:18:50 - 1071523130802 - 524 - org.codehaus.logger - INFO - Processing - run - 99 - start run - - - 2003-12-15T16:18:50 - 1071523130802 - 525 - org.codehaus.logger - INFO - Processing - run - 99 - end run - - - 2003-12-15T16:18:50 - 1071523130803 - 526 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:18:50 - 1071523130803 - 527 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:19:10 - 1071523150980 - 528 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3357335201 - - - - 2003-12-15T16:19:10 - 1071523150982 - 529 - org.codehaus.logger - INFO - Processing - run - 100 - start run - - - 2003-12-15T16:19:10 - 1071523150982 - 530 - org.codehaus.logger - INFO - Processing - run - 100 - end run - - - 2003-12-15T16:19:10 - 1071523150983 - 531 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:19:10 - 1071523150983 - 532 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:19:20 - 1071523160941 - 533 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3374610509 - - - - 2003-12-15T16:19:20 - 1071523160942 - 534 - org.codehaus.logger - INFO - Processing - run - 101 - start run - - - 2003-12-15T16:19:20 - 1071523160942 - 535 - org.codehaus.logger - INFO - Processing - run - 101 - end run - - - 2003-12-15T16:19:20 - 1071523160943 - 536 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:19:20 - 1071523160943 - 537 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:19:41 - 1071523181101 - 538 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3387405141 - - - - 2003-12-15T16:19:41 - 1071523181101 - 539 - org.codehaus.logger - INFO - Processing - run - 102 - start run - - - 2003-12-15T16:19:41 - 1071523181102 - 540 - org.codehaus.logger - INFO - Processing - run - 102 - end run - - - 2003-12-15T16:19:41 - 1071523181102 - 541 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:19:41 - 1071523181102 - 542 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:19:41 - 1071523181701 - 543 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T16:19:41 - 1071523181701 - 544 - org.codehaus.logger - INFO - Processing - run - 103 - start run - - - 2003-12-15T16:19:41 - 1071523181702 - 545 - org.codehaus.logger - INFO - Processing - run - 103 - end run - - - 2003-12-15T16:19:41 - 1071523181702 - 546 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:19:41 - 1071523181703 - 547 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:19:51 - 1071523191061 - 548 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3404760625 - - - - 2003-12-15T16:19:51 - 1071523191063 - 549 - org.codehaus.logger - INFO - Processing - run - 104 - start run - - - 2003-12-15T16:19:51 - 1071523191063 - 550 - org.codehaus.logger - INFO - Processing - run - 104 - end run - - - 2003-12-15T16:19:51 - 1071523191064 - 551 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:19:51 - 1071523191064 - 552 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:20:11 - 1071523211121 - 553 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3417436059 - - - - 2003-12-15T16:20:11 - 1071523211122 - 554 - org.codehaus.logger - INFO - Processing - run - 105 - start run - - - 2003-12-15T16:20:11 - 1071523211122 - 555 - org.codehaus.logger - INFO - Processing - run - 105 - end run - - - 2003-12-15T16:20:11 - 1071523211123 - 556 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:20:11 - 1071523211123 - 557 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:20:21 - 1071523221241 - 558 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3434940802 - - - - 2003-12-15T16:20:21 - 1071523221242 - 559 - org.codehaus.logger - INFO - Processing - run - 106 - start run - - - 2003-12-15T16:20:21 - 1071523221242 - 560 - org.codehaus.logger - INFO - Processing - run - 106 - end run - - - 2003-12-15T16:20:21 - 1071523221243 - 561 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:20:21 - 1071523221243 - 562 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:20:41 - 1071523241161 - 563 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3447478704 - - - - 2003-12-15T16:20:41 - 1071523241162 - 564 - org.codehaus.logger - INFO - Processing - run - 107 - start run - - - 2003-12-15T16:20:41 - 1071523241163 - 565 - org.codehaus.logger - INFO - Processing - run - 107 - end run - - - 2003-12-15T16:20:41 - 1071523241163 - 566 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:20:41 - 1071523241163 - 567 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:20:51 - 1071523251431 - 568 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3465080883 - - - - 2003-12-15T16:20:51 - 1071523251432 - 569 - org.codehaus.logger - INFO - Processing - run - 108 - start run - - - 2003-12-15T16:20:51 - 1071523251432 - 570 - org.codehaus.logger - INFO - Processing - run - 108 - end run - - - 2003-12-15T16:20:51 - 1071523251432 - 571 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:20:51 - 1071523251432 - 572 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:21:11 - 1071523271181 - 573 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3477482474 - - - - 2003-12-15T16:21:11 - 1071523271182 - 574 - org.codehaus.logger - INFO - Processing - run - 109 - start run - - - 2003-12-15T16:21:11 - 1071523271182 - 575 - org.codehaus.logger - INFO - Processing - run - 109 - end run - - - 2003-12-15T16:21:11 - 1071523271182 - 576 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:21:11 - 1071523271183 - 577 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:21:21 - 1071523281561 - 578 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3495221018 - - - - 2003-12-15T16:21:21 - 1071523281562 - 579 - org.codehaus.logger - INFO - Processing - run - 110 - start run - - - 2003-12-15T16:21:21 - 1071523281563 - 580 - org.codehaus.logger - INFO - Processing - run - 110 - end run - - - 2003-12-15T16:21:21 - 1071523281563 - 581 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:21:21 - 1071523281564 - 582 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:21:42 - 1071523302801 - 583 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3507536979 - - - - 2003-12-15T16:21:42 - 1071523302802 - 584 - org.codehaus.logger - INFO - Processing - run - 111 - start run - - - 2003-12-15T16:21:42 - 1071523302803 - 585 - org.codehaus.logger - INFO - Processing - run - 111 - end run - - - 2003-12-15T16:21:42 - 1071523302803 - 586 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:21:42 - 1071523302804 - 587 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:21:51 - 1071523311691 - 588 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3525371135 - - - - 2003-12-15T16:21:51 - 1071523311692 - 589 - org.codehaus.logger - INFO - Processing - run - 112 - start run - - - 2003-12-15T16:21:51 - 1071523311692 - 590 - org.codehaus.logger - INFO - Processing - run - 112 - end run - - - 2003-12-15T16:21:51 - 1071523311693 - 591 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:21:51 - 1071523311693 - 592 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:22:11 - 1071523331971 - 593 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3538255781 - - - - 2003-12-15T16:22:11 - 1071523331972 - 594 - org.codehaus.logger - INFO - Processing - run - 113 - start run - - - 2003-12-15T16:22:11 - 1071523331972 - 595 - org.codehaus.logger - INFO - Processing - run - 113 - end run - - - 2003-12-15T16:22:11 - 1071523331973 - 596 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:22:11 - 1071523331973 - 597 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:22:21 - 1071523341839 - 598 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3555538701 - - - - 2003-12-15T16:22:21 - 1071523341840 - 599 - org.codehaus.logger - INFO - Processing - run - 114 - start run - - - 2003-12-15T16:22:21 - 1071523341840 - 600 - org.codehaus.logger - INFO - Processing - run - 114 - end run - - - 2003-12-15T16:22:21 - 1071523341841 - 601 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:22:21 - 1071523341841 - 602 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:22:42 - 1071523362001 - 603 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3568302392 - - - - 2003-12-15T16:22:42 - 1071523362002 - 604 - org.codehaus.logger - INFO - Processing - run - 115 - start run - - - 2003-12-15T16:22:42 - 1071523362004 - 605 - org.codehaus.logger - INFO - Processing - run - 115 - end run - - - 2003-12-15T16:22:42 - 1071523362004 - 606 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:22:42 - 1071523362004 - 607 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:22:52 - 1071523372061 - 608 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3585711422 - - - - 2003-12-15T16:22:52 - 1071523372063 - 609 - org.codehaus.logger - INFO - Processing - run - 116 - start run - - - 2003-12-15T16:22:52 - 1071523372065 - 610 - org.codehaus.logger - INFO - Processing - run - 116 - end run - - - 2003-12-15T16:22:52 - 1071523372065 - 611 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:22:52 - 1071523372065 - 612 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:23:13 - 1071523393322 - 613 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3598304943 - - - - 2003-12-15T16:23:13 - 1071523393323 - 614 - org.codehaus.logger - INFO - Processing - run - 117 - start run - - - 2003-12-15T16:23:13 - 1071523393323 - 615 - org.codehaus.logger - INFO - Processing - run - 117 - end run - - - 2003-12-15T16:23:13 - 1071523393327 - 616 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:23:13 - 1071523393327 - 617 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:23:22 - 1071523402192 - 618 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3615851570 - - - - 2003-12-15T16:23:22 - 1071523402192 - 619 - org.codehaus.logger - INFO - Processing - run - 118 - start run - - - 2003-12-15T16:23:22 - 1071523402193 - 620 - org.codehaus.logger - INFO - Processing - run - 118 - end run - - - 2003-12-15T16:23:22 - 1071523402193 - 621 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:23:22 - 1071523402193 - 622 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:23:42 - 1071523422062 - 623 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3628360940 - - - - 2003-12-15T16:23:42 - 1071523422062 - 624 - org.codehaus.logger - INFO - Processing - run - 119 - start run - - - 2003-12-15T16:23:42 - 1071523422063 - 625 - org.codehaus.logger - INFO - Processing - run - 119 - end run - - - 2003-12-15T16:23:42 - 1071523422063 - 626 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:23:42 - 1071523422064 - 627 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:23:52 - 1071523432322 - 628 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3646011741 - - - - 2003-12-15T16:23:52 - 1071523432322 - 629 - org.codehaus.logger - INFO - Processing - run - 120 - start run - - - 2003-12-15T16:23:52 - 1071523432323 - 630 - org.codehaus.logger - INFO - Processing - run - 120 - end run - - - 2003-12-15T16:23:52 - 1071523432323 - 631 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:23:52 - 1071523432323 - 632 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:24:13 - 1071523453332 - 633 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3658364345 - - - - 2003-12-15T16:24:13 - 1071523453333 - 634 - org.codehaus.logger - INFO - Processing - run - 121 - start run - - - 2003-12-15T16:24:13 - 1071523453333 - 635 - org.codehaus.logger - INFO - Processing - run - 121 - end run - - - 2003-12-15T16:24:13 - 1071523453334 - 636 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:24:13 - 1071523453334 - 637 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:24:22 - 1071523462512 - 638 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3676161831 - - - - 2003-12-15T16:24:22 - 1071523462512 - 639 - org.codehaus.logger - INFO - Processing - run - 122 - start run - - - 2003-12-15T16:24:22 - 1071523462513 - 640 - org.codehaus.logger - INFO - Processing - run - 122 - end run - - - 2003-12-15T16:24:22 - 1071523462513 - 641 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:24:22 - 1071523462513 - 642 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:24:41 - 1071523481892 - 643 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T16:24:41 - 1071523481893 - 644 - org.codehaus.logger - INFO - Processing - run - 123 - start run - - - 2003-12-15T16:24:41 - 1071523481893 - 645 - org.codehaus.logger - INFO - Processing - run - 123 - end run - - - 2003-12-15T16:24:41 - 1071523481895 - 646 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:24:41 - 1071523481928 - 647 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:24:42 - 1071523482132 - 648 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3688366935 - - - - 2003-12-15T16:24:42 - 1071523482133 - 649 - org.codehaus.logger - INFO - Processing - run - 124 - start run - - - 2003-12-15T16:24:42 - 1071523482133 - 650 - org.codehaus.logger - INFO - Processing - run - 124 - end run - - - 2003-12-15T16:24:42 - 1071523482133 - 651 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:24:42 - 1071523482168 - 652 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:24:52 - 1071523492612 - 653 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3706311967 - - - - 2003-12-15T16:24:52 - 1071523492613 - 654 - org.codehaus.logger - INFO - Processing - run - 125 - start run - - - 2003-12-15T16:24:52 - 1071523492613 - 655 - org.codehaus.logger - INFO - Processing - run - 125 - end run - - - 2003-12-15T16:24:52 - 1071523492614 - 656 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:24:52 - 1071523492614 - 657 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:25:12 - 1071523512122 - 658 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3718368915 - - - - 2003-12-15T16:25:12 - 1071523512123 - 659 - org.codehaus.logger - INFO - Processing - run - 126 - start run - - - 2003-12-15T16:25:12 - 1071523512123 - 660 - org.codehaus.logger - INFO - Processing - run - 126 - end run - - - 2003-12-15T16:25:12 - 1071523512124 - 661 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:25:12 - 1071523512124 - 662 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:25:22 - 1071523522802 - 663 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3736462106 - - - - 2003-12-15T16:25:22 - 1071523522803 - 664 - org.codehaus.logger - INFO - Processing - run - 127 - start run - - - 2003-12-15T16:25:22 - 1071523522803 - 665 - org.codehaus.logger - INFO - Processing - run - 127 - end run - - - 2003-12-15T16:25:22 - 1071523522803 - 666 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:25:22 - 1071523522805 - 667 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:25:43 - 1071523543322 - 668 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3748370258 - - - - 2003-12-15T16:25:43 - 1071523543323 - 669 - org.codehaus.logger - INFO - Processing - run - 128 - start run - - - 2003-12-15T16:25:43 - 1071523543323 - 670 - org.codehaus.logger - INFO - Processing - run - 128 - end run - - - 2003-12-15T16:25:43 - 1071523543324 - 671 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:25:43 - 1071523543324 - 672 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:25:52 - 1071523552942 - 673 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3766612246 - - - - 2003-12-15T16:25:52 - 1071523552943 - 674 - org.codehaus.logger - INFO - Processing - run - 129 - start run - - - 2003-12-15T16:25:52 - 1071523552944 - 675 - org.codehaus.logger - INFO - Processing - run - 129 - end run - - - 2003-12-15T16:25:52 - 1071523552945 - 676 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:25:52 - 1071523552945 - 677 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:26:12 - 1071523572142 - 678 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3778371492 - - - - 2003-12-15T16:26:12 - 1071523572144 - 679 - org.codehaus.logger - INFO - Processing - run - 130 - start run - - - 2003-12-15T16:26:12 - 1071523572144 - 680 - org.codehaus.logger - INFO - Processing - run - 130 - end run - - - 2003-12-15T16:26:12 - 1071523572145 - 681 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:26:12 - 1071523572145 - 682 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:26:23 - 1071523583063 - 683 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3796762390 - - - - 2003-12-15T16:26:23 - 1071523583064 - 684 - org.codehaus.logger - INFO - Processing - run - 131 - start run - - - 2003-12-15T16:26:23 - 1071523583064 - 685 - org.codehaus.logger - INFO - Processing - run - 131 - end run - - - 2003-12-15T16:26:23 - 1071523583065 - 686 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:26:23 - 1071523583065 - 687 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:26:42 - 1071523602143 - 688 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3808372957 - - - - 2003-12-15T16:26:42 - 1071523602144 - 689 - org.codehaus.logger - INFO - Processing - run - 132 - start run - - - 2003-12-15T16:26:42 - 1071523602144 - 690 - org.codehaus.logger - INFO - Processing - run - 132 - end run - - - 2003-12-15T16:26:42 - 1071523602145 - 691 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:26:42 - 1071523602145 - 692 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:26:53 - 1071523613223 - 693 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3826922538 - - - - 2003-12-15T16:26:53 - 1071523613224 - 694 - org.codehaus.logger - INFO - Processing - run - 133 - start run - - - 2003-12-15T16:26:53 - 1071523613225 - 695 - org.codehaus.logger - INFO - Processing - run - 133 - end run - - - 2003-12-15T16:26:53 - 1071523613225 - 696 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:26:53 - 1071523613225 - 697 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:27:13 - 1071523633323 - 698 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3838374514 - - - - 2003-12-15T16:27:13 - 1071523633323 - 699 - org.codehaus.logger - INFO - Processing - run - 134 - start run - - - 2003-12-15T16:27:13 - 1071523633324 - 700 - org.codehaus.logger - INFO - Processing - run - 134 - end run - - - 2003-12-15T16:27:13 - 1071523633324 - 701 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:27:13 - 1071523633324 - 702 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:27:23 - 1071523643393 - 703 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3857062672 - - - - 2003-12-15T16:27:23 - 1071523643394 - 704 - org.codehaus.logger - INFO - Processing - run - 135 - start run - - - 2003-12-15T16:27:23 - 1071523643396 - 705 - org.codehaus.logger - INFO - Processing - run - 135 - end run - - - 2003-12-15T16:27:23 - 1071523643396 - 706 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:27:23 - 1071523643397 - 707 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:27:42 - 1071523662183 - 708 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3868379236 - - - - 2003-12-15T16:27:42 - 1071523662183 - 709 - org.codehaus.logger - INFO - Processing - run - 136 - start run - - - 2003-12-15T16:27:42 - 1071523662184 - 710 - org.codehaus.logger - INFO - Processing - run - 136 - end run - - - 2003-12-15T16:27:42 - 1071523662184 - 711 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:27:42 - 1071523662184 - 712 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:27:53 - 1071523673533 - 713 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3887212835 - - - - 2003-12-15T16:27:53 - 1071523673534 - 714 - org.codehaus.logger - INFO - Processing - run - 137 - start run - - - 2003-12-15T16:27:53 - 1071523673535 - 715 - org.codehaus.logger - INFO - Processing - run - 137 - end run - - - 2003-12-15T16:27:53 - 1071523673535 - 716 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:27:53 - 1071523673535 - 717 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:28:12 - 1071523692183 - 718 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3898384453 - - - - 2003-12-15T16:28:12 - 1071523692184 - 719 - org.codehaus.logger - INFO - Processing - run - 138 - start run - - - 2003-12-15T16:28:12 - 1071523692184 - 720 - org.codehaus.logger - INFO - Processing - run - 138 - end run - - - 2003-12-15T16:28:12 - 1071523692185 - 721 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:28:12 - 1071523692185 - 722 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:28:23 - 1071523703693 - 723 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3917362962 - - - - 2003-12-15T16:28:23 - 1071523703694 - 724 - org.codehaus.logger - INFO - Processing - run - 139 - start run - - - 2003-12-15T16:28:23 - 1071523703695 - 725 - org.codehaus.logger - INFO - Processing - run - 139 - end run - - - 2003-12-15T16:28:23 - 1071523703696 - 726 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:28:23 - 1071523703696 - 727 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:28:43 - 1071523723373 - 728 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3928387516 - - - - 2003-12-15T16:28:43 - 1071523723374 - 729 - org.codehaus.logger - INFO - Processing - run - 140 - start run - - - 2003-12-15T16:28:43 - 1071523723374 - 730 - org.codehaus.logger - INFO - Processing - run - 140 - end run - - - 2003-12-15T16:28:43 - 1071523723375 - 731 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:28:43 - 1071523723375 - 732 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:28:53 - 1071523733823 - 733 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3947513103 - - - - 2003-12-15T16:28:53 - 1071523733824 - 734 - org.codehaus.logger - INFO - Processing - run - 141 - start run - - - 2003-12-15T16:28:53 - 1071523733825 - 735 - org.codehaus.logger - INFO - Processing - run - 141 - end run - - - 2003-12-15T16:28:53 - 1071523733825 - 736 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:28:53 - 1071523733826 - 737 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:29:13 - 1071523753873 - 738 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3958389425 - - - - 2003-12-15T16:29:13 - 1071523753874 - 739 - org.codehaus.logger - INFO - Processing - run - 142 - start run - - - 2003-12-15T16:29:13 - 1071523753874 - 740 - org.codehaus.logger - INFO - Processing - run - 142 - end run - - - 2003-12-15T16:29:13 - 1071523753875 - 741 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:29:13 - 1071523753875 - 742 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:29:24 - 1071523764013 - 743 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3977673264 - - - - 2003-12-15T16:29:24 - 1071523764014 - 744 - org.codehaus.logger - INFO - Processing - run - 143 - start run - - - 2003-12-15T16:29:24 - 1071523764016 - 745 - org.codehaus.logger - INFO - Processing - run - 143 - end run - - - 2003-12-15T16:29:24 - 1071523764017 - 746 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:29:24 - 1071523764017 - 747 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:29:42 - 1071523782013 - 748 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T16:29:42 - 1071523782015 - 749 - org.codehaus.logger - INFO - Processing - run - 144 - start run - - - 2003-12-15T16:29:42 - 1071523782017 - 750 - org.codehaus.logger - INFO - Processing - run - 144 - end run - - - 2003-12-15T16:29:42 - 1071523782018 - 751 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:29:42 - 1071523782018 - 752 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:29:42 - 1071523782194 - 753 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3988391645 - - - - 2003-12-15T16:29:42 - 1071523782195 - 754 - org.codehaus.logger - INFO - Processing - run - 145 - start run - - - 2003-12-15T16:29:42 - 1071523782195 - 755 - org.codehaus.logger - INFO - Processing - run - 145 - end run - - - 2003-12-15T16:29:42 - 1071523782196 - 756 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:29:42 - 1071523782196 - 757 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:29:54 - 1071523794183 - 758 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4007833401 - - - - 2003-12-15T16:29:54 - 1071523794184 - 759 - org.codehaus.logger - INFO - Processing - run - 146 - start run - - - 2003-12-15T16:29:54 - 1071523794184 - 760 - org.codehaus.logger - INFO - Processing - run - 146 - end run - - - 2003-12-15T16:29:54 - 1071523794185 - 761 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:29:54 - 1071523794185 - 762 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:30:12 - 1071523812203 - 763 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG4018407513 - - - - 2003-12-15T16:30:12 - 1071523812204 - 764 - org.codehaus.logger - INFO - Processing - run - 147 - start run - - - 2003-12-15T16:30:12 - 1071523812205 - 765 - org.codehaus.logger - INFO - Processing - run - 147 - end run - - - 2003-12-15T16:30:12 - 1071523812205 - 766 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:30:12 - 1071523812205 - 767 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:30:24 - 1071523824334 - 768 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4038003537 - - - - 2003-12-15T16:30:24 - 1071523824335 - 769 - org.codehaus.logger - INFO - Processing - run - 148 - start run - - - 2003-12-15T16:30:24 - 1071523824335 - 770 - org.codehaus.logger - INFO - Processing - run - 148 - end run - - - 2003-12-15T16:30:24 - 1071523824336 - 771 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:30:24 - 1071523824336 - 772 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:30:42 - 1071523842214 - 773 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG4048430215 - - - - 2003-12-15T16:30:42 - 1071523842215 - 774 - org.codehaus.logger - INFO - Processing - run - 149 - start run - - - 2003-12-15T16:30:42 - 1071523842215 - 775 - org.codehaus.logger - INFO - Processing - run - 149 - end run - - - 2003-12-15T16:30:42 - 1071523842216 - 776 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:30:42 - 1071523842250 - 777 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:30:54 - 1071523854454 - 778 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4068143592 - - - - 2003-12-15T16:30:54 - 1071523854454 - 779 - org.codehaus.logger - INFO - Processing - run - 150 - start run - - - 2003-12-15T16:30:54 - 1071523854455 - 780 - org.codehaus.logger - INFO - Processing - run - 150 - end run - - - 2003-12-15T16:30:54 - 1071523854455 - 781 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:30:54 - 1071523854488 - 782 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:31:12 - 1071523872274 - 783 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG4078432148 - - - - 2003-12-15T16:31:12 - 1071523872276 - 784 - org.codehaus.logger - INFO - Processing - run - 151 - start run - - - 2003-12-15T16:31:12 - 1071523872276 - 785 - org.codehaus.logger - INFO - Processing - run - 151 - end run - - - 2003-12-15T16:31:12 - 1071523872276 - 786 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:31:12 - 1071523872276 - 787 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:31:24 - 1071523884634 - 788 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4098293689 - - - - 2003-12-15T16:31:24 - 1071523884634 - 789 - org.codehaus.logger - INFO - Processing - run - 152 - start run - - - 2003-12-15T16:31:24 - 1071523884635 - 790 - org.codehaus.logger - INFO - Processing - run - 152 - end run - - - 2003-12-15T16:31:24 - 1071523884635 - 791 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:31:24 - 1071523884635 - 792 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:31:42 - 1071523902274 - 793 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG4108435976 - - - - 2003-12-15T16:31:42 - 1071523902274 - 794 - org.codehaus.logger - INFO - Processing - run - 153 - start run - - - 2003-12-15T16:31:42 - 1071523902275 - 795 - org.codehaus.logger - INFO - Processing - run - 153 - end run - - - 2003-12-15T16:31:42 - 1071523902275 - 796 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:31:42 - 1071523902276 - 797 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:31:54 - 1071523914774 - 798 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4128443786 - - - - 2003-12-15T16:31:54 - 1071523914775 - 799 - org.codehaus.logger - INFO - Processing - run - 154 - start run - - - 2003-12-15T16:31:54 - 1071523914775 - 800 - org.codehaus.logger - INFO - Processing - run - 154 - end run - - - 2003-12-15T16:31:54 - 1071523914776 - 801 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:31:54 - 1071523914811 - 802 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:32:12 - 1071523932244 - 803 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG4138438071 - - - - 2003-12-15T16:32:12 - 1071523932246 - 804 - org.codehaus.logger - INFO - Processing - run - 155 - start run - - - 2003-12-15T16:32:12 - 1071523932246 - 805 - org.codehaus.logger - INFO - Processing - run - 155 - end run - - - 2003-12-15T16:32:12 - 1071523932246 - 806 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:32:12 - 1071523932247 - 807 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:32:24 - 1071523944924 - 808 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4158583889 - - - - 2003-12-15T16:32:24 - 1071523944925 - 809 - org.codehaus.logger - INFO - Processing - run - 156 - start run - - - 2003-12-15T16:32:24 - 1071523944925 - 810 - org.codehaus.logger - INFO - Processing - run - 156 - end run - - - 2003-12-15T16:32:24 - 1071523944925 - 811 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:32:24 - 1071523944925 - 812 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:32:42 - 1071523962264 - 813 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG4168443195 - - - - 2003-12-15T16:32:42 - 1071523962265 - 814 - org.codehaus.logger - INFO - Processing - run - 157 - start run - - - 2003-12-15T16:32:42 - 1071523962265 - 815 - org.codehaus.logger - INFO - Processing - run - 157 - end run - - - 2003-12-15T16:32:42 - 1071523962265 - 816 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:32:42 - 1071523962265 - 817 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:32:55 - 1071523975094 - 818 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4188743992 - - - - 2003-12-15T16:32:55 - 1071523975095 - 819 - org.codehaus.logger - INFO - Processing - run - 158 - start run - - - 2003-12-15T16:32:55 - 1071523975095 - 820 - org.codehaus.logger - INFO - Processing - run - 158 - end run - - - 2003-12-15T16:32:55 - 1071523975096 - 821 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:32:55 - 1071523975096 - 822 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:33:12 - 1071523992314 - 823 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG4198455058 - - - - 2003-12-15T16:33:12 - 1071523992316 - 824 - org.codehaus.logger - INFO - Processing - run - 159 - start run - - - 2003-12-15T16:33:12 - 1071523992317 - 825 - org.codehaus.logger - INFO - Processing - run - 159 - end run - - - 2003-12-15T16:33:12 - 1071523992317 - 826 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:33:12 - 1071523992317 - 827 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:33:25 - 1071524005224 - 828 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4218914082 - - - - 2003-12-15T16:33:25 - 1071524005225 - 829 - org.codehaus.logger - INFO - Processing - run - 160 - start run - - - 2003-12-15T16:33:25 - 1071524005226 - 830 - org.codehaus.logger - INFO - Processing - run - 160 - end run - - - 2003-12-15T16:33:25 - 1071524005226 - 831 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:33:25 - 1071524005226 - 832 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:33:44 - 1071524024904 - 833 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG4229065061 - - - - 2003-12-15T16:33:44 - 1071524024905 - 834 - org.codehaus.logger - INFO - Processing - run - 161 - start run - - - 2003-12-15T16:33:44 - 1071524024906 - 835 - org.codehaus.logger - INFO - Processing - run - 161 - end run - - - 2003-12-15T16:33:44 - 1071524024906 - 836 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:33:44 - 1071524024907 - 837 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:33:55 - 1071524035404 - 838 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4249074186 - - - - 2003-12-15T16:33:55 - 1071524035405 - 839 - org.codehaus.logger - INFO - Processing - run - 162 - start run - - - 2003-12-15T16:33:55 - 1071524035405 - 840 - org.codehaus.logger - INFO - Processing - run - 162 - end run - - - 2003-12-15T16:33:55 - 1071524035405 - 841 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:33:55 - 1071524035406 - 842 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:34:12 - 1071524052934 - 843 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG4259067452 - - - - 2003-12-15T16:34:12 - 1071524052935 - 844 - org.codehaus.logger - INFO - Processing - run - 163 - start run - - - 2003-12-15T16:34:12 - 1071524052935 - 845 - org.codehaus.logger - INFO - Processing - run - 163 - end run - - - 2003-12-15T16:34:12 - 1071524052936 - 846 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:34:12 - 1071524052936 - 847 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:34:25 - 1071524065514 - 848 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4279214291 - - - - 2003-12-15T16:34:25 - 1071524065516 - 849 - org.codehaus.logger - INFO - Processing - run - 164 - start run - - - 2003-12-15T16:34:25 - 1071524065516 - 850 - org.codehaus.logger - INFO - Processing - run - 164 - end run - - - 2003-12-15T16:34:25 - 1071524065517 - 851 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:34:25 - 1071524065517 - 852 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:34:41 - 1071524081954 - 853 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T16:34:41 - 1071524081956 - 854 - org.codehaus.logger - INFO - Processing - run - 165 - start run - - - 2003-12-15T16:34:41 - 1071524081956 - 855 - org.codehaus.logger - INFO - Processing - run - 165 - end run - - - 2003-12-15T16:34:41 - 1071524081957 - 856 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:34:41 - 1071524081957 - 857 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:34:42 - 1071524082914 - 858 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG4289069565 - - - - 2003-12-15T16:34:42 - 1071524082915 - 859 - org.codehaus.logger - INFO - Processing - run - 166 - start run - - - 2003-12-15T16:34:42 - 1071524082916 - 860 - org.codehaus.logger - INFO - Processing - run - 166 - end run - - - 2003-12-15T16:34:42 - 1071524082917 - 861 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:34:42 - 1071524082917 - 862 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:34:55 - 1071524095704 - 863 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG14397098 - - - - 2003-12-15T16:34:55 - 1071524095706 - 864 - org.codehaus.logger - INFO - Processing - run - 167 - start run - - - 2003-12-15T16:34:55 - 1071524095706 - 865 - org.codehaus.logger - INFO - Processing - run - 167 - end run - - - 2003-12-15T16:34:55 - 1071524095707 - 866 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:34:55 - 1071524095707 - 867 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:35:12 - 1071524112984 - 868 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG24105826 - - - - 2003-12-15T16:35:12 - 1071524112986 - 869 - org.codehaus.logger - INFO - Processing - run - 168 - start run - - - 2003-12-15T16:35:12 - 1071524112986 - 870 - org.codehaus.logger - INFO - Processing - run - 168 - end run - - - 2003-12-15T16:35:12 - 1071524112987 - 871 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:35:12 - 1071524112987 - 872 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:35:25 - 1071524125825 - 873 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG44547200 - - - - 2003-12-15T16:35:25 - 1071524125825 - 874 - org.codehaus.logger - INFO - Processing - run - 169 - start run - - - 2003-12-15T16:35:25 - 1071524125825 - 875 - org.codehaus.logger - INFO - Processing - run - 169 - end run - - - 2003-12-15T16:35:25 - 1071524125826 - 876 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:35:25 - 1071524125827 - 877 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:35:42 - 1071524142935 - 878 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG54111301 - - - - 2003-12-15T16:35:42 - 1071524142935 - 879 - org.codehaus.logger - INFO - Processing - run - 170 - start run - - - 2003-12-15T16:35:42 - 1071524142936 - 880 - org.codehaus.logger - INFO - Processing - run - 170 - end run - - - 2003-12-15T16:35:42 - 1071524142936 - 881 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:35:42 - 1071524142936 - 882 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:35:55 - 1071524155965 - 883 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG74697311 - - - - 2003-12-15T16:35:55 - 1071524155965 - 884 - org.codehaus.logger - INFO - Processing - run - 171 - start run - - - 2003-12-15T16:35:55 - 1071524155966 - 885 - org.codehaus.logger - INFO - Processing - run - 171 - end run - - - 2003-12-15T16:35:55 - 1071524155966 - 886 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:35:55 - 1071524155966 - 887 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:36:12 - 1071524172965 - 888 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG84115382 - - - - 2003-12-15T16:36:12 - 1071524172965 - 889 - org.codehaus.logger - INFO - Processing - run - 172 - start run - - - 2003-12-15T16:36:12 - 1071524172966 - 890 - org.codehaus.logger - INFO - Processing - run - 172 - end run - - - 2003-12-15T16:36:12 - 1071524172966 - 891 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:36:12 - 1071524172966 - 892 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:36:26 - 1071524186125 - 893 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG104847414 - - - - 2003-12-15T16:36:26 - 1071524186125 - 894 - org.codehaus.logger - INFO - Processing - run - 173 - start run - - - 2003-12-15T16:36:26 - 1071524186126 - 895 - org.codehaus.logger - INFO - Processing - run - 173 - end run - - - 2003-12-15T16:36:26 - 1071524186126 - 896 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:36:26 - 1071524186126 - 897 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:36:53 - 1071524213335 - 898 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG114118398 - - - - 2003-12-15T16:36:53 - 1071524213336 - 899 - org.codehaus.logger - INFO - Processing - run - 174 - start run - - - 2003-12-15T16:36:53 - 1071524213336 - 900 - org.codehaus.logger - INFO - Processing - run - 174 - end run - - - 2003-12-15T16:36:53 - 1071524213336 - 901 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:36:53 - 1071524213338 - 902 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:36:56 - 1071524216315 - 903 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG134997548 - - - - 2003-12-15T16:36:56 - 1071524216316 - 904 - org.codehaus.logger - INFO - Processing - run - 175 - start run - - - 2003-12-15T16:36:56 - 1071524216316 - 905 - org.codehaus.logger - INFO - Processing - run - 175 - end run - - - 2003-12-15T16:36:56 - 1071524216316 - 906 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:36:56 - 1071524216316 - 907 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:37:13 - 1071524233015 - 908 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG144120726 - - - - 2003-12-15T16:37:13 - 1071524233016 - 909 - org.codehaus.logger - INFO - Processing - run - 176 - start run - - - 2003-12-15T16:37:13 - 1071524233016 - 910 - org.codehaus.logger - INFO - Processing - run - 176 - end run - - - 2003-12-15T16:37:13 - 1071524233016 - 911 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:37:13 - 1071524233017 - 912 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:37:26 - 1071524246445 - 913 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG165157631 - - - - 2003-12-15T16:37:26 - 1071524246446 - 914 - org.codehaus.logger - INFO - Processing - run - 177 - start run - - - 2003-12-15T16:37:26 - 1071524246446 - 915 - org.codehaus.logger - INFO - Processing - run - 177 - end run - - - 2003-12-15T16:37:26 - 1071524246446 - 916 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:37:26 - 1071524246446 - 917 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:37:42 - 1071524262995 - 918 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG174123352 - - - - 2003-12-15T16:37:42 - 1071524262996 - 919 - org.codehaus.logger - INFO - Processing - run - 178 - start run - - - 2003-12-15T16:37:42 - 1071524262996 - 920 - org.codehaus.logger - INFO - Processing - run - 178 - end run - - - 2003-12-15T16:37:42 - 1071524262997 - 921 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:37:42 - 1071524262997 - 922 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:37:56 - 1071524276555 - 923 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG195277746 - - - - 2003-12-15T16:37:56 - 1071524276556 - 924 - org.codehaus.logger - INFO - Processing - run - 179 - start run - - - 2003-12-15T16:37:56 - 1071524276557 - 925 - org.codehaus.logger - INFO - Processing - run - 179 - end run - - - 2003-12-15T16:37:56 - 1071524276557 - 926 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:37:56 - 1071524276557 - 927 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:38:12 - 1071524292995 - 928 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG204125291 - - - - 2003-12-15T16:38:12 - 1071524292996 - 929 - org.codehaus.logger - INFO - Processing - run - 180 - start run - - - 2003-12-15T16:38:12 - 1071524292996 - 930 - org.codehaus.logger - INFO - Processing - run - 180 - end run - - - 2003-12-15T16:38:12 - 1071524292997 - 931 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:38:12 - 1071524292997 - 932 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:38:26 - 1071524306715 - 933 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG225417854 - - - - 2003-12-15T16:38:26 - 1071524306716 - 934 - org.codehaus.logger - INFO - Processing - run - 181 - start run - - - 2003-12-15T16:38:26 - 1071524306717 - 935 - org.codehaus.logger - INFO - Processing - run - 181 - end run - - - 2003-12-15T16:38:26 - 1071524306718 - 936 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:38:26 - 1071524306718 - 937 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:38:42 - 1071524322995 - 938 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG234127965 - - - - 2003-12-15T16:38:42 - 1071524322996 - 939 - org.codehaus.logger - INFO - Processing - run - 182 - start run - - - 2003-12-15T16:38:42 - 1071524322996 - 940 - org.codehaus.logger - INFO - Processing - run - 182 - end run - - - 2003-12-15T16:38:42 - 1071524322998 - 941 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:38:42 - 1071524322998 - 942 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:38:56 - 1071524336855 - 943 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG255567973 - - - - 2003-12-15T16:38:56 - 1071524336857 - 944 - org.codehaus.logger - INFO - Processing - run - 183 - start run - - - 2003-12-15T16:38:56 - 1071524336857 - 945 - org.codehaus.logger - INFO - Processing - run - 183 - end run - - - 2003-12-15T16:38:56 - 1071524336858 - 946 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:38:56 - 1071524336858 - 947 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:39:12 - 1071524352995 - 948 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG264129408 - - - - 2003-12-15T16:39:12 - 1071524352997 - 949 - org.codehaus.logger - INFO - Processing - run - 184 - start run - - - 2003-12-15T16:39:12 - 1071524352997 - 950 - org.codehaus.logger - INFO - Processing - run - 184 - end run - - - 2003-12-15T16:39:12 - 1071524352997 - 951 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:39:13 - 1071524353030 - 952 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:39:27 - 1071524367045 - 953 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG285718541 - - - - 2003-12-15T16:39:27 - 1071524367047 - 954 - org.codehaus.logger - INFO - Processing - run - 185 - start run - - - 2003-12-15T16:39:27 - 1071524367047 - 955 - org.codehaus.logger - INFO - Processing - run - 185 - end run - - - 2003-12-15T16:39:27 - 1071524367048 - 956 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:39:27 - 1071524367048 - 957 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:39:41 - 1071524381865 - 958 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T16:39:41 - 1071524381866 - 959 - org.codehaus.logger - INFO - Processing - run - 186 - start run - - - 2003-12-15T16:39:41 - 1071524381867 - 960 - org.codehaus.logger - INFO - Processing - run - 186 - end run - - - 2003-12-15T16:39:41 - 1071524381867 - 961 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:39:41 - 1071524381867 - 962 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:39:43 - 1071524383015 - 963 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG294132799 - - - - 2003-12-15T16:39:43 - 1071524383016 - 964 - org.codehaus.logger - INFO - Processing - run - 187 - start run - - - 2003-12-15T16:39:43 - 1071524383016 - 965 - org.codehaus.logger - INFO - Processing - run - 187 - end run - - - 2003-12-15T16:39:43 - 1071524383017 - 966 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:39:43 - 1071524383017 - 967 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:39:57 - 1071524397186 - 968 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG315878193 - - - - 2003-12-15T16:39:57 - 1071524397186 - 969 - org.codehaus.logger - INFO - Processing - run - 188 - start run - - - 2003-12-15T16:39:57 - 1071524397187 - 970 - org.codehaus.logger - INFO - Processing - run - 188 - end run - - - 2003-12-15T16:39:57 - 1071524397187 - 971 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:39:57 - 1071524397187 - 972 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:40:13 - 1071524413026 - 973 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG324134485 - - - - 2003-12-15T16:40:13 - 1071524413026 - 974 - org.codehaus.logger - INFO - Processing - run - 189 - start run - - - 2003-12-15T16:40:13 - 1071524413027 - 975 - org.codehaus.logger - INFO - Processing - run - 189 - end run - - - 2003-12-15T16:40:13 - 1071524413027 - 976 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:40:13 - 1071524413027 - 977 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:40:27 - 1071524427326 - 978 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG346018544 - - - - 2003-12-15T16:40:27 - 1071524427327 - 979 - org.codehaus.logger - INFO - Processing - run - 190 - start run - - - 2003-12-15T16:40:27 - 1071524427423 - 980 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:40:27 - 1071524427423 - 981 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:40:27 - 1071524427424 - 982 - org.codehaus.logger - INFO - Processing - run - 190 - end run - - - 2003-12-15T16:40:43 - 1071524443026 - 983 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG354136559 - - - - 2003-12-15T16:40:43 - 1071524443026 - 984 - org.codehaus.logger - INFO - Processing - run - 191 - start run - - - 2003-12-15T16:40:43 - 1071524443027 - 985 - org.codehaus.logger - INFO - Processing - run - 191 - end run - - - 2003-12-15T16:40:43 - 1071524443027 - 986 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:40:43 - 1071524443027 - 987 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:40:57 - 1071524457486 - 988 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG376182097 - - - - 2003-12-15T16:40:57 - 1071524457487 - 989 - org.codehaus.logger - INFO - Processing - run - 192 - start run - - - 2003-12-15T16:40:57 - 1071524457487 - 990 - org.codehaus.logger - INFO - Processing - run - 192 - end run - - - 2003-12-15T16:40:57 - 1071524457488 - 991 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:40:57 - 1071524457488 - 992 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:41:13 - 1071524473086 - 993 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG384138913 - - - - 2003-12-15T16:41:13 - 1071524473087 - 994 - org.codehaus.logger - INFO - Processing - run - 193 - start run - - - 2003-12-15T16:41:13 - 1071524473087 - 995 - org.codehaus.logger - INFO - Processing - run - 193 - end run - - - 2003-12-15T16:41:13 - 1071524473088 - 996 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:41:13 - 1071524473088 - 997 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:41:27 - 1071524487586 - 998 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG406308544 - - - - 2003-12-15T16:41:27 - 1071524487588 - 999 - org.codehaus.logger - INFO - Processing - run - 194 - start run - - - 2003-12-15T16:41:27 - 1071524487588 - 1000 - org.codehaus.logger - INFO - Processing - run - 194 - end run - - - 2003-12-15T16:41:27 - 1071524487589 - 1001 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:41:27 - 1071524487589 - 1002 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:41:43 - 1071524503076 - 1003 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG414140739 - - - - 2003-12-15T16:41:43 - 1071524503077 - 1004 - org.codehaus.logger - INFO - Processing - run - 195 - start run - - - 2003-12-15T16:41:43 - 1071524503077 - 1005 - org.codehaus.logger - INFO - Processing - run - 195 - end run - - - 2003-12-15T16:41:43 - 1071524503077 - 1006 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:41:43 - 1071524503078 - 1007 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:41:57 - 1071524517789 - 1008 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG436458671 - - - - 2003-12-15T16:41:57 - 1071524517791 - 1009 - org.codehaus.logger - INFO - Processing - run - 196 - start run - - - 2003-12-15T16:41:57 - 1071524517791 - 1010 - org.codehaus.logger - INFO - Processing - run - 196 - end run - - - 2003-12-15T16:41:57 - 1071524517792 - 1011 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:41:57 - 1071524517792 - 1012 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:42:13 - 1071524533066 - 1013 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG444142352 - - - - 2003-12-15T16:42:13 - 1071524533067 - 1014 - org.codehaus.logger - INFO - Processing - run - 197 - start run - - - 2003-12-15T16:42:13 - 1071524533067 - 1015 - org.codehaus.logger - INFO - Processing - run - 197 - end run - - - 2003-12-15T16:42:13 - 1071524533067 - 1016 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:42:13 - 1071524533068 - 1017 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:42:27 - 1071524547906 - 1018 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG466608824 - - - - 2003-12-15T16:42:27 - 1071524547907 - 1019 - org.codehaus.logger - INFO - Processing - run - 198 - start run - - - 2003-12-15T16:42:27 - 1071524547909 - 1020 - org.codehaus.logger - INFO - Processing - run - 198 - end run - - - 2003-12-15T16:42:27 - 1071524547909 - 1021 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:42:27 - 1071524547909 - 1022 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:42:43 - 1071524563086 - 1023 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG474143761 - - - - 2003-12-15T16:42:43 - 1071524563087 - 1024 - org.codehaus.logger - INFO - Processing - run - 199 - start run - - - 2003-12-15T16:42:43 - 1071524563088 - 1025 - org.codehaus.logger - INFO - Processing - run - 199 - end run - - - 2003-12-15T16:42:43 - 1071524563088 - 1026 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:42:43 - 1071524563088 - 1027 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:42:58 - 1071524578016 - 1028 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG496748911 - - - - 2003-12-15T16:42:58 - 1071524578017 - 1029 - org.codehaus.logger - INFO - Processing - run - 200 - start run - - - 2003-12-15T16:42:58 - 1071524578017 - 1030 - org.codehaus.logger - INFO - Processing - run - 200 - end run - - - 2003-12-15T16:42:58 - 1071524578018 - 1031 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:42:58 - 1071524578018 - 1032 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:43:13 - 1071524593136 - 1033 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG504156533 - - - - 2003-12-15T16:43:13 - 1071524593137 - 1034 - org.codehaus.logger - INFO - Processing - run - 201 - start run - - - 2003-12-15T16:43:13 - 1071524593137 - 1035 - org.codehaus.logger - INFO - Processing - run - 201 - end run - - - 2003-12-15T16:43:13 - 1071524593138 - 1036 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:43:13 - 1071524593138 - 1037 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:43:28 - 1071524608196 - 1038 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG526879107 - - - - 2003-12-15T16:43:28 - 1071524608197 - 1039 - org.codehaus.logger - INFO - Processing - run - 202 - start run - - - 2003-12-15T16:43:28 - 1071524608197 - 1040 - org.codehaus.logger - INFO - Processing - run - 202 - end run - - - 2003-12-15T16:43:28 - 1071524608198 - 1041 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:43:28 - 1071524608198 - 1042 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:43:43 - 1071524623106 - 1043 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG534166783 - - - - 2003-12-15T16:43:43 - 1071524623107 - 1044 - org.codehaus.logger - INFO - Processing - run - 203 - start run - - - 2003-12-15T16:43:43 - 1071524623108 - 1045 - org.codehaus.logger - INFO - Processing - run - 203 - end run - - - 2003-12-15T16:43:43 - 1071524623108 - 1046 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:43:43 - 1071524623108 - 1047 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:43:58 - 1071524638316 - 1048 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG557039152 - - - - 2003-12-15T16:43:58 - 1071524638317 - 1049 - org.codehaus.logger - INFO - Processing - run - 204 - start run - - - 2003-12-15T16:43:58 - 1071524638317 - 1050 - org.codehaus.logger - INFO - Processing - run - 204 - end run - - - 2003-12-15T16:43:58 - 1071524638318 - 1051 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:43:58 - 1071524638318 - 1052 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:44:13 - 1071524653177 - 1053 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG564179935 - - - - 2003-12-15T16:44:13 - 1071524653177 - 1054 - org.codehaus.logger - INFO - Processing - run - 205 - start run - - - 2003-12-15T16:44:13 - 1071524653178 - 1055 - org.codehaus.logger - INFO - Processing - run - 205 - end run - - - 2003-12-15T16:44:13 - 1071524653178 - 1056 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:44:13 - 1071524653178 - 1057 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:44:28 - 1071524668477 - 1058 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG587199276 - - - - 2003-12-15T16:44:28 - 1071524668479 - 1059 - org.codehaus.logger - INFO - Processing - run - 206 - start run - - - 2003-12-15T16:44:28 - 1071524668480 - 1060 - org.codehaus.logger - INFO - Processing - run - 206 - end run - - - 2003-12-15T16:44:28 - 1071524668480 - 1061 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:44:28 - 1071524668480 - 1062 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:44:42 - 1071524682067 - 1063 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T16:44:42 - 1071524682067 - 1064 - org.codehaus.logger - INFO - Processing - run - 207 - start run - - - 2003-12-15T16:44:42 - 1071524682068 - 1065 - org.codehaus.logger - INFO - Processing - run - 207 - end run - - - 2003-12-15T16:44:42 - 1071524682068 - 1066 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:44:42 - 1071524682068 - 1067 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:44:43 - 1071524683147 - 1068 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG594181540 - - - - 2003-12-15T16:44:43 - 1071524683147 - 1069 - org.codehaus.logger - INFO - Processing - run - 208 - start run - - - 2003-12-15T16:44:43 - 1071524683148 - 1070 - org.codehaus.logger - INFO - Processing - run - 208 - end run - - - 2003-12-15T16:44:43 - 1071524683148 - 1071 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:44:43 - 1071524683148 - 1072 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:44:58 - 1071524698657 - 1073 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG617349400 - - - - 2003-12-15T16:44:58 - 1071524698657 - 1074 - org.codehaus.logger - INFO - Processing - run - 209 - start run - - - 2003-12-15T16:44:58 - 1071524698658 - 1075 - org.codehaus.logger - INFO - Processing - run - 209 - end run - - - 2003-12-15T16:44:58 - 1071524698658 - 1076 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:44:58 - 1071524698658 - 1077 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:45:13 - 1071524713167 - 1078 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG624185069 - - - - 2003-12-15T16:45:13 - 1071524713168 - 1079 - org.codehaus.logger - INFO - Processing - run - 210 - start run - - - 2003-12-15T16:45:13 - 1071524713168 - 1080 - org.codehaus.logger - INFO - Processing - run - 210 - end run - - - 2003-12-15T16:45:13 - 1071524713168 - 1081 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:45:13 - 1071524713169 - 1082 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:45:28 - 1071524728787 - 1083 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG647499525 - - - - 2003-12-15T16:45:28 - 1071524728788 - 1084 - org.codehaus.logger - INFO - Processing - run - 211 - start run - - - 2003-12-15T16:45:28 - 1071524728789 - 1085 - org.codehaus.logger - INFO - Processing - run - 211 - end run - - - 2003-12-15T16:45:28 - 1071524728789 - 1086 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:45:28 - 1071524728789 - 1087 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:45:43 - 1071524743217 - 1088 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG654187155 - - - - 2003-12-15T16:45:43 - 1071524743218 - 1089 - org.codehaus.logger - INFO - Processing - run - 212 - start run - - - 2003-12-15T16:45:43 - 1071524743218 - 1090 - org.codehaus.logger - INFO - Processing - run - 212 - end run - - - 2003-12-15T16:45:43 - 1071524743218 - 1091 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:45:43 - 1071524743218 - 1092 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:45:58 - 1071524758967 - 1093 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG677673191 - - - - 2003-12-15T16:45:58 - 1071524758968 - 1094 - org.codehaus.logger - INFO - Processing - run - 213 - start run - - - 2003-12-15T16:45:58 - 1071524758968 - 1095 - org.codehaus.logger - INFO - Processing - run - 213 - end run - - - 2003-12-15T16:45:58 - 1071524758968 - 1096 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:45:58 - 1071524758968 - 1097 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:46:13 - 1071524773147 - 1098 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG684189823 - - - - 2003-12-15T16:46:13 - 1071524773149 - 1099 - org.codehaus.logger - INFO - Processing - run - 214 - start run - - - 2003-12-15T16:46:13 - 1071524773149 - 1100 - org.codehaus.logger - INFO - Processing - run - 214 - end run - - - 2003-12-15T16:46:13 - 1071524773150 - 1101 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:46:13 - 1071524773150 - 1102 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:46:29 - 1071524789137 - 1103 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG707819790 - - - - 2003-12-15T16:46:29 - 1071524789138 - 1104 - org.codehaus.logger - INFO - Processing - run - 215 - start run - - - 2003-12-15T16:46:29 - 1071524789138 - 1105 - org.codehaus.logger - INFO - Processing - run - 215 - end run - - - 2003-12-15T16:46:29 - 1071524789139 - 1106 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:46:29 - 1071524789139 - 1107 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:46:43 - 1071524803147 - 1108 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG714192332 - - - - 2003-12-15T16:46:43 - 1071524803148 - 1109 - org.codehaus.logger - INFO - Processing - run - 216 - start run - - - 2003-12-15T16:46:43 - 1071524803148 - 1110 - org.codehaus.logger - INFO - Processing - run - 216 - end run - - - 2003-12-15T16:46:43 - 1071524803149 - 1111 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:46:43 - 1071524803149 - 1112 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:46:59 - 1071524819297 - 1113 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG737979917 - - - - 2003-12-15T16:46:59 - 1071524819298 - 1114 - org.codehaus.logger - INFO - Processing - run - 217 - start run - - - 2003-12-15T16:46:59 - 1071524819299 - 1115 - org.codehaus.logger - INFO - Processing - run - 217 - end run - - - 2003-12-15T16:46:59 - 1071524819299 - 1116 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:46:59 - 1071524819300 - 1117 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:47:13 - 1071524833167 - 1118 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG744195060 - - - - 2003-12-15T16:47:13 - 1071524833168 - 1119 - org.codehaus.logger - INFO - Processing - run - 218 - start run - - - 2003-12-15T16:47:13 - 1071524833168 - 1120 - org.codehaus.logger - INFO - Processing - run - 218 - end run - - - 2003-12-15T16:47:13 - 1071524833169 - 1121 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:47:13 - 1071524833169 - 1122 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:47:29 - 1071524849457 - 1123 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG768149994 - - - - 2003-12-15T16:47:29 - 1071524849458 - 1124 - org.codehaus.logger - INFO - Processing - run - 219 - start run - - - 2003-12-15T16:47:29 - 1071524849458 - 1125 - org.codehaus.logger - INFO - Processing - run - 219 - end run - - - 2003-12-15T16:47:29 - 1071524849459 - 1126 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:47:29 - 1071524849459 - 1127 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:47:43 - 1071524863187 - 1128 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG774196814 - - - - 2003-12-15T16:47:43 - 1071524863188 - 1129 - org.codehaus.logger - INFO - Processing - run - 220 - start run - - - 2003-12-15T16:47:43 - 1071524863188 - 1130 - org.codehaus.logger - INFO - Processing - run - 220 - end run - - - 2003-12-15T16:47:43 - 1071524863189 - 1131 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:47:43 - 1071524863189 - 1132 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:47:59 - 1071524879577 - 1133 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG798294891 - - - - 2003-12-15T16:47:59 - 1071524879578 - 1134 - org.codehaus.logger - INFO - Processing - run - 221 - start run - - - 2003-12-15T16:47:59 - 1071524879578 - 1135 - org.codehaus.logger - INFO - Processing - run - 221 - end run - - - 2003-12-15T16:47:59 - 1071524879579 - 1136 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:47:59 - 1071524879579 - 1137 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:48:13 - 1071524893177 - 1138 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG804198965 - - - - 2003-12-15T16:48:13 - 1071524893178 - 1139 - org.codehaus.logger - INFO - Processing - run - 222 - start run - - - 2003-12-15T16:48:13 - 1071524893178 - 1140 - org.codehaus.logger - INFO - Processing - run - 222 - end run - - - 2003-12-15T16:48:13 - 1071524893179 - 1141 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:48:13 - 1071524893179 - 1142 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:48:29 - 1071524909748 - 1143 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG828450191 - - - - 2003-12-15T16:48:29 - 1071524909748 - 1144 - org.codehaus.logger - INFO - Processing - run - 223 - start run - - - 2003-12-15T16:48:29 - 1071524909748 - 1145 - org.codehaus.logger - INFO - Processing - run - 223 - end run - - - 2003-12-15T16:48:29 - 1071524909749 - 1146 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:48:29 - 1071524909749 - 1147 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:48:43 - 1071524923198 - 1148 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG834201360 - - - - 2003-12-15T16:48:43 - 1071524923199 - 1149 - org.codehaus.logger - INFO - Processing - run - 224 - start run - - - 2003-12-15T16:48:43 - 1071524923199 - 1150 - org.codehaus.logger - INFO - Processing - run - 224 - end run - - - 2003-12-15T16:48:43 - 1071524923200 - 1151 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:48:43 - 1071524923201 - 1152 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:48:59 - 1071524939898 - 1153 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG858590677 - - - - 2003-12-15T16:48:59 - 1071524939898 - 1154 - org.codehaus.logger - INFO - Processing - run - 225 - start run - - - 2003-12-15T16:48:59 - 1071524939899 - 1155 - org.codehaus.logger - INFO - Processing - run - 225 - end run - - - 2003-12-15T16:48:59 - 1071524939899 - 1156 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:48:59 - 1071524939899 - 1157 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:49:13 - 1071524953228 - 1158 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG864203079 - - - - 2003-12-15T16:49:13 - 1071524953228 - 1159 - org.codehaus.logger - INFO - Processing - run - 226 - start run - - - 2003-12-15T16:49:13 - 1071524953229 - 1160 - org.codehaus.logger - INFO - Processing - run - 226 - end run - - - 2003-12-15T16:49:13 - 1071524953229 - 1161 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:49:13 - 1071524953229 - 1162 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:49:30 - 1071524970038 - 1163 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG888750381 - - - - 2003-12-15T16:49:30 - 1071524970039 - 1164 - org.codehaus.logger - INFO - Processing - run - 227 - start run - - - 2003-12-15T16:49:30 - 1071524970040 - 1165 - org.codehaus.logger - INFO - Processing - run - 227 - end run - - - 2003-12-15T16:49:30 - 1071524970040 - 1166 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:49:30 - 1071524970040 - 1167 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:49:41 - 1071524981688 - 1168 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T16:49:41 - 1071524981688 - 1169 - org.codehaus.logger - INFO - Processing - run - 228 - start run - - - 2003-12-15T16:49:41 - 1071524981689 - 1170 - org.codehaus.logger - INFO - Processing - run - 228 - end run - - - 2003-12-15T16:49:41 - 1071524981689 - 1171 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:49:41 - 1071524981689 - 1172 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:49:43 - 1071524983248 - 1173 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG894206047 - - - - 2003-12-15T16:49:43 - 1071524983248 - 1174 - org.codehaus.logger - INFO - Processing - run - 229 - start run - - - 2003-12-15T16:49:43 - 1071524983249 - 1175 - org.codehaus.logger - INFO - Processing - run - 229 - end run - - - 2003-12-15T16:49:43 - 1071524983249 - 1176 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:49:43 - 1071524983251 - 1177 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:50:00 - 1071525000178 - 1178 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG918890471 - - - - 2003-12-15T16:50:00 - 1071525000179 - 1179 - org.codehaus.logger - INFO - Processing - run - 230 - start run - - - 2003-12-15T16:50:00 - 1071525000180 - 1180 - org.codehaus.logger - INFO - Processing - run - 230 - end run - - - 2003-12-15T16:50:00 - 1071525000180 - 1181 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:50:00 - 1071525000180 - 1182 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:50:13 - 1071525013278 - 1183 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG924207691 - - - - 2003-12-15T16:50:13 - 1071525013278 - 1184 - org.codehaus.logger - INFO - Processing - run - 231 - start run - - - 2003-12-15T16:50:13 - 1071525013279 - 1185 - org.codehaus.logger - INFO - Processing - run - 231 - end run - - - 2003-12-15T16:50:13 - 1071525013279 - 1186 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:50:13 - 1071525013279 - 1187 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:50:30 - 1071525030318 - 1188 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG949050574 - - - - 2003-12-15T16:50:30 - 1071525030319 - 1189 - org.codehaus.logger - INFO - Processing - run - 232 - start run - - - 2003-12-15T16:50:30 - 1071525030319 - 1190 - org.codehaus.logger - INFO - Processing - run - 232 - end run - - - 2003-12-15T16:50:30 - 1071525030320 - 1191 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:50:30 - 1071525030320 - 1192 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:50:43 - 1071525043238 - 1193 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG954212471 - - - - 2003-12-15T16:50:43 - 1071525043239 - 1194 - org.codehaus.logger - INFO - Processing - run - 233 - start run - - - 2003-12-15T16:50:43 - 1071525043239 - 1195 - org.codehaus.logger - INFO - Processing - run - 233 - end run - - - 2003-12-15T16:50:43 - 1071525043239 - 1196 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:50:43 - 1071525043239 - 1197 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:51:00 - 1071525060518 - 1198 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG979210678 - - - - 2003-12-15T16:51:00 - 1071525060519 - 1199 - org.codehaus.logger - INFO - Processing - run - 234 - start run - - - 2003-12-15T16:51:00 - 1071525060519 - 1200 - org.codehaus.logger - INFO - Processing - run - 234 - end run - - - 2003-12-15T16:51:00 - 1071525060519 - 1201 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:51:00 - 1071525060519 - 1202 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:51:13 - 1071525073238 - 1203 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG984214349 - - - - 2003-12-15T16:51:13 - 1071525073239 - 1204 - org.codehaus.logger - INFO - Processing - run - 235 - start run - - - 2003-12-15T16:51:13 - 1071525073239 - 1205 - org.codehaus.logger - INFO - Processing - run - 235 - end run - - - 2003-12-15T16:51:13 - 1071525073239 - 1206 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:51:13 - 1071525073240 - 1207 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:51:30 - 1071525090638 - 1208 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1009350776 - - - - 2003-12-15T16:51:30 - 1071525090639 - 1209 - org.codehaus.logger - INFO - Processing - run - 236 - start run - - - 2003-12-15T16:51:30 - 1071525090639 - 1210 - org.codehaus.logger - INFO - Processing - run - 236 - end run - - - 2003-12-15T16:51:30 - 1071525090639 - 1211 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:51:30 - 1071525090640 - 1212 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:51:43 - 1071525103248 - 1213 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1014217728 - - - - 2003-12-15T16:51:43 - 1071525103249 - 1214 - org.codehaus.logger - INFO - Processing - run - 237 - start run - - - 2003-12-15T16:51:43 - 1071525103249 - 1215 - org.codehaus.logger - INFO - Processing - run - 237 - end run - - - 2003-12-15T16:51:43 - 1071525103251 - 1216 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:51:43 - 1071525103251 - 1217 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:52:00 - 1071525120768 - 1218 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1039500875 - - - - 2003-12-15T16:52:00 - 1071525120769 - 1219 - org.codehaus.logger - INFO - Processing - run - 238 - start run - - - 2003-12-15T16:52:00 - 1071525120769 - 1220 - org.codehaus.logger - INFO - Processing - run - 238 - end run - - - 2003-12-15T16:52:00 - 1071525120770 - 1221 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:52:00 - 1071525120770 - 1222 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:52:13 - 1071525133258 - 1223 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1044219701 - - - - 2003-12-15T16:52:13 - 1071525133259 - 1224 - org.codehaus.logger - INFO - Processing - run - 239 - start run - - - 2003-12-15T16:52:13 - 1071525133260 - 1225 - org.codehaus.logger - INFO - Processing - run - 239 - end run - - - 2003-12-15T16:52:13 - 1071525133260 - 1226 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:52:13 - 1071525133261 - 1227 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:52:20 - 1071525140058 - 1228 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PART #test - - - - 2003-12-15T16:52:20 - 1071525140059 - 1229 - org.codehaus.logger - INFO - Processing - run - 240 - start run - - - 2003-12-15T16:52:20 - 1071525140062 - 1230 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T16:52:20 - 1071525140063 - 1231 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:noah!~noah@24.100.197.137 PART #test : - - - - 2003-12-15T16:52:20 - 1071525140063 - 1232 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T16:52:20 - 1071525140063 - 1233 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:52:20 - 1071525140063 - 1234 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:noah!~noah@24.100.197.137 PART #test : - - - - 2003-12-15T16:52:20 - 1071525140063 - 1235 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:52:20 - 1071525140063 - 1236 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:52:20 - 1071525140064 - 1237 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:noah!~noah@24.100.197.137 PART #test : - - - - 2003-12-15T16:52:20 - 1071525140064 - 1238 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:52:20 - 1071525140070 - 1239 - org.codehaus.logger - INFO - Processing - run - 240 - end run - - - 2003-12-15T16:52:20 - 1071525140078 - 1240 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:52:20 - 1071525140079 - 1241 - org.codehaus.logger - INFO - Talking - send - 31 - ------>:noah!~noah@24.100.197.137 PART #test : - - - - 2003-12-15T16:52:20 - 1071525140079 - 1242 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:52:30 - 1071525150919 - 1243 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1069651022 - - - - 2003-12-15T16:52:30 - 1071525150919 - 1244 - org.codehaus.logger - INFO - Processing - run - 241 - start run - - - 2003-12-15T16:52:30 - 1071525150921 - 1245 - org.codehaus.logger - INFO - Processing - run - 241 - end run - - - 2003-12-15T16:52:30 - 1071525150921 - 1246 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:52:30 - 1071525150921 - 1247 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:52:43 - 1071525163348 - 1248 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1074224578 - - - - 2003-12-15T16:52:43 - 1071525163349 - 1249 - org.codehaus.logger - INFO - Processing - run - 242 - start run - - - 2003-12-15T16:52:43 - 1071525163349 - 1250 - org.codehaus.logger - INFO - Processing - run - 242 - end run - - - 2003-12-15T16:52:43 - 1071525163350 - 1251 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:52:43 - 1071525163350 - 1252 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:53:01 - 1071525181069 - 1253 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1099801080 - - - - 2003-12-15T16:53:01 - 1071525181069 - 1254 - org.codehaus.logger - INFO - Processing - run - 243 - start run - - - 2003-12-15T16:53:01 - 1071525181070 - 1255 - org.codehaus.logger - INFO - Processing - run - 243 - end run - - - 2003-12-15T16:53:01 - 1071525181070 - 1256 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:53:01 - 1071525181070 - 1257 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:53:13 - 1071525193308 - 1258 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1104226629 - - - - 2003-12-15T16:53:13 - 1071525193309 - 1259 - org.codehaus.logger - INFO - Processing - run - 244 - start run - - - 2003-12-15T16:53:13 - 1071525193309 - 1260 - org.codehaus.logger - INFO - Processing - run - 244 - end run - - - 2003-12-15T16:53:13 - 1071525193310 - 1261 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:53:13 - 1071525193310 - 1262 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:53:31 - 1071525211249 - 1263 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1129961592 - - - - 2003-12-15T16:53:31 - 1071525211249 - 1264 - org.codehaus.logger - INFO - Processing - run - 245 - start run - - - 2003-12-15T16:53:31 - 1071525211250 - 1265 - org.codehaus.logger - INFO - Processing - run - 245 - end run - - - 2003-12-15T16:53:31 - 1071525211250 - 1266 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:53:31 - 1071525211250 - 1267 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:53:43 - 1071525223309 - 1268 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1134236565 - - - - 2003-12-15T16:53:43 - 1071525223309 - 1269 - org.codehaus.logger - INFO - Processing - run - 246 - start run - - - 2003-12-15T16:53:43 - 1071525223310 - 1270 - org.codehaus.logger - INFO - Processing - run - 246 - end run - - - 2003-12-15T16:53:43 - 1071525223310 - 1271 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:53:43 - 1071525223310 - 1272 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:54:01 - 1071525241429 - 1273 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1160121315 - - - - 2003-12-15T16:54:01 - 1071525241429 - 1274 - org.codehaus.logger - INFO - Processing - run - 247 - start run - - - 2003-12-15T16:54:01 - 1071525241430 - 1275 - org.codehaus.logger - INFO - Processing - run - 247 - end run - - - 2003-12-15T16:54:01 - 1071525241430 - 1276 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:54:01 - 1071525241430 - 1277 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:54:13 - 1071525253309 - 1278 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1164239255 - - - - 2003-12-15T16:54:13 - 1071525253309 - 1279 - org.codehaus.logger - INFO - Processing - run - 248 - start run - - - 2003-12-15T16:54:13 - 1071525253310 - 1280 - org.codehaus.logger - INFO - Processing - run - 248 - end run - - - 2003-12-15T16:54:13 - 1071525253310 - 1281 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:54:13 - 1071525253310 - 1282 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:54:31 - 1071525271549 - 1283 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1190281404 - - - - 2003-12-15T16:54:31 - 1071525271550 - 1284 - org.codehaus.logger - INFO - Processing - run - 249 - start run - - - 2003-12-15T16:54:31 - 1071525271551 - 1285 - org.codehaus.logger - INFO - Processing - run - 249 - end run - - - 2003-12-15T16:54:31 - 1071525271552 - 1286 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:54:31 - 1071525271552 - 1287 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:54:41 - 1071525281689 - 1288 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T16:54:41 - 1071525281690 - 1289 - org.codehaus.logger - INFO - Processing - run - 250 - start run - - - 2003-12-15T16:54:41 - 1071525281690 - 1290 - org.codehaus.logger - INFO - Processing - run - 250 - end run - - - 2003-12-15T16:54:41 - 1071525281690 - 1291 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:54:41 - 1071525281690 - 1292 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:54:43 - 1071525283309 - 1293 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1194242188 - - - - 2003-12-15T16:54:43 - 1071525283309 - 1294 - org.codehaus.logger - INFO - Processing - run - 251 - start run - - - 2003-12-15T16:54:43 - 1071525283310 - 1295 - org.codehaus.logger - INFO - Processing - run - 251 - end run - - - 2003-12-15T16:54:43 - 1071525283310 - 1296 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:54:43 - 1071525283310 - 1297 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:55:01 - 1071525301739 - 1298 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1220431509 - - - - 2003-12-15T16:55:01 - 1071525301740 - 1299 - org.codehaus.logger - INFO - Processing - run - 252 - start run - - - 2003-12-15T16:55:01 - 1071525301740 - 1300 - org.codehaus.logger - INFO - Processing - run - 252 - end run - - - 2003-12-15T16:55:01 - 1071525301740 - 1301 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:55:01 - 1071525301740 - 1302 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:55:13 - 1071525313339 - 1303 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1224244103 - - - - 2003-12-15T16:55:13 - 1071525313340 - 1304 - org.codehaus.logger - INFO - Processing - run - 253 - start run - - - 2003-12-15T16:55:13 - 1071525313340 - 1305 - org.codehaus.logger - INFO - Processing - run - 253 - end run - - - 2003-12-15T16:55:13 - 1071525313340 - 1306 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:55:13 - 1071525313341 - 1307 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:55:31 - 1071525331879 - 1308 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1250571620 - - - - 2003-12-15T16:55:31 - 1071525331880 - 1309 - org.codehaus.logger - INFO - Processing - run - 254 - start run - - - 2003-12-15T16:55:31 - 1071525331880 - 1310 - org.codehaus.logger - INFO - Processing - run - 254 - end run - - - 2003-12-15T16:55:31 - 1071525331880 - 1311 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:55:31 - 1071525331880 - 1312 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:55:43 - 1071525343359 - 1313 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1254247027 - - - - 2003-12-15T16:55:43 - 1071525343360 - 1314 - org.codehaus.logger - INFO - Processing - run - 255 - start run - - - 2003-12-15T16:55:43 - 1071525343360 - 1315 - org.codehaus.logger - INFO - Processing - run - 255 - end run - - - 2003-12-15T16:55:43 - 1071525343360 - 1316 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:55:43 - 1071525343361 - 1317 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:56:02 - 1071525362019 - 1318 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1280721727 - - - - 2003-12-15T16:56:02 - 1071525362020 - 1319 - org.codehaus.logger - INFO - Processing - run - 256 - start run - - - 2003-12-15T16:56:02 - 1071525362020 - 1320 - org.codehaus.logger - INFO - Processing - run - 256 - end run - - - 2003-12-15T16:56:02 - 1071525362021 - 1321 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:56:02 - 1071525362021 - 1322 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:56:13 - 1071525373359 - 1323 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1284248533 - - - - 2003-12-15T16:56:13 - 1071525373361 - 1324 - org.codehaus.logger - INFO - Processing - run - 257 - start run - - - 2003-12-15T16:56:13 - 1071525373361 - 1325 - org.codehaus.logger - INFO - Processing - run - 257 - end run - - - 2003-12-15T16:56:13 - 1071525373362 - 1326 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:56:13 - 1071525373362 - 1327 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:56:32 - 1071525392199 - 1328 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1310891839 - - - - 2003-12-15T16:56:32 - 1071525392200 - 1329 - org.codehaus.logger - INFO - Processing - run - 258 - start run - - - 2003-12-15T16:56:32 - 1071525392200 - 1330 - org.codehaus.logger - INFO - Processing - run - 258 - end run - - - 2003-12-15T16:56:32 - 1071525392200 - 1331 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:56:32 - 1071525392201 - 1332 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:56:43 - 1071525403329 - 1333 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1314250907 - - - - 2003-12-15T16:56:43 - 1071525403330 - 1334 - org.codehaus.logger - INFO - Processing - run - 259 - start run - - - 2003-12-15T16:56:43 - 1071525403330 - 1335 - org.codehaus.logger - INFO - Processing - run - 259 - end run - - - 2003-12-15T16:56:43 - 1071525403330 - 1336 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:56:43 - 1071525403331 - 1337 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:57:02 - 1071525422359 - 1338 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1341051944 - - - - 2003-12-15T16:57:02 - 1071525422360 - 1339 - org.codehaus.logger - INFO - Processing - run - 260 - start run - - - 2003-12-15T16:57:02 - 1071525422360 - 1340 - org.codehaus.logger - INFO - Processing - run - 260 - end run - - - 2003-12-15T16:57:02 - 1071525422361 - 1341 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:57:02 - 1071525422361 - 1342 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:57:13 - 1071525433409 - 1343 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1344252569 - - - - 2003-12-15T16:57:13 - 1071525433410 - 1344 - org.codehaus.logger - INFO - Processing - run - 261 - start run - - - 2003-12-15T16:57:13 - 1071525433410 - 1345 - org.codehaus.logger - INFO - Processing - run - 261 - end run - - - 2003-12-15T16:57:13 - 1071525433411 - 1346 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:57:13 - 1071525433411 - 1347 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:57:32 - 1071525452489 - 1348 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1371212051 - - - - 2003-12-15T16:57:32 - 1071525452490 - 1349 - org.codehaus.logger - INFO - Processing - run - 262 - start run - - - 2003-12-15T16:57:32 - 1071525452490 - 1350 - org.codehaus.logger - INFO - Processing - run - 262 - end run - - - 2003-12-15T16:57:32 - 1071525452491 - 1351 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:57:32 - 1071525452492 - 1352 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:57:43 - 1071525463390 - 1353 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1374254892 - - - - 2003-12-15T16:57:43 - 1071525463391 - 1354 - org.codehaus.logger - INFO - Processing - run - 263 - start run - - - 2003-12-15T16:57:43 - 1071525463391 - 1355 - org.codehaus.logger - INFO - Processing - run - 263 - end run - - - 2003-12-15T16:57:43 - 1071525463392 - 1356 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:57:43 - 1071525463392 - 1357 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:58:02 - 1071525482650 - 1358 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1401362179 - - - - 2003-12-15T16:58:02 - 1071525482650 - 1359 - org.codehaus.logger - INFO - Processing - run - 264 - start run - - - 2003-12-15T16:58:02 - 1071525482651 - 1360 - org.codehaus.logger - INFO - Processing - run - 264 - end run - - - 2003-12-15T16:58:02 - 1071525482651 - 1361 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:58:02 - 1071525482651 - 1362 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:58:13 - 1071525493400 - 1363 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1404257071 - - - - 2003-12-15T16:58:13 - 1071525493402 - 1364 - org.codehaus.logger - INFO - Processing - run - 265 - start run - - - 2003-12-15T16:58:13 - 1071525493403 - 1365 - org.codehaus.logger - INFO - Processing - run - 265 - end run - - - 2003-12-15T16:58:13 - 1071525493403 - 1366 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:58:13 - 1071525493404 - 1367 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:58:32 - 1071525512780 - 1368 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1431502288 - - - - 2003-12-15T16:58:32 - 1071525512781 - 1369 - org.codehaus.logger - INFO - Processing - run - 266 - start run - - - 2003-12-15T16:58:32 - 1071525512781 - 1370 - org.codehaus.logger - INFO - Processing - run - 266 - end run - - - 2003-12-15T16:58:32 - 1071525512782 - 1371 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:58:32 - 1071525512782 - 1372 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:58:43 - 1071525523410 - 1373 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1434260382 - - - - 2003-12-15T16:58:43 - 1071525523411 - 1374 - org.codehaus.logger - INFO - Processing - run - 267 - start run - - - 2003-12-15T16:58:43 - 1071525523411 - 1375 - org.codehaus.logger - INFO - Processing - run - 267 - end run - - - 2003-12-15T16:58:43 - 1071525523412 - 1376 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:58:43 - 1071525523414 - 1377 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:59:02 - 1071525542970 - 1378 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1461652408 - - - - 2003-12-15T16:59:02 - 1071525542970 - 1379 - org.codehaus.logger - INFO - Processing - run - 268 - start run - - - 2003-12-15T16:59:02 - 1071525542971 - 1380 - org.codehaus.logger - INFO - Processing - run - 268 - end run - - - 2003-12-15T16:59:02 - 1071525542971 - 1381 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:59:02 - 1071525542971 - 1382 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:59:13 - 1071525553420 - 1383 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1464262326 - - - - 2003-12-15T16:59:13 - 1071525553420 - 1384 - org.codehaus.logger - INFO - Processing - run - 269 - start run - - - 2003-12-15T16:59:13 - 1071525553421 - 1385 - org.codehaus.logger - INFO - Processing - run - 269 - end run - - - 2003-12-15T16:59:13 - 1071525553421 - 1386 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:59:13 - 1071525553421 - 1387 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T16:59:33 - 1071525573100 - 1388 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1491813140 - - - - 2003-12-15T16:59:33 - 1071525573101 - 1389 - org.codehaus.logger - INFO - Processing - run - 270 - start run - - - 2003-12-15T16:59:33 - 1071525573101 - 1390 - org.codehaus.logger - INFO - Processing - run - 270 - end run - - - 2003-12-15T16:59:33 - 1071525573101 - 1391 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T16:59:33 - 1071525573102 - 1392 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T16:59:41 - 1071525581750 - 1393 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T16:59:41 - 1071525581751 - 1394 - org.codehaus.logger - INFO - Processing - run - 271 - start run - - - 2003-12-15T16:59:41 - 1071525581751 - 1395 - org.codehaus.logger - INFO - Processing - run - 271 - end run - - - 2003-12-15T16:59:41 - 1071525581751 - 1396 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T16:59:41 - 1071525581751 - 1397 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T16:59:43 - 1071525583430 - 1398 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1494263740 - - - - 2003-12-15T16:59:43 - 1071525583430 - 1399 - org.codehaus.logger - INFO - Processing - run - 272 - start run - - - 2003-12-15T16:59:43 - 1071525583431 - 1400 - org.codehaus.logger - INFO - Processing - run - 272 - end run - - - 2003-12-15T16:59:43 - 1071525583431 - 1401 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T16:59:43 - 1071525583431 - 1402 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:00:03 - 1071525603300 - 1403 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1521992641 - - - - 2003-12-15T17:00:03 - 1071525603301 - 1404 - org.codehaus.logger - INFO - Processing - run - 273 - start run - - - 2003-12-15T17:00:03 - 1071525603301 - 1405 - org.codehaus.logger - INFO - Processing - run - 273 - end run - - - 2003-12-15T17:00:03 - 1071525603301 - 1406 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:00:03 - 1071525603301 - 1407 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:00:13 - 1071525613420 - 1408 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1524268753 - - - - 2003-12-15T17:00:13 - 1071525613421 - 1409 - org.codehaus.logger - INFO - Processing - run - 274 - start run - - - 2003-12-15T17:00:13 - 1071525613421 - 1410 - org.codehaus.logger - INFO - Processing - run - 274 - end run - - - 2003-12-15T17:00:13 - 1071525613421 - 1411 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:00:13 - 1071525613423 - 1412 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:00:33 - 1071525633410 - 1413 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1552142764 - - - - 2003-12-15T17:00:33 - 1071525633412 - 1414 - org.codehaus.logger - INFO - Processing - run - 275 - start run - - - 2003-12-15T17:00:33 - 1071525633412 - 1415 - org.codehaus.logger - INFO - Processing - run - 275 - end run - - - 2003-12-15T17:00:33 - 1071525633412 - 1416 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:00:33 - 1071525633413 - 1417 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:00:43 - 1071525643420 - 1418 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1554270384 - - - - 2003-12-15T17:00:43 - 1071525643421 - 1419 - org.codehaus.logger - INFO - Processing - run - 276 - start run - - - 2003-12-15T17:00:43 - 1071525643422 - 1420 - org.codehaus.logger - INFO - Processing - run - 276 - end run - - - 2003-12-15T17:00:43 - 1071525643422 - 1421 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:00:43 - 1071525643423 - 1422 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:01:03 - 1071525663640 - 1423 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1582322893 - - - - 2003-12-15T17:01:03 - 1071525663641 - 1424 - org.codehaus.logger - INFO - Processing - run - 277 - start run - - - 2003-12-15T17:01:03 - 1071525663642 - 1425 - org.codehaus.logger - INFO - Processing - run - 277 - end run - - - 2003-12-15T17:01:03 - 1071525663643 - 1426 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:01:03 - 1071525663643 - 1427 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:01:13 - 1071525673450 - 1428 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1584272919 - - - - 2003-12-15T17:01:13 - 1071525673451 - 1429 - org.codehaus.logger - INFO - Processing - run - 278 - start run - - - 2003-12-15T17:01:13 - 1071525673451 - 1430 - org.codehaus.logger - INFO - Processing - run - 278 - end run - - - 2003-12-15T17:01:13 - 1071525673452 - 1431 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:01:13 - 1071525673452 - 1432 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:01:33 - 1071525693741 - 1433 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1612473003 - - - - 2003-12-15T17:01:33 - 1071525693741 - 1434 - org.codehaus.logger - INFO - Processing - run - 279 - start run - - - 2003-12-15T17:01:33 - 1071525693742 - 1435 - org.codehaus.logger - INFO - Processing - run - 279 - end run - - - 2003-12-15T17:01:33 - 1071525693742 - 1436 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:01:33 - 1071525693742 - 1437 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:01:43 - 1071525703470 - 1438 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1614275137 - - - - 2003-12-15T17:01:43 - 1071525703471 - 1439 - org.codehaus.logger - INFO - Processing - run - 280 - start run - - - 2003-12-15T17:01:43 - 1071525703472 - 1440 - org.codehaus.logger - INFO - Processing - run - 280 - end run - - - 2003-12-15T17:01:43 - 1071525703473 - 1441 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:01:43 - 1071525703474 - 1442 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:02:03 - 1071525723930 - 1443 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1642623127 - - - - 2003-12-15T17:02:03 - 1071525723932 - 1444 - org.codehaus.logger - INFO - Processing - run - 281 - start run - - - 2003-12-15T17:02:03 - 1071525723932 - 1445 - org.codehaus.logger - INFO - Processing - run - 281 - end run - - - 2003-12-15T17:02:03 - 1071525723933 - 1446 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:02:03 - 1071525723933 - 1447 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:02:13 - 1071525733470 - 1448 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1644277865 - - - - 2003-12-15T17:02:13 - 1071525733472 - 1449 - org.codehaus.logger - INFO - Processing - run - 282 - start run - - - 2003-12-15T17:02:13 - 1071525733472 - 1450 - org.codehaus.logger - INFO - Processing - run - 282 - end run - - - 2003-12-15T17:02:13 - 1071525733473 - 1451 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:02:13 - 1071525733473 - 1452 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:02:34 - 1071525754051 - 1453 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1672773246 - - - - 2003-12-15T17:02:34 - 1071525754052 - 1454 - org.codehaus.logger - INFO - Processing - run - 283 - start run - - - 2003-12-15T17:02:34 - 1071525754052 - 1455 - org.codehaus.logger - INFO - Processing - run - 283 - end run - - - 2003-12-15T17:02:34 - 1071525754053 - 1456 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:02:34 - 1071525754053 - 1457 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:02:43 - 1071525763461 - 1458 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1674280707 - - - - 2003-12-15T17:02:43 - 1071525763462 - 1459 - org.codehaus.logger - INFO - Processing - run - 284 - start run - - - 2003-12-15T17:02:43 - 1071525763462 - 1460 - org.codehaus.logger - INFO - Processing - run - 284 - end run - - - 2003-12-15T17:02:43 - 1071525763463 - 1461 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:02:43 - 1071525763463 - 1462 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:03:04 - 1071525784281 - 1463 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1702963384 - - - - 2003-12-15T17:03:04 - 1071525784282 - 1464 - org.codehaus.logger - INFO - Processing - run - 285 - start run - - - 2003-12-15T17:03:04 - 1071525784282 - 1465 - org.codehaus.logger - INFO - Processing - run - 285 - end run - - - 2003-12-15T17:03:04 - 1071525784283 - 1466 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:03:04 - 1071525784283 - 1467 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:03:13 - 1071525793521 - 1468 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1704289607 - - - - 2003-12-15T17:03:13 - 1071525793521 - 1469 - org.codehaus.logger - INFO - Processing - run - 286 - start run - - - 2003-12-15T17:03:13 - 1071525793522 - 1470 - org.codehaus.logger - INFO - Processing - run - 286 - end run - - - 2003-12-15T17:03:13 - 1071525793522 - 1471 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:03:13 - 1071525793522 - 1472 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:03:34 - 1071525814401 - 1473 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1733113525 - - - - 2003-12-15T17:03:34 - 1071525814402 - 1474 - org.codehaus.logger - INFO - Processing - run - 287 - start run - - - 2003-12-15T17:03:34 - 1071525814403 - 1475 - org.codehaus.logger - INFO - Processing - run - 287 - end run - - - 2003-12-15T17:03:34 - 1071525814403 - 1476 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:03:34 - 1071525814403 - 1477 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:03:43 - 1071525823471 - 1478 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1734291213 - - - - 2003-12-15T17:03:43 - 1071525823472 - 1479 - org.codehaus.logger - INFO - Processing - run - 288 - start run - - - 2003-12-15T17:03:43 - 1071525823472 - 1480 - org.codehaus.logger - INFO - Processing - run - 288 - end run - - - 2003-12-15T17:03:43 - 1071525823472 - 1481 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:03:43 - 1071525823474 - 1482 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:04:04 - 1071525844531 - 1483 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1763263629 - - - - 2003-12-15T17:04:04 - 1071525844532 - 1484 - org.codehaus.logger - INFO - Processing - run - 289 - start run - - - 2003-12-15T17:04:04 - 1071525844532 - 1485 - org.codehaus.logger - INFO - Processing - run - 289 - end run - - - 2003-12-15T17:04:04 - 1071525844532 - 1486 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:04:04 - 1071525844533 - 1487 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:04:13 - 1071525853501 - 1488 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1764292657 - - - - 2003-12-15T17:04:13 - 1071525853502 - 1489 - org.codehaus.logger - INFO - Processing - run - 290 - start run - - - 2003-12-15T17:04:13 - 1071525853502 - 1490 - org.codehaus.logger - INFO - Processing - run - 290 - end run - - - 2003-12-15T17:04:13 - 1071525853502 - 1491 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:04:13 - 1071525853502 - 1492 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:04:34 - 1071525874701 - 1493 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1793413767 - - - - 2003-12-15T17:04:34 - 1071525874702 - 1494 - org.codehaus.logger - INFO - Processing - run - 291 - start run - - - 2003-12-15T17:04:34 - 1071525874702 - 1495 - org.codehaus.logger - INFO - Processing - run - 291 - end run - - - 2003-12-15T17:04:34 - 1071525874703 - 1496 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:04:34 - 1071525874703 - 1497 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:04:41 - 1071525881601 - 1498 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T17:04:41 - 1071525881602 - 1499 - org.codehaus.logger - INFO - Processing - run - 292 - start run - - - 2003-12-15T17:04:41 - 1071525881602 - 1500 - org.codehaus.logger - INFO - Processing - run - 292 - end run - - - 2003-12-15T17:04:41 - 1071525881603 - 1501 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T17:04:41 - 1071525881603 - 1502 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T17:04:43 - 1071525883521 - 1503 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1794294581 - - - - 2003-12-15T17:04:43 - 1071525883522 - 1504 - org.codehaus.logger - INFO - Processing - run - 293 - start run - - - 2003-12-15T17:04:43 - 1071525883522 - 1505 - org.codehaus.logger - INFO - Processing - run - 293 - end run - - - 2003-12-15T17:04:43 - 1071525883522 - 1506 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:04:43 - 1071525883522 - 1507 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:05:04 - 1071525904881 - 1508 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1823563920 - - - - 2003-12-15T17:05:04 - 1071525904882 - 1509 - org.codehaus.logger - INFO - Processing - run - 294 - start run - - - 2003-12-15T17:05:04 - 1071525904883 - 1510 - org.codehaus.logger - INFO - Processing - run - 294 - end run - - - 2003-12-15T17:05:04 - 1071525904883 - 1511 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:05:04 - 1071525904884 - 1512 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:05:13 - 1071525913531 - 1513 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1824296721 - - - - 2003-12-15T17:05:13 - 1071525913532 - 1514 - org.codehaus.logger - INFO - Processing - run - 295 - start run - - - 2003-12-15T17:05:13 - 1071525913532 - 1515 - org.codehaus.logger - INFO - Processing - run - 295 - end run - - - 2003-12-15T17:05:13 - 1071525913533 - 1516 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:05:13 - 1071525913533 - 1517 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:05:35 - 1071525935011 - 1518 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1853714069 - - - - 2003-12-15T17:05:35 - 1071525935012 - 1519 - org.codehaus.logger - INFO - Processing - run - 296 - start run - - - 2003-12-15T17:05:35 - 1071525935014 - 1520 - org.codehaus.logger - INFO - Processing - run - 296 - end run - - - 2003-12-15T17:05:35 - 1071525935014 - 1521 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:05:35 - 1071525935014 - 1522 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:05:43 - 1071525943541 - 1523 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1854301026 - - - - 2003-12-15T17:05:43 - 1071525943542 - 1524 - org.codehaus.logger - INFO - Processing - run - 297 - start run - - - 2003-12-15T17:05:43 - 1071525943542 - 1525 - org.codehaus.logger - INFO - Processing - run - 297 - end run - - - 2003-12-15T17:05:43 - 1071525943543 - 1526 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:05:43 - 1071525943543 - 1527 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:06:05 - 1071525965152 - 1528 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1883864200 - - - - 2003-12-15T17:06:05 - 1071525965152 - 1529 - org.codehaus.logger - INFO - Processing - run - 298 - start run - - - 2003-12-15T17:06:05 - 1071525965153 - 1530 - org.codehaus.logger - INFO - Processing - run - 298 - end run - - - 2003-12-15T17:06:05 - 1071525965153 - 1531 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:06:05 - 1071525965153 - 1532 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:06:13 - 1071525973502 - 1533 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1884302569 - - - - 2003-12-15T17:06:13 - 1071525973502 - 1534 - org.codehaus.logger - INFO - Processing - run - 299 - start run - - - 2003-12-15T17:06:13 - 1071525973503 - 1535 - org.codehaus.logger - INFO - Processing - run - 299 - end run - - - 2003-12-15T17:06:13 - 1071525973503 - 1536 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:06:13 - 1071525973503 - 1537 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:06:35 - 1071525995302 - 1538 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1914014358 - - - - 2003-12-15T17:06:35 - 1071525995302 - 1539 - org.codehaus.logger - INFO - Processing - run - 300 - start run - - - 2003-12-15T17:06:35 - 1071525995303 - 1540 - org.codehaus.logger - INFO - Processing - run - 300 - end run - - - 2003-12-15T17:06:35 - 1071525995303 - 1541 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:06:35 - 1071525995303 - 1542 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:06:43 - 1071526003532 - 1543 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1914305523 - - - - 2003-12-15T17:06:43 - 1071526003532 - 1544 - org.codehaus.logger - INFO - Processing - run - 301 - start run - - - 2003-12-15T17:06:43 - 1071526003533 - 1545 - org.codehaus.logger - INFO - Processing - run - 301 - end run - - - 2003-12-15T17:06:43 - 1071526003533 - 1546 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:06:43 - 1071526003533 - 1547 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:07:05 - 1071526025432 - 1548 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1944164515 - - - - 2003-12-15T17:07:05 - 1071526025433 - 1549 - org.codehaus.logger - INFO - Processing - run - 302 - start run - - - 2003-12-15T17:07:05 - 1071526025433 - 1550 - org.codehaus.logger - INFO - Processing - run - 302 - end run - - - 2003-12-15T17:07:05 - 1071526025433 - 1551 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:07:05 - 1071526025433 - 1552 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:07:14 - 1071526034972 - 1553 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1944306880 - - - - 2003-12-15T17:07:14 - 1071526034974 - 1554 - org.codehaus.logger - INFO - Processing - run - 303 - start run - - - 2003-12-15T17:07:14 - 1071526034975 - 1555 - org.codehaus.logger - INFO - Processing - run - 303 - end run - - - 2003-12-15T17:07:14 - 1071526034975 - 1556 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:07:14 - 1071526034975 - 1557 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:07:35 - 1071526055612 - 1558 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1974314682 - - - - 2003-12-15T17:07:35 - 1071526055613 - 1559 - org.codehaus.logger - INFO - Processing - run - 304 - start run - - - 2003-12-15T17:07:35 - 1071526055614 - 1560 - org.codehaus.logger - INFO - Processing - run - 304 - end run - - - 2003-12-15T17:07:35 - 1071526055615 - 1561 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:07:35 - 1071526055615 - 1562 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:07:43 - 1071526063532 - 1563 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1974308337 - - - - 2003-12-15T17:07:43 - 1071526063533 - 1564 - org.codehaus.logger - INFO - Processing - run - 305 - start run - - - 2003-12-15T17:07:43 - 1071526063533 - 1565 - org.codehaus.logger - INFO - Processing - run - 305 - end run - - - 2003-12-15T17:07:43 - 1071526063533 - 1566 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:07:43 - 1071526063534 - 1567 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:08:05 - 1071526085782 - 1568 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2004464820 - - - - 2003-12-15T17:08:05 - 1071526085783 - 1569 - org.codehaus.logger - INFO - Processing - run - 306 - start run - - - 2003-12-15T17:08:05 - 1071526085783 - 1570 - org.codehaus.logger - INFO - Processing - run - 306 - end run - - - 2003-12-15T17:08:05 - 1071526085783 - 1571 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:08:05 - 1071526085783 - 1572 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:08:13 - 1071526093552 - 1573 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2004310817 - - - - 2003-12-15T17:08:13 - 1071526093553 - 1574 - org.codehaus.logger - INFO - Processing - run - 307 - start run - - - 2003-12-15T17:08:13 - 1071526093554 - 1575 - org.codehaus.logger - INFO - Processing - run - 307 - end run - - - 2003-12-15T17:08:13 - 1071526093554 - 1576 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:08:13 - 1071526093555 - 1577 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:08:35 - 1071526115932 - 1578 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2034614965 - - - - 2003-12-15T17:08:35 - 1071526115933 - 1579 - org.codehaus.logger - INFO - Processing - run - 308 - start run - - - 2003-12-15T17:08:35 - 1071526115934 - 1580 - org.codehaus.logger - INFO - Processing - run - 308 - end run - - - 2003-12-15T17:08:35 - 1071526115934 - 1581 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:08:35 - 1071526115935 - 1582 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:08:43 - 1071526123552 - 1583 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2034312470 - - - - 2003-12-15T17:08:43 - 1071526123553 - 1584 - org.codehaus.logger - INFO - Processing - run - 309 - start run - - - 2003-12-15T17:08:43 - 1071526123554 - 1585 - org.codehaus.logger - INFO - Processing - run - 309 - end run - - - 2003-12-15T17:08:43 - 1071526123554 - 1586 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:08:43 - 1071526123555 - 1587 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:09:06 - 1071526146052 - 1588 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2064745168 - - - - 2003-12-15T17:09:06 - 1071526146053 - 1589 - org.codehaus.logger - INFO - Processing - run - 310 - start run - - - 2003-12-15T17:09:06 - 1071526146054 - 1590 - org.codehaus.logger - INFO - Processing - run - 310 - end run - - - 2003-12-15T17:09:06 - 1071526146054 - 1591 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:09:06 - 1071526146054 - 1592 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:09:13 - 1071526153602 - 1593 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2064315274 - - - - 2003-12-15T17:09:13 - 1071526153603 - 1594 - org.codehaus.logger - INFO - Processing - run - 311 - start run - - - 2003-12-15T17:09:13 - 1071526153603 - 1595 - org.codehaus.logger - INFO - Processing - run - 311 - end run - - - 2003-12-15T17:09:13 - 1071526153604 - 1596 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:09:13 - 1071526153604 - 1597 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:09:36 - 1071526176223 - 1598 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2094905267 - - - - 2003-12-15T17:09:36 - 1071526176224 - 1599 - org.codehaus.logger - INFO - Processing - run - 312 - start run - - - 2003-12-15T17:09:36 - 1071526176225 - 1600 - org.codehaus.logger - INFO - Processing - run - 312 - end run - - - 2003-12-15T17:09:36 - 1071526176225 - 1601 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:09:36 - 1071526176225 - 1602 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:09:41 - 1071526181683 - 1603 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T17:09:41 - 1071526181683 - 1604 - org.codehaus.logger - INFO - Processing - run - 313 - start run - - - 2003-12-15T17:09:41 - 1071526181684 - 1605 - org.codehaus.logger - INFO - Processing - run - 313 - end run - - - 2003-12-15T17:09:41 - 1071526181684 - 1606 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T17:09:41 - 1071526181684 - 1607 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T17:09:43 - 1071526183603 - 1608 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2094317143 - - - - 2003-12-15T17:09:43 - 1071526183604 - 1609 - org.codehaus.logger - INFO - Processing - run - 314 - start run - - - 2003-12-15T17:09:43 - 1071526183604 - 1610 - org.codehaus.logger - INFO - Processing - run - 314 - end run - - - 2003-12-15T17:09:43 - 1071526183605 - 1611 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:09:43 - 1071526183605 - 1612 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:10:06 - 1071526206403 - 1613 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2125115419 - - - - 2003-12-15T17:10:06 - 1071526206404 - 1614 - org.codehaus.logger - INFO - Processing - run - 315 - start run - - - 2003-12-15T17:10:06 - 1071526206405 - 1615 - org.codehaus.logger - INFO - Processing - run - 315 - end run - - - 2003-12-15T17:10:06 - 1071526206405 - 1616 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:10:06 - 1071526206405 - 1617 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:10:13 - 1071526213613 - 1618 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2124319942 - - - - 2003-12-15T17:10:13 - 1071526213613 - 1619 - org.codehaus.logger - INFO - Processing - run - 316 - start run - - - 2003-12-15T17:10:13 - 1071526213614 - 1620 - org.codehaus.logger - INFO - Processing - run - 316 - end run - - - 2003-12-15T17:10:13 - 1071526213614 - 1621 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:10:13 - 1071526213614 - 1622 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:10:36 - 1071526236533 - 1623 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2155265577 - - - - 2003-12-15T17:10:36 - 1071526236535 - 1624 - org.codehaus.logger - INFO - Processing - run - 317 - start run - - - 2003-12-15T17:10:36 - 1071526236535 - 1625 - org.codehaus.logger - INFO - Processing - run - 317 - end run - - - 2003-12-15T17:10:36 - 1071526236536 - 1626 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:10:36 - 1071526236536 - 1627 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:10:43 - 1071526243593 - 1628 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2154321584 - - - - 2003-12-15T17:10:43 - 1071526243594 - 1629 - org.codehaus.logger - INFO - Processing - run - 318 - start run - - - 2003-12-15T17:10:43 - 1071526243595 - 1630 - org.codehaus.logger - INFO - Processing - run - 318 - end run - - - 2003-12-15T17:10:43 - 1071526243595 - 1631 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:10:43 - 1071526243595 - 1632 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:11:06 - 1071526266693 - 1633 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2185415736 - - - - 2003-12-15T17:11:06 - 1071526266694 - 1634 - org.codehaus.logger - INFO - Processing - run - 319 - start run - - - 2003-12-15T17:11:06 - 1071526266694 - 1635 - org.codehaus.logger - INFO - Processing - run - 319 - end run - - - 2003-12-15T17:11:06 - 1071526266694 - 1636 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:11:06 - 1071526266695 - 1637 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:11:13 - 1071526273603 - 1638 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2184323244 - - - - 2003-12-15T17:11:13 - 1071526273606 - 1639 - org.codehaus.logger - INFO - Processing - run - 320 - start run - - - 2003-12-15T17:11:13 - 1071526273606 - 1640 - org.codehaus.logger - INFO - Processing - run - 320 - end run - - - 2003-12-15T17:11:13 - 1071526273606 - 1641 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:11:13 - 1071526273639 - 1642 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:11:36 - 1071526296883 - 1643 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2215565898 - - - - 2003-12-15T17:11:36 - 1071526296884 - 1644 - org.codehaus.logger - INFO - Processing - run - 321 - start run - - - 2003-12-15T17:11:36 - 1071526296884 - 1645 - org.codehaus.logger - INFO - Processing - run - 321 - end run - - - 2003-12-15T17:11:36 - 1071526296885 - 1646 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:11:36 - 1071526296885 - 1647 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:11:43 - 1071526303594 - 1648 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2214324587 - - - - 2003-12-15T17:11:43 - 1071526303603 - 1649 - org.codehaus.logger - INFO - Processing - run - 322 - start run - - - 2003-12-15T17:11:43 - 1071526303604 - 1650 - org.codehaus.logger - INFO - Processing - run - 322 - end run - - - 2003-12-15T17:11:43 - 1071526303604 - 1651 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:11:43 - 1071526303605 - 1652 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:12:07 - 1071526327013 - 1653 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2245716050 - - - - 2003-12-15T17:12:07 - 1071526327014 - 1654 - org.codehaus.logger - INFO - Processing - run - 323 - start run - - - 2003-12-15T17:12:07 - 1071526327014 - 1655 - org.codehaus.logger - INFO - Processing - run - 323 - end run - - - 2003-12-15T17:12:07 - 1071526327015 - 1656 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:12:07 - 1071526327033 - 1657 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:12:13 - 1071526333611 - 1658 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2244326304 - - - - 2003-12-15T17:12:13 - 1071526333613 - 1659 - org.codehaus.logger - INFO - Processing - run - 324 - start run - - - 2003-12-15T17:12:13 - 1071526333613 - 1660 - org.codehaus.logger - INFO - Processing - run - 324 - end run - - - 2003-12-15T17:12:13 - 1071526333614 - 1661 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:12:13 - 1071526333614 - 1662 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:12:37 - 1071526357163 - 1663 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2275876204 - - - - 2003-12-15T17:12:37 - 1071526357164 - 1664 - org.codehaus.logger - INFO - Processing - run - 325 - start run - - - 2003-12-15T17:12:37 - 1071526357165 - 1665 - org.codehaus.logger - INFO - Processing - run - 325 - end run - - - 2003-12-15T17:12:37 - 1071526357165 - 1666 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:12:37 - 1071526357165 - 1667 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:12:43 - 1071526363654 - 1668 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2274332480 - - - - 2003-12-15T17:12:43 - 1071526363654 - 1669 - org.codehaus.logger - INFO - Processing - run - 326 - start run - - - 2003-12-15T17:12:43 - 1071526363655 - 1670 - org.codehaus.logger - INFO - Processing - run - 326 - end run - - - 2003-12-15T17:12:43 - 1071526363655 - 1671 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:12:43 - 1071526363655 - 1672 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:13:07 - 1071526387314 - 1673 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2306026459 - - - - 2003-12-15T17:13:07 - 1071526387315 - 1674 - org.codehaus.logger - INFO - Processing - run - 327 - start run - - - 2003-12-15T17:13:07 - 1071526387315 - 1675 - org.codehaus.logger - INFO - Processing - run - 327 - end run - - - 2003-12-15T17:13:07 - 1071526387316 - 1676 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:13:07 - 1071526387316 - 1677 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:13:13 - 1071526393634 - 1678 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2304334702 - - - - 2003-12-15T17:13:13 - 1071526393634 - 1679 - org.codehaus.logger - INFO - Processing - run - 328 - start run - - - 2003-12-15T17:13:13 - 1071526393635 - 1680 - org.codehaus.logger - INFO - Processing - run - 328 - end run - - - 2003-12-15T17:13:13 - 1071526393635 - 1681 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:13:13 - 1071526393635 - 1682 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:13:37 - 1071526417464 - 1683 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2336156521 - - - - 2003-12-15T17:13:37 - 1071526417465 - 1684 - org.codehaus.logger - INFO - Processing - run - 329 - start run - - - 2003-12-15T17:13:37 - 1071526417465 - 1685 - org.codehaus.logger - INFO - Processing - run - 329 - end run - - - 2003-12-15T17:13:37 - 1071526417466 - 1686 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:13:37 - 1071526417466 - 1687 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:13:43 - 1071526423664 - 1688 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2334348362 - - - - 2003-12-15T17:13:43 - 1071526423665 - 1689 - org.codehaus.logger - INFO - Processing - run - 330 - start run - - - 2003-12-15T17:13:43 - 1071526423665 - 1690 - org.codehaus.logger - INFO - Processing - run - 330 - end run - - - 2003-12-15T17:13:43 - 1071526423665 - 1691 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:13:43 - 1071526423665 - 1692 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:14:07 - 1071526447604 - 1693 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2366296679 - - - - 2003-12-15T17:14:07 - 1071526447605 - 1694 - org.codehaus.logger - INFO - Processing - run - 331 - start run - - - 2003-12-15T17:14:07 - 1071526447605 - 1695 - org.codehaus.logger - INFO - Processing - run - 331 - end run - - - 2003-12-15T17:14:07 - 1071526447605 - 1696 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:14:07 - 1071526447605 - 1697 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:14:13 - 1071526453664 - 1698 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2364349951 - - - - 2003-12-15T17:14:13 - 1071526453665 - 1699 - org.codehaus.logger - INFO - Processing - run - 332 - start run - - - 2003-12-15T17:14:13 - 1071526453665 - 1700 - org.codehaus.logger - INFO - Processing - run - 332 - end run - - - 2003-12-15T17:14:13 - 1071526453665 - 1701 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:14:13 - 1071526453666 - 1702 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:14:37 - 1071526477734 - 1703 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2396436855 - - - - 2003-12-15T17:14:37 - 1071526477735 - 1704 - org.codehaus.logger - INFO - Processing - run - 333 - start run - - - 2003-12-15T17:14:37 - 1071526477736 - 1705 - org.codehaus.logger - INFO - Processing - run - 333 - end run - - - 2003-12-15T17:14:37 - 1071526477736 - 1706 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:14:37 - 1071526477736 - 1707 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:14:41 - 1071526481754 - 1708 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T17:14:41 - 1071526481755 - 1709 - org.codehaus.logger - INFO - Processing - run - 334 - start run - - - 2003-12-15T17:14:41 - 1071526481756 - 1710 - org.codehaus.logger - INFO - Processing - run - 334 - end run - - - 2003-12-15T17:14:41 - 1071526481756 - 1711 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T17:14:41 - 1071526481757 - 1712 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T17:14:43 - 1071526483674 - 1713 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2394352238 - - - - 2003-12-15T17:14:43 - 1071526483675 - 1714 - org.codehaus.logger - INFO - Processing - run - 335 - start run - - - 2003-12-15T17:14:43 - 1071526483675 - 1715 - org.codehaus.logger - INFO - Processing - run - 335 - end run - - - 2003-12-15T17:14:43 - 1071526483675 - 1716 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:14:43 - 1071526483789 - 1717 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:15:07 - 1071526507855 - 1718 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2426587054 - - - - 2003-12-15T17:15:07 - 1071526507856 - 1719 - org.codehaus.logger - INFO - Processing - run - 336 - start run - - - 2003-12-15T17:15:07 - 1071526507857 - 1720 - org.codehaus.logger - INFO - Processing - run - 336 - end run - - - 2003-12-15T17:15:07 - 1071526507857 - 1721 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:15:07 - 1071526507857 - 1722 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:15:13 - 1071526513674 - 1723 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2424357414 - - - - 2003-12-15T17:15:13 - 1071526513675 - 1724 - org.codehaus.logger - INFO - Processing - run - 337 - start run - - - 2003-12-15T17:15:13 - 1071526513676 - 1725 - org.codehaus.logger - INFO - Processing - run - 337 - end run - - - 2003-12-15T17:15:13 - 1071526513677 - 1726 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:15:13 - 1071526513677 - 1727 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:15:38 - 1071526538014 - 1728 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2456737162 - - - - 2003-12-15T17:15:38 - 1071526538016 - 1729 - org.codehaus.logger - INFO - Processing - run - 338 - start run - - - 2003-12-15T17:15:38 - 1071526538016 - 1730 - org.codehaus.logger - INFO - Processing - run - 338 - end run - - - 2003-12-15T17:15:38 - 1071526538016 - 1731 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:15:38 - 1071526538017 - 1732 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:15:43 - 1071526543725 - 1733 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2454359393 - - - - 2003-12-15T17:15:43 - 1071526543726 - 1734 - org.codehaus.logger - INFO - Processing - run - 339 - start run - - - 2003-12-15T17:15:43 - 1071526543726 - 1735 - org.codehaus.logger - INFO - Processing - run - 339 - end run - - - 2003-12-15T17:15:43 - 1071526543727 - 1736 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:15:43 - 1071526543727 - 1737 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:16:08 - 1071526568195 - 1738 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2486907332 - - - - 2003-12-15T17:16:08 - 1071526568196 - 1739 - org.codehaus.logger - INFO - Processing - run - 340 - start run - - - 2003-12-15T17:16:08 - 1071526568196 - 1740 - org.codehaus.logger - INFO - Processing - run - 340 - end run - - - 2003-12-15T17:16:08 - 1071526568197 - 1741 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:16:08 - 1071526568197 - 1742 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:16:13 - 1071526573715 - 1743 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2484366147 - - - - 2003-12-15T17:16:13 - 1071526573716 - 1744 - org.codehaus.logger - INFO - Processing - run - 341 - start run - - - 2003-12-15T17:16:13 - 1071526573716 - 1745 - org.codehaus.logger - INFO - Processing - run - 341 - end run - - - 2003-12-15T17:16:13 - 1071526573717 - 1746 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:16:13 - 1071526573717 - 1747 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:16:38 - 1071526598385 - 1748 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2517097486 - - - - 2003-12-15T17:16:38 - 1071526598385 - 1749 - org.codehaus.logger - INFO - Processing - run - 342 - start run - - - 2003-12-15T17:16:38 - 1071526598386 - 1750 - org.codehaus.logger - INFO - Processing - run - 342 - end run - - - 2003-12-15T17:16:38 - 1071526598386 - 1751 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:16:38 - 1071526598386 - 1752 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:16:43 - 1071526603725 - 1753 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2514368285 - - - - 2003-12-15T17:16:43 - 1071526603726 - 1754 - org.codehaus.logger - INFO - Processing - run - 343 - start run - - - 2003-12-15T17:16:43 - 1071526603726 - 1755 - org.codehaus.logger - INFO - Processing - run - 343 - end run - - - 2003-12-15T17:16:43 - 1071526603726 - 1756 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:16:43 - 1071526603728 - 1757 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:17:08 - 1071526628575 - 1758 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2547257651 - - - - 2003-12-15T17:17:08 - 1071526628576 - 1759 - org.codehaus.logger - INFO - Processing - run - 344 - start run - - - 2003-12-15T17:17:08 - 1071526628576 - 1760 - org.codehaus.logger - INFO - Processing - run - 344 - end run - - - 2003-12-15T17:17:08 - 1071526628577 - 1761 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:17:08 - 1071526628577 - 1762 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:17:13 - 1071526633735 - 1763 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2544370313 - - - - 2003-12-15T17:17:13 - 1071526633736 - 1764 - org.codehaus.logger - INFO - Processing - run - 345 - start run - - - 2003-12-15T17:17:13 - 1071526633736 - 1765 - org.codehaus.logger - INFO - Processing - run - 345 - end run - - - 2003-12-15T17:17:13 - 1071526633736 - 1766 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:17:13 - 1071526633736 - 1767 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:17:38 - 1071526658645 - 1768 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2577377821 - - - - 2003-12-15T17:17:38 - 1071526658646 - 1769 - org.codehaus.logger - INFO - Processing - run - 346 - start run - - - 2003-12-15T17:17:38 - 1071526658648 - 1770 - org.codehaus.logger - INFO - Processing - run - 346 - end run - - - 2003-12-15T17:17:38 - 1071526658648 - 1771 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:17:38 - 1071526658649 - 1772 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:17:43 - 1071526663765 - 1773 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2574371990 - - - - 2003-12-15T17:17:43 - 1071526663766 - 1774 - org.codehaus.logger - INFO - Processing - run - 347 - start run - - - 2003-12-15T17:17:43 - 1071526663774 - 1775 - org.codehaus.logger - INFO - Processing - run - 347 - end run - - - 2003-12-15T17:17:43 - 1071526663775 - 1776 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:17:43 - 1071526663775 - 1777 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:18:08 - 1071526688815 - 1778 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2607538103 - - - - 2003-12-15T17:18:08 - 1071526688816 - 1779 - org.codehaus.logger - INFO - Processing - run - 348 - start run - - - 2003-12-15T17:18:08 - 1071526688816 - 1780 - org.codehaus.logger - INFO - Processing - run - 348 - end run - - - 2003-12-15T17:18:08 - 1071526688817 - 1781 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:18:08 - 1071526688817 - 1782 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:18:13 - 1071526693745 - 1783 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2604374025 - - - - 2003-12-15T17:18:13 - 1071526693746 - 1784 - org.codehaus.logger - INFO - Processing - run - 349 - start run - - - 2003-12-15T17:18:13 - 1071526693746 - 1785 - org.codehaus.logger - INFO - Processing - run - 349 - end run - - - 2003-12-15T17:18:13 - 1071526693747 - 1786 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:18:13 - 1071526693747 - 1787 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:18:38 - 1071526718955 - 1788 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2637668149 - - - - 2003-12-15T17:18:38 - 1071526718956 - 1789 - org.codehaus.logger - INFO - Processing - run - 350 - start run - - - 2003-12-15T17:18:38 - 1071526718956 - 1790 - org.codehaus.logger - INFO - Processing - run - 350 - end run - - - 2003-12-15T17:18:38 - 1071526718957 - 1791 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:18:38 - 1071526718957 - 1792 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:18:43 - 1071526723755 - 1793 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2634376703 - - - - 2003-12-15T17:18:43 - 1071526723756 - 1794 - org.codehaus.logger - INFO - Processing - run - 351 - start run - - - 2003-12-15T17:18:43 - 1071526723758 - 1795 - org.codehaus.logger - INFO - Processing - run - 351 - end run - - - 2003-12-15T17:18:43 - 1071526723758 - 1796 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:18:43 - 1071526723758 - 1797 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:19:09 - 1071526749106 - 1798 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2667808316 - - - - 2003-12-15T17:19:09 - 1071526749106 - 1799 - org.codehaus.logger - INFO - Processing - run - 352 - start run - - - 2003-12-15T17:19:09 - 1071526749107 - 1800 - org.codehaus.logger - INFO - Processing - run - 352 - end run - - - 2003-12-15T17:19:09 - 1071526749107 - 1801 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:19:09 - 1071526749107 - 1802 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:19:39 - 1071526779206 - 1803 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2697938485 - - - - 2003-12-15T17:19:39 - 1071526779207 - 1804 - org.codehaus.logger - INFO - Processing - run - 353 - start run - - - 2003-12-15T17:19:39 - 1071526779207 - 1805 - org.codehaus.logger - INFO - Processing - run - 353 - end run - - - 2003-12-15T17:19:39 - 1071526779208 - 1806 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:19:39 - 1071526779208 - 1807 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:19:41 - 1071526781846 - 1808 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T17:19:41 - 1071526781847 - 1809 - org.codehaus.logger - INFO - Processing - run - 354 - start run - - - 2003-12-15T17:19:41 - 1071526781847 - 1810 - org.codehaus.logger - INFO - Processing - run - 354 - end run - - - 2003-12-15T17:19:41 - 1071526781847 - 1811 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T17:19:41 - 1071526781847 - 1812 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T17:20:07 - 1071526807846 - 1813 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2718415601 - - - - 2003-12-15T17:20:07 - 1071526807847 - 1814 - org.codehaus.logger - INFO - Processing - run - 355 - start run - - - 2003-12-15T17:20:07 - 1071526807847 - 1815 - org.codehaus.logger - INFO - Processing - run - 355 - end run - - - 2003-12-15T17:20:07 - 1071526807847 - 1816 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:20:07 - 1071526807848 - 1817 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:20:09 - 1071526809406 - 1818 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2728078716 - - - - 2003-12-15T17:20:09 - 1071526809407 - 1819 - org.codehaus.logger - INFO - Processing - run - 356 - start run - - - 2003-12-15T17:20:09 - 1071526809407 - 1820 - org.codehaus.logger - INFO - Processing - run - 356 - end run - - - 2003-12-15T17:20:09 - 1071526809407 - 1821 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:20:09 - 1071526809407 - 1822 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:20:38 - 1071526838296 - 1823 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2748854303 - - - - 2003-12-15T17:20:38 - 1071526838297 - 1824 - org.codehaus.logger - INFO - Processing - run - 357 - start run - - - 2003-12-15T17:20:38 - 1071526838298 - 1825 - org.codehaus.logger - INFO - Processing - run - 357 - end run - - - 2003-12-15T17:20:38 - 1071526838298 - 1826 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:20:38 - 1071526838298 - 1827 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:20:39 - 1071526839556 - 1828 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2758238815 - - - - 2003-12-15T17:20:39 - 1071526839557 - 1829 - org.codehaus.logger - INFO - Processing - run - 358 - start run - - - 2003-12-15T17:20:39 - 1071526839557 - 1830 - org.codehaus.logger - INFO - Processing - run - 358 - end run - - - 2003-12-15T17:20:39 - 1071526839557 - 1831 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:20:39 - 1071526839558 - 1832 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:21:08 - 1071526868264 - 1833 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2778860251 - - - - 2003-12-15T17:21:08 - 1071526868268 - 1834 - org.codehaus.logger - INFO - Processing - run - 359 - start run - - - 2003-12-15T17:21:08 - 1071526868303 - 1835 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:21:08 - 1071526868303 - 1836 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:21:08 - 1071526868303 - 1837 - org.codehaus.logger - INFO - Processing - run - 359 - end run - - - 2003-12-15T17:21:09 - 1071526869696 - 1838 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2788388984 - - - - 2003-12-15T17:21:09 - 1071526869697 - 1839 - org.codehaus.logger - INFO - Processing - run - 360 - start run - - - 2003-12-15T17:21:09 - 1071526869697 - 1840 - org.codehaus.logger - INFO - Processing - run - 360 - end run - - - 2003-12-15T17:21:09 - 1071526869698 - 1841 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:21:09 - 1071526869698 - 1842 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:21:38 - 1071526898336 - 1843 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2808936033 - - - - 2003-12-15T17:21:38 - 1071526898337 - 1844 - org.codehaus.logger - INFO - Processing - run - 361 - start run - - - 2003-12-15T17:21:38 - 1071526898337 - 1845 - org.codehaus.logger - INFO - Processing - run - 361 - end run - - - 2003-12-15T17:21:38 - 1071526898338 - 1846 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:21:38 - 1071526898338 - 1847 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:21:39 - 1071526899836 - 1848 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2818539063 - - - - 2003-12-15T17:21:39 - 1071526899837 - 1849 - org.codehaus.logger - INFO - Processing - run - 362 - start run - - - 2003-12-15T17:21:39 - 1071526899837 - 1850 - org.codehaus.logger - INFO - Processing - run - 362 - end run - - - 2003-12-15T17:21:39 - 1071526899838 - 1851 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:21:39 - 1071526899838 - 1852 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:22:08 - 1071526928406 - 1853 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2838948251 - - - - 2003-12-15T17:22:08 - 1071526928407 - 1854 - org.codehaus.logger - INFO - Processing - run - 363 - start run - - - 2003-12-15T17:22:08 - 1071526928407 - 1855 - org.codehaus.logger - INFO - Processing - run - 363 - end run - - - 2003-12-15T17:22:08 - 1071526928408 - 1856 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:22:08 - 1071526928408 - 1857 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:22:09 - 1071526929966 - 1858 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2848669141 - - - - 2003-12-15T17:22:09 - 1071526929967 - 1859 - org.codehaus.logger - INFO - Processing - run - 364 - start run - - - 2003-12-15T17:22:09 - 1071526929967 - 1860 - org.codehaus.logger - INFO - Processing - run - 364 - end run - - - 2003-12-15T17:22:09 - 1071526929968 - 1861 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:22:09 - 1071526929968 - 1862 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:22:38 - 1071526958437 - 1863 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2869014580 - - - - 2003-12-15T17:22:38 - 1071526958437 - 1864 - org.codehaus.logger - INFO - Processing - run - 365 - start run - - - 2003-12-15T17:22:38 - 1071526958438 - 1865 - org.codehaus.logger - INFO - Processing - run - 365 - end run - - - 2003-12-15T17:22:38 - 1071526958438 - 1866 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:22:38 - 1071526958438 - 1867 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:22:40 - 1071526960117 - 1868 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2878823260 - - - - 2003-12-15T17:22:40 - 1071526960117 - 1869 - org.codehaus.logger - INFO - Processing - run - 366 - start run - - - 2003-12-15T17:22:40 - 1071526960117 - 1870 - org.codehaus.logger - INFO - Processing - run - 366 - end run - - - 2003-12-15T17:22:40 - 1071526960118 - 1871 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:22:40 - 1071526960118 - 1872 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:23:08 - 1071526988517 - 1873 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2899075059 - - - - 2003-12-15T17:23:08 - 1071526988519 - 1874 - org.codehaus.logger - INFO - Processing - run - 367 - start run - - - 2003-12-15T17:23:08 - 1071526988519 - 1875 - org.codehaus.logger - INFO - Processing - run - 367 - end run - - - 2003-12-15T17:23:08 - 1071526988519 - 1876 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:23:08 - 1071526988519 - 1877 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:23:10 - 1071526990377 - 1878 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2909069286 - - - - 2003-12-15T17:23:10 - 1071526990377 - 1879 - org.codehaus.logger - INFO - Processing - run - 368 - start run - - - 2003-12-15T17:23:10 - 1071526990378 - 1880 - org.codehaus.logger - INFO - Processing - run - 368 - end run - - - 2003-12-15T17:23:10 - 1071526990378 - 1881 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:23:10 - 1071526990378 - 1882 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:23:38 - 1071527018637 - 1883 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2929089774 - - - - 2003-12-15T17:23:38 - 1071527018638 - 1884 - org.codehaus.logger - INFO - Processing - run - 369 - start run - - - 2003-12-15T17:23:38 - 1071527018639 - 1885 - org.codehaus.logger - INFO - Processing - run - 369 - end run - - - 2003-12-15T17:23:38 - 1071527018639 - 1886 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:23:38 - 1071527018639 - 1887 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:23:40 - 1071527020557 - 1888 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2939239361 - - - - 2003-12-15T17:23:40 - 1071527020557 - 1889 - org.codehaus.logger - INFO - Processing - run - 370 - start run - - - 2003-12-15T17:23:40 - 1071527020558 - 1890 - org.codehaus.logger - INFO - Processing - run - 370 - end run - - - 2003-12-15T17:23:40 - 1071527020558 - 1891 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:23:40 - 1071527020558 - 1892 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:24:08 - 1071527048557 - 1893 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2959099552 - - - - 2003-12-15T17:24:08 - 1071527048558 - 1894 - org.codehaus.logger - INFO - Processing - run - 371 - start run - - - 2003-12-15T17:24:08 - 1071527048558 - 1895 - org.codehaus.logger - INFO - Processing - run - 371 - end run - - - 2003-12-15T17:24:08 - 1071527048559 - 1896 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:24:08 - 1071527048559 - 1897 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:24:10 - 1071527050657 - 1898 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2969389445 - - - - 2003-12-15T17:24:10 - 1071527050658 - 1899 - org.codehaus.logger - INFO - Processing - run - 372 - start run - - - 2003-12-15T17:24:10 - 1071527050658 - 1900 - org.codehaus.logger - INFO - Processing - run - 372 - end run - - - 2003-12-15T17:24:10 - 1071527050661 - 1901 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:24:10 - 1071527050663 - 1902 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:24:38 - 1071527078637 - 1903 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2989196962 - - - - 2003-12-15T17:24:38 - 1071527078638 - 1904 - org.codehaus.logger - INFO - Processing - run - 373 - start run - - - 2003-12-15T17:24:38 - 1071527078638 - 1905 - org.codehaus.logger - INFO - Processing - run - 373 - end run - - - 2003-12-15T17:24:38 - 1071527078638 - 1906 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:24:38 - 1071527078638 - 1907 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:24:40 - 1071527080797 - 1908 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2999509508 - - - - 2003-12-15T17:24:40 - 1071527080798 - 1909 - org.codehaus.logger - INFO - Processing - run - 374 - start run - - - 2003-12-15T17:24:40 - 1071527080799 - 1910 - org.codehaus.logger - INFO - Processing - run - 374 - end run - - - 2003-12-15T17:24:40 - 1071527080799 - 1911 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:24:40 - 1071527080799 - 1912 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:24:41 - 1071527081997 - 1913 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T17:24:41 - 1071527081999 - 1914 - org.codehaus.logger - INFO - Processing - run - 375 - start run - - - 2003-12-15T17:24:42 - 1071527082000 - 1915 - org.codehaus.logger - INFO - Processing - run - 375 - end run - - - 2003-12-15T17:24:42 - 1071527082000 - 1916 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T17:24:42 - 1071527082000 - 1917 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T17:25:08 - 1071527108797 - 1918 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3019372727 - - - - 2003-12-15T17:25:08 - 1071527108798 - 1919 - org.codehaus.logger - INFO - Processing - run - 376 - start run - - - 2003-12-15T17:25:08 - 1071527108799 - 1920 - org.codehaus.logger - INFO - Processing - run - 376 - end run - - - 2003-12-15T17:25:08 - 1071527108799 - 1921 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:25:08 - 1071527108799 - 1922 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:25:10 - 1071527110957 - 1923 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3029659609 - - - - 2003-12-15T17:25:10 - 1071527110958 - 1924 - org.codehaus.logger - INFO - Processing - run - 377 - start run - - - 2003-12-15T17:25:10 - 1071527110958 - 1925 - org.codehaus.logger - INFO - Processing - run - 377 - end run - - - 2003-12-15T17:25:10 - 1071527110958 - 1926 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:25:10 - 1071527110958 - 1927 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:25:38 - 1071527138847 - 1928 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3049402237 - - - - 2003-12-15T17:25:38 - 1071527138848 - 1929 - org.codehaus.logger - INFO - Processing - run - 378 - start run - - - 2003-12-15T17:25:38 - 1071527138848 - 1930 - org.codehaus.logger - INFO - Processing - run - 378 - end run - - - 2003-12-15T17:25:38 - 1071527138849 - 1931 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:25:38 - 1071527138849 - 1932 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:25:41 - 1071527141127 - 1933 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3059809733 - - - - 2003-12-15T17:25:41 - 1071527141128 - 1934 - org.codehaus.logger - INFO - Processing - run - 379 - start run - - - 2003-12-15T17:25:41 - 1071527141128 - 1935 - org.codehaus.logger - INFO - Processing - run - 379 - end run - - - 2003-12-15T17:25:41 - 1071527141129 - 1936 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:25:41 - 1071527141129 - 1937 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:26:08 - 1071527168877 - 1938 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3087469533 - - - - 2003-12-15T17:26:08 - 1071527168878 - 1939 - org.codehaus.logger - INFO - Processing - run - 380 - start run - - - 2003-12-15T17:26:08 - 1071527168879 - 1940 - org.codehaus.logger - INFO - Processing - run - 380 - end run - - - 2003-12-15T17:26:08 - 1071527168879 - 1941 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:26:08 - 1071527168879 - 1942 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:26:11 - 1071527171277 - 1943 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3089969782 - - - - 2003-12-15T17:26:11 - 1071527171278 - 1944 - org.codehaus.logger - INFO - Processing - run - 381 - start run - - - 2003-12-15T17:26:11 - 1071527171278 - 1945 - org.codehaus.logger - INFO - Processing - run - 381 - end run - - - 2003-12-15T17:26:11 - 1071527171278 - 1946 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:26:11 - 1071527171278 - 1947 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:26:38 - 1071527198902 - 1948 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3117482437 - - - - 2003-12-15T17:26:38 - 1071527198903 - 1949 - org.codehaus.logger - INFO - Processing - run - 382 - start run - - - 2003-12-15T17:26:38 - 1071527198903 - 1950 - org.codehaus.logger - INFO - Processing - run - 382 - end run - - - 2003-12-15T17:26:38 - 1071527198904 - 1951 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:26:38 - 1071527198904 - 1952 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:26:41 - 1071527201447 - 1953 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3120124151 - - - - 2003-12-15T17:26:41 - 1071527201448 - 1954 - org.codehaus.logger - INFO - Processing - run - 383 - start run - - - 2003-12-15T17:26:41 - 1071527201448 - 1955 - org.codehaus.logger - INFO - Processing - run - 383 - end run - - - 2003-12-15T17:26:41 - 1071527201448 - 1956 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:26:41 - 1071527201449 - 1957 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:27:10 - 1071527230527 - 1958 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3147541013 - - - - 2003-12-15T17:27:10 - 1071527230528 - 1959 - org.codehaus.logger - INFO - Processing - run - 384 - start run - - - 2003-12-15T17:27:10 - 1071527230528 - 1960 - org.codehaus.logger - INFO - Processing - run - 384 - end run - - - 2003-12-15T17:27:10 - 1071527230528 - 1961 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:27:10 - 1071527230529 - 1962 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:27:11 - 1071527231587 - 1963 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3150279947 - - - - 2003-12-15T17:27:11 - 1071527231588 - 1964 - org.codehaus.logger - INFO - Processing - run - 385 - start run - - - 2003-12-15T17:27:11 - 1071527231589 - 1965 - org.codehaus.logger - INFO - Processing - run - 385 - end run - - - 2003-12-15T17:27:11 - 1071527231589 - 1966 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:27:11 - 1071527231589 - 1967 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:27:38 - 1071527258957 - 1968 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3177560755 - - - - 2003-12-15T17:27:38 - 1071527258960 - 1969 - org.codehaus.logger - INFO - Processing - run - 386 - start run - - - 2003-12-15T17:27:38 - 1071527258960 - 1970 - org.codehaus.logger - INFO - Processing - run - 386 - end run - - - 2003-12-15T17:27:38 - 1071527258961 - 1971 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:27:38 - 1071527258961 - 1972 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:27:41 - 1071527261747 - 1973 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3180430034 - - - - 2003-12-15T17:27:41 - 1071527261748 - 1974 - org.codehaus.logger - INFO - Processing - run - 387 - start run - - - 2003-12-15T17:27:41 - 1071527261748 - 1975 - org.codehaus.logger - INFO - Processing - run - 387 - end run - - - 2003-12-15T17:27:41 - 1071527261749 - 1976 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:27:41 - 1071527261749 - 1977 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:28:09 - 1071527289027 - 1978 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3207593385 - - - - 2003-12-15T17:28:09 - 1071527289028 - 1979 - org.codehaus.logger - INFO - Processing - run - 388 - start run - - - 2003-12-15T17:28:09 - 1071527289030 - 1980 - org.codehaus.logger - INFO - Processing - run - 388 - end run - - - 2003-12-15T17:28:09 - 1071527289030 - 1981 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:28:09 - 1071527289030 - 1982 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:28:11 - 1071527291867 - 1983 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3210590122 - - - - 2003-12-15T17:28:11 - 1071527291868 - 1984 - org.codehaus.logger - INFO - Processing - run - 389 - start run - - - 2003-12-15T17:28:11 - 1071527291868 - 1985 - org.codehaus.logger - INFO - Processing - run - 389 - end run - - - 2003-12-15T17:28:11 - 1071527291869 - 1986 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:28:11 - 1071527291869 - 1987 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:28:39 - 1071527319038 - 1988 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3237612906 - - - - 2003-12-15T17:28:39 - 1071527319038 - 1989 - org.codehaus.logger - INFO - Processing - run - 390 - start run - - - 2003-12-15T17:28:39 - 1071527319039 - 1990 - org.codehaus.logger - INFO - Processing - run - 390 - end run - - - 2003-12-15T17:28:39 - 1071527319039 - 1991 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:28:39 - 1071527319040 - 1992 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:28:42 - 1071527322057 - 1993 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3240740218 - - - - 2003-12-15T17:28:42 - 1071527322058 - 1994 - org.codehaus.logger - INFO - Processing - run - 391 - start run - - - 2003-12-15T17:28:42 - 1071527322058 - 1995 - org.codehaus.logger - INFO - Processing - run - 391 - end run - - - 2003-12-15T17:28:42 - 1071527322059 - 1996 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:28:42 - 1071527322059 - 1997 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:29:09 - 1071527349028 - 1998 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3267626171 - - - - 2003-12-15T17:29:09 - 1071527349029 - 1999 - org.codehaus.logger - INFO - Processing - run - 392 - start run - - - 2003-12-15T17:29:09 - 1071527349029 - 2000 - org.codehaus.logger - INFO - Processing - run - 392 - end run - - - 2003-12-15T17:29:09 - 1071527349030 - 2001 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:29:09 - 1071527349030 - 2002 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:29:12 - 1071527352228 - 2003 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3270910310 - - - - 2003-12-15T17:29:12 - 1071527352229 - 2004 - org.codehaus.logger - INFO - Processing - run - 393 - start run - - - 2003-12-15T17:29:12 - 1071527352229 - 2005 - org.codehaus.logger - INFO - Processing - run - 393 - end run - - - 2003-12-15T17:29:12 - 1071527352230 - 2006 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:29:12 - 1071527352230 - 2007 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:29:39 - 1071527379098 - 2008 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3297695637 - - - - 2003-12-15T17:29:39 - 1071527379098 - 2009 - org.codehaus.logger - INFO - Processing - run - 394 - start run - - - 2003-12-15T17:29:39 - 1071527379099 - 2010 - org.codehaus.logger - INFO - Processing - run - 394 - end run - - - 2003-12-15T17:29:39 - 1071527379099 - 2011 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:29:39 - 1071527379099 - 2012 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:29:42 - 1071527382098 - 2013 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T17:29:42 - 1071527382099 - 2014 - org.codehaus.logger - INFO - Processing - run - 395 - start run - - - 2003-12-15T17:29:42 - 1071527382099 - 2015 - org.codehaus.logger - INFO - Processing - run - 395 - end run - - - 2003-12-15T17:29:42 - 1071527382100 - 2016 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T17:29:42 - 1071527382100 - 2017 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T17:29:42 - 1071527382338 - 2018 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3301060431 - - - - 2003-12-15T17:29:42 - 1071527382339 - 2019 - org.codehaus.logger - INFO - Processing - run - 396 - start run - - - 2003-12-15T17:29:42 - 1071527382339 - 2020 - org.codehaus.logger - INFO - Processing - run - 396 - end run - - - 2003-12-15T17:29:42 - 1071527382339 - 2021 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:29:42 - 1071527382339 - 2022 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:30:09 - 1071527409218 - 2023 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3327728563 - - - - 2003-12-15T17:30:09 - 1071527409218 - 2024 - org.codehaus.logger - INFO - Processing - run - 397 - start run - - - 2003-12-15T17:30:09 - 1071527409219 - 2025 - org.codehaus.logger - INFO - Processing - run - 397 - end run - - - 2003-12-15T17:30:09 - 1071527409219 - 2026 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:30:09 - 1071527409219 - 2027 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:30:12 - 1071527412518 - 2028 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3331210491 - - - - 2003-12-15T17:30:12 - 1071527412519 - 2029 - org.codehaus.logger - INFO - Processing - run - 398 - start run - - - 2003-12-15T17:30:12 - 1071527412519 - 2030 - org.codehaus.logger - INFO - Processing - run - 398 - end run - - - 2003-12-15T17:30:12 - 1071527412520 - 2031 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:30:12 - 1071527412521 - 2032 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:30:39 - 1071527439178 - 2033 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3357750736 - - - - 2003-12-15T17:30:39 - 1071527439179 - 2034 - org.codehaus.logger - INFO - Processing - run - 399 - start run - - - 2003-12-15T17:30:39 - 1071527439179 - 2035 - org.codehaus.logger - INFO - Processing - run - 399 - end run - - - 2003-12-15T17:30:39 - 1071527439179 - 2036 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:30:39 - 1071527439180 - 2037 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:30:42 - 1071527442658 - 2038 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3361360579 - - - - 2003-12-15T17:30:42 - 1071527442659 - 2039 - org.codehaus.logger - INFO - Processing - run - 400 - start run - - - 2003-12-15T17:30:42 - 1071527442659 - 2040 - org.codehaus.logger - INFO - Processing - run - 400 - end run - - - 2003-12-15T17:30:42 - 1071527442660 - 2041 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:30:42 - 1071527442660 - 2042 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:31:09 - 1071527469198 - 2043 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3387785730 - - - - 2003-12-15T17:31:09 - 1071527469199 - 2044 - org.codehaus.logger - INFO - Processing - run - 401 - start run - - - 2003-12-15T17:31:09 - 1071527469199 - 2045 - org.codehaus.logger - INFO - Processing - run - 401 - end run - - - 2003-12-15T17:31:09 - 1071527469199 - 2046 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:31:09 - 1071527469200 - 2047 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:31:12 - 1071527472798 - 2048 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3391500677 - - - - 2003-12-15T17:31:12 - 1071527472799 - 2049 - org.codehaus.logger - INFO - Processing - run - 402 - start run - - - 2003-12-15T17:31:12 - 1071527472799 - 2050 - org.codehaus.logger - INFO - Processing - run - 402 - end run - - - 2003-12-15T17:31:12 - 1071527472799 - 2051 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:31:12 - 1071527472799 - 2052 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:31:39 - 1071527499218 - 2053 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3417798687 - - - - 2003-12-15T17:31:39 - 1071527499219 - 2054 - org.codehaus.logger - INFO - Processing - run - 403 - start run - - - 2003-12-15T17:31:39 - 1071527499219 - 2055 - org.codehaus.logger - INFO - Processing - run - 403 - end run - - - 2003-12-15T17:31:39 - 1071527499219 - 2056 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:31:39 - 1071527499219 - 2057 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:31:42 - 1071527502938 - 2058 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3421650775 - - - - 2003-12-15T17:31:42 - 1071527502939 - 2059 - org.codehaus.logger - INFO - Processing - run - 404 - start run - - - 2003-12-15T17:31:42 - 1071527502939 - 2060 - org.codehaus.logger - INFO - Processing - run - 404 - end run - - - 2003-12-15T17:31:42 - 1071527502939 - 2061 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:31:42 - 1071527502939 - 2062 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:32:09 - 1071527529278 - 2063 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3447806880 - - - - 2003-12-15T17:32:09 - 1071527529279 - 2064 - org.codehaus.logger - INFO - Processing - run - 405 - start run - - - 2003-12-15T17:32:09 - 1071527529280 - 2065 - org.codehaus.logger - INFO - Processing - run - 405 - end run - - - 2003-12-15T17:32:09 - 1071527529280 - 2066 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:32:09 - 1071527529281 - 2067 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:32:13 - 1071527533138 - 2068 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3451820900 - - - - 2003-12-15T17:32:13 - 1071527533139 - 2069 - org.codehaus.logger - INFO - Processing - run - 406 - start run - - - 2003-12-15T17:32:13 - 1071527533141 - 2070 - org.codehaus.logger - INFO - Processing - run - 406 - end run - - - 2003-12-15T17:32:13 - 1071527533141 - 2071 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:32:13 - 1071527533141 - 2072 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:32:43 - 1071527563288 - 2073 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3482000972 - - - - 2003-12-15T17:32:43 - 1071527563290 - 2074 - org.codehaus.logger - INFO - Processing - run - 407 - start run - - - 2003-12-15T17:32:43 - 1071527563290 - 2075 - org.codehaus.logger - INFO - Processing - run - 407 - end run - - - 2003-12-15T17:32:43 - 1071527563290 - 2076 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:32:43 - 1071527563291 - 2077 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:32:47 - 1071527567708 - 2078 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3486298424 - - - - 2003-12-15T17:32:47 - 1071527567709 - 2079 - org.codehaus.logger - INFO - Processing - run - 408 - start run - - - 2003-12-15T17:32:47 - 1071527567709 - 2080 - org.codehaus.logger - INFO - Processing - run - 408 - end run - - - 2003-12-15T17:32:47 - 1071527567710 - 2081 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:32:47 - 1071527567710 - 2082 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:33:13 - 1071527593419 - 2083 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3512151075 - - - - 2003-12-15T17:33:13 - 1071527593420 - 2084 - org.codehaus.logger - INFO - Processing - run - 409 - start run - - - 2003-12-15T17:33:13 - 1071527593420 - 2085 - org.codehaus.logger - INFO - Processing - run - 409 - end run - - - 2003-12-15T17:33:13 - 1071527593421 - 2086 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:33:13 - 1071527593421 - 2087 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:33:17 - 1071527597718 - 2088 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3516306402 - - - - 2003-12-15T17:33:17 - 1071527597725 - 2089 - org.codehaus.logger - INFO - Processing - run - 410 - start run - - - 2003-12-15T17:33:17 - 1071527597725 - 2090 - org.codehaus.logger - INFO - Processing - run - 410 - end run - - - 2003-12-15T17:33:17 - 1071527597725 - 2091 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:33:17 - 1071527597725 - 2092 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:33:43 - 1071527623598 - 2093 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3542301175 - - - - 2003-12-15T17:33:43 - 1071527623600 - 2094 - org.codehaus.logger - INFO - Processing - run - 411 - start run - - - 2003-12-15T17:33:43 - 1071527623600 - 2095 - org.codehaus.logger - INFO - Processing - run - 411 - end run - - - 2003-12-15T17:33:43 - 1071527623600 - 2096 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:33:43 - 1071527623601 - 2097 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:33:47 - 1071527627709 - 2098 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3546314728 - - - - 2003-12-15T17:33:47 - 1071527627709 - 2099 - org.codehaus.logger - INFO - Processing - run - 412 - start run - - - 2003-12-15T17:33:47 - 1071527627709 - 2100 - org.codehaus.logger - INFO - Processing - run - 412 - end run - - - 2003-12-15T17:33:47 - 1071527627710 - 2101 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:33:47 - 1071527627710 - 2102 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:34:13 - 1071527653769 - 2103 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3572471283 - - - - 2003-12-15T17:34:13 - 1071527653770 - 2104 - org.codehaus.logger - INFO - Processing - run - 413 - start run - - - 2003-12-15T17:34:13 - 1071527653770 - 2105 - org.codehaus.logger - INFO - Processing - run - 413 - end run - - - 2003-12-15T17:34:13 - 1071527653771 - 2106 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:34:13 - 1071527653771 - 2107 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:34:17 - 1071527657729 - 2108 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3576322670 - - - - 2003-12-15T17:34:17 - 1071527657730 - 2109 - org.codehaus.logger - INFO - Processing - run - 414 - start run - - - 2003-12-15T17:34:17 - 1071527657732 - 2110 - org.codehaus.logger - INFO - Processing - run - 414 - end run - - - 2003-12-15T17:34:17 - 1071527657732 - 2111 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:34:17 - 1071527657732 - 2112 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:34:41 - 1071527681679 - 2113 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T17:34:41 - 1071527681679 - 2114 - org.codehaus.logger - INFO - Processing - run - 415 - start run - - - 2003-12-15T17:34:41 - 1071527681680 - 2115 - org.codehaus.logger - INFO - Processing - run - 415 - end run - - - 2003-12-15T17:34:41 - 1071527681680 - 2116 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T17:34:41 - 1071527681680 - 2117 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T17:34:43 - 1071527683899 - 2118 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3602621379 - - - - 2003-12-15T17:34:43 - 1071527683900 - 2119 - org.codehaus.logger - INFO - Processing - run - 416 - start run - - - 2003-12-15T17:34:43 - 1071527683900 - 2120 - org.codehaus.logger - INFO - Processing - run - 416 - end run - - - 2003-12-15T17:34:43 - 1071527683901 - 2121 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:34:43 - 1071527683901 - 2122 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:34:47 - 1071527687849 - 2123 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3606441555 - - - - 2003-12-15T17:34:47 - 1071527687849 - 2124 - org.codehaus.logger - INFO - Processing - run - 417 - start run - - - 2003-12-15T17:34:47 - 1071527687850 - 2125 - org.codehaus.logger - INFO - Processing - run - 417 - end run - - - 2003-12-15T17:34:47 - 1071527687850 - 2126 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:34:47 - 1071527687850 - 2127 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:35:14 - 1071527714119 - 2128 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3632801491 - - - - 2003-12-15T17:35:14 - 1071527714120 - 2129 - org.codehaus.logger - INFO - Processing - run - 418 - start run - - - 2003-12-15T17:35:14 - 1071527714120 - 2130 - org.codehaus.logger - INFO - Processing - run - 418 - end run - - - 2003-12-15T17:35:14 - 1071527714121 - 2131 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:35:14 - 1071527714121 - 2132 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:35:17 - 1071527717869 - 2133 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3636450730 - - - - 2003-12-15T17:35:17 - 1071527717870 - 2134 - org.codehaus.logger - INFO - Processing - run - 419 - start run - - - 2003-12-15T17:35:17 - 1071527717870 - 2135 - org.codehaus.logger - INFO - Processing - run - 419 - end run - - - 2003-12-15T17:35:17 - 1071527717870 - 2136 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:35:17 - 1071527717871 - 2137 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:35:44 - 1071527744249 - 2138 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3662961989 - - - - 2003-12-15T17:35:44 - 1071527744250 - 2139 - org.codehaus.logger - INFO - Processing - run - 420 - start run - - - 2003-12-15T17:35:44 - 1071527744250 - 2140 - org.codehaus.logger - INFO - Processing - run - 420 - end run - - - 2003-12-15T17:35:44 - 1071527744250 - 2141 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:35:44 - 1071527744250 - 2142 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:35:47 - 1071527747839 - 2143 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3666468182 - - - - 2003-12-15T17:35:47 - 1071527747839 - 2144 - org.codehaus.logger - INFO - Processing - run - 421 - start run - - - 2003-12-15T17:35:47 - 1071527747840 - 2145 - org.codehaus.logger - INFO - Processing - run - 421 - end run - - - 2003-12-15T17:35:47 - 1071527747840 - 2146 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:35:47 - 1071527747840 - 2147 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:36:14 - 1071527774439 - 2148 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3693121711 - - - - 2003-12-15T17:36:14 - 1071527774441 - 2149 - org.codehaus.logger - INFO - Processing - run - 422 - start run - - - 2003-12-15T17:36:14 - 1071527774441 - 2150 - org.codehaus.logger - INFO - Processing - run - 422 - end run - - - 2003-12-15T17:36:14 - 1071527774441 - 2151 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:36:14 - 1071527774441 - 2152 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:36:17 - 1071527777879 - 2153 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3696476756 - - - - 2003-12-15T17:36:17 - 1071527777880 - 2154 - org.codehaus.logger - INFO - Processing - run - 423 - start run - - - 2003-12-15T17:36:17 - 1071527777880 - 2155 - org.codehaus.logger - INFO - Processing - run - 423 - end run - - - 2003-12-15T17:36:17 - 1071527777881 - 2156 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:36:17 - 1071527777881 - 2157 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:36:44 - 1071527804589 - 2158 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3723271814 - - - - 2003-12-15T17:36:44 - 1071527804590 - 2159 - org.codehaus.logger - INFO - Processing - run - 424 - start run - - - 2003-12-15T17:36:44 - 1071527804590 - 2160 - org.codehaus.logger - INFO - Processing - run - 424 - end run - - - 2003-12-15T17:36:44 - 1071527804591 - 2161 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:36:44 - 1071527804591 - 2162 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:36:47 - 1071527807899 - 2163 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3726484521 - - - - 2003-12-15T17:36:47 - 1071527807900 - 2164 - org.codehaus.logger - INFO - Processing - run - 425 - start run - - - 2003-12-15T17:36:47 - 1071527807900 - 2165 - org.codehaus.logger - INFO - Processing - run - 425 - end run - - - 2003-12-15T17:36:47 - 1071527807900 - 2166 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:36:47 - 1071527807901 - 2167 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:37:14 - 1071527834729 - 2168 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3753421916 - - - - 2003-12-15T17:37:14 - 1071527834730 - 2169 - org.codehaus.logger - INFO - Processing - run - 426 - start run - - - 2003-12-15T17:37:14 - 1071527834730 - 2170 - org.codehaus.logger - INFO - Processing - run - 426 - end run - - - 2003-12-15T17:37:14 - 1071527834730 - 2171 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:37:14 - 1071527834731 - 2172 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:37:17 - 1071527837869 - 2173 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3756498732 - - - - 2003-12-15T17:37:17 - 1071527837870 - 2174 - org.codehaus.logger - INFO - Processing - run - 427 - start run - - - 2003-12-15T17:37:17 - 1071527837870 - 2175 - org.codehaus.logger - INFO - Processing - run - 427 - end run - - - 2003-12-15T17:37:17 - 1071527837870 - 2176 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:37:17 - 1071527837871 - 2177 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:37:44 - 1071527864879 - 2178 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3783562032 - - - - 2003-12-15T17:37:44 - 1071527864880 - 2179 - org.codehaus.logger - INFO - Processing - run - 428 - start run - - - 2003-12-15T17:37:44 - 1071527864881 - 2180 - org.codehaus.logger - INFO - Processing - run - 428 - end run - - - 2003-12-15T17:37:44 - 1071527864881 - 2181 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:37:44 - 1071527864882 - 2182 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:37:47 - 1071527867889 - 2183 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3786507843 - - - - 2003-12-15T17:37:47 - 1071527867890 - 2184 - org.codehaus.logger - INFO - Processing - run - 429 - start run - - - 2003-12-15T17:37:47 - 1071527867890 - 2185 - org.codehaus.logger - INFO - Processing - run - 429 - end run - - - 2003-12-15T17:37:47 - 1071527867891 - 2186 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:37:47 - 1071527867891 - 2187 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:38:14 - 1071527894970 - 2188 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3813702142 - - - - 2003-12-15T17:38:14 - 1071527894971 - 2189 - org.codehaus.logger - INFO - Processing - run - 430 - start run - - - 2003-12-15T17:38:14 - 1071527894972 - 2190 - org.codehaus.logger - INFO - Processing - run - 430 - end run - - - 2003-12-15T17:38:14 - 1071527894972 - 2191 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:38:14 - 1071527894972 - 2192 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:38:17 - 1071527897919 - 2193 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3816515988 - - - - 2003-12-15T17:38:17 - 1071527897920 - 2194 - org.codehaus.logger - INFO - Processing - run - 431 - start run - - - 2003-12-15T17:38:17 - 1071527897921 - 2195 - org.codehaus.logger - INFO - Processing - run - 431 - end run - - - 2003-12-15T17:38:17 - 1071527897922 - 2196 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:38:17 - 1071527897922 - 2197 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:38:45 - 1071527925160 - 2198 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3843852206 - - - - 2003-12-15T17:38:45 - 1071527925161 - 2199 - org.codehaus.logger - INFO - Processing - run - 432 - start run - - - 2003-12-15T17:38:45 - 1071527925161 - 2200 - org.codehaus.logger - INFO - Processing - run - 432 - end run - - - 2003-12-15T17:38:45 - 1071527925161 - 2201 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:38:45 - 1071527925162 - 2202 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:38:47 - 1071527927919 - 2203 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3846524257 - - - - 2003-12-15T17:38:47 - 1071527927921 - 2204 - org.codehaus.logger - INFO - Processing - run - 433 - start run - - - 2003-12-15T17:38:47 - 1071527927921 - 2205 - org.codehaus.logger - INFO - Processing - run - 433 - end run - - - 2003-12-15T17:38:47 - 1071527927921 - 2206 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:38:47 - 1071527927922 - 2207 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:39:15 - 1071527955280 - 2208 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3874012276 - - - - 2003-12-15T17:39:15 - 1071527955281 - 2209 - org.codehaus.logger - INFO - Processing - run - 434 - start run - - - 2003-12-15T17:39:15 - 1071527955282 - 2210 - org.codehaus.logger - INFO - Processing - run - 434 - end run - - - 2003-12-15T17:39:15 - 1071527955282 - 2211 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:39:15 - 1071527955283 - 2212 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:39:17 - 1071527957920 - 2213 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3876532276 - - - - 2003-12-15T17:39:17 - 1071527957920 - 2214 - org.codehaus.logger - INFO - Processing - run - 435 - start run - - - 2003-12-15T17:39:17 - 1071527957921 - 2215 - org.codehaus.logger - INFO - Processing - run - 435 - end run - - - 2003-12-15T17:39:17 - 1071527957921 - 2216 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:39:17 - 1071527957921 - 2217 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:39:41 - 1071527981760 - 2218 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T17:39:41 - 1071527981760 - 2219 - org.codehaus.logger - INFO - Processing - run - 436 - start run - - - 2003-12-15T17:39:41 - 1071527981761 - 2220 - org.codehaus.logger - INFO - Processing - run - 436 - end run - - - 2003-12-15T17:39:41 - 1071527981761 - 2221 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T17:39:41 - 1071527981761 - 2222 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T17:39:45 - 1071527985480 - 2223 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3904162365 - - - - 2003-12-15T17:39:45 - 1071527985480 - 2224 - org.codehaus.logger - INFO - Processing - run - 437 - start run - - - 2003-12-15T17:39:45 - 1071527985480 - 2225 - org.codehaus.logger - INFO - Processing - run - 437 - end run - - - 2003-12-15T17:39:45 - 1071527985481 - 2226 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:39:45 - 1071527985481 - 2227 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:39:47 - 1071527987920 - 2228 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3906540315 - - - - 2003-12-15T17:39:47 - 1071527987920 - 2229 - org.codehaus.logger - INFO - Processing - run - 438 - start run - - - 2003-12-15T17:39:47 - 1071527987921 - 2230 - org.codehaus.logger - INFO - Processing - run - 438 - end run - - - 2003-12-15T17:39:47 - 1071527987921 - 2231 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:39:47 - 1071527987921 - 2232 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:40:15 - 1071528015630 - 2233 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3934312413 - - - - 2003-12-15T17:40:15 - 1071528015630 - 2234 - org.codehaus.logger - INFO - Processing - run - 439 - start run - - - 2003-12-15T17:40:15 - 1071528015631 - 2235 - org.codehaus.logger - INFO - Processing - run - 439 - end run - - - 2003-12-15T17:40:15 - 1071528015631 - 2236 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:40:15 - 1071528015632 - 2237 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:40:17 - 1071528017910 - 2238 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3936550089 - - - - 2003-12-15T17:40:17 - 1071528017910 - 2239 - org.codehaus.logger - INFO - Processing - run - 440 - start run - - - 2003-12-15T17:40:17 - 1071528017911 - 2240 - org.codehaus.logger - INFO - Processing - run - 440 - end run - - - 2003-12-15T17:40:17 - 1071528017911 - 2241 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:40:17 - 1071528017911 - 2242 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:40:45 - 1071528045770 - 2243 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3964482485 - - - - 2003-12-15T17:40:45 - 1071528045771 - 2244 - org.codehaus.logger - INFO - Processing - run - 441 - start run - - - 2003-12-15T17:40:45 - 1071528045772 - 2245 - org.codehaus.logger - INFO - Processing - run - 441 - end run - - - 2003-12-15T17:40:45 - 1071528045772 - 2246 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:40:45 - 1071528045772 - 2247 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:40:47 - 1071528047920 - 2248 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3966557991 - - - - 2003-12-15T17:40:47 - 1071528047921 - 2249 - org.codehaus.logger - INFO - Processing - run - 442 - start run - - - 2003-12-15T17:40:47 - 1071528047921 - 2250 - org.codehaus.logger - INFO - Processing - run - 442 - end run - - - 2003-12-15T17:40:47 - 1071528047922 - 2251 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:40:47 - 1071528047922 - 2252 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:41:15 - 1071528075950 - 2253 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3994632563 - - - - 2003-12-15T17:41:15 - 1071528075951 - 2254 - org.codehaus.logger - INFO - Processing - run - 443 - start run - - - 2003-12-15T17:41:15 - 1071528075951 - 2255 - org.codehaus.logger - INFO - Processing - run - 443 - end run - - - 2003-12-15T17:41:15 - 1071528075951 - 2256 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:41:15 - 1071528075951 - 2257 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:41:17 - 1071528077950 - 2258 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3996569000 - - - - 2003-12-15T17:41:17 - 1071528077951 - 2259 - org.codehaus.logger - INFO - Processing - run - 444 - start run - - - 2003-12-15T17:41:17 - 1071528077951 - 2260 - org.codehaus.logger - INFO - Processing - run - 444 - end run - - - 2003-12-15T17:41:17 - 1071528077952 - 2261 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:41:17 - 1071528077952 - 2262 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:41:46 - 1071528106050 - 2263 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4024782635 - - - - 2003-12-15T17:41:46 - 1071528106052 - 2264 - org.codehaus.logger - INFO - Processing - run - 445 - start run - - - 2003-12-15T17:41:46 - 1071528106052 - 2265 - org.codehaus.logger - INFO - Processing - run - 445 - end run - - - 2003-12-15T17:41:46 - 1071528106052 - 2266 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:41:46 - 1071528106053 - 2267 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:41:47 - 1071528107980 - 2268 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG4026576996 - - - - 2003-12-15T17:41:47 - 1071528107981 - 2269 - org.codehaus.logger - INFO - Processing - run - 446 - start run - - - 2003-12-15T17:41:47 - 1071528107981 - 2270 - org.codehaus.logger - INFO - Processing - run - 446 - end run - - - 2003-12-15T17:41:47 - 1071528107981 - 2271 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:41:47 - 1071528107981 - 2272 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:42:16 - 1071528136240 - 2273 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4054942736 - - - - 2003-12-15T17:42:16 - 1071528136241 - 2274 - org.codehaus.logger - INFO - Processing - run - 447 - start run - - - 2003-12-15T17:42:16 - 1071528136242 - 2275 - org.codehaus.logger - INFO - Processing - run - 447 - end run - - - 2003-12-15T17:42:16 - 1071528136242 - 2276 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:42:16 - 1071528136242 - 2277 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:42:17 - 1071528137980 - 2278 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG4056585009 - - - - 2003-12-15T17:42:17 - 1071528137981 - 2279 - org.codehaus.logger - INFO - Processing - run - 448 - start run - - - 2003-12-15T17:42:17 - 1071528137981 - 2280 - org.codehaus.logger - INFO - Processing - run - 448 - end run - - - 2003-12-15T17:42:17 - 1071528137981 - 2281 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:42:17 - 1071528137981 - 2282 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:42:46 - 1071528166350 - 2283 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4085082797 - - - - 2003-12-15T17:42:46 - 1071528166352 - 2284 - org.codehaus.logger - INFO - Processing - run - 449 - start run - - - 2003-12-15T17:42:46 - 1071528166352 - 2285 - org.codehaus.logger - INFO - Processing - run - 449 - end run - - - 2003-12-15T17:42:46 - 1071528166353 - 2286 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:42:46 - 1071528166353 - 2287 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:42:48 - 1071528168010 - 2288 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG4086600626 - - - - 2003-12-15T17:42:48 - 1071528168011 - 2289 - org.codehaus.logger - INFO - Processing - run - 450 - start run - - - 2003-12-15T17:42:48 - 1071528168011 - 2290 - org.codehaus.logger - INFO - Processing - run - 450 - end run - - - 2003-12-15T17:42:48 - 1071528168012 - 2291 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:42:48 - 1071528168012 - 2292 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:43:16 - 1071528196550 - 2293 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4115232872 - - - - 2003-12-15T17:43:16 - 1071528196551 - 2294 - org.codehaus.logger - INFO - Processing - run - 451 - start run - - - 2003-12-15T17:43:16 - 1071528196552 - 2295 - org.codehaus.logger - INFO - Processing - run - 451 - end run - - - 2003-12-15T17:43:16 - 1071528196552 - 2296 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:43:16 - 1071528196552 - 2297 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:43:18 - 1071528198020 - 2298 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG4116609386 - - - - 2003-12-15T17:43:18 - 1071528198021 - 2299 - org.codehaus.logger - INFO - Processing - run - 452 - start run - - - 2003-12-15T17:43:18 - 1071528198021 - 2300 - org.codehaus.logger - INFO - Processing - run - 452 - end run - - - 2003-12-15T17:43:18 - 1071528198021 - 2301 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:43:18 - 1071528198022 - 2302 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:43:46 - 1071528226700 - 2303 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4145382997 - - - - 2003-12-15T17:43:46 - 1071528226701 - 2304 - org.codehaus.logger - INFO - Processing - run - 453 - start run - - - 2003-12-15T17:43:46 - 1071528226701 - 2305 - org.codehaus.logger - INFO - Processing - run - 453 - end run - - - 2003-12-15T17:43:46 - 1071528226701 - 2306 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:43:46 - 1071528226703 - 2307 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:43:48 - 1071528228030 - 2308 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG4146617111 - - - - 2003-12-15T17:43:48 - 1071528228031 - 2309 - org.codehaus.logger - INFO - Processing - run - 454 - start run - - - 2003-12-15T17:43:48 - 1071528228031 - 2310 - org.codehaus.logger - INFO - Processing - run - 454 - end run - - - 2003-12-15T17:43:48 - 1071528228031 - 2311 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:43:48 - 1071528228032 - 2312 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:44:16 - 1071528256840 - 2313 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4175523028 - - - - 2003-12-15T17:44:16 - 1071528256841 - 2314 - org.codehaus.logger - INFO - Processing - run - 455 - start run - - - 2003-12-15T17:44:16 - 1071528256841 - 2315 - org.codehaus.logger - INFO - Processing - run - 455 - end run - - - 2003-12-15T17:44:16 - 1071528256842 - 2316 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:44:16 - 1071528256842 - 2317 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:44:18 - 1071528258000 - 2318 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG4176624636 - - - - 2003-12-15T17:44:18 - 1071528258002 - 2319 - org.codehaus.logger - INFO - Processing - run - 456 - start run - - - 2003-12-15T17:44:18 - 1071528258002 - 2320 - org.codehaus.logger - INFO - Processing - run - 456 - end run - - - 2003-12-15T17:44:18 - 1071528258002 - 2321 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:44:18 - 1071528258002 - 2322 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:44:41 - 1071528281900 - 2323 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T17:44:41 - 1071528281901 - 2324 - org.codehaus.logger - INFO - Processing - run - 457 - start run - - - 2003-12-15T17:44:41 - 1071528281901 - 2325 - org.codehaus.logger - INFO - Processing - run - 457 - end run - - - 2003-12-15T17:44:41 - 1071528281902 - 2326 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T17:44:41 - 1071528281902 - 2327 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T17:44:46 - 1071528286950 - 2328 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4205673113 - - - - 2003-12-15T17:44:46 - 1071528286951 - 2329 - org.codehaus.logger - INFO - Processing - run - 458 - start run - - - 2003-12-15T17:44:46 - 1071528286952 - 2330 - org.codehaus.logger - INFO - Processing - run - 458 - end run - - - 2003-12-15T17:44:46 - 1071528286952 - 2331 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:44:46 - 1071528286953 - 2332 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:44:48 - 1071528288020 - 2333 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG4206632259 - - - - 2003-12-15T17:44:48 - 1071528288021 - 2334 - org.codehaus.logger - INFO - Processing - run - 459 - start run - - - 2003-12-15T17:44:48 - 1071528288021 - 2335 - org.codehaus.logger - INFO - Processing - run - 459 - end run - - - 2003-12-15T17:44:48 - 1071528288022 - 2336 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:44:48 - 1071528288022 - 2337 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:45:17 - 1071528317131 - 2338 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4235843197 - - - - 2003-12-15T17:45:17 - 1071528317133 - 2339 - org.codehaus.logger - INFO - Processing - run - 460 - start run - - - 2003-12-15T17:45:17 - 1071528317133 - 2340 - org.codehaus.logger - INFO - Processing - run - 460 - end run - - - 2003-12-15T17:45:17 - 1071528317134 - 2341 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:45:17 - 1071528317134 - 2342 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:45:18 - 1071528318030 - 2343 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG4236639829 - - - - 2003-12-15T17:45:18 - 1071528318032 - 2344 - org.codehaus.logger - INFO - Processing - run - 461 - start run - - - 2003-12-15T17:45:18 - 1071528318034 - 2345 - org.codehaus.logger - INFO - Processing - run - 461 - end run - - - 2003-12-15T17:45:18 - 1071528318034 - 2346 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:45:18 - 1071528318034 - 2347 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:45:47 - 1071528347251 - 2348 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4265983284 - - - - 2003-12-15T17:45:47 - 1071528347256 - 2349 - org.codehaus.logger - INFO - Processing - run - 462 - start run - - - 2003-12-15T17:45:47 - 1071528347257 - 2350 - org.codehaus.logger - INFO - Processing - run - 462 - end run - - - 2003-12-15T17:45:47 - 1071528347257 - 2351 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:45:47 - 1071528347257 - 2352 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:45:48 - 1071528348051 - 2353 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG4266648290 - - - - 2003-12-15T17:45:48 - 1071528348051 - 2354 - org.codehaus.logger - INFO - Processing - run - 463 - start run - - - 2003-12-15T17:45:48 - 1071528348052 - 2355 - org.codehaus.logger - INFO - Processing - run - 463 - end run - - - 2003-12-15T17:45:48 - 1071528348052 - 2356 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:45:48 - 1071528348052 - 2357 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:46:17 - 1071528377451 - 2358 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1166080 - - - - 2003-12-15T17:46:17 - 1071528377452 - 2359 - org.codehaus.logger - INFO - Processing - run - 464 - start run - - - 2003-12-15T17:46:17 - 1071528377453 - 2360 - org.codehaus.logger - INFO - Processing - run - 464 - end run - - - 2003-12-15T17:46:17 - 1071528377453 - 2361 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:46:17 - 1071528377453 - 2362 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:46:18 - 1071528378051 - 2363 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1688542 - - - - 2003-12-15T17:46:18 - 1071528378051 - 2364 - org.codehaus.logger - INFO - Processing - run - 465 - start run - - - 2003-12-15T17:46:18 - 1071528378052 - 2365 - org.codehaus.logger - INFO - Processing - run - 465 - end run - - - 2003-12-15T17:46:18 - 1071528378052 - 2366 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:46:18 - 1071528378052 - 2367 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:46:47 - 1071528407571 - 2368 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG31316142 - - - - 2003-12-15T17:46:47 - 1071528407572 - 2369 - org.codehaus.logger - INFO - Processing - run - 466 - start run - - - 2003-12-15T17:46:47 - 1071528407573 - 2370 - org.codehaus.logger - INFO - Processing - run - 466 - end run - - - 2003-12-15T17:46:47 - 1071528407573 - 2371 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:46:47 - 1071528407573 - 2372 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:46:48 - 1071528408081 - 2373 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG31696097 - - - - 2003-12-15T17:46:48 - 1071528408083 - 2374 - org.codehaus.logger - INFO - Processing - run - 467 - start run - - - 2003-12-15T17:46:48 - 1071528408084 - 2375 - org.codehaus.logger - INFO - Processing - run - 467 - end run - - - 2003-12-15T17:46:48 - 1071528408084 - 2376 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:46:48 - 1071528408084 - 2377 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:47:17 - 1071528437731 - 2378 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG61466247 - - - - 2003-12-15T17:47:17 - 1071528437732 - 2379 - org.codehaus.logger - INFO - Processing - run - 468 - start run - - - 2003-12-15T17:47:17 - 1071528437732 - 2380 - org.codehaus.logger - INFO - Processing - run - 468 - end run - - - 2003-12-15T17:47:17 - 1071528437733 - 2381 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:47:17 - 1071528437733 - 2382 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:47:19 - 1071528439541 - 2383 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG61703774 - - - - 2003-12-15T17:47:19 - 1071528439542 - 2384 - org.codehaus.logger - INFO - Processing - run - 469 - start run - - - 2003-12-15T17:47:19 - 1071528439543 - 2385 - org.codehaus.logger - INFO - Processing - run - 469 - end run - - - 2003-12-15T17:47:19 - 1071528439543 - 2386 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:47:19 - 1071528439543 - 2387 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:47:47 - 1071528467861 - 2388 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG91616343 - - - - 2003-12-15T17:47:47 - 1071528467862 - 2389 - org.codehaus.logger - INFO - Processing - run - 470 - start run - - - 2003-12-15T17:47:47 - 1071528467862 - 2390 - org.codehaus.logger - INFO - Processing - run - 470 - end run - - - 2003-12-15T17:47:47 - 1071528467863 - 2391 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:47:47 - 1071528467863 - 2392 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:47:48 - 1071528468041 - 2393 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG91711954 - - - - 2003-12-15T17:47:48 - 1071528468042 - 2394 - org.codehaus.logger - INFO - Processing - run - 471 - start run - - - 2003-12-15T17:47:48 - 1071528468042 - 2395 - org.codehaus.logger - INFO - Processing - run - 471 - end run - - - 2003-12-15T17:47:48 - 1071528468042 - 2396 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:47:48 - 1071528468042 - 2397 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:48:18 - 1071528498031 - 2398 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG121766429 - - - - 2003-12-15T17:48:18 - 1071528498032 - 2399 - org.codehaus.logger - INFO - Processing - run - 472 - start run - - - 2003-12-15T17:48:18 - 1071528498032 - 2400 - org.codehaus.logger - INFO - Processing - run - 472 - end run - - - 2003-12-15T17:48:18 - 1071528498032 - 2401 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:48:18 - 1071528498032 - 2402 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:48:18 - 1071528498091 - 2403 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG121719952 - - - - 2003-12-15T17:48:18 - 1071528498092 - 2404 - org.codehaus.logger - INFO - Processing - run - 473 - start run - - - 2003-12-15T17:48:18 - 1071528498092 - 2405 - org.codehaus.logger - INFO - Processing - run - 473 - end run - - - 2003-12-15T17:48:18 - 1071528498092 - 2406 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:48:18 - 1071528498092 - 2407 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:48:48 - 1071528528081 - 2408 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG151727715 - - - - 2003-12-15T17:48:48 - 1071528528082 - 2409 - org.codehaus.logger - INFO - Processing - run - 474 - start run - - - 2003-12-15T17:48:48 - 1071528528082 - 2410 - org.codehaus.logger - INFO - Processing - run - 474 - end run - - - 2003-12-15T17:48:48 - 1071528528082 - 2411 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:48:48 - 1071528528082 - 2412 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:48:48 - 1071528528201 - 2413 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG151926521 - - - - 2003-12-15T17:48:48 - 1071528528202 - 2414 - org.codehaus.logger - INFO - Processing - run - 475 - start run - - - 2003-12-15T17:48:48 - 1071528528202 - 2415 - org.codehaus.logger - INFO - Processing - run - 475 - end run - - - 2003-12-15T17:48:48 - 1071528528202 - 2416 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:48:48 - 1071528528202 - 2417 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:49:18 - 1071528558091 - 2418 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG181735303 - - - - 2003-12-15T17:49:18 - 1071528558092 - 2419 - org.codehaus.logger - INFO - Processing - run - 476 - start run - - - 2003-12-15T17:49:18 - 1071528558093 - 2420 - org.codehaus.logger - INFO - Processing - run - 476 - end run - - - 2003-12-15T17:49:18 - 1071528558093 - 2421 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:49:18 - 1071528558094 - 2422 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:49:18 - 1071528558361 - 2423 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG182096613 - - - - 2003-12-15T17:49:18 - 1071528558364 - 2424 - org.codehaus.logger - INFO - Processing - run - 477 - start run - - - 2003-12-15T17:49:18 - 1071528558364 - 2425 - org.codehaus.logger - INFO - Processing - run - 477 - end run - - - 2003-12-15T17:49:18 - 1071528558364 - 2426 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:49:18 - 1071528558364 - 2427 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:49:42 - 1071528582061 - 2428 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T17:49:42 - 1071528582062 - 2429 - org.codehaus.logger - INFO - Processing - run - 478 - start run - - - 2003-12-15T17:49:42 - 1071528582062 - 2430 - org.codehaus.logger - INFO - Processing - run - 478 - end run - - - 2003-12-15T17:49:42 - 1071528582063 - 2431 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T17:49:42 - 1071528582063 - 2432 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T17:49:48 - 1071528588081 - 2433 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG211742829 - - - - 2003-12-15T17:49:48 - 1071528588082 - 2434 - org.codehaus.logger - INFO - Processing - run - 479 - start run - - - 2003-12-15T17:49:48 - 1071528588083 - 2435 - org.codehaus.logger - INFO - Processing - run - 479 - end run - - - 2003-12-15T17:49:48 - 1071528588083 - 2436 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:49:48 - 1071528588083 - 2437 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:49:48 - 1071528588501 - 2438 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG212236709 - - - - 2003-12-15T17:49:48 - 1071528588502 - 2439 - org.codehaus.logger - INFO - Processing - run - 480 - start run - - - 2003-12-15T17:49:48 - 1071528588502 - 2440 - org.codehaus.logger - INFO - Processing - run - 480 - end run - - - 2003-12-15T17:49:48 - 1071528588502 - 2441 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:49:48 - 1071528588503 - 2442 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:50:18 - 1071528618091 - 2443 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG241750515 - - - - 2003-12-15T17:50:18 - 1071528618092 - 2444 - org.codehaus.logger - INFO - Processing - run - 481 - start run - - - 2003-12-15T17:50:18 - 1071528618092 - 2445 - org.codehaus.logger - INFO - Processing - run - 481 - end run - - - 2003-12-15T17:50:18 - 1071528618093 - 2446 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:50:18 - 1071528618093 - 2447 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:50:18 - 1071528618631 - 2448 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG242386806 - - - - 2003-12-15T17:50:18 - 1071528618632 - 2449 - org.codehaus.logger - INFO - Processing - run - 482 - start run - - - 2003-12-15T17:50:18 - 1071528618632 - 2450 - org.codehaus.logger - INFO - Processing - run - 482 - end run - - - 2003-12-15T17:50:18 - 1071528618632 - 2451 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:50:18 - 1071528618633 - 2452 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:50:48 - 1071528648091 - 2453 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG271758642 - - - - 2003-12-15T17:50:48 - 1071528648093 - 2454 - org.codehaus.logger - INFO - Processing - run - 483 - start run - - - 2003-12-15T17:50:48 - 1071528648093 - 2455 - org.codehaus.logger - INFO - Processing - run - 483 - end run - - - 2003-12-15T17:50:48 - 1071528648094 - 2456 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:50:48 - 1071528648094 - 2457 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:50:48 - 1071528648811 - 2458 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG272536905 - - - - 2003-12-15T17:50:48 - 1071528648813 - 2459 - org.codehaus.logger - INFO - Processing - run - 484 - start run - - - 2003-12-15T17:50:48 - 1071528648813 - 2460 - org.codehaus.logger - INFO - Processing - run - 484 - end run - - - 2003-12-15T17:50:48 - 1071528648814 - 2461 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:50:48 - 1071528648814 - 2462 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:51:18 - 1071528678102 - 2463 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG301767011 - - - - 2003-12-15T17:51:18 - 1071528678104 - 2464 - org.codehaus.logger - INFO - Processing - run - 485 - start run - - - 2003-12-15T17:51:18 - 1071528678105 - 2465 - org.codehaus.logger - INFO - Processing - run - 485 - end run - - - 2003-12-15T17:51:18 - 1071528678105 - 2466 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:51:18 - 1071528678105 - 2467 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:51:18 - 1071528678952 - 2468 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG302686998 - - - - 2003-12-15T17:51:18 - 1071528678952 - 2469 - org.codehaus.logger - INFO - Processing - run - 486 - start run - - - 2003-12-15T17:51:18 - 1071528678953 - 2470 - org.codehaus.logger - INFO - Processing - run - 486 - end run - - - 2003-12-15T17:51:18 - 1071528678953 - 2471 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:51:18 - 1071528678953 - 2472 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:51:48 - 1071528708152 - 2473 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG331775036 - - - - 2003-12-15T17:51:48 - 1071528708153 - 2474 - org.codehaus.logger - INFO - Processing - run - 487 - start run - - - 2003-12-15T17:51:48 - 1071528708153 - 2475 - org.codehaus.logger - INFO - Processing - run - 487 - end run - - - 2003-12-15T17:51:48 - 1071528708154 - 2476 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:51:48 - 1071528708154 - 2477 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:51:49 - 1071528709102 - 2478 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG332847125 - - - - 2003-12-15T17:51:49 - 1071528709102 - 2479 - org.codehaus.logger - INFO - Processing - run - 488 - start run - - - 2003-12-15T17:51:49 - 1071528709103 - 2480 - org.codehaus.logger - INFO - Processing - run - 488 - end run - - - 2003-12-15T17:51:49 - 1071528709103 - 2481 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:51:49 - 1071528709103 - 2482 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:52:18 - 1071528738102 - 2483 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG361784910 - - - - 2003-12-15T17:52:18 - 1071528738102 - 2484 - org.codehaus.logger - INFO - Processing - run - 489 - start run - - - 2003-12-15T17:52:18 - 1071528738103 - 2485 - org.codehaus.logger - INFO - Processing - run - 489 - end run - - - 2003-12-15T17:52:18 - 1071528738103 - 2486 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:52:18 - 1071528738103 - 2487 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:52:19 - 1071528739242 - 2488 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG362997196 - - - - 2003-12-15T17:52:19 - 1071528739243 - 2489 - org.codehaus.logger - INFO - Processing - run - 490 - start run - - - 2003-12-15T17:52:19 - 1071528739243 - 2490 - org.codehaus.logger - INFO - Processing - run - 490 - end run - - - 2003-12-15T17:52:19 - 1071528739243 - 2491 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:52:19 - 1071528739243 - 2492 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:52:49 - 1071528769412 - 2493 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG393157298 - - - - 2003-12-15T17:52:49 - 1071528769413 - 2494 - org.codehaus.logger - INFO - Processing - run - 491 - start run - - - 2003-12-15T17:52:49 - 1071528769413 - 2495 - org.codehaus.logger - INFO - Processing - run - 491 - end run - - - 2003-12-15T17:52:49 - 1071528769413 - 2496 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:52:49 - 1071528769413 - 2497 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:52:50 - 1071528770372 - 2498 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG393997899 - - - - 2003-12-15T17:52:50 - 1071528770373 - 2499 - org.codehaus.logger - INFO - Processing - run - 492 - start run - - - 2003-12-15T17:52:50 - 1071528770374 - 2500 - org.codehaus.logger - INFO - Processing - run - 492 - end run - - - 2003-12-15T17:52:50 - 1071528770374 - 2501 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:52:50 - 1071528770374 - 2502 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:53:19 - 1071528799562 - 2503 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG423297400 - - - - 2003-12-15T17:53:19 - 1071528799563 - 2504 - org.codehaus.logger - INFO - Processing - run - 493 - start run - - - 2003-12-15T17:53:19 - 1071528799563 - 2505 - org.codehaus.logger - INFO - Processing - run - 493 - end run - - - 2003-12-15T17:53:19 - 1071528799564 - 2506 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:53:19 - 1071528799564 - 2507 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:53:20 - 1071528800442 - 2508 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG424109731 - - - - 2003-12-15T17:53:20 - 1071528800443 - 2509 - org.codehaus.logger - INFO - Processing - run - 494 - start run - - - 2003-12-15T17:53:20 - 1071528800443 - 2510 - org.codehaus.logger - INFO - Processing - run - 494 - end run - - - 2003-12-15T17:53:20 - 1071528800444 - 2511 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:53:20 - 1071528800444 - 2512 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:53:49 - 1071528829722 - 2513 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG453437552 - - - - 2003-12-15T17:53:49 - 1071528829723 - 2514 - org.codehaus.logger - INFO - Processing - run - 495 - start run - - - 2003-12-15T17:53:49 - 1071528829723 - 2515 - org.codehaus.logger - INFO - Processing - run - 495 - end run - - - 2003-12-15T17:53:49 - 1071528829723 - 2516 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:53:49 - 1071528829723 - 2517 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:53:50 - 1071528830462 - 2518 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG454138577 - - - - 2003-12-15T17:53:50 - 1071528830463 - 2519 - org.codehaus.logger - INFO - Processing - run - 496 - start run - - - 2003-12-15T17:53:50 - 1071528830463 - 2520 - org.codehaus.logger - INFO - Processing - run - 496 - end run - - - 2003-12-15T17:53:50 - 1071528830464 - 2521 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:53:50 - 1071528830464 - 2522 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:54:19 - 1071528859852 - 2523 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG483577620 - - - - 2003-12-15T17:54:19 - 1071528859853 - 2524 - org.codehaus.logger - INFO - Processing - run - 497 - start run - - - 2003-12-15T17:54:19 - 1071528859854 - 2525 - org.codehaus.logger - INFO - Processing - run - 497 - end run - - - 2003-12-15T17:54:19 - 1071528859854 - 2526 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:54:19 - 1071528859854 - 2527 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:54:20 - 1071528860502 - 2528 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG484157686 - - - - 2003-12-15T17:54:20 - 1071528860503 - 2529 - org.codehaus.logger - INFO - Processing - run - 498 - start run - - - 2003-12-15T17:54:20 - 1071528860503 - 2530 - org.codehaus.logger - INFO - Processing - run - 498 - end run - - - 2003-12-15T17:54:20 - 1071528860504 - 2531 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:54:20 - 1071528860504 - 2532 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:54:41 - 1071528881682 - 2533 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T17:54:41 - 1071528881683 - 2534 - org.codehaus.logger - INFO - Processing - run - 499 - start run - - - 2003-12-15T17:54:41 - 1071528881683 - 2535 - org.codehaus.logger - INFO - Processing - run - 499 - end run - - - 2003-12-15T17:54:41 - 1071528881683 - 2536 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T17:54:41 - 1071528881684 - 2537 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T17:54:49 - 1071528889962 - 2538 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG513727717 - - - - 2003-12-15T17:54:49 - 1071528889963 - 2539 - org.codehaus.logger - INFO - Processing - run - 500 - start run - - - 2003-12-15T17:54:49 - 1071528889964 - 2540 - org.codehaus.logger - INFO - Processing - run - 500 - end run - - - 2003-12-15T17:54:49 - 1071528889964 - 2541 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:54:49 - 1071528889965 - 2542 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:54:50 - 1071528890532 - 2543 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG514173449 - - - - 2003-12-15T17:54:50 - 1071528890533 - 2544 - org.codehaus.logger - INFO - Processing - run - 501 - start run - - - 2003-12-15T17:54:50 - 1071528890534 - 2545 - org.codehaus.logger - INFO - Processing - run - 501 - end run - - - 2003-12-15T17:54:50 - 1071528890534 - 2546 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:54:50 - 1071528890534 - 2547 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:55:20 - 1071528920162 - 2548 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG543887821 - - - - 2003-12-15T17:55:20 - 1071528920163 - 2549 - org.codehaus.logger - INFO - Processing - run - 502 - start run - - - 2003-12-15T17:55:20 - 1071528920163 - 2550 - org.codehaus.logger - INFO - Processing - run - 502 - end run - - - 2003-12-15T17:55:20 - 1071528920164 - 2551 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:55:20 - 1071528920164 - 2552 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:55:20 - 1071528920522 - 2553 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG544203869 - - - - 2003-12-15T17:55:20 - 1071528920523 - 2554 - org.codehaus.logger - INFO - Processing - run - 503 - start run - - - 2003-12-15T17:55:20 - 1071528920523 - 2555 - org.codehaus.logger - INFO - Processing - run - 503 - end run - - - 2003-12-15T17:55:20 - 1071528920524 - 2556 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:55:20 - 1071528920524 - 2557 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:55:50 - 1071528950333 - 2558 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG574047884 - - - - 2003-12-15T17:55:50 - 1071528950334 - 2559 - org.codehaus.logger - INFO - Processing - run - 504 - start run - - - 2003-12-15T17:55:50 - 1071528950334 - 2560 - org.codehaus.logger - INFO - Processing - run - 504 - end run - - - 2003-12-15T17:55:50 - 1071528950334 - 2561 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:55:50 - 1071528950335 - 2562 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:55:50 - 1071528950692 - 2563 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG574326856 - - - - 2003-12-15T17:55:50 - 1071528950694 - 2564 - org.codehaus.logger - INFO - Processing - run - 505 - start run - - - 2003-12-15T17:55:50 - 1071528950694 - 2565 - org.codehaus.logger - INFO - Processing - run - 505 - end run - - - 2003-12-15T17:55:50 - 1071528950695 - 2566 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:55:50 - 1071528950695 - 2567 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:56:20 - 1071528980483 - 2568 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG604197955 - - - - 2003-12-15T17:56:20 - 1071528980483 - 2569 - org.codehaus.logger - INFO - Processing - run - 506 - start run - - - 2003-12-15T17:56:20 - 1071528980484 - 2570 - org.codehaus.logger - INFO - Processing - run - 506 - end run - - - 2003-12-15T17:56:20 - 1071528980484 - 2571 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:56:20 - 1071528980484 - 2572 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:56:20 - 1071528980713 - 2573 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG604354620 - - - - 2003-12-15T17:56:20 - 1071528980714 - 2574 - org.codehaus.logger - INFO - Processing - run - 507 - start run - - - 2003-12-15T17:56:20 - 1071528980714 - 2575 - org.codehaus.logger - INFO - Processing - run - 507 - end run - - - 2003-12-15T17:56:20 - 1071528980714 - 2576 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:56:20 - 1071528980714 - 2577 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:56:50 - 1071529010623 - 2578 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG634348006 - - - - 2003-12-15T17:56:50 - 1071529010623 - 2579 - org.codehaus.logger - INFO - Processing - run - 508 - start run - - - 2003-12-15T17:56:50 - 1071529010624 - 2580 - org.codehaus.logger - INFO - Processing - run - 508 - end run - - - 2003-12-15T17:56:50 - 1071529010625 - 2581 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:56:50 - 1071529010625 - 2582 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:56:50 - 1071529010743 - 2583 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG634371345 - - - - 2003-12-15T17:56:50 - 1071529010744 - 2584 - org.codehaus.logger - INFO - Processing - run - 509 - start run - - - 2003-12-15T17:56:50 - 1071529010744 - 2585 - org.codehaus.logger - INFO - Processing - run - 509 - end run - - - 2003-12-15T17:56:50 - 1071529010744 - 2586 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:56:50 - 1071529010745 - 2587 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:57:20 - 1071529040763 - 2588 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG664498117 - - - - 2003-12-15T17:57:20 - 1071529040763 - 2589 - org.codehaus.logger - INFO - Processing - run - 510 - start run - - - 2003-12-15T17:57:20 - 1071529040763 - 2590 - org.codehaus.logger - INFO - Processing - run - 510 - end run - - - 2003-12-15T17:57:20 - 1071529040764 - 2591 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:57:20 - 1071529040764 - 2592 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:57:21 - 1071529041253 - 2593 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG664895781 - - - - 2003-12-15T17:57:21 - 1071529041254 - 2594 - org.codehaus.logger - INFO - Processing - run - 511 - start run - - - 2003-12-15T17:57:21 - 1071529041254 - 2595 - org.codehaus.logger - INFO - Processing - run - 511 - end run - - - 2003-12-15T17:57:21 - 1071529041255 - 2596 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:57:21 - 1071529041255 - 2597 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:57:50 - 1071529070913 - 2598 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG694648219 - - - - 2003-12-15T17:57:50 - 1071529070913 - 2599 - org.codehaus.logger - INFO - Processing - run - 512 - start run - - - 2003-12-15T17:57:50 - 1071529070914 - 2600 - org.codehaus.logger - INFO - Processing - run - 512 - end run - - - 2003-12-15T17:57:50 - 1071529070914 - 2601 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:57:50 - 1071529070914 - 2602 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:57:51 - 1071529071273 - 2603 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG694904201 - - - - 2003-12-15T17:57:51 - 1071529071273 - 2604 - org.codehaus.logger - INFO - Processing - run - 513 - start run - - - 2003-12-15T17:57:51 - 1071529071274 - 2605 - org.codehaus.logger - INFO - Processing - run - 513 - end run - - - 2003-12-15T17:57:51 - 1071529071274 - 2606 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:57:51 - 1071529071274 - 2607 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:58:21 - 1071529101053 - 2608 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG724798206 - - - - 2003-12-15T17:58:21 - 1071529101053 - 2609 - org.codehaus.logger - INFO - Processing - run - 514 - start run - - - 2003-12-15T17:58:21 - 1071529101054 - 2610 - org.codehaus.logger - INFO - Processing - run - 514 - end run - - - 2003-12-15T17:58:21 - 1071529101054 - 2611 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:58:21 - 1071529101054 - 2612 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:58:21 - 1071529101293 - 2613 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG724912516 - - - - 2003-12-15T17:58:21 - 1071529101293 - 2614 - org.codehaus.logger - INFO - Processing - run - 515 - start run - - - 2003-12-15T17:58:21 - 1071529101294 - 2615 - org.codehaus.logger - INFO - Processing - run - 515 - end run - - - 2003-12-15T17:58:21 - 1071529101294 - 2616 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:58:21 - 1071529101294 - 2617 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:58:51 - 1071529131193 - 2618 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG754948321 - - - - 2003-12-15T17:58:51 - 1071529131194 - 2619 - org.codehaus.logger - INFO - Processing - run - 516 - start run - - - 2003-12-15T17:58:51 - 1071529131196 - 2620 - org.codehaus.logger - INFO - Processing - run - 516 - end run - - - 2003-12-15T17:58:51 - 1071529131196 - 2621 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:58:51 - 1071529131196 - 2622 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:58:51 - 1071529131253 - 2623 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG754920289 - - - - 2003-12-15T17:58:51 - 1071529131254 - 2624 - org.codehaus.logger - INFO - Processing - run - 517 - start run - - - 2003-12-15T17:58:51 - 1071529131254 - 2625 - org.codehaus.logger - INFO - Processing - run - 517 - end run - - - 2003-12-15T17:58:51 - 1071529131255 - 2626 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:58:51 - 1071529131255 - 2627 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:59:21 - 1071529161263 - 2628 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG784929236 - - - - 2003-12-15T17:59:21 - 1071529161264 - 2629 - org.codehaus.logger - INFO - Processing - run - 518 - start run - - - 2003-12-15T17:59:21 - 1071529161264 - 2630 - org.codehaus.logger - INFO - Processing - run - 518 - end run - - - 2003-12-15T17:59:21 - 1071529161265 - 2631 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:59:21 - 1071529161265 - 2632 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:59:21 - 1071529161433 - 2633 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG785138927 - - - - 2003-12-15T17:59:21 - 1071529161434 - 2634 - org.codehaus.logger - INFO - Processing - run - 519 - start run - - - 2003-12-15T17:59:21 - 1071529161434 - 2635 - org.codehaus.logger - INFO - Processing - run - 519 - end run - - - 2003-12-15T17:59:21 - 1071529161435 - 2636 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:59:21 - 1071529161435 - 2637 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T17:59:41 - 1071529181693 - 2638 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T17:59:41 - 1071529181694 - 2639 - org.codehaus.logger - INFO - Processing - run - 520 - start run - - - 2003-12-15T17:59:41 - 1071529181694 - 2640 - org.codehaus.logger - INFO - Processing - run - 520 - end run - - - 2003-12-15T17:59:41 - 1071529181694 - 2641 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T17:59:41 - 1071529181694 - 2642 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T17:59:51 - 1071529191513 - 2643 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG815157305 - - - - 2003-12-15T17:59:51 - 1071529191514 - 2644 - org.codehaus.logger - INFO - Processing - run - 521 - start run - - - 2003-12-15T17:59:51 - 1071529191514 - 2645 - org.codehaus.logger - INFO - Processing - run - 521 - end run - - - 2003-12-15T17:59:51 - 1071529191515 - 2646 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T17:59:51 - 1071529191515 - 2647 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T17:59:51 - 1071529191603 - 2648 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG815288448 - - - - 2003-12-15T17:59:51 - 1071529191604 - 2649 - org.codehaus.logger - INFO - Processing - run - 522 - start run - - - 2003-12-15T17:59:51 - 1071529191605 - 2650 - org.codehaus.logger - INFO - Processing - run - 522 - end run - - - 2003-12-15T17:59:51 - 1071529191605 - 2651 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T17:59:51 - 1071529191605 - 2652 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:00:21 - 1071529221503 - 2653 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG845168882 - - - - 2003-12-15T18:00:21 - 1071529221504 - 2654 - org.codehaus.logger - INFO - Processing - run - 523 - start run - - - 2003-12-15T18:00:21 - 1071529221504 - 2655 - org.codehaus.logger - INFO - Processing - run - 523 - end run - - - 2003-12-15T18:00:21 - 1071529221504 - 2656 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:00:21 - 1071529221504 - 2657 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:00:21 - 1071529221683 - 2658 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG845438496 - - - - 2003-12-15T18:00:21 - 1071529221684 - 2659 - org.codehaus.logger - INFO - Processing - run - 524 - start run - - - 2003-12-15T18:00:21 - 1071529221686 - 2660 - org.codehaus.logger - INFO - Processing - run - 524 - end run - - - 2003-12-15T18:00:21 - 1071529221686 - 2661 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:00:21 - 1071529221686 - 2662 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:00:51 - 1071529251533 - 2663 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG875179170 - - - - 2003-12-15T18:00:51 - 1071529251534 - 2664 - org.codehaus.logger - INFO - Processing - run - 525 - start run - - - 2003-12-15T18:00:51 - 1071529251534 - 2665 - org.codehaus.logger - INFO - Processing - run - 525 - end run - - - 2003-12-15T18:00:51 - 1071529251534 - 2666 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:00:51 - 1071529251535 - 2667 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:00:51 - 1071529251833 - 2668 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG875588566 - - - - 2003-12-15T18:00:51 - 1071529251834 - 2669 - org.codehaus.logger - INFO - Processing - run - 526 - start run - - - 2003-12-15T18:00:51 - 1071529251834 - 2670 - org.codehaus.logger - INFO - Processing - run - 526 - end run - - - 2003-12-15T18:00:51 - 1071529251834 - 2671 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:00:51 - 1071529251834 - 2672 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:01:21 - 1071529281523 - 2673 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG905187247 - - - - 2003-12-15T18:01:21 - 1071529281524 - 2674 - org.codehaus.logger - INFO - Processing - run - 527 - start run - - - 2003-12-15T18:01:21 - 1071529281524 - 2675 - org.codehaus.logger - INFO - Processing - run - 527 - end run - - - 2003-12-15T18:01:21 - 1071529281525 - 2676 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:01:21 - 1071529281525 - 2677 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:01:22 - 1071529282023 - 2678 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG905748646 - - - - 2003-12-15T18:01:22 - 1071529282024 - 2679 - org.codehaus.logger - INFO - Processing - run - 528 - start run - - - 2003-12-15T18:01:22 - 1071529282025 - 2680 - org.codehaus.logger - INFO - Processing - run - 528 - end run - - - 2003-12-15T18:01:22 - 1071529282025 - 2681 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:01:22 - 1071529282025 - 2682 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:01:51 - 1071529311513 - 2683 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG935196992 - - - - 2003-12-15T18:01:51 - 1071529311514 - 2684 - org.codehaus.logger - INFO - Processing - run - 529 - start run - - - 2003-12-15T18:01:51 - 1071529311515 - 2685 - org.codehaus.logger - INFO - Processing - run - 529 - end run - - - 2003-12-15T18:01:51 - 1071529311515 - 2686 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:01:51 - 1071529311516 - 2687 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:01:52 - 1071529312143 - 2688 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG935908726 - - - - 2003-12-15T18:01:52 - 1071529312146 - 2689 - org.codehaus.logger - INFO - Processing - run - 530 - start run - - - 2003-12-15T18:01:52 - 1071529312146 - 2690 - org.codehaus.logger - INFO - Processing - run - 530 - end run - - - 2003-12-15T18:01:52 - 1071529312147 - 2691 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:01:52 - 1071529312147 - 2692 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:02:21 - 1071529341533 - 2693 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG965204750 - - - - 2003-12-15T18:02:21 - 1071529341534 - 2694 - org.codehaus.logger - INFO - Processing - run - 531 - start run - - - 2003-12-15T18:02:21 - 1071529341534 - 2695 - org.codehaus.logger - INFO - Processing - run - 531 - end run - - - 2003-12-15T18:02:21 - 1071529341534 - 2696 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:02:21 - 1071529341535 - 2697 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:02:22 - 1071529342313 - 2698 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG966068799 - - - - 2003-12-15T18:02:22 - 1071529342315 - 2699 - org.codehaus.logger - INFO - Processing - run - 532 - start run - - - 2003-12-15T18:02:22 - 1071529342315 - 2700 - org.codehaus.logger - INFO - Processing - run - 532 - end run - - - 2003-12-15T18:02:22 - 1071529342316 - 2701 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:02:22 - 1071529342316 - 2702 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:02:51 - 1071529371574 - 2703 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG995212608 - - - - 2003-12-15T18:02:51 - 1071529371574 - 2704 - org.codehaus.logger - INFO - Processing - run - 533 - start run - - - 2003-12-15T18:02:51 - 1071529371574 - 2705 - org.codehaus.logger - INFO - Processing - run - 533 - end run - - - 2003-12-15T18:02:51 - 1071529371575 - 2706 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:02:51 - 1071529371575 - 2707 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:02:52 - 1071529372473 - 2708 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG996208883 - - - - 2003-12-15T18:02:52 - 1071529372474 - 2709 - org.codehaus.logger - INFO - Processing - run - 534 - start run - - - 2003-12-15T18:02:52 - 1071529372474 - 2710 - org.codehaus.logger - INFO - Processing - run - 534 - end run - - - 2003-12-15T18:02:52 - 1071529372475 - 2711 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:02:52 - 1071529372475 - 2712 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:03:21 - 1071529401534 - 2713 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1025220512 - - - - 2003-12-15T18:03:21 - 1071529401534 - 2714 - org.codehaus.logger - INFO - Processing - run - 535 - start run - - - 2003-12-15T18:03:21 - 1071529401534 - 2715 - org.codehaus.logger - INFO - Processing - run - 535 - end run - - - 2003-12-15T18:03:21 - 1071529401535 - 2716 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:03:21 - 1071529401535 - 2717 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:03:22 - 1071529402614 - 2718 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1026378965 - - - - 2003-12-15T18:03:22 - 1071529402614 - 2719 - org.codehaus.logger - INFO - Processing - run - 536 - start run - - - 2003-12-15T18:03:22 - 1071529402615 - 2720 - org.codehaus.logger - INFO - Processing - run - 536 - end run - - - 2003-12-15T18:03:22 - 1071529402615 - 2721 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:03:22 - 1071529402615 - 2722 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:03:51 - 1071529431594 - 2723 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1055228645 - - - - 2003-12-15T18:03:51 - 1071529431595 - 2724 - org.codehaus.logger - INFO - Processing - run - 537 - start run - - - 2003-12-15T18:03:51 - 1071529431595 - 2725 - org.codehaus.logger - INFO - Processing - run - 537 - end run - - - 2003-12-15T18:03:51 - 1071529431596 - 2726 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:03:51 - 1071529431596 - 2727 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:03:52 - 1071529432784 - 2728 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1056539063 - - - - 2003-12-15T18:03:52 - 1071529432784 - 2729 - org.codehaus.logger - INFO - Processing - run - 538 - start run - - - 2003-12-15T18:03:52 - 1071529432785 - 2730 - org.codehaus.logger - INFO - Processing - run - 538 - end run - - - 2003-12-15T18:03:52 - 1071529432785 - 2731 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:03:52 - 1071529432785 - 2732 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:04:21 - 1071529461554 - 2733 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1085236485 - - - - 2003-12-15T18:04:21 - 1071529461555 - 2734 - org.codehaus.logger - INFO - Processing - run - 539 - start run - - - 2003-12-15T18:04:21 - 1071529461555 - 2735 - org.codehaus.logger - INFO - Processing - run - 539 - end run - - - 2003-12-15T18:04:21 - 1071529461556 - 2736 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:04:21 - 1071529461556 - 2737 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:04:22 - 1071529462944 - 2738 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1086699124 - - - - 2003-12-15T18:04:22 - 1071529462946 - 2739 - org.codehaus.logger - INFO - Processing - run - 540 - start run - - - 2003-12-15T18:04:22 - 1071529462947 - 2740 - org.codehaus.logger - INFO - Processing - run - 540 - end run - - - 2003-12-15T18:04:22 - 1071529462947 - 2741 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:04:22 - 1071529462947 - 2742 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:04:41 - 1071529481954 - 2743 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T18:04:41 - 1071529481955 - 2744 - org.codehaus.logger - INFO - Processing - run - 541 - start run - - - 2003-12-15T18:04:41 - 1071529481955 - 2745 - org.codehaus.logger - INFO - Processing - run - 541 - end run - - - 2003-12-15T18:04:41 - 1071529481955 - 2746 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T18:04:41 - 1071529481955 - 2747 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T18:04:51 - 1071529491574 - 2748 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1115246971 - - - - 2003-12-15T18:04:51 - 1071529491574 - 2749 - org.codehaus.logger - INFO - Processing - run - 542 - start run - - - 2003-12-15T18:04:51 - 1071529491575 - 2750 - org.codehaus.logger - INFO - Processing - run - 542 - end run - - - 2003-12-15T18:04:51 - 1071529491575 - 2751 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:04:51 - 1071529491575 - 2752 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:04:53 - 1071529493094 - 2753 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1116829215 - - - - 2003-12-15T18:04:53 - 1071529493095 - 2754 - org.codehaus.logger - INFO - Processing - run - 543 - start run - - - 2003-12-15T18:04:53 - 1071529493095 - 2755 - org.codehaus.logger - INFO - Processing - run - 543 - end run - - - 2003-12-15T18:04:53 - 1071529493096 - 2756 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:04:53 - 1071529493096 - 2757 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:05:21 - 1071529521584 - 2758 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1145256226 - - - - 2003-12-15T18:05:21 - 1071529521585 - 2759 - org.codehaus.logger - INFO - Processing - run - 544 - start run - - - 2003-12-15T18:05:21 - 1071529521585 - 2760 - org.codehaus.logger - INFO - Processing - run - 544 - end run - - - 2003-12-15T18:05:21 - 1071529521585 - 2761 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:05:21 - 1071529521585 - 2762 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:05:23 - 1071529523224 - 2763 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1146979294 - - - - 2003-12-15T18:05:23 - 1071529523225 - 2764 - org.codehaus.logger - INFO - Processing - run - 545 - start run - - - 2003-12-15T18:05:23 - 1071529523225 - 2765 - org.codehaus.logger - INFO - Processing - run - 545 - end run - - - 2003-12-15T18:05:23 - 1071529523226 - 2766 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:05:23 - 1071529523226 - 2767 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:05:51 - 1071529551574 - 2768 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1175265745 - - - - 2003-12-15T18:05:51 - 1071529551575 - 2769 - org.codehaus.logger - INFO - Processing - run - 546 - start run - - - 2003-12-15T18:05:51 - 1071529551575 - 2770 - org.codehaus.logger - INFO - Processing - run - 546 - end run - - - 2003-12-15T18:05:51 - 1071529551575 - 2771 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:05:51 - 1071529551576 - 2772 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:05:53 - 1071529553374 - 2773 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1177119433 - - - - 2003-12-15T18:05:53 - 1071529553375 - 2774 - org.codehaus.logger - INFO - Processing - run - 547 - start run - - - 2003-12-15T18:05:53 - 1071529553375 - 2775 - org.codehaus.logger - INFO - Processing - run - 547 - end run - - - 2003-12-15T18:05:53 - 1071529553375 - 2776 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:05:53 - 1071529553375 - 2777 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:06:21 - 1071529581644 - 2778 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1205274540 - - - - 2003-12-15T18:06:21 - 1071529581645 - 2779 - org.codehaus.logger - INFO - Processing - run - 548 - start run - - - 2003-12-15T18:06:21 - 1071529581645 - 2780 - org.codehaus.logger - INFO - Processing - run - 548 - end run - - - 2003-12-15T18:06:21 - 1071529581646 - 2781 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:06:21 - 1071529581646 - 2782 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:06:23 - 1071529583504 - 2783 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1207259475 - - - - 2003-12-15T18:06:23 - 1071529583506 - 2784 - org.codehaus.logger - INFO - Processing - run - 549 - start run - - - 2003-12-15T18:06:23 - 1071529583506 - 2785 - org.codehaus.logger - INFO - Processing - run - 549 - end run - - - 2003-12-15T18:06:23 - 1071529583506 - 2786 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:06:23 - 1071529583506 - 2787 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:06:51 - 1071529611654 - 2788 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1235283460 - - - - 2003-12-15T18:06:51 - 1071529611655 - 2789 - org.codehaus.logger - INFO - Processing - run - 550 - start run - - - 2003-12-15T18:06:51 - 1071529611655 - 2790 - org.codehaus.logger - INFO - Processing - run - 550 - end run - - - 2003-12-15T18:06:51 - 1071529611655 - 2791 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:06:51 - 1071529611655 - 2792 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:06:53 - 1071529613644 - 2793 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1237409554 - - - - 2003-12-15T18:06:53 - 1071529613645 - 2794 - org.codehaus.logger - INFO - Processing - run - 551 - start run - - - 2003-12-15T18:06:53 - 1071529613645 - 2796 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:06:53 - 1071529613646 - 2797 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:06:53 - 1071529613645 - 2795 - org.codehaus.logger - INFO - Processing - run - 551 - end run - - - 2003-12-15T18:07:23 - 1071529643134 - 2798 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1265291755 - - - - 2003-12-15T18:07:23 - 1071529643135 - 2799 - org.codehaus.logger - INFO - Processing - run - 552 - start run - - - 2003-12-15T18:07:23 - 1071529643136 - 2800 - org.codehaus.logger - INFO - Processing - run - 552 - end run - - - 2003-12-15T18:07:23 - 1071529643136 - 2801 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:07:23 - 1071529643137 - 2802 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:07:23 - 1071529643794 - 2803 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1267559653 - - - - 2003-12-15T18:07:23 - 1071529643796 - 2804 - org.codehaus.logger - INFO - Processing - run - 553 - start run - - - 2003-12-15T18:07:23 - 1071529643796 - 2805 - org.codehaus.logger - INFO - Processing - run - 553 - end run - - - 2003-12-15T18:07:23 - 1071529643796 - 2806 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:07:23 - 1071529643797 - 2807 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:07:51 - 1071529671614 - 2808 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1295303020 - - - - 2003-12-15T18:07:51 - 1071529671615 - 2809 - org.codehaus.logger - INFO - Processing - run - 554 - start run - - - 2003-12-15T18:07:51 - 1071529671615 - 2810 - org.codehaus.logger - INFO - Processing - run - 554 - end run - - - 2003-12-15T18:07:51 - 1071529671616 - 2811 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:07:51 - 1071529671616 - 2812 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:07:53 - 1071529673954 - 2813 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1297709747 - - - - 2003-12-15T18:07:53 - 1071529673955 - 2814 - org.codehaus.logger - INFO - Processing - run - 555 - start run - - - 2003-12-15T18:07:53 - 1071529673955 - 2815 - org.codehaus.logger - INFO - Processing - run - 555 - end run - - - 2003-12-15T18:07:53 - 1071529673956 - 2816 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:07:53 - 1071529673957 - 2817 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:08:21 - 1071529701654 - 2818 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1325311289 - - - - 2003-12-15T18:08:21 - 1071529701655 - 2819 - org.codehaus.logger - INFO - Processing - run - 556 - start run - - - 2003-12-15T18:08:21 - 1071529701655 - 2820 - org.codehaus.logger - INFO - Processing - run - 556 - end run - - - 2003-12-15T18:08:21 - 1071529701656 - 2821 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:08:21 - 1071529701656 - 2822 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:08:24 - 1071529704114 - 2823 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1327849853 - - - - 2003-12-15T18:08:24 - 1071529704115 - 2824 - org.codehaus.logger - INFO - Processing - run - 557 - start run - - - 2003-12-15T18:08:24 - 1071529704115 - 2825 - org.codehaus.logger - INFO - Processing - run - 557 - end run - - - 2003-12-15T18:08:24 - 1071529704116 - 2826 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:08:24 - 1071529704116 - 2827 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:08:51 - 1071529731645 - 2828 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1355321418 - - - - 2003-12-15T18:08:51 - 1071529731645 - 2829 - org.codehaus.logger - INFO - Processing - run - 558 - start run - - - 2003-12-15T18:08:51 - 1071529731645 - 2830 - org.codehaus.logger - INFO - Processing - run - 558 - end run - - - 2003-12-15T18:08:51 - 1071529731646 - 2831 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:08:51 - 1071529731646 - 2832 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:08:54 - 1071529734295 - 2833 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1358009931 - - - - 2003-12-15T18:08:54 - 1071529734295 - 2834 - org.codehaus.logger - INFO - Processing - run - 559 - start run - - - 2003-12-15T18:08:54 - 1071529734295 - 2835 - org.codehaus.logger - INFO - Processing - run - 559 - end run - - - 2003-12-15T18:08:54 - 1071529734296 - 2836 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:08:54 - 1071529734296 - 2837 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:09:21 - 1071529761705 - 2838 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1385329575 - - - - 2003-12-15T18:09:21 - 1071529761705 - 2839 - org.codehaus.logger - INFO - Processing - run - 560 - start run - - - 2003-12-15T18:09:21 - 1071529761706 - 2840 - org.codehaus.logger - INFO - Processing - run - 560 - end run - - - 2003-12-15T18:09:21 - 1071529761706 - 2841 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:09:21 - 1071529761706 - 2842 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:09:24 - 1071529764445 - 2843 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1388160020 - - - - 2003-12-15T18:09:24 - 1071529764445 - 2844 - org.codehaus.logger - INFO - Processing - run - 561 - start run - - - 2003-12-15T18:09:24 - 1071529764446 - 2845 - org.codehaus.logger - INFO - Processing - run - 561 - end run - - - 2003-12-15T18:09:24 - 1071529764446 - 2846 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:09:24 - 1071529764446 - 2847 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:09:41 - 1071529781585 - 2848 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T18:09:41 - 1071529781585 - 2849 - org.codehaus.logger - INFO - Processing - run - 562 - start run - - - 2003-12-15T18:09:41 - 1071529781586 - 2850 - org.codehaus.logger - INFO - Processing - run - 562 - end run - - - 2003-12-15T18:09:41 - 1071529781586 - 2851 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T18:09:41 - 1071529781586 - 2852 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T18:09:51 - 1071529791685 - 2853 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1415337794 - - - - 2003-12-15T18:09:51 - 1071529791685 - 2854 - org.codehaus.logger - INFO - Processing - run - 563 - start run - - - 2003-12-15T18:09:51 - 1071529791686 - 2855 - org.codehaus.logger - INFO - Processing - run - 563 - end run - - - 2003-12-15T18:09:51 - 1071529791686 - 2856 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:09:51 - 1071529791687 - 2857 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:09:54 - 1071529794605 - 2858 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1418320127 - - - - 2003-12-15T18:09:54 - 1071529794605 - 2859 - org.codehaus.logger - INFO - Processing - run - 564 - start run - - - 2003-12-15T18:09:54 - 1071529794606 - 2860 - org.codehaus.logger - INFO - Processing - run - 564 - end run - - - 2003-12-15T18:09:54 - 1071529794606 - 2861 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:09:54 - 1071529794606 - 2862 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:10:21 - 1071529821685 - 2863 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1445345853 - - - - 2003-12-15T18:10:21 - 1071529821685 - 2864 - org.codehaus.logger - INFO - Processing - run - 565 - start run - - - 2003-12-15T18:10:21 - 1071529821686 - 2865 - org.codehaus.logger - INFO - Processing - run - 565 - end run - - - 2003-12-15T18:10:21 - 1071529821686 - 2866 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:10:21 - 1071529821686 - 2867 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:10:24 - 1071529824745 - 2868 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1448470211 - - - - 2003-12-15T18:10:24 - 1071529824745 - 2869 - org.codehaus.logger - INFO - Processing - run - 566 - start run - - - 2003-12-15T18:10:24 - 1071529824746 - 2870 - org.codehaus.logger - INFO - Processing - run - 566 - end run - - - 2003-12-15T18:10:24 - 1071529824746 - 2871 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:10:24 - 1071529824746 - 2872 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:10:32 - 1071529832965 - 2873 - org.codehaus.logger - INFO - Listening - receive - 26 - <----PRIVMSG #test :so, whats happeing? - - - - 2003-12-15T18:10:32 - 1071529832966 - 2874 - org.codehaus.logger - INFO - Processing - run - 567 - start run - - - 2003-12-15T18:10:32 - 1071529832966 - 2875 - org.codehaus.logger - INFO - Processing - run - 567 - end run - - - 2003-12-15T18:10:32 - 1071529832967 - 2876 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:10:32 - 1071529832967 - 2877 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:trygvis PRIVMSG #test :so, whats happeing? - - - - 2003-12-15T18:10:32 - 1071529832967 - 2878 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:10:32 - 1071529832967 - 2879 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:10:32 - 1071529832967 - 2880 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:trygvis PRIVMSG #test :so, whats happeing? - - - - 2003-12-15T18:10:32 - 1071529832968 - 2881 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:10:32 - 1071529832968 - 2882 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T18:10:32 - 1071529832968 - 2883 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T18:10:51 - 1071529851685 - 2884 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1475354122 - - - - 2003-12-15T18:10:51 - 1071529851686 - 2885 - org.codehaus.logger - INFO - Processing - run - 568 - start run - - - 2003-12-15T18:10:51 - 1071529851686 - 2886 - org.codehaus.logger - INFO - Processing - run - 568 - end run - - - 2003-12-15T18:10:51 - 1071529851686 - 2887 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:10:51 - 1071529851686 - 2888 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:10:54 - 1071529854885 - 2889 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1478610314 - - - - 2003-12-15T18:10:54 - 1071529854886 - 2890 - org.codehaus.logger - INFO - Processing - run - 569 - start run - - - 2003-12-15T18:10:54 - 1071529854888 - 2891 - org.codehaus.logger - INFO - Processing - run - 569 - end run - - - 2003-12-15T18:10:54 - 1071529854888 - 2892 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:10:54 - 1071529854888 - 2893 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:11:21 - 1071529881725 - 2894 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1505421875 - - - - 2003-12-15T18:11:21 - 1071529881726 - 2895 - org.codehaus.logger - INFO - Processing - run - 570 - start run - - - 2003-12-15T18:11:21 - 1071529881726 - 2896 - org.codehaus.logger - INFO - Processing - run - 570 - end run - - - 2003-12-15T18:11:21 - 1071529881726 - 2897 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:11:21 - 1071529881726 - 2898 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:11:25 - 1071529885025 - 2899 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1508760423 - - - - 2003-12-15T18:11:25 - 1071529885026 - 2900 - org.codehaus.logger - INFO - Processing - run - 571 - start run - - - 2003-12-15T18:11:25 - 1071529885026 - 2901 - org.codehaus.logger - INFO - Processing - run - 571 - end run - - - 2003-12-15T18:11:25 - 1071529885026 - 2902 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:11:25 - 1071529885026 - 2903 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:11:51 - 1071529911795 - 2904 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1535430722 - - - - 2003-12-15T18:11:51 - 1071529911796 - 2905 - org.codehaus.logger - INFO - Processing - run - 572 - start run - - - 2003-12-15T18:11:51 - 1071529911796 - 2906 - org.codehaus.logger - INFO - Processing - run - 572 - end run - - - 2003-12-15T18:11:51 - 1071529911796 - 2907 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:11:51 - 1071529911796 - 2908 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:11:55 - 1071529915165 - 2909 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1538910510 - - - - 2003-12-15T18:11:55 - 1071529915166 - 2910 - org.codehaus.logger - INFO - Processing - run - 573 - start run - - - 2003-12-15T18:11:55 - 1071529915166 - 2911 - org.codehaus.logger - INFO - Processing - run - 573 - end run - - - 2003-12-15T18:11:55 - 1071529915167 - 2912 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:11:55 - 1071529915167 - 2913 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:12:21 - 1071529941765 - 2914 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1565440411 - - - - 2003-12-15T18:12:21 - 1071529941766 - 2915 - org.codehaus.logger - INFO - Processing - run - 574 - start run - - - 2003-12-15T18:12:21 - 1071529941767 - 2916 - org.codehaus.logger - INFO - Processing - run - 574 - end run - - - 2003-12-15T18:12:21 - 1071529941767 - 2917 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:12:21 - 1071529941768 - 2918 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:12:25 - 1071529945315 - 2919 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1569050654 - - - - 2003-12-15T18:12:25 - 1071529945316 - 2920 - org.codehaus.logger - INFO - Processing - run - 575 - start run - - - 2003-12-15T18:12:25 - 1071529945317 - 2921 - org.codehaus.logger - INFO - Processing - run - 575 - end run - - - 2003-12-15T18:12:25 - 1071529945317 - 2922 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:12:25 - 1071529945318 - 2923 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:12:51 - 1071529971765 - 2924 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1595448441 - - - - 2003-12-15T18:12:51 - 1071529971766 - 2925 - org.codehaus.logger - INFO - Processing - run - 576 - start run - - - 2003-12-15T18:12:51 - 1071529971766 - 2926 - org.codehaus.logger - INFO - Processing - run - 576 - end run - - - 2003-12-15T18:12:51 - 1071529971767 - 2927 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:12:51 - 1071529971767 - 2928 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:12:55 - 1071529975485 - 2929 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1599230771 - - - - 2003-12-15T18:12:55 - 1071529975487 - 2930 - org.codehaus.logger - INFO - Processing - run - 577 - start run - - - 2003-12-15T18:12:55 - 1071529975488 - 2931 - org.codehaus.logger - INFO - Processing - run - 577 - end run - - - 2003-12-15T18:12:55 - 1071529975489 - 2932 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:12:55 - 1071529975489 - 2933 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:13:21 - 1071530001806 - 2934 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1625457039 - - - - 2003-12-15T18:13:21 - 1071530001807 - 2935 - org.codehaus.logger - INFO - Processing - run - 578 - start run - - - 2003-12-15T18:13:21 - 1071530001807 - 2936 - org.codehaus.logger - INFO - Processing - run - 578 - end run - - - 2003-12-15T18:13:21 - 1071530001807 - 2937 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:13:21 - 1071530001808 - 2938 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:13:25 - 1071530005646 - 2939 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1629380932 - - - - 2003-12-15T18:13:25 - 1071530005646 - 2940 - org.codehaus.logger - INFO - Processing - run - 579 - start run - - - 2003-12-15T18:13:25 - 1071530005646 - 2941 - org.codehaus.logger - INFO - Processing - run - 579 - end run - - - 2003-12-15T18:13:25 - 1071530005647 - 2942 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:13:25 - 1071530005647 - 2943 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:13:51 - 1071530031846 - 2944 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1655522891 - - - - 2003-12-15T18:13:51 - 1071530031846 - 2945 - org.codehaus.logger - INFO - Processing - run - 580 - start run - - - 2003-12-15T18:13:51 - 1071530031847 - 2946 - org.codehaus.logger - INFO - Processing - run - 580 - end run - - - 2003-12-15T18:13:51 - 1071530031847 - 2947 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:13:51 - 1071530031847 - 2948 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:13:55 - 1071530035806 - 2949 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1659531073 - - - - 2003-12-15T18:13:55 - 1071530035807 - 2950 - org.codehaus.logger - INFO - Processing - run - 581 - start run - - - 2003-12-15T18:13:55 - 1071530035808 - 2951 - org.codehaus.logger - INFO - Processing - run - 581 - end run - - - 2003-12-15T18:13:55 - 1071530035808 - 2952 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:13:55 - 1071530035808 - 2953 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:14:21 - 1071530061906 - 2954 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1685547189 - - - - 2003-12-15T18:14:21 - 1071530061907 - 2955 - org.codehaus.logger - INFO - Processing - run - 582 - start run - - - 2003-12-15T18:14:21 - 1071530061907 - 2956 - org.codehaus.logger - INFO - Processing - run - 582 - end run - - - 2003-12-15T18:14:21 - 1071530061908 - 2957 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:14:21 - 1071530061908 - 2958 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:14:25 - 1071530065946 - 2959 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1689691251 - - - - 2003-12-15T18:14:25 - 1071530065947 - 2960 - org.codehaus.logger - INFO - Processing - run - 583 - start run - - - 2003-12-15T18:14:25 - 1071530065947 - 2961 - org.codehaus.logger - INFO - Processing - run - 583 - end run - - - 2003-12-15T18:14:25 - 1071530065947 - 2962 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:14:25 - 1071530065947 - 2963 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:14:42 - 1071530082036 - 2964 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T18:14:42 - 1071530082037 - 2965 - org.codehaus.logger - INFO - Processing - run - 584 - start run - - - 2003-12-15T18:14:42 - 1071530082037 - 2966 - org.codehaus.logger - INFO - Processing - run - 584 - end run - - - 2003-12-15T18:14:42 - 1071530082037 - 2967 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T18:14:42 - 1071530082037 - 2968 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T18:14:51 - 1071530091886 - 2969 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1715555616 - - - - 2003-12-15T18:14:51 - 1071530091888 - 2970 - org.codehaus.logger - INFO - Processing - run - 585 - start run - - - 2003-12-15T18:14:51 - 1071530091888 - 2971 - org.codehaus.logger - INFO - Processing - run - 585 - end run - - - 2003-12-15T18:14:51 - 1071530091888 - 2972 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:14:51 - 1071530091888 - 2973 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:14:56 - 1071530096146 - 2974 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1719861407 - - - - 2003-12-15T18:14:56 - 1071530096147 - 2975 - org.codehaus.logger - INFO - Processing - run - 586 - start run - - - 2003-12-15T18:14:56 - 1071530096147 - 2976 - org.codehaus.logger - INFO - Processing - run - 586 - end run - - - 2003-12-15T18:14:56 - 1071530096147 - 2977 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:14:56 - 1071530096148 - 2978 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:15:21 - 1071530121936 - 2979 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1745565575 - - - - 2003-12-15T18:15:21 - 1071530121937 - 2980 - org.codehaus.logger - INFO - Processing - run - 587 - start run - - - 2003-12-15T18:15:21 - 1071530121938 - 2981 - org.codehaus.logger - INFO - Processing - run - 587 - end run - - - 2003-12-15T18:15:21 - 1071530121938 - 2982 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:15:21 - 1071530121939 - 2983 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:15:26 - 1071530126256 - 2984 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1750021576 - - - - 2003-12-15T18:15:26 - 1071530126258 - 2985 - org.codehaus.logger - INFO - Processing - run - 588 - start run - - - 2003-12-15T18:15:26 - 1071530126258 - 2986 - org.codehaus.logger - INFO - Processing - run - 588 - end run - - - 2003-12-15T18:15:26 - 1071530126258 - 2987 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:15:26 - 1071530126259 - 2988 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:15:51 - 1071530151906 - 2989 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1775579459 - - - - 2003-12-15T18:15:51 - 1071530151907 - 2990 - org.codehaus.logger - INFO - Processing - run - 589 - start run - - - 2003-12-15T18:15:51 - 1071530151907 - 2991 - org.codehaus.logger - INFO - Processing - run - 589 - end run - - - 2003-12-15T18:15:51 - 1071530151908 - 2992 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:15:51 - 1071530151908 - 2993 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:15:56 - 1071530156446 - 2994 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1780171733 - - - - 2003-12-15T18:15:56 - 1071530156447 - 2995 - org.codehaus.logger - INFO - Processing - run - 590 - start run - - - 2003-12-15T18:15:56 - 1071530156448 - 2996 - org.codehaus.logger - INFO - Processing - run - 590 - end run - - - 2003-12-15T18:15:56 - 1071530156448 - 2997 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:15:56 - 1071530156449 - 2998 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:16:21 - 1071530181906 - 2999 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1805587831 - - - - 2003-12-15T18:16:21 - 1071530181907 - 3000 - org.codehaus.logger - INFO - Processing - run - 591 - start run - - - 2003-12-15T18:16:21 - 1071530181907 - 3001 - org.codehaus.logger - INFO - Processing - run - 591 - end run - - - 2003-12-15T18:16:21 - 1071530181908 - 3002 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:16:21 - 1071530181908 - 3003 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:16:26 - 1071530186586 - 3004 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1810321890 - - - - 2003-12-15T18:16:26 - 1071530186588 - 3005 - org.codehaus.logger - INFO - Processing - run - 592 - start run - - - 2003-12-15T18:16:26 - 1071530186588 - 3006 - org.codehaus.logger - INFO - Processing - run - 592 - end run - - - 2003-12-15T18:16:26 - 1071530186589 - 3007 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:16:26 - 1071530186589 - 3008 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:16:51 - 1071530211967 - 3009 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1835596354 - - - - 2003-12-15T18:16:51 - 1071530211968 - 3010 - org.codehaus.logger - INFO - Processing - run - 593 - start run - - - 2003-12-15T18:16:51 - 1071530211969 - 3011 - org.codehaus.logger - INFO - Processing - run - 593 - end run - - - 2003-12-15T18:16:51 - 1071530211969 - 3012 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:16:51 - 1071530211969 - 3013 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:16:56 - 1071530216737 - 3014 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1840472056 - - - - 2003-12-15T18:16:56 - 1071530216737 - 3015 - org.codehaus.logger - INFO - Processing - run - 594 - start run - - - 2003-12-15T18:16:56 - 1071530216738 - 3016 - org.codehaus.logger - INFO - Processing - run - 594 - end run - - - 2003-12-15T18:16:56 - 1071530216738 - 3017 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:16:56 - 1071530216738 - 3018 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:17:21 - 1071530241947 - 3019 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1865606101 - - - - 2003-12-15T18:17:21 - 1071530241947 - 3020 - org.codehaus.logger - INFO - Processing - run - 595 - start run - - - 2003-12-15T18:17:21 - 1071530241948 - 3021 - org.codehaus.logger - INFO - Processing - run - 595 - end run - - - 2003-12-15T18:17:21 - 1071530241948 - 3022 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:17:21 - 1071530241948 - 3023 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:17:26 - 1071530246867 - 3024 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1870622229 - - - - 2003-12-15T18:17:26 - 1071530246868 - 3025 - org.codehaus.logger - INFO - Processing - run - 596 - start run - - - 2003-12-15T18:17:26 - 1071530246868 - 3026 - org.codehaus.logger - INFO - Processing - run - 596 - end run - - - 2003-12-15T18:17:26 - 1071530246868 - 3027 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:17:26 - 1071530246868 - 3028 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:17:51 - 1071530271947 - 3029 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1895614162 - - - - 2003-12-15T18:17:51 - 1071530271948 - 3030 - org.codehaus.logger - INFO - Processing - run - 597 - start run - - - 2003-12-15T18:17:51 - 1071530271948 - 3031 - org.codehaus.logger - INFO - Processing - run - 597 - end run - - - 2003-12-15T18:17:51 - 1071530271949 - 3032 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:17:51 - 1071530271949 - 3033 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:17:57 - 1071530277057 - 3034 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1900772384 - - - - 2003-12-15T18:17:57 - 1071530277058 - 3035 - org.codehaus.logger - INFO - Processing - run - 598 - start run - - - 2003-12-15T18:17:57 - 1071530277058 - 3036 - org.codehaus.logger - INFO - Processing - run - 598 - end run - - - 2003-12-15T18:17:57 - 1071530277059 - 3037 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:17:57 - 1071530277059 - 3038 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:18:21 - 1071530301917 - 3039 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1925622350 - - - - 2003-12-15T18:18:21 - 1071530301918 - 3040 - org.codehaus.logger - INFO - Processing - run - 599 - start run - - - 2003-12-15T18:18:21 - 1071530301918 - 3041 - org.codehaus.logger - INFO - Processing - run - 599 - end run - - - 2003-12-15T18:18:21 - 1071530301918 - 3042 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:18:21 - 1071530301918 - 3043 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:18:27 - 1071530307227 - 3044 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1930932602 - - - - 2003-12-15T18:18:27 - 1071530307228 - 3045 - org.codehaus.logger - INFO - Processing - run - 600 - start run - - - 2003-12-15T18:18:27 - 1071530307228 - 3046 - org.codehaus.logger - INFO - Processing - run - 600 - end run - - - 2003-12-15T18:18:27 - 1071530307228 - 3047 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:18:27 - 1071530307229 - 3048 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:18:51 - 1071530331967 - 3049 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1955630450 - - - - 2003-12-15T18:18:51 - 1071530331968 - 3050 - org.codehaus.logger - INFO - Processing - run - 601 - start run - - - 2003-12-15T18:18:51 - 1071530331969 - 3051 - org.codehaus.logger - INFO - Processing - run - 601 - end run - - - 2003-12-15T18:18:51 - 1071530331969 - 3052 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:18:51 - 1071530331969 - 3053 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:18:57 - 1071530337367 - 3054 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1961112708 - - - - 2003-12-15T18:18:57 - 1071530337368 - 3055 - org.codehaus.logger - INFO - Processing - run - 602 - start run - - - 2003-12-15T18:18:57 - 1071530337368 - 3056 - org.codehaus.logger - INFO - Processing - run - 602 - end run - - - 2003-12-15T18:18:57 - 1071530337369 - 3057 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:18:57 - 1071530337369 - 3058 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:19:22 - 1071530362058 - 3059 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG1985638613 - - - - 2003-12-15T18:19:22 - 1071530362058 - 3060 - org.codehaus.logger - INFO - Processing - run - 603 - start run - - - 2003-12-15T18:19:22 - 1071530362058 - 3061 - org.codehaus.logger - INFO - Processing - run - 603 - end run - - - 2003-12-15T18:19:22 - 1071530362059 - 3062 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:19:22 - 1071530362059 - 3063 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:19:27 - 1071530367537 - 3064 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1991262879 - - - - 2003-12-15T18:19:27 - 1071530367538 - 3065 - org.codehaus.logger - INFO - Processing - run - 604 - start run - - - 2003-12-15T18:19:27 - 1071530367538 - 3066 - org.codehaus.logger - INFO - Processing - run - 604 - end run - - - 2003-12-15T18:19:27 - 1071530367539 - 3067 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:19:27 - 1071530367539 - 3068 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:19:41 - 1071530381688 - 3069 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T18:19:41 - 1071530381688 - 3070 - org.codehaus.logger - INFO - Processing - run - 605 - start run - - - 2003-12-15T18:19:41 - 1071530381688 - 3071 - org.codehaus.logger - INFO - Processing - run - 605 - end run - - - 2003-12-15T18:19:41 - 1071530381689 - 3072 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T18:19:41 - 1071530381689 - 3073 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T18:19:51 - 1071530391958 - 3074 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2015646643 - - - - 2003-12-15T18:19:51 - 1071530391958 - 3075 - org.codehaus.logger - INFO - Processing - run - 606 - start run - - - 2003-12-15T18:19:51 - 1071530391959 - 3076 - org.codehaus.logger - INFO - Processing - run - 606 - end run - - - 2003-12-15T18:19:51 - 1071530391959 - 3077 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:19:51 - 1071530391959 - 3078 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:19:57 - 1071530397658 - 3079 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2021413045 - - - - 2003-12-15T18:19:57 - 1071530397658 - 3080 - org.codehaus.logger - INFO - Processing - run - 607 - start run - - - 2003-12-15T18:19:57 - 1071530397659 - 3081 - org.codehaus.logger - INFO - Processing - run - 607 - end run - - - 2003-12-15T18:19:57 - 1071530397659 - 3082 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:19:57 - 1071530397659 - 3083 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:20:21 - 1071530421958 - 3084 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2045657079 - - - - 2003-12-15T18:20:21 - 1071530421959 - 3085 - org.codehaus.logger - INFO - Processing - run - 608 - start run - - - 2003-12-15T18:20:21 - 1071530421959 - 3086 - org.codehaus.logger - INFO - Processing - run - 608 - end run - - - 2003-12-15T18:20:21 - 1071530421960 - 3087 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:20:21 - 1071530421961 - 3088 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:20:27 - 1071530427838 - 3089 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2051573207 - - - - 2003-12-15T18:20:27 - 1071530427838 - 3090 - org.codehaus.logger - INFO - Processing - run - 609 - start run - - - 2003-12-15T18:20:27 - 1071530427839 - 3091 - org.codehaus.logger - INFO - Processing - run - 609 - end run - - - 2003-12-15T18:20:27 - 1071530427839 - 3092 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:20:27 - 1071530427839 - 3093 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:20:52 - 1071530452018 - 3094 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2075665066 - - - - 2003-12-15T18:20:52 - 1071530452019 - 3095 - org.codehaus.logger - INFO - Processing - run - 610 - start run - - - 2003-12-15T18:20:52 - 1071530452019 - 3096 - org.codehaus.logger - INFO - Processing - run - 610 - end run - - - 2003-12-15T18:20:52 - 1071530452019 - 3097 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:20:52 - 1071530452019 - 3098 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:20:57 - 1071530457958 - 3099 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2081723378 - - - - 2003-12-15T18:20:57 - 1071530457959 - 3100 - org.codehaus.logger - INFO - Processing - run - 611 - start run - - - 2003-12-15T18:20:57 - 1071530457959 - 3101 - org.codehaus.logger - INFO - Processing - run - 611 - end run - - - 2003-12-15T18:20:57 - 1071530457959 - 3102 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:20:57 - 1071530457959 - 3103 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:21:22 - 1071530482028 - 3104 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2105673118 - - - - 2003-12-15T18:21:22 - 1071530482029 - 3105 - org.codehaus.logger - INFO - Processing - run - 612 - start run - - - 2003-12-15T18:21:22 - 1071530482029 - 3106 - org.codehaus.logger - INFO - Processing - run - 612 - end run - - - 2003-12-15T18:21:22 - 1071530482029 - 3107 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:21:22 - 1071530482029 - 3108 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:21:28 - 1071530488138 - 3109 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2111883542 - - - - 2003-12-15T18:21:28 - 1071530488140 - 3110 - org.codehaus.logger - INFO - Processing - run - 613 - start run - - - 2003-12-15T18:21:28 - 1071530488140 - 3111 - org.codehaus.logger - INFO - Processing - run - 613 - end run - - - 2003-12-15T18:21:28 - 1071530488140 - 3112 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:21:28 - 1071530488140 - 3113 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:21:52 - 1071530512038 - 3114 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2135689771 - - - - 2003-12-15T18:21:52 - 1071530512039 - 3115 - org.codehaus.logger - INFO - Processing - run - 614 - start run - - - 2003-12-15T18:21:52 - 1071530512039 - 3116 - org.codehaus.logger - INFO - Processing - run - 614 - end run - - - 2003-12-15T18:21:52 - 1071530512039 - 3117 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:21:52 - 1071530512040 - 3118 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:21:58 - 1071530518268 - 3119 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2142023712 - - - - 2003-12-15T18:21:58 - 1071530518269 - 3120 - org.codehaus.logger - INFO - Processing - run - 615 - start run - - - 2003-12-15T18:21:58 - 1071530518269 - 3121 - org.codehaus.logger - INFO - Processing - run - 615 - end run - - - 2003-12-15T18:21:58 - 1071530518270 - 3122 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:21:58 - 1071530518270 - 3123 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:22:22 - 1071530542038 - 3124 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2165700031 - - - - 2003-12-15T18:22:22 - 1071530542039 - 3125 - org.codehaus.logger - INFO - Processing - run - 616 - start run - - - 2003-12-15T18:22:22 - 1071530542039 - 3126 - org.codehaus.logger - INFO - Processing - run - 616 - end run - - - 2003-12-15T18:22:22 - 1071530542039 - 3127 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:22:22 - 1071530542041 - 3128 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:22:28 - 1071530548468 - 3129 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2172173944 - - - - 2003-12-15T18:22:28 - 1071530548469 - 3130 - org.codehaus.logger - INFO - Processing - run - 617 - start run - - - 2003-12-15T18:22:28 - 1071530548469 - 3131 - org.codehaus.logger - INFO - Processing - run - 617 - end run - - - 2003-12-15T18:22:28 - 1071530548470 - 3132 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:22:28 - 1071530548470 - 3133 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:22:52 - 1071530572009 - 3134 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2195711684 - - - - 2003-12-15T18:22:52 - 1071530572010 - 3135 - org.codehaus.logger - INFO - Processing - run - 618 - start run - - - 2003-12-15T18:22:52 - 1071530572010 - 3136 - org.codehaus.logger - INFO - Processing - run - 618 - end run - - - 2003-12-15T18:22:52 - 1071530572011 - 3137 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:22:52 - 1071530572011 - 3138 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:22:58 - 1071530578609 - 3139 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2202324052 - - - - 2003-12-15T18:22:58 - 1071530578610 - 3140 - org.codehaus.logger - INFO - Processing - run - 619 - start run - - - 2003-12-15T18:22:58 - 1071530578610 - 3141 - org.codehaus.logger - INFO - Processing - run - 619 - end run - - - 2003-12-15T18:22:58 - 1071530578611 - 3142 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:22:58 - 1071530578611 - 3143 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:23:22 - 1071530602079 - 3144 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2225744833 - - - - 2003-12-15T18:23:22 - 1071530602080 - 3145 - org.codehaus.logger - INFO - Processing - run - 620 - start run - - - 2003-12-15T18:23:22 - 1071530602081 - 3146 - org.codehaus.logger - INFO - Processing - run - 620 - end run - - - 2003-12-15T18:23:22 - 1071530602081 - 3147 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:23:22 - 1071530602082 - 3148 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:23:28 - 1071530608739 - 3149 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2232484216 - - - - 2003-12-15T18:23:28 - 1071530608740 - 3150 - org.codehaus.logger - INFO - Processing - run - 621 - start run - - - 2003-12-15T18:23:28 - 1071530608741 - 3151 - org.codehaus.logger - INFO - Processing - run - 621 - end run - - - 2003-12-15T18:23:28 - 1071530608741 - 3152 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:23:28 - 1071530608741 - 3153 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:23:52 - 1071530632059 - 3154 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2255754960 - - - - 2003-12-15T18:23:52 - 1071530632060 - 3155 - org.codehaus.logger - INFO - Processing - run - 622 - start run - - - 2003-12-15T18:23:52 - 1071530632060 - 3156 - org.codehaus.logger - INFO - Processing - run - 622 - end run - - - 2003-12-15T18:23:52 - 1071530632061 - 3157 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:23:52 - 1071530632061 - 3158 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:23:58 - 1071530638909 - 3159 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2262634431 - - - - 2003-12-15T18:23:58 - 1071530638910 - 3160 - org.codehaus.logger - INFO - Processing - run - 623 - start run - - - 2003-12-15T18:23:58 - 1071530638910 - 3161 - org.codehaus.logger - INFO - Processing - run - 623 - end run - - - 2003-12-15T18:23:58 - 1071530638911 - 3162 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:23:58 - 1071530638911 - 3163 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:24:22 - 1071530662059 - 3164 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2285763163 - - - - 2003-12-15T18:24:22 - 1071530662060 - 3165 - org.codehaus.logger - INFO - Processing - run - 624 - start run - - - 2003-12-15T18:24:22 - 1071530662099 - 3166 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:24:22 - 1071530662100 - 3167 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:24:22 - 1071530662100 - 3168 - org.codehaus.logger - INFO - Processing - run - 624 - end run - - - 2003-12-15T18:24:29 - 1071530669029 - 3169 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2292774563 - - - - 2003-12-15T18:24:29 - 1071530669030 - 3170 - org.codehaus.logger - INFO - Processing - run - 625 - start run - - - 2003-12-15T18:24:29 - 1071530669030 - 3171 - org.codehaus.logger - INFO - Processing - run - 625 - end run - - - 2003-12-15T18:24:29 - 1071530669030 - 3172 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:24:29 - 1071530669030 - 3173 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:24:41 - 1071530681889 - 3174 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T18:24:41 - 1071530681890 - 3175 - org.codehaus.logger - INFO - Processing - run - 626 - start run - - - 2003-12-15T18:24:41 - 1071530681890 - 3176 - org.codehaus.logger - INFO - Processing - run - 626 - end run - - - 2003-12-15T18:24:41 - 1071530681891 - 3177 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T18:24:41 - 1071530681891 - 3178 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T18:24:53 - 1071530693679 - 3179 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2315772948 - - - - 2003-12-15T18:24:53 - 1071530693680 - 3180 - org.codehaus.logger - INFO - Processing - run - 627 - start run - - - 2003-12-15T18:24:53 - 1071530693680 - 3181 - org.codehaus.logger - INFO - Processing - run - 627 - end run - - - 2003-12-15T18:24:53 - 1071530693680 - 3182 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:24:53 - 1071530693681 - 3183 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:24:59 - 1071530699199 - 3184 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2322914748 - - - - 2003-12-15T18:24:59 - 1071530699200 - 3185 - org.codehaus.logger - INFO - Processing - run - 628 - start run - - - 2003-12-15T18:24:59 - 1071530699201 - 3186 - org.codehaus.logger - INFO - Processing - run - 628 - end run - - - 2003-12-15T18:24:59 - 1071530699201 - 3187 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:24:59 - 1071530699202 - 3188 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:25:22 - 1071530722079 - 3189 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2345782453 - - - - 2003-12-15T18:25:22 - 1071530722080 - 3190 - org.codehaus.logger - INFO - Processing - run - 629 - start run - - - 2003-12-15T18:25:22 - 1071530722080 - 3191 - org.codehaus.logger - INFO - Processing - run - 629 - end run - - - 2003-12-15T18:25:22 - 1071530722081 - 3192 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:25:22 - 1071530722081 - 3193 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:25:29 - 1071530729340 - 3194 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2353064901 - - - - 2003-12-15T18:25:29 - 1071530729340 - 3195 - org.codehaus.logger - INFO - Processing - run - 630 - start run - - - 2003-12-15T18:25:29 - 1071530729340 - 3196 - org.codehaus.logger - INFO - Processing - run - 630 - end run - - - 2003-12-15T18:25:29 - 1071530729341 - 3197 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:25:29 - 1071530729341 - 3198 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:25:52 - 1071530752070 - 3199 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2375791292 - - - - 2003-12-15T18:25:52 - 1071530752070 - 3200 - org.codehaus.logger - INFO - Processing - run - 631 - start run - - - 2003-12-15T18:25:52 - 1071530752070 - 3201 - org.codehaus.logger - INFO - Processing - run - 631 - end run - - - 2003-12-15T18:25:52 - 1071530752071 - 3202 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:25:52 - 1071530752071 - 3203 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:25:59 - 1071530759440 - 3204 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2383205076 - - - - 2003-12-15T18:25:59 - 1071530759441 - 3205 - org.codehaus.logger - INFO - Processing - run - 632 - start run - - - 2003-12-15T18:25:59 - 1071530759442 - 3206 - org.codehaus.logger - INFO - Processing - run - 632 - end run - - - 2003-12-15T18:25:59 - 1071530759442 - 3207 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:25:59 - 1071530759442 - 3208 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:26:23 - 1071530783670 - 3209 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2405805161 - - - - 2003-12-15T18:26:23 - 1071530783671 - 3210 - org.codehaus.logger - INFO - Processing - run - 633 - start run - - - 2003-12-15T18:26:23 - 1071530783671 - 3211 - org.codehaus.logger - INFO - Processing - run - 633 - end run - - - 2003-12-15T18:26:23 - 1071530783672 - 3212 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:26:23 - 1071530783672 - 3213 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:26:29 - 1071530789630 - 3214 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2413355250 - - - - 2003-12-15T18:26:29 - 1071530789631 - 3215 - org.codehaus.logger - INFO - Processing - run - 634 - start run - - - 2003-12-15T18:26:29 - 1071530789631 - 3216 - org.codehaus.logger - INFO - Processing - run - 634 - end run - - - 2003-12-15T18:26:29 - 1071530789632 - 3217 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:26:29 - 1071530789632 - 3218 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:26:52 - 1071530812140 - 3219 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2435826043 - - - - 2003-12-15T18:26:52 - 1071530812141 - 3220 - org.codehaus.logger - INFO - Processing - run - 635 - start run - - - 2003-12-15T18:26:52 - 1071530812141 - 3221 - org.codehaus.logger - INFO - Processing - run - 635 - end run - - - 2003-12-15T18:26:52 - 1071530812141 - 3222 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:26:52 - 1071530812142 - 3223 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:26:59 - 1071530819740 - 3224 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2443485420 - - - - 2003-12-15T18:26:59 - 1071530819741 - 3225 - org.codehaus.logger - INFO - Processing - run - 636 - start run - - - 2003-12-15T18:26:59 - 1071530819741 - 3226 - org.codehaus.logger - INFO - Processing - run - 636 - end run - - - 2003-12-15T18:26:59 - 1071530819741 - 3227 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:26:59 - 1071530819741 - 3228 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:27:22 - 1071530842190 - 3229 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2465891387 - - - - 2003-12-15T18:27:22 - 1071530842191 - 3230 - org.codehaus.logger - INFO - Processing - run - 637 - start run - - - 2003-12-15T18:27:22 - 1071530842191 - 3231 - org.codehaus.logger - INFO - Processing - run - 637 - end run - - - 2003-12-15T18:27:22 - 1071530842191 - 3232 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:27:22 - 1071530842191 - 3233 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:27:29 - 1071530849900 - 3234 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2473625627 - - - - 2003-12-15T18:27:29 - 1071530849901 - 3235 - org.codehaus.logger - INFO - Processing - run - 638 - start run - - - 2003-12-15T18:27:29 - 1071530849902 - 3236 - org.codehaus.logger - INFO - Processing - run - 638 - end run - - - 2003-12-15T18:27:29 - 1071530849902 - 3237 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:27:29 - 1071530849902 - 3238 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:27:52 - 1071530872250 - 3239 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2495939751 - - - - 2003-12-15T18:27:52 - 1071530872251 - 3240 - org.codehaus.logger - INFO - Processing - run - 639 - start run - - - 2003-12-15T18:27:52 - 1071530872251 - 3241 - org.codehaus.logger - INFO - Processing - run - 639 - end run - - - 2003-12-15T18:27:52 - 1071530872251 - 3242 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:27:52 - 1071530872251 - 3243 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:28:00 - 1071530880010 - 3244 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2503755753 - - - - 2003-12-15T18:28:00 - 1071530880013 - 3245 - org.codehaus.logger - INFO - Processing - run - 640 - start run - - - 2003-12-15T18:28:00 - 1071530880013 - 3246 - org.codehaus.logger - INFO - Processing - run - 640 - end run - - - 2003-12-15T18:28:00 - 1071530880013 - 3247 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:28:00 - 1071530880013 - 3248 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:28:22 - 1071530902331 - 3249 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2525999226 - - - - 2003-12-15T18:28:22 - 1071530902331 - 3250 - org.codehaus.logger - INFO - Processing - run - 641 - start run - - - 2003-12-15T18:28:22 - 1071530902332 - 3251 - org.codehaus.logger - INFO - Processing - run - 641 - end run - - - 2003-12-15T18:28:22 - 1071530902332 - 3252 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:28:22 - 1071530902332 - 3253 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:28:30 - 1071530910201 - 3254 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2533915999 - - - - 2003-12-15T18:28:30 - 1071530910202 - 3255 - org.codehaus.logger - INFO - Processing - run - 642 - start run - - - 2003-12-15T18:28:30 - 1071530910202 - 3256 - org.codehaus.logger - INFO - Processing - run - 642 - end run - - - 2003-12-15T18:28:30 - 1071530910202 - 3257 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:28:30 - 1071530910203 - 3258 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:28:52 - 1071530932341 - 3259 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2556010991 - - - - 2003-12-15T18:28:52 - 1071530932342 - 3260 - org.codehaus.logger - INFO - Processing - run - 643 - start run - - - 2003-12-15T18:28:52 - 1071530932342 - 3261 - org.codehaus.logger - INFO - Processing - run - 643 - end run - - - 2003-12-15T18:28:52 - 1071530932343 - 3262 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:28:52 - 1071530932343 - 3263 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:29:00 - 1071530940341 - 3264 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2564066156 - - - - 2003-12-15T18:29:00 - 1071530940342 - 3265 - org.codehaus.logger - INFO - Processing - run - 644 - start run - - - 2003-12-15T18:29:00 - 1071530940342 - 3266 - org.codehaus.logger - INFO - Processing - run - 644 - end run - - - 2003-12-15T18:29:00 - 1071530940343 - 3267 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:29:00 - 1071530940343 - 3268 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:29:23 - 1071530963681 - 3269 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2586019453 - - - - 2003-12-15T18:29:23 - 1071530963682 - 3270 - org.codehaus.logger - INFO - Processing - run - 645 - start run - - - 2003-12-15T18:29:23 - 1071530963682 - 3271 - org.codehaus.logger - INFO - Processing - run - 645 - end run - - - 2003-12-15T18:29:23 - 1071530963682 - 3272 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:29:23 - 1071530963682 - 3273 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:29:30 - 1071530970491 - 3274 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2594216286 - - - - 2003-12-15T18:29:30 - 1071530970492 - 3275 - org.codehaus.logger - INFO - Processing - run - 646 - start run - - - 2003-12-15T18:29:30 - 1071530970492 - 3276 - org.codehaus.logger - INFO - Processing - run - 646 - end run - - - 2003-12-15T18:29:30 - 1071530970493 - 3277 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:29:30 - 1071530970493 - 3278 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:29:42 - 1071530982011 - 3279 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T18:29:42 - 1071530982012 - 3280 - org.codehaus.logger - INFO - Processing - run - 647 - start run - - - 2003-12-15T18:29:42 - 1071530982012 - 3281 - org.codehaus.logger - INFO - Processing - run - 647 - end run - - - 2003-12-15T18:29:42 - 1071530982012 - 3282 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T18:29:42 - 1071530982012 - 3283 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T18:29:52 - 1071530992501 - 3284 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2616200413 - - - - 2003-12-15T18:29:52 - 1071530992504 - 3285 - org.codehaus.logger - INFO - Processing - run - 648 - start run - - - 2003-12-15T18:29:52 - 1071530992504 - 3286 - org.codehaus.logger - INFO - Processing - run - 648 - end run - - - 2003-12-15T18:29:52 - 1071530992504 - 3287 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:29:52 - 1071530992504 - 3288 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:29:57 - 1071530997431 - 3289 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PRIVMSG #test :just porting over the smtp server - - - - 2003-12-15T18:29:57 - 1071530997432 - 3290 - org.codehaus.logger - INFO - Processing - run - 649 - start run - - - 2003-12-15T18:29:57 - 1071530997433 - 3291 - org.codehaus.logger - INFO - Processing - run - 649 - end run - - - 2003-12-15T18:29:57 - 1071530997433 - 3292 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T18:29:57 - 1071530997433 - 3293 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:jason PRIVMSG #test :just porting over the smtp server - - - - 2003-12-15T18:29:57 - 1071530997434 - 3294 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T18:29:57 - 1071530997434 - 3295 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:29:57 - 1071530997434 - 3296 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:jason PRIVMSG #test :just porting over the smtp server - - - - 2003-12-15T18:29:57 - 1071530997434 - 3297 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:29:57 - 1071530997434 - 3298 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:29:57 - 1071530997434 - 3299 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:30:00 - 1071531000631 - 3300 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2624366323 - - - - 2003-12-15T18:30:00 - 1071531000633 - 3301 - org.codehaus.logger - INFO - Processing - run - 650 - start run - - - 2003-12-15T18:30:00 - 1071531000633 - 3302 - org.codehaus.logger - INFO - Processing - run - 650 - end run - - - 2003-12-15T18:30:00 - 1071531000633 - 3303 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:30:00 - 1071531000633 - 3304 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:30:22 - 1071531022551 - 3305 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2646262901 - - - - 2003-12-15T18:30:22 - 1071531022552 - 3306 - org.codehaus.logger - INFO - Processing - run - 651 - start run - - - 2003-12-15T18:30:22 - 1071531022552 - 3307 - org.codehaus.logger - INFO - Processing - run - 651 - end run - - - 2003-12-15T18:30:22 - 1071531022553 - 3308 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:30:22 - 1071531022553 - 3309 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:30:30 - 1071531030781 - 3310 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2654516519 - - - - 2003-12-15T18:30:30 - 1071531030782 - 3311 - org.codehaus.logger - INFO - Processing - run - 652 - start run - - - 2003-12-15T18:30:30 - 1071531030782 - 3312 - org.codehaus.logger - INFO - Processing - run - 652 - end run - - - 2003-12-15T18:30:30 - 1071531030783 - 3313 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:30:30 - 1071531030783 - 3314 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:30:54 - 1071531054711 - 3315 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2676444671 - - - - 2003-12-15T18:30:54 - 1071531054712 - 3316 - org.codehaus.logger - INFO - Processing - run - 653 - start run - - - 2003-12-15T18:30:54 - 1071531054712 - 3317 - org.codehaus.logger - INFO - Processing - run - 653 - end run - - - 2003-12-15T18:30:54 - 1071531054712 - 3318 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:30:54 - 1071531054712 - 3319 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:31:00 - 1071531060891 - 3320 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2684656427 - - - - 2003-12-15T18:31:00 - 1071531060892 - 3321 - org.codehaus.logger - INFO - Processing - run - 654 - start run - - - 2003-12-15T18:31:00 - 1071531060892 - 3322 - org.codehaus.logger - INFO - Processing - run - 654 - end run - - - 2003-12-15T18:31:00 - 1071531060893 - 3323 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:31:00 - 1071531060893 - 3324 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:31:22 - 1071531082851 - 3325 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2706523549 - - - - 2003-12-15T18:31:22 - 1071531082852 - 3326 - org.codehaus.logger - INFO - Processing - run - 655 - start run - - - 2003-12-15T18:31:22 - 1071531082852 - 3327 - org.codehaus.logger - INFO - Processing - run - 655 - end run - - - 2003-12-15T18:31:22 - 1071531082852 - 3328 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:31:22 - 1071531082852 - 3329 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:31:31 - 1071531091071 - 3330 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2714807012 - - - - 2003-12-15T18:31:31 - 1071531091072 - 3331 - org.codehaus.logger - INFO - Processing - run - 656 - start run - - - 2003-12-15T18:31:31 - 1071531091072 - 3332 - org.codehaus.logger - INFO - Processing - run - 656 - end run - - - 2003-12-15T18:31:31 - 1071531091073 - 3333 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:31:31 - 1071531091073 - 3334 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:31:57 - 1071531117201 - 3335 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2736580153 - - - - 2003-12-15T18:31:57 - 1071531117202 - 3336 - org.codehaus.logger - INFO - Processing - run - 657 - start run - - - 2003-12-15T18:31:57 - 1071531117202 - 3337 - org.codehaus.logger - INFO - Processing - run - 657 - end run - - - 2003-12-15T18:31:57 - 1071531117202 - 3338 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:31:57 - 1071531117203 - 3339 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:32:01 - 1071531121221 - 3340 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2744986509 - - - - 2003-12-15T18:32:01 - 1071531121222 - 3341 - org.codehaus.logger - INFO - Processing - run - 658 - start run - - - 2003-12-15T18:32:01 - 1071531121222 - 3342 - org.codehaus.logger - INFO - Processing - run - 658 - end run - - - 2003-12-15T18:32:01 - 1071531121222 - 3343 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:32:01 - 1071531121223 - 3344 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:32:22 - 1071531142911 - 3345 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2766595538 - - - - 2003-12-15T18:32:22 - 1071531142912 - 3346 - org.codehaus.logger - INFO - Processing - run - 659 - start run - - - 2003-12-15T18:32:22 - 1071531142912 - 3347 - org.codehaus.logger - INFO - Processing - run - 659 - end run - - - 2003-12-15T18:32:22 - 1071531142912 - 3348 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:32:22 - 1071531142912 - 3349 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:32:31 - 1071531151421 - 3350 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2775136821 - - - - 2003-12-15T18:32:31 - 1071531151422 - 3351 - org.codehaus.logger - INFO - Processing - run - 660 - start run - - - 2003-12-15T18:32:31 - 1071531151422 - 3352 - org.codehaus.logger - INFO - Processing - run - 660 - end run - - - 2003-12-15T18:32:31 - 1071531151422 - 3353 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:32:31 - 1071531151422 - 3354 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:32:31 - 1071531151481 - 3355 - org.codehaus.logger - INFO - Listening - receive - 26 - <----PRIVMSG #test :porting to? - - - - 2003-12-15T18:32:31 - 1071531151482 - 3356 - org.codehaus.logger - INFO - Processing - run - 661 - start run - - - 2003-12-15T18:32:31 - 1071531151484 - 3357 - org.codehaus.logger - INFO - Processing - run - 661 - end run - - - 2003-12-15T18:32:31 - 1071531151484 - 3358 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:32:31 - 1071531151485 - 3359 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:trygvis PRIVMSG #test :porting to? - - - - 2003-12-15T18:32:31 - 1071531151485 - 3360 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:32:31 - 1071531151485 - 3361 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:32:31 - 1071531151485 - 3362 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:trygvis PRIVMSG #test :porting to? - - - - 2003-12-15T18:32:31 - 1071531151485 - 3363 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:32:31 - 1071531151485 - 3364 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T18:32:31 - 1071531151485 - 3365 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T18:32:53 - 1071531173211 - 3366 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2796904157 - - - - 2003-12-15T18:32:53 - 1071531173212 - 3367 - org.codehaus.logger - INFO - Processing - run - 662 - start run - - - 2003-12-15T18:32:53 - 1071531173212 - 3368 - org.codehaus.logger - INFO - Processing - run - 662 - end run - - - 2003-12-15T18:32:53 - 1071531173212 - 3369 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:32:53 - 1071531173212 - 3370 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:33:01 - 1071531181551 - 3371 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2805276667 - - - - 2003-12-15T18:33:01 - 1071531181552 - 3372 - org.codehaus.logger - INFO - Processing - run - 663 - start run - - - 2003-12-15T18:33:01 - 1071531181552 - 3373 - org.codehaus.logger - INFO - Processing - run - 663 - end run - - - 2003-12-15T18:33:01 - 1071531181552 - 3374 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:33:01 - 1071531181552 - 3375 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:33:31 - 1071531211681 - 3376 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2835416665 - - - - 2003-12-15T18:33:31 - 1071531211682 - 3377 - org.codehaus.logger - INFO - Processing - run - 664 - start run - - - 2003-12-15T18:33:31 - 1071531211682 - 3378 - org.codehaus.logger - INFO - Processing - run - 664 - end run - - - 2003-12-15T18:33:31 - 1071531211683 - 3379 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:33:31 - 1071531211683 - 3380 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:33:33 - 1071531213721 - 3381 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2826930004 - - - - 2003-12-15T18:33:33 - 1071531213723 - 3382 - org.codehaus.logger - INFO - Processing - run - 665 - start run - - - 2003-12-15T18:33:33 - 1071531213723 - 3383 - org.codehaus.logger - INFO - Processing - run - 665 - end run - - - 2003-12-15T18:33:33 - 1071531213723 - 3384 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:33:33 - 1071531213723 - 3385 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:33:53 - 1071531233241 - 3386 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2856942420 - - - - 2003-12-15T18:33:53 - 1071531233242 - 3387 - org.codehaus.logger - INFO - Processing - run - 666 - start run - - - 2003-12-15T18:33:53 - 1071531233242 - 3388 - org.codehaus.logger - INFO - Processing - run - 666 - end run - - - 2003-12-15T18:33:53 - 1071531233242 - 3389 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:33:53 - 1071531233242 - 3390 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:34:01 - 1071531241851 - 3391 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2865566795 - - - - 2003-12-15T18:34:01 - 1071531241852 - 3392 - org.codehaus.logger - INFO - Processing - run - 667 - start run - - - 2003-12-15T18:34:01 - 1071531241852 - 3393 - org.codehaus.logger - INFO - Processing - run - 667 - end run - - - 2003-12-15T18:34:01 - 1071531241854 - 3394 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:34:01 - 1071531241854 - 3395 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:34:24 - 1071531264721 - 3396 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2886952572 - - - - 2003-12-15T18:34:24 - 1071531264722 - 3397 - org.codehaus.logger - INFO - Processing - run - 668 - start run - - - 2003-12-15T18:34:24 - 1071531264722 - 3398 - org.codehaus.logger - INFO - Processing - run - 668 - end run - - - 2003-12-15T18:34:24 - 1071531264723 - 3399 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:34:24 - 1071531264723 - 3400 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:34:31 - 1071531271991 - 3401 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2895716776 - - - - 2003-12-15T18:34:31 - 1071531271992 - 3402 - org.codehaus.logger - INFO - Processing - run - 669 - start run - - - 2003-12-15T18:34:31 - 1071531271992 - 3403 - org.codehaus.logger - INFO - Processing - run - 669 - end run - - - 2003-12-15T18:34:31 - 1071531271992 - 3404 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:34:31 - 1071531271993 - 3405 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:34:41 - 1071531281711 - 3406 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T18:34:41 - 1071531281712 - 3407 - org.codehaus.logger - INFO - Processing - run - 670 - start run - - - 2003-12-15T18:34:41 - 1071531281712 - 3408 - org.codehaus.logger - INFO - Processing - run - 670 - end run - - - 2003-12-15T18:34:41 - 1071531281713 - 3409 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T18:34:41 - 1071531281713 - 3410 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T18:34:53 - 1071531293351 - 3411 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2917039782 - - - - 2003-12-15T18:34:53 - 1071531293352 - 3412 - org.codehaus.logger - INFO - Processing - run - 671 - start run - - - 2003-12-15T18:34:53 - 1071531293352 - 3413 - org.codehaus.logger - INFO - Processing - run - 671 - end run - - - 2003-12-15T18:34:53 - 1071531293353 - 3414 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:34:53 - 1071531293353 - 3415 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:35:02 - 1071531302132 - 3416 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2925877515 - - - - 2003-12-15T18:35:02 - 1071531302133 - 3417 - org.codehaus.logger - INFO - Processing - run - 672 - start run - - - 2003-12-15T18:35:02 - 1071531302134 - 3418 - org.codehaus.logger - INFO - Processing - run - 672 - end run - - - 2003-12-15T18:35:02 - 1071531302134 - 3419 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:35:02 - 1071531302134 - 3420 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:35:23 - 1071531323322 - 3421 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2947054620 - - - - 2003-12-15T18:35:23 - 1071531323322 - 3422 - org.codehaus.logger - INFO - Processing - run - 673 - start run - - - 2003-12-15T18:35:23 - 1071531323322 - 3423 - org.codehaus.logger - INFO - Processing - run - 673 - end run - - - 2003-12-15T18:35:23 - 1071531323323 - 3424 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:35:23 - 1071531323323 - 3425 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:35:32 - 1071531332301 - 3426 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2956036893 - - - - 2003-12-15T18:35:32 - 1071531332302 - 3427 - org.codehaus.logger - INFO - Processing - run - 674 - start run - - - 2003-12-15T18:35:32 - 1071531332302 - 3428 - org.codehaus.logger - INFO - Processing - run - 674 - end run - - - 2003-12-15T18:35:32 - 1071531332303 - 3429 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:35:32 - 1071531332303 - 3430 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:35:56 - 1071531356752 - 3431 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG2977067459 - - - - 2003-12-15T18:35:56 - 1071531356753 - 3432 - org.codehaus.logger - INFO - Processing - run - 675 - start run - - - 2003-12-15T18:35:56 - 1071531356759 - 3433 - org.codehaus.logger - INFO - Processing - run - 675 - end run - - - 2003-12-15T18:35:56 - 1071531356781 - 3434 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:35:56 - 1071531356782 - 3435 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:36:02 - 1071531362432 - 3436 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2986169879 - - - - 2003-12-15T18:36:02 - 1071531362433 - 3437 - org.codehaus.logger - INFO - Processing - run - 676 - start run - - - 2003-12-15T18:36:02 - 1071531362433 - 3438 - org.codehaus.logger - INFO - Processing - run - 676 - end run - - - 2003-12-15T18:36:02 - 1071531362434 - 3439 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:36:02 - 1071531362434 - 3440 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:36:25 - 1071531385202 - 3441 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3007075733 - - - - 2003-12-15T18:36:25 - 1071531385202 - 3442 - org.codehaus.logger - INFO - Processing - run - 677 - start run - - - 2003-12-15T18:36:25 - 1071531385202 - 3443 - org.codehaus.logger - INFO - Processing - run - 677 - end run - - - 2003-12-15T18:36:25 - 1071531385203 - 3444 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:36:25 - 1071531385203 - 3445 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:36:28 - 1071531388822 - 3446 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PRIVMSG #test :synapse the little server framework i made based on the reactor/connector-acceptor - - - - 2003-12-15T18:36:28 - 1071531388823 - 3447 - org.codehaus.logger - INFO - Processing - run - 678 - start run - - - 2003-12-15T18:36:28 - 1071531388824 - 3448 - org.codehaus.logger - INFO - Processing - run - 678 - end run - - - 2003-12-15T18:36:28 - 1071531388824 - 3449 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T18:36:28 - 1071531388824 - 3450 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:jason PRIVMSG #test :synapse the little server framework i made based on the reactor/connector-acceptor - - - - 2003-12-15T18:36:28 - 1071531388825 - 3451 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T18:36:28 - 1071531388825 - 3452 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:36:28 - 1071531388825 - 3453 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:jason PRIVMSG #test :synapse the little server framework i made based on the reactor/connector-acceptor - - - - 2003-12-15T18:36:28 - 1071531388825 - 3454 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:36:28 - 1071531388825 - 3455 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:36:28 - 1071531388825 - 3456 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:36:32 - 1071531392582 - 3457 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3016307016 - - - - 2003-12-15T18:36:32 - 1071531392583 - 3458 - org.codehaus.logger - INFO - Processing - run - 679 - start run - - - 2003-12-15T18:36:32 - 1071531392584 - 3459 - org.codehaus.logger - INFO - Processing - run - 679 - end run - - - 2003-12-15T18:36:32 - 1071531392584 - 3460 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:36:32 - 1071531392584 - 3461 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:37:02 - 1071531422752 - 3462 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3046467074 - - - - 2003-12-15T18:37:02 - 1071531422752 - 3463 - org.codehaus.logger - INFO - Processing - run - 680 - start run - - - 2003-12-15T18:37:02 - 1071531422753 - 3464 - org.codehaus.logger - INFO - Processing - run - 680 - end run - - - 2003-12-15T18:37:02 - 1071531422753 - 3465 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:37:02 - 1071531422753 - 3466 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:37:04 - 1071531424272 - 3467 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3037085243 - - - - 2003-12-15T18:37:04 - 1071531424272 - 3468 - org.codehaus.logger - INFO - Processing - run - 681 - start run - - - 2003-12-15T18:37:04 - 1071531424274 - 3469 - org.codehaus.logger - INFO - Processing - run - 681 - end run - - - 2003-12-15T18:37:04 - 1071531424274 - 3470 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:37:04 - 1071531424274 - 3471 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:37:17 - 1071531437712 - 3472 - org.codehaus.logger - INFO - Listening - receive - 26 - <----PRIVMSG #test :ah - - - - 2003-12-15T18:37:17 - 1071531437712 - 3473 - org.codehaus.logger - INFO - Processing - run - 682 - start run - - - 2003-12-15T18:37:17 - 1071531437713 - 3474 - org.codehaus.logger - INFO - Processing - run - 682 - end run - - - 2003-12-15T18:37:17 - 1071531437713 - 3475 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:37:17 - 1071531437713 - 3476 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:trygvis PRIVMSG #test :ah - - - - 2003-12-15T18:37:17 - 1071531437714 - 3477 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:37:17 - 1071531437714 - 3478 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:37:17 - 1071531437714 - 3479 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:trygvis PRIVMSG #test :ah - - - - 2003-12-15T18:37:17 - 1071531437714 - 3480 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:37:17 - 1071531437714 - 3481 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T18:37:17 - 1071531437714 - 3482 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T18:37:23 - 1071531443412 - 3483 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3067098183 - - - - 2003-12-15T18:37:23 - 1071531443412 - 3484 - org.codehaus.logger - INFO - Processing - run - 683 - start run - - - 2003-12-15T18:37:23 - 1071531443413 - 3485 - org.codehaus.logger - INFO - Processing - run - 683 - end run - - - 2003-12-15T18:37:23 - 1071531443413 - 3486 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:37:23 - 1071531443413 - 3487 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:37:32 - 1071531452872 - 3488 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3076597991 - - - - 2003-12-15T18:37:32 - 1071531452872 - 3489 - org.codehaus.logger - INFO - Processing - run - 684 - start run - - - 2003-12-15T18:37:32 - 1071531452873 - 3490 - org.codehaus.logger - INFO - Processing - run - 684 - end run - - - 2003-12-15T18:37:32 - 1071531452873 - 3491 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:37:32 - 1071531452873 - 3492 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:37:53 - 1071531473582 - 3493 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3097271060 - - - - 2003-12-15T18:37:53 - 1071531473582 - 3494 - org.codehaus.logger - INFO - Processing - run - 685 - start run - - - 2003-12-15T18:37:53 - 1071531473583 - 3495 - org.codehaus.logger - INFO - Processing - run - 685 - end run - - - 2003-12-15T18:37:53 - 1071531473583 - 3496 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:37:53 - 1071531473583 - 3497 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:38:03 - 1071531483013 - 3498 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3106757236 - - - - 2003-12-15T18:38:03 - 1071531483013 - 3499 - org.codehaus.logger - INFO - Processing - run - 686 - start run - - - 2003-12-15T18:38:03 - 1071531483014 - 3500 - org.codehaus.logger - INFO - Processing - run - 686 - end run - - - 2003-12-15T18:38:03 - 1071531483014 - 3501 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:38:03 - 1071531483014 - 3502 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:38:23 - 1071531503572 - 3503 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3127282526 - - - - 2003-12-15T18:38:23 - 1071531503572 - 3504 - org.codehaus.logger - INFO - Processing - run - 687 - start run - - - 2003-12-15T18:38:23 - 1071531503574 - 3505 - org.codehaus.logger - INFO - Processing - run - 687 - end run - - - 2003-12-15T18:38:23 - 1071531503574 - 3506 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:38:23 - 1071531503574 - 3507 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:38:33 - 1071531513192 - 3508 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3136900265 - - - - 2003-12-15T18:38:33 - 1071531513192 - 3509 - org.codehaus.logger - INFO - Processing - run - 688 - start run - - - 2003-12-15T18:38:33 - 1071531513193 - 3510 - org.codehaus.logger - INFO - Processing - run - 688 - end run - - - 2003-12-15T18:38:33 - 1071531513193 - 3511 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:38:33 - 1071531513193 - 3512 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:38:53 - 1071531533782 - 3513 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3157498703 - - - - 2003-12-15T18:38:53 - 1071531533783 - 3514 - org.codehaus.logger - INFO - Processing - run - 689 - start run - - - 2003-12-15T18:38:53 - 1071531533783 - 3515 - org.codehaus.logger - INFO - Processing - run - 689 - end run - - - 2003-12-15T18:38:53 - 1071531533783 - 3516 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:38:53 - 1071531533783 - 3517 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:39:03 - 1071531543333 - 3518 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3167067331 - - - - 2003-12-15T18:39:03 - 1071531543334 - 3519 - org.codehaus.logger - INFO - Processing - run - 690 - start run - - - 2003-12-15T18:39:03 - 1071531543334 - 3520 - org.codehaus.logger - INFO - Processing - run - 690 - end run - - - 2003-12-15T18:39:03 - 1071531543335 - 3521 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:39:03 - 1071531543335 - 3522 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:39:19 - 1071531559502 - 3523 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PRIVMSG #test :i'll check it in shortly - - - - 2003-12-15T18:39:19 - 1071531559503 - 3524 - org.codehaus.logger - INFO - Processing - run - 691 - start run - - - 2003-12-15T18:39:19 - 1071531559504 - 3525 - org.codehaus.logger - INFO - Processing - run - 691 - end run - - - 2003-12-15T18:39:19 - 1071531559504 - 3526 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T18:39:19 - 1071531559504 - 3527 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:jason PRIVMSG #test :i'll check it in shortly - - - - 2003-12-15T18:39:19 - 1071531559504 - 3528 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T18:39:19 - 1071531559504 - 3529 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:39:19 - 1071531559505 - 3530 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:jason PRIVMSG #test :i'll check it in shortly - - - - 2003-12-15T18:39:19 - 1071531559505 - 3531 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:39:19 - 1071531559505 - 3532 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:39:19 - 1071531559505 - 3533 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:39:23 - 1071531563792 - 3534 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3187515460 - - - - 2003-12-15T18:39:23 - 1071531563793 - 3535 - org.codehaus.logger - INFO - Processing - run - 692 - start run - - - 2003-12-15T18:39:23 - 1071531563793 - 3536 - org.codehaus.logger - INFO - Processing - run - 692 - end run - - - 2003-12-15T18:39:23 - 1071531563794 - 3537 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:39:23 - 1071531563794 - 3538 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:39:32 - 1071531572162 - 3539 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PRIVMSG #test :i'm going to try and get the ldap, smtp and irc servers running on it first - - - - 2003-12-15T18:39:32 - 1071531572165 - 3540 - org.codehaus.logger - INFO - Processing - run - 693 - start run - - - 2003-12-15T18:39:32 - 1071531572166 - 3541 - org.codehaus.logger - INFO - Processing - run - 693 - end run - - - 2003-12-15T18:39:32 - 1071531572166 - 3542 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T18:39:32 - 1071531572166 - 3543 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:jason PRIVMSG #test :i'm going to try and get the ldap, smtp and irc servers running on it first - - - - 2003-12-15T18:39:32 - 1071531572167 - 3544 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T18:39:32 - 1071531572167 - 3545 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:39:32 - 1071531572167 - 3546 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:jason PRIVMSG #test :i'm going to try and get the ldap, smtp and irc servers running on it first - - - - 2003-12-15T18:39:32 - 1071531572167 - 3547 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:39:32 - 1071531572167 - 3548 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:39:32 - 1071531572167 - 3549 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:39:33 - 1071531573552 - 3550 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3197177407 - - - - 2003-12-15T18:39:33 - 1071531573652 - 3551 - org.codehaus.logger - INFO - Processing - run - 694 - start run - - - 2003-12-15T18:39:33 - 1071531573652 - 3552 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:39:33 - 1071531573653 - 3553 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:39:33 - 1071531573653 - 3554 - org.codehaus.logger - INFO - Processing - run - 694 - end run - - - 2003-12-15T18:39:41 - 1071531581302 - 3555 - org.codehaus.logger - INFO - Listening - receive - 26 - <----PRIVMSG #test :cool.. - - - - 2003-12-15T18:39:41 - 1071531581303 - 3556 - org.codehaus.logger - INFO - Processing - run - 695 - start run - - - 2003-12-15T18:39:41 - 1071531581304 - 3557 - org.codehaus.logger - INFO - Processing - run - 695 - end run - - - 2003-12-15T18:39:41 - 1071531581304 - 3558 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:39:41 - 1071531581304 - 3559 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:trygvis PRIVMSG #test :cool.. - - - - 2003-12-15T18:39:41 - 1071531581304 - 3560 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:39:41 - 1071531581304 - 3561 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:39:41 - 1071531581305 - 3562 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:trygvis PRIVMSG #test :cool.. - - - - 2003-12-15T18:39:41 - 1071531581305 - 3563 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:39:41 - 1071531581305 - 3564 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T18:39:41 - 1071531581305 - 3565 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T18:39:42 - 1071531582022 - 3566 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T18:39:42 - 1071531582023 - 3567 - org.codehaus.logger - INFO - Processing - run - 696 - start run - - - 2003-12-15T18:39:42 - 1071531582023 - 3568 - org.codehaus.logger - INFO - Processing - run - 696 - end run - - - 2003-12-15T18:39:42 - 1071531582023 - 3569 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T18:39:42 - 1071531582024 - 3570 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T18:39:46 - 1071531586312 - 3571 - org.codehaus.logger - INFO - Listening - receive - 26 - <----PRIVMSG #test :what does it depend on? - - - - 2003-12-15T18:39:46 - 1071531586313 - 3572 - org.codehaus.logger - INFO - Processing - run - 697 - start run - - - 2003-12-15T18:39:46 - 1071531586313 - 3573 - org.codehaus.logger - INFO - Processing - run - 697 - end run - - - 2003-12-15T18:39:46 - 1071531586314 - 3574 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:39:46 - 1071531586314 - 3575 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:trygvis PRIVMSG #test :what does it depend on? - - - - 2003-12-15T18:39:46 - 1071531586314 - 3576 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:39:46 - 1071531586314 - 3577 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:39:46 - 1071531586314 - 3578 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:trygvis PRIVMSG #test :what does it depend on? - - - - 2003-12-15T18:39:46 - 1071531586314 - 3579 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:39:46 - 1071531586314 - 3580 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T18:39:46 - 1071531586314 - 3581 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T18:39:53 - 1071531593842 - 3582 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3217526035 - - - - 2003-12-15T18:39:53 - 1071531593843 - 3583 - org.codehaus.logger - INFO - Processing - run - 698 - start run - - - 2003-12-15T18:39:53 - 1071531593843 - 3584 - org.codehaus.logger - INFO - Processing - run - 698 - end run - - - 2003-12-15T18:39:53 - 1071531593843 - 3585 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:39:53 - 1071531593843 - 3586 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:40:03 - 1071531603632 - 3587 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3227347484 - - - - 2003-12-15T18:40:03 - 1071531603633 - 3588 - org.codehaus.logger - INFO - Processing - run - 699 - start run - - - 2003-12-15T18:40:03 - 1071531603633 - 3589 - org.codehaus.logger - INFO - Processing - run - 699 - end run - - - 2003-12-15T18:40:03 - 1071531603633 - 3590 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:40:03 - 1071531603633 - 3591 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:40:23 - 1071531623872 - 3592 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3247579257 - - - - 2003-12-15T18:40:23 - 1071531623877 - 3593 - org.codehaus.logger - INFO - Processing - run - 700 - start run - - - 2003-12-15T18:40:23 - 1071531623878 - 3594 - org.codehaus.logger - INFO - Processing - run - 700 - end run - - - 2003-12-15T18:40:23 - 1071531623878 - 3595 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:40:23 - 1071531623879 - 3596 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:40:33 - 1071531633792 - 3597 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3257510024 - - - - 2003-12-15T18:40:33 - 1071531633793 - 3598 - org.codehaus.logger - INFO - Processing - run - 701 - start run - - - 2003-12-15T18:40:33 - 1071531633793 - 3599 - org.codehaus.logger - INFO - Processing - run - 701 - end run - - - 2003-12-15T18:40:33 - 1071531633793 - 3600 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:40:33 - 1071531633794 - 3601 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:40:53 - 1071531653962 - 3602 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3277626399 - - - - 2003-12-15T18:40:53 - 1071531653963 - 3603 - org.codehaus.logger - INFO - Processing - run - 702 - start run - - - 2003-12-15T18:40:53 - 1071531653963 - 3604 - org.codehaus.logger - INFO - Processing - run - 702 - end run - - - 2003-12-15T18:40:53 - 1071531653963 - 3605 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:40:53 - 1071531653965 - 3606 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:41:03 - 1071531663952 - 3607 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3287667625 - - - - 2003-12-15T18:41:03 - 1071531663953 - 3608 - org.codehaus.logger - INFO - Processing - run - 703 - start run - - - 2003-12-15T18:41:03 - 1071531663953 - 3609 - org.codehaus.logger - INFO - Processing - run - 703 - end run - - - 2003-12-15T18:41:03 - 1071531663953 - 3610 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:41:03 - 1071531663954 - 3611 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:41:11 - 1071531671552 - 3612 - org.codehaus.logger - INFO - Listening - receive - 26 - <----PRIVMSG #test :I'm making the account tools extendable with both java classes and groovy :) - - - - 2003-12-15T18:41:11 - 1071531671553 - 3613 - org.codehaus.logger - INFO - Processing - run - 704 - start run - - - 2003-12-15T18:41:11 - 1071531671554 - 3614 - org.codehaus.logger - INFO - Processing - run - 704 - end run - - - 2003-12-15T18:41:11 - 1071531671554 - 3615 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:41:11 - 1071531671554 - 3616 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:trygvis PRIVMSG #test :I'm making the account tools extendable with both java classes and groovy :) - - - - 2003-12-15T18:41:11 - 1071531671554 - 3617 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:41:11 - 1071531671555 - 3618 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:41:11 - 1071531671555 - 3619 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:trygvis PRIVMSG #test :I'm making the account tools extendable with both java classes and groovy :) - - - - 2003-12-15T18:41:11 - 1071531671555 - 3620 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:41:11 - 1071531671555 - 3621 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T18:41:11 - 1071531671555 - 3622 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T18:41:16 - 1071531676442 - 3623 - org.codehaus.logger - INFO - Listening - receive - 26 - <----PRIVMSG #test :it's gonna rock! - - - - 2003-12-15T18:41:16 - 1071531676443 - 3624 - org.codehaus.logger - INFO - Processing - run - 705 - start run - - - 2003-12-15T18:41:16 - 1071531676444 - 3625 - org.codehaus.logger - INFO - Processing - run - 705 - end run - - - 2003-12-15T18:41:16 - 1071531676444 - 3626 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:41:16 - 1071531676444 - 3627 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:trygvis PRIVMSG #test :it's gonna rock! - - - - 2003-12-15T18:41:16 - 1071531676444 - 3628 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:41:16 - 1071531676444 - 3629 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:41:16 - 1071531676444 - 3630 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:trygvis PRIVMSG #test :it's gonna rock! - - - - 2003-12-15T18:41:16 - 1071531676445 - 3631 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:41:16 - 1071531676445 - 3632 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T18:41:16 - 1071531676445 - 3633 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T18:41:24 - 1071531684102 - 3634 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3307808626 - - - - 2003-12-15T18:41:24 - 1071531684103 - 3635 - org.codehaus.logger - INFO - Processing - run - 706 - start run - - - 2003-12-15T18:41:24 - 1071531684106 - 3636 - org.codehaus.logger - INFO - Processing - run - 706 - end run - - - 2003-12-15T18:41:24 - 1071531684106 - 3637 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:41:24 - 1071531684106 - 3638 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:41:34 - 1071531694103 - 3639 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3317827696 - - - - 2003-12-15T18:41:34 - 1071531694104 - 3640 - org.codehaus.logger - INFO - Processing - run - 707 - start run - - - 2003-12-15T18:41:34 - 1071531694104 - 3641 - org.codehaus.logger - INFO - Processing - run - 707 - end run - - - 2003-12-15T18:41:34 - 1071531694104 - 3642 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:41:34 - 1071531694104 - 3643 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:41:54 - 1071531714322 - 3644 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3338022713 - - - - 2003-12-15T18:41:54 - 1071531714323 - 3645 - org.codehaus.logger - INFO - Processing - run - 708 - start run - - - 2003-12-15T18:41:54 - 1071531714323 - 3646 - org.codehaus.logger - INFO - Processing - run - 708 - end run - - - 2003-12-15T18:41:54 - 1071531714324 - 3647 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:41:54 - 1071531714324 - 3648 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:42:04 - 1071531724242 - 3649 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3347987857 - - - - 2003-12-15T18:42:04 - 1071531724243 - 3650 - org.codehaus.logger - INFO - Processing - run - 709 - start run - - - 2003-12-15T18:42:04 - 1071531724243 - 3651 - org.codehaus.logger - INFO - Processing - run - 709 - end run - - - 2003-12-15T18:42:04 - 1071531724244 - 3652 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:42:04 - 1071531724244 - 3653 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:42:24 - 1071531744352 - 3654 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3368078422 - - - - 2003-12-15T18:42:24 - 1071531744353 - 3655 - org.codehaus.logger - INFO - Processing - run - 710 - start run - - - 2003-12-15T18:42:24 - 1071531744353 - 3656 - org.codehaus.logger - INFO - Processing - run - 710 - end run - - - 2003-12-15T18:42:24 - 1071531744354 - 3657 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:42:24 - 1071531744354 - 3658 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:42:34 - 1071531754373 - 3659 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3378137862 - - - - 2003-12-15T18:42:34 - 1071531754373 - 3660 - org.codehaus.logger - INFO - Processing - run - 711 - start run - - - 2003-12-15T18:42:34 - 1071531754374 - 3661 - org.codehaus.logger - INFO - Processing - run - 711 - end run - - - 2003-12-15T18:42:34 - 1071531754374 - 3662 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:42:34 - 1071531754374 - 3663 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:42:54 - 1071531774373 - 3664 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3398097362 - - - - 2003-12-15T18:42:54 - 1071531774373 - 3665 - org.codehaus.logger - INFO - Processing - run - 712 - start run - - - 2003-12-15T18:42:54 - 1071531774373 - 3666 - org.codehaus.logger - INFO - Processing - run - 712 - end run - - - 2003-12-15T18:42:54 - 1071531774374 - 3667 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:42:54 - 1071531774374 - 3668 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:43:04 - 1071531784513 - 3669 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3408277932 - - - - 2003-12-15T18:43:04 - 1071531784513 - 3670 - org.codehaus.logger - INFO - Processing - run - 713 - start run - - - 2003-12-15T18:43:04 - 1071531784514 - 3671 - org.codehaus.logger - INFO - Processing - run - 713 - end run - - - 2003-12-15T18:43:04 - 1071531784514 - 3672 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:43:04 - 1071531784514 - 3673 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:43:24 - 1071531804433 - 3674 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3428106586 - - - - 2003-12-15T18:43:24 - 1071531804433 - 3675 - org.codehaus.logger - INFO - Processing - run - 714 - start run - - - 2003-12-15T18:43:24 - 1071531804435 - 3676 - org.codehaus.logger - INFO - Processing - run - 714 - end run - - - 2003-12-15T18:43:24 - 1071531804435 - 3677 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:43:24 - 1071531804435 - 3678 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:43:34 - 1071531814677 - 3679 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3438432244 - - - - 2003-12-15T18:43:34 - 1071531814678 - 3680 - org.codehaus.logger - INFO - Processing - run - 715 - start run - - - 2003-12-15T18:43:34 - 1071531814679 - 3681 - org.codehaus.logger - INFO - Processing - run - 715 - end run - - - 2003-12-15T18:43:34 - 1071531814679 - 3682 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:43:34 - 1071531814680 - 3683 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:43:54 - 1071531834413 - 3684 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3458144229 - - - - 2003-12-15T18:43:54 - 1071531834413 - 3685 - org.codehaus.logger - INFO - Processing - run - 716 - start run - - - 2003-12-15T18:43:54 - 1071531834414 - 3686 - org.codehaus.logger - INFO - Processing - run - 716 - end run - - - 2003-12-15T18:43:54 - 1071531834414 - 3687 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:43:54 - 1071531834414 - 3688 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:44:04 - 1071531844854 - 3689 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3468588087 - - - - 2003-12-15T18:44:04 - 1071531844854 - 3690 - org.codehaus.logger - INFO - Processing - run - 717 - start run - - - 2003-12-15T18:44:04 - 1071531844855 - 3691 - org.codehaus.logger - INFO - Processing - run - 717 - end run - - - 2003-12-15T18:44:04 - 1071531844855 - 3692 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:44:04 - 1071531844855 - 3693 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:44:24 - 1071531864533 - 3694 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3488233449 - - - - 2003-12-15T18:44:24 - 1071531864533 - 3695 - org.codehaus.logger - INFO - Processing - run - 718 - start run - - - 2003-12-15T18:44:24 - 1071531864534 - 3696 - org.codehaus.logger - INFO - Processing - run - 718 - end run - - - 2003-12-15T18:44:24 - 1071531864534 - 3697 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:44:24 - 1071531864534 - 3698 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:44:34 - 1071531874973 - 3699 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3498738165 - - - - 2003-12-15T18:44:34 - 1071531874974 - 3700 - org.codehaus.logger - INFO - Processing - run - 719 - start run - - - 2003-12-15T18:44:34 - 1071531874974 - 3701 - org.codehaus.logger - INFO - Processing - run - 719 - end run - - - 2003-12-15T18:44:34 - 1071531874974 - 3702 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:44:34 - 1071531874974 - 3703 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:44:41 - 1071531881753 - 3704 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T18:44:41 - 1071531881753 - 3705 - org.codehaus.logger - INFO - Processing - run - 720 - start run - - - 2003-12-15T18:44:41 - 1071531881754 - 3706 - org.codehaus.logger - INFO - Processing - run - 720 - end run - - - 2003-12-15T18:44:41 - 1071531881754 - 3707 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T18:44:41 - 1071531881754 - 3708 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T18:44:54 - 1071531894593 - 3709 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3518298308 - - - - 2003-12-15T18:44:54 - 1071531894593 - 3710 - org.codehaus.logger - INFO - Processing - run - 721 - start run - - - 2003-12-15T18:44:54 - 1071531894594 - 3711 - org.codehaus.logger - INFO - Processing - run - 721 - end run - - - 2003-12-15T18:44:54 - 1071531894594 - 3712 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:44:54 - 1071531894594 - 3713 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:45:05 - 1071531905213 - 3714 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3528948243 - - - - 2003-12-15T18:45:05 - 1071531905215 - 3715 - org.codehaus.logger - INFO - Processing - run - 722 - start run - - - 2003-12-15T18:45:05 - 1071531905215 - 3716 - org.codehaus.logger - INFO - Processing - run - 722 - end run - - - 2003-12-15T18:45:05 - 1071531905215 - 3717 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:45:05 - 1071531905215 - 3718 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:45:24 - 1071531924603 - 3719 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3548307043 - - - - 2003-12-15T18:45:24 - 1071531924604 - 3720 - org.codehaus.logger - INFO - Processing - run - 723 - start run - - - 2003-12-15T18:45:24 - 1071531924604 - 3721 - org.codehaus.logger - INFO - Processing - run - 723 - end run - - - 2003-12-15T18:45:24 - 1071531924604 - 3722 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:45:24 - 1071531924604 - 3723 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:45:35 - 1071531935383 - 3724 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3559118921 - - - - 2003-12-15T18:45:35 - 1071531935384 - 3725 - org.codehaus.logger - INFO - Processing - run - 724 - start run - - - 2003-12-15T18:45:35 - 1071531935384 - 3726 - org.codehaus.logger - INFO - Processing - run - 724 - end run - - - 2003-12-15T18:45:35 - 1071531935384 - 3727 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:45:35 - 1071531935384 - 3728 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:45:37 - 1071531937603 - 3729 - org.codehaus.logger - INFO - Listening - receive - 26 - <----PRIVMSG #test :but now it's sleepytime - - - - 2003-12-15T18:45:37 - 1071531937604 - 3730 - org.codehaus.logger - INFO - Processing - run - 725 - start run - - - 2003-12-15T18:45:37 - 1071531937604 - 3731 - org.codehaus.logger - INFO - Processing - run - 725 - end run - - - 2003-12-15T18:45:37 - 1071531937605 - 3732 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:45:37 - 1071531937605 - 3733 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:trygvis PRIVMSG #test :but now it's sleepytime - - - - 2003-12-15T18:45:37 - 1071531937605 - 3734 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:45:37 - 1071531937605 - 3735 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:45:37 - 1071531937605 - 3736 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:trygvis PRIVMSG #test :but now it's sleepytime - - - - 2003-12-15T18:45:37 - 1071531937605 - 3737 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:45:37 - 1071531937606 - 3738 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T18:45:37 - 1071531937606 - 3739 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T18:45:38 - 1071531938524 - 3740 - org.codehaus.logger - INFO - Listening - receive - 26 - <----PRIVMSG #test :later - - - - 2003-12-15T18:45:38 - 1071531938524 - 3741 - org.codehaus.logger - INFO - Processing - run - 726 - start run - - - 2003-12-15T18:45:38 - 1071531938525 - 3742 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:45:38 - 1071531938525 - 3743 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:trygvis PRIVMSG #test :later - - - - 2003-12-15T18:45:38 - 1071531938525 - 3744 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:45:38 - 1071531938553 - 3745 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:45:38 - 1071531938560 - 3746 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:trygvis PRIVMSG #test :later - - - - 2003-12-15T18:45:38 - 1071531938560 - 3747 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:45:38 - 1071531938564 - 3748 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T18:45:38 - 1071531938564 - 3749 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T18:45:38 - 1071531938564 - 3750 - org.codehaus.logger - INFO - Processing - run - 726 - end run - - - 2003-12-15T18:45:40 - 1071531940543 - 3751 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PRIVMSG #test :later - - - - 2003-12-15T18:45:40 - 1071531940544 - 3752 - org.codehaus.logger - INFO - Processing - run - 727 - start run - - - 2003-12-15T18:45:40 - 1071531940544 - 3753 - org.codehaus.logger - INFO - Processing - run - 727 - end run - - - 2003-12-15T18:45:40 - 1071531940545 - 3754 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T18:45:40 - 1071531940545 - 3755 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:jason PRIVMSG #test :later - - - - 2003-12-15T18:45:40 - 1071531940545 - 3756 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T18:45:40 - 1071531940545 - 3757 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:45:40 - 1071531940545 - 3758 - org.codehaus.logger - INFO - Talking - send - 68 - ------>:jason PRIVMSG #test :later - - - - 2003-12-15T18:45:40 - 1071531940545 - 3759 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:45:40 - 1071531940545 - 3760 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:45:40 - 1071531940546 - 3761 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:45:54 - 1071531954593 - 3762 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3578315829 - - - - 2003-12-15T18:45:54 - 1071531954594 - 3763 - org.codehaus.logger - INFO - Processing - run - 728 - start run - - - 2003-12-15T18:45:54 - 1071531954594 - 3764 - org.codehaus.logger - INFO - Processing - run - 728 - end run - - - 2003-12-15T18:45:54 - 1071531954594 - 3765 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:45:54 - 1071531954594 - 3766 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:46:05 - 1071531965553 - 3767 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3589278411 - - - - 2003-12-15T18:46:05 - 1071531965554 - 3768 - org.codehaus.logger - INFO - Processing - run - 729 - start run - - - 2003-12-15T18:46:05 - 1071531965554 - 3769 - org.codehaus.logger - INFO - Processing - run - 729 - end run - - - 2003-12-15T18:46:05 - 1071531965554 - 3770 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:46:05 - 1071531965554 - 3771 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:46:24 - 1071531984613 - 3772 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3608324163 - - - - 2003-12-15T18:46:24 - 1071531984614 - 3773 - org.codehaus.logger - INFO - Processing - run - 730 - start run - - - 2003-12-15T18:46:24 - 1071531984614 - 3774 - org.codehaus.logger - INFO - Processing - run - 730 - end run - - - 2003-12-15T18:46:24 - 1071531984614 - 3775 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:46:24 - 1071531984614 - 3776 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:46:35 - 1071531995673 - 3777 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3619408499 - - - - 2003-12-15T18:46:35 - 1071531995674 - 3778 - org.codehaus.logger - INFO - Processing - run - 731 - start run - - - 2003-12-15T18:46:35 - 1071531995674 - 3779 - org.codehaus.logger - INFO - Processing - run - 731 - end run - - - 2003-12-15T18:46:35 - 1071531995674 - 3780 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:46:35 - 1071531995674 - 3781 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:46:54 - 1071532014633 - 3782 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3638336070 - - - - 2003-12-15T18:46:54 - 1071532014635 - 3783 - org.codehaus.logger - INFO - Processing - run - 732 - start run - - - 2003-12-15T18:46:54 - 1071532014635 - 3784 - org.codehaus.logger - INFO - Processing - run - 732 - end run - - - 2003-12-15T18:46:54 - 1071532014635 - 3785 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:46:54 - 1071532014636 - 3786 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:47:05 - 1071532025793 - 3787 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3649518612 - - - - 2003-12-15T18:47:05 - 1071532025794 - 3788 - org.codehaus.logger - INFO - Processing - run - 733 - start run - - - 2003-12-15T18:47:05 - 1071532025794 - 3789 - org.codehaus.logger - INFO - Processing - run - 733 - end run - - - 2003-12-15T18:47:05 - 1071532025794 - 3790 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:47:05 - 1071532025794 - 3791 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:47:26 - 1071532046263 - 3792 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3668344580 - - - - 2003-12-15T18:47:26 - 1071532046264 - 3793 - org.codehaus.logger - INFO - Processing - run - 734 - start run - - - 2003-12-15T18:47:26 - 1071532046264 - 3794 - org.codehaus.logger - INFO - Processing - run - 734 - end run - - - 2003-12-15T18:47:26 - 1071532046265 - 3795 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:47:26 - 1071532046265 - 3796 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:47:35 - 1071532055913 - 3797 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3679658707 - - - - 2003-12-15T18:47:35 - 1071532055914 - 3798 - org.codehaus.logger - INFO - Processing - run - 735 - start run - - - 2003-12-15T18:47:35 - 1071532055914 - 3799 - org.codehaus.logger - INFO - Processing - run - 735 - end run - - - 2003-12-15T18:47:35 - 1071532055914 - 3800 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:47:35 - 1071532055915 - 3801 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:47:54 - 1071532074693 - 3802 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3698353337 - - - - 2003-12-15T18:47:54 - 1071532074694 - 3803 - org.codehaus.logger - INFO - Processing - run - 736 - start run - - - 2003-12-15T18:47:54 - 1071532074694 - 3804 - org.codehaus.logger - INFO - Processing - run - 736 - end run - - - 2003-12-15T18:47:54 - 1071532074695 - 3805 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:47:54 - 1071532074695 - 3806 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:48:06 - 1071532086083 - 3807 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3709808812 - - - - 2003-12-15T18:48:06 - 1071532086084 - 3808 - org.codehaus.logger - INFO - Processing - run - 737 - start run - - - 2003-12-15T18:48:06 - 1071532086084 - 3809 - org.codehaus.logger - INFO - Processing - run - 737 - end run - - - 2003-12-15T18:48:06 - 1071532086085 - 3810 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:48:06 - 1071532086085 - 3811 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:48:24 - 1071532104634 - 3812 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3728362270 - - - - 2003-12-15T18:48:24 - 1071532104634 - 3813 - org.codehaus.logger - INFO - Processing - run - 738 - start run - - - 2003-12-15T18:48:24 - 1071532104634 - 3814 - org.codehaus.logger - INFO - Processing - run - 738 - end run - - - 2003-12-15T18:48:24 - 1071532104635 - 3815 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:48:24 - 1071532104635 - 3816 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:48:36 - 1071532116214 - 3817 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3739958926 - - - - 2003-12-15T18:48:36 - 1071532116214 - 3818 - org.codehaus.logger - INFO - Processing - run - 739 - start run - - - 2003-12-15T18:48:36 - 1071532116214 - 3819 - org.codehaus.logger - INFO - Processing - run - 739 - end run - - - 2003-12-15T18:48:36 - 1071532116215 - 3820 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:48:36 - 1071532116215 - 3821 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:48:54 - 1071532134694 - 3822 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3758370856 - - - - 2003-12-15T18:48:54 - 1071532134694 - 3823 - org.codehaus.logger - INFO - Processing - run - 740 - start run - - - 2003-12-15T18:48:54 - 1071532134695 - 3824 - org.codehaus.logger - INFO - Processing - run - 740 - end run - - - 2003-12-15T18:48:54 - 1071532134695 - 3825 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:48:54 - 1071532134695 - 3826 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:49:06 - 1071532146344 - 3827 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3770099028 - - - - 2003-12-15T18:49:06 - 1071532146345 - 3828 - org.codehaus.logger - INFO - Processing - run - 741 - start run - - - 2003-12-15T18:49:06 - 1071532146345 - 3829 - org.codehaus.logger - INFO - Processing - run - 741 - end run - - - 2003-12-15T18:49:06 - 1071532146346 - 3830 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:49:06 - 1071532146346 - 3831 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:49:24 - 1071532164644 - 3832 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3788380291 - - - - 2003-12-15T18:49:24 - 1071532164644 - 3833 - org.codehaus.logger - INFO - Processing - run - 742 - start run - - - 2003-12-15T18:49:24 - 1071532164645 - 3834 - org.codehaus.logger - INFO - Processing - run - 742 - end run - - - 2003-12-15T18:49:24 - 1071532164645 - 3835 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:49:24 - 1071532164645 - 3836 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:49:36 - 1071532176484 - 3837 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3800239142 - - - - 2003-12-15T18:49:36 - 1071532176484 - 3838 - org.codehaus.logger - INFO - Processing - run - 743 - start run - - - 2003-12-15T18:49:36 - 1071532176485 - 3839 - org.codehaus.logger - INFO - Processing - run - 743 - end run - - - 2003-12-15T18:49:36 - 1071532176485 - 3840 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:49:36 - 1071532176485 - 3841 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:49:41 - 1071532181884 - 3842 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T18:49:41 - 1071532181884 - 3843 - org.codehaus.logger - INFO - Processing - run - 744 - start run - - - 2003-12-15T18:49:41 - 1071532181885 - 3844 - org.codehaus.logger - INFO - Processing - run - 744 - end run - - - 2003-12-15T18:49:41 - 1071532181885 - 3845 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T18:49:41 - 1071532181885 - 3846 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T18:49:54 - 1071532194664 - 3847 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3818388575 - - - - 2003-12-15T18:49:54 - 1071532194665 - 3848 - org.codehaus.logger - INFO - Processing - run - 745 - start run - - - 2003-12-15T18:49:54 - 1071532194665 - 3849 - org.codehaus.logger - INFO - Processing - run - 745 - end run - - - 2003-12-15T18:49:54 - 1071532194666 - 3850 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:49:54 - 1071532194666 - 3851 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:50:06 - 1071532206614 - 3852 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3830379271 - - - - 2003-12-15T18:50:06 - 1071532206616 - 3853 - org.codehaus.logger - INFO - Processing - run - 746 - start run - - - 2003-12-15T18:50:06 - 1071532206616 - 3854 - org.codehaus.logger - INFO - Processing - run - 746 - end run - - - 2003-12-15T18:50:06 - 1071532206616 - 3855 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:50:06 - 1071532206617 - 3856 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:50:24 - 1071532224694 - 3857 - org.codehaus.logger - INFO - Listening - receive - 67 - <----PING LAG3848397165 - - - - 2003-12-15T18:50:24 - 1071532224695 - 3858 - org.codehaus.logger - INFO - Processing - run - 747 - start run - - - 2003-12-15T18:50:24 - 1071532224696 - 3859 - org.codehaus.logger - INFO - Processing - run - 747 - end run - - - 2003-12-15T18:50:24 - 1071532224696 - 3860 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:50:24 - 1071532224697 - 3861 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - start waiting - - - 2003-12-15T18:50:28 - 1071532228114 - 3862 - org.codehaus.logger - INFO - Listening - receive - 67 - <----QUIT :Client exiting - - - - 2003-12-15T18:50:28 - 1071532228115 - 3863 - org.codehaus.logger - INFO - Processing - run - 748 - start run - - - 2003-12-15T18:50:28 - 1071532228116 - 3864 - org.codehaus.logger - INFO - Processing - run - 748 - end run - - - 2003-12-15T18:50:28 - 1071532228116 - 3865 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-15T18:50:28 - 1071532228117 - 3866 - org.codehaus.logger - INFO - Talking - send - 25 - ------>: QUIT :Client exiting - - - - 2003-12-15T18:50:28 - 1071532228117 - 3867 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-15T18:50:28 - 1071532228117 - 3868 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:50:28 - 1071532228117 - 3869 - org.codehaus.logger - INFO - Talking - send - 11 - ------>: QUIT :Client exiting - - - - 2003-12-15T18:50:28 - 1071532228117 - 3870 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:50:28 - 1071532228117 - 3871 - org.codehaus.logger - INFO - Talking - waitResponse - 68 - end waiting - - - 2003-12-15T18:50:28 - 1071532228118 - 3872 - org.codehaus.logger - INFO - Talking - run - 68 - end run - - - 2003-12-15T18:50:28 - 1071532228186 - 3873 - org.codehaus.logger - INFO - Listening - run - 67 - end run - - - 2003-12-15T18:50:36 - 1071532236804 - 3874 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3860539404 - - - - 2003-12-15T18:50:36 - 1071532236805 - 3875 - org.codehaus.logger - INFO - Processing - run - 749 - start run - - - 2003-12-15T18:50:36 - 1071532236805 - 3876 - org.codehaus.logger - INFO - Processing - run - 749 - end run - - - 2003-12-15T18:50:36 - 1071532236806 - 3877 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:50:36 - 1071532236806 - 3878 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:51:06 - 1071532266934 - 3879 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3890679502 - - - - 2003-12-15T18:51:06 - 1071532266935 - 3880 - org.codehaus.logger - INFO - Processing - run - 750 - start run - - - 2003-12-15T18:51:06 - 1071532266936 - 3881 - org.codehaus.logger - INFO - Processing - run - 750 - end run - - - 2003-12-15T18:51:06 - 1071532266936 - 3882 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:51:06 - 1071532266936 - 3883 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:51:37 - 1071532297124 - 3884 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3920859594 - - - - 2003-12-15T18:51:37 - 1071532297125 - 3885 - org.codehaus.logger - INFO - Processing - run - 751 - start run - - - 2003-12-15T18:51:37 - 1071532297125 - 3886 - org.codehaus.logger - INFO - Processing - run - 751 - end run - - - 2003-12-15T18:51:37 - 1071532297126 - 3887 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:51:37 - 1071532297126 - 3888 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:52:07 - 1071532327254 - 3889 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3951009787 - - - - 2003-12-15T18:52:07 - 1071532327255 - 3890 - org.codehaus.logger - INFO - Processing - run - 752 - start run - - - 2003-12-15T18:52:07 - 1071532327256 - 3891 - org.codehaus.logger - INFO - Processing - run - 752 - end run - - - 2003-12-15T18:52:07 - 1071532327257 - 3892 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:52:07 - 1071532327257 - 3893 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:52:37 - 1071532357444 - 3894 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3981159851 - - - - 2003-12-15T18:52:37 - 1071532357445 - 3895 - org.codehaus.logger - INFO - Processing - run - 753 - start run - - - 2003-12-15T18:52:37 - 1071532357445 - 3896 - org.codehaus.logger - INFO - Processing - run - 753 - end run - - - 2003-12-15T18:52:37 - 1071532357445 - 3897 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:52:37 - 1071532357446 - 3898 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:53:07 - 1071532387545 - 3899 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4011299960 - - - - 2003-12-15T18:53:07 - 1071532387546 - 3900 - org.codehaus.logger - INFO - Processing - run - 754 - start run - - - 2003-12-15T18:53:07 - 1071532387546 - 3901 - org.codehaus.logger - INFO - Processing - run - 754 - end run - - - 2003-12-15T18:53:07 - 1071532387547 - 3902 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:53:07 - 1071532387547 - 3903 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:53:37 - 1071532417675 - 3904 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4041440058 - - - - 2003-12-15T18:53:37 - 1071532417675 - 3905 - org.codehaus.logger - INFO - Processing - run - 755 - start run - - - 2003-12-15T18:53:37 - 1071532417676 - 3906 - org.codehaus.logger - INFO - Processing - run - 755 - end run - - - 2003-12-15T18:53:37 - 1071532417676 - 3907 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:53:37 - 1071532417676 - 3908 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:54:07 - 1071532447825 - 3909 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4071570176 - - - - 2003-12-15T18:54:07 - 1071532447826 - 3910 - org.codehaus.logger - INFO - Processing - run - 756 - start run - - - 2003-12-15T18:54:07 - 1071532447827 - 3911 - org.codehaus.logger - INFO - Processing - run - 756 - end run - - - 2003-12-15T18:54:07 - 1071532447827 - 3912 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:54:07 - 1071532447827 - 3913 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:54:37 - 1071532477955 - 3914 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4101720301 - - - - 2003-12-15T18:54:37 - 1071532477956 - 3915 - org.codehaus.logger - INFO - Processing - run - 757 - start run - - - 2003-12-15T18:54:37 - 1071532477956 - 3916 - org.codehaus.logger - INFO - Processing - run - 757 - end run - - - 2003-12-15T18:54:37 - 1071532477956 - 3917 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:54:37 - 1071532477957 - 3918 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:54:41 - 1071532481495 - 3919 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T18:54:41 - 1071532481496 - 3920 - org.codehaus.logger - INFO - Processing - run - 758 - start run - - - 2003-12-15T18:54:41 - 1071532481496 - 3921 - org.codehaus.logger - INFO - Processing - run - 758 - end run - - - 2003-12-15T18:54:41 - 1071532481496 - 3922 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T18:54:41 - 1071532481496 - 3923 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T18:54:43 - 1071532483055 - 3924 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T18:54:43 - 1071532483055 - 3925 - org.codehaus.logger - INFO - Processing - run - 759 - start run - - - 2003-12-15T18:54:43 - 1071532483056 - 3926 - org.codehaus.logger - INFO - Processing - run - 759 - end run - - - 2003-12-15T18:54:43 - 1071532483056 - 3927 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T18:54:43 - 1071532483056 - 3928 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T18:55:08 - 1071532508155 - 3929 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4131870439 - - - - 2003-12-15T18:55:08 - 1071532508156 - 3930 - org.codehaus.logger - INFO - Processing - run - 760 - start run - - - 2003-12-15T18:55:08 - 1071532508156 - 3931 - org.codehaus.logger - INFO - Processing - run - 760 - end run - - - 2003-12-15T18:55:08 - 1071532508156 - 3932 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:55:08 - 1071532508156 - 3933 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:55:38 - 1071532538295 - 3934 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4162020547 - - - - 2003-12-15T18:55:38 - 1071532538296 - 3935 - org.codehaus.logger - INFO - Processing - run - 761 - start run - - - 2003-12-15T18:55:38 - 1071532538297 - 3936 - org.codehaus.logger - INFO - Processing - run - 761 - end run - - - 2003-12-15T18:55:38 - 1071532538297 - 3937 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:55:38 - 1071532538298 - 3938 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:56:08 - 1071532568395 - 3939 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4192160661 - - - - 2003-12-15T18:56:08 - 1071532568397 - 3940 - org.codehaus.logger - INFO - Processing - run - 762 - start run - - - 2003-12-15T18:56:08 - 1071532568397 - 3941 - org.codehaus.logger - INFO - Processing - run - 762 - end run - - - 2003-12-15T18:56:08 - 1071532568398 - 3942 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:56:08 - 1071532568398 - 3943 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:56:38 - 1071532598546 - 3944 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4222310785 - - - - 2003-12-15T18:56:38 - 1071532598547 - 3945 - org.codehaus.logger - INFO - Processing - run - 763 - start run - - - 2003-12-15T18:56:38 - 1071532598547 - 3946 - org.codehaus.logger - INFO - Processing - run - 763 - end run - - - 2003-12-15T18:56:38 - 1071532598548 - 3947 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:56:38 - 1071532598548 - 3948 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:57:08 - 1071532628736 - 3949 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4252460906 - - - - 2003-12-15T18:57:08 - 1071532628736 - 3950 - org.codehaus.logger - INFO - Processing - run - 764 - start run - - - 2003-12-15T18:57:08 - 1071532628737 - 3951 - org.codehaus.logger - INFO - Processing - run - 764 - end run - - - 2003-12-15T18:57:08 - 1071532628737 - 3952 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:57:08 - 1071532628737 - 3953 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:57:38 - 1071532658886 - 3954 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4282611049 - - - - 2003-12-15T18:57:38 - 1071532658886 - 3955 - org.codehaus.logger - INFO - Processing - run - 765 - start run - - - 2003-12-15T18:57:38 - 1071532658887 - 3956 - org.codehaus.logger - INFO - Processing - run - 765 - end run - - - 2003-12-15T18:57:38 - 1071532658887 - 3957 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:57:38 - 1071532658887 - 3958 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:58:09 - 1071532689056 - 3959 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG17800566 - - - - 2003-12-15T18:58:09 - 1071532689058 - 3960 - org.codehaus.logger - INFO - Processing - run - 766 - start run - - - 2003-12-15T18:58:09 - 1071532689058 - 3961 - org.codehaus.logger - INFO - Processing - run - 766 - end run - - - 2003-12-15T18:58:09 - 1071532689059 - 3962 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:58:09 - 1071532689059 - 3963 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:58:39 - 1071532719306 - 3964 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG48025399 - - - - 2003-12-15T18:58:39 - 1071532719308 - 3965 - org.codehaus.logger - INFO - Processing - run - 767 - start run - - - 2003-12-15T18:58:39 - 1071532719308 - 3966 - org.codehaus.logger - INFO - Processing - run - 767 - end run - - - 2003-12-15T18:58:39 - 1071532719310 - 3967 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:58:39 - 1071532719310 - 3968 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:59:09 - 1071532749435 - 3969 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG78184842 - - - - 2003-12-15T18:59:09 - 1071532749436 - 3970 - org.codehaus.logger - INFO - Processing - run - 768 - start run - - - 2003-12-15T18:59:09 - 1071532749436 - 3971 - org.codehaus.logger - INFO - Processing - run - 768 - end run - - - 2003-12-15T18:59:09 - 1071532749437 - 3972 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:59:09 - 1071532749437 - 3973 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T18:59:39 - 1071532779536 - 3974 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG108334273 - - - - 2003-12-15T18:59:39 - 1071532779537 - 3975 - org.codehaus.logger - INFO - Processing - run - 769 - start run - - - 2003-12-15T18:59:39 - 1071532779537 - 3976 - org.codehaus.logger - INFO - Processing - run - 769 - end run - - - 2003-12-15T18:59:39 - 1071532779538 - 3977 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T18:59:39 - 1071532779541 - 3978 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:00:09 - 1071532809770 - 3979 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG138484450 - - - - 2003-12-15T19:00:09 - 1071532809772 - 3980 - org.codehaus.logger - INFO - Processing - run - 770 - start run - - - 2003-12-15T19:00:09 - 1071532809772 - 3981 - org.codehaus.logger - INFO - Processing - run - 770 - end run - - - 2003-12-15T19:00:09 - 1071532809774 - 3982 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:00:09 - 1071532809774 - 3983 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:00:39 - 1071532839837 - 3984 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG168634501 - - - - 2003-12-15T19:00:39 - 1071532839838 - 3985 - org.codehaus.logger - INFO - Processing - run - 771 - start run - - - 2003-12-15T19:00:39 - 1071532839838 - 3986 - org.codehaus.logger - INFO - Processing - run - 771 - end run - - - 2003-12-15T19:00:39 - 1071532839839 - 3987 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:00:39 - 1071532839839 - 3988 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:01:10 - 1071532870017 - 3989 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG198774631 - - - - 2003-12-15T19:01:10 - 1071532870017 - 3990 - org.codehaus.logger - INFO - Processing - run - 772 - start run - - - 2003-12-15T19:01:10 - 1071532870017 - 3991 - org.codehaus.logger - INFO - Processing - run - 772 - end run - - - 2003-12-15T19:01:10 - 1071532870018 - 3992 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:01:10 - 1071532870018 - 3993 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:01:40 - 1071532900137 - 3994 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG228924766 - - - - 2003-12-15T19:01:40 - 1071532900137 - 3995 - org.codehaus.logger - INFO - Processing - run - 773 - start run - - - 2003-12-15T19:01:40 - 1071532900137 - 3996 - org.codehaus.logger - INFO - Processing - run - 773 - end run - - - 2003-12-15T19:01:40 - 1071532900138 - 3997 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:01:40 - 1071532900138 - 3998 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:02:10 - 1071532930267 - 3999 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG259064896 - - - - 2003-12-15T19:02:10 - 1071532930268 - 4000 - org.codehaus.logger - INFO - Processing - run - 774 - start run - - - 2003-12-15T19:02:10 - 1071532930268 - 4001 - org.codehaus.logger - INFO - Processing - run - 774 - end run - - - 2003-12-15T19:02:10 - 1071532930269 - 4002 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:02:10 - 1071532930269 - 4003 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:02:40 - 1071532960457 - 4004 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG289215032 - - - - 2003-12-15T19:02:40 - 1071532960457 - 4005 - org.codehaus.logger - INFO - Processing - run - 775 - start run - - - 2003-12-15T19:02:40 - 1071532960458 - 4006 - org.codehaus.logger - INFO - Processing - run - 775 - end run - - - 2003-12-15T19:02:40 - 1071532960458 - 4007 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:02:40 - 1071532960458 - 4008 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:03:10 - 1071532990567 - 4009 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG319355159 - - - - 2003-12-15T19:03:10 - 1071532990568 - 4010 - org.codehaus.logger - INFO - Processing - run - 776 - start run - - - 2003-12-15T19:03:10 - 1071532990568 - 4011 - org.codehaus.logger - INFO - Processing - run - 776 - end run - - - 2003-12-15T19:03:10 - 1071532990568 - 4012 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:03:10 - 1071532990569 - 4013 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:03:40 - 1071533020737 - 4014 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG349505275 - - - - 2003-12-15T19:03:40 - 1071533020738 - 4015 - org.codehaus.logger - INFO - Processing - run - 777 - start run - - - 2003-12-15T19:03:40 - 1071533020740 - 4016 - org.codehaus.logger - INFO - Processing - run - 777 - end run - - - 2003-12-15T19:03:40 - 1071533020741 - 4017 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:03:40 - 1071533020741 - 4018 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:04:10 - 1071533050867 - 4019 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG379645579 - - - - 2003-12-15T19:04:10 - 1071533050868 - 4020 - org.codehaus.logger - INFO - Processing - run - 778 - start run - - - 2003-12-15T19:04:10 - 1071533050868 - 4021 - org.codehaus.logger - INFO - Processing - run - 778 - end run - - - 2003-12-15T19:04:10 - 1071533050868 - 4022 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:04:10 - 1071533050868 - 4023 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:04:41 - 1071533081037 - 4024 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG409785178 - - - - 2003-12-15T19:04:41 - 1071533081038 - 4025 - org.codehaus.logger - INFO - Processing - run - 779 - start run - - - 2003-12-15T19:04:41 - 1071533081038 - 4026 - org.codehaus.logger - INFO - Processing - run - 779 - end run - - - 2003-12-15T19:04:41 - 1071533081038 - 4027 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:04:41 - 1071533081038 - 4028 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:04:41 - 1071533081817 - 4029 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T19:04:41 - 1071533081818 - 4030 - org.codehaus.logger - INFO - Processing - run - 780 - start run - - - 2003-12-15T19:04:41 - 1071533081818 - 4031 - org.codehaus.logger - INFO - Processing - run - 780 - end run - - - 2003-12-15T19:04:41 - 1071533081818 - 4032 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T19:04:41 - 1071533081818 - 4033 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T19:05:11 - 1071533111167 - 4034 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG439935128 - - - - 2003-12-15T19:05:11 - 1071533111168 - 4035 - org.codehaus.logger - INFO - Processing - run - 781 - start run - - - 2003-12-15T19:05:11 - 1071533111168 - 4036 - org.codehaus.logger - INFO - Processing - run - 781 - end run - - - 2003-12-15T19:05:11 - 1071533111168 - 4037 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:05:11 - 1071533111168 - 4038 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:05:41 - 1071533141307 - 4039 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG470075090 - - - - 2003-12-15T19:05:41 - 1071533141307 - 4040 - org.codehaus.logger - INFO - Processing - run - 782 - start run - - - 2003-12-15T19:05:41 - 1071533141308 - 4041 - org.codehaus.logger - INFO - Processing - run - 782 - end run - - - 2003-12-15T19:05:41 - 1071533141308 - 4042 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:05:41 - 1071533141308 - 4043 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:06:11 - 1071533171407 - 4044 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG500205051 - - - - 2003-12-15T19:06:11 - 1071533171408 - 4045 - org.codehaus.logger - INFO - Processing - run - 783 - start run - - - 2003-12-15T19:06:11 - 1071533171408 - 4046 - org.codehaus.logger - INFO - Processing - run - 783 - end run - - - 2003-12-15T19:06:11 - 1071533171408 - 4047 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:06:11 - 1071533171409 - 4048 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:06:41 - 1071533201577 - 4049 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG530345015 - - - - 2003-12-15T19:06:41 - 1071533201578 - 4050 - org.codehaus.logger - INFO - Processing - run - 784 - start run - - - 2003-12-15T19:06:41 - 1071533201578 - 4051 - org.codehaus.logger - INFO - Processing - run - 784 - end run - - - 2003-12-15T19:06:41 - 1071533201578 - 4052 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:06:41 - 1071533201579 - 4053 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:07:11 - 1071533231697 - 4054 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG560494974 - - - - 2003-12-15T19:07:11 - 1071533231698 - 4055 - org.codehaus.logger - INFO - Processing - run - 785 - start run - - - 2003-12-15T19:07:11 - 1071533231699 - 4056 - org.codehaus.logger - INFO - Processing - run - 785 - end run - - - 2003-12-15T19:07:11 - 1071533231700 - 4057 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:07:11 - 1071533231700 - 4058 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:07:41 - 1071533261887 - 4059 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG590645017 - - - - 2003-12-15T19:07:41 - 1071533261887 - 4060 - org.codehaus.logger - INFO - Processing - run - 786 - start run - - - 2003-12-15T19:07:41 - 1071533261888 - 4061 - org.codehaus.logger - INFO - Processing - run - 786 - end run - - - 2003-12-15T19:07:41 - 1071533261888 - 4062 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:07:41 - 1071533261888 - 4063 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:08:12 - 1071533292057 - 4064 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG620824905 - - - - 2003-12-15T19:08:12 - 1071533292058 - 4065 - org.codehaus.logger - INFO - Processing - run - 787 - start run - - - 2003-12-15T19:08:12 - 1071533292058 - 4066 - org.codehaus.logger - INFO - Processing - run - 787 - end run - - - 2003-12-15T19:08:12 - 1071533292059 - 4067 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:08:12 - 1071533292059 - 4068 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:08:42 - 1071533322257 - 4069 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG651045506 - - - - 2003-12-15T19:08:42 - 1071533322257 - 4070 - org.codehaus.logger - INFO - Processing - run - 788 - start run - - - 2003-12-15T19:08:42 - 1071533322258 - 4071 - org.codehaus.logger - INFO - Processing - run - 788 - end run - - - 2003-12-15T19:08:42 - 1071533322258 - 4072 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:08:42 - 1071533322258 - 4073 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:09:12 - 1071533352427 - 4074 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG681184843 - - - - 2003-12-15T19:09:12 - 1071533352427 - 4075 - org.codehaus.logger - INFO - Processing - run - 789 - start run - - - 2003-12-15T19:09:12 - 1071533352428 - 4076 - org.codehaus.logger - INFO - Processing - run - 789 - end run - - - 2003-12-15T19:09:12 - 1071533352428 - 4077 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:09:12 - 1071533352428 - 4078 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:09:41 - 1071533381957 - 4079 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T19:09:41 - 1071533381957 - 4080 - org.codehaus.logger - INFO - Processing - run - 790 - start run - - - 2003-12-15T19:09:41 - 1071533381958 - 4081 - org.codehaus.logger - INFO - Processing - run - 790 - end run - - - 2003-12-15T19:09:41 - 1071533381958 - 4082 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T19:09:41 - 1071533381958 - 4083 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T19:09:42 - 1071533382597 - 4084 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG711354830 - - - - 2003-12-15T19:09:42 - 1071533382597 - 4085 - org.codehaus.logger - INFO - Processing - run - 791 - start run - - - 2003-12-15T19:09:42 - 1071533382598 - 4086 - org.codehaus.logger - INFO - Processing - run - 791 - end run - - - 2003-12-15T19:09:42 - 1071533382598 - 4087 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:09:42 - 1071533382598 - 4088 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:10:12 - 1071533412727 - 4089 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG741505405 - - - - 2003-12-15T19:10:12 - 1071533412727 - 4090 - org.codehaus.logger - INFO - Processing - run - 792 - start run - - - 2003-12-15T19:10:12 - 1071533412728 - 4091 - org.codehaus.logger - INFO - Processing - run - 792 - end run - - - 2003-12-15T19:10:12 - 1071533412728 - 4092 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:10:12 - 1071533412728 - 4093 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:10:42 - 1071533442897 - 4094 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG771674783 - - - - 2003-12-15T19:10:43 - 1071533443056 - 4095 - org.codehaus.logger - INFO - Processing - run - 793 - start run - - - 2003-12-15T19:10:43 - 1071533443056 - 4096 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:10:43 - 1071533443057 - 4097 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:10:43 - 1071533443057 - 4098 - org.codehaus.logger - INFO - Processing - run - 793 - end run - - - 2003-12-15T19:11:13 - 1071533473087 - 4099 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG801844743 - - - - 2003-12-15T19:11:13 - 1071533473087 - 4100 - org.codehaus.logger - INFO - Processing - run - 794 - start run - - - 2003-12-15T19:11:13 - 1071533473088 - 4101 - org.codehaus.logger - INFO - Processing - run - 794 - end run - - - 2003-12-15T19:11:13 - 1071533473088 - 4102 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:11:13 - 1071533473088 - 4103 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:11:43 - 1071533503237 - 4104 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG832014729 - - - - 2003-12-15T19:11:43 - 1071533503237 - 4105 - org.codehaus.logger - INFO - Processing - run - 795 - start run - - - 2003-12-15T19:11:43 - 1071533503238 - 4106 - org.codehaus.logger - INFO - Processing - run - 795 - end run - - - 2003-12-15T19:11:43 - 1071533503238 - 4107 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:11:43 - 1071533503238 - 4108 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:12:13 - 1071533533417 - 4109 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG862164764 - - - - 2003-12-15T19:12:13 - 1071533533417 - 4110 - org.codehaus.logger - INFO - Processing - run - 796 - start run - - - 2003-12-15T19:12:13 - 1071533533417 - 4111 - org.codehaus.logger - INFO - Processing - run - 796 - end run - - - 2003-12-15T19:12:13 - 1071533533418 - 4112 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:12:13 - 1071533533418 - 4113 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:12:43 - 1071533563527 - 4114 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG892314692 - - - - 2003-12-15T19:12:43 - 1071533563527 - 4115 - org.codehaus.logger - INFO - Processing - run - 797 - start run - - - 2003-12-15T19:12:43 - 1071533563527 - 4116 - org.codehaus.logger - INFO - Processing - run - 797 - end run - - - 2003-12-15T19:12:43 - 1071533563528 - 4117 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:12:43 - 1071533563528 - 4118 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:13:13 - 1071533593667 - 4119 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG922454678 - - - - 2003-12-15T19:13:13 - 1071533593668 - 4120 - org.codehaus.logger - INFO - Processing - run - 798 - start run - - - 2003-12-15T19:13:13 - 1071533593668 - 4121 - org.codehaus.logger - INFO - Processing - run - 798 - end run - - - 2003-12-15T19:13:13 - 1071533593669 - 4122 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:13:13 - 1071533593669 - 4123 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:13:43 - 1071533623847 - 4124 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG952594674 - - - - 2003-12-15T19:13:43 - 1071533623847 - 4125 - org.codehaus.logger - INFO - Processing - run - 799 - start run - - - 2003-12-15T19:13:43 - 1071533623847 - 4126 - org.codehaus.logger - INFO - Processing - run - 799 - end run - - - 2003-12-15T19:13:43 - 1071533623848 - 4127 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:13:43 - 1071533623848 - 4128 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:14:13 - 1071533653947 - 4129 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG982744664 - - - - 2003-12-15T19:14:13 - 1071533653947 - 4130 - org.codehaus.logger - INFO - Processing - run - 800 - start run - - - 2003-12-15T19:14:13 - 1071533653948 - 4131 - org.codehaus.logger - INFO - Processing - run - 800 - end run - - - 2003-12-15T19:14:13 - 1071533653948 - 4132 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:14:13 - 1071533653948 - 4133 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:14:41 - 1071533681497 - 4134 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T19:14:41 - 1071533681498 - 4135 - org.codehaus.logger - INFO - Processing - run - 801 - start run - - - 2003-12-15T19:14:41 - 1071533681499 - 4136 - org.codehaus.logger - INFO - Processing - run - 801 - end run - - - 2003-12-15T19:14:41 - 1071533681499 - 4137 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T19:14:41 - 1071533681499 - 4138 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T19:14:44 - 1071533684127 - 4139 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1012894646 - - - - 2003-12-15T19:14:44 - 1071533684128 - 4140 - org.codehaus.logger - INFO - Processing - run - 802 - start run - - - 2003-12-15T19:14:44 - 1071533684128 - 4141 - org.codehaus.logger - INFO - Processing - run - 802 - end run - - - 2003-12-15T19:14:44 - 1071533684129 - 4142 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:14:44 - 1071533684129 - 4143 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:15:14 - 1071533714267 - 4144 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1043044640 - - - - 2003-12-15T19:15:14 - 1071533714267 - 4145 - org.codehaus.logger - INFO - Processing - run - 803 - start run - - - 2003-12-15T19:15:14 - 1071533714268 - 4146 - org.codehaus.logger - INFO - Processing - run - 803 - end run - - - 2003-12-15T19:15:14 - 1071533714268 - 4147 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:15:14 - 1071533714268 - 4148 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:15:44 - 1071533744457 - 4149 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1073215314 - - - - 2003-12-15T19:15:44 - 1071533744457 - 4150 - org.codehaus.logger - INFO - Processing - run - 804 - start run - - - 2003-12-15T19:15:44 - 1071533744458 - 4151 - org.codehaus.logger - INFO - Processing - run - 804 - end run - - - 2003-12-15T19:15:44 - 1071533744458 - 4152 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:15:44 - 1071533744458 - 4153 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:16:14 - 1071533774637 - 4154 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1103384642 - - - - 2003-12-15T19:16:14 - 1071533774637 - 4155 - org.codehaus.logger - INFO - Processing - run - 805 - start run - - - 2003-12-15T19:16:14 - 1071533774638 - 4156 - org.codehaus.logger - INFO - Processing - run - 805 - end run - - - 2003-12-15T19:16:14 - 1071533774638 - 4157 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:16:14 - 1071533774639 - 4158 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:16:44 - 1071533804747 - 4159 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1133535046 - - - - 2003-12-15T19:16:44 - 1071533804747 - 4160 - org.codehaus.logger - INFO - Processing - run - 806 - start run - - - 2003-12-15T19:16:44 - 1071533804747 - 4161 - org.codehaus.logger - INFO - Processing - run - 806 - end run - - - 2003-12-15T19:16:44 - 1071533804748 - 4162 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:16:44 - 1071533804748 - 4163 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:17:14 - 1071533834917 - 4164 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1163674632 - - - - 2003-12-15T19:17:14 - 1071533834917 - 4165 - org.codehaus.logger - INFO - Processing - run - 807 - start run - - - 2003-12-15T19:17:14 - 1071533834917 - 4166 - org.codehaus.logger - INFO - Processing - run - 807 - end run - - - 2003-12-15T19:17:14 - 1071533834918 - 4167 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:17:14 - 1071533834918 - 4168 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:17:45 - 1071533865047 - 4169 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1193814639 - - - - 2003-12-15T19:17:45 - 1071533865047 - 4170 - org.codehaus.logger - INFO - Processing - run - 808 - start run - - - 2003-12-15T19:17:45 - 1071533865048 - 4171 - org.codehaus.logger - INFO - Processing - run - 808 - end run - - - 2003-12-15T19:17:45 - 1071533865048 - 4172 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:17:45 - 1071533865048 - 4173 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:18:15 - 1071533895198 - 4174 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1223974636 - - - - 2003-12-15T19:18:15 - 1071533895198 - 4175 - org.codehaus.logger - INFO - Processing - run - 809 - start run - - - 2003-12-15T19:18:15 - 1071533895199 - 4176 - org.codehaus.logger - INFO - Processing - run - 809 - end run - - - 2003-12-15T19:18:15 - 1071533895199 - 4177 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:18:15 - 1071533895199 - 4178 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:18:45 - 1071533925327 - 4179 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1254124652 - - - - 2003-12-15T19:18:45 - 1071533925327 - 4180 - org.codehaus.logger - INFO - Processing - run - 810 - start run - - - 2003-12-15T19:18:45 - 1071533925328 - 4181 - org.codehaus.logger - INFO - Processing - run - 810 - end run - - - 2003-12-15T19:18:45 - 1071533925328 - 4182 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:18:45 - 1071533925328 - 4183 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:19:15 - 1071533955527 - 4184 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1284284645 - - - - 2003-12-15T19:19:15 - 1071533955528 - 4185 - org.codehaus.logger - INFO - Processing - run - 811 - start run - - - 2003-12-15T19:19:15 - 1071533955528 - 4186 - org.codehaus.logger - INFO - Processing - run - 811 - end run - - - 2003-12-15T19:19:15 - 1071533955529 - 4187 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:19:15 - 1071533955529 - 4188 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:19:42 - 1071533982027 - 4189 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T19:19:42 - 1071533982027 - 4190 - org.codehaus.logger - INFO - Processing - run - 812 - start run - - - 2003-12-15T19:19:42 - 1071533982027 - 4191 - org.codehaus.logger - INFO - Processing - run - 812 - end run - - - 2003-12-15T19:19:42 - 1071533982028 - 4192 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T19:19:42 - 1071533982028 - 4193 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T19:19:45 - 1071533985687 - 4194 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1314434657 - - - - 2003-12-15T19:19:45 - 1071533985687 - 4195 - org.codehaus.logger - INFO - Processing - run - 813 - start run - - - 2003-12-15T19:19:45 - 1071533985687 - 4196 - org.codehaus.logger - INFO - Processing - run - 813 - end run - - - 2003-12-15T19:19:45 - 1071533985688 - 4197 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:19:45 - 1071533985688 - 4198 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:20:15 - 1071534015807 - 4199 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1344584666 - - - - 2003-12-15T19:20:15 - 1071534015807 - 4200 - org.codehaus.logger - INFO - Processing - run - 814 - start run - - - 2003-12-15T19:20:15 - 1071534015808 - 4201 - org.codehaus.logger - INFO - Processing - run - 814 - end run - - - 2003-12-15T19:20:15 - 1071534015808 - 4202 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:20:15 - 1071534015808 - 4203 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:20:45 - 1071534045977 - 4204 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1374734685 - - - - 2003-12-15T19:20:45 - 1071534045977 - 4205 - org.codehaus.logger - INFO - Processing - run - 815 - start run - - - 2003-12-15T19:20:45 - 1071534045978 - 4206 - org.codehaus.logger - INFO - Processing - run - 815 - end run - - - 2003-12-15T19:20:45 - 1071534045978 - 4207 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:20:45 - 1071534045978 - 4208 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:21:16 - 1071534076137 - 4209 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1404886307 - - - - 2003-12-15T19:21:16 - 1071534076138 - 4210 - org.codehaus.logger - INFO - Processing - run - 816 - start run - - - 2003-12-15T19:21:16 - 1071534076138 - 4211 - org.codehaus.logger - INFO - Processing - run - 816 - end run - - - 2003-12-15T19:21:16 - 1071534076139 - 4212 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:21:16 - 1071534076140 - 4213 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:21:46 - 1071534106287 - 4214 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1435064831 - - - - 2003-12-15T19:21:46 - 1071534106287 - 4215 - org.codehaus.logger - INFO - Processing - run - 817 - start run - - - 2003-12-15T19:21:46 - 1071534106288 - 4216 - org.codehaus.logger - INFO - Processing - run - 817 - end run - - - 2003-12-15T19:21:46 - 1071534106288 - 4217 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:21:46 - 1071534106288 - 4218 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:22:16 - 1071534136427 - 4219 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1465204892 - - - - 2003-12-15T19:22:16 - 1071534136427 - 4220 - org.codehaus.logger - INFO - Processing - run - 818 - start run - - - 2003-12-15T19:22:16 - 1071534136428 - 4221 - org.codehaus.logger - INFO - Processing - run - 818 - end run - - - 2003-12-15T19:22:16 - 1071534136428 - 4222 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:22:16 - 1071534136428 - 4223 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:22:46 - 1071534166607 - 4224 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1495346757 - - - - 2003-12-15T19:22:46 - 1071534166608 - 4225 - org.codehaus.logger - INFO - Processing - run - 819 - start run - - - 2003-12-15T19:22:46 - 1071534166608 - 4226 - org.codehaus.logger - INFO - Processing - run - 819 - end run - - - 2003-12-15T19:22:46 - 1071534166608 - 4227 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:22:46 - 1071534166609 - 4228 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:23:16 - 1071534196707 - 4229 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1525495048 - - - - 2003-12-15T19:23:16 - 1071534196708 - 4230 - org.codehaus.logger - INFO - Processing - run - 820 - start run - - - 2003-12-15T19:23:16 - 1071534196708 - 4231 - org.codehaus.logger - INFO - Processing - run - 820 - end run - - - 2003-12-15T19:23:16 - 1071534196708 - 4232 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:23:16 - 1071534196708 - 4233 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:23:46 - 1071534226887 - 4234 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1555645125 - - - - 2003-12-15T19:23:46 - 1071534226888 - 4235 - org.codehaus.logger - INFO - Processing - run - 821 - start run - - - 2003-12-15T19:23:46 - 1071534226888 - 4236 - org.codehaus.logger - INFO - Processing - run - 821 - end run - - - 2003-12-15T19:23:46 - 1071534226889 - 4237 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:23:46 - 1071534226889 - 4238 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:24:17 - 1071534257007 - 4239 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1585795200 - - - - 2003-12-15T19:24:17 - 1071534257008 - 4240 - org.codehaus.logger - INFO - Processing - run - 822 - start run - - - 2003-12-15T19:24:17 - 1071534257008 - 4241 - org.codehaus.logger - INFO - Processing - run - 822 - end run - - - 2003-12-15T19:24:17 - 1071534257008 - 4242 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:24:17 - 1071534257009 - 4243 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:24:42 - 1071534282037 - 4244 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T19:24:42 - 1071534282038 - 4245 - org.codehaus.logger - INFO - Processing - run - 823 - start run - - - 2003-12-15T19:24:42 - 1071534282038 - 4246 - org.codehaus.logger - INFO - Processing - run - 823 - end run - - - 2003-12-15T19:24:42 - 1071534282038 - 4247 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T19:24:42 - 1071534282038 - 4248 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T19:24:47 - 1071534287197 - 4249 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1615945278 - - - - 2003-12-15T19:24:47 - 1071534287198 - 4250 - org.codehaus.logger - INFO - Processing - run - 824 - start run - - - 2003-12-15T19:24:47 - 1071534287198 - 4251 - org.codehaus.logger - INFO - Processing - run - 824 - end run - - - 2003-12-15T19:24:47 - 1071534287199 - 4252 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:24:47 - 1071534287200 - 4253 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:25:17 - 1071534317337 - 4254 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1646105356 - - - - 2003-12-15T19:25:17 - 1071534317338 - 4255 - org.codehaus.logger - INFO - Processing - run - 825 - start run - - - 2003-12-15T19:25:17 - 1071534317338 - 4256 - org.codehaus.logger - INFO - Processing - run - 825 - end run - - - 2003-12-15T19:25:17 - 1071534317338 - 4257 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:25:17 - 1071534317339 - 4258 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:25:47 - 1071534347467 - 4259 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1676265440 - - - - 2003-12-15T19:25:47 - 1071534347468 - 4260 - org.codehaus.logger - INFO - Processing - run - 826 - start run - - - 2003-12-15T19:25:47 - 1071534347469 - 4261 - org.codehaus.logger - INFO - Processing - run - 826 - end run - - - 2003-12-15T19:25:47 - 1071534347469 - 4262 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:25:47 - 1071534347469 - 4263 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:26:17 - 1071534377617 - 4264 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1706405521 - - - - 2003-12-15T19:26:17 - 1071534377618 - 4265 - org.codehaus.logger - INFO - Processing - run - 827 - start run - - - 2003-12-15T19:26:17 - 1071534377618 - 4266 - org.codehaus.logger - INFO - Processing - run - 827 - end run - - - 2003-12-15T19:26:17 - 1071534377619 - 4267 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:26:17 - 1071534377619 - 4268 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:26:47 - 1071534407788 - 4269 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1736545602 - - - - 2003-12-15T19:26:47 - 1071534407788 - 4270 - org.codehaus.logger - INFO - Processing - run - 828 - start run - - - 2003-12-15T19:26:47 - 1071534407789 - 4271 - org.codehaus.logger - INFO - Processing - run - 828 - end run - - - 2003-12-15T19:26:47 - 1071534407789 - 4272 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:26:47 - 1071534407789 - 4273 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:27:17 - 1071534437938 - 4274 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1766685707 - - - - 2003-12-15T19:27:17 - 1071534437938 - 4275 - org.codehaus.logger - INFO - Processing - run - 829 - start run - - - 2003-12-15T19:27:17 - 1071534437939 - 4276 - org.codehaus.logger - INFO - Processing - run - 829 - end run - - - 2003-12-15T19:27:17 - 1071534437939 - 4277 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:27:17 - 1071534437939 - 4278 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:27:48 - 1071534468058 - 4279 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1796825773 - - - - 2003-12-15T19:27:48 - 1071534468058 - 4280 - org.codehaus.logger - INFO - Processing - run - 830 - start run - - - 2003-12-15T19:27:48 - 1071534468059 - 4281 - org.codehaus.logger - INFO - Processing - run - 830 - end run - - - 2003-12-15T19:27:48 - 1071534468059 - 4282 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:27:48 - 1071534468059 - 4283 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:28:18 - 1071534498218 - 4284 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1826975860 - - - - 2003-12-15T19:28:18 - 1071534498221 - 4285 - org.codehaus.logger - INFO - Processing - run - 831 - start run - - - 2003-12-15T19:28:18 - 1071534498221 - 4286 - org.codehaus.logger - INFO - Processing - run - 831 - end run - - - 2003-12-15T19:28:18 - 1071534498222 - 4287 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:28:18 - 1071534498222 - 4288 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:28:48 - 1071534528358 - 4289 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1857125950 - - - - 2003-12-15T19:28:48 - 1071534528358 - 4290 - org.codehaus.logger - INFO - Processing - run - 832 - start run - - - 2003-12-15T19:28:48 - 1071534528360 - 4291 - org.codehaus.logger - INFO - Processing - run - 832 - end run - - - 2003-12-15T19:28:48 - 1071534528360 - 4292 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:28:48 - 1071534528360 - 4293 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:29:18 - 1071534558508 - 4294 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1887276034 - - - - 2003-12-15T19:29:18 - 1071534558509 - 4295 - org.codehaus.logger - INFO - Processing - run - 833 - start run - - - 2003-12-15T19:29:18 - 1071534558509 - 4296 - org.codehaus.logger - INFO - Processing - run - 833 - end run - - - 2003-12-15T19:29:18 - 1071534558509 - 4297 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:29:18 - 1071534558509 - 4298 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:29:42 - 1071534582008 - 4299 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T19:29:42 - 1071534582009 - 4300 - org.codehaus.logger - INFO - Processing - run - 834 - start run - - - 2003-12-15T19:29:42 - 1071534582009 - 4301 - org.codehaus.logger - INFO - Processing - run - 834 - end run - - - 2003-12-15T19:29:42 - 1071534582009 - 4302 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T19:29:42 - 1071534582009 - 4303 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T19:29:48 - 1071534588668 - 4304 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1917436121 - - - - 2003-12-15T19:29:48 - 1071534588669 - 4305 - org.codehaus.logger - INFO - Processing - run - 835 - start run - - - 2003-12-15T19:29:48 - 1071534588669 - 4306 - org.codehaus.logger - INFO - Processing - run - 835 - end run - - - 2003-12-15T19:29:48 - 1071534588669 - 4307 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:29:48 - 1071534588669 - 4308 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:30:18 - 1071534618828 - 4309 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1947616212 - - - - 2003-12-15T19:30:18 - 1071534618829 - 4310 - org.codehaus.logger - INFO - Processing - run - 836 - start run - - - 2003-12-15T19:30:18 - 1071534618829 - 4311 - org.codehaus.logger - INFO - Processing - run - 836 - end run - - - 2003-12-15T19:30:18 - 1071534618830 - 4312 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:30:18 - 1071534618830 - 4313 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:30:49 - 1071534649000 - 4314 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1977756314 - - - - 2003-12-15T19:30:49 - 1071534649001 - 4315 - org.codehaus.logger - INFO - Processing - run - 837 - start run - - - 2003-12-15T19:30:49 - 1071534649002 - 4316 - org.codehaus.logger - INFO - Processing - run - 837 - end run - - - 2003-12-15T19:30:49 - 1071534649002 - 4317 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:30:49 - 1071534649002 - 4318 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:31:19 - 1071534679138 - 4319 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2007906395 - - - - 2003-12-15T19:31:19 - 1071534679139 - 4320 - org.codehaus.logger - INFO - Processing - run - 838 - start run - - - 2003-12-15T19:31:19 - 1071534679139 - 4321 - org.codehaus.logger - INFO - Processing - run - 838 - end run - - - 2003-12-15T19:31:19 - 1071534679140 - 4322 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:31:19 - 1071534679140 - 4323 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:31:49 - 1071534709268 - 4324 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2038056494 - - - - 2003-12-15T19:31:49 - 1071534709270 - 4325 - org.codehaus.logger - INFO - Processing - run - 839 - start run - - - 2003-12-15T19:31:49 - 1071534709270 - 4326 - org.codehaus.logger - INFO - Processing - run - 839 - end run - - - 2003-12-15T19:31:49 - 1071534709275 - 4327 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:31:49 - 1071534709275 - 4328 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:32:19 - 1071534739438 - 4329 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2068216586 - - - - 2003-12-15T19:32:19 - 1071534739439 - 4330 - org.codehaus.logger - INFO - Processing - run - 840 - start run - - - 2003-12-15T19:32:19 - 1071534739441 - 4331 - org.codehaus.logger - INFO - Processing - run - 840 - end run - - - 2003-12-15T19:32:19 - 1071534739441 - 4332 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:32:19 - 1071534739441 - 4333 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:32:49 - 1071534769579 - 4334 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2098346687 - - - - 2003-12-15T19:32:49 - 1071534769579 - 4335 - org.codehaus.logger - INFO - Processing - run - 841 - start run - - - 2003-12-15T19:32:49 - 1071534769580 - 4336 - org.codehaus.logger - INFO - Processing - run - 841 - end run - - - 2003-12-15T19:32:49 - 1071534769580 - 4337 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:32:49 - 1071534769580 - 4338 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:33:19 - 1071534799739 - 4339 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2128517207 - - - - 2003-12-15T19:33:19 - 1071534799739 - 4340 - org.codehaus.logger - INFO - Processing - run - 842 - start run - - - 2003-12-15T19:33:19 - 1071534799739 - 4341 - org.codehaus.logger - INFO - Processing - run - 842 - end run - - - 2003-12-15T19:33:19 - 1071534799740 - 4342 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:33:19 - 1071534799740 - 4343 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:33:49 - 1071534829909 - 4344 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2158666892 - - - - 2003-12-15T19:33:49 - 1071534829910 - 4345 - org.codehaus.logger - INFO - Processing - run - 843 - start run - - - 2003-12-15T19:33:49 - 1071534829910 - 4346 - org.codehaus.logger - INFO - Processing - run - 843 - end run - - - 2003-12-15T19:33:49 - 1071534829911 - 4347 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:33:49 - 1071534829911 - 4348 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:34:20 - 1071534860069 - 4349 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2188826970 - - - - 2003-12-15T19:34:20 - 1071534860070 - 4350 - org.codehaus.logger - INFO - Processing - run - 844 - start run - - - 2003-12-15T19:34:20 - 1071534860070 - 4351 - org.codehaus.logger - INFO - Processing - run - 844 - end run - - - 2003-12-15T19:34:20 - 1071534860070 - 4352 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:34:20 - 1071534860070 - 4353 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:34:41 - 1071534881999 - 4354 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T19:34:42 - 1071534882000 - 4355 - org.codehaus.logger - INFO - Processing - run - 845 - start run - - - 2003-12-15T19:34:42 - 1071534882001 - 4356 - org.codehaus.logger - INFO - Processing - run - 845 - end run - - - 2003-12-15T19:34:42 - 1071534882002 - 4357 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T19:34:42 - 1071534882002 - 4358 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T19:34:50 - 1071534890219 - 4359 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2218977070 - - - - 2003-12-15T19:34:50 - 1071534890220 - 4360 - org.codehaus.logger - INFO - Processing - run - 846 - start run - - - 2003-12-15T19:34:50 - 1071534890220 - 4361 - org.codehaus.logger - INFO - Processing - run - 846 - end run - - - 2003-12-15T19:34:50 - 1071534890220 - 4362 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:34:50 - 1071534890220 - 4363 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:35:20 - 1071534920350 - 4364 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2249146871 - - - - 2003-12-15T19:35:20 - 1071534920350 - 4365 - org.codehaus.logger - INFO - Processing - run - 847 - start run - - - 2003-12-15T19:35:20 - 1071534920351 - 4366 - org.codehaus.logger - INFO - Processing - run - 847 - end run - - - 2003-12-15T19:35:20 - 1071534920351 - 4367 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:35:20 - 1071534920351 - 4368 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:35:50 - 1071534950499 - 4369 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2279287271 - - - - 2003-12-15T19:35:50 - 1071534950501 - 4370 - org.codehaus.logger - INFO - Processing - run - 848 - start run - - - 2003-12-15T19:35:50 - 1071534950501 - 4371 - org.codehaus.logger - INFO - Processing - run - 848 - end run - - - 2003-12-15T19:35:50 - 1071534950501 - 4372 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:35:50 - 1071534950502 - 4373 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:36:20 - 1071534980689 - 4374 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2309447376 - - - - 2003-12-15T19:36:20 - 1071534980690 - 4375 - org.codehaus.logger - INFO - Processing - run - 849 - start run - - - 2003-12-15T19:36:20 - 1071534980690 - 4376 - org.codehaus.logger - INFO - Processing - run - 849 - end run - - - 2003-12-15T19:36:20 - 1071534980692 - 4377 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:36:20 - 1071534980692 - 4378 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:36:50 - 1071535010810 - 4379 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2339607480 - - - - 2003-12-15T19:36:50 - 1071535010810 - 4380 - org.codehaus.logger - INFO - Processing - run - 850 - start run - - - 2003-12-15T19:36:50 - 1071535010810 - 4381 - org.codehaus.logger - INFO - Processing - run - 850 - end run - - - 2003-12-15T19:36:50 - 1071535010811 - 4382 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:36:50 - 1071535010811 - 4383 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:37:20 - 1071535040970 - 4384 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2369757581 - - - - 2003-12-15T19:37:20 - 1071535040970 - 4385 - org.codehaus.logger - INFO - Processing - run - 851 - start run - - - 2003-12-15T19:37:20 - 1071535040970 - 4386 - org.codehaus.logger - INFO - Processing - run - 851 - end run - - - 2003-12-15T19:37:20 - 1071535040971 - 4387 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:37:20 - 1071535040971 - 4388 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:37:51 - 1071535071130 - 4389 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2399907683 - - - - 2003-12-15T19:37:51 - 1071535071130 - 4390 - org.codehaus.logger - INFO - Processing - run - 852 - start run - - - 2003-12-15T19:37:51 - 1071535071131 - 4391 - org.codehaus.logger - INFO - Processing - run - 852 - end run - - - 2003-12-15T19:37:51 - 1071535071131 - 4392 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:37:51 - 1071535071131 - 4393 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:38:21 - 1071535101270 - 4394 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2430057752 - - - - 2003-12-15T19:38:21 - 1071535101270 - 4395 - org.codehaus.logger - INFO - Processing - run - 853 - start run - - - 2003-12-15T19:38:21 - 1071535101271 - 4396 - org.codehaus.logger - INFO - Processing - run - 853 - end run - - - 2003-12-15T19:38:21 - 1071535101271 - 4397 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:38:21 - 1071535101271 - 4398 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:38:51 - 1071535131410 - 4399 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2460207827 - - - - 2003-12-15T19:38:51 - 1071535131411 - 4400 - org.codehaus.logger - INFO - Processing - run - 854 - start run - - - 2003-12-15T19:38:51 - 1071535131411 - 4401 - org.codehaus.logger - INFO - Processing - run - 854 - end run - - - 2003-12-15T19:38:51 - 1071535131411 - 4402 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:38:51 - 1071535131411 - 4403 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:39:21 - 1071535161571 - 4404 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2490368526 - - - - 2003-12-15T19:39:21 - 1071535161572 - 4405 - org.codehaus.logger - INFO - Processing - run - 855 - start run - - - 2003-12-15T19:39:21 - 1071535161572 - 4406 - org.codehaus.logger - INFO - Processing - run - 855 - end run - - - 2003-12-15T19:39:21 - 1071535161573 - 4407 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:39:21 - 1071535161573 - 4408 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:39:41 - 1071535181990 - 4409 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T19:39:41 - 1071535181992 - 4410 - org.codehaus.logger - INFO - Processing - run - 856 - start run - - - 2003-12-15T19:39:41 - 1071535181992 - 4411 - org.codehaus.logger - INFO - Processing - run - 856 - end run - - - 2003-12-15T19:39:41 - 1071535181992 - 4412 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T19:39:41 - 1071535181992 - 4413 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T19:39:51 - 1071535191740 - 4414 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2520517983 - - - - 2003-12-15T19:39:51 - 1071535191741 - 4415 - org.codehaus.logger - INFO - Processing - run - 857 - start run - - - 2003-12-15T19:39:51 - 1071535191742 - 4416 - org.codehaus.logger - INFO - Processing - run - 857 - end run - - - 2003-12-15T19:39:51 - 1071535191742 - 4417 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:39:51 - 1071535191742 - 4418 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:40:21 - 1071535221910 - 4419 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2550658057 - - - - 2003-12-15T19:40:21 - 1071535221911 - 4420 - org.codehaus.logger - INFO - Processing - run - 858 - start run - - - 2003-12-15T19:40:21 - 1071535221911 - 4421 - org.codehaus.logger - INFO - Processing - run - 858 - end run - - - 2003-12-15T19:40:21 - 1071535221911 - 4422 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:40:21 - 1071535221911 - 4423 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:40:52 - 1071535252070 - 4424 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2580818159 - - - - 2003-12-15T19:40:52 - 1071535252071 - 4425 - org.codehaus.logger - INFO - Processing - run - 859 - start run - - - 2003-12-15T19:40:52 - 1071535252071 - 4426 - org.codehaus.logger - INFO - Processing - run - 859 - end run - - - 2003-12-15T19:40:52 - 1071535252071 - 4427 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:40:52 - 1071535252071 - 4428 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:41:22 - 1071535282230 - 4429 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2611008201 - - - - 2003-12-15T19:41:22 - 1071535282231 - 4430 - org.codehaus.logger - INFO - Processing - run - 860 - start run - - - 2003-12-15T19:41:22 - 1071535282231 - 4431 - org.codehaus.logger - INFO - Processing - run - 860 - end run - - - 2003-12-15T19:41:22 - 1071535282231 - 4432 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:41:22 - 1071535282232 - 4433 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:41:52 - 1071535312380 - 4434 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2641158284 - - - - 2003-12-15T19:41:52 - 1071535312381 - 4435 - org.codehaus.logger - INFO - Processing - run - 861 - start run - - - 2003-12-15T19:41:52 - 1071535312381 - 4436 - org.codehaus.logger - INFO - Processing - run - 861 - end run - - - 2003-12-15T19:41:52 - 1071535312381 - 4437 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:41:52 - 1071535312381 - 4438 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:42:22 - 1071535342560 - 4439 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2671308365 - - - - 2003-12-15T19:42:22 - 1071535342561 - 4440 - org.codehaus.logger - INFO - Processing - run - 862 - start run - - - 2003-12-15T19:42:22 - 1071535342561 - 4441 - org.codehaus.logger - INFO - Processing - run - 862 - end run - - - 2003-12-15T19:42:22 - 1071535342562 - 4442 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:42:22 - 1071535342562 - 4443 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:42:52 - 1071535372710 - 4444 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2701458440 - - - - 2003-12-15T19:42:52 - 1071535372711 - 4445 - org.codehaus.logger - INFO - Processing - run - 863 - start run - - - 2003-12-15T19:42:52 - 1071535372711 - 4446 - org.codehaus.logger - INFO - Processing - run - 863 - end run - - - 2003-12-15T19:42:52 - 1071535372712 - 4447 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:42:52 - 1071535372712 - 4448 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:43:22 - 1071535402840 - 4449 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2731598522 - - - - 2003-12-15T19:43:22 - 1071535402841 - 4450 - org.codehaus.logger - INFO - Processing - run - 864 - start run - - - 2003-12-15T19:43:22 - 1071535402842 - 4451 - org.codehaus.logger - INFO - Processing - run - 864 - end run - - - 2003-12-15T19:43:22 - 1071535402842 - 4452 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:43:22 - 1071535402842 - 4453 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:43:53 - 1071535433031 - 4454 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2761769060 - - - - 2003-12-15T19:43:53 - 1071535433032 - 4455 - org.codehaus.logger - INFO - Processing - run - 865 - start run - - - 2003-12-15T19:43:53 - 1071535433032 - 4456 - org.codehaus.logger - INFO - Processing - run - 865 - end run - - - 2003-12-15T19:43:53 - 1071535433033 - 4457 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:43:53 - 1071535433033 - 4458 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:44:23 - 1071535463181 - 4459 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2791928689 - - - - 2003-12-15T19:44:23 - 1071535463182 - 4460 - org.codehaus.logger - INFO - Processing - run - 866 - start run - - - 2003-12-15T19:44:23 - 1071535463182 - 4461 - org.codehaus.logger - INFO - Processing - run - 866 - end run - - - 2003-12-15T19:44:23 - 1071535463182 - 4462 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:44:23 - 1071535463183 - 4463 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:44:42 - 1071535482031 - 4464 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T19:44:42 - 1071535482032 - 4465 - org.codehaus.logger - INFO - Processing - run - 867 - start run - - - 2003-12-15T19:44:42 - 1071535482032 - 4466 - org.codehaus.logger - INFO - Processing - run - 867 - end run - - - 2003-12-15T19:44:42 - 1071535482033 - 4467 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T19:44:42 - 1071535482033 - 4468 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T19:44:53 - 1071535493311 - 4469 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2822078776 - - - - 2003-12-15T19:44:53 - 1071535493312 - 4470 - org.codehaus.logger - INFO - Processing - run - 868 - start run - - - 2003-12-15T19:44:53 - 1071535493312 - 4471 - org.codehaus.logger - INFO - Processing - run - 868 - end run - - - 2003-12-15T19:44:53 - 1071535493313 - 4472 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:44:53 - 1071535493313 - 4473 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:45:23 - 1071535523491 - 4474 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2852238859 - - - - 2003-12-15T19:45:23 - 1071535523491 - 4475 - org.codehaus.logger - INFO - Processing - run - 869 - start run - - - 2003-12-15T19:45:23 - 1071535523492 - 4476 - org.codehaus.logger - INFO - Processing - run - 869 - end run - - - 2003-12-15T19:45:23 - 1071535523492 - 4477 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:45:23 - 1071535523492 - 4478 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:45:53 - 1071535553611 - 4479 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2882388948 - - - - 2003-12-15T19:45:53 - 1071535553612 - 4480 - org.codehaus.logger - INFO - Processing - run - 870 - start run - - - 2003-12-15T19:45:53 - 1071535553613 - 4481 - org.codehaus.logger - INFO - Processing - run - 870 - end run - - - 2003-12-15T19:45:53 - 1071535553613 - 4482 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:45:53 - 1071535553613 - 4483 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:46:23 - 1071535583741 - 4484 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2912529056 - - - - 2003-12-15T19:46:23 - 1071535583741 - 4485 - org.codehaus.logger - INFO - Processing - run - 871 - start run - - - 2003-12-15T19:46:23 - 1071535583742 - 4486 - org.codehaus.logger - INFO - Processing - run - 871 - end run - - - 2003-12-15T19:46:23 - 1071535583742 - 4487 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:46:23 - 1071535583934 - 4488 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:46:53 - 1071535613911 - 4489 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2942679128 - - - - 2003-12-15T19:46:53 - 1071535613912 - 4490 - org.codehaus.logger - INFO - Processing - run - 872 - start run - - - 2003-12-15T19:46:53 - 1071535613912 - 4491 - org.codehaus.logger - INFO - Processing - run - 872 - end run - - - 2003-12-15T19:46:53 - 1071535613913 - 4492 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:46:53 - 1071535613913 - 4493 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:47:24 - 1071535644064 - 4494 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2972822551 - - - - 2003-12-15T19:47:24 - 1071535644065 - 4495 - org.codehaus.logger - INFO - Processing - run - 873 - start run - - - 2003-12-15T19:47:24 - 1071535644065 - 4496 - org.codehaus.logger - INFO - Processing - run - 873 - end run - - - 2003-12-15T19:47:24 - 1071535644065 - 4497 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:47:24 - 1071535644065 - 4498 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:47:54 - 1071535674281 - 4499 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3003039312 - - - - 2003-12-15T19:47:54 - 1071535674282 - 4500 - org.codehaus.logger - INFO - Processing - run - 874 - start run - - - 2003-12-15T19:47:54 - 1071535674283 - 4501 - org.codehaus.logger - INFO - Processing - run - 874 - end run - - - 2003-12-15T19:47:54 - 1071535674287 - 4502 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:47:54 - 1071535674288 - 4503 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:48:24 - 1071535704461 - 4504 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3033219396 - - - - 2003-12-15T19:48:24 - 1071535704462 - 4505 - org.codehaus.logger - INFO - Processing - run - 875 - start run - - - 2003-12-15T19:48:24 - 1071535704462 - 4506 - org.codehaus.logger - INFO - Processing - run - 875 - end run - - - 2003-12-15T19:48:24 - 1071535704463 - 4507 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:48:24 - 1071535704463 - 4508 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:48:54 - 1071535734611 - 4509 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3063379507 - - - - 2003-12-15T19:48:54 - 1071535734612 - 4510 - org.codehaus.logger - INFO - Processing - run - 876 - start run - - - 2003-12-15T19:48:54 - 1071535734612 - 4511 - org.codehaus.logger - INFO - Processing - run - 876 - end run - - - 2003-12-15T19:48:54 - 1071535734612 - 4512 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:48:54 - 1071535734613 - 4513 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:49:24 - 1071535764741 - 4514 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3093529604 - - - - 2003-12-15T19:49:24 - 1071535764743 - 4515 - org.codehaus.logger - INFO - Processing - run - 877 - start run - - - 2003-12-15T19:49:24 - 1071535764743 - 4516 - org.codehaus.logger - INFO - Processing - run - 877 - end run - - - 2003-12-15T19:49:24 - 1071535764744 - 4517 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:49:24 - 1071535764744 - 4518 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:49:41 - 1071535781982 - 4519 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T19:49:41 - 1071535781982 - 4520 - org.codehaus.logger - INFO - Processing - run - 878 - start run - - - 2003-12-15T19:49:41 - 1071535781982 - 4521 - org.codehaus.logger - INFO - Processing - run - 878 - end run - - - 2003-12-15T19:49:41 - 1071535781983 - 4522 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T19:49:41 - 1071535781983 - 4523 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T19:49:54 - 1071535794892 - 4524 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3123679690 - - - - 2003-12-15T19:49:54 - 1071535794892 - 4525 - org.codehaus.logger - INFO - Processing - run - 879 - start run - - - 2003-12-15T19:49:54 - 1071535794892 - 4526 - org.codehaus.logger - INFO - Processing - run - 879 - end run - - - 2003-12-15T19:49:54 - 1071535794894 - 4527 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:49:54 - 1071535794894 - 4528 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:50:25 - 1071535825032 - 4529 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3153829786 - - - - 2003-12-15T19:50:25 - 1071535825033 - 4530 - org.codehaus.logger - INFO - Processing - run - 880 - start run - - - 2003-12-15T19:50:25 - 1071535825033 - 4531 - org.codehaus.logger - INFO - Processing - run - 880 - end run - - - 2003-12-15T19:50:25 - 1071535825033 - 4532 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:50:25 - 1071535825033 - 4533 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:50:55 - 1071535855242 - 4534 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3183989912 - - - - 2003-12-15T19:50:55 - 1071535855243 - 4535 - org.codehaus.logger - INFO - Processing - run - 881 - start run - - - 2003-12-15T19:50:55 - 1071535855243 - 4536 - org.codehaus.logger - INFO - Processing - run - 881 - end run - - - 2003-12-15T19:50:55 - 1071535855244 - 4537 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:50:55 - 1071535855244 - 4538 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:51:25 - 1071535885362 - 4539 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3214149976 - - - - 2003-12-15T19:51:25 - 1071535885363 - 4540 - org.codehaus.logger - INFO - Processing - run - 882 - start run - - - 2003-12-15T19:51:25 - 1071535885363 - 4541 - org.codehaus.logger - INFO - Processing - run - 882 - end run - - - 2003-12-15T19:51:25 - 1071535885363 - 4542 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:51:25 - 1071535885364 - 4543 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:51:55 - 1071535915532 - 4544 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3244300077 - - - - 2003-12-15T19:51:55 - 1071535915533 - 4545 - org.codehaus.logger - INFO - Processing - run - 883 - start run - - - 2003-12-15T19:51:55 - 1071535915533 - 4546 - org.codehaus.logger - INFO - Processing - run - 883 - end run - - - 2003-12-15T19:51:55 - 1071535915533 - 4547 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:51:55 - 1071535915533 - 4548 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:52:25 - 1071535945702 - 4549 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3274470186 - - - - 2003-12-15T19:52:25 - 1071535945703 - 4550 - org.codehaus.logger - INFO - Processing - run - 884 - start run - - - 2003-12-15T19:52:25 - 1071535945703 - 4551 - org.codehaus.logger - INFO - Processing - run - 884 - end run - - - 2003-12-15T19:52:25 - 1071535945703 - 4552 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:52:25 - 1071535945703 - 4553 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:52:55 - 1071535975852 - 4554 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3304620326 - - - - 2003-12-15T19:52:55 - 1071535975853 - 4555 - org.codehaus.logger - INFO - Processing - run - 885 - start run - - - 2003-12-15T19:52:55 - 1071535975853 - 4556 - org.codehaus.logger - INFO - Processing - run - 885 - end run - - - 2003-12-15T19:52:55 - 1071535975853 - 4557 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:52:55 - 1071535975853 - 4558 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:53:25 - 1071536005992 - 4559 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3334760468 - - - - 2003-12-15T19:53:25 - 1071536005993 - 4560 - org.codehaus.logger - INFO - Processing - run - 886 - start run - - - 2003-12-15T19:53:25 - 1071536005993 - 4561 - org.codehaus.logger - INFO - Processing - run - 886 - end run - - - 2003-12-15T19:53:25 - 1071536005994 - 4562 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:53:25 - 1071536005994 - 4563 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:53:56 - 1071536036113 - 4564 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3364910518 - - - - 2003-12-15T19:53:56 - 1071536036113 - 4565 - org.codehaus.logger - INFO - Processing - run - 887 - start run - - - 2003-12-15T19:53:56 - 1071536036115 - 4566 - org.codehaus.logger - INFO - Processing - run - 887 - end run - - - 2003-12-15T19:53:56 - 1071536036115 - 4567 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:53:56 - 1071536036116 - 4568 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:54:26 - 1071536066273 - 4569 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3395070594 - - - - 2003-12-15T19:54:26 - 1071536066273 - 4570 - org.codehaus.logger - INFO - Processing - run - 888 - start run - - - 2003-12-15T19:54:26 - 1071536066274 - 4571 - org.codehaus.logger - INFO - Processing - run - 888 - end run - - - 2003-12-15T19:54:26 - 1071536066274 - 4572 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:54:26 - 1071536066274 - 4573 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:54:42 - 1071536082023 - 4574 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T19:54:42 - 1071536082024 - 4575 - org.codehaus.logger - INFO - Processing - run - 889 - start run - - - 2003-12-15T19:54:42 - 1071536082024 - 4576 - org.codehaus.logger - INFO - Processing - run - 889 - end run - - - 2003-12-15T19:54:42 - 1071536082024 - 4577 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T19:54:42 - 1071536082024 - 4578 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T19:54:56 - 1071536096433 - 4579 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3425220699 - - - - 2003-12-15T19:54:56 - 1071536096433 - 4580 - org.codehaus.logger - INFO - Processing - run - 890 - start run - - - 2003-12-15T19:54:56 - 1071536096434 - 4581 - org.codehaus.logger - INFO - Processing - run - 890 - end run - - - 2003-12-15T19:54:56 - 1071536096434 - 4582 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:54:56 - 1071536096434 - 4583 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:55:26 - 1071536126613 - 4584 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3455370829 - - - - 2003-12-15T19:55:26 - 1071536126613 - 4585 - org.codehaus.logger - INFO - Processing - run - 891 - start run - - - 2003-12-15T19:55:26 - 1071536126614 - 4586 - org.codehaus.logger - INFO - Processing - run - 891 - end run - - - 2003-12-15T19:55:26 - 1071536126614 - 4587 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:55:26 - 1071536126614 - 4588 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:55:56 - 1071536156753 - 4589 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3485510958 - - - - 2003-12-15T19:55:56 - 1071536156753 - 4590 - org.codehaus.logger - INFO - Processing - run - 892 - start run - - - 2003-12-15T19:55:56 - 1071536156754 - 4591 - org.codehaus.logger - INFO - Processing - run - 892 - end run - - - 2003-12-15T19:55:56 - 1071536156754 - 4592 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:55:56 - 1071536156754 - 4593 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:56:26 - 1071536186893 - 4594 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3515651706 - - - - 2003-12-15T19:56:26 - 1071536186894 - 4595 - org.codehaus.logger - INFO - Processing - run - 893 - start run - - - 2003-12-15T19:56:26 - 1071536186894 - 4596 - org.codehaus.logger - INFO - Processing - run - 893 - end run - - - 2003-12-15T19:56:26 - 1071536186894 - 4597 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:56:26 - 1071536186894 - 4598 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:56:57 - 1071536217013 - 4599 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3545801204 - - - - 2003-12-15T19:56:57 - 1071536217014 - 4600 - org.codehaus.logger - INFO - Processing - run - 894 - start run - - - 2003-12-15T19:56:57 - 1071536217014 - 4601 - org.codehaus.logger - INFO - Processing - run - 894 - end run - - - 2003-12-15T19:56:57 - 1071536217014 - 4602 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:56:57 - 1071536217014 - 4603 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:57:27 - 1071536247183 - 4604 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3575941334 - - - - 2003-12-15T19:57:27 - 1071536247184 - 4605 - org.codehaus.logger - INFO - Processing - run - 895 - start run - - - 2003-12-15T19:57:27 - 1071536247186 - 4606 - org.codehaus.logger - INFO - Processing - run - 895 - end run - - - 2003-12-15T19:57:27 - 1071536247186 - 4607 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:57:27 - 1071536247186 - 4608 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:57:57 - 1071536277293 - 4609 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3606081468 - - - - 2003-12-15T19:57:57 - 1071536277294 - 4610 - org.codehaus.logger - INFO - Processing - run - 896 - start run - - - 2003-12-15T19:57:57 - 1071536277294 - 4611 - org.codehaus.logger - INFO - Processing - run - 896 - end run - - - 2003-12-15T19:57:57 - 1071536277295 - 4612 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:57:57 - 1071536277295 - 4613 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:58:27 - 1071536307474 - 4614 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3636231598 - - - - 2003-12-15T19:58:27 - 1071536307474 - 4615 - org.codehaus.logger - INFO - Processing - run - 897 - start run - - - 2003-12-15T19:58:27 - 1071536307475 - 4616 - org.codehaus.logger - INFO - Processing - run - 897 - end run - - - 2003-12-15T19:58:27 - 1071536307475 - 4617 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:58:27 - 1071536307476 - 4618 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:58:57 - 1071536337614 - 4619 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3666381740 - - - - 2003-12-15T19:58:57 - 1071536337615 - 4620 - org.codehaus.logger - INFO - Processing - run - 898 - start run - - - 2003-12-15T19:58:57 - 1071536337616 - 4621 - org.codehaus.logger - INFO - Processing - run - 898 - end run - - - 2003-12-15T19:58:57 - 1071536337617 - 4622 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:58:57 - 1071536337617 - 4623 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:59:27 - 1071536367764 - 4624 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3696551858 - - - - 2003-12-15T19:59:27 - 1071536367764 - 4625 - org.codehaus.logger - INFO - Processing - run - 899 - start run - - - 2003-12-15T19:59:27 - 1071536367765 - 4626 - org.codehaus.logger - INFO - Processing - run - 899 - end run - - - 2003-12-15T19:59:27 - 1071536367765 - 4627 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:59:27 - 1071536367765 - 4628 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T19:59:42 - 1071536382014 - 4629 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T19:59:42 - 1071536382016 - 4630 - org.codehaus.logger - INFO - Processing - run - 900 - start run - - - 2003-12-15T19:59:42 - 1071536382016 - 4631 - org.codehaus.logger - INFO - Processing - run - 900 - end run - - - 2003-12-15T19:59:42 - 1071536382017 - 4632 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T19:59:42 - 1071536382017 - 4633 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T19:59:57 - 1071536397914 - 4634 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3726701995 - - - - 2003-12-15T19:59:57 - 1071536397914 - 4635 - org.codehaus.logger - INFO - Processing - run - 901 - start run - - - 2003-12-15T19:59:57 - 1071536397915 - 4636 - org.codehaus.logger - INFO - Processing - run - 901 - end run - - - 2003-12-15T19:59:57 - 1071536397915 - 4637 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T19:59:57 - 1071536397915 - 4638 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:00:28 - 1071536428094 - 4639 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3756862129 - - - - 2003-12-15T20:00:28 - 1071536428095 - 4640 - org.codehaus.logger - INFO - Processing - run - 902 - start run - - - 2003-12-15T20:00:28 - 1071536428095 - 4641 - org.codehaus.logger - INFO - Processing - run - 902 - end run - - - 2003-12-15T20:00:28 - 1071536428095 - 4642 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:00:28 - 1071536428095 - 4643 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:00:58 - 1071536458234 - 4644 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3787022258 - - - - 2003-12-15T20:00:58 - 1071536458756 - 4645 - org.codehaus.logger - INFO - Processing - run - 903 - start run - - - 2003-12-15T20:00:58 - 1071536458756 - 4646 - org.codehaus.logger - INFO - Processing - run - 903 - end run - - - 2003-12-15T20:00:58 - 1071536458757 - 4647 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:00:58 - 1071536458757 - 4648 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:01:28 - 1071536488444 - 4649 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3817242398 - - - - 2003-12-15T20:01:28 - 1071536488445 - 4650 - org.codehaus.logger - INFO - Processing - run - 904 - start run - - - 2003-12-15T20:01:28 - 1071536488446 - 4651 - org.codehaus.logger - INFO - Processing - run - 904 - end run - - - 2003-12-15T20:01:28 - 1071536488446 - 4652 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:01:28 - 1071536488446 - 4653 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:01:58 - 1071536518644 - 4654 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3847392535 - - - - 2003-12-15T20:01:58 - 1071536518645 - 4655 - org.codehaus.logger - INFO - Processing - run - 905 - start run - - - 2003-12-15T20:01:58 - 1071536518645 - 4656 - org.codehaus.logger - INFO - Processing - run - 905 - end run - - - 2003-12-15T20:01:58 - 1071536518646 - 4657 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:01:58 - 1071536518646 - 4658 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:02:28 - 1071536548785 - 4659 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3877542670 - - - - 2003-12-15T20:02:28 - 1071536548786 - 4660 - org.codehaus.logger - INFO - Processing - run - 906 - start run - - - 2003-12-15T20:02:28 - 1071536548786 - 4661 - org.codehaus.logger - INFO - Processing - run - 906 - end run - - - 2003-12-15T20:02:28 - 1071536548787 - 4662 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:02:28 - 1071536548787 - 4663 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:02:58 - 1071536578905 - 4664 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3907692808 - - - - 2003-12-15T20:02:58 - 1071536578905 - 4665 - org.codehaus.logger - INFO - Processing - run - 907 - start run - - - 2003-12-15T20:02:58 - 1071536578906 - 4666 - org.codehaus.logger - INFO - Processing - run - 907 - end run - - - 2003-12-15T20:02:58 - 1071536578906 - 4667 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:02:58 - 1071536578906 - 4668 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:03:29 - 1071536609075 - 4669 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3937842944 - - - - 2003-12-15T20:03:29 - 1071536609078 - 4670 - org.codehaus.logger - INFO - Processing - run - 908 - start run - - - 2003-12-15T20:03:29 - 1071536609078 - 4671 - org.codehaus.logger - INFO - Processing - run - 908 - end run - - - 2003-12-15T20:03:29 - 1071536609078 - 4672 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:03:29 - 1071536609078 - 4673 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:03:59 - 1071536639255 - 4674 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3967993788 - - - - 2003-12-15T20:03:59 - 1071536639256 - 4675 - org.codehaus.logger - INFO - Processing - run - 909 - start run - - - 2003-12-15T20:03:59 - 1071536639256 - 4676 - org.codehaus.logger - INFO - Processing - run - 909 - end run - - - 2003-12-15T20:03:59 - 1071536639257 - 4677 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:03:59 - 1071536639257 - 4678 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:04:29 - 1071536669345 - 4679 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3998133641 - - - - 2003-12-15T20:04:29 - 1071536669346 - 4680 - org.codehaus.logger - INFO - Processing - run - 910 - start run - - - 2003-12-15T20:04:29 - 1071536669346 - 4681 - org.codehaus.logger - INFO - Processing - run - 910 - end run - - - 2003-12-15T20:04:29 - 1071536669346 - 4682 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:04:29 - 1071536669346 - 4683 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:04:42 - 1071536682005 - 4684 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T20:04:42 - 1071536682437 - 4685 - org.codehaus.logger - INFO - Processing - run - 911 - start run - - - 2003-12-15T20:04:42 - 1071536682437 - 4686 - org.codehaus.logger - INFO - Processing - run - 911 - end run - - - 2003-12-15T20:04:42 - 1071536682437 - 4687 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T20:04:42 - 1071536682437 - 4688 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T20:04:59 - 1071536699515 - 4689 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4028283367 - - - - 2003-12-15T20:04:59 - 1071536699516 - 4690 - org.codehaus.logger - INFO - Processing - run - 912 - start run - - - 2003-12-15T20:04:59 - 1071536699516 - 4691 - org.codehaus.logger - INFO - Processing - run - 912 - end run - - - 2003-12-15T20:04:59 - 1071536699516 - 4692 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:04:59 - 1071536699516 - 4693 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:05:29 - 1071536729695 - 4694 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4058473502 - - - - 2003-12-15T20:05:29 - 1071536729700 - 4695 - org.codehaus.logger - INFO - Processing - run - 913 - start run - - - 2003-12-15T20:05:29 - 1071536729700 - 4696 - org.codehaus.logger - INFO - Processing - run - 913 - end run - - - 2003-12-15T20:05:29 - 1071536729700 - 4697 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:05:29 - 1071536729701 - 4698 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:05:59 - 1071536759886 - 4699 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4088633656 - - - - 2003-12-15T20:05:59 - 1071536759887 - 4700 - org.codehaus.logger - INFO - Processing - run - 914 - start run - - - 2003-12-15T20:05:59 - 1071536759887 - 4701 - org.codehaus.logger - INFO - Processing - run - 914 - end run - - - 2003-12-15T20:05:59 - 1071536759887 - 4702 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:05:59 - 1071536759887 - 4703 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:06:30 - 1071536790006 - 4704 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4118783783 - - - - 2003-12-15T20:06:30 - 1071536790007 - 4705 - org.codehaus.logger - INFO - Processing - run - 915 - start run - - - 2003-12-15T20:06:30 - 1071536790007 - 4706 - org.codehaus.logger - INFO - Processing - run - 915 - end run - - - 2003-12-15T20:06:30 - 1071536790007 - 4707 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:06:30 - 1071536790008 - 4708 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:07:00 - 1071536820157 - 4709 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4148933926 - - - - 2003-12-15T20:07:00 - 1071536820157 - 4710 - org.codehaus.logger - INFO - Processing - run - 916 - start run - - - 2003-12-15T20:07:00 - 1071536820158 - 4711 - org.codehaus.logger - INFO - Processing - run - 916 - end run - - - 2003-12-15T20:07:00 - 1071536820158 - 4712 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:07:00 - 1071536820159 - 4713 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:07:30 - 1071536850306 - 4714 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4179084069 - - - - 2003-12-15T20:07:30 - 1071536850307 - 4715 - org.codehaus.logger - INFO - Processing - run - 917 - start run - - - 2003-12-15T20:07:30 - 1071536850307 - 4716 - org.codehaus.logger - INFO - Processing - run - 917 - end run - - - 2003-12-15T20:07:30 - 1071536850307 - 4717 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:07:30 - 1071536850307 - 4718 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:08:00 - 1071536880476 - 4719 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4209234209 - - - - 2003-12-15T20:08:00 - 1071536880477 - 4720 - org.codehaus.logger - INFO - Processing - run - 918 - start run - - - 2003-12-15T20:08:00 - 1071536880477 - 4721 - org.codehaus.logger - INFO - Processing - run - 918 - end run - - - 2003-12-15T20:08:00 - 1071536880477 - 4722 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:08:00 - 1071536880477 - 4723 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:08:30 - 1071536910626 - 4724 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4239384362 - - - - 2003-12-15T20:08:30 - 1071536910627 - 4725 - org.codehaus.logger - INFO - Processing - run - 919 - start run - - - 2003-12-15T20:08:30 - 1071536910627 - 4726 - org.codehaus.logger - INFO - Processing - run - 919 - end run - - - 2003-12-15T20:08:30 - 1071536910627 - 4727 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:08:30 - 1071536910627 - 4728 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:09:00 - 1071536940766 - 4729 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4269534955 - - - - 2003-12-15T20:09:00 - 1071536940767 - 4730 - org.codehaus.logger - INFO - Processing - run - 920 - start run - - - 2003-12-15T20:09:00 - 1071536940767 - 4731 - org.codehaus.logger - INFO - Processing - run - 920 - end run - - - 2003-12-15T20:09:00 - 1071536940767 - 4732 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:09:00 - 1071536940768 - 4733 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:09:30 - 1071536970937 - 4734 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4717369 - - - - 2003-12-15T20:09:30 - 1071536970938 - 4735 - org.codehaus.logger - INFO - Processing - run - 921 - start run - - - 2003-12-15T20:09:30 - 1071536970938 - 4736 - org.codehaus.logger - INFO - Processing - run - 921 - end run - - - 2003-12-15T20:09:30 - 1071536970939 - 4737 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:09:30 - 1071536970939 - 4738 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:09:42 - 1071536982027 - 4739 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T20:09:42 - 1071536982028 - 4740 - org.codehaus.logger - INFO - Processing - run - 922 - start run - - - 2003-12-15T20:09:42 - 1071536982028 - 4741 - org.codehaus.logger - INFO - Processing - run - 922 - end run - - - 2003-12-15T20:09:42 - 1071536982029 - 4742 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T20:09:42 - 1071536982029 - 4743 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T20:10:01 - 1071537001077 - 4744 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG34867500 - - - - 2003-12-15T20:10:01 - 1071537001079 - 4745 - org.codehaus.logger - INFO - Processing - run - 923 - start run - - - 2003-12-15T20:10:01 - 1071537001079 - 4746 - org.codehaus.logger - INFO - Processing - run - 923 - end run - - - 2003-12-15T20:10:01 - 1071537001079 - 4747 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:10:01 - 1071537001080 - 4748 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:10:31 - 1071537031217 - 4749 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG65027669 - - - - 2003-12-15T20:10:31 - 1071537031217 - 4750 - org.codehaus.logger - INFO - Processing - run - 924 - start run - - - 2003-12-15T20:10:31 - 1071537031218 - 4751 - org.codehaus.logger - INFO - Processing - run - 924 - end run - - - 2003-12-15T20:10:31 - 1071537031218 - 4752 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:10:31 - 1071537031218 - 4753 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:11:01 - 1071537061347 - 4754 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG95177800 - - - - 2003-12-15T20:11:01 - 1071537061348 - 4755 - org.codehaus.logger - INFO - Processing - run - 925 - start run - - - 2003-12-15T20:11:01 - 1071537061348 - 4756 - org.codehaus.logger - INFO - Processing - run - 925 - end run - - - 2003-12-15T20:11:01 - 1071537061348 - 4757 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:11:01 - 1071537061349 - 4758 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:11:31 - 1071537091547 - 4759 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG125327938 - - - - 2003-12-15T20:11:31 - 1071537091548 - 4760 - org.codehaus.logger - INFO - Processing - run - 926 - start run - - - 2003-12-15T20:11:31 - 1071537091548 - 4761 - org.codehaus.logger - INFO - Processing - run - 926 - end run - - - 2003-12-15T20:11:31 - 1071537091548 - 4762 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:11:31 - 1071537091550 - 4763 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:12:01 - 1071537121677 - 4764 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG155478077 - - - - 2003-12-15T20:12:01 - 1071537121678 - 4765 - org.codehaus.logger - INFO - Processing - run - 927 - start run - - - 2003-12-15T20:12:01 - 1071537121678 - 4766 - org.codehaus.logger - INFO - Processing - run - 927 - end run - - - 2003-12-15T20:12:01 - 1071537121679 - 4767 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:12:01 - 1071537121679 - 4768 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:12:31 - 1071537151827 - 4769 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG185628131 - - - - 2003-12-15T20:12:31 - 1071537151828 - 4770 - org.codehaus.logger - INFO - Processing - run - 928 - start run - - - 2003-12-15T20:12:31 - 1071537151828 - 4771 - org.codehaus.logger - INFO - Processing - run - 928 - end run - - - 2003-12-15T20:12:31 - 1071537151828 - 4772 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:12:31 - 1071537151829 - 4773 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:13:01 - 1071537181978 - 4774 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG215778187 - - - - 2003-12-15T20:13:01 - 1071537181979 - 4775 - org.codehaus.logger - INFO - Processing - run - 929 - start run - - - 2003-12-15T20:13:01 - 1071537181979 - 4776 - org.codehaus.logger - INFO - Processing - run - 929 - end run - - - 2003-12-15T20:13:01 - 1071537181979 - 4777 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:13:01 - 1071537181980 - 4778 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:13:32 - 1071537212098 - 4779 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG245928258 - - - - 2003-12-15T20:13:32 - 1071537212098 - 4780 - org.codehaus.logger - INFO - Processing - run - 930 - start run - - - 2003-12-15T20:13:32 - 1071537212099 - 4781 - org.codehaus.logger - INFO - Processing - run - 930 - end run - - - 2003-12-15T20:13:32 - 1071537212099 - 4782 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:13:32 - 1071537212099 - 4783 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:14:02 - 1071537242287 - 4784 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG276078423 - - - - 2003-12-15T20:14:02 - 1071537242289 - 4785 - org.codehaus.logger - INFO - Processing - run - 931 - start run - - - 2003-12-15T20:14:02 - 1071537242289 - 4786 - org.codehaus.logger - INFO - Processing - run - 931 - end run - - - 2003-12-15T20:14:02 - 1071537242289 - 4787 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:14:02 - 1071537242289 - 4788 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:14:32 - 1071537272448 - 4789 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG306248416 - - - - 2003-12-15T20:14:32 - 1071537272448 - 4790 - org.codehaus.logger - INFO - Processing - run - 932 - start run - - - 2003-12-15T20:14:32 - 1071537272448 - 4791 - org.codehaus.logger - INFO - Processing - run - 932 - end run - - - 2003-12-15T20:14:32 - 1071537272449 - 4792 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:14:32 - 1071537272449 - 4793 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:14:41 - 1071537281998 - 4794 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T20:14:41 - 1071537281998 - 4795 - org.codehaus.logger - INFO - Processing - run - 933 - start run - - - 2003-12-15T20:14:41 - 1071537281998 - 4796 - org.codehaus.logger - INFO - Processing - run - 933 - end run - - - 2003-12-15T20:14:41 - 1071537281999 - 4797 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T20:14:41 - 1071537281999 - 4798 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T20:15:02 - 1071537302578 - 4799 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG336388444 - - - - 2003-12-15T20:15:02 - 1071537302578 - 4800 - org.codehaus.logger - INFO - Processing - run - 934 - start run - - - 2003-12-15T20:15:02 - 1071537302579 - 4801 - org.codehaus.logger - INFO - Processing - run - 934 - end run - - - 2003-12-15T20:15:02 - 1071537302589 - 4802 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:15:02 - 1071537302589 - 4803 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:15:32 - 1071537332708 - 4804 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG366538488 - - - - 2003-12-15T20:15:32 - 1071537332709 - 4805 - org.codehaus.logger - INFO - Processing - run - 935 - start run - - - 2003-12-15T20:15:32 - 1071537332709 - 4806 - org.codehaus.logger - INFO - Processing - run - 935 - end run - - - 2003-12-15T20:15:32 - 1071537332709 - 4807 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:15:32 - 1071537332709 - 4808 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:16:02 - 1071537362868 - 4809 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG396688615 - - - - 2003-12-15T20:16:02 - 1071537362868 - 4810 - org.codehaus.logger - INFO - Processing - run - 936 - start run - - - 2003-12-15T20:16:02 - 1071537362869 - 4811 - org.codehaus.logger - INFO - Processing - run - 936 - end run - - - 2003-12-15T20:16:02 - 1071537362869 - 4812 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:16:02 - 1071537362869 - 4813 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:16:33 - 1071537393038 - 4814 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG426848625 - - - - 2003-12-15T20:16:33 - 1071537393038 - 4815 - org.codehaus.logger - INFO - Processing - run - 937 - start run - - - 2003-12-15T20:16:33 - 1071537393039 - 4816 - org.codehaus.logger - INFO - Processing - run - 937 - end run - - - 2003-12-15T20:16:33 - 1071537393039 - 4817 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:16:33 - 1071537393039 - 4818 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:17:03 - 1071537423208 - 4819 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG457008706 - - - - 2003-12-15T20:17:03 - 1071537423208 - 4820 - org.codehaus.logger - INFO - Processing - run - 938 - start run - - - 2003-12-15T20:17:03 - 1071537423209 - 4821 - org.codehaus.logger - INFO - Processing - run - 938 - end run - - - 2003-12-15T20:17:03 - 1071537423209 - 4822 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:17:03 - 1071537423209 - 4823 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:17:33 - 1071537453348 - 4824 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG487158748 - - - - 2003-12-15T20:17:33 - 1071537453349 - 4825 - org.codehaus.logger - INFO - Processing - run - 939 - start run - - - 2003-12-15T20:17:33 - 1071537453349 - 4826 - org.codehaus.logger - INFO - Processing - run - 939 - end run - - - 2003-12-15T20:17:33 - 1071537453349 - 4827 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:17:33 - 1071537453350 - 4828 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:18:03 - 1071537483548 - 4829 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG517338834 - - - - 2003-12-15T20:18:03 - 1071537483549 - 4830 - org.codehaus.logger - INFO - Processing - run - 940 - start run - - - 2003-12-15T20:18:03 - 1071537483549 - 4831 - org.codehaus.logger - INFO - Processing - run - 940 - end run - - - 2003-12-15T20:18:03 - 1071537483549 - 4832 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:18:03 - 1071537483549 - 4833 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:18:33 - 1071537513678 - 4834 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG547498889 - - - - 2003-12-15T20:18:33 - 1071537513679 - 4835 - org.codehaus.logger - INFO - Processing - run - 941 - start run - - - 2003-12-15T20:18:33 - 1071537513680 - 4836 - org.codehaus.logger - INFO - Processing - run - 941 - end run - - - 2003-12-15T20:18:33 - 1071537513680 - 4837 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:18:33 - 1071537513680 - 4838 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:19:03 - 1071537543868 - 4839 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG577648956 - - - - 2003-12-15T20:19:03 - 1071537543869 - 4840 - org.codehaus.logger - INFO - Processing - run - 942 - start run - - - 2003-12-15T20:19:04 - 1071537544309 - 4841 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:19:04 - 1071537544310 - 4842 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:19:04 - 1071537544310 - 4843 - org.codehaus.logger - INFO - Processing - run - 942 - end run - - - 2003-12-15T20:19:34 - 1071537574018 - 4844 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG607829024 - - - - 2003-12-15T20:19:34 - 1071537574019 - 4845 - org.codehaus.logger - INFO - Processing - run - 943 - start run - - - 2003-12-15T20:19:34 - 1071537574019 - 4846 - org.codehaus.logger - INFO - Processing - run - 943 - end run - - - 2003-12-15T20:19:34 - 1071537574019 - 4847 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:19:34 - 1071537574020 - 4848 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:19:42 - 1071537582008 - 4849 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T20:19:42 - 1071537582009 - 4850 - org.codehaus.logger - INFO - Processing - run - 944 - start run - - - 2003-12-15T20:19:42 - 1071537582009 - 4851 - org.codehaus.logger - INFO - Processing - run - 944 - end run - - - 2003-12-15T20:19:42 - 1071537582010 - 4852 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T20:19:42 - 1071537582010 - 4853 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T20:20:04 - 1071537604198 - 4854 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG638009101 - - - - 2003-12-15T20:20:04 - 1071537604200 - 4855 - org.codehaus.logger - INFO - Processing - run - 945 - start run - - - 2003-12-15T20:20:04 - 1071537604200 - 4856 - org.codehaus.logger - INFO - Processing - run - 945 - end run - - - 2003-12-15T20:20:04 - 1071537604200 - 4857 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:20:04 - 1071537604200 - 4858 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:20:34 - 1071537634319 - 4859 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG668149177 - - - - 2003-12-15T20:20:34 - 1071537634319 - 4860 - org.codehaus.logger - INFO - Processing - run - 946 - start run - - - 2003-12-15T20:20:34 - 1071537634320 - 4861 - org.codehaus.logger - INFO - Processing - run - 946 - end run - - - 2003-12-15T20:20:34 - 1071537634320 - 4862 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:20:34 - 1071537634320 - 4863 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:21:04 - 1071537664508 - 4864 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG698299299 - - - - 2003-12-15T20:21:04 - 1071537664509 - 4865 - org.codehaus.logger - INFO - Processing - run - 947 - start run - - - 2003-12-15T20:21:04 - 1071537664509 - 4866 - org.codehaus.logger - INFO - Processing - run - 947 - end run - - - 2003-12-15T20:21:04 - 1071537664510 - 4867 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:21:04 - 1071537664510 - 4868 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:21:34 - 1071537694659 - 4869 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG728449331 - - - - 2003-12-15T20:21:34 - 1071537694659 - 4870 - org.codehaus.logger - INFO - Processing - run - 948 - start run - - - 2003-12-15T20:21:34 - 1071537694659 - 4871 - org.codehaus.logger - INFO - Processing - run - 948 - end run - - - 2003-12-15T20:21:34 - 1071537694660 - 4872 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:21:34 - 1071537694660 - 4873 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:22:04 - 1071537724789 - 4874 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG758609406 - - - - 2003-12-15T20:22:04 - 1071537724789 - 4875 - org.codehaus.logger - INFO - Processing - run - 949 - start run - - - 2003-12-15T20:22:04 - 1071537724790 - 4876 - org.codehaus.logger - INFO - Processing - run - 949 - end run - - - 2003-12-15T20:22:04 - 1071537724790 - 4877 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:22:04 - 1071537724790 - 4878 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:22:34 - 1071537754919 - 4879 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG788749488 - - - - 2003-12-15T20:22:34 - 1071537754920 - 4880 - org.codehaus.logger - INFO - Processing - run - 950 - start run - - - 2003-12-15T20:22:35 - 1071537755350 - 4881 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:22:35 - 1071537755350 - 4882 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:22:35 - 1071537755350 - 4883 - org.codehaus.logger - INFO - Processing - run - 950 - end run - - - 2003-12-15T20:23:05 - 1071537785119 - 4884 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG818909563 - - - - 2003-12-15T20:23:05 - 1071537785119 - 4885 - org.codehaus.logger - INFO - Processing - run - 951 - start run - - - 2003-12-15T20:23:05 - 1071537785120 - 4886 - org.codehaus.logger - INFO - Processing - run - 951 - end run - - - 2003-12-15T20:23:05 - 1071537785120 - 4887 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:23:05 - 1071537785120 - 4888 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:23:35 - 1071537815259 - 4889 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG849069655 - - - - 2003-12-15T20:23:35 - 1071537815262 - 4890 - org.codehaus.logger - INFO - Processing - run - 952 - start run - - - 2003-12-15T20:23:35 - 1071537815268 - 4891 - org.codehaus.logger - INFO - Processing - run - 952 - end run - - - 2003-12-15T20:23:35 - 1071537815289 - 4892 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:23:35 - 1071537815289 - 4893 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:24:05 - 1071537845449 - 4894 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG879239731 - - - - 2003-12-15T20:24:05 - 1071537845449 - 4895 - org.codehaus.logger - INFO - Processing - run - 953 - start run - - - 2003-12-15T20:24:05 - 1071537845450 - 4896 - org.codehaus.logger - INFO - Processing - run - 953 - end run - - - 2003-12-15T20:24:05 - 1071537845450 - 4897 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:24:05 - 1071537845450 - 4898 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:24:35 - 1071537875599 - 4899 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG909389809 - - - - 2003-12-15T20:24:35 - 1071537875600 - 4900 - org.codehaus.logger - INFO - Processing - run - 954 - start run - - - 2003-12-15T20:24:35 - 1071537875600 - 4901 - org.codehaus.logger - INFO - Processing - run - 954 - end run - - - 2003-12-15T20:24:35 - 1071537875600 - 4902 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:24:35 - 1071537875600 - 4903 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:24:42 - 1071537882019 - 4904 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T20:24:42 - 1071537882020 - 4905 - org.codehaus.logger - INFO - Processing - run - 955 - start run - - - 2003-12-15T20:24:42 - 1071537882020 - 4906 - org.codehaus.logger - INFO - Processing - run - 955 - end run - - - 2003-12-15T20:24:42 - 1071537882020 - 4907 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T20:24:42 - 1071537882020 - 4908 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T20:25:05 - 1071537905719 - 4909 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG939529892 - - - - 2003-12-15T20:25:05 - 1071537905720 - 4910 - org.codehaus.logger - INFO - Processing - run - 956 - start run - - - 2003-12-15T20:25:05 - 1071537905720 - 4911 - org.codehaus.logger - INFO - Processing - run - 956 - end run - - - 2003-12-15T20:25:05 - 1071537905720 - 4912 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:25:05 - 1071537905721 - 4913 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:25:35 - 1071537935879 - 4914 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG969679980 - - - - 2003-12-15T20:25:35 - 1071537935881 - 4915 - org.codehaus.logger - INFO - Processing - run - 957 - start run - - - 2003-12-15T20:25:35 - 1071537935881 - 4916 - org.codehaus.logger - INFO - Processing - run - 957 - end run - - - 2003-12-15T20:25:35 - 1071537935881 - 4917 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:25:35 - 1071537935881 - 4918 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:26:06 - 1071537966039 - 4919 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG999830066 - - - - 2003-12-15T20:26:06 - 1071537966042 - 4920 - org.codehaus.logger - INFO - Processing - run - 958 - start run - - - 2003-12-15T20:26:06 - 1071537966042 - 4921 - org.codehaus.logger - INFO - Processing - run - 958 - end run - - - 2003-12-15T20:26:06 - 1071537966042 - 4922 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:26:06 - 1071537966042 - 4923 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:26:36 - 1071537996199 - 4924 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1029970399 - - - - 2003-12-15T20:26:36 - 1071537996200 - 4925 - org.codehaus.logger - INFO - Processing - run - 959 - start run - - - 2003-12-15T20:26:36 - 1071537996200 - 4926 - org.codehaus.logger - INFO - Processing - run - 959 - end run - - - 2003-12-15T20:26:36 - 1071537996201 - 4927 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:26:36 - 1071537996201 - 4928 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:27:06 - 1071538026309 - 4929 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1060110257 - - - - 2003-12-15T20:27:06 - 1071538026311 - 4930 - org.codehaus.logger - INFO - Processing - run - 960 - start run - - - 2003-12-15T20:27:06 - 1071538026311 - 4931 - org.codehaus.logger - INFO - Processing - run - 960 - end run - - - 2003-12-15T20:27:06 - 1071538026312 - 4932 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:27:06 - 1071538026312 - 4933 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:27:36 - 1071538056450 - 4934 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1090280335 - - - - 2003-12-15T20:27:36 - 1071538056450 - 4935 - org.codehaus.logger - INFO - Processing - run - 961 - start run - - - 2003-12-15T20:27:36 - 1071538056451 - 4936 - org.codehaus.logger - INFO - Processing - run - 961 - end run - - - 2003-12-15T20:27:36 - 1071538056451 - 4937 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:27:36 - 1071538056451 - 4938 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:28:06 - 1071538086630 - 4939 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1120430435 - - - - 2003-12-15T20:28:06 - 1071538086630 - 4940 - org.codehaus.logger - INFO - Processing - run - 962 - start run - - - 2003-12-15T20:28:06 - 1071538086631 - 4941 - org.codehaus.logger - INFO - Processing - run - 962 - end run - - - 2003-12-15T20:28:06 - 1071538086631 - 4942 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:28:06 - 1071538086631 - 4943 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:28:36 - 1071538116770 - 4944 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1150590512 - - - - 2003-12-15T20:28:36 - 1071538116770 - 4945 - org.codehaus.logger - INFO - Processing - run - 963 - start run - - - 2003-12-15T20:28:36 - 1071538116771 - 4946 - org.codehaus.logger - INFO - Processing - run - 963 - end run - - - 2003-12-15T20:28:36 - 1071538116771 - 4947 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:28:36 - 1071538116771 - 4948 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:29:06 - 1071538146930 - 4949 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1180740604 - - - - 2003-12-15T20:29:06 - 1071538146931 - 4950 - org.codehaus.logger - INFO - Processing - run - 964 - start run - - - 2003-12-15T20:29:06 - 1071538146932 - 4951 - org.codehaus.logger - INFO - Processing - run - 964 - end run - - - 2003-12-15T20:29:06 - 1071538146933 - 4952 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:29:06 - 1071538146933 - 4953 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:29:37 - 1071538177110 - 4954 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1210920707 - - - - 2003-12-15T20:29:37 - 1071538177111 - 4955 - org.codehaus.logger - INFO - Processing - run - 965 - start run - - - 2003-12-15T20:29:37 - 1071538177111 - 4956 - org.codehaus.logger - INFO - Processing - run - 965 - end run - - - 2003-12-15T20:29:37 - 1071538177111 - 4957 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:29:37 - 1071538177111 - 4958 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:29:41 - 1071538181970 - 4959 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T20:29:41 - 1071538181972 - 4960 - org.codehaus.logger - INFO - Processing - run - 966 - start run - - - 2003-12-15T20:29:41 - 1071538181972 - 4961 - org.codehaus.logger - INFO - Processing - run - 966 - end run - - - 2003-12-15T20:29:41 - 1071538181972 - 4962 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T20:29:41 - 1071538181972 - 4963 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T20:30:07 - 1071538207230 - 4964 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1241060806 - - - - 2003-12-15T20:30:07 - 1071538207231 - 4965 - org.codehaus.logger - INFO - Processing - run - 967 - start run - - - 2003-12-15T20:30:07 - 1071538207231 - 4966 - org.codehaus.logger - INFO - Processing - run - 967 - end run - - - 2003-12-15T20:30:07 - 1071538207231 - 4967 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:30:07 - 1071538207231 - 4968 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:30:37 - 1071538237405 - 4969 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1271225818 - - - - 2003-12-15T20:30:37 - 1071538237410 - 4970 - org.codehaus.logger - INFO - Processing - run - 968 - start run - - - 2003-12-15T20:30:37 - 1071538237410 - 4971 - org.codehaus.logger - INFO - Processing - run - 968 - end run - - - 2003-12-15T20:30:37 - 1071538237411 - 4972 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:30:37 - 1071538237411 - 4973 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:31:07 - 1071538267580 - 4974 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1301381029 - - - - 2003-12-15T20:31:07 - 1071538267581 - 4975 - org.codehaus.logger - INFO - Processing - run - 969 - start run - - - 2003-12-15T20:31:07 - 1071538267581 - 4976 - org.codehaus.logger - INFO - Processing - run - 969 - end run - - - 2003-12-15T20:31:07 - 1071538267581 - 4977 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:31:07 - 1071538267582 - 4978 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:31:37 - 1071538297710 - 4979 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1331531113 - - - - 2003-12-15T20:31:37 - 1071538297711 - 4980 - org.codehaus.logger - INFO - Processing - run - 970 - start run - - - 2003-12-15T20:31:37 - 1071538297711 - 4981 - org.codehaus.logger - INFO - Processing - run - 970 - end run - - - 2003-12-15T20:31:37 - 1071538297712 - 4982 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:31:37 - 1071538297712 - 4983 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:32:07 - 1071538327870 - 4984 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1361691214 - - - - 2003-12-15T20:32:07 - 1071538327871 - 4985 - org.codehaus.logger - INFO - Processing - run - 971 - start run - - - 2003-12-15T20:32:07 - 1071538327871 - 4986 - org.codehaus.logger - INFO - Processing - run - 971 - end run - - - 2003-12-15T20:32:07 - 1071538327872 - 4987 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:32:07 - 1071538327872 - 4988 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:32:38 - 1071538358051 - 4989 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1391831329 - - - - 2003-12-15T20:32:38 - 1071538358051 - 4990 - org.codehaus.logger - INFO - Processing - run - 972 - start run - - - 2003-12-15T20:32:38 - 1071538358052 - 4991 - org.codehaus.logger - INFO - Processing - run - 972 - end run - - - 2003-12-15T20:32:38 - 1071538358052 - 4992 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:32:38 - 1071538358052 - 4993 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:33:08 - 1071538388211 - 4994 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1422031434 - - - - 2003-12-15T20:33:08 - 1071538388211 - 4995 - org.codehaus.logger - INFO - Processing - run - 973 - start run - - - 2003-12-15T20:33:08 - 1071538388212 - 4996 - org.codehaus.logger - INFO - Processing - run - 973 - end run - - - 2003-12-15T20:33:08 - 1071538388212 - 4997 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:33:08 - 1071538388212 - 4998 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:33:38 - 1071538418772 - 4999 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1452181539 - - - - 2003-12-15T20:33:38 - 1071538418772 - 5000 - org.codehaus.logger - INFO - Processing - run - 974 - start run - - - 2003-12-15T20:33:38 - 1071538418772 - 5001 - org.codehaus.logger - INFO - Processing - run - 974 - end run - - - 2003-12-15T20:33:38 - 1071538418773 - 5002 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:33:38 - 1071538418773 - 5003 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:34:08 - 1071538448551 - 5004 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1482331651 - - - - 2003-12-15T20:34:08 - 1071538448555 - 5005 - org.codehaus.logger - INFO - Processing - run - 975 - start run - - - 2003-12-15T20:34:08 - 1071538448555 - 5006 - org.codehaus.logger - INFO - Processing - run - 975 - end run - - - 2003-12-15T20:34:08 - 1071538448556 - 5007 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:34:08 - 1071538448556 - 5008 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:34:38 - 1071538478681 - 5009 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1512481751 - - - - 2003-12-15T20:34:38 - 1071538478682 - 5010 - org.codehaus.logger - INFO - Processing - run - 976 - start run - - - 2003-12-15T20:34:38 - 1071538478682 - 5011 - org.codehaus.logger - INFO - Processing - run - 976 - end run - - - 2003-12-15T20:34:38 - 1071538478683 - 5012 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:34:38 - 1071538478683 - 5013 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:34:42 - 1071538482041 - 5014 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T20:34:42 - 1071538482042 - 5015 - org.codehaus.logger - INFO - Processing - run - 977 - start run - - - 2003-12-15T20:34:42 - 1071538482042 - 5016 - org.codehaus.logger - INFO - Processing - run - 977 - end run - - - 2003-12-15T20:34:42 - 1071538482042 - 5017 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T20:34:42 - 1071538482042 - 5018 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T20:35:08 - 1071538508821 - 5019 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1542621861 - - - - 2003-12-15T20:35:08 - 1071538508822 - 5020 - org.codehaus.logger - INFO - Processing - run - 978 - start run - - - 2003-12-15T20:35:08 - 1071538508822 - 5021 - org.codehaus.logger - INFO - Processing - run - 978 - end run - - - 2003-12-15T20:35:08 - 1071538508823 - 5022 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:35:08 - 1071538508823 - 5023 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:35:38 - 1071538538961 - 5024 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1572761977 - - - - 2003-12-15T20:35:38 - 1071538538962 - 5025 - org.codehaus.logger - INFO - Processing - run - 979 - start run - - - 2003-12-15T20:35:38 - 1071538538962 - 5026 - org.codehaus.logger - INFO - Processing - run - 979 - end run - - - 2003-12-15T20:35:38 - 1071538538962 - 5027 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:35:38 - 1071538538963 - 5028 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:36:09 - 1071538569132 - 5029 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1602962771 - - - - 2003-12-15T20:36:09 - 1071538569134 - 5030 - org.codehaus.logger - INFO - Processing - run - 980 - start run - - - 2003-12-15T20:36:09 - 1071538569134 - 5031 - org.codehaus.logger - INFO - Processing - run - 980 - end run - - - 2003-12-15T20:36:09 - 1071538569134 - 5032 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:36:09 - 1071538569135 - 5033 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:36:39 - 1071538599341 - 5034 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1633132197 - - - - 2003-12-15T20:36:39 - 1071538599342 - 5035 - org.codehaus.logger - INFO - Processing - run - 981 - start run - - - 2003-12-15T20:36:39 - 1071538599342 - 5036 - org.codehaus.logger - INFO - Processing - run - 981 - end run - - - 2003-12-15T20:36:39 - 1071538599343 - 5037 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:36:39 - 1071538599762 - 5038 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:37:09 - 1071538629482 - 5039 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1663272314 - - - - 2003-12-15T20:37:09 - 1071538629482 - 5040 - org.codehaus.logger - INFO - Processing - run - 982 - start run - - - 2003-12-15T20:37:09 - 1071538629482 - 5041 - org.codehaus.logger - INFO - Processing - run - 982 - end run - - - 2003-12-15T20:37:09 - 1071538629483 - 5042 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:37:09 - 1071538629483 - 5043 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:37:39 - 1071538659622 - 5044 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1693422430 - - - - 2003-12-15T20:37:39 - 1071538659623 - 5045 - org.codehaus.logger - INFO - Processing - run - 983 - start run - - - 2003-12-15T20:37:39 - 1071538659623 - 5046 - org.codehaus.logger - INFO - Processing - run - 983 - end run - - - 2003-12-15T20:37:39 - 1071538659624 - 5047 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:37:39 - 1071538659624 - 5048 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:38:09 - 1071538689742 - 5049 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1723572540 - - - - 2003-12-15T20:38:09 - 1071538689743 - 5050 - org.codehaus.logger - INFO - Processing - run - 984 - start run - - - 2003-12-15T20:38:09 - 1071538689744 - 5051 - org.codehaus.logger - INFO - Processing - run - 984 - end run - - - 2003-12-15T20:38:09 - 1071538689744 - 5052 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:38:09 - 1071538689744 - 5053 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:38:39 - 1071538719942 - 5054 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1753722660 - - - - 2003-12-15T20:38:39 - 1071538719942 - 5055 - org.codehaus.logger - INFO - Processing - run - 985 - start run - - - 2003-12-15T20:38:39 - 1071538719943 - 5056 - org.codehaus.logger - INFO - Processing - run - 985 - end run - - - 2003-12-15T20:38:39 - 1071538719943 - 5057 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:38:39 - 1071538719943 - 5058 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:39:10 - 1071538750062 - 5059 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1783872779 - - - - 2003-12-15T20:39:10 - 1071538750063 - 5060 - org.codehaus.logger - INFO - Processing - run - 986 - start run - - - 2003-12-15T20:39:10 - 1071538750064 - 5061 - org.codehaus.logger - INFO - Processing - run - 986 - end run - - - 2003-12-15T20:39:10 - 1071538750064 - 5062 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:39:10 - 1071538750064 - 5063 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:39:40 - 1071538780243 - 5064 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1814042892 - - - - 2003-12-15T20:39:40 - 1071538780243 - 5065 - org.codehaus.logger - INFO - Processing - run - 987 - start run - - - 2003-12-15T20:39:40 - 1071538780244 - 5066 - org.codehaus.logger - INFO - Processing - run - 987 - end run - - - 2003-12-15T20:39:40 - 1071538780244 - 5067 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:39:40 - 1071538780245 - 5068 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:39:42 - 1071538782152 - 5069 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T20:39:42 - 1071538782154 - 5070 - org.codehaus.logger - INFO - Processing - run - 988 - start run - - - 2003-12-15T20:39:42 - 1071538782154 - 5071 - org.codehaus.logger - INFO - Processing - run - 988 - end run - - - 2003-12-15T20:39:42 - 1071538782154 - 5072 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T20:39:42 - 1071538782154 - 5073 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T20:40:10 - 1071538810392 - 5074 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1844223008 - - - - 2003-12-15T20:40:10 - 1071538810393 - 5075 - org.codehaus.logger - INFO - Processing - run - 989 - start run - - - 2003-12-15T20:40:10 - 1071538810393 - 5076 - org.codehaus.logger - INFO - Processing - run - 989 - end run - - - 2003-12-15T20:40:10 - 1071538810395 - 5077 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:40:10 - 1071538810395 - 5078 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:40:40 - 1071538840572 - 5079 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1874393120 - - - - 2003-12-15T20:40:40 - 1071538840573 - 5080 - org.codehaus.logger - INFO - Processing - run - 990 - start run - - - 2003-12-15T20:40:40 - 1071538840574 - 5081 - org.codehaus.logger - INFO - Processing - run - 990 - end run - - - 2003-12-15T20:40:40 - 1071538840575 - 5082 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:40:40 - 1071538840575 - 5083 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:41:10 - 1071538870762 - 5084 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1904573246 - - - - 2003-12-15T20:41:10 - 1071538870763 - 5085 - org.codehaus.logger - INFO - Processing - run - 991 - start run - - - 2003-12-15T20:41:10 - 1071538870763 - 5086 - org.codehaus.logger - INFO - Processing - run - 991 - end run - - - 2003-12-15T20:41:10 - 1071538870764 - 5087 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:41:10 - 1071538870764 - 5088 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:41:40 - 1071538900973 - 5089 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1934763364 - - - - 2003-12-15T20:41:40 - 1071538900973 - 5090 - org.codehaus.logger - INFO - Processing - run - 992 - start run - - - 2003-12-15T20:41:40 - 1071538900974 - 5091 - org.codehaus.logger - INFO - Processing - run - 992 - end run - - - 2003-12-15T20:41:40 - 1071538900974 - 5092 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:41:40 - 1071538900974 - 5093 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:42:11 - 1071538931183 - 5094 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1964953560 - - - - 2003-12-15T20:42:11 - 1071538931183 - 5095 - org.codehaus.logger - INFO - Processing - run - 993 - start run - - - 2003-12-15T20:42:11 - 1071538931184 - 5096 - org.codehaus.logger - INFO - Processing - run - 993 - end run - - - 2003-12-15T20:42:11 - 1071538931184 - 5097 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:42:11 - 1071538931184 - 5098 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:42:41 - 1071538961313 - 5099 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1995123609 - - - - 2003-12-15T20:42:41 - 1071538961314 - 5100 - org.codehaus.logger - INFO - Processing - run - 994 - start run - - - 2003-12-15T20:42:41 - 1071538961315 - 5101 - org.codehaus.logger - INFO - Processing - run - 994 - end run - - - 2003-12-15T20:42:41 - 1071538961315 - 5102 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:42:41 - 1071538961315 - 5103 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:43:11 - 1071538991453 - 5104 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2025273730 - - - - 2003-12-15T20:43:11 - 1071538991454 - 5105 - org.codehaus.logger - INFO - Processing - run - 995 - start run - - - 2003-12-15T20:43:11 - 1071538991454 - 5106 - org.codehaus.logger - INFO - Processing - run - 995 - end run - - - 2003-12-15T20:43:11 - 1071538991455 - 5107 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:43:11 - 1071538991455 - 5108 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:43:41 - 1071539021593 - 5109 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2055423877 - - - - 2003-12-15T20:43:41 - 1071539021595 - 5110 - org.codehaus.logger - INFO - Processing - run - 996 - start run - - - 2003-12-15T20:43:41 - 1071539021595 - 5111 - org.codehaus.logger - INFO - Processing - run - 996 - end run - - - 2003-12-15T20:43:41 - 1071539021596 - 5112 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:43:41 - 1071539021596 - 5113 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:44:11 - 1071539051753 - 5114 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2085564055 - - - - 2003-12-15T20:44:11 - 1071539051754 - 5115 - org.codehaus.logger - INFO - Processing - run - 997 - start run - - - 2003-12-15T20:44:11 - 1071539051755 - 5116 - org.codehaus.logger - INFO - Processing - run - 997 - end run - - - 2003-12-15T20:44:11 - 1071539051756 - 5117 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:44:11 - 1071539051756 - 5118 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:44:41 - 1071539081913 - 5119 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2115714113 - - - - 2003-12-15T20:44:41 - 1071539081914 - 5120 - org.codehaus.logger - INFO - Processing - run - 998 - start run - - - 2003-12-15T20:44:41 - 1071539081914 - 5121 - org.codehaus.logger - INFO - Processing - run - 998 - end run - - - 2003-12-15T20:44:41 - 1071539081914 - 5122 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:44:41 - 1071539081914 - 5123 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:44:42 - 1071539082073 - 5124 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T20:44:42 - 1071539082074 - 5125 - org.codehaus.logger - INFO - Processing - run - 999 - start run - - - 2003-12-15T20:44:42 - 1071539082075 - 5126 - org.codehaus.logger - INFO - Processing - run - 999 - end run - - - 2003-12-15T20:44:42 - 1071539082075 - 5127 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T20:44:42 - 1071539082075 - 5128 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T20:45:12 - 1071539112114 - 5129 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2145944229 - - - - 2003-12-15T20:45:12 - 1071539112115 - 5130 - org.codehaus.logger - INFO - Processing - run - 1000 - start run - - - 2003-12-15T20:45:12 - 1071539112115 - 5131 - org.codehaus.logger - INFO - Processing - run - 1000 - end run - - - 2003-12-15T20:45:12 - 1071539112116 - 5132 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:45:12 - 1071539112116 - 5133 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:45:42 - 1071539142284 - 5134 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2176094358 - - - - 2003-12-15T20:45:42 - 1071539142284 - 5135 - org.codehaus.logger - INFO - Processing - run - 1001 - start run - - - 2003-12-15T20:45:42 - 1071539142284 - 5136 - org.codehaus.logger - INFO - Processing - run - 1001 - end run - - - 2003-12-15T20:45:42 - 1071539142285 - 5137 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:45:42 - 1071539142285 - 5138 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:46:12 - 1071539172474 - 5139 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2206294466 - - - - 2003-12-15T20:46:12 - 1071539172474 - 5140 - org.codehaus.logger - INFO - Processing - run - 1002 - start run - - - 2003-12-15T20:46:12 - 1071539172474 - 5141 - org.codehaus.logger - INFO - Processing - run - 1002 - end run - - - 2003-12-15T20:46:12 - 1071539172475 - 5142 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:46:12 - 1071539172475 - 5143 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:46:42 - 1071539202624 - 5144 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2236434587 - - - - 2003-12-15T20:46:42 - 1071539202624 - 5145 - org.codehaus.logger - INFO - Processing - run - 1003 - start run - - - 2003-12-15T20:46:42 - 1071539202625 - 5146 - org.codehaus.logger - INFO - Processing - run - 1003 - end run - - - 2003-12-15T20:46:42 - 1071539202625 - 5147 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:46:42 - 1071539202625 - 5148 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:47:12 - 1071539232764 - 5149 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2266584602 - - - - 2003-12-15T20:47:12 - 1071539232765 - 5150 - org.codehaus.logger - INFO - Processing - run - 1004 - start run - - - 2003-12-15T20:47:12 - 1071539232765 - 5151 - org.codehaus.logger - INFO - Processing - run - 1004 - end run - - - 2003-12-15T20:47:12 - 1071539232766 - 5152 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:47:12 - 1071539232766 - 5153 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:47:42 - 1071539262924 - 5154 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2296754622 - - - - 2003-12-15T20:47:42 - 1071539262925 - 5155 - org.codehaus.logger - INFO - Processing - run - 1005 - start run - - - 2003-12-15T20:47:42 - 1071539262926 - 5156 - org.codehaus.logger - INFO - Processing - run - 1005 - end run - - - 2003-12-15T20:47:42 - 1071539262927 - 5157 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:47:42 - 1071539262927 - 5158 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:48:13 - 1071539293164 - 5159 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2326944683 - - - - 2003-12-15T20:48:13 - 1071539293165 - 5160 - org.codehaus.logger - INFO - Processing - run - 1006 - start run - - - 2003-12-15T20:48:13 - 1071539293166 - 5161 - org.codehaus.logger - INFO - Processing - run - 1006 - end run - - - 2003-12-15T20:48:13 - 1071539293166 - 5162 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:48:13 - 1071539293166 - 5163 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:48:43 - 1071539323304 - 5164 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2357094752 - - - - 2003-12-15T20:48:43 - 1071539323305 - 5165 - org.codehaus.logger - INFO - Processing - run - 1007 - start run - - - 2003-12-15T20:48:43 - 1071539323305 - 5166 - org.codehaus.logger - INFO - Processing - run - 1007 - end run - - - 2003-12-15T20:48:43 - 1071539323306 - 5167 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:48:43 - 1071539323306 - 5168 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:49:13 - 1071539353464 - 5169 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2387264802 - - - - 2003-12-15T20:49:13 - 1071539353465 - 5170 - org.codehaus.logger - INFO - Processing - run - 1008 - start run - - - 2003-12-15T20:49:13 - 1071539353465 - 5171 - org.codehaus.logger - INFO - Processing - run - 1008 - end run - - - 2003-12-15T20:49:13 - 1071539353466 - 5172 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:49:13 - 1071539353466 - 5173 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:49:41 - 1071539381954 - 5174 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T20:49:41 - 1071539381955 - 5175 - org.codehaus.logger - INFO - Processing - run - 1009 - start run - - - 2003-12-15T20:49:41 - 1071539381955 - 5176 - org.codehaus.logger - INFO - Processing - run - 1009 - end run - - - 2003-12-15T20:49:41 - 1071539381955 - 5177 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T20:49:41 - 1071539381955 - 5178 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T20:49:43 - 1071539383624 - 5179 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2417404855 - - - - 2003-12-15T20:49:43 - 1071539383625 - 5180 - org.codehaus.logger - INFO - Processing - run - 1010 - start run - - - 2003-12-15T20:49:43 - 1071539383625 - 5181 - org.codehaus.logger - INFO - Processing - run - 1010 - end run - - - 2003-12-15T20:49:43 - 1071539383626 - 5182 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:49:43 - 1071539383626 - 5183 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:50:13 - 1071539413764 - 5184 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2447544976 - - - - 2003-12-15T20:50:13 - 1071539413765 - 5185 - org.codehaus.logger - INFO - Processing - run - 1011 - start run - - - 2003-12-15T20:50:13 - 1071539413765 - 5186 - org.codehaus.logger - INFO - Processing - run - 1011 - end run - - - 2003-12-15T20:50:13 - 1071539413765 - 5187 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:50:13 - 1071539413765 - 5188 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:50:43 - 1071539443924 - 5189 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2477705043 - - - - 2003-12-15T20:50:43 - 1071539443925 - 5190 - org.codehaus.logger - INFO - Processing - run - 1012 - start run - - - 2003-12-15T20:50:43 - 1071539443926 - 5191 - org.codehaus.logger - INFO - Processing - run - 1012 - end run - - - 2003-12-15T20:50:43 - 1071539443926 - 5192 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:50:43 - 1071539443926 - 5193 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:51:14 - 1071539474104 - 5194 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2507905028 - - - - 2003-12-15T20:51:14 - 1071539474128 - 5195 - org.codehaus.logger - INFO - Processing - run - 1013 - start run - - - 2003-12-15T20:51:14 - 1071539474129 - 5196 - org.codehaus.logger - INFO - Processing - run - 1013 - end run - - - 2003-12-15T20:51:14 - 1071539474129 - 5197 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:51:14 - 1071539474129 - 5198 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:51:44 - 1071539504254 - 5199 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2538065092 - - - - 2003-12-15T20:51:44 - 1071539504255 - 5200 - org.codehaus.logger - INFO - Processing - run - 1014 - start run - - - 2003-12-15T20:51:44 - 1071539504255 - 5201 - org.codehaus.logger - INFO - Processing - run - 1014 - end run - - - 2003-12-15T20:51:44 - 1071539504256 - 5202 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:51:44 - 1071539504256 - 5203 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:52:14 - 1071539534434 - 5204 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2568215181 - - - - 2003-12-15T20:52:14 - 1071539534435 - 5205 - org.codehaus.logger - INFO - Processing - run - 1015 - start run - - - 2003-12-15T20:52:14 - 1071539534436 - 5206 - org.codehaus.logger - INFO - Processing - run - 1015 - end run - - - 2003-12-15T20:52:14 - 1071539534436 - 5207 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:52:14 - 1071539534437 - 5208 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:52:44 - 1071539564574 - 5209 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2598365221 - - - - 2003-12-15T20:52:44 - 1071539564575 - 5210 - org.codehaus.logger - INFO - Processing - run - 1016 - start run - - - 2003-12-15T20:52:44 - 1071539564575 - 5211 - org.codehaus.logger - INFO - Processing - run - 1016 - end run - - - 2003-12-15T20:52:44 - 1071539564576 - 5212 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:52:44 - 1071539564576 - 5213 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:53:14 - 1071539594695 - 5214 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2628505293 - - - - 2003-12-15T20:53:14 - 1071539594695 - 5215 - org.codehaus.logger - INFO - Processing - run - 1017 - start run - - - 2003-12-15T20:53:14 - 1071539594695 - 5216 - org.codehaus.logger - INFO - Processing - run - 1017 - end run - - - 2003-12-15T20:53:14 - 1071539594696 - 5217 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:53:14 - 1071539594696 - 5218 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:53:44 - 1071539624845 - 5219 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2658655360 - - - - 2003-12-15T20:53:44 - 1071539624846 - 5220 - org.codehaus.logger - INFO - Processing - run - 1018 - start run - - - 2003-12-15T20:53:44 - 1071539624846 - 5221 - org.codehaus.logger - INFO - Processing - run - 1018 - end run - - - 2003-12-15T20:53:44 - 1071539624847 - 5222 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:53:44 - 1071539624847 - 5223 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:54:15 - 1071539655015 - 5224 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2688805426 - - - - 2003-12-15T20:54:15 - 1071539655016 - 5225 - org.codehaus.logger - INFO - Processing - run - 1019 - start run - - - 2003-12-15T20:54:15 - 1071539655016 - 5226 - org.codehaus.logger - INFO - Processing - run - 1019 - end run - - - 2003-12-15T20:54:15 - 1071539655017 - 5227 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:54:15 - 1071539655017 - 5228 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:54:42 - 1071539682205 - 5229 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T20:54:42 - 1071539682205 - 5230 - org.codehaus.logger - INFO - Processing - run - 1020 - start run - - - 2003-12-15T20:54:42 - 1071539682206 - 5231 - org.codehaus.logger - INFO - Processing - run - 1020 - end run - - - 2003-12-15T20:54:42 - 1071539682206 - 5232 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T20:54:42 - 1071539682206 - 5233 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T20:54:45 - 1071539685165 - 5234 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2718965500 - - - - 2003-12-15T20:54:45 - 1071539685167 - 5235 - org.codehaus.logger - INFO - Processing - run - 1021 - start run - - - 2003-12-15T20:54:45 - 1071539685168 - 5236 - org.codehaus.logger - INFO - Processing - run - 1021 - end run - - - 2003-12-15T20:54:45 - 1071539685168 - 5237 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:54:45 - 1071539685168 - 5238 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:55:15 - 1071539715335 - 5239 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2749115568 - - - - 2003-12-15T20:55:15 - 1071539715336 - 5240 - org.codehaus.logger - INFO - Processing - run - 1022 - start run - - - 2003-12-15T20:55:15 - 1071539715336 - 5241 - org.codehaus.logger - INFO - Processing - run - 1022 - end run - - - 2003-12-15T20:55:15 - 1071539715337 - 5242 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:55:15 - 1071539715337 - 5243 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:55:45 - 1071539745575 - 5244 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2779355645 - - - - 2003-12-15T20:55:45 - 1071539745575 - 5245 - org.codehaus.logger - INFO - Processing - run - 1023 - start run - - - 2003-12-15T20:55:45 - 1071539745576 - 5246 - org.codehaus.logger - INFO - Processing - run - 1023 - end run - - - 2003-12-15T20:55:45 - 1071539745576 - 5247 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:55:45 - 1071539745576 - 5248 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:56:15 - 1071539775755 - 5249 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2809526164 - - - - 2003-12-15T20:56:15 - 1071539775756 - 5250 - org.codehaus.logger - INFO - Processing - run - 1024 - start run - - - 2003-12-15T20:56:15 - 1071539775756 - 5251 - org.codehaus.logger - INFO - Processing - run - 1024 - end run - - - 2003-12-15T20:56:15 - 1071539775757 - 5252 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:56:15 - 1071539775757 - 5253 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:56:45 - 1071539805875 - 5254 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2839675795 - - - - 2003-12-15T20:56:45 - 1071539805876 - 5255 - org.codehaus.logger - INFO - Processing - run - 1025 - start run - - - 2003-12-15T20:56:45 - 1071539805876 - 5256 - org.codehaus.logger - INFO - Processing - run - 1025 - end run - - - 2003-12-15T20:56:45 - 1071539805876 - 5257 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:56:45 - 1071539805876 - 5258 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:57:15 - 1071539835995 - 5259 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2869815886 - - - - 2003-12-15T20:57:15 - 1071539835996 - 5260 - org.codehaus.logger - INFO - Processing - run - 1026 - start run - - - 2003-12-15T20:57:15 - 1071539835996 - 5261 - org.codehaus.logger - INFO - Processing - run - 1026 - end run - - - 2003-12-15T20:57:15 - 1071539835996 - 5262 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:57:15 - 1071539835996 - 5263 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:57:46 - 1071539866195 - 5264 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2899985933 - - - - 2003-12-15T20:57:46 - 1071539866196 - 5265 - org.codehaus.logger - INFO - Processing - run - 1027 - start run - - - 2003-12-15T20:57:46 - 1071539866196 - 5266 - org.codehaus.logger - INFO - Processing - run - 1027 - end run - - - 2003-12-15T20:57:46 - 1071539866196 - 5267 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:57:46 - 1071539866196 - 5268 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:58:16 - 1071539896345 - 5269 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2930126092 - - - - 2003-12-15T20:58:16 - 1071539896346 - 5270 - org.codehaus.logger - INFO - Processing - run - 1028 - start run - - - 2003-12-15T20:58:16 - 1071539896346 - 5271 - org.codehaus.logger - INFO - Processing - run - 1028 - end run - - - 2003-12-15T20:58:16 - 1071539896346 - 5272 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:58:16 - 1071539896346 - 5273 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:58:46 - 1071539926457 - 5274 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2960276089 - - - - 2003-12-15T20:58:46 - 1071539926458 - 5275 - org.codehaus.logger - INFO - Processing - run - 1029 - start run - - - 2003-12-15T20:58:46 - 1071539926458 - 5276 - org.codehaus.logger - INFO - Processing - run - 1029 - end run - - - 2003-12-15T20:58:46 - 1071539926458 - 5277 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:58:46 - 1071539926458 - 5278 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:59:16 - 1071539956615 - 5279 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2990426170 - - - - 2003-12-15T20:59:16 - 1071539956616 - 5280 - org.codehaus.logger - INFO - Processing - run - 1030 - start run - - - 2003-12-15T20:59:16 - 1071539956616 - 5281 - org.codehaus.logger - INFO - Processing - run - 1030 - end run - - - 2003-12-15T20:59:16 - 1071539956617 - 5282 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:59:16 - 1071539956617 - 5283 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T20:59:42 - 1071539982026 - 5284 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T20:59:42 - 1071539982027 - 5285 - org.codehaus.logger - INFO - Processing - run - 1031 - start run - - - 2003-12-15T20:59:42 - 1071539982027 - 5286 - org.codehaus.logger - INFO - Processing - run - 1031 - end run - - - 2003-12-15T20:59:42 - 1071539982028 - 5287 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T20:59:42 - 1071539982028 - 5288 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T20:59:46 - 1071539986775 - 5289 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3020576252 - - - - 2003-12-15T20:59:46 - 1071539986776 - 5290 - org.codehaus.logger - INFO - Processing - run - 1032 - start run - - - 2003-12-15T20:59:46 - 1071539986776 - 5291 - org.codehaus.logger - INFO - Processing - run - 1032 - end run - - - 2003-12-15T20:59:46 - 1071539986776 - 5292 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T20:59:46 - 1071539986777 - 5293 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:00:16 - 1071540016936 - 5294 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3050716336 - - - - 2003-12-15T21:00:16 - 1071540016936 - 5295 - org.codehaus.logger - INFO - Processing - run - 1033 - start run - - - 2003-12-15T21:00:16 - 1071540016936 - 5296 - org.codehaus.logger - INFO - Processing - run - 1033 - end run - - - 2003-12-15T21:00:16 - 1071540016937 - 5297 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:00:16 - 1071540016937 - 5298 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:00:47 - 1071540047076 - 5299 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3080856422 - - - - 2003-12-15T21:00:47 - 1071540047077 - 5300 - org.codehaus.logger - INFO - Processing - run - 1034 - start run - - - 2003-12-15T21:00:47 - 1071540047077 - 5301 - org.codehaus.logger - INFO - Processing - run - 1034 - end run - - - 2003-12-15T21:00:47 - 1071540047078 - 5302 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:00:47 - 1071540047078 - 5303 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:01:17 - 1071540077226 - 5304 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3111006531 - - - - 2003-12-15T21:01:17 - 1071540077226 - 5305 - org.codehaus.logger - INFO - Processing - run - 1035 - start run - - - 2003-12-15T21:01:17 - 1071540077227 - 5306 - org.codehaus.logger - INFO - Processing - run - 1035 - end run - - - 2003-12-15T21:01:17 - 1071540077227 - 5307 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:01:17 - 1071540077227 - 5308 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:01:47 - 1071540107356 - 5309 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3141166584 - - - - 2003-12-15T21:01:47 - 1071540107357 - 5310 - org.codehaus.logger - INFO - Processing - run - 1036 - start run - - - 2003-12-15T21:01:47 - 1071540107357 - 5311 - org.codehaus.logger - INFO - Processing - run - 1036 - end run - - - 2003-12-15T21:01:47 - 1071540107358 - 5312 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:01:47 - 1071540107359 - 5313 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:02:17 - 1071540137546 - 5314 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3171326667 - - - - 2003-12-15T21:02:17 - 1071540137546 - 5315 - org.codehaus.logger - INFO - Processing - run - 1037 - start run - - - 2003-12-15T21:02:17 - 1071540137547 - 5316 - org.codehaus.logger - INFO - Processing - run - 1037 - end run - - - 2003-12-15T21:02:17 - 1071540137547 - 5317 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:02:17 - 1071540137547 - 5318 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:02:47 - 1071540167656 - 5319 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3201487059 - - - - 2003-12-15T21:02:47 - 1071540167658 - 5320 - org.codehaus.logger - INFO - Processing - run - 1038 - start run - - - 2003-12-15T21:02:47 - 1071540167658 - 5321 - org.codehaus.logger - INFO - Processing - run - 1038 - end run - - - 2003-12-15T21:02:47 - 1071540167658 - 5322 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:02:47 - 1071540167658 - 5323 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:03:17 - 1071540197866 - 5324 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3231646845 - - - - 2003-12-15T21:03:17 - 1071540197867 - 5325 - org.codehaus.logger - INFO - Processing - run - 1039 - start run - - - 2003-12-15T21:03:17 - 1071540197867 - 5326 - org.codehaus.logger - INFO - Processing - run - 1039 - end run - - - 2003-12-15T21:03:17 - 1071540197867 - 5327 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:03:17 - 1071540197868 - 5328 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:03:47 - 1071540227966 - 5329 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3261786857 - - - - 2003-12-15T21:03:47 - 1071540227967 - 5330 - org.codehaus.logger - INFO - Processing - run - 1040 - start run - - - 2003-12-15T21:03:47 - 1071540227967 - 5331 - org.codehaus.logger - INFO - Processing - run - 1040 - end run - - - 2003-12-15T21:03:47 - 1071540227968 - 5332 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:03:47 - 1071540227968 - 5333 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:04:18 - 1071540258126 - 5334 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3291956747 - - - - 2003-12-15T21:04:18 - 1071540258127 - 5335 - org.codehaus.logger - INFO - Processing - run - 1041 - start run - - - 2003-12-15T21:04:18 - 1071540258128 - 5336 - org.codehaus.logger - INFO - Processing - run - 1041 - end run - - - 2003-12-15T21:04:18 - 1071540258128 - 5337 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:04:18 - 1071540258128 - 5338 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:04:42 - 1071540282016 - 5339 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T21:04:42 - 1071540282016 - 5340 - org.codehaus.logger - INFO - Processing - run - 1042 - start run - - - 2003-12-15T21:04:42 - 1071540282017 - 5341 - org.codehaus.logger - INFO - Processing - run - 1042 - end run - - - 2003-12-15T21:04:42 - 1071540282017 - 5342 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T21:04:42 - 1071540282017 - 5343 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T21:04:48 - 1071540288326 - 5344 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3322146759 - - - - 2003-12-15T21:04:48 - 1071540288327 - 5345 - org.codehaus.logger - INFO - Processing - run - 1043 - start run - - - 2003-12-15T21:04:48 - 1071540288327 - 5346 - org.codehaus.logger - INFO - Processing - run - 1043 - end run - - - 2003-12-15T21:04:48 - 1071540288328 - 5347 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:04:48 - 1071540288328 - 5348 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:05:18 - 1071540318516 - 5349 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3352316644 - - - - 2003-12-15T21:05:18 - 1071540318518 - 5350 - org.codehaus.logger - INFO - Processing - run - 1044 - start run - - - 2003-12-15T21:05:18 - 1071540318518 - 5351 - org.codehaus.logger - INFO - Processing - run - 1044 - end run - - - 2003-12-15T21:05:18 - 1071540318652 - 5352 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:05:18 - 1071540318652 - 5353 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:05:48 - 1071540348656 - 5354 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3382466618 - - - - 2003-12-15T21:05:48 - 1071540348656 - 5355 - org.codehaus.logger - INFO - Processing - run - 1045 - start run - - - 2003-12-15T21:05:48 - 1071540348657 - 5356 - org.codehaus.logger - INFO - Processing - run - 1045 - end run - - - 2003-12-15T21:05:48 - 1071540348657 - 5357 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:05:48 - 1071540348657 - 5358 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:06:18 - 1071540378826 - 5359 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3412616571 - - - - 2003-12-15T21:06:18 - 1071540378827 - 5360 - org.codehaus.logger - INFO - Processing - run - 1046 - start run - - - 2003-12-15T21:06:18 - 1071540378827 - 5361 - org.codehaus.logger - INFO - Processing - run - 1046 - end run - - - 2003-12-15T21:06:18 - 1071540378827 - 5362 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:06:18 - 1071540378828 - 5363 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:06:48 - 1071540408936 - 5364 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3442766534 - - - - 2003-12-15T21:06:48 - 1071540408937 - 5365 - org.codehaus.logger - INFO - Processing - run - 1047 - start run - - - 2003-12-15T21:06:48 - 1071540408937 - 5366 - org.codehaus.logger - INFO - Processing - run - 1047 - end run - - - 2003-12-15T21:06:48 - 1071540408938 - 5367 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:06:48 - 1071540408938 - 5368 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:07:19 - 1071540439096 - 5369 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3472916499 - - - - 2003-12-15T21:07:19 - 1071540439096 - 5370 - org.codehaus.logger - INFO - Processing - run - 1048 - start run - - - 2003-12-15T21:07:19 - 1071540439097 - 5371 - org.codehaus.logger - INFO - Processing - run - 1048 - end run - - - 2003-12-15T21:07:19 - 1071540439097 - 5372 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:07:19 - 1071540439097 - 5373 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:07:49 - 1071540469316 - 5374 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3503116470 - - - - 2003-12-15T21:07:49 - 1071540469316 - 5375 - org.codehaus.logger - INFO - Processing - run - 1049 - start run - - - 2003-12-15T21:07:49 - 1071540469316 - 5376 - org.codehaus.logger - INFO - Processing - run - 1049 - end run - - - 2003-12-15T21:07:49 - 1071540469317 - 5377 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:07:49 - 1071540469317 - 5378 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:08:19 - 1071540499446 - 5379 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3533276445 - - - - 2003-12-15T21:08:19 - 1071540499447 - 5380 - org.codehaus.logger - INFO - Processing - run - 1050 - start run - - - 2003-12-15T21:08:19 - 1071540499447 - 5381 - org.codehaus.logger - INFO - Processing - run - 1050 - end run - - - 2003-12-15T21:08:19 - 1071540499448 - 5382 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:08:19 - 1071540499448 - 5383 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:08:49 - 1071540529636 - 5384 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3563426551 - - - - 2003-12-15T21:08:49 - 1071540529636 - 5385 - org.codehaus.logger - INFO - Processing - run - 1051 - start run - - - 2003-12-15T21:08:49 - 1071540529636 - 5386 - org.codehaus.logger - INFO - Processing - run - 1051 - end run - - - 2003-12-15T21:08:49 - 1071540529637 - 5387 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:08:49 - 1071540529637 - 5388 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:09:19 - 1071540559746 - 5389 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3593566382 - - - - 2003-12-15T21:09:19 - 1071540559746 - 5390 - org.codehaus.logger - INFO - Processing - run - 1052 - start run - - - 2003-12-15T21:09:19 - 1071540559748 - 5391 - org.codehaus.logger - INFO - Processing - run - 1052 - end run - - - 2003-12-15T21:09:19 - 1071540559748 - 5392 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:09:19 - 1071540559748 - 5393 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:09:41 - 1071540581966 - 5394 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T21:09:41 - 1071540581966 - 5395 - org.codehaus.logger - INFO - Processing - run - 1053 - start run - - - 2003-12-15T21:09:41 - 1071540581967 - 5396 - org.codehaus.logger - INFO - Processing - run - 1053 - end run - - - 2003-12-15T21:09:41 - 1071540581967 - 5397 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T21:09:41 - 1071540581967 - 5398 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T21:09:49 - 1071540589926 - 5399 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3623716365 - - - - 2003-12-15T21:09:49 - 1071540589926 - 5400 - org.codehaus.logger - INFO - Processing - run - 1054 - start run - - - 2003-12-15T21:09:49 - 1071540589926 - 5401 - org.codehaus.logger - INFO - Processing - run - 1054 - end run - - - 2003-12-15T21:09:49 - 1071540589927 - 5402 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:09:49 - 1071540589927 - 5403 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:10:20 - 1071540620066 - 5404 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3653866334 - - - - 2003-12-15T21:10:20 - 1071540620067 - 5405 - org.codehaus.logger - INFO - Processing - run - 1055 - start run - - - 2003-12-15T21:10:20 - 1071540620067 - 5406 - org.codehaus.logger - INFO - Processing - run - 1055 - end run - - - 2003-12-15T21:10:20 - 1071540620067 - 5407 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:10:20 - 1071540620067 - 5408 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:10:50 - 1071540650196 - 5409 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3684016318 - - - - 2003-12-15T21:10:50 - 1071540650196 - 5410 - org.codehaus.logger - INFO - Processing - run - 1056 - start run - - - 2003-12-15T21:10:50 - 1071540650197 - 5411 - org.codehaus.logger - INFO - Processing - run - 1056 - end run - - - 2003-12-15T21:10:50 - 1071540650197 - 5412 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:10:50 - 1071540650197 - 5413 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:11:20 - 1071540680346 - 5414 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3714166296 - - - - 2003-12-15T21:11:20 - 1071540680347 - 5415 - org.codehaus.logger - INFO - Processing - run - 1057 - start run - - - 2003-12-15T21:11:20 - 1071540680347 - 5416 - org.codehaus.logger - INFO - Processing - run - 1057 - end run - - - 2003-12-15T21:11:20 - 1071540680348 - 5417 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:11:20 - 1071540680348 - 5418 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:11:50 - 1071540710536 - 5419 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3744356277 - - - - 2003-12-15T21:11:50 - 1071540710537 - 5420 - org.codehaus.logger - INFO - Processing - run - 1058 - start run - - - 2003-12-15T21:11:50 - 1071540710537 - 5421 - org.codehaus.logger - INFO - Processing - run - 1058 - end run - - - 2003-12-15T21:11:50 - 1071540710538 - 5422 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:11:50 - 1071540710538 - 5423 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:12:20 - 1071540740686 - 5424 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3774506263 - - - - 2003-12-15T21:12:20 - 1071540740687 - 5425 - org.codehaus.logger - INFO - Processing - run - 1059 - start run - - - 2003-12-15T21:12:20 - 1071540740687 - 5426 - org.codehaus.logger - INFO - Processing - run - 1059 - end run - - - 2003-12-15T21:12:20 - 1071540740687 - 5427 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:12:20 - 1071540740688 - 5428 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:12:50 - 1071540770865 - 5429 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3804656277 - - - - 2003-12-15T21:12:50 - 1071540770866 - 5430 - org.codehaus.logger - INFO - Processing - run - 1060 - start run - - - 2003-12-15T21:12:50 - 1071540770867 - 5431 - org.codehaus.logger - INFO - Processing - run - 1060 - end run - - - 2003-12-15T21:12:50 - 1071540770868 - 5432 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:12:50 - 1071540770868 - 5433 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:13:20 - 1071540800975 - 5434 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3834776232 - - - - 2003-12-15T21:13:20 - 1071540800976 - 5435 - org.codehaus.logger - INFO - Processing - run - 1061 - start run - - - 2003-12-15T21:13:20 - 1071540800976 - 5436 - org.codehaus.logger - INFO - Processing - run - 1061 - end run - - - 2003-12-15T21:13:20 - 1071540800977 - 5437 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:13:20 - 1071540800977 - 5438 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:13:51 - 1071540831136 - 5439 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3864936220 - - - - 2003-12-15T21:13:51 - 1071540831136 - 5440 - org.codehaus.logger - INFO - Processing - run - 1062 - start run - - - 2003-12-15T21:13:51 - 1071540831136 - 5441 - org.codehaus.logger - INFO - Processing - run - 1062 - end run - - - 2003-12-15T21:13:51 - 1071540831137 - 5442 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:13:51 - 1071540831137 - 5443 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:14:21 - 1071540861275 - 5444 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3895096213 - - - - 2003-12-15T21:14:21 - 1071540861276 - 5445 - org.codehaus.logger - INFO - Processing - run - 1063 - start run - - - 2003-12-15T21:14:21 - 1071540861276 - 5446 - org.codehaus.logger - INFO - Processing - run - 1063 - end run - - - 2003-12-15T21:14:21 - 1071540861276 - 5447 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:14:21 - 1071540861277 - 5448 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:14:41 - 1071540881965 - 5449 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T21:14:41 - 1071540881966 - 5450 - org.codehaus.logger - INFO - Processing - run - 1064 - start run - - - 2003-12-15T21:14:41 - 1071540881966 - 5451 - org.codehaus.logger - INFO - Processing - run - 1064 - end run - - - 2003-12-15T21:14:41 - 1071540881967 - 5452 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T21:14:41 - 1071540881967 - 5453 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T21:14:51 - 1071540891435 - 5454 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3925246210 - - - - 2003-12-15T21:14:51 - 1071540891436 - 5455 - org.codehaus.logger - INFO - Processing - run - 1065 - start run - - - 2003-12-15T21:14:51 - 1071540891436 - 5456 - org.codehaus.logger - INFO - Processing - run - 1065 - end run - - - 2003-12-15T21:14:51 - 1071540891437 - 5457 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:14:51 - 1071540891437 - 5458 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:15:21 - 1071540921556 - 5459 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3955386225 - - - - 2003-12-15T21:15:21 - 1071540921556 - 5460 - org.codehaus.logger - INFO - Processing - run - 1066 - start run - - - 2003-12-15T21:15:21 - 1071540921557 - 5461 - org.codehaus.logger - INFO - Processing - run - 1066 - end run - - - 2003-12-15T21:15:21 - 1071540921557 - 5462 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:15:21 - 1071540921557 - 5463 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:15:51 - 1071540951735 - 5464 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3985546202 - - - - 2003-12-15T21:15:51 - 1071540951736 - 5465 - org.codehaus.logger - INFO - Processing - run - 1067 - start run - - - 2003-12-15T21:15:51 - 1071540951737 - 5466 - org.codehaus.logger - INFO - Processing - run - 1067 - end run - - - 2003-12-15T21:15:51 - 1071540951737 - 5467 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:15:51 - 1071540951737 - 5468 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:16:21 - 1071540981865 - 5469 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4015666195 - - - - 2003-12-15T21:16:21 - 1071540981868 - 5470 - org.codehaus.logger - INFO - Processing - run - 1068 - start run - - - 2003-12-15T21:16:21 - 1071540981868 - 5471 - org.codehaus.logger - INFO - Processing - run - 1068 - end run - - - 2003-12-15T21:16:21 - 1071540981869 - 5472 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:16:21 - 1071540981869 - 5473 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:16:52 - 1071541012025 - 5474 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4045826195 - - - - 2003-12-15T21:16:52 - 1071541012026 - 5475 - org.codehaus.logger - INFO - Processing - run - 1069 - start run - - - 2003-12-15T21:16:52 - 1071541012027 - 5476 - org.codehaus.logger - INFO - Processing - run - 1069 - end run - - - 2003-12-15T21:16:52 - 1071541012028 - 5477 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:16:52 - 1071541012028 - 5478 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:17:22 - 1071541042275 - 5479 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4076086191 - - - - 2003-12-15T21:17:22 - 1071541042276 - 5480 - org.codehaus.logger - INFO - Processing - run - 1070 - start run - - - 2003-12-15T21:17:22 - 1071541042276 - 5481 - org.codehaus.logger - INFO - Processing - run - 1070 - end run - - - 2003-12-15T21:17:22 - 1071541042277 - 5482 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:17:22 - 1071541042277 - 5483 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:17:52 - 1071541072435 - 5484 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4106236224 - - - - 2003-12-15T21:17:52 - 1071541072436 - 5485 - org.codehaus.logger - INFO - Processing - run - 1071 - start run - - - 2003-12-15T21:17:52 - 1071541072436 - 5486 - org.codehaus.logger - INFO - Processing - run - 1071 - end run - - - 2003-12-15T21:17:52 - 1071541072437 - 5487 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:17:52 - 1071541072437 - 5488 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:18:22 - 1071541102546 - 5489 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4136376200 - - - - 2003-12-15T21:18:22 - 1071541102547 - 5490 - org.codehaus.logger - INFO - Processing - run - 1072 - start run - - - 2003-12-15T21:18:22 - 1071541102547 - 5491 - org.codehaus.logger - INFO - Processing - run - 1072 - end run - - - 2003-12-15T21:18:22 - 1071541102547 - 5492 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:18:22 - 1071541102547 - 5493 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:18:52 - 1071541132705 - 5494 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4166526205 - - - - 2003-12-15T21:18:52 - 1071541132706 - 5495 - org.codehaus.logger - INFO - Processing - run - 1073 - start run - - - 2003-12-15T21:18:52 - 1071541132706 - 5496 - org.codehaus.logger - INFO - Processing - run - 1073 - end run - - - 2003-12-15T21:18:52 - 1071541132707 - 5497 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:18:52 - 1071541132707 - 5498 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:19:22 - 1071541162846 - 5499 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4196676216 - - - - 2003-12-15T21:19:22 - 1071541162846 - 5500 - org.codehaus.logger - INFO - Processing - run - 1074 - start run - - - 2003-12-15T21:19:22 - 1071541162846 - 5501 - org.codehaus.logger - INFO - Processing - run - 1074 - end run - - - 2003-12-15T21:19:22 - 1071541162847 - 5502 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:19:22 - 1071541162847 - 5503 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:19:41 - 1071541181955 - 5504 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T21:19:41 - 1071541181956 - 5505 - org.codehaus.logger - INFO - Processing - run - 1075 - start run - - - 2003-12-15T21:19:41 - 1071541181956 - 5506 - org.codehaus.logger - INFO - Processing - run - 1075 - end run - - - 2003-12-15T21:19:41 - 1071541181957 - 5507 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T21:19:41 - 1071541181957 - 5508 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T21:19:53 - 1071541193035 - 5509 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4226826225 - - - - 2003-12-15T21:19:53 - 1071541193037 - 5510 - org.codehaus.logger - INFO - Processing - run - 1076 - start run - - - 2003-12-15T21:19:53 - 1071541193037 - 5511 - org.codehaus.logger - INFO - Processing - run - 1076 - end run - - - 2003-12-15T21:19:53 - 1071541193038 - 5512 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:19:53 - 1071541193038 - 5513 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:20:23 - 1071541223195 - 5514 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4256996278 - - - - 2003-12-15T21:20:23 - 1071541223196 - 5515 - org.codehaus.logger - INFO - Processing - run - 1077 - start run - - - 2003-12-15T21:20:23 - 1071541223196 - 5516 - org.codehaus.logger - INFO - Processing - run - 1077 - end run - - - 2003-12-15T21:20:23 - 1071541223197 - 5517 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:20:23 - 1071541223197 - 5518 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:20:53 - 1071541253355 - 5519 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4287146199 - - - - 2003-12-15T21:20:53 - 1071541253356 - 5520 - org.codehaus.logger - INFO - Processing - run - 1078 - start run - - - 2003-12-15T21:20:53 - 1071541253356 - 5521 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:20:53 - 1071541253357 - 5522 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:20:53 - 1071541253357 - 5523 - org.codehaus.logger - INFO - Processing - run - 1078 - end run - - - 2003-12-15T21:21:23 - 1071541283475 - 5524 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG22328879 - - - - 2003-12-15T21:21:23 - 1071541283476 - 5525 - org.codehaus.logger - INFO - Processing - run - 1079 - start run - - - 2003-12-15T21:21:23 - 1071541283476 - 5526 - org.codehaus.logger - INFO - Processing - run - 1079 - end run - - - 2003-12-15T21:21:23 - 1071541283477 - 5527 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:21:23 - 1071541283477 - 5528 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:21:53 - 1071541313635 - 5529 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG52458855 - - - - 2003-12-15T21:21:53 - 1071541313636 - 5530 - org.codehaus.logger - INFO - Processing - run - 1080 - start run - - - 2003-12-15T21:21:53 - 1071541313636 - 5531 - org.codehaus.logger - INFO - Processing - run - 1080 - end run - - - 2003-12-15T21:21:53 - 1071541313637 - 5532 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:21:53 - 1071541313637 - 5533 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:22:23 - 1071541343735 - 5534 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG82598837 - - - - 2003-12-15T21:22:23 - 1071541343736 - 5535 - org.codehaus.logger - INFO - Processing - run - 1081 - start run - - - 2003-12-15T21:22:23 - 1071541343737 - 5536 - org.codehaus.logger - INFO - Processing - run - 1081 - end run - - - 2003-12-15T21:22:23 - 1071541343737 - 5537 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:22:23 - 1071541343737 - 5538 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:22:53 - 1071541373905 - 5539 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG112768802 - - - - 2003-12-15T21:22:53 - 1071541373906 - 5540 - org.codehaus.logger - INFO - Processing - run - 1082 - start run - - - 2003-12-15T21:22:53 - 1071541373906 - 5541 - org.codehaus.logger - INFO - Processing - run - 1082 - end run - - - 2003-12-15T21:22:53 - 1071541373907 - 5542 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:22:53 - 1071541373907 - 5543 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:23:24 - 1071541404075 - 5544 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG142908892 - - - - 2003-12-15T21:23:24 - 1071541404076 - 5545 - org.codehaus.logger - INFO - Processing - run - 1083 - start run - - - 2003-12-15T21:23:24 - 1071541404077 - 5546 - org.codehaus.logger - INFO - Processing - run - 1083 - end run - - - 2003-12-15T21:23:24 - 1071541404079 - 5547 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:23:24 - 1071541404079 - 5548 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:23:54 - 1071541434216 - 5549 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG173068776 - - - - 2003-12-15T21:23:54 - 1071541434217 - 5550 - org.codehaus.logger - INFO - Processing - run - 1084 - start run - - - 2003-12-15T21:23:54 - 1071541434217 - 5551 - org.codehaus.logger - INFO - Processing - run - 1084 - end run - - - 2003-12-15T21:23:54 - 1071541434218 - 5552 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:23:54 - 1071541434218 - 5553 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:24:24 - 1071541464375 - 5554 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG203228756 - - - - 2003-12-15T21:24:24 - 1071541464376 - 5555 - org.codehaus.logger - INFO - Processing - run - 1085 - start run - - - 2003-12-15T21:24:24 - 1071541464376 - 5556 - org.codehaus.logger - INFO - Processing - run - 1085 - end run - - - 2003-12-15T21:24:24 - 1071541464376 - 5557 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:24:24 - 1071541464377 - 5558 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:24:42 - 1071541482076 - 5559 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T21:24:42 - 1071541482077 - 5560 - org.codehaus.logger - INFO - Processing - run - 1086 - start run - - - 2003-12-15T21:24:42 - 1071541482078 - 5561 - org.codehaus.logger - INFO - Processing - run - 1086 - end run - - - 2003-12-15T21:24:42 - 1071541482078 - 5562 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T21:24:42 - 1071541482078 - 5563 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T21:24:54 - 1071541494515 - 5564 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG233378742 - - - - 2003-12-15T21:24:54 - 1071541494516 - 5565 - org.codehaus.logger - INFO - Processing - run - 1087 - start run - - - 2003-12-15T21:24:54 - 1071541494516 - 5566 - org.codehaus.logger - INFO - Processing - run - 1087 - end run - - - 2003-12-15T21:24:54 - 1071541494517 - 5567 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:24:54 - 1071541494517 - 5568 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:25:24 - 1071541524665 - 5569 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG263508735 - - - - 2003-12-15T21:25:24 - 1071541524666 - 5570 - org.codehaus.logger - INFO - Processing - run - 1088 - start run - - - 2003-12-15T21:25:24 - 1071541524666 - 5571 - org.codehaus.logger - INFO - Processing - run - 1088 - end run - - - 2003-12-15T21:25:24 - 1071541524666 - 5572 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:25:24 - 1071541524666 - 5573 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:25:54 - 1071541554805 - 5574 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG293659365 - - - - 2003-12-15T21:25:54 - 1071541554806 - 5575 - org.codehaus.logger - INFO - Processing - run - 1089 - start run - - - 2003-12-15T21:25:54 - 1071541554806 - 5576 - org.codehaus.logger - INFO - Processing - run - 1089 - end run - - - 2003-12-15T21:25:54 - 1071541554806 - 5577 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:25:54 - 1071541554806 - 5578 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:26:24 - 1071541584945 - 5579 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG323798716 - - - - 2003-12-15T21:26:24 - 1071541584946 - 5580 - org.codehaus.logger - INFO - Processing - run - 1090 - start run - - - 2003-12-15T21:26:24 - 1071541584946 - 5581 - org.codehaus.logger - INFO - Processing - run - 1090 - end run - - - 2003-12-15T21:26:24 - 1071541584946 - 5582 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:26:24 - 1071541584946 - 5583 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:26:55 - 1071541615135 - 5584 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG353958709 - - - - 2003-12-15T21:26:55 - 1071541615136 - 5585 - org.codehaus.logger - INFO - Processing - run - 1091 - start run - - - 2003-12-15T21:26:55 - 1071541615136 - 5586 - org.codehaus.logger - INFO - Processing - run - 1091 - end run - - - 2003-12-15T21:26:55 - 1071541615136 - 5587 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:26:55 - 1071541615138 - 5588 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:27:25 - 1071541645265 - 5589 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG384108697 - - - - 2003-12-15T21:27:25 - 1071541645267 - 5590 - org.codehaus.logger - INFO - Processing - run - 1092 - start run - - - 2003-12-15T21:27:25 - 1071541645267 - 5591 - org.codehaus.logger - INFO - Processing - run - 1092 - end run - - - 2003-12-15T21:27:25 - 1071541645267 - 5592 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:27:25 - 1071541645268 - 5593 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:27:55 - 1071541675405 - 5594 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG414248708 - - - - 2003-12-15T21:27:55 - 1071541675406 - 5595 - org.codehaus.logger - INFO - Processing - run - 1093 - start run - - - 2003-12-15T21:27:55 - 1071541675406 - 5596 - org.codehaus.logger - INFO - Processing - run - 1093 - end run - - - 2003-12-15T21:27:55 - 1071541675407 - 5597 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:27:55 - 1071541675407 - 5598 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:28:25 - 1071541705545 - 5599 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG444398695 - - - - 2003-12-15T21:28:25 - 1071541705546 - 5600 - org.codehaus.logger - INFO - Processing - run - 1094 - start run - - - 2003-12-15T21:28:25 - 1071541705546 - 5601 - org.codehaus.logger - INFO - Processing - run - 1094 - end run - - - 2003-12-15T21:28:25 - 1071541705546 - 5602 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:28:25 - 1071541705546 - 5603 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:28:55 - 1071541735695 - 5604 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG474548693 - - - - 2003-12-15T21:28:55 - 1071541735696 - 5605 - org.codehaus.logger - INFO - Processing - run - 1095 - start run - - - 2003-12-15T21:28:55 - 1071541735696 - 5606 - org.codehaus.logger - INFO - Processing - run - 1095 - end run - - - 2003-12-15T21:28:55 - 1071541735696 - 5607 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:28:55 - 1071541735697 - 5608 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:29:25 - 1071541765835 - 5609 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG504698698 - - - - 2003-12-15T21:29:25 - 1071541765836 - 5610 - org.codehaus.logger - INFO - Processing - run - 1096 - start run - - - 2003-12-15T21:29:25 - 1071541765836 - 5611 - org.codehaus.logger - INFO - Processing - run - 1096 - end run - - - 2003-12-15T21:29:25 - 1071541765837 - 5612 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:29:25 - 1071541765837 - 5613 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:29:41 - 1071541781975 - 5614 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T21:29:41 - 1071541781976 - 5615 - org.codehaus.logger - INFO - Processing - run - 1097 - start run - - - 2003-12-15T21:29:41 - 1071541781976 - 5616 - org.codehaus.logger - INFO - Processing - run - 1097 - end run - - - 2003-12-15T21:29:41 - 1071541781976 - 5617 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T21:29:41 - 1071541781977 - 5618 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T21:29:56 - 1071541796015 - 5619 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG534838758 - - - - 2003-12-15T21:29:56 - 1071541796016 - 5620 - org.codehaus.logger - INFO - Processing - run - 1098 - start run - - - 2003-12-15T21:29:56 - 1071541796017 - 5621 - org.codehaus.logger - INFO - Processing - run - 1098 - end run - - - 2003-12-15T21:29:56 - 1071541796017 - 5622 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:29:56 - 1071541796017 - 5623 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:30:26 - 1071541826175 - 5624 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG564988699 - - - - 2003-12-15T21:30:26 - 1071541826176 - 5625 - org.codehaus.logger - INFO - Processing - run - 1099 - start run - - - 2003-12-15T21:30:26 - 1071541826176 - 5626 - org.codehaus.logger - INFO - Processing - run - 1099 - end run - - - 2003-12-15T21:30:26 - 1071541826178 - 5627 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:30:26 - 1071541826178 - 5628 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:30:56 - 1071541856295 - 5629 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG595138712 - - - - 2003-12-15T21:30:56 - 1071541856296 - 5630 - org.codehaus.logger - INFO - Processing - run - 1100 - start run - - - 2003-12-15T21:30:56 - 1071541856296 - 5631 - org.codehaus.logger - INFO - Processing - run - 1100 - end run - - - 2003-12-15T21:30:56 - 1071541856296 - 5632 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:30:56 - 1071541856297 - 5633 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:31:26 - 1071541886435 - 5634 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG625298727 - - - - 2003-12-15T21:31:26 - 1071541886437 - 5635 - org.codehaus.logger - INFO - Processing - run - 1101 - start run - - - 2003-12-15T21:31:26 - 1071541886437 - 5636 - org.codehaus.logger - INFO - Processing - run - 1101 - end run - - - 2003-12-15T21:31:26 - 1071541886437 - 5637 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:31:26 - 1071541886438 - 5638 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:31:56 - 1071541916595 - 5639 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG655448777 - - - - 2003-12-15T21:31:56 - 1071541916596 - 5640 - org.codehaus.logger - INFO - Processing - run - 1102 - start run - - - 2003-12-15T21:31:56 - 1071541916597 - 5641 - org.codehaus.logger - INFO - Processing - run - 1102 - end run - - - 2003-12-15T21:31:56 - 1071541916597 - 5642 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:31:56 - 1071541916598 - 5643 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:32:26 - 1071541946795 - 5644 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG685598791 - - - - 2003-12-15T21:32:26 - 1071541946796 - 5645 - org.codehaus.logger - INFO - Processing - run - 1103 - start run - - - 2003-12-15T21:32:26 - 1071541946796 - 5646 - org.codehaus.logger - INFO - Processing - run - 1103 - end run - - - 2003-12-15T21:32:26 - 1071541946796 - 5647 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:32:26 - 1071541946797 - 5648 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:32:56 - 1071541976895 - 5649 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG715748745 - - - - 2003-12-15T21:32:56 - 1071541976896 - 5650 - org.codehaus.logger - INFO - Processing - run - 1104 - start run - - - 2003-12-15T21:32:56 - 1071541976896 - 5651 - org.codehaus.logger - INFO - Processing - run - 1104 - end run - - - 2003-12-15T21:32:56 - 1071541976896 - 5652 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:32:56 - 1071541976896 - 5653 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:33:27 - 1071542007035 - 5654 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG745898752 - - - - 2003-12-15T21:33:27 - 1071542007115 - 5655 - org.codehaus.logger - INFO - Processing - run - 1105 - start run - - - 2003-12-15T21:33:27 - 1071542007116 - 5656 - org.codehaus.logger - INFO - Processing - run - 1105 - end run - - - 2003-12-15T21:33:27 - 1071542007117 - 5657 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:33:27 - 1071542007117 - 5658 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:33:57 - 1071542037195 - 5659 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG776048772 - - - - 2003-12-15T21:33:57 - 1071542037196 - 5660 - org.codehaus.logger - INFO - Processing - run - 1106 - start run - - - 2003-12-15T21:33:57 - 1071542037196 - 5661 - org.codehaus.logger - INFO - Processing - run - 1106 - end run - - - 2003-12-15T21:33:57 - 1071542037196 - 5662 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:33:57 - 1071542037197 - 5663 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:34:27 - 1071542067375 - 5664 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG806188783 - - - - 2003-12-15T21:34:27 - 1071542067376 - 5665 - org.codehaus.logger - INFO - Processing - run - 1107 - start run - - - 2003-12-15T21:34:27 - 1071542067377 - 5666 - org.codehaus.logger - INFO - Processing - run - 1107 - end run - - - 2003-12-15T21:34:27 - 1071542067378 - 5667 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:34:27 - 1071542067378 - 5668 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:34:41 - 1071542081955 - 5669 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T21:34:41 - 1071542081956 - 5670 - org.codehaus.logger - INFO - Processing - run - 1108 - start run - - - 2003-12-15T21:34:41 - 1071542081956 - 5671 - org.codehaus.logger - INFO - Processing - run - 1108 - end run - - - 2003-12-15T21:34:41 - 1071542081957 - 5672 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T21:34:41 - 1071542081957 - 5673 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T21:34:57 - 1071542097495 - 5674 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG836338799 - - - - 2003-12-15T21:34:57 - 1071542097497 - 5675 - org.codehaus.logger - INFO - Processing - run - 1109 - start run - - - 2003-12-15T21:34:57 - 1071542097497 - 5676 - org.codehaus.logger - INFO - Processing - run - 1109 - end run - - - 2003-12-15T21:34:57 - 1071542097497 - 5677 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:34:57 - 1071542097498 - 5678 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:35:27 - 1071542127665 - 5679 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG866478821 - - - - 2003-12-15T21:35:27 - 1071542127666 - 5680 - org.codehaus.logger - INFO - Processing - run - 1110 - start run - - - 2003-12-15T21:35:27 - 1071542127666 - 5681 - org.codehaus.logger - INFO - Processing - run - 1110 - end run - - - 2003-12-15T21:35:27 - 1071542127666 - 5682 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:35:27 - 1071542127667 - 5683 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:35:57 - 1071542157805 - 5684 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG896628838 - - - - 2003-12-15T21:35:57 - 1071542157806 - 5685 - org.codehaus.logger - INFO - Processing - run - 1111 - start run - - - 2003-12-15T21:35:57 - 1071542157806 - 5686 - org.codehaus.logger - INFO - Processing - run - 1111 - end run - - - 2003-12-15T21:35:57 - 1071542157807 - 5687 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:35:57 - 1071542157807 - 5688 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:36:27 - 1071542187945 - 5689 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG926778866 - - - - 2003-12-15T21:36:27 - 1071542187946 - 5690 - org.codehaus.logger - INFO - Processing - run - 1112 - start run - - - 2003-12-15T21:36:27 - 1071542187946 - 5691 - org.codehaus.logger - INFO - Processing - run - 1112 - end run - - - 2003-12-15T21:36:27 - 1071542187946 - 5692 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:36:27 - 1071542187947 - 5693 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:36:58 - 1071542218095 - 5694 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG956948887 - - - - 2003-12-15T21:36:58 - 1071542218096 - 5695 - org.codehaus.logger - INFO - Processing - run - 1113 - start run - - - 2003-12-15T21:36:58 - 1071542218096 - 5696 - org.codehaus.logger - INFO - Processing - run - 1113 - end run - - - 2003-12-15T21:36:58 - 1071542218097 - 5697 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:36:58 - 1071542218097 - 5698 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:37:28 - 1071542248295 - 5699 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG987108932 - - - - 2003-12-15T21:37:28 - 1071542248296 - 5700 - org.codehaus.logger - INFO - Processing - run - 1114 - start run - - - 2003-12-15T21:37:28 - 1071542248297 - 5701 - org.codehaus.logger - INFO - Processing - run - 1114 - end run - - - 2003-12-15T21:37:28 - 1071542248297 - 5702 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:37:28 - 1071542248298 - 5703 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:37:58 - 1071542278446 - 5704 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1017259083 - - - - 2003-12-15T21:37:58 - 1071542278446 - 5705 - org.codehaus.logger - INFO - Processing - run - 1115 - start run - - - 2003-12-15T21:37:58 - 1071542278448 - 5706 - org.codehaus.logger - INFO - Processing - run - 1115 - end run - - - 2003-12-15T21:37:58 - 1071542278448 - 5707 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:37:58 - 1071542278448 - 5708 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:38:28 - 1071542308586 - 5709 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1047409290 - - - - 2003-12-15T21:38:28 - 1071542308586 - 5710 - org.codehaus.logger - INFO - Processing - run - 1116 - start run - - - 2003-12-15T21:38:28 - 1071542308586 - 5711 - org.codehaus.logger - INFO - Processing - run - 1116 - end run - - - 2003-12-15T21:38:28 - 1071542308587 - 5712 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:38:28 - 1071542308587 - 5713 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:38:58 - 1071542338736 - 5714 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1077559441 - - - - 2003-12-15T21:38:58 - 1071542338736 - 5715 - org.codehaus.logger - INFO - Processing - run - 1117 - start run - - - 2003-12-15T21:38:58 - 1071542338737 - 5716 - org.codehaus.logger - INFO - Processing - run - 1117 - end run - - - 2003-12-15T21:38:58 - 1071542338737 - 5717 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:38:58 - 1071542338737 - 5718 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:39:28 - 1071542368876 - 5719 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1107709570 - - - - 2003-12-15T21:39:28 - 1071542368877 - 5720 - org.codehaus.logger - INFO - Processing - run - 1118 - start run - - - 2003-12-15T21:39:28 - 1071542368877 - 5721 - org.codehaus.logger - INFO - Processing - run - 1118 - end run - - - 2003-12-15T21:39:28 - 1071542368877 - 5722 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:39:28 - 1071542368877 - 5723 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:39:42 - 1071542382036 - 5724 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T21:39:42 - 1071542382037 - 5725 - org.codehaus.logger - INFO - Processing - run - 1119 - start run - - - 2003-12-15T21:39:42 - 1071542382037 - 5726 - org.codehaus.logger - INFO - Processing - run - 1119 - end run - - - 2003-12-15T21:39:42 - 1071542382038 - 5727 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T21:39:42 - 1071542382038 - 5728 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T21:39:59 - 1071542399016 - 5729 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1137869726 - - - - 2003-12-15T21:39:59 - 1071542399017 - 5730 - org.codehaus.logger - INFO - Processing - run - 1120 - start run - - - 2003-12-15T21:39:59 - 1071542399017 - 5731 - org.codehaus.logger - INFO - Processing - run - 1120 - end run - - - 2003-12-15T21:39:59 - 1071542399017 - 5732 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:39:59 - 1071542399017 - 5733 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:40:29 - 1071542429176 - 5734 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1168029876 - - - - 2003-12-15T21:40:29 - 1071542429177 - 5735 - org.codehaus.logger - INFO - Processing - run - 1121 - start run - - - 2003-12-15T21:40:29 - 1071542429178 - 5736 - org.codehaus.logger - INFO - Processing - run - 1121 - end run - - - 2003-12-15T21:40:29 - 1071542429178 - 5737 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:40:29 - 1071542429178 - 5738 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:40:59 - 1071542459317 - 5739 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1198170042 - - - - 2003-12-15T21:40:59 - 1071542459318 - 5740 - org.codehaus.logger - INFO - Processing - run - 1122 - start run - - - 2003-12-15T21:40:59 - 1071542459318 - 5741 - org.codehaus.logger - INFO - Processing - run - 1122 - end run - - - 2003-12-15T21:40:59 - 1071542459319 - 5742 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:40:59 - 1071542459319 - 5743 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:41:29 - 1071542489477 - 5744 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1228330209 - - - - 2003-12-15T21:41:29 - 1071542489479 - 5745 - org.codehaus.logger - INFO - Processing - run - 1123 - start run - - - 2003-12-15T21:41:29 - 1071542489479 - 5746 - org.codehaus.logger - INFO - Processing - run - 1123 - end run - - - 2003-12-15T21:41:29 - 1071542489479 - 5747 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:41:29 - 1071542489479 - 5748 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:41:59 - 1071542519617 - 5749 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1258470363 - - - - 2003-12-15T21:41:59 - 1071542519617 - 5750 - org.codehaus.logger - INFO - Processing - run - 1124 - start run - - - 2003-12-15T21:41:59 - 1071542519618 - 5751 - org.codehaus.logger - INFO - Processing - run - 1124 - end run - - - 2003-12-15T21:41:59 - 1071542519618 - 5752 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:41:59 - 1071542519618 - 5753 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:42:29 - 1071542549777 - 5754 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1288620551 - - - - 2003-12-15T21:42:29 - 1071542549778 - 5755 - org.codehaus.logger - INFO - Processing - run - 1125 - start run - - - 2003-12-15T21:42:29 - 1071542549779 - 5756 - org.codehaus.logger - INFO - Processing - run - 1125 - end run - - - 2003-12-15T21:42:29 - 1071542549779 - 5757 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:42:29 - 1071542549779 - 5758 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:42:59 - 1071542579917 - 5759 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1318770692 - - - - 2003-12-15T21:42:59 - 1071542579918 - 5760 - org.codehaus.logger - INFO - Processing - run - 1126 - start run - - - 2003-12-15T21:42:59 - 1071542579918 - 5761 - org.codehaus.logger - INFO - Processing - run - 1126 - end run - - - 2003-12-15T21:42:59 - 1071542579919 - 5762 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:42:59 - 1071542579919 - 5763 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:43:30 - 1071542610077 - 5764 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1348920884 - - - - 2003-12-15T21:43:30 - 1071542610079 - 5765 - org.codehaus.logger - INFO - Processing - run - 1127 - start run - - - 2003-12-15T21:43:30 - 1071542610079 - 5766 - org.codehaus.logger - INFO - Processing - run - 1127 - end run - - - 2003-12-15T21:43:30 - 1071542610080 - 5767 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:43:30 - 1071542610081 - 5768 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:44:00 - 1071542640198 - 5769 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1379061727 - - - - 2003-12-15T21:44:00 - 1071542640199 - 5770 - org.codehaus.logger - INFO - Processing - run - 1128 - start run - - - 2003-12-15T21:44:00 - 1071542640199 - 5771 - org.codehaus.logger - INFO - Processing - run - 1128 - end run - - - 2003-12-15T21:44:00 - 1071542640200 - 5772 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:44:00 - 1071542640200 - 5773 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:44:30 - 1071542670398 - 5774 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1409211183 - - - - 2003-12-15T21:44:30 - 1071542670398 - 5775 - org.codehaus.logger - INFO - Processing - run - 1129 - start run - - - 2003-12-15T21:44:30 - 1071542670399 - 5776 - org.codehaus.logger - INFO - Processing - run - 1129 - end run - - - 2003-12-15T21:44:30 - 1071542670399 - 5777 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:44:30 - 1071542670399 - 5778 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:44:41 - 1071542681958 - 5779 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T21:44:41 - 1071542681959 - 5780 - org.codehaus.logger - INFO - Processing - run - 1130 - start run - - - 2003-12-15T21:44:41 - 1071542681959 - 5781 - org.codehaus.logger - INFO - Processing - run - 1130 - end run - - - 2003-12-15T21:44:41 - 1071542681960 - 5782 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T21:44:41 - 1071542681960 - 5783 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T21:45:00 - 1071542700508 - 5784 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1439361340 - - - - 2003-12-15T21:45:00 - 1071542700510 - 5785 - org.codehaus.logger - INFO - Processing - run - 1131 - start run - - - 2003-12-15T21:45:00 - 1071542700511 - 5786 - org.codehaus.logger - INFO - Processing - run - 1131 - end run - - - 2003-12-15T21:45:00 - 1071542700511 - 5787 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:45:00 - 1071542700511 - 5788 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:45:30 - 1071542730678 - 5789 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1469512168 - - - - 2003-12-15T21:45:30 - 1071542730679 - 5790 - org.codehaus.logger - INFO - Processing - run - 1132 - start run - - - 2003-12-15T21:45:30 - 1071542730679 - 5791 - org.codehaus.logger - INFO - Processing - run - 1132 - end run - - - 2003-12-15T21:45:30 - 1071542730680 - 5792 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:45:30 - 1071542730680 - 5793 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:46:00 - 1071542760818 - 5794 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1499661734 - - - - 2003-12-15T21:46:00 - 1071542760819 - 5795 - org.codehaus.logger - INFO - Processing - run - 1133 - start run - - - 2003-12-15T21:46:00 - 1071542760819 - 5796 - org.codehaus.logger - INFO - Processing - run - 1133 - end run - - - 2003-12-15T21:46:00 - 1071542760819 - 5797 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:46:00 - 1071542760819 - 5798 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:46:30 - 1071542790978 - 5799 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1529801837 - - - - 2003-12-15T21:46:30 - 1071542790979 - 5800 - org.codehaus.logger - INFO - Processing - run - 1134 - start run - - - 2003-12-15T21:46:30 - 1071542790979 - 5801 - org.codehaus.logger - INFO - Processing - run - 1134 - end run - - - 2003-12-15T21:46:30 - 1071542790980 - 5802 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:46:30 - 1071542790980 - 5803 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:47:01 - 1071542821118 - 5804 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1559952023 - - - - 2003-12-15T21:47:01 - 1071542821119 - 5805 - org.codehaus.logger - INFO - Processing - run - 1135 - start run - - - 2003-12-15T21:47:01 - 1071542821120 - 5806 - org.codehaus.logger - INFO - Processing - run - 1135 - end run - - - 2003-12-15T21:47:01 - 1071542821120 - 5807 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:47:01 - 1071542821120 - 5808 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:47:31 - 1071542851279 - 5809 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1590102169 - - - - 2003-12-15T21:47:31 - 1071542851279 - 5810 - org.codehaus.logger - INFO - Processing - run - 1136 - start run - - - 2003-12-15T21:47:31 - 1071542851280 - 5811 - org.codehaus.logger - INFO - Processing - run - 1136 - end run - - - 2003-12-15T21:47:31 - 1071542851280 - 5812 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:47:31 - 1071542851280 - 5813 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:48:01 - 1071542881419 - 5814 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1620242336 - - - - 2003-12-15T21:48:01 - 1071542881420 - 5815 - org.codehaus.logger - INFO - Processing - run - 1137 - start run - - - 2003-12-15T21:48:01 - 1071542881420 - 5816 - org.codehaus.logger - INFO - Processing - run - 1137 - end run - - - 2003-12-15T21:48:01 - 1071542881421 - 5817 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:48:01 - 1071542881421 - 5818 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:48:31 - 1071542911579 - 5819 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1650392498 - - - - 2003-12-15T21:48:31 - 1071542911580 - 5820 - org.codehaus.logger - INFO - Processing - run - 1138 - start run - - - 2003-12-15T21:48:31 - 1071542911580 - 5821 - org.codehaus.logger - INFO - Processing - run - 1138 - end run - - - 2003-12-15T21:48:31 - 1071542911580 - 5822 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:48:31 - 1071542911580 - 5823 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:49:01 - 1071542941730 - 5824 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1680542663 - - - - 2003-12-15T21:49:01 - 1071542941731 - 5825 - org.codehaus.logger - INFO - Processing - run - 1139 - start run - - - 2003-12-15T21:49:01 - 1071542941731 - 5826 - org.codehaus.logger - INFO - Processing - run - 1139 - end run - - - 2003-12-15T21:49:01 - 1071542941731 - 5827 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:49:01 - 1071542941732 - 5828 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:49:31 - 1071542971819 - 5829 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1710682830 - - - - 2003-12-15T21:49:31 - 1071542971820 - 5830 - org.codehaus.logger - INFO - Processing - run - 1140 - start run - - - 2003-12-15T21:49:31 - 1071542971820 - 5831 - org.codehaus.logger - INFO - Processing - run - 1140 - end run - - - 2003-12-15T21:49:31 - 1071542971821 - 5832 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:49:31 - 1071542971821 - 5833 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:49:42 - 1071542982109 - 5834 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T21:49:42 - 1071542982110 - 5835 - org.codehaus.logger - INFO - Processing - run - 1141 - start run - - - 2003-12-15T21:49:42 - 1071542982110 - 5836 - org.codehaus.logger - INFO - Processing - run - 1141 - end run - - - 2003-12-15T21:49:42 - 1071542982111 - 5837 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T21:49:42 - 1071542982111 - 5838 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T21:50:02 - 1071543002009 - 5839 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1740833000 - - - - 2003-12-15T21:50:02 - 1071543002010 - 5840 - org.codehaus.logger - INFO - Processing - run - 1142 - start run - - - 2003-12-15T21:50:02 - 1071543002011 - 5841 - org.codehaus.logger - INFO - Processing - run - 1142 - end run - - - 2003-12-15T21:50:02 - 1071543002011 - 5842 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:50:02 - 1071543002012 - 5843 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:50:32 - 1071543032210 - 5844 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1771023165 - - - - 2003-12-15T21:50:32 - 1071543032210 - 5845 - org.codehaus.logger - INFO - Processing - run - 1143 - start run - - - 2003-12-15T21:50:32 - 1071543032210 - 5846 - org.codehaus.logger - INFO - Processing - run - 1143 - end run - - - 2003-12-15T21:50:32 - 1071543032211 - 5847 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:50:32 - 1071543032211 - 5848 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:51:02 - 1071543062360 - 5849 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1801173331 - - - - 2003-12-15T21:51:02 - 1071543062360 - 5850 - org.codehaus.logger - INFO - Processing - run - 1144 - start run - - - 2003-12-15T21:51:02 - 1071543062361 - 5851 - org.codehaus.logger - INFO - Processing - run - 1144 - end run - - - 2003-12-15T21:51:02 - 1071543062361 - 5852 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:51:02 - 1071543062361 - 5853 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:51:32 - 1071543092510 - 5854 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1831333885 - - - - 2003-12-15T21:51:32 - 1071543092511 - 5855 - org.codehaus.logger - INFO - Processing - run - 1145 - start run - - - 2003-12-15T21:51:32 - 1071543092511 - 5856 - org.codehaus.logger - INFO - Processing - run - 1145 - end run - - - 2003-12-15T21:51:32 - 1071543092511 - 5857 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:51:32 - 1071543092511 - 5858 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:52:02 - 1071543122660 - 5859 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1861473672 - - - - 2003-12-15T21:52:02 - 1071543122661 - 5860 - org.codehaus.logger - INFO - Processing - run - 1146 - start run - - - 2003-12-15T21:52:02 - 1071543122661 - 5861 - org.codehaus.logger - INFO - Processing - run - 1146 - end run - - - 2003-12-15T21:52:02 - 1071543122662 - 5862 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:52:02 - 1071543122663 - 5863 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:52:32 - 1071543152790 - 5864 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1891623840 - - - - 2003-12-15T21:52:32 - 1071543152791 - 5865 - org.codehaus.logger - INFO - Processing - run - 1147 - start run - - - 2003-12-15T21:52:32 - 1071543152791 - 5866 - org.codehaus.logger - INFO - Processing - run - 1147 - end run - - - 2003-12-15T21:52:32 - 1071543152792 - 5867 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:52:32 - 1071543152792 - 5868 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:53:02 - 1071543182930 - 5869 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1921774008 - - - - 2003-12-15T21:53:02 - 1071543182931 - 5870 - org.codehaus.logger - INFO - Processing - run - 1148 - start run - - - 2003-12-15T21:53:02 - 1071543182931 - 5871 - org.codehaus.logger - INFO - Processing - run - 1148 - end run - - - 2003-12-15T21:53:02 - 1071543182932 - 5872 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:53:02 - 1071543182932 - 5873 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:53:33 - 1071543213081 - 5874 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1951944253 - - - - 2003-12-15T21:53:33 - 1071543213082 - 5875 - org.codehaus.logger - INFO - Processing - run - 1149 - start run - - - 2003-12-15T21:53:33 - 1071543213083 - 5876 - org.codehaus.logger - INFO - Processing - run - 1149 - end run - - - 2003-12-15T21:53:33 - 1071543213083 - 5877 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:53:33 - 1071543213083 - 5878 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:54:03 - 1071543243291 - 5879 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1982104344 - - - - 2003-12-15T21:54:03 - 1071543243292 - 5880 - org.codehaus.logger - INFO - Processing - run - 1150 - start run - - - 2003-12-15T21:54:03 - 1071543243292 - 5881 - org.codehaus.logger - INFO - Processing - run - 1150 - end run - - - 2003-12-15T21:54:03 - 1071543243293 - 5882 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:54:03 - 1071543243293 - 5883 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:54:33 - 1071543273471 - 5884 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2012284503 - - - - 2003-12-15T21:54:33 - 1071543273472 - 5885 - org.codehaus.logger - INFO - Processing - run - 1151 - start run - - - 2003-12-15T21:54:33 - 1071543273472 - 5886 - org.codehaus.logger - INFO - Processing - run - 1151 - end run - - - 2003-12-15T21:54:33 - 1071543273472 - 5887 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:54:33 - 1071543273473 - 5888 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:54:41 - 1071543281921 - 5889 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T21:54:41 - 1071543281922 - 5890 - org.codehaus.logger - INFO - Processing - run - 1152 - start run - - - 2003-12-15T21:54:41 - 1071543281922 - 5891 - org.codehaus.logger - INFO - Processing - run - 1152 - end run - - - 2003-12-15T21:54:41 - 1071543281923 - 5892 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T21:54:41 - 1071543281923 - 5893 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T21:55:03 - 1071543303591 - 5894 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2042424640 - - - - 2003-12-15T21:55:03 - 1071543303592 - 5895 - org.codehaus.logger - INFO - Processing - run - 1153 - start run - - - 2003-12-15T21:55:03 - 1071543303592 - 5896 - org.codehaus.logger - INFO - Processing - run - 1153 - end run - - - 2003-12-15T21:55:03 - 1071543303593 - 5897 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:55:03 - 1071543303593 - 5898 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:55:33 - 1071543333741 - 5899 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2072574709 - - - - 2003-12-15T21:55:33 - 1071543333742 - 5900 - org.codehaus.logger - INFO - Processing - run - 1154 - start run - - - 2003-12-15T21:55:33 - 1071543333742 - 5901 - org.codehaus.logger - INFO - Processing - run - 1154 - end run - - - 2003-12-15T21:55:33 - 1071543333744 - 5902 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:55:33 - 1071543333744 - 5903 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:56:03 - 1071543363862 - 5904 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2102724807 - - - - 2003-12-15T21:56:03 - 1071543363863 - 5905 - org.codehaus.logger - INFO - Processing - run - 1155 - start run - - - 2003-12-15T21:56:03 - 1071543363863 - 5906 - org.codehaus.logger - INFO - Processing - run - 1155 - end run - - - 2003-12-15T21:56:03 - 1071543363864 - 5907 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:56:03 - 1071543363864 - 5908 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:56:34 - 1071543394071 - 5909 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2132884909 - - - - 2003-12-15T21:56:34 - 1071543394072 - 5910 - org.codehaus.logger - INFO - Processing - run - 1156 - start run - - - 2003-12-15T21:56:34 - 1071543394072 - 5911 - org.codehaus.logger - INFO - Processing - run - 1156 - end run - - - 2003-12-15T21:56:34 - 1071543394073 - 5912 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:56:34 - 1071543394073 - 5913 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:57:04 - 1071543424221 - 5914 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2163055012 - - - - 2003-12-15T21:57:04 - 1071543424222 - 5915 - org.codehaus.logger - INFO - Processing - run - 1157 - start run - - - 2003-12-15T21:57:04 - 1071543424222 - 5916 - org.codehaus.logger - INFO - Processing - run - 1157 - end run - - - 2003-12-15T21:57:04 - 1071543424223 - 5917 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:57:04 - 1071543424223 - 5918 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:57:34 - 1071543454362 - 5919 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2193215124 - - - - 2003-12-15T21:57:34 - 1071543454362 - 5920 - org.codehaus.logger - INFO - Processing - run - 1158 - start run - - - 2003-12-15T21:57:34 - 1071543454363 - 5921 - org.codehaus.logger - INFO - Processing - run - 1158 - end run - - - 2003-12-15T21:57:34 - 1071543454363 - 5922 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:57:34 - 1071543454363 - 5923 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:58:04 - 1071543484582 - 5924 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2223395235 - - - - 2003-12-15T21:58:04 - 1071543484583 - 5925 - org.codehaus.logger - INFO - Processing - run - 1159 - start run - - - 2003-12-15T21:58:04 - 1071543484583 - 5926 - org.codehaus.logger - INFO - Processing - run - 1159 - end run - - - 2003-12-15T21:58:04 - 1071543484584 - 5927 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:58:04 - 1071543484584 - 5928 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:58:34 - 1071543514722 - 5929 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2253545339 - - - - 2003-12-15T21:58:34 - 1071543514722 - 5930 - org.codehaus.logger - INFO - Processing - run - 1160 - start run - - - 2003-12-15T21:58:34 - 1071543514723 - 5931 - org.codehaus.logger - INFO - Processing - run - 1160 - end run - - - 2003-12-15T21:58:34 - 1071543514723 - 5932 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:58:34 - 1071543514723 - 5933 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:59:04 - 1071543544882 - 5934 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2283695473 - - - - 2003-12-15T21:59:04 - 1071543544883 - 5935 - org.codehaus.logger - INFO - Processing - run - 1161 - start run - - - 2003-12-15T21:59:04 - 1071543544883 - 5936 - org.codehaus.logger - INFO - Processing - run - 1161 - end run - - - 2003-12-15T21:59:04 - 1071543544883 - 5937 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:59:04 - 1071543544883 - 5938 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:59:35 - 1071543575022 - 5939 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2313845544 - - - - 2003-12-15T21:59:35 - 1071543575023 - 5940 - org.codehaus.logger - INFO - Processing - run - 1162 - start run - - - 2003-12-15T21:59:35 - 1071543575024 - 5941 - org.codehaus.logger - INFO - Processing - run - 1162 - end run - - - 2003-12-15T21:59:35 - 1071543575024 - 5942 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T21:59:35 - 1071543575024 - 5943 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T21:59:41 - 1071543581982 - 5944 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T21:59:41 - 1071543581983 - 5945 - org.codehaus.logger - INFO - Processing - run - 1163 - start run - - - 2003-12-15T21:59:41 - 1071543581983 - 5946 - org.codehaus.logger - INFO - Processing - run - 1163 - end run - - - 2003-12-15T21:59:41 - 1071543581983 - 5947 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T21:59:41 - 1071543581983 - 5948 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T22:00:05 - 1071543605142 - 5949 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2344005668 - - - - 2003-12-15T22:00:05 - 1071543605143 - 5950 - org.codehaus.logger - INFO - Processing - run - 1164 - start run - - - 2003-12-15T22:00:05 - 1071543605143 - 5951 - org.codehaus.logger - INFO - Processing - run - 1164 - end run - - - 2003-12-15T22:00:05 - 1071543605144 - 5952 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:00:05 - 1071543605144 - 5953 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:00:35 - 1071543635302 - 5954 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2374145767 - - - - 2003-12-15T22:00:35 - 1071543635303 - 5955 - org.codehaus.logger - INFO - Processing - run - 1165 - start run - - - 2003-12-15T22:00:35 - 1071543635303 - 5956 - org.codehaus.logger - INFO - Processing - run - 1165 - end run - - - 2003-12-15T22:00:35 - 1071543635303 - 5957 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:00:35 - 1071543635303 - 5958 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:01:05 - 1071543665442 - 5959 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2404295876 - - - - 2003-12-15T22:01:05 - 1071543665443 - 5960 - org.codehaus.logger - INFO - Processing - run - 1166 - start run - - - 2003-12-15T22:01:05 - 1071543665443 - 5961 - org.codehaus.logger - INFO - Processing - run - 1166 - end run - - - 2003-12-15T22:01:05 - 1071543665444 - 5962 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:01:05 - 1071543665444 - 5963 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:01:35 - 1071543695603 - 5964 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2434446030 - - - - 2003-12-15T22:01:35 - 1071543695603 - 5965 - org.codehaus.logger - INFO - Processing - run - 1167 - start run - - - 2003-12-15T22:01:35 - 1071543695604 - 5966 - org.codehaus.logger - INFO - Processing - run - 1167 - end run - - - 2003-12-15T22:01:35 - 1071543695604 - 5967 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:01:35 - 1071543695604 - 5968 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:02:05 - 1071543725753 - 5969 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2464596096 - - - - 2003-12-15T22:02:05 - 1071543725753 - 5970 - org.codehaus.logger - INFO - Processing - run - 1168 - start run - - - 2003-12-15T22:02:05 - 1071543725753 - 5971 - org.codehaus.logger - INFO - Processing - run - 1168 - end run - - - 2003-12-15T22:02:05 - 1071543725754 - 5972 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:02:05 - 1071543725754 - 5973 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:02:35 - 1071543755913 - 5974 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2494746851 - - - - 2003-12-15T22:02:35 - 1071543755914 - 5975 - org.codehaus.logger - INFO - Processing - run - 1169 - start run - - - 2003-12-15T22:02:35 - 1071543755914 - 5976 - org.codehaus.logger - INFO - Processing - run - 1169 - end run - - - 2003-12-15T22:02:35 - 1071543755915 - 5977 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:02:35 - 1071543755915 - 5978 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:03:06 - 1071543786053 - 5979 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2524906322 - - - - 2003-12-15T22:03:06 - 1071543786053 - 5980 - org.codehaus.logger - INFO - Processing - run - 1170 - start run - - - 2003-12-15T22:03:06 - 1071543786055 - 5981 - org.codehaus.logger - INFO - Processing - run - 1170 - end run - - - 2003-12-15T22:03:06 - 1071543786055 - 5982 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:03:06 - 1071543786055 - 5983 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:03:36 - 1071543816203 - 5984 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2555056432 - - - - 2003-12-15T22:03:36 - 1071543816204 - 5985 - org.codehaus.logger - INFO - Processing - run - 1171 - start run - - - 2003-12-15T22:03:36 - 1071543816204 - 5986 - org.codehaus.logger - INFO - Processing - run - 1171 - end run - - - 2003-12-15T22:03:36 - 1071543816204 - 5987 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:03:36 - 1071543816204 - 5988 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:04:06 - 1071543846363 - 5989 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2585206547 - - - - 2003-12-15T22:04:06 - 1071543846364 - 5990 - org.codehaus.logger - INFO - Processing - run - 1172 - start run - - - 2003-12-15T22:04:06 - 1071543846364 - 5991 - org.codehaus.logger - INFO - Processing - run - 1172 - end run - - - 2003-12-15T22:04:06 - 1071543846365 - 5992 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:04:06 - 1071543846365 - 5993 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:04:36 - 1071543876503 - 5994 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2615356659 - - - - 2003-12-15T22:04:36 - 1071543876504 - 5995 - org.codehaus.logger - INFO - Processing - run - 1173 - start run - - - 2003-12-15T22:04:36 - 1071543876505 - 5996 - org.codehaus.logger - INFO - Processing - run - 1173 - end run - - - 2003-12-15T22:04:36 - 1071543876505 - 5997 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:04:36 - 1071543876506 - 5998 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:04:41 - 1071543881963 - 5999 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T22:04:41 - 1071543881964 - 6000 - org.codehaus.logger - INFO - Processing - run - 1174 - start run - - - 2003-12-15T22:04:41 - 1071543881964 - 6001 - org.codehaus.logger - INFO - Processing - run - 1174 - end run - - - 2003-12-15T22:04:41 - 1071543881965 - 6002 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T22:04:41 - 1071543881965 - 6003 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T22:05:06 - 1071543906683 - 6004 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2645526782 - - - - 2003-12-15T22:05:06 - 1071543906684 - 6005 - org.codehaus.logger - INFO - Processing - run - 1175 - start run - - - 2003-12-15T22:05:06 - 1071543906684 - 6006 - org.codehaus.logger - INFO - Processing - run - 1175 - end run - - - 2003-12-15T22:05:06 - 1071543906685 - 6007 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:05:06 - 1071543906685 - 6008 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:05:36 - 1071543936823 - 6009 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2675676903 - - - - 2003-12-15T22:05:36 - 1071543936824 - 6010 - org.codehaus.logger - INFO - Processing - run - 1176 - start run - - - 2003-12-15T22:05:36 - 1071543936824 - 6011 - org.codehaus.logger - INFO - Processing - run - 1176 - end run - - - 2003-12-15T22:05:36 - 1071543936825 - 6012 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:05:36 - 1071543936825 - 6013 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:06:06 - 1071543966983 - 6014 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2705827014 - - - - 2003-12-15T22:06:06 - 1071543966984 - 6015 - org.codehaus.logger - INFO - Processing - run - 1177 - start run - - - 2003-12-15T22:06:06 - 1071543966984 - 6016 - org.codehaus.logger - INFO - Processing - run - 1177 - end run - - - 2003-12-15T22:06:06 - 1071543966985 - 6017 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:06:06 - 1071543966985 - 6018 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:06:37 - 1071543997184 - 6019 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2735997135 - - - - 2003-12-15T22:06:37 - 1071543997185 - 6020 - org.codehaus.logger - INFO - Processing - run - 1178 - start run - - - 2003-12-15T22:06:37 - 1071543997186 - 6021 - org.codehaus.logger - INFO - Processing - run - 1178 - end run - - - 2003-12-15T22:06:37 - 1071543997186 - 6022 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:06:37 - 1071543997186 - 6023 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:07:07 - 1071544027334 - 6024 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2766157250 - - - - 2003-12-15T22:07:07 - 1071544027334 - 6025 - org.codehaus.logger - INFO - Processing - run - 1179 - start run - - - 2003-12-15T22:07:07 - 1071544027335 - 6026 - org.codehaus.logger - INFO - Processing - run - 1179 - end run - - - 2003-12-15T22:07:07 - 1071544027335 - 6027 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:07:07 - 1071544027335 - 6028 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:07:37 - 1071544057484 - 6029 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2796307352 - - - - 2003-12-15T22:07:37 - 1071544057484 - 6030 - org.codehaus.logger - INFO - Processing - run - 1180 - start run - - - 2003-12-15T22:07:37 - 1071544057485 - 6031 - org.codehaus.logger - INFO - Processing - run - 1180 - end run - - - 2003-12-15T22:07:37 - 1071544057485 - 6032 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:07:37 - 1071544057485 - 6033 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:08:07 - 1071544087644 - 6034 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2826457490 - - - - 2003-12-15T22:08:07 - 1071544087645 - 6035 - org.codehaus.logger - INFO - Processing - run - 1181 - start run - - - 2003-12-15T22:08:07 - 1071544087645 - 6036 - org.codehaus.logger - INFO - Processing - run - 1181 - end run - - - 2003-12-15T22:08:07 - 1071544087645 - 6037 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:08:07 - 1071544087646 - 6038 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:08:37 - 1071544117784 - 6039 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2856607609 - - - - 2003-12-15T22:08:37 - 1071544117785 - 6040 - org.codehaus.logger - INFO - Processing - run - 1182 - start run - - - 2003-12-15T22:08:37 - 1071544117785 - 6041 - org.codehaus.logger - INFO - Processing - run - 1182 - end run - - - 2003-12-15T22:08:37 - 1071544117786 - 6042 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:08:37 - 1071544117786 - 6043 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:09:07 - 1071544147934 - 6044 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2886757738 - - - - 2003-12-15T22:09:07 - 1071544147935 - 6045 - org.codehaus.logger - INFO - Processing - run - 1183 - start run - - - 2003-12-15T22:09:07 - 1071544147935 - 6046 - org.codehaus.logger - INFO - Processing - run - 1183 - end run - - - 2003-12-15T22:09:07 - 1071544147935 - 6047 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:09:07 - 1071544147936 - 6048 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:09:38 - 1071544178074 - 6049 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2916928540 - - - - 2003-12-15T22:09:38 - 1071544178075 - 6050 - org.codehaus.logger - INFO - Processing - run - 1184 - start run - - - 2003-12-15T22:09:38 - 1071544178075 - 6051 - org.codehaus.logger - INFO - Processing - run - 1184 - end run - - - 2003-12-15T22:09:38 - 1071544178076 - 6052 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:09:38 - 1071544178076 - 6053 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:09:41 - 1071544181994 - 6054 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T22:09:41 - 1071544181995 - 6055 - org.codehaus.logger - INFO - Processing - run - 1185 - start run - - - 2003-12-15T22:09:41 - 1071544181995 - 6056 - org.codehaus.logger - INFO - Processing - run - 1185 - end run - - - 2003-12-15T22:09:41 - 1071544181995 - 6057 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T22:09:41 - 1071544181996 - 6058 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T22:10:08 - 1071544208274 - 6059 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2947117974 - - - - 2003-12-15T22:10:08 - 1071544208276 - 6060 - org.codehaus.logger - INFO - Processing - run - 1186 - start run - - - 2003-12-15T22:10:08 - 1071544208276 - 6061 - org.codehaus.logger - INFO - Processing - run - 1186 - end run - - - 2003-12-15T22:10:08 - 1071544208277 - 6062 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:10:08 - 1071544208277 - 6063 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:10:38 - 1071544238425 - 6064 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2977258105 - - - - 2003-12-15T22:10:38 - 1071544238425 - 6065 - org.codehaus.logger - INFO - Processing - run - 1187 - start run - - - 2003-12-15T22:10:38 - 1071544238425 - 6066 - org.codehaus.logger - INFO - Processing - run - 1187 - end run - - - 2003-12-15T22:10:38 - 1071544238426 - 6067 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:10:38 - 1071544238426 - 6068 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:11:08 - 1071544268565 - 6069 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3007408224 - - - - 2003-12-15T22:11:08 - 1071544268566 - 6070 - org.codehaus.logger - INFO - Processing - run - 1188 - start run - - - 2003-12-15T22:11:08 - 1071544268566 - 6071 - org.codehaus.logger - INFO - Processing - run - 1188 - end run - - - 2003-12-15T22:11:08 - 1071544268567 - 6072 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:11:08 - 1071544268567 - 6073 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:11:38 - 1071544298725 - 6074 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3037558347 - - - - 2003-12-15T22:11:38 - 1071544298725 - 6075 - org.codehaus.logger - INFO - Processing - run - 1189 - start run - - - 2003-12-15T22:11:38 - 1071544298726 - 6076 - org.codehaus.logger - INFO - Processing - run - 1189 - end run - - - 2003-12-15T22:11:38 - 1071544298726 - 6077 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:11:38 - 1071544298726 - 6078 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:12:08 - 1071544328875 - 6079 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3067708425 - - - - 2003-12-15T22:12:08 - 1071544328876 - 6080 - org.codehaus.logger - INFO - Processing - run - 1190 - start run - - - 2003-12-15T22:12:08 - 1071544328876 - 6081 - org.codehaus.logger - INFO - Processing - run - 1190 - end run - - - 2003-12-15T22:12:08 - 1071544328876 - 6082 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:12:08 - 1071544328876 - 6083 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:12:39 - 1071544359025 - 6084 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3097858943 - - - - 2003-12-15T22:12:39 - 1071544359026 - 6085 - org.codehaus.logger - INFO - Processing - run - 1191 - start run - - - 2003-12-15T22:12:39 - 1071544359026 - 6086 - org.codehaus.logger - INFO - Processing - run - 1191 - end run - - - 2003-12-15T22:12:39 - 1071544359026 - 6087 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:12:39 - 1071544359027 - 6088 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:13:09 - 1071544389166 - 6089 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3128008681 - - - - 2003-12-15T22:13:09 - 1071544389167 - 6090 - org.codehaus.logger - INFO - Processing - run - 1192 - start run - - - 2003-12-15T22:13:09 - 1071544389167 - 6091 - org.codehaus.logger - INFO - Processing - run - 1192 - end run - - - 2003-12-15T22:13:09 - 1071544389167 - 6092 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:13:09 - 1071544389168 - 6093 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:13:39 - 1071544419325 - 6094 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3158158678 - - - - 2003-12-15T22:13:39 - 1071544419326 - 6095 - org.codehaus.logger - INFO - Processing - run - 1193 - start run - - - 2003-12-15T22:13:39 - 1071544419327 - 6096 - org.codehaus.logger - INFO - Processing - run - 1193 - end run - - - 2003-12-15T22:13:39 - 1071544419327 - 6097 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:13:39 - 1071544419327 - 6098 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:14:09 - 1071544449445 - 6099 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3188308767 - - - - 2003-12-15T22:14:09 - 1071544449447 - 6100 - org.codehaus.logger - INFO - Processing - run - 1194 - start run - - - 2003-12-15T22:14:09 - 1071544449447 - 6101 - org.codehaus.logger - INFO - Processing - run - 1194 - end run - - - 2003-12-15T22:14:09 - 1071544449448 - 6102 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:14:09 - 1071544449448 - 6103 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:14:39 - 1071544479595 - 6104 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3218458852 - - - - 2003-12-15T22:14:39 - 1071544479596 - 6105 - org.codehaus.logger - INFO - Processing - run - 1195 - start run - - - 2003-12-15T22:14:39 - 1071544479597 - 6106 - org.codehaus.logger - INFO - Processing - run - 1195 - end run - - - 2003-12-15T22:14:39 - 1071544479597 - 6107 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:14:39 - 1071544479597 - 6108 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:14:41 - 1071544481985 - 6109 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T22:14:41 - 1071544481986 - 6110 - org.codehaus.logger - INFO - Processing - run - 1196 - start run - - - 2003-12-15T22:14:41 - 1071544481987 - 6111 - org.codehaus.logger - INFO - Processing - run - 1196 - end run - - - 2003-12-15T22:14:41 - 1071544481987 - 6112 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T22:14:41 - 1071544481988 - 6113 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T22:15:09 - 1071544509746 - 6114 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3248608942 - - - - 2003-12-15T22:15:09 - 1071544509747 - 6115 - org.codehaus.logger - INFO - Processing - run - 1197 - start run - - - 2003-12-15T22:15:09 - 1071544509747 - 6116 - org.codehaus.logger - INFO - Processing - run - 1197 - end run - - - 2003-12-15T22:15:09 - 1071544509748 - 6117 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:15:09 - 1071544509748 - 6118 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:15:39 - 1071544539945 - 6119 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3278759037 - - - - 2003-12-15T22:15:39 - 1071544539946 - 6120 - org.codehaus.logger - INFO - Processing - run - 1198 - start run - - - 2003-12-15T22:15:39 - 1071544539946 - 6121 - org.codehaus.logger - INFO - Processing - run - 1198 - end run - - - 2003-12-15T22:15:39 - 1071544539947 - 6122 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:15:39 - 1071544539947 - 6123 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:16:10 - 1071544570106 - 6124 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3308919121 - - - - 2003-12-15T22:16:10 - 1071544570106 - 6125 - org.codehaus.logger - INFO - Processing - run - 1199 - start run - - - 2003-12-15T22:16:10 - 1071544570107 - 6126 - org.codehaus.logger - INFO - Processing - run - 1199 - end run - - - 2003-12-15T22:16:10 - 1071544570107 - 6127 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:16:10 - 1071544570107 - 6128 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:16:40 - 1071544600246 - 6129 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3339089216 - - - - 2003-12-15T22:16:40 - 1071544600246 - 6130 - org.codehaus.logger - INFO - Processing - run - 1200 - start run - - - 2003-12-15T22:16:40 - 1071544600247 - 6131 - org.codehaus.logger - INFO - Processing - run - 1200 - end run - - - 2003-12-15T22:16:40 - 1071544600247 - 6132 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:16:40 - 1071544600247 - 6133 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:17:10 - 1071544630406 - 6134 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3369249306 - - - - 2003-12-15T22:17:10 - 1071544630407 - 6135 - org.codehaus.logger - INFO - Processing - run - 1201 - start run - - - 2003-12-15T22:17:10 - 1071544630407 - 6136 - org.codehaus.logger - INFO - Processing - run - 1201 - end run - - - 2003-12-15T22:17:10 - 1071544630408 - 6137 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:17:10 - 1071544630409 - 6138 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:17:40 - 1071544660586 - 6139 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3399399409 - - - - 2003-12-15T22:17:40 - 1071544660587 - 6140 - org.codehaus.logger - INFO - Processing - run - 1202 - start run - - - 2003-12-15T22:17:40 - 1071544660587 - 6141 - org.codehaus.logger - INFO - Processing - run - 1202 - end run - - - 2003-12-15T22:17:40 - 1071544660588 - 6142 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:17:40 - 1071544660588 - 6143 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:18:10 - 1071544690726 - 6144 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3429549494 - - - - 2003-12-15T22:18:10 - 1071544690727 - 6145 - org.codehaus.logger - INFO - Processing - run - 1203 - start run - - - 2003-12-15T22:18:10 - 1071544690727 - 6146 - org.codehaus.logger - INFO - Processing - run - 1203 - end run - - - 2003-12-15T22:18:10 - 1071544690728 - 6147 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:18:10 - 1071544690728 - 6148 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:18:40 - 1071544720826 - 6149 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3459689586 - - - - 2003-12-15T22:18:40 - 1071544720827 - 6150 - org.codehaus.logger - INFO - Processing - run - 1204 - start run - - - 2003-12-15T22:18:40 - 1071544720827 - 6151 - org.codehaus.logger - INFO - Processing - run - 1204 - end run - - - 2003-12-15T22:18:40 - 1071544720828 - 6152 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:18:40 - 1071544720828 - 6153 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:19:10 - 1071544750966 - 6154 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3489829685 - - - - 2003-12-15T22:19:10 - 1071544750967 - 6155 - org.codehaus.logger - INFO - Processing - run - 1205 - start run - - - 2003-12-15T22:19:10 - 1071544750967 - 6156 - org.codehaus.logger - INFO - Processing - run - 1205 - end run - - - 2003-12-15T22:19:10 - 1071544750968 - 6157 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:19:10 - 1071544750968 - 6158 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:19:41 - 1071544781116 - 6159 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3519979782 - - - - 2003-12-15T22:19:41 - 1071544781117 - 6160 - org.codehaus.logger - INFO - Processing - run - 1206 - start run - - - 2003-12-15T22:19:41 - 1071544781118 - 6161 - org.codehaus.logger - INFO - Processing - run - 1206 - end run - - - 2003-12-15T22:19:41 - 1071544781118 - 6162 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:19:41 - 1071544781118 - 6163 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:19:41 - 1071544781906 - 6164 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T22:19:41 - 1071544781907 - 6165 - org.codehaus.logger - INFO - Processing - run - 1207 - start run - - - 2003-12-15T22:19:41 - 1071544781908 - 6166 - org.codehaus.logger - INFO - Processing - run - 1207 - end run - - - 2003-12-15T22:19:41 - 1071544781908 - 6167 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T22:19:41 - 1071544781909 - 6168 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T22:20:11 - 1071544811267 - 6169 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3550129878 - - - - 2003-12-15T22:20:11 - 1071544811271 - 6170 - org.codehaus.logger - INFO - Processing - run - 1208 - start run - - - 2003-12-15T22:20:11 - 1071544811271 - 6171 - org.codehaus.logger - INFO - Processing - run - 1208 - end run - - - 2003-12-15T22:20:11 - 1071544811271 - 6172 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:20:11 - 1071544811271 - 6173 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:20:41 - 1071544841427 - 6174 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3580269971 - - - - 2003-12-15T22:20:41 - 1071544841428 - 6175 - org.codehaus.logger - INFO - Processing - run - 1209 - start run - - - 2003-12-15T22:20:41 - 1071544841428 - 6176 - org.codehaus.logger - INFO - Processing - run - 1209 - end run - - - 2003-12-15T22:20:41 - 1071544841430 - 6177 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:20:41 - 1071544841430 - 6178 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:21:11 - 1071544871607 - 6179 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3610420075 - - - - 2003-12-15T22:21:11 - 1071544871607 - 6180 - org.codehaus.logger - INFO - Processing - run - 1210 - start run - - - 2003-12-15T22:21:11 - 1071544871607 - 6181 - org.codehaus.logger - INFO - Processing - run - 1210 - end run - - - 2003-12-15T22:21:11 - 1071544871608 - 6182 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:21:11 - 1071544871608 - 6183 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:21:41 - 1071544901747 - 6184 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3640590222 - - - - 2003-12-15T22:21:41 - 1071544901747 - 6185 - org.codehaus.logger - INFO - Processing - run - 1211 - start run - - - 2003-12-15T22:21:41 - 1071544901748 - 6186 - org.codehaus.logger - INFO - Processing - run - 1211 - end run - - - 2003-12-15T22:21:41 - 1071544901748 - 6187 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:21:41 - 1071544901748 - 6188 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:22:11 - 1071544931907 - 6189 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3670740272 - - - - 2003-12-15T22:22:11 - 1071544931907 - 6190 - org.codehaus.logger - INFO - Processing - run - 1212 - start run - - - 2003-12-15T22:22:11 - 1071544931908 - 6191 - org.codehaus.logger - INFO - Processing - run - 1212 - end run - - - 2003-12-15T22:22:11 - 1071544931908 - 6192 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:22:11 - 1071544931908 - 6193 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:22:42 - 1071544962047 - 6194 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3700890372 - - - - 2003-12-15T22:22:42 - 1071544962047 - 6195 - org.codehaus.logger - INFO - Processing - run - 1213 - start run - - - 2003-12-15T22:22:42 - 1071544962048 - 6196 - org.codehaus.logger - INFO - Processing - run - 1213 - end run - - - 2003-12-15T22:22:42 - 1071544962048 - 6197 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:22:42 - 1071544962048 - 6198 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:23:12 - 1071544992187 - 6199 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3731040476 - - - - 2003-12-15T22:23:12 - 1071544992188 - 6200 - org.codehaus.logger - INFO - Processing - run - 1214 - start run - - - 2003-12-15T22:23:12 - 1071544992188 - 6201 - org.codehaus.logger - INFO - Processing - run - 1214 - end run - - - 2003-12-15T22:23:12 - 1071544992188 - 6202 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:23:12 - 1071544992188 - 6203 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:23:42 - 1071545022337 - 6204 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3761190623 - - - - 2003-12-15T22:23:42 - 1071545022338 - 6205 - org.codehaus.logger - INFO - Processing - run - 1215 - start run - - - 2003-12-15T22:23:42 - 1071545022338 - 6206 - org.codehaus.logger - INFO - Processing - run - 1215 - end run - - - 2003-12-15T22:23:42 - 1071545022339 - 6207 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:23:42 - 1071545022339 - 6208 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:24:12 - 1071545052477 - 6209 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3791340681 - - - - 2003-12-15T22:24:12 - 1071545052478 - 6210 - org.codehaus.logger - INFO - Processing - run - 1216 - start run - - - 2003-12-15T22:24:12 - 1071545052478 - 6211 - org.codehaus.logger - INFO - Processing - run - 1216 - end run - - - 2003-12-15T22:24:12 - 1071545052479 - 6212 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:24:12 - 1071545052479 - 6213 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:24:41 - 1071545081967 - 6214 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T22:24:41 - 1071545081968 - 6215 - org.codehaus.logger - INFO - Processing - run - 1217 - start run - - - 2003-12-15T22:24:41 - 1071545081969 - 6216 - org.codehaus.logger - INFO - Processing - run - 1217 - end run - - - 2003-12-15T22:24:41 - 1071545081970 - 6217 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T22:24:41 - 1071545081970 - 6218 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T22:24:42 - 1071545082627 - 6219 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3821490785 - - - - 2003-12-15T22:24:42 - 1071545082628 - 6220 - org.codehaus.logger - INFO - Processing - run - 1218 - start run - - - 2003-12-15T22:24:42 - 1071545082628 - 6221 - org.codehaus.logger - INFO - Processing - run - 1218 - end run - - - 2003-12-15T22:24:42 - 1071545082629 - 6222 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:24:42 - 1071545082629 - 6223 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:25:12 - 1071545112807 - 6224 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3851640892 - - - - 2003-12-15T22:25:12 - 1071545112808 - 6225 - org.codehaus.logger - INFO - Processing - run - 1219 - start run - - - 2003-12-15T22:25:12 - 1071545112808 - 6226 - org.codehaus.logger - INFO - Processing - run - 1219 - end run - - - 2003-12-15T22:25:12 - 1071545112809 - 6227 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:25:12 - 1071545112809 - 6228 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:25:42 - 1071545142957 - 6229 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3881790996 - - - - 2003-12-15T22:25:42 - 1071545142958 - 6230 - org.codehaus.logger - INFO - Processing - run - 1220 - start run - - - 2003-12-15T22:25:42 - 1071545142958 - 6231 - org.codehaus.logger - INFO - Processing - run - 1220 - end run - - - 2003-12-15T22:25:42 - 1071545142959 - 6232 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:25:42 - 1071545142959 - 6233 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:26:13 - 1071545173108 - 6234 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3911941151 - - - - 2003-12-15T22:26:13 - 1071545173108 - 6235 - org.codehaus.logger - INFO - Processing - run - 1221 - start run - - - 2003-12-15T22:26:13 - 1071545173108 - 6236 - org.codehaus.logger - INFO - Processing - run - 1221 - end run - - - 2003-12-15T22:26:13 - 1071545173109 - 6237 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:26:13 - 1071545173109 - 6238 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:26:43 - 1071545203248 - 6239 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3942091208 - - - - 2003-12-15T22:26:43 - 1071545203249 - 6240 - org.codehaus.logger - INFO - Processing - run - 1222 - start run - - - 2003-12-15T22:26:43 - 1071545203249 - 6241 - org.codehaus.logger - INFO - Processing - run - 1222 - end run - - - 2003-12-15T22:26:43 - 1071545203249 - 6242 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:26:43 - 1071545203249 - 6243 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:27:13 - 1071545233408 - 6244 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3972241350 - - - - 2003-12-15T22:27:13 - 1071545233408 - 6245 - org.codehaus.logger - INFO - Processing - run - 1223 - start run - - - 2003-12-15T22:27:13 - 1071545233409 - 6246 - org.codehaus.logger - INFO - Processing - run - 1223 - end run - - - 2003-12-15T22:27:13 - 1071545233409 - 6247 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:27:13 - 1071545233409 - 6248 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:27:43 - 1071545263518 - 6249 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4002381432 - - - - 2003-12-15T22:27:43 - 1071545263519 - 6250 - org.codehaus.logger - INFO - Processing - run - 1224 - start run - - - 2003-12-15T22:27:43 - 1071545263519 - 6251 - org.codehaus.logger - INFO - Processing - run - 1224 - end run - - - 2003-12-15T22:27:43 - 1071545263519 - 6252 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:27:43 - 1071545263520 - 6253 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:28:13 - 1071545293718 - 6254 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4032531535 - - - - 2003-12-15T22:28:13 - 1071545293719 - 6255 - org.codehaus.logger - INFO - Processing - run - 1225 - start run - - - 2003-12-15T22:28:13 - 1071545293720 - 6256 - org.codehaus.logger - INFO - Processing - run - 1225 - end run - - - 2003-12-15T22:28:13 - 1071545293720 - 6257 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:28:13 - 1071545293720 - 6258 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:28:43 - 1071545323858 - 6259 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4062681652 - - - - 2003-12-15T22:28:43 - 1071545323859 - 6260 - org.codehaus.logger - INFO - Processing - run - 1226 - start run - - - 2003-12-15T22:28:43 - 1071545323859 - 6261 - org.codehaus.logger - INFO - Processing - run - 1226 - end run - - - 2003-12-15T22:28:43 - 1071545323859 - 6262 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:28:43 - 1071545323859 - 6263 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:29:14 - 1071545354008 - 6264 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4092831798 - - - - 2003-12-15T22:29:14 - 1071545354009 - 6265 - org.codehaus.logger - INFO - Processing - run - 1227 - start run - - - 2003-12-15T22:29:14 - 1071545354009 - 6266 - org.codehaus.logger - INFO - Processing - run - 1227 - end run - - - 2003-12-15T22:29:14 - 1071545354009 - 6267 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:29:14 - 1071545354010 - 6268 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:29:41 - 1071545381909 - 6269 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T22:29:41 - 1071545381911 - 6270 - org.codehaus.logger - INFO - Processing - run - 1228 - start run - - - 2003-12-15T22:29:41 - 1071545381911 - 6271 - org.codehaus.logger - INFO - Processing - run - 1228 - end run - - - 2003-12-15T22:29:41 - 1071545381911 - 6272 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T22:29:41 - 1071545381911 - 6273 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T22:29:44 - 1071545384138 - 6274 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4122981936 - - - - 2003-12-15T22:29:44 - 1071545384140 - 6275 - org.codehaus.logger - INFO - Processing - run - 1229 - start run - - - 2003-12-15T22:29:44 - 1071545384140 - 6276 - org.codehaus.logger - INFO - Processing - run - 1229 - end run - - - 2003-12-15T22:29:44 - 1071545384141 - 6277 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:29:44 - 1071545384141 - 6278 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:30:14 - 1071545414339 - 6279 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4153152092 - - - - 2003-12-15T22:30:14 - 1071545414340 - 6280 - org.codehaus.logger - INFO - Processing - run - 1230 - start run - - - 2003-12-15T22:30:14 - 1071545414340 - 6281 - org.codehaus.logger - INFO - Processing - run - 1230 - end run - - - 2003-12-15T22:30:14 - 1071545414341 - 6282 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:30:14 - 1071545414341 - 6283 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:30:44 - 1071545444479 - 6284 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4183302206 - - - - 2003-12-15T22:30:44 - 1071545444479 - 6285 - org.codehaus.logger - INFO - Processing - run - 1231 - start run - - - 2003-12-15T22:30:44 - 1071545444480 - 6286 - org.codehaus.logger - INFO - Processing - run - 1231 - end run - - - 2003-12-15T22:30:44 - 1071545444480 - 6287 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:30:44 - 1071545444480 - 6288 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:31:14 - 1071545474639 - 6289 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4213452368 - - - - 2003-12-15T22:31:14 - 1071545474640 - 6290 - org.codehaus.logger - INFO - Processing - run - 1232 - start run - - - 2003-12-15T22:31:14 - 1071545474641 - 6291 - org.codehaus.logger - INFO - Processing - run - 1232 - end run - - - 2003-12-15T22:31:14 - 1071545474641 - 6292 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:31:14 - 1071545474641 - 6293 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:31:44 - 1071545504779 - 6294 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4243602577 - - - - 2003-12-15T22:31:44 - 1071545504781 - 6295 - org.codehaus.logger - INFO - Processing - run - 1233 - start run - - - 2003-12-15T22:31:44 - 1071545504781 - 6296 - org.codehaus.logger - INFO - Processing - run - 1233 - end run - - - 2003-12-15T22:31:44 - 1071545504781 - 6297 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:31:44 - 1071545504781 - 6298 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:32:14 - 1071545534879 - 6299 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4273742657 - - - - 2003-12-15T22:32:14 - 1071545534880 - 6300 - org.codehaus.logger - INFO - Processing - run - 1234 - start run - - - 2003-12-15T22:32:14 - 1071545534880 - 6301 - org.codehaus.logger - INFO - Processing - run - 1234 - end run - - - 2003-12-15T22:32:14 - 1071545534881 - 6302 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:32:14 - 1071545534881 - 6303 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:32:45 - 1071545565019 - 6304 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG8915506 - - - - 2003-12-15T22:32:45 - 1071545565021 - 6305 - org.codehaus.logger - INFO - Processing - run - 1235 - start run - - - 2003-12-15T22:32:45 - 1071545565021 - 6306 - org.codehaus.logger - INFO - Processing - run - 1235 - end run - - - 2003-12-15T22:32:45 - 1071545565022 - 6307 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:32:45 - 1071545565022 - 6308 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:33:15 - 1071545595180 - 6309 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG39075652 - - - - 2003-12-15T22:33:15 - 1071545595181 - 6310 - org.codehaus.logger - INFO - Processing - run - 1236 - start run - - - 2003-12-15T22:33:15 - 1071545595181 - 6311 - org.codehaus.logger - INFO - Processing - run - 1236 - end run - - - 2003-12-15T22:33:15 - 1071545595182 - 6312 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:33:15 - 1071545595182 - 6313 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:33:45 - 1071545625380 - 6314 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG69235800 - - - - 2003-12-15T22:33:45 - 1071545625380 - 6315 - org.codehaus.logger - INFO - Processing - run - 1237 - start run - - - 2003-12-15T22:33:45 - 1071545625380 - 6316 - org.codehaus.logger - INFO - Processing - run - 1237 - end run - - - 2003-12-15T22:33:45 - 1071545625381 - 6317 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:33:45 - 1071545625381 - 6318 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:34:15 - 1071545655530 - 6319 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG99385954 - - - - 2003-12-15T22:34:15 - 1071545655531 - 6320 - org.codehaus.logger - INFO - Processing - run - 1238 - start run - - - 2003-12-15T22:34:15 - 1071545655531 - 6321 - org.codehaus.logger - INFO - Processing - run - 1238 - end run - - - 2003-12-15T22:34:15 - 1071545655532 - 6322 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:34:15 - 1071545655532 - 6323 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:34:41 - 1071545681940 - 6324 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T22:34:41 - 1071545681940 - 6325 - org.codehaus.logger - INFO - Processing - run - 1239 - start run - - - 2003-12-15T22:34:41 - 1071545681941 - 6326 - org.codehaus.logger - INFO - Processing - run - 1239 - end run - - - 2003-12-15T22:34:41 - 1071545681941 - 6327 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T22:34:41 - 1071545681941 - 6328 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T22:34:45 - 1071545685690 - 6329 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG129536098 - - - - 2003-12-15T22:34:45 - 1071545685691 - 6330 - org.codehaus.logger - INFO - Processing - run - 1240 - start run - - - 2003-12-15T22:34:45 - 1071545685691 - 6331 - org.codehaus.logger - INFO - Processing - run - 1240 - end run - - - 2003-12-15T22:34:45 - 1071545685692 - 6332 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:34:45 - 1071545685692 - 6333 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:35:15 - 1071545715840 - 6334 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG159686252 - - - - 2003-12-15T22:35:15 - 1071545715843 - 6335 - org.codehaus.logger - INFO - Processing - run - 1241 - start run - - - 2003-12-15T22:35:15 - 1071545715843 - 6336 - org.codehaus.logger - INFO - Processing - run - 1241 - end run - - - 2003-12-15T22:35:15 - 1071545715843 - 6337 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:35:15 - 1071545715843 - 6338 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:35:45 - 1071545745980 - 6339 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG189826418 - - - - 2003-12-15T22:35:45 - 1071545745981 - 6340 - org.codehaus.logger - INFO - Processing - run - 1242 - start run - - - 2003-12-15T22:35:45 - 1071545745981 - 6341 - org.codehaus.logger - INFO - Processing - run - 1242 - end run - - - 2003-12-15T22:35:45 - 1071545745981 - 6342 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:35:45 - 1071545745982 - 6343 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:36:16 - 1071545776130 - 6344 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG219976538 - - - - 2003-12-15T22:36:16 - 1071545776131 - 6345 - org.codehaus.logger - INFO - Processing - run - 1243 - start run - - - 2003-12-15T22:36:16 - 1071545776131 - 6346 - org.codehaus.logger - INFO - Processing - run - 1243 - end run - - - 2003-12-15T22:36:16 - 1071545776132 - 6347 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:36:16 - 1071545776132 - 6348 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:36:46 - 1071545806270 - 6349 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG250136670 - - - - 2003-12-15T22:36:46 - 1071545806271 - 6350 - org.codehaus.logger - INFO - Processing - run - 1244 - start run - - - 2003-12-15T22:36:46 - 1071545806271 - 6351 - org.codehaus.logger - INFO - Processing - run - 1244 - end run - - - 2003-12-15T22:36:46 - 1071545806271 - 6352 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:36:46 - 1071545806272 - 6353 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:37:16 - 1071545836411 - 6354 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG280286839 - - - - 2003-12-15T22:37:16 - 1071545836412 - 6355 - org.codehaus.logger - INFO - Processing - run - 1245 - start run - - - 2003-12-15T22:37:16 - 1071545836412 - 6356 - org.codehaus.logger - INFO - Processing - run - 1245 - end run - - - 2003-12-15T22:37:16 - 1071545836413 - 6357 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:37:16 - 1071545836413 - 6358 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:37:46 - 1071545866561 - 6359 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG310436996 - - - - 2003-12-15T22:37:46 - 1071545866561 - 6360 - org.codehaus.logger - INFO - Processing - run - 1246 - start run - - - 2003-12-15T22:37:46 - 1071545866562 - 6361 - org.codehaus.logger - INFO - Processing - run - 1246 - end run - - - 2003-12-15T22:37:46 - 1071545866562 - 6362 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:37:46 - 1071545866562 - 6363 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:38:16 - 1071545896701 - 6364 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG340587177 - - - - 2003-12-15T22:38:16 - 1071545896701 - 6365 - org.codehaus.logger - INFO - Processing - run - 1247 - start run - - - 2003-12-15T22:38:16 - 1071545896702 - 6366 - org.codehaus.logger - INFO - Processing - run - 1247 - end run - - - 2003-12-15T22:38:16 - 1071545896702 - 6367 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:38:16 - 1071545896702 - 6368 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:38:46 - 1071545926861 - 6369 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG370737288 - - - - 2003-12-15T22:38:46 - 1071545926862 - 6370 - org.codehaus.logger - INFO - Processing - run - 1248 - start run - - - 2003-12-15T22:38:46 - 1071545926862 - 6371 - org.codehaus.logger - INFO - Processing - run - 1248 - end run - - - 2003-12-15T22:38:46 - 1071545926862 - 6372 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:38:46 - 1071545926862 - 6373 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:39:17 - 1071545957003 - 6374 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG400887438 - - - - 2003-12-15T22:39:17 - 1071545957004 - 6375 - org.codehaus.logger - INFO - Processing - run - 1249 - start run - - - 2003-12-15T22:39:17 - 1071545957004 - 6376 - org.codehaus.logger - INFO - Processing - run - 1249 - end run - - - 2003-12-15T22:39:17 - 1071545957004 - 6377 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:39:17 - 1071545957004 - 6378 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:39:42 - 1071545982011 - 6379 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T22:39:42 - 1071545982012 - 6380 - org.codehaus.logger - INFO - Processing - run - 1250 - start run - - - 2003-12-15T22:39:42 - 1071545982012 - 6381 - org.codehaus.logger - INFO - Processing - run - 1250 - end run - - - 2003-12-15T22:39:42 - 1071545982012 - 6382 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T22:39:42 - 1071545982013 - 6383 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T22:39:47 - 1071545987191 - 6384 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG431078215 - - - - 2003-12-15T22:39:47 - 1071545987192 - 6385 - org.codehaus.logger - INFO - Processing - run - 1251 - start run - - - 2003-12-15T22:39:47 - 1071545987193 - 6386 - org.codehaus.logger - INFO - Processing - run - 1251 - end run - - - 2003-12-15T22:39:47 - 1071545987193 - 6387 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:39:47 - 1071545987193 - 6388 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:40:17 - 1071546017392 - 6389 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG461257749 - - - - 2003-12-15T22:40:17 - 1071546017392 - 6390 - org.codehaus.logger - INFO - Processing - run - 1252 - start run - - - 2003-12-15T22:40:17 - 1071546017392 - 6391 - org.codehaus.logger - INFO - Processing - run - 1252 - end run - - - 2003-12-15T22:40:17 - 1071546017393 - 6392 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:40:17 - 1071546017393 - 6393 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:40:47 - 1071546047542 - 6394 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG491407890 - - - - 2003-12-15T22:40:47 - 1071546047542 - 6395 - org.codehaus.logger - INFO - Processing - run - 1253 - start run - - - 2003-12-15T22:40:47 - 1071546047543 - 6396 - org.codehaus.logger - INFO - Processing - run - 1253 - end run - - - 2003-12-15T22:40:47 - 1071546047543 - 6397 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:40:47 - 1071546047543 - 6398 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:41:17 - 1071546077702 - 6399 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG521558053 - - - - 2003-12-15T22:41:17 - 1071546077702 - 6400 - org.codehaus.logger - INFO - Processing - run - 1254 - start run - - - 2003-12-15T22:41:17 - 1071546077703 - 6401 - org.codehaus.logger - INFO - Processing - run - 1254 - end run - - - 2003-12-15T22:41:17 - 1071546077703 - 6402 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:41:17 - 1071546077703 - 6403 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:41:47 - 1071546107842 - 6404 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG551708203 - - - - 2003-12-15T22:41:47 - 1071546107843 - 6405 - org.codehaus.logger - INFO - Processing - run - 1255 - start run - - - 2003-12-15T22:41:47 - 1071546107843 - 6406 - org.codehaus.logger - INFO - Processing - run - 1255 - end run - - - 2003-12-15T22:41:47 - 1071546107843 - 6407 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:41:47 - 1071546107843 - 6408 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:42:17 - 1071546137992 - 6409 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG581858382 - - - - 2003-12-15T22:42:17 - 1071546137993 - 6410 - org.codehaus.logger - INFO - Processing - run - 1256 - start run - - - 2003-12-15T22:42:17 - 1071546137993 - 6411 - org.codehaus.logger - INFO - Processing - run - 1256 - end run - - - 2003-12-15T22:42:17 - 1071546137993 - 6412 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:42:17 - 1071546137995 - 6413 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:42:48 - 1071546168182 - 6414 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG612028515 - - - - 2003-12-15T22:42:48 - 1071546168183 - 6415 - org.codehaus.logger - INFO - Processing - run - 1257 - start run - - - 2003-12-15T22:42:48 - 1071546168184 - 6416 - org.codehaus.logger - INFO - Processing - run - 1257 - end run - - - 2003-12-15T22:42:48 - 1071546168184 - 6417 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:42:48 - 1071546168185 - 6418 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:43:18 - 1071546198332 - 6419 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG642188673 - - - - 2003-12-15T22:43:18 - 1071546198333 - 6420 - org.codehaus.logger - INFO - Processing - run - 1258 - start run - - - 2003-12-15T22:43:18 - 1071546198333 - 6421 - org.codehaus.logger - INFO - Processing - run - 1258 - end run - - - 2003-12-15T22:43:18 - 1071546198334 - 6422 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:43:18 - 1071546198334 - 6423 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:43:48 - 1071546228493 - 6424 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG672338818 - - - - 2003-12-15T22:43:48 - 1071546228495 - 6425 - org.codehaus.logger - INFO - Processing - run - 1259 - start run - - - 2003-12-15T22:43:48 - 1071546228495 - 6426 - org.codehaus.logger - INFO - Processing - run - 1259 - end run - - - 2003-12-15T22:43:48 - 1071546228495 - 6427 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:43:48 - 1071546228496 - 6428 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:44:18 - 1071546258633 - 6429 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG702488994 - - - - 2003-12-15T22:44:18 - 1071546258633 - 6430 - org.codehaus.logger - INFO - Processing - run - 1260 - start run - - - 2003-12-15T22:44:18 - 1071546258634 - 6431 - org.codehaus.logger - INFO - Processing - run - 1260 - end run - - - 2003-12-15T22:44:18 - 1071546258634 - 6432 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:44:18 - 1071546258634 - 6433 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:44:42 - 1071546282053 - 6434 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T22:44:42 - 1071546282053 - 6435 - org.codehaus.logger - INFO - Processing - run - 1261 - start run - - - 2003-12-15T22:44:42 - 1071546282054 - 6436 - org.codehaus.logger - INFO - Processing - run - 1261 - end run - - - 2003-12-15T22:44:42 - 1071546282054 - 6437 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T22:44:42 - 1071546282054 - 6438 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T22:44:48 - 1071546288783 - 6439 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG732639133 - - - - 2003-12-15T22:44:48 - 1071546288784 - 6440 - org.codehaus.logger - INFO - Processing - run - 1262 - start run - - - 2003-12-15T22:44:48 - 1071546288784 - 6441 - org.codehaus.logger - INFO - Processing - run - 1262 - end run - - - 2003-12-15T22:44:48 - 1071546288785 - 6442 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:44:48 - 1071546288785 - 6443 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:45:18 - 1071546318933 - 6444 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG762779286 - - - - 2003-12-15T22:45:18 - 1071546318934 - 6445 - org.codehaus.logger - INFO - Processing - run - 1263 - start run - - - 2003-12-15T22:45:18 - 1071546318934 - 6446 - org.codehaus.logger - INFO - Processing - run - 1263 - end run - - - 2003-12-15T22:45:18 - 1071546318934 - 6447 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:45:18 - 1071546318934 - 6448 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:45:49 - 1071546349083 - 6449 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG792929405 - - - - 2003-12-15T22:45:49 - 1071546349084 - 6450 - org.codehaus.logger - INFO - Processing - run - 1264 - start run - - - 2003-12-15T22:45:49 - 1071546349084 - 6451 - org.codehaus.logger - INFO - Processing - run - 1264 - end run - - - 2003-12-15T22:45:49 - 1071546349085 - 6452 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:45:49 - 1071546349086 - 6453 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:46:19 - 1071546379213 - 6454 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG823089366 - - - - 2003-12-15T22:46:19 - 1071546379214 - 6455 - org.codehaus.logger - INFO - Processing - run - 1265 - start run - - - 2003-12-15T22:46:19 - 1071546379214 - 6456 - org.codehaus.logger - INFO - Processing - run - 1265 - end run - - - 2003-12-15T22:46:19 - 1071546379214 - 6457 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:46:19 - 1071546379215 - 6458 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:46:49 - 1071546409353 - 6459 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG853239258 - - - - 2003-12-15T22:46:49 - 1071546409354 - 6460 - org.codehaus.logger - INFO - Processing - run - 1266 - start run - - - 2003-12-15T22:46:49 - 1071546409354 - 6461 - org.codehaus.logger - INFO - Processing - run - 1266 - end run - - - 2003-12-15T22:46:49 - 1071546409355 - 6462 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:46:49 - 1071546409355 - 6463 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:47:19 - 1071546439503 - 6464 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG883389196 - - - - 2003-12-15T22:47:19 - 1071546439504 - 6465 - org.codehaus.logger - INFO - Processing - run - 1267 - start run - - - 2003-12-15T22:47:19 - 1071546439504 - 6466 - org.codehaus.logger - INFO - Processing - run - 1267 - end run - - - 2003-12-15T22:47:19 - 1071546439504 - 6467 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:47:19 - 1071546439504 - 6468 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:47:49 - 1071546469643 - 6469 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG913529138 - - - - 2003-12-15T22:47:49 - 1071546469643 - 6470 - org.codehaus.logger - INFO - Processing - run - 1268 - start run - - - 2003-12-15T22:47:49 - 1071546469644 - 6471 - org.codehaus.logger - INFO - Processing - run - 1268 - end run - - - 2003-12-15T22:47:49 - 1071546469644 - 6472 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:47:49 - 1071546469644 - 6473 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:48:19 - 1071546499803 - 6474 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG943679081 - - - - 2003-12-15T22:48:19 - 1071546499804 - 6475 - org.codehaus.logger - INFO - Processing - run - 1269 - start run - - - 2003-12-15T22:48:19 - 1071546499805 - 6476 - org.codehaus.logger - INFO - Processing - run - 1269 - end run - - - 2003-12-15T22:48:19 - 1071546499805 - 6477 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:48:19 - 1071546499805 - 6478 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:48:49 - 1071546529953 - 6479 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG973829033 - - - - 2003-12-15T22:48:49 - 1071546529953 - 6480 - org.codehaus.logger - INFO - Processing - run - 1270 - start run - - - 2003-12-15T22:48:49 - 1071546529954 - 6481 - org.codehaus.logger - INFO - Processing - run - 1270 - end run - - - 2003-12-15T22:48:49 - 1071546529954 - 6482 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:48:49 - 1071546529954 - 6483 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:49:20 - 1071546560113 - 6484 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1003988981 - - - - 2003-12-15T22:49:20 - 1071546560113 - 6485 - org.codehaus.logger - INFO - Processing - run - 1271 - start run - - - 2003-12-15T22:49:20 - 1071546560114 - 6486 - org.codehaus.logger - INFO - Processing - run - 1271 - end run - - - 2003-12-15T22:49:20 - 1071546560114 - 6487 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:49:20 - 1071546560114 - 6488 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:49:41 - 1071546581943 - 6489 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T22:49:41 - 1071546581943 - 6490 - org.codehaus.logger - INFO - Processing - run - 1272 - start run - - - 2003-12-15T22:49:41 - 1071546581945 - 6491 - org.codehaus.logger - INFO - Processing - run - 1272 - end run - - - 2003-12-15T22:49:41 - 1071546581945 - 6492 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T22:49:41 - 1071546581945 - 6493 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T22:49:50 - 1071546590283 - 6494 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1034138933 - - - - 2003-12-15T22:49:50 - 1071546590284 - 6495 - org.codehaus.logger - INFO - Processing - run - 1273 - start run - - - 2003-12-15T22:49:50 - 1071546590284 - 6496 - org.codehaus.logger - INFO - Processing - run - 1273 - end run - - - 2003-12-15T22:49:50 - 1071546590285 - 6497 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:49:50 - 1071546590285 - 6498 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:50:20 - 1071546620483 - 6499 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1064328874 - - - - 2003-12-15T22:50:20 - 1071546620483 - 6500 - org.codehaus.logger - INFO - Processing - run - 1274 - start run - - - 2003-12-15T22:50:20 - 1071546620484 - 6501 - org.codehaus.logger - INFO - Processing - run - 1274 - end run - - - 2003-12-15T22:50:20 - 1071546620484 - 6502 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:50:20 - 1071546620484 - 6503 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:50:50 - 1071546650573 - 6504 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1094468845 - - - - 2003-12-15T22:50:50 - 1071546650574 - 6505 - org.codehaus.logger - INFO - Processing - run - 1275 - start run - - - 2003-12-15T22:50:50 - 1071546650575 - 6506 - org.codehaus.logger - INFO - Processing - run - 1275 - end run - - - 2003-12-15T22:50:50 - 1071546650575 - 6507 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:50:50 - 1071546650575 - 6508 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:51:20 - 1071546680733 - 6509 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1124628801 - - - - 2003-12-15T22:51:20 - 1071546680734 - 6510 - org.codehaus.logger - INFO - Processing - run - 1276 - start run - - - 2003-12-15T22:51:20 - 1071546680735 - 6511 - org.codehaus.logger - INFO - Processing - run - 1276 - end run - - - 2003-12-15T22:51:20 - 1071546680739 - 6512 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:51:20 - 1071546680739 - 6513 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:51:50 - 1071546710893 - 6514 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1154778737 - - - - 2003-12-15T22:51:50 - 1071546710893 - 6515 - org.codehaus.logger - INFO - Processing - run - 1277 - start run - - - 2003-12-15T22:51:50 - 1071546710893 - 6516 - org.codehaus.logger - INFO - Processing - run - 1277 - end run - - - 2003-12-15T22:51:50 - 1071546710894 - 6517 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:51:50 - 1071546710894 - 6518 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:52:21 - 1071546741033 - 6519 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1184928697 - - - - 2003-12-15T22:52:21 - 1071546741033 - 6520 - org.codehaus.logger - INFO - Processing - run - 1278 - start run - - - 2003-12-15T22:52:21 - 1071546741034 - 6521 - org.codehaus.logger - INFO - Processing - run - 1278 - end run - - - 2003-12-15T22:52:21 - 1071546741034 - 6522 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:52:21 - 1071546741034 - 6523 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:52:51 - 1071546771232 - 6524 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1215088655 - - - - 2003-12-15T22:52:51 - 1071546771233 - 6525 - org.codehaus.logger - INFO - Processing - run - 1279 - start run - - - 2003-12-15T22:52:51 - 1071546771233 - 6526 - org.codehaus.logger - INFO - Processing - run - 1279 - end run - - - 2003-12-15T22:52:51 - 1071546771234 - 6527 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:52:51 - 1071546771234 - 6528 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:53:21 - 1071546801432 - 6529 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1245279246 - - - - 2003-12-15T22:53:21 - 1071546801433 - 6530 - org.codehaus.logger - INFO - Processing - run - 1280 - start run - - - 2003-12-15T22:53:21 - 1071546801434 - 6531 - org.codehaus.logger - INFO - Processing - run - 1280 - end run - - - 2003-12-15T22:53:21 - 1071546801435 - 6532 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:53:21 - 1071546801435 - 6533 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:53:51 - 1071546831572 - 6534 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1275428588 - - - - 2003-12-15T22:53:51 - 1071546831573 - 6535 - org.codehaus.logger - INFO - Processing - run - 1281 - start run - - - 2003-12-15T22:53:51 - 1071546831573 - 6536 - org.codehaus.logger - INFO - Processing - run - 1281 - end run - - - 2003-12-15T22:53:51 - 1071546831573 - 6537 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:53:51 - 1071546831574 - 6538 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:54:21 - 1071546861672 - 6539 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1305568549 - - - - 2003-12-15T22:54:21 - 1071546861673 - 6540 - org.codehaus.logger - INFO - Processing - run - 1282 - start run - - - 2003-12-15T22:54:21 - 1071546861674 - 6541 - org.codehaus.logger - INFO - Processing - run - 1282 - end run - - - 2003-12-15T22:54:21 - 1071546861675 - 6542 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:54:21 - 1071546861675 - 6543 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:54:41 - 1071546881902 - 6544 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T22:54:41 - 1071546881903 - 6545 - org.codehaus.logger - INFO - Processing - run - 1283 - start run - - - 2003-12-15T22:54:41 - 1071546881904 - 6546 - org.codehaus.logger - INFO - Processing - run - 1283 - end run - - - 2003-12-15T22:54:41 - 1071546881904 - 6547 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T22:54:41 - 1071546881905 - 6548 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T22:54:51 - 1071546891832 - 6549 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1335718520 - - - - 2003-12-15T22:54:51 - 1071546891833 - 6550 - org.codehaus.logger - INFO - Processing - run - 1284 - start run - - - 2003-12-15T22:54:51 - 1071546891833 - 6551 - org.codehaus.logger - INFO - Processing - run - 1284 - end run - - - 2003-12-15T22:54:51 - 1071546891834 - 6552 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:54:51 - 1071546891834 - 6553 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:55:21 - 1071546921972 - 6554 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1365868486 - - - - 2003-12-15T22:55:21 - 1071546921973 - 6555 - org.codehaus.logger - INFO - Processing - run - 1285 - start run - - - 2003-12-15T22:55:21 - 1071546921973 - 6556 - org.codehaus.logger - INFO - Processing - run - 1285 - end run - - - 2003-12-15T22:55:21 - 1071546921974 - 6557 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:55:21 - 1071546921974 - 6558 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:55:52 - 1071546952172 - 6559 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1396018454 - - - - 2003-12-15T22:55:52 - 1071546952173 - 6560 - org.codehaus.logger - INFO - Processing - run - 1286 - start run - - - 2003-12-15T22:55:52 - 1071546952173 - 6561 - org.codehaus.logger - INFO - Processing - run - 1286 - end run - - - 2003-12-15T22:55:52 - 1071546952173 - 6562 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:55:52 - 1071546952174 - 6563 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:56:22 - 1071546982322 - 6564 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1426168459 - - - - 2003-12-15T22:56:22 - 1071546982323 - 6565 - org.codehaus.logger - INFO - Processing - run - 1287 - start run - - - 2003-12-15T22:56:22 - 1071546982324 - 6566 - org.codehaus.logger - INFO - Processing - run - 1287 - end run - - - 2003-12-15T22:56:22 - 1071546982324 - 6567 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:56:22 - 1071546982325 - 6568 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:56:52 - 1071547012473 - 6569 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1456328404 - - - - 2003-12-15T22:56:52 - 1071547012475 - 6570 - org.codehaus.logger - INFO - Processing - run - 1288 - start run - - - 2003-12-15T22:56:52 - 1071547012475 - 6571 - org.codehaus.logger - INFO - Processing - run - 1288 - end run - - - 2003-12-15T22:56:52 - 1071547012475 - 6572 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:56:52 - 1071547012476 - 6573 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:57:22 - 1071547042622 - 6574 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1486468400 - - - - 2003-12-15T22:57:22 - 1071547042623 - 6575 - org.codehaus.logger - INFO - Processing - run - 1289 - start run - - - 2003-12-15T22:57:22 - 1071547042623 - 6576 - org.codehaus.logger - INFO - Processing - run - 1289 - end run - - - 2003-12-15T22:57:22 - 1071547042623 - 6577 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:57:22 - 1071547042624 - 6578 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:57:52 - 1071547072762 - 6579 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1516618353 - - - - 2003-12-15T22:57:52 - 1071547072763 - 6580 - org.codehaus.logger - INFO - Processing - run - 1290 - start run - - - 2003-12-15T22:57:52 - 1071547072763 - 6581 - org.codehaus.logger - INFO - Processing - run - 1290 - end run - - - 2003-12-15T22:57:52 - 1071547072763 - 6582 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:57:52 - 1071547072764 - 6583 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:58:22 - 1071547102922 - 6584 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1546768341 - - - - 2003-12-15T22:58:22 - 1071547102923 - 6585 - org.codehaus.logger - INFO - Processing - run - 1291 - start run - - - 2003-12-15T22:58:22 - 1071547102923 - 6586 - org.codehaus.logger - INFO - Processing - run - 1291 - end run - - - 2003-12-15T22:58:22 - 1071547102923 - 6587 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:58:22 - 1071547102923 - 6588 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:58:53 - 1071547133002 - 6589 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1576898314 - - - - 2003-12-15T22:58:53 - 1071547133003 - 6590 - org.codehaus.logger - INFO - Processing - run - 1292 - start run - - - 2003-12-15T22:58:53 - 1071547133003 - 6591 - org.codehaus.logger - INFO - Processing - run - 1292 - end run - - - 2003-12-15T22:58:53 - 1071547133004 - 6592 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:58:53 - 1071547133004 - 6593 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:59:23 - 1071547163162 - 6594 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1607048304 - - - - 2003-12-15T22:59:23 - 1071547163163 - 6595 - org.codehaus.logger - INFO - Processing - run - 1293 - start run - - - 2003-12-15T22:59:23 - 1071547163163 - 6596 - org.codehaus.logger - INFO - Processing - run - 1293 - end run - - - 2003-12-15T22:59:23 - 1071547163164 - 6597 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:59:23 - 1071547163164 - 6598 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T22:59:41 - 1071547181942 - 6599 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T22:59:41 - 1071547181943 - 6600 - org.codehaus.logger - INFO - Processing - run - 1294 - start run - - - 2003-12-15T22:59:41 - 1071547181943 - 6601 - org.codehaus.logger - INFO - Processing - run - 1294 - end run - - - 2003-12-15T22:59:41 - 1071547181943 - 6602 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T22:59:41 - 1071547181943 - 6603 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T22:59:53 - 1071547193342 - 6604 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1637208278 - - - - 2003-12-15T22:59:53 - 1071547193343 - 6605 - org.codehaus.logger - INFO - Processing - run - 1295 - start run - - - 2003-12-15T22:59:53 - 1071547193343 - 6606 - org.codehaus.logger - INFO - Processing - run - 1295 - end run - - - 2003-12-15T22:59:53 - 1071547193343 - 6607 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T22:59:53 - 1071547193343 - 6608 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:00:23 - 1071547223482 - 6609 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1667348263 - - - - 2003-12-15T23:00:23 - 1071547223484 - 6610 - org.codehaus.logger - INFO - Processing - run - 1296 - start run - - - 2003-12-15T23:00:23 - 1071547223484 - 6611 - org.codehaus.logger - INFO - Processing - run - 1296 - end run - - - 2003-12-15T23:00:23 - 1071547223485 - 6612 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:00:23 - 1071547223485 - 6613 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:00:53 - 1071547253642 - 6614 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1697498259 - - - - 2003-12-15T23:00:53 - 1071547253643 - 6615 - org.codehaus.logger - INFO - Processing - run - 1297 - start run - - - 2003-12-15T23:00:53 - 1071547253643 - 6616 - org.codehaus.logger - INFO - Processing - run - 1297 - end run - - - 2003-12-15T23:00:53 - 1071547253644 - 6617 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:00:53 - 1071547253644 - 6618 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:01:23 - 1071547283782 - 6619 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1727648239 - - - - 2003-12-15T23:01:23 - 1071547283783 - 6620 - org.codehaus.logger - INFO - Processing - run - 1298 - start run - - - 2003-12-15T23:01:23 - 1071547283783 - 6621 - org.codehaus.logger - INFO - Processing - run - 1298 - end run - - - 2003-12-15T23:01:23 - 1071547283783 - 6622 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:01:23 - 1071547283783 - 6623 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:01:53 - 1071547313942 - 6624 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1757798238 - - - - 2003-12-15T23:01:53 - 1071547313943 - 6625 - org.codehaus.logger - INFO - Processing - run - 1299 - start run - - - 2003-12-15T23:01:53 - 1071547313943 - 6626 - org.codehaus.logger - INFO - Processing - run - 1299 - end run - - - 2003-12-15T23:01:53 - 1071547313943 - 6627 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:01:53 - 1071547313944 - 6628 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:02:24 - 1071547344082 - 6629 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1787948225 - - - - 2003-12-15T23:02:24 - 1071547344083 - 6630 - org.codehaus.logger - INFO - Processing - run - 1300 - start run - - - 2003-12-15T23:02:24 - 1071547344083 - 6631 - org.codehaus.logger - INFO - Processing - run - 1300 - end run - - - 2003-12-15T23:02:24 - 1071547344083 - 6632 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:02:24 - 1071547344083 - 6633 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:02:54 - 1071547374242 - 6634 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1818108249 - - - - 2003-12-15T23:02:54 - 1071547374243 - 6635 - org.codehaus.logger - INFO - Processing - run - 1301 - start run - - - 2003-12-15T23:02:54 - 1071547374243 - 6636 - org.codehaus.logger - INFO - Processing - run - 1301 - end run - - - 2003-12-15T23:02:54 - 1071547374243 - 6637 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:02:54 - 1071547374243 - 6638 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:03:24 - 1071547404382 - 6639 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1848248308 - - - - 2003-12-15T23:03:24 - 1071547404383 - 6640 - org.codehaus.logger - INFO - Processing - run - 1302 - start run - - - 2003-12-15T23:03:24 - 1071547404383 - 6641 - org.codehaus.logger - INFO - Processing - run - 1302 - end run - - - 2003-12-15T23:03:24 - 1071547404384 - 6642 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:03:24 - 1071547404384 - 6643 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:03:54 - 1071547434542 - 6644 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1878388378 - - - - 2003-12-15T23:03:54 - 1071547434543 - 6645 - org.codehaus.logger - INFO - Processing - run - 1303 - start run - - - 2003-12-15T23:03:54 - 1071547434544 - 6646 - org.codehaus.logger - INFO - Processing - run - 1303 - end run - - - 2003-12-15T23:03:54 - 1071547434544 - 6647 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:03:54 - 1071547434544 - 6648 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:04:24 - 1071547464682 - 6649 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1908538443 - - - - 2003-12-15T23:04:24 - 1071547464683 - 6650 - org.codehaus.logger - INFO - Processing - run - 1304 - start run - - - 2003-12-15T23:04:24 - 1071547464683 - 6651 - org.codehaus.logger - INFO - Processing - run - 1304 - end run - - - 2003-12-15T23:04:24 - 1071547464683 - 6652 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:04:24 - 1071547464684 - 6653 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:04:41 - 1071547481912 - 6654 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T23:04:41 - 1071547481913 - 6655 - org.codehaus.logger - INFO - Processing - run - 1305 - start run - - - 2003-12-15T23:04:41 - 1071547481913 - 6656 - org.codehaus.logger - INFO - Processing - run - 1305 - end run - - - 2003-12-15T23:04:41 - 1071547481914 - 6657 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T23:04:41 - 1071547481914 - 6658 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T23:04:54 - 1071547494782 - 6659 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1938678512 - - - - 2003-12-15T23:04:54 - 1071547494783 - 6660 - org.codehaus.logger - INFO - Processing - run - 1306 - start run - - - 2003-12-15T23:04:54 - 1071547494783 - 6661 - org.codehaus.logger - INFO - Processing - run - 1306 - end run - - - 2003-12-15T23:04:54 - 1071547494784 - 6662 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:04:54 - 1071547494784 - 6663 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:05:24 - 1071547524953 - 6664 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1968848582 - - - - 2003-12-15T23:05:24 - 1071547524953 - 6665 - org.codehaus.logger - INFO - Processing - run - 1307 - start run - - - 2003-12-15T23:05:24 - 1071547524954 - 6666 - org.codehaus.logger - INFO - Processing - run - 1307 - end run - - - 2003-12-15T23:05:24 - 1071547524954 - 6667 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:05:24 - 1071547524954 - 6668 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:05:55 - 1071547555152 - 6669 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1999008659 - - - - 2003-12-15T23:05:55 - 1071547555153 - 6670 - org.codehaus.logger - INFO - Processing - run - 1308 - start run - - - 2003-12-15T23:05:55 - 1071547555153 - 6671 - org.codehaus.logger - INFO - Processing - run - 1308 - end run - - - 2003-12-15T23:05:55 - 1071547555154 - 6672 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:05:55 - 1071547555154 - 6673 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:06:25 - 1071547585292 - 6674 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2029158725 - - - - 2003-12-15T23:06:25 - 1071547585293 - 6675 - org.codehaus.logger - INFO - Processing - run - 1309 - start run - - - 2003-12-15T23:06:25 - 1071547585293 - 6676 - org.codehaus.logger - INFO - Processing - run - 1309 - end run - - - 2003-12-15T23:06:25 - 1071547585294 - 6677 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:06:25 - 1071547585294 - 6678 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:06:55 - 1071547615443 - 6679 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2059298803 - - - - 2003-12-15T23:06:55 - 1071547615443 - 6680 - org.codehaus.logger - INFO - Processing - run - 1310 - start run - - - 2003-12-15T23:06:55 - 1071547615443 - 6681 - org.codehaus.logger - INFO - Processing - run - 1310 - end run - - - 2003-12-15T23:06:55 - 1071547615444 - 6682 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:06:55 - 1071547615444 - 6683 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:07:25 - 1071547645593 - 6684 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2089448876 - - - - 2003-12-15T23:07:25 - 1071547645593 - 6685 - org.codehaus.logger - INFO - Processing - run - 1311 - start run - - - 2003-12-15T23:07:25 - 1071547645594 - 6686 - org.codehaus.logger - INFO - Processing - run - 1311 - end run - - - 2003-12-15T23:07:25 - 1071547645594 - 6687 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:07:25 - 1071547645595 - 6688 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:07:55 - 1071547675713 - 6689 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2119598951 - - - - 2003-12-15T23:07:55 - 1071547675713 - 6690 - org.codehaus.logger - INFO - Processing - run - 1312 - start run - - - 2003-12-15T23:07:55 - 1071547675714 - 6691 - org.codehaus.logger - INFO - Processing - run - 1312 - end run - - - 2003-12-15T23:07:55 - 1071547675714 - 6692 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:07:55 - 1071547675714 - 6693 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:08:25 - 1071547705863 - 6694 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2149749071 - - - - 2003-12-15T23:08:25 - 1071547705863 - 6695 - org.codehaus.logger - INFO - Processing - run - 1313 - start run - - - 2003-12-15T23:08:25 - 1071547705864 - 6696 - org.codehaus.logger - INFO - Processing - run - 1313 - end run - - - 2003-12-15T23:08:25 - 1071547705864 - 6697 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:08:25 - 1071547705864 - 6698 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:08:56 - 1071547736003 - 6699 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2179899105 - - - - 2003-12-15T23:08:56 - 1071547736004 - 6700 - org.codehaus.logger - INFO - Processing - run - 1314 - start run - - - 2003-12-15T23:08:56 - 1071547736004 - 6701 - org.codehaus.logger - INFO - Processing - run - 1314 - end run - - - 2003-12-15T23:08:56 - 1071547736004 - 6702 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:08:56 - 1071547736005 - 6703 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:09:26 - 1071547766153 - 6704 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2210049189 - - - - 2003-12-15T23:09:26 - 1071547766154 - 6705 - org.codehaus.logger - INFO - Processing - run - 1315 - start run - - - 2003-12-15T23:09:26 - 1071547766154 - 6706 - org.codehaus.logger - INFO - Processing - run - 1315 - end run - - - 2003-12-15T23:09:26 - 1071547766154 - 6707 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:09:26 - 1071547766155 - 6708 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:09:41 - 1071547781923 - 6709 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T23:09:41 - 1071547781924 - 6710 - org.codehaus.logger - INFO - Processing - run - 1316 - start run - - - 2003-12-15T23:09:41 - 1071547781924 - 6711 - org.codehaus.logger - INFO - Processing - run - 1316 - end run - - - 2003-12-15T23:09:41 - 1071547781925 - 6712 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T23:09:41 - 1071547781925 - 6713 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T23:09:56 - 1071547796295 - 6714 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2240179317 - - - - 2003-12-15T23:09:56 - 1071547796295 - 6715 - org.codehaus.logger - INFO - Processing - run - 1317 - start run - - - 2003-12-15T23:09:56 - 1071547796296 - 6716 - org.codehaus.logger - INFO - Processing - run - 1317 - end run - - - 2003-12-15T23:09:56 - 1071547796296 - 6717 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:09:56 - 1071547796296 - 6718 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:10:26 - 1071547826493 - 6719 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2270339344 - - - - 2003-12-15T23:10:26 - 1071547826494 - 6720 - org.codehaus.logger - INFO - Processing - run - 1318 - start run - - - 2003-12-15T23:10:26 - 1071547826494 - 6721 - org.codehaus.logger - INFO - Processing - run - 1318 - end run - - - 2003-12-15T23:10:26 - 1071547826495 - 6722 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:10:26 - 1071547826495 - 6723 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:10:56 - 1071547856643 - 6724 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2300489422 - - - - 2003-12-15T23:10:56 - 1071547856644 - 6725 - org.codehaus.logger - INFO - Processing - run - 1319 - start run - - - 2003-12-15T23:10:56 - 1071547856645 - 6726 - org.codehaus.logger - INFO - Processing - run - 1319 - end run - - - 2003-12-15T23:10:56 - 1071547856645 - 6727 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:10:56 - 1071547856646 - 6728 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:11:26 - 1071547886763 - 6729 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2330639732 - - - - 2003-12-15T23:11:26 - 1071547886764 - 6730 - org.codehaus.logger - INFO - Processing - run - 1320 - start run - - - 2003-12-15T23:11:26 - 1071547886764 - 6731 - org.codehaus.logger - INFO - Processing - run - 1320 - end run - - - 2003-12-15T23:11:26 - 1071547886764 - 6732 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:11:26 - 1071547886765 - 6733 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:11:56 - 1071547916903 - 6734 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2360779589 - - - - 2003-12-15T23:11:56 - 1071547916904 - 6735 - org.codehaus.logger - INFO - Processing - run - 1321 - start run - - - 2003-12-15T23:11:56 - 1071547916904 - 6736 - org.codehaus.logger - INFO - Processing - run - 1321 - end run - - - 2003-12-15T23:11:56 - 1071547916905 - 6737 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:11:56 - 1071547916905 - 6738 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:12:27 - 1071547947063 - 6739 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2390929673 - - - - 2003-12-15T23:12:27 - 1071547947064 - 6740 - org.codehaus.logger - INFO - Processing - run - 1322 - start run - - - 2003-12-15T23:12:27 - 1071547947064 - 6741 - org.codehaus.logger - INFO - Processing - run - 1322 - end run - - - 2003-12-15T23:12:27 - 1071547947065 - 6742 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:12:27 - 1071547947065 - 6743 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:12:57 - 1071547977204 - 6744 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2421089872 - - - - 2003-12-15T23:12:57 - 1071547977204 - 6745 - org.codehaus.logger - INFO - Processing - run - 1323 - start run - - - 2003-12-15T23:12:57 - 1071547977204 - 6746 - org.codehaus.logger - INFO - Processing - run - 1323 - end run - - - 2003-12-15T23:12:57 - 1071547977205 - 6747 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:12:57 - 1071547977205 - 6748 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:13:27 - 1071548007374 - 6749 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2451249834 - - - - 2003-12-15T23:13:27 - 1071548007374 - 6750 - org.codehaus.logger - INFO - Processing - run - 1324 - start run - - - 2003-12-15T23:13:27 - 1071548007375 - 6751 - org.codehaus.logger - INFO - Processing - run - 1324 - end run - - - 2003-12-15T23:13:27 - 1071548007375 - 6752 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:13:27 - 1071548007375 - 6753 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:13:57 - 1071548037514 - 6754 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2481409924 - - - - 2003-12-15T23:13:57 - 1071548037515 - 6755 - org.codehaus.logger - INFO - Processing - run - 1325 - start run - - - 2003-12-15T23:13:57 - 1071548037516 - 6756 - org.codehaus.logger - INFO - Processing - run - 1325 - end run - - - 2003-12-15T23:13:57 - 1071548037516 - 6757 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:13:57 - 1071548037516 - 6758 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:14:27 - 1071548067664 - 6759 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2511550020 - - - - 2003-12-15T23:14:27 - 1071548067664 - 6760 - org.codehaus.logger - INFO - Processing - run - 1326 - start run - - - 2003-12-15T23:14:27 - 1071548067665 - 6761 - org.codehaus.logger - INFO - Processing - run - 1326 - end run - - - 2003-12-15T23:14:27 - 1071548067665 - 6762 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:14:27 - 1071548067665 - 6763 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:14:41 - 1071548081934 - 6764 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T23:14:41 - 1071548081934 - 6765 - org.codehaus.logger - INFO - Processing - run - 1327 - start run - - - 2003-12-15T23:14:41 - 1071548081936 - 6766 - org.codehaus.logger - INFO - Processing - run - 1327 - end run - - - 2003-12-15T23:14:41 - 1071548081936 - 6767 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T23:14:41 - 1071548081936 - 6768 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T23:14:57 - 1071548097844 - 6769 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2541700149 - - - - 2003-12-15T23:14:57 - 1071548097844 - 6770 - org.codehaus.logger - INFO - Processing - run - 1328 - start run - - - 2003-12-15T23:14:57 - 1071548097845 - 6771 - org.codehaus.logger - INFO - Processing - run - 1328 - end run - - - 2003-12-15T23:14:57 - 1071548097845 - 6772 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:14:57 - 1071548097845 - 6773 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:15:27 - 1071548127994 - 6774 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2571850189 - - - - 2003-12-15T23:15:27 - 1071548127995 - 6775 - org.codehaus.logger - INFO - Processing - run - 1329 - start run - - - 2003-12-15T23:15:27 - 1071548127995 - 6776 - org.codehaus.logger - INFO - Processing - run - 1329 - end run - - - 2003-12-15T23:15:27 - 1071548127996 - 6777 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:15:27 - 1071548127996 - 6778 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:15:58 - 1071548158134 - 6779 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2602000706 - - - - 2003-12-15T23:15:58 - 1071548158135 - 6780 - org.codehaus.logger - INFO - Processing - run - 1330 - start run - - - 2003-12-15T23:15:58 - 1071548158135 - 6781 - org.codehaus.logger - INFO - Processing - run - 1330 - end run - - - 2003-12-15T23:15:58 - 1071548158135 - 6782 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:15:58 - 1071548158135 - 6783 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:16:28 - 1071548188274 - 6784 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2632150991 - - - - 2003-12-15T23:16:28 - 1071548188275 - 6785 - org.codehaus.logger - INFO - Processing - run - 1331 - start run - - - 2003-12-15T23:16:28 - 1071548188276 - 6786 - org.codehaus.logger - INFO - Processing - run - 1331 - end run - - - 2003-12-15T23:16:28 - 1071548188276 - 6787 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:16:28 - 1071548188276 - 6788 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:16:58 - 1071548218414 - 6789 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2662290455 - - - - 2003-12-15T23:16:58 - 1071548218415 - 6790 - org.codehaus.logger - INFO - Processing - run - 1332 - start run - - - 2003-12-15T23:16:58 - 1071548218415 - 6791 - org.codehaus.logger - INFO - Processing - run - 1332 - end run - - - 2003-12-15T23:16:58 - 1071548218415 - 6792 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:16:58 - 1071548218415 - 6793 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:17:28 - 1071548248564 - 6794 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2692440551 - - - - 2003-12-15T23:17:28 - 1071548248566 - 6795 - org.codehaus.logger - INFO - Processing - run - 1333 - start run - - - 2003-12-15T23:17:28 - 1071548248566 - 6796 - org.codehaus.logger - INFO - Processing - run - 1333 - end run - - - 2003-12-15T23:17:28 - 1071548248566 - 6797 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:17:28 - 1071548248567 - 6798 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:17:58 - 1071548278714 - 6799 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2722590640 - - - - 2003-12-15T23:17:58 - 1071548278715 - 6800 - org.codehaus.logger - INFO - Processing - run - 1334 - start run - - - 2003-12-15T23:17:58 - 1071548278715 - 6801 - org.codehaus.logger - INFO - Processing - run - 1334 - end run - - - 2003-12-15T23:17:58 - 1071548278716 - 6802 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:17:58 - 1071548278716 - 6803 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:18:28 - 1071548308865 - 6804 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2752730731 - - - - 2003-12-15T23:18:28 - 1071548308865 - 6805 - org.codehaus.logger - INFO - Processing - run - 1335 - start run - - - 2003-12-15T23:18:28 - 1071548308867 - 6806 - org.codehaus.logger - INFO - Processing - run - 1335 - end run - - - 2003-12-15T23:18:28 - 1071548308867 - 6807 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:18:28 - 1071548308867 - 6808 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:18:59 - 1071548339005 - 6809 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2782880871 - - - - 2003-12-15T23:18:59 - 1071548339006 - 6810 - org.codehaus.logger - INFO - Processing - run - 1336 - start run - - - 2003-12-15T23:18:59 - 1071548339006 - 6811 - org.codehaus.logger - INFO - Processing - run - 1336 - end run - - - 2003-12-15T23:18:59 - 1071548339007 - 6812 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:18:59 - 1071548339007 - 6813 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:19:29 - 1071548369165 - 6814 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2813040921 - - - - 2003-12-15T23:19:29 - 1071548369166 - 6815 - org.codehaus.logger - INFO - Processing - run - 1337 - start run - - - 2003-12-15T23:19:29 - 1071548369167 - 6816 - org.codehaus.logger - INFO - Processing - run - 1337 - end run - - - 2003-12-15T23:19:29 - 1071548369167 - 6817 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:19:29 - 1071548369167 - 6818 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:19:41 - 1071548381935 - 6819 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T23:19:41 - 1071548381935 - 6820 - org.codehaus.logger - INFO - Processing - run - 1338 - start run - - - 2003-12-15T23:19:41 - 1071548381936 - 6821 - org.codehaus.logger - INFO - Processing - run - 1338 - end run - - - 2003-12-15T23:19:41 - 1071548381936 - 6822 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T23:19:41 - 1071548381936 - 6823 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T23:19:59 - 1071548399335 - 6824 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2843200998 - - - - 2003-12-15T23:19:59 - 1071548399336 - 6825 - org.codehaus.logger - INFO - Processing - run - 1339 - start run - - - 2003-12-15T23:19:59 - 1071548399336 - 6826 - org.codehaus.logger - INFO - Processing - run - 1339 - end run - - - 2003-12-15T23:19:59 - 1071548399336 - 6827 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:19:59 - 1071548399336 - 6828 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:20:29 - 1071548429475 - 6829 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2873341044 - - - - 2003-12-15T23:20:29 - 1071548429475 - 6830 - org.codehaus.logger - INFO - Processing - run - 1340 - start run - - - 2003-12-15T23:20:29 - 1071548429476 - 6831 - org.codehaus.logger - INFO - Processing - run - 1340 - end run - - - 2003-12-15T23:20:29 - 1071548429476 - 6832 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:20:29 - 1071548429476 - 6833 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:20:59 - 1071548459615 - 6834 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2903491120 - - - - 2003-12-15T23:20:59 - 1071548459615 - 6835 - org.codehaus.logger - INFO - Processing - run - 1341 - start run - - - 2003-12-15T23:20:59 - 1071548459616 - 6836 - org.codehaus.logger - INFO - Processing - run - 1341 - end run - - - 2003-12-15T23:20:59 - 1071548459616 - 6837 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:20:59 - 1071548459616 - 6838 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:21:29 - 1071548489765 - 6839 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2933641126 - - - - 2003-12-15T23:21:29 - 1071548489766 - 6840 - org.codehaus.logger - INFO - Processing - run - 1342 - start run - - - 2003-12-15T23:21:29 - 1071548489767 - 6841 - org.codehaus.logger - INFO - Processing - run - 1342 - end run - - - 2003-12-15T23:21:29 - 1071548489767 - 6842 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:21:29 - 1071548489767 - 6843 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:21:59 - 1071548519905 - 6844 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2963791188 - - - - 2003-12-15T23:21:59 - 1071548519907 - 6845 - org.codehaus.logger - INFO - Processing - run - 1343 - start run - - - 2003-12-15T23:21:59 - 1071548519907 - 6846 - org.codehaus.logger - INFO - Processing - run - 1343 - end run - - - 2003-12-15T23:21:59 - 1071548519907 - 6847 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:21:59 - 1071548519907 - 6848 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:22:30 - 1071548550095 - 6849 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2993941290 - - - - 2003-12-15T23:22:30 - 1071548550095 - 6850 - org.codehaus.logger - INFO - Processing - run - 1344 - start run - - - 2003-12-15T23:22:30 - 1071548550096 - 6851 - org.codehaus.logger - INFO - Processing - run - 1344 - end run - - - 2003-12-15T23:22:30 - 1071548550096 - 6852 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:22:30 - 1071548550096 - 6853 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:23:00 - 1071548580245 - 6854 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3024101283 - - - - 2003-12-15T23:23:00 - 1071548580246 - 6855 - org.codehaus.logger - INFO - Processing - run - 1345 - start run - - - 2003-12-15T23:23:00 - 1071548580246 - 6856 - org.codehaus.logger - INFO - Processing - run - 1345 - end run - - - 2003-12-15T23:23:00 - 1071548580246 - 6857 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:23:00 - 1071548580246 - 6858 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:23:30 - 1071548610455 - 6859 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3054301346 - - - - 2003-12-15T23:23:30 - 1071548610456 - 6860 - org.codehaus.logger - INFO - Processing - run - 1346 - start run - - - 2003-12-15T23:23:30 - 1071548610457 - 6861 - org.codehaus.logger - INFO - Processing - run - 1346 - end run - - - 2003-12-15T23:23:30 - 1071548610457 - 6862 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:23:30 - 1071548610457 - 6863 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:24:00 - 1071548640595 - 6864 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3084441477 - - - - 2003-12-15T23:24:00 - 1071548640596 - 6865 - org.codehaus.logger - INFO - Processing - run - 1347 - start run - - - 2003-12-15T23:24:00 - 1071548640596 - 6866 - org.codehaus.logger - INFO - Processing - run - 1347 - end run - - - 2003-12-15T23:24:00 - 1071548640596 - 6867 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:24:00 - 1071548640596 - 6868 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:24:30 - 1071548670735 - 6869 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3114601442 - - - - 2003-12-15T23:24:30 - 1071548670736 - 6870 - org.codehaus.logger - INFO - Processing - run - 1348 - start run - - - 2003-12-15T23:24:30 - 1071548670736 - 6871 - org.codehaus.logger - INFO - Processing - run - 1348 - end run - - - 2003-12-15T23:24:30 - 1071548670736 - 6872 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:24:30 - 1071548670736 - 6873 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:24:41 - 1071548681915 - 6874 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T23:24:41 - 1071548681916 - 6875 - org.codehaus.logger - INFO - Processing - run - 1349 - start run - - - 2003-12-15T23:24:41 - 1071548681916 - 6876 - org.codehaus.logger - INFO - Processing - run - 1349 - end run - - - 2003-12-15T23:24:41 - 1071548681916 - 6877 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T23:24:41 - 1071548681916 - 6878 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T23:25:00 - 1071548700875 - 6879 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3144752514 - - - - 2003-12-15T23:25:00 - 1071548700876 - 6880 - org.codehaus.logger - INFO - Processing - run - 1350 - start run - - - 2003-12-15T23:25:00 - 1071548700876 - 6881 - org.codehaus.logger - INFO - Processing - run - 1350 - end run - - - 2003-12-15T23:25:00 - 1071548700876 - 6882 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:25:00 - 1071548700876 - 6883 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:25:31 - 1071548731025 - 6884 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3174901553 - - - - 2003-12-15T23:25:31 - 1071548731027 - 6885 - org.codehaus.logger - INFO - Processing - run - 1351 - start run - - - 2003-12-15T23:25:31 - 1071548731028 - 6886 - org.codehaus.logger - INFO - Processing - run - 1351 - end run - - - 2003-12-15T23:25:31 - 1071548731031 - 6887 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:25:31 - 1071548731031 - 6888 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:26:01 - 1071548761175 - 6889 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3205041610 - - - - 2003-12-15T23:26:01 - 1071548761176 - 6890 - org.codehaus.logger - INFO - Processing - run - 1352 - start run - - - 2003-12-15T23:26:01 - 1071548761177 - 6891 - org.codehaus.logger - INFO - Processing - run - 1352 - end run - - - 2003-12-15T23:26:01 - 1071548761178 - 6892 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:26:01 - 1071548761178 - 6893 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:26:31 - 1071548791326 - 6894 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3235191674 - - - - 2003-12-15T23:26:31 - 1071548791327 - 6895 - org.codehaus.logger - INFO - Processing - run - 1353 - start run - - - 2003-12-15T23:26:31 - 1071548791328 - 6896 - org.codehaus.logger - INFO - Processing - run - 1353 - end run - - - 2003-12-15T23:26:31 - 1071548791328 - 6897 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:26:31 - 1071548791329 - 6898 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:27:01 - 1071548821466 - 6899 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3265351729 - - - - 2003-12-15T23:27:01 - 1071548821467 - 6900 - org.codehaus.logger - INFO - Processing - run - 1354 - start run - - - 2003-12-15T23:27:01 - 1071548821467 - 6901 - org.codehaus.logger - INFO - Processing - run - 1354 - end run - - - 2003-12-15T23:27:01 - 1071548821467 - 6902 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:27:01 - 1071548821468 - 6903 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:27:31 - 1071548851626 - 6904 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3295501784 - - - - 2003-12-15T23:27:31 - 1071548851627 - 6905 - org.codehaus.logger - INFO - Processing - run - 1355 - start run - - - 2003-12-15T23:27:31 - 1071548851627 - 6906 - org.codehaus.logger - INFO - Processing - run - 1355 - end run - - - 2003-12-15T23:27:31 - 1071548851628 - 6907 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:27:31 - 1071548851628 - 6908 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:28:01 - 1071548881766 - 6909 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3325651850 - - - - 2003-12-15T23:28:01 - 1071548881766 - 6910 - org.codehaus.logger - INFO - Processing - run - 1356 - start run - - - 2003-12-15T23:28:01 - 1071548881767 - 6911 - org.codehaus.logger - INFO - Processing - run - 1356 - end run - - - 2003-12-15T23:28:01 - 1071548881767 - 6912 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:28:01 - 1071548881767 - 6913 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:28:31 - 1071548911926 - 6914 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3355801914 - - - - 2003-12-15T23:28:31 - 1071548911927 - 6915 - org.codehaus.logger - INFO - Processing - run - 1357 - start run - - - 2003-12-15T23:28:31 - 1071548911927 - 6916 - org.codehaus.logger - INFO - Processing - run - 1357 - end run - - - 2003-12-15T23:28:31 - 1071548911928 - 6917 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:28:31 - 1071548911928 - 6918 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:29:02 - 1071548942066 - 6919 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3385951971 - - - - 2003-12-15T23:29:02 - 1071548942066 - 6920 - org.codehaus.logger - INFO - Processing - run - 1358 - start run - - - 2003-12-15T23:29:02 - 1071548942067 - 6921 - org.codehaus.logger - INFO - Processing - run - 1358 - end run - - - 2003-12-15T23:29:02 - 1071548942067 - 6922 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:29:02 - 1071548942067 - 6923 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:29:32 - 1071548972246 - 6924 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3416112034 - - - - 2003-12-15T23:29:32 - 1071548972246 - 6925 - org.codehaus.logger - INFO - Processing - run - 1359 - start run - - - 2003-12-15T23:29:32 - 1071548972247 - 6926 - org.codehaus.logger - INFO - Processing - run - 1359 - end run - - - 2003-12-15T23:29:32 - 1071548972247 - 6927 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:29:32 - 1071548972247 - 6928 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:29:41 - 1071548981906 - 6929 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T23:29:41 - 1071548981906 - 6930 - org.codehaus.logger - INFO - Processing - run - 1360 - start run - - - 2003-12-15T23:29:41 - 1071548981907 - 6931 - org.codehaus.logger - INFO - Processing - run - 1360 - end run - - - 2003-12-15T23:29:41 - 1071548981907 - 6932 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T23:29:41 - 1071548981907 - 6933 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T23:30:02 - 1071549002406 - 6934 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3446262105 - - - - 2003-12-15T23:30:02 - 1071549002406 - 6935 - org.codehaus.logger - INFO - Processing - run - 1361 - start run - - - 2003-12-15T23:30:02 - 1071549002407 - 6936 - org.codehaus.logger - INFO - Processing - run - 1361 - end run - - - 2003-12-15T23:30:02 - 1071549002407 - 6937 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:30:02 - 1071549002407 - 6938 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:30:32 - 1071549032546 - 6939 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3476412544 - - - - 2003-12-15T23:30:32 - 1071549032547 - 6940 - org.codehaus.logger - INFO - Processing - run - 1362 - start run - - - 2003-12-15T23:30:32 - 1071549032547 - 6941 - org.codehaus.logger - INFO - Processing - run - 1362 - end run - - - 2003-12-15T23:30:32 - 1071549032547 - 6942 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:30:32 - 1071549032547 - 6943 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:31:02 - 1071549062706 - 6944 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3506562286 - - - - 2003-12-15T23:31:02 - 1071549062707 - 6945 - org.codehaus.logger - INFO - Processing - run - 1363 - start run - - - 2003-12-15T23:31:02 - 1071549062707 - 6946 - org.codehaus.logger - INFO - Processing - run - 1363 - end run - - - 2003-12-15T23:31:02 - 1071549062708 - 6947 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:31:02 - 1071549062708 - 6948 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:31:32 - 1071549092846 - 6949 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3536712302 - - - - 2003-12-15T23:31:32 - 1071549092847 - 6950 - org.codehaus.logger - INFO - Processing - run - 1364 - start run - - - 2003-12-15T23:31:32 - 1071549092847 - 6951 - org.codehaus.logger - INFO - Processing - run - 1364 - end run - - - 2003-12-15T23:31:32 - 1071549092847 - 6952 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:31:32 - 1071549092848 - 6953 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:32:03 - 1071549123006 - 6954 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3566862368 - - - - 2003-12-15T23:32:03 - 1071549123007 - 6955 - org.codehaus.logger - INFO - Processing - run - 1365 - start run - - - 2003-12-15T23:32:03 - 1071549123007 - 6956 - org.codehaus.logger - INFO - Processing - run - 1365 - end run - - - 2003-12-15T23:32:03 - 1071549123007 - 6957 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:32:03 - 1071549123007 - 6958 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:32:33 - 1071549153146 - 6959 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3597012444 - - - - 2003-12-15T23:32:33 - 1071549153147 - 6960 - org.codehaus.logger - INFO - Processing - run - 1366 - start run - - - 2003-12-15T23:32:33 - 1071549153147 - 6961 - org.codehaus.logger - INFO - Processing - run - 1366 - end run - - - 2003-12-15T23:32:33 - 1071549153147 - 6962 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:32:33 - 1071549153148 - 6963 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:33:03 - 1071549183326 - 6964 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3627172508 - - - - 2003-12-15T23:33:03 - 1071549183327 - 6965 - org.codehaus.logger - INFO - Processing - run - 1367 - start run - - - 2003-12-15T23:33:03 - 1071549183327 - 6966 - org.codehaus.logger - INFO - Processing - run - 1367 - end run - - - 2003-12-15T23:33:03 - 1071549183327 - 6967 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:33:03 - 1071549183328 - 6968 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:33:33 - 1071549213427 - 6969 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3657322628 - - - - 2003-12-15T23:33:33 - 1071549213427 - 6970 - org.codehaus.logger - INFO - Processing - run - 1368 - start run - - - 2003-12-15T23:33:33 - 1071549213428 - 6971 - org.codehaus.logger - INFO - Processing - run - 1368 - end run - - - 2003-12-15T23:33:33 - 1071549213428 - 6972 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:33:33 - 1071549213428 - 6973 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:34:03 - 1071549243567 - 6974 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3687462652 - - - - 2003-12-15T23:34:03 - 1071549243568 - 6975 - org.codehaus.logger - INFO - Processing - run - 1369 - start run - - - 2003-12-15T23:34:03 - 1071549243568 - 6976 - org.codehaus.logger - INFO - Processing - run - 1369 - end run - - - 2003-12-15T23:34:03 - 1071549243569 - 6977 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:34:03 - 1071549243569 - 6978 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:34:33 - 1071549273717 - 6979 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3717612787 - - - - 2003-12-15T23:34:33 - 1071549273718 - 6980 - org.codehaus.logger - INFO - Processing - run - 1370 - start run - - - 2003-12-15T23:34:33 - 1071549273718 - 6981 - org.codehaus.logger - INFO - Processing - run - 1370 - end run - - - 2003-12-15T23:34:33 - 1071549273718 - 6982 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:34:33 - 1071549273718 - 6983 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:34:41 - 1071549281947 - 6984 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T23:34:41 - 1071549281947 - 6985 - org.codehaus.logger - INFO - Processing - run - 1371 - start run - - - 2003-12-15T23:34:41 - 1071549281947 - 6986 - org.codehaus.logger - INFO - Processing - run - 1371 - end run - - - 2003-12-15T23:34:41 - 1071549281948 - 6987 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T23:34:41 - 1071549281948 - 6988 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T23:35:03 - 1071549303897 - 6989 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3747762809 - - - - 2003-12-15T23:35:03 - 1071549303897 - 6990 - org.codehaus.logger - INFO - Processing - run - 1372 - start run - - - 2003-12-15T23:35:03 - 1071549303897 - 6991 - org.codehaus.logger - INFO - Processing - run - 1372 - end run - - - 2003-12-15T23:35:03 - 1071549303898 - 6992 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:35:03 - 1071549303898 - 6993 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:35:34 - 1071549334037 - 6994 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3777912876 - - - - 2003-12-15T23:35:34 - 1071549334037 - 6995 - org.codehaus.logger - INFO - Processing - run - 1373 - start run - - - 2003-12-15T23:35:34 - 1071549334038 - 6996 - org.codehaus.logger - INFO - Processing - run - 1373 - end run - - - 2003-12-15T23:35:34 - 1071549334038 - 6997 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:35:34 - 1071549334038 - 6998 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:36:04 - 1071549364207 - 6999 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3808062955 - - - - 2003-12-15T23:36:04 - 1071549364208 - 7000 - org.codehaus.logger - INFO - Processing - run - 1374 - start run - - - 2003-12-15T23:36:04 - 1071549364208 - 7001 - org.codehaus.logger - INFO - Processing - run - 1374 - end run - - - 2003-12-15T23:36:04 - 1071549364209 - 7002 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:36:04 - 1071549364210 - 7003 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:36:34 - 1071549394327 - 7004 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3838223033 - - - - 2003-12-15T23:36:34 - 1071549394328 - 7005 - org.codehaus.logger - INFO - Processing - run - 1375 - start run - - - 2003-12-15T23:36:34 - 1071549394328 - 7006 - org.codehaus.logger - INFO - Processing - run - 1375 - end run - - - 2003-12-15T23:36:34 - 1071549394328 - 7007 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:36:34 - 1071549394328 - 7008 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:37:04 - 1071549424467 - 7009 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3868363110 - - - - 2003-12-15T23:37:04 - 1071549424468 - 7010 - org.codehaus.logger - INFO - Processing - run - 1376 - start run - - - 2003-12-15T23:37:04 - 1071549424468 - 7011 - org.codehaus.logger - INFO - Processing - run - 1376 - end run - - - 2003-12-15T23:37:04 - 1071549424468 - 7012 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:37:04 - 1071549424469 - 7013 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:37:34 - 1071549454627 - 7014 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3898513187 - - - - 2003-12-15T23:37:34 - 1071549454628 - 7015 - org.codehaus.logger - INFO - Processing - run - 1377 - start run - - - 2003-12-15T23:37:34 - 1071549454628 - 7016 - org.codehaus.logger - INFO - Processing - run - 1377 - end run - - - 2003-12-15T23:37:34 - 1071549454628 - 7017 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:37:34 - 1071549454628 - 7018 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:38:04 - 1071549484767 - 7019 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3928663265 - - - - 2003-12-15T23:38:04 - 1071549484768 - 7020 - org.codehaus.logger - INFO - Processing - run - 1378 - start run - - - 2003-12-15T23:38:04 - 1071549484768 - 7021 - org.codehaus.logger - INFO - Processing - run - 1378 - end run - - - 2003-12-15T23:38:04 - 1071549484768 - 7022 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:38:04 - 1071549484769 - 7023 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:38:34 - 1071549514927 - 7024 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3958813338 - - - - 2003-12-15T23:38:34 - 1071549514928 - 7025 - org.codehaus.logger - INFO - Processing - run - 1379 - start run - - - 2003-12-15T23:38:34 - 1071549514928 - 7026 - org.codehaus.logger - INFO - Processing - run - 1379 - end run - - - 2003-12-15T23:38:34 - 1071549514928 - 7027 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:38:34 - 1071549514928 - 7028 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:39:05 - 1071549545077 - 7029 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3988973413 - - - - 2003-12-15T23:39:05 - 1071549545078 - 7030 - org.codehaus.logger - INFO - Processing - run - 1380 - start run - - - 2003-12-15T23:39:05 - 1071549545078 - 7031 - org.codehaus.logger - INFO - Processing - run - 1380 - end run - - - 2003-12-15T23:39:05 - 1071549545079 - 7032 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:39:05 - 1071549545079 - 7033 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:39:35 - 1071549575287 - 7034 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4019133887 - - - - 2003-12-15T23:39:35 - 1071549575288 - 7035 - org.codehaus.logger - INFO - Processing - run - 1381 - start run - - - 2003-12-15T23:39:35 - 1071549575288 - 7036 - org.codehaus.logger - INFO - Processing - run - 1381 - end run - - - 2003-12-15T23:39:35 - 1071549575288 - 7037 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:39:35 - 1071549575289 - 7038 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:39:41 - 1071549581897 - 7039 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T23:39:41 - 1071549581898 - 7040 - org.codehaus.logger - INFO - Processing - run - 1382 - start run - - - 2003-12-15T23:39:41 - 1071549581899 - 7041 - org.codehaus.logger - INFO - Processing - run - 1382 - end run - - - 2003-12-15T23:39:41 - 1071549581900 - 7042 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T23:39:41 - 1071549581900 - 7043 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T23:40:05 - 1071549605427 - 7044 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4049293572 - - - - 2003-12-15T23:40:05 - 1071549605428 - 7045 - org.codehaus.logger - INFO - Processing - run - 1383 - start run - - - 2003-12-15T23:40:05 - 1071549605429 - 7046 - org.codehaus.logger - INFO - Processing - run - 1383 - end run - - - 2003-12-15T23:40:05 - 1071549605429 - 7047 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:40:05 - 1071549605429 - 7048 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:40:35 - 1071549635587 - 7049 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4079443744 - - - - 2003-12-15T23:40:35 - 1071549635588 - 7050 - org.codehaus.logger - INFO - Processing - run - 1384 - start run - - - 2003-12-15T23:40:35 - 1071549635588 - 7051 - org.codehaus.logger - INFO - Processing - run - 1384 - end run - - - 2003-12-15T23:40:35 - 1071549635589 - 7052 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:40:35 - 1071549635589 - 7053 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:41:05 - 1071549665727 - 7054 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4109593763 - - - - 2003-12-15T23:41:05 - 1071549665728 - 7055 - org.codehaus.logger - INFO - Processing - run - 1385 - start run - - - 2003-12-15T23:41:05 - 1071549665728 - 7056 - org.codehaus.logger - INFO - Processing - run - 1385 - end run - - - 2003-12-15T23:41:05 - 1071549665729 - 7057 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:41:05 - 1071549665729 - 7058 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:41:35 - 1071549695888 - 7059 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4139743817 - - - - 2003-12-15T23:41:35 - 1071549695888 - 7060 - org.codehaus.logger - INFO - Processing - run - 1386 - start run - - - 2003-12-15T23:41:35 - 1071549695889 - 7061 - org.codehaus.logger - INFO - Processing - run - 1386 - end run - - - 2003-12-15T23:41:35 - 1071549695889 - 7062 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:41:35 - 1071549695889 - 7063 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:42:06 - 1071549726038 - 7064 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4169893903 - - - - 2003-12-15T23:42:06 - 1071549726039 - 7065 - org.codehaus.logger - INFO - Processing - run - 1387 - start run - - - 2003-12-15T23:42:06 - 1071549726039 - 7066 - org.codehaus.logger - INFO - Processing - run - 1387 - end run - - - 2003-12-15T23:42:06 - 1071549726040 - 7067 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:42:06 - 1071549726040 - 7068 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:42:36 - 1071549756198 - 7069 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4200043985 - - - - 2003-12-15T23:42:36 - 1071549756198 - 7070 - org.codehaus.logger - INFO - Processing - run - 1388 - start run - - - 2003-12-15T23:42:36 - 1071549756199 - 7071 - org.codehaus.logger - INFO - Processing - run - 1388 - end run - - - 2003-12-15T23:42:36 - 1071549756199 - 7072 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:42:36 - 1071549756199 - 7073 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:43:06 - 1071549786338 - 7074 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4230204099 - - - - 2003-12-15T23:43:06 - 1071549786338 - 7075 - org.codehaus.logger - INFO - Processing - run - 1389 - start run - - - 2003-12-15T23:43:06 - 1071549786339 - 7076 - org.codehaus.logger - INFO - Processing - run - 1389 - end run - - - 2003-12-15T23:43:06 - 1071549786339 - 7077 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:43:06 - 1071549786339 - 7078 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:43:36 - 1071549816488 - 7079 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4260364209 - - - - 2003-12-15T23:43:36 - 1071549816489 - 7080 - org.codehaus.logger - INFO - Processing - run - 1390 - start run - - - 2003-12-15T23:43:36 - 1071549816490 - 7081 - org.codehaus.logger - INFO - Processing - run - 1390 - end run - - - 2003-12-15T23:43:36 - 1071549816490 - 7082 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:43:36 - 1071549816490 - 7083 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:44:06 - 1071549846628 - 7084 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4290504242 - - - - 2003-12-15T23:44:06 - 1071549846629 - 7085 - org.codehaus.logger - INFO - Processing - run - 1391 - start run - - - 2003-12-15T23:44:06 - 1071549846629 - 7086 - org.codehaus.logger - INFO - Processing - run - 1391 - end run - - - 2003-12-15T23:44:06 - 1071549846629 - 7087 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:44:06 - 1071549846629 - 7088 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:44:36 - 1071549876788 - 7089 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG25687501 - - - - 2003-12-15T23:44:36 - 1071549876789 - 7090 - org.codehaus.logger - INFO - Processing - run - 1392 - start run - - - 2003-12-15T23:44:36 - 1071549876789 - 7091 - org.codehaus.logger - INFO - Processing - run - 1392 - end run - - - 2003-12-15T23:44:36 - 1071549876789 - 7092 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:44:36 - 1071549876789 - 7093 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:44:41 - 1071549881918 - 7094 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T23:44:41 - 1071549881919 - 7095 - org.codehaus.logger - INFO - Processing - run - 1393 - start run - - - 2003-12-15T23:44:41 - 1071549881919 - 7096 - org.codehaus.logger - INFO - Processing - run - 1393 - end run - - - 2003-12-15T23:44:41 - 1071549881919 - 7097 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T23:44:41 - 1071549881920 - 7098 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T23:45:06 - 1071549906938 - 7099 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG55837179 - - - - 2003-12-15T23:45:06 - 1071549906939 - 7100 - org.codehaus.logger - INFO - Processing - run - 1394 - start run - - - 2003-12-15T23:45:06 - 1071549906939 - 7101 - org.codehaus.logger - INFO - Processing - run - 1394 - end run - - - 2003-12-15T23:45:06 - 1071549906939 - 7102 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:45:06 - 1071549906939 - 7103 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:45:37 - 1071549937098 - 7104 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG85987212 - - - - 2003-12-15T23:45:37 - 1071549937099 - 7105 - org.codehaus.logger - INFO - Processing - run - 1395 - start run - - - 2003-12-15T23:45:37 - 1071549937099 - 7106 - org.codehaus.logger - INFO - Processing - run - 1395 - end run - - - 2003-12-15T23:45:37 - 1071549937099 - 7107 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:45:37 - 1071549937099 - 7108 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:46:07 - 1071549967238 - 7109 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG116147305 - - - - 2003-12-15T23:46:07 - 1071549967239 - 7110 - org.codehaus.logger - INFO - Processing - run - 1396 - start run - - - 2003-12-15T23:46:07 - 1071549967239 - 7111 - org.codehaus.logger - INFO - Processing - run - 1396 - end run - - - 2003-12-15T23:46:07 - 1071549967239 - 7112 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:46:07 - 1071549967240 - 7113 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:46:37 - 1071549997388 - 7114 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG146297397 - - - - 2003-12-15T23:46:37 - 1071549997389 - 7115 - org.codehaus.logger - INFO - Processing - run - 1397 - start run - - - 2003-12-15T23:46:37 - 1071549997389 - 7116 - org.codehaus.logger - INFO - Processing - run - 1397 - end run - - - 2003-12-15T23:46:37 - 1071549997390 - 7117 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:46:37 - 1071549997390 - 7118 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:47:07 - 1071550027529 - 7119 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG176427486 - - - - 2003-12-15T23:47:07 - 1071550027530 - 7120 - org.codehaus.logger - INFO - Processing - run - 1398 - start run - - - 2003-12-15T23:47:07 - 1071550027530 - 7121 - org.codehaus.logger - INFO - Processing - run - 1398 - end run - - - 2003-12-15T23:47:07 - 1071550027531 - 7122 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:47:07 - 1071550027531 - 7123 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:47:37 - 1071550057689 - 7124 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG206577575 - - - - 2003-12-15T23:47:37 - 1071550057689 - 7125 - org.codehaus.logger - INFO - Processing - run - 1399 - start run - - - 2003-12-15T23:47:37 - 1071550057690 - 7126 - org.codehaus.logger - INFO - Processing - run - 1399 - end run - - - 2003-12-15T23:47:37 - 1071550057690 - 7127 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:47:37 - 1071550057690 - 7128 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:48:07 - 1071550087829 - 7129 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG236717668 - - - - 2003-12-15T23:48:07 - 1071550087829 - 7130 - org.codehaus.logger - INFO - Processing - run - 1400 - start run - - - 2003-12-15T23:48:07 - 1071550087830 - 7131 - org.codehaus.logger - INFO - Processing - run - 1400 - end run - - - 2003-12-15T23:48:07 - 1071550087830 - 7132 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:48:07 - 1071550087830 - 7133 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:48:37 - 1071550117929 - 7134 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG266857767 - - - - 2003-12-15T23:48:37 - 1071550117930 - 7135 - org.codehaus.logger - INFO - Processing - run - 1401 - start run - - - 2003-12-15T23:48:37 - 1071550117930 - 7136 - org.codehaus.logger - INFO - Processing - run - 1401 - end run - - - 2003-12-15T23:48:37 - 1071550117930 - 7137 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:48:37 - 1071550117930 - 7138 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:49:08 - 1071550148129 - 7139 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG297017855 - - - - 2003-12-15T23:49:08 - 1071550148129 - 7140 - org.codehaus.logger - INFO - Processing - run - 1402 - start run - - - 2003-12-15T23:49:08 - 1071550148130 - 7141 - org.codehaus.logger - INFO - Processing - run - 1402 - end run - - - 2003-12-15T23:49:08 - 1071550148130 - 7142 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:49:08 - 1071550148130 - 7143 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:49:38 - 1071550178289 - 7144 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG327167953 - - - - 2003-12-15T23:49:38 - 1071550178290 - 7145 - org.codehaus.logger - INFO - Processing - run - 1403 - start run - - - 2003-12-15T23:49:38 - 1071550178290 - 7146 - org.codehaus.logger - INFO - Processing - run - 1403 - end run - - - 2003-12-15T23:49:38 - 1071550178290 - 7147 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:49:38 - 1071550178290 - 7148 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:49:41 - 1071550181939 - 7149 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T23:49:41 - 1071550181940 - 7150 - org.codehaus.logger - INFO - Processing - run - 1404 - start run - - - 2003-12-15T23:49:41 - 1071550181940 - 7151 - org.codehaus.logger - INFO - Processing - run - 1404 - end run - - - 2003-12-15T23:49:41 - 1071550181941 - 7152 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T23:49:41 - 1071550181941 - 7153 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T23:50:08 - 1071550208439 - 7154 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG357318052 - - - - 2003-12-15T23:50:08 - 1071550208440 - 7155 - org.codehaus.logger - INFO - Processing - run - 1405 - start run - - - 2003-12-15T23:50:08 - 1071550208440 - 7156 - org.codehaus.logger - INFO - Processing - run - 1405 - end run - - - 2003-12-15T23:50:08 - 1071550208441 - 7157 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:50:08 - 1071550208441 - 7158 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:50:38 - 1071550238589 - 7159 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG387478152 - - - - 2003-12-15T23:50:38 - 1071550238592 - 7160 - org.codehaus.logger - INFO - Processing - run - 1406 - start run - - - 2003-12-15T23:50:38 - 1071550238592 - 7161 - org.codehaus.logger - INFO - Processing - run - 1406 - end run - - - 2003-12-15T23:50:38 - 1071550238592 - 7162 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:50:38 - 1071550238592 - 7163 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:51:08 - 1071550268729 - 7164 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG417628242 - - - - 2003-12-15T23:51:08 - 1071550268730 - 7165 - org.codehaus.logger - INFO - Processing - run - 1407 - start run - - - 2003-12-15T23:51:08 - 1071550268731 - 7166 - org.codehaus.logger - INFO - Processing - run - 1407 - end run - - - 2003-12-15T23:51:08 - 1071550268731 - 7167 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:51:08 - 1071550268732 - 7168 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:51:38 - 1071550298889 - 7169 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG447778339 - - - - 2003-12-15T23:51:38 - 1071550298890 - 7170 - org.codehaus.logger - INFO - Processing - run - 1408 - start run - - - 2003-12-15T23:51:38 - 1071550298890 - 7171 - org.codehaus.logger - INFO - Processing - run - 1408 - end run - - - 2003-12-15T23:51:38 - 1071550298891 - 7172 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:51:38 - 1071550298891 - 7173 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:52:09 - 1071550329030 - 7174 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG477928492 - - - - 2003-12-15T23:52:09 - 1071550329031 - 7175 - org.codehaus.logger - INFO - Processing - run - 1409 - start run - - - 2003-12-15T23:52:09 - 1071550329031 - 7176 - org.codehaus.logger - INFO - Processing - run - 1409 - end run - - - 2003-12-15T23:52:09 - 1071550329032 - 7177 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:52:09 - 1071550329032 - 7178 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:52:39 - 1071550359190 - 7179 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG508068539 - - - - 2003-12-15T23:52:39 - 1071550359190 - 7180 - org.codehaus.logger - INFO - Processing - run - 1410 - start run - - - 2003-12-15T23:52:39 - 1071550359190 - 7181 - org.codehaus.logger - INFO - Processing - run - 1410 - end run - - - 2003-12-15T23:52:39 - 1071550359191 - 7182 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:52:39 - 1071550359191 - 7183 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:53:09 - 1071550389330 - 7184 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG538228645 - - - - 2003-12-15T23:53:09 - 1071550389330 - 7185 - org.codehaus.logger - INFO - Processing - run - 1411 - start run - - - 2003-12-15T23:53:09 - 1071550389330 - 7186 - org.codehaus.logger - INFO - Processing - run - 1411 - end run - - - 2003-12-15T23:53:09 - 1071550389331 - 7187 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:53:09 - 1071550389331 - 7188 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:53:39 - 1071550419490 - 7189 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG568378745 - - - - 2003-12-15T23:53:39 - 1071550419491 - 7190 - org.codehaus.logger - INFO - Processing - run - 1412 - start run - - - 2003-12-15T23:53:39 - 1071550419491 - 7191 - org.codehaus.logger - INFO - Processing - run - 1412 - end run - - - 2003-12-15T23:53:39 - 1071550419492 - 7192 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:53:39 - 1071550419492 - 7193 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:54:09 - 1071550449630 - 7194 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG598528875 - - - - 2003-12-15T23:54:09 - 1071550449631 - 7195 - org.codehaus.logger - INFO - Processing - run - 1413 - start run - - - 2003-12-15T23:54:09 - 1071550449631 - 7196 - org.codehaus.logger - INFO - Processing - run - 1413 - end run - - - 2003-12-15T23:54:09 - 1071550449631 - 7197 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:54:09 - 1071550449631 - 7198 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:54:39 - 1071550479731 - 7199 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG628658900 - - - - 2003-12-15T23:54:39 - 1071550479732 - 7200 - org.codehaus.logger - INFO - Processing - run - 1414 - start run - - - 2003-12-15T23:54:39 - 1071550479732 - 7201 - org.codehaus.logger - INFO - Processing - run - 1414 - end run - - - 2003-12-15T23:54:39 - 1071550479732 - 7202 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:54:39 - 1071550479733 - 7203 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:54:41 - 1071550481870 - 7204 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T23:54:41 - 1071550481872 - 7205 - org.codehaus.logger - INFO - Processing - run - 1415 - start run - - - 2003-12-15T23:54:41 - 1071550481872 - 7206 - org.codehaus.logger - INFO - Processing - run - 1415 - end run - - - 2003-12-15T23:54:41 - 1071550481872 - 7207 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T23:54:41 - 1071550481872 - 7208 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-15T23:55:09 - 1071550509890 - 7209 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG658798958 - - - - 2003-12-15T23:55:09 - 1071550509891 - 7210 - org.codehaus.logger - INFO - Processing - run - 1416 - start run - - - 2003-12-15T23:55:09 - 1071550509892 - 7211 - org.codehaus.logger - INFO - Processing - run - 1416 - end run - - - 2003-12-15T23:55:09 - 1071550509892 - 7212 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:55:09 - 1071550509893 - 7213 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:55:40 - 1071550540040 - 7214 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG688949026 - - - - 2003-12-15T23:55:40 - 1071550540041 - 7215 - org.codehaus.logger - INFO - Processing - run - 1417 - start run - - - 2003-12-15T23:55:40 - 1071550540041 - 7216 - org.codehaus.logger - INFO - Processing - run - 1417 - end run - - - 2003-12-15T23:55:40 - 1071550540041 - 7217 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:55:40 - 1071550540041 - 7218 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:56:10 - 1071550570240 - 7219 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG719109145 - - - - 2003-12-15T23:56:10 - 1071550570241 - 7220 - org.codehaus.logger - INFO - Processing - run - 1418 - start run - - - 2003-12-15T23:56:10 - 1071550570241 - 7221 - org.codehaus.logger - INFO - Processing - run - 1418 - end run - - - 2003-12-15T23:56:10 - 1071550570241 - 7222 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:56:10 - 1071550570241 - 7223 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:56:40 - 1071550600390 - 7224 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG749269234 - - - - 2003-12-15T23:56:40 - 1071550600391 - 7225 - org.codehaus.logger - INFO - Processing - run - 1419 - start run - - - 2003-12-15T23:56:40 - 1071550600391 - 7226 - org.codehaus.logger - INFO - Processing - run - 1419 - end run - - - 2003-12-15T23:56:40 - 1071550600391 - 7227 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:56:40 - 1071550600391 - 7228 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:57:10 - 1071550630540 - 7229 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG779429223 - - - - 2003-12-15T23:57:10 - 1071550630541 - 7230 - org.codehaus.logger - INFO - Processing - run - 1420 - start run - - - 2003-12-15T23:57:10 - 1071550630541 - 7231 - org.codehaus.logger - INFO - Processing - run - 1420 - end run - - - 2003-12-15T23:57:10 - 1071550630542 - 7232 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:57:10 - 1071550630542 - 7233 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:57:40 - 1071550660690 - 7234 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG809579291 - - - - 2003-12-15T23:57:40 - 1071550660691 - 7235 - org.codehaus.logger - INFO - Processing - run - 1421 - start run - - - 2003-12-15T23:57:40 - 1071550660692 - 7236 - org.codehaus.logger - INFO - Processing - run - 1421 - end run - - - 2003-12-15T23:57:40 - 1071550660692 - 7237 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:57:40 - 1071550660694 - 7238 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:58:10 - 1071550690810 - 7239 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG839729369 - - - - 2003-12-15T23:58:10 - 1071550690811 - 7240 - org.codehaus.logger - INFO - Processing - run - 1422 - start run - - - 2003-12-15T23:58:10 - 1071550690811 - 7241 - org.codehaus.logger - INFO - Processing - run - 1422 - end run - - - 2003-12-15T23:58:10 - 1071550690812 - 7242 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:58:10 - 1071550690812 - 7243 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:58:40 - 1071550720951 - 7244 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG869879428 - - - - 2003-12-15T23:58:40 - 1071550720951 - 7245 - org.codehaus.logger - INFO - Processing - run - 1423 - start run - - - 2003-12-15T23:58:40 - 1071550720952 - 7246 - org.codehaus.logger - INFO - Processing - run - 1423 - end run - - - 2003-12-15T23:58:40 - 1071550720952 - 7247 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:58:40 - 1071550720952 - 7248 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:59:11 - 1071550751111 - 7249 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG900029499 - - - - 2003-12-15T23:59:11 - 1071550751111 - 7250 - org.codehaus.logger - INFO - Processing - run - 1424 - start run - - - 2003-12-15T23:59:11 - 1071550751111 - 7251 - org.codehaus.logger - INFO - Processing - run - 1424 - end run - - - 2003-12-15T23:59:11 - 1071550751112 - 7252 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:59:11 - 1071550751112 - 7253 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:59:41 - 1071550781251 - 7254 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG930179585 - - - - 2003-12-15T23:59:41 - 1071550781251 - 7255 - org.codehaus.logger - INFO - Processing - run - 1425 - start run - - - 2003-12-15T23:59:41 - 1071550781252 - 7256 - org.codehaus.logger - INFO - Processing - run - 1425 - end run - - - 2003-12-15T23:59:41 - 1071550781252 - 7257 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-15T23:59:41 - 1071550781252 - 7258 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-15T23:59:41 - 1071550781851 - 7259 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-15T23:59:41 - 1071550781852 - 7260 - org.codehaus.logger - INFO - Processing - run - 1426 - start run - - - 2003-12-15T23:59:41 - 1071550781852 - 7261 - org.codehaus.logger - INFO - Processing - run - 1426 - end run - - - 2003-12-15T23:59:41 - 1071550781853 - 7262 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-15T23:59:41 - 1071550781853 - 7263 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-16T00:00:11 - 1071550811421 - 7264 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG960346335 - - - - 2003-12-16T00:00:11 - 1071550811421 - 7265 - org.codehaus.logger - INFO - Processing - run - 1427 - start run - - - 2003-12-16T00:00:11 - 1071550811422 - 7266 - org.codehaus.logger - INFO - Processing - run - 1427 - end run - - - 2003-12-16T00:00:11 - 1071550811422 - 7267 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:00:11 - 1071550811422 - 7268 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:00:41 - 1071550841621 - 7269 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG990509736 - - - - 2003-12-16T00:00:41 - 1071550841621 - 7270 - org.codehaus.logger - INFO - Processing - run - 1428 - start run - - - 2003-12-16T00:00:41 - 1071550841622 - 7271 - org.codehaus.logger - INFO - Processing - run - 1428 - end run - - - 2003-12-16T00:00:41 - 1071550841622 - 7272 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:00:41 - 1071550841622 - 7273 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:01:11 - 1071550871771 - 7274 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1020659792 - - - - 2003-12-16T00:01:11 - 1071550871771 - 7275 - org.codehaus.logger - INFO - Processing - run - 1429 - start run - - - 2003-12-16T00:01:11 - 1071550871772 - 7276 - org.codehaus.logger - INFO - Processing - run - 1429 - end run - - - 2003-12-16T00:01:11 - 1071550871772 - 7277 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:01:11 - 1071550871773 - 7278 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:01:41 - 1071550901891 - 7279 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1050799874 - - - - 2003-12-16T00:01:41 - 1071550901892 - 7280 - org.codehaus.logger - INFO - Processing - run - 1430 - start run - - - 2003-12-16T00:01:41 - 1071550901893 - 7281 - org.codehaus.logger - INFO - Processing - run - 1430 - end run - - - 2003-12-16T00:01:41 - 1071550901893 - 7282 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:01:41 - 1071550901893 - 7283 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:02:12 - 1071550932031 - 7284 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1080949945 - - - - 2003-12-16T00:02:12 - 1071550932032 - 7285 - org.codehaus.logger - INFO - Processing - run - 1431 - start run - - - 2003-12-16T00:02:12 - 1071550932032 - 7286 - org.codehaus.logger - INFO - Processing - run - 1431 - end run - - - 2003-12-16T00:02:12 - 1071550932033 - 7287 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:02:12 - 1071550932033 - 7288 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:02:42 - 1071550962191 - 7289 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1111100023 - - - - 2003-12-16T00:02:42 - 1071550962192 - 7290 - org.codehaus.logger - INFO - Processing - run - 1432 - start run - - - 2003-12-16T00:02:42 - 1071550962192 - 7291 - org.codehaus.logger - INFO - Processing - run - 1432 - end run - - - 2003-12-16T00:02:42 - 1071550962192 - 7292 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:02:42 - 1071550962192 - 7293 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:03:12 - 1071550992331 - 7294 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1141250149 - - - - 2003-12-16T00:03:12 - 1071550992332 - 7295 - org.codehaus.logger - INFO - Processing - run - 1433 - start run - - - 2003-12-16T00:03:12 - 1071550992332 - 7296 - org.codehaus.logger - INFO - Processing - run - 1433 - end run - - - 2003-12-16T00:03:12 - 1071550992332 - 7297 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:03:12 - 1071550992333 - 7298 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:03:42 - 1071551022481 - 7299 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1171390602 - - - - 2003-12-16T00:03:42 - 1071551022482 - 7300 - org.codehaus.logger - INFO - Processing - run - 1434 - start run - - - 2003-12-16T00:03:42 - 1071551022482 - 7301 - org.codehaus.logger - INFO - Processing - run - 1434 - end run - - - 2003-12-16T00:03:42 - 1071551022483 - 7302 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:03:42 - 1071551022483 - 7303 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:04:12 - 1071551052621 - 7304 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1201540263 - - - - 2003-12-16T00:04:12 - 1071551052622 - 7305 - org.codehaus.logger - INFO - Processing - run - 1435 - start run - - - 2003-12-16T00:04:12 - 1071551052622 - 7306 - org.codehaus.logger - INFO - Processing - run - 1435 - end run - - - 2003-12-16T00:04:12 - 1071551052622 - 7307 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:04:12 - 1071551052623 - 7308 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:04:41 - 1071551081911 - 7309 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-16T00:04:41 - 1071551081912 - 7310 - org.codehaus.logger - INFO - Processing - run - 1436 - start run - - - 2003-12-16T00:04:41 - 1071551081912 - 7311 - org.codehaus.logger - INFO - Processing - run - 1436 - end run - - - 2003-12-16T00:04:41 - 1071551081913 - 7312 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-16T00:04:41 - 1071551081913 - 7313 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-16T00:04:42 - 1071551082771 - 7314 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1231680341 - - - - 2003-12-16T00:04:42 - 1071551082773 - 7315 - org.codehaus.logger - INFO - Processing - run - 1437 - start run - - - 2003-12-16T00:04:42 - 1071551082774 - 7316 - org.codehaus.logger - INFO - Processing - run - 1437 - end run - - - 2003-12-16T00:04:42 - 1071551082775 - 7317 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:04:42 - 1071551082775 - 7318 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:05:12 - 1071551112921 - 7319 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1261800424 - - - - 2003-12-16T00:05:12 - 1071551112922 - 7320 - org.codehaus.logger - INFO - Processing - run - 1438 - start run - - - 2003-12-16T00:05:12 - 1071551112922 - 7321 - org.codehaus.logger - INFO - Processing - run - 1438 - end run - - - 2003-12-16T00:05:12 - 1071551112923 - 7322 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:05:12 - 1071551112923 - 7323 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:05:43 - 1071551143032 - 7324 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1291920506 - - - - 2003-12-16T00:05:43 - 1071551143033 - 7325 - org.codehaus.logger - INFO - Processing - run - 1439 - start run - - - 2003-12-16T00:05:43 - 1071551143033 - 7326 - org.codehaus.logger - INFO - Processing - run - 1439 - end run - - - 2003-12-16T00:05:43 - 1071551143034 - 7327 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:05:43 - 1071551143034 - 7328 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:06:13 - 1071551173162 - 7329 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1322080594 - - - - 2003-12-16T00:06:13 - 1071551173162 - 7330 - org.codehaus.logger - INFO - Processing - run - 1440 - start run - - - 2003-12-16T00:06:13 - 1071551173163 - 7331 - org.codehaus.logger - INFO - Processing - run - 1440 - end run - - - 2003-12-16T00:06:13 - 1071551173163 - 7332 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:06:13 - 1071551173163 - 7333 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:06:43 - 1071551203342 - 7334 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1352230682 - - - - 2003-12-16T00:06:43 - 1071551203343 - 7335 - org.codehaus.logger - INFO - Processing - run - 1441 - start run - - - 2003-12-16T00:06:43 - 1071551203343 - 7336 - org.codehaus.logger - INFO - Processing - run - 1441 - end run - - - 2003-12-16T00:06:43 - 1071551203344 - 7337 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:06:43 - 1071551203344 - 7338 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:07:13 - 1071551233532 - 7339 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1382400813 - - - - 2003-12-16T00:07:13 - 1071551233532 - 7340 - org.codehaus.logger - INFO - Processing - run - 1442 - start run - - - 2003-12-16T00:07:13 - 1071551233533 - 7341 - org.codehaus.logger - INFO - Processing - run - 1442 - end run - - - 2003-12-16T00:07:13 - 1071551233533 - 7342 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:07:13 - 1071551233533 - 7343 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:07:43 - 1071551263632 - 7344 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1412540848 - - - - 2003-12-16T00:07:43 - 1071551263632 - 7345 - org.codehaus.logger - INFO - Processing - run - 1443 - start run - - - 2003-12-16T00:07:43 - 1071551263633 - 7346 - org.codehaus.logger - INFO - Processing - run - 1443 - end run - - - 2003-12-16T00:07:43 - 1071551263633 - 7347 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:07:43 - 1071551263633 - 7348 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:08:13 - 1071551293772 - 7349 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1442690934 - - - - 2003-12-16T00:08:13 - 1071551293773 - 7350 - org.codehaus.logger - INFO - Processing - run - 1444 - start run - - - 2003-12-16T00:08:13 - 1071551293773 - 7351 - org.codehaus.logger - INFO - Processing - run - 1444 - end run - - - 2003-12-16T00:08:13 - 1071551293773 - 7352 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:08:13 - 1071551293773 - 7353 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:08:43 - 1071551323932 - 7354 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1472841025 - - - - 2003-12-16T00:08:43 - 1071551323933 - 7355 - org.codehaus.logger - INFO - Processing - run - 1445 - start run - - - 2003-12-16T00:08:43 - 1071551323934 - 7356 - org.codehaus.logger - INFO - Processing - run - 1445 - end run - - - 2003-12-16T00:08:43 - 1071551323934 - 7357 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:08:43 - 1071551323935 - 7358 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:09:14 - 1071551354072 - 7359 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1503001106 - - - - 2003-12-16T00:09:14 - 1071551354073 - 7360 - org.codehaus.logger - INFO - Processing - run - 1446 - start run - - - 2003-12-16T00:09:14 - 1071551354073 - 7361 - org.codehaus.logger - INFO - Processing - run - 1446 - end run - - - 2003-12-16T00:09:14 - 1071551354074 - 7362 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:09:14 - 1071551354074 - 7363 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:09:41 - 1071551381892 - 7364 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-16T00:09:41 - 1071551381893 - 7365 - org.codehaus.logger - INFO - Processing - run - 1447 - start run - - - 2003-12-16T00:09:41 - 1071551381893 - 7366 - org.codehaus.logger - INFO - Processing - run - 1447 - end run - - - 2003-12-16T00:09:41 - 1071551381893 - 7367 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-16T00:09:41 - 1071551381893 - 7368 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-16T00:09:44 - 1071551384262 - 7369 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1533151198 - - - - 2003-12-16T00:09:44 - 1071551384263 - 7370 - org.codehaus.logger - INFO - Processing - run - 1448 - start run - - - 2003-12-16T00:09:44 - 1071551384264 - 7371 - org.codehaus.logger - INFO - Processing - run - 1448 - end run - - - 2003-12-16T00:09:44 - 1071551384264 - 7372 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:09:44 - 1071551384264 - 7373 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:10:14 - 1071551414412 - 7374 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1563331918 - - - - 2003-12-16T00:10:14 - 1071551414413 - 7375 - org.codehaus.logger - INFO - Processing - run - 1449 - start run - - - 2003-12-16T00:10:14 - 1071551414414 - 7376 - org.codehaus.logger - INFO - Processing - run - 1449 - end run - - - 2003-12-16T00:10:14 - 1071551414414 - 7377 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:10:14 - 1071551414415 - 7378 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:10:44 - 1071551444553 - 7379 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1593481387 - - - - 2003-12-16T00:10:44 - 1071551444553 - 7380 - org.codehaus.logger - INFO - Processing - run - 1450 - start run - - - 2003-12-16T00:10:44 - 1071551444554 - 7381 - org.codehaus.logger - INFO - Processing - run - 1450 - end run - - - 2003-12-16T00:10:44 - 1071551444554 - 7382 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:10:44 - 1071551444554 - 7383 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:11:14 - 1071551474722 - 7384 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1623621459 - - - - 2003-12-16T00:11:14 - 1071551474723 - 7385 - org.codehaus.logger - INFO - Processing - run - 1451 - start run - - - 2003-12-16T00:11:14 - 1071551474723 - 7386 - org.codehaus.logger - INFO - Processing - run - 1451 - end run - - - 2003-12-16T00:11:14 - 1071551474724 - 7387 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:11:14 - 1071551474724 - 7388 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:11:44 - 1071551504843 - 7389 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1653761577 - - - - 2003-12-16T00:11:44 - 1071551504843 - 7390 - org.codehaus.logger - INFO - Processing - run - 1452 - start run - - - 2003-12-16T00:11:44 - 1071551504843 - 7391 - org.codehaus.logger - INFO - Processing - run - 1452 - end run - - - 2003-12-16T00:11:44 - 1071551504844 - 7392 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:11:44 - 1071551504844 - 7393 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:12:15 - 1071551535013 - 7394 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1683911634 - - - - 2003-12-16T00:12:15 - 1071551535015 - 7395 - org.codehaus.logger - INFO - Processing - run - 1453 - start run - - - 2003-12-16T00:12:15 - 1071551535015 - 7396 - org.codehaus.logger - INFO - Processing - run - 1453 - end run - - - 2003-12-16T00:12:15 - 1071551535015 - 7397 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:12:15 - 1071551535015 - 7398 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:12:45 - 1071551565153 - 7399 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1714071697 - - - - 2003-12-16T00:12:45 - 1071551565153 - 7400 - org.codehaus.logger - INFO - Processing - run - 1454 - start run - - - 2003-12-16T00:12:45 - 1071551565154 - 7401 - org.codehaus.logger - INFO - Processing - run - 1454 - end run - - - 2003-12-16T00:12:45 - 1071551565154 - 7402 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:12:45 - 1071551565154 - 7403 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:13:15 - 1071551595323 - 7404 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1744231729 - - - - 2003-12-16T00:13:15 - 1071551595323 - 7405 - org.codehaus.logger - INFO - Processing - run - 1455 - start run - - - 2003-12-16T00:13:15 - 1071551595324 - 7406 - org.codehaus.logger - INFO - Processing - run - 1455 - end run - - - 2003-12-16T00:13:15 - 1071551595324 - 7407 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:13:15 - 1071551595324 - 7408 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:13:45 - 1071551625463 - 7409 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1774381791 - - - - 2003-12-16T00:13:45 - 1071551625464 - 7410 - org.codehaus.logger - INFO - Processing - run - 1456 - start run - - - 2003-12-16T00:13:45 - 1071551625465 - 7411 - org.codehaus.logger - INFO - Processing - run - 1456 - end run - - - 2003-12-16T00:13:45 - 1071551625465 - 7412 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:13:45 - 1071551625465 - 7413 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:14:15 - 1071551655603 - 7414 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1804521860 - - - - 2003-12-16T00:14:15 - 1071551655604 - 7415 - org.codehaus.logger - INFO - Processing - run - 1457 - start run - - - 2003-12-16T00:14:15 - 1071551655604 - 7416 - org.codehaus.logger - INFO - Processing - run - 1457 - end run - - - 2003-12-16T00:14:15 - 1071551655605 - 7417 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:14:15 - 1071551655605 - 7418 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:14:41 - 1071551681893 - 7419 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-16T00:14:41 - 1071551681894 - 7420 - org.codehaus.logger - INFO - Processing - run - 1458 - start run - - - 2003-12-16T00:14:41 - 1071551681894 - 7421 - org.codehaus.logger - INFO - Processing - run - 1458 - end run - - - 2003-12-16T00:14:41 - 1071551681894 - 7422 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-16T00:14:41 - 1071551681894 - 7423 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-16T00:14:45 - 1071551685783 - 7424 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1834671932 - - - - 2003-12-16T00:14:45 - 1071551685784 - 7425 - org.codehaus.logger - INFO - Processing - run - 1459 - start run - - - 2003-12-16T00:14:45 - 1071551685784 - 7426 - org.codehaus.logger - INFO - Processing - run - 1459 - end run - - - 2003-12-16T00:14:45 - 1071551685785 - 7427 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:14:45 - 1071551685785 - 7428 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:15:15 - 1071551715943 - 7429 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1864821985 - - - - 2003-12-16T00:15:15 - 1071551715944 - 7430 - org.codehaus.logger - INFO - Processing - run - 1460 - start run - - - 2003-12-16T00:15:15 - 1071551715944 - 7431 - org.codehaus.logger - INFO - Processing - run - 1460 - end run - - - 2003-12-16T00:15:15 - 1071551715944 - 7432 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:15:15 - 1071551715944 - 7433 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:15:46 - 1071551746093 - 7434 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1894972080 - - - - 2003-12-16T00:15:46 - 1071551746095 - 7435 - org.codehaus.logger - INFO - Processing - run - 1461 - start run - - - 2003-12-16T00:15:46 - 1071551746095 - 7436 - org.codehaus.logger - INFO - Processing - run - 1461 - end run - - - 2003-12-16T00:15:46 - 1071551746099 - 7437 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:15:46 - 1071551746099 - 7438 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:16:16 - 1071551776263 - 7439 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1925142149 - - - - 2003-12-16T00:16:16 - 1071551776264 - 7440 - org.codehaus.logger - INFO - Processing - run - 1462 - start run - - - 2003-12-16T00:16:16 - 1071551776264 - 7441 - org.codehaus.logger - INFO - Processing - run - 1462 - end run - - - 2003-12-16T00:16:16 - 1071551776264 - 7442 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:16:16 - 1071551776264 - 7443 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:16:46 - 1071551806393 - 7444 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1955282254 - - - - 2003-12-16T00:16:46 - 1071551806394 - 7445 - org.codehaus.logger - INFO - Processing - run - 1463 - start run - - - 2003-12-16T00:16:46 - 1071551806394 - 7446 - org.codehaus.logger - INFO - Processing - run - 1463 - end run - - - 2003-12-16T00:16:46 - 1071551806395 - 7447 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:16:46 - 1071551806395 - 7448 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:17:16 - 1071551836553 - 7449 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1985452300 - - - - 2003-12-16T00:17:16 - 1071551836554 - 7450 - org.codehaus.logger - INFO - Processing - run - 1464 - start run - - - 2003-12-16T00:17:16 - 1071551836554 - 7451 - org.codehaus.logger - INFO - Processing - run - 1464 - end run - - - 2003-12-16T00:17:16 - 1071551836555 - 7452 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:17:16 - 1071551836555 - 7453 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:17:46 - 1071551866684 - 7454 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2015572379 - - - - 2003-12-16T00:17:46 - 1071551866685 - 7455 - org.codehaus.logger - INFO - Processing - run - 1465 - start run - - - 2003-12-16T00:17:46 - 1071551866685 - 7456 - org.codehaus.logger - INFO - Processing - run - 1465 - end run - - - 2003-12-16T00:17:46 - 1071551866685 - 7457 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:17:46 - 1071551866686 - 7458 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:18:16 - 1071551896843 - 7459 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2045722451 - - - - 2003-12-16T00:18:16 - 1071551896844 - 7460 - org.codehaus.logger - INFO - Processing - run - 1466 - start run - - - 2003-12-16T00:18:16 - 1071551896844 - 7461 - org.codehaus.logger - INFO - Processing - run - 1466 - end run - - - 2003-12-16T00:18:16 - 1071551896845 - 7462 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:18:16 - 1071551896845 - 7463 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:18:46 - 1071551926934 - 7464 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2075862524 - - - - 2003-12-16T00:18:46 - 1071551926935 - 7465 - org.codehaus.logger - INFO - Processing - run - 1467 - start run - - - 2003-12-16T00:18:46 - 1071551926936 - 7466 - org.codehaus.logger - INFO - Processing - run - 1467 - end run - - - 2003-12-16T00:18:46 - 1071551926936 - 7467 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:18:46 - 1071551926936 - 7468 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:19:17 - 1071551957134 - 7469 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2106022607 - - - - 2003-12-16T00:19:17 - 1071551957134 - 7470 - org.codehaus.logger - INFO - Processing - run - 1468 - start run - - - 2003-12-16T00:19:17 - 1071551957135 - 7471 - org.codehaus.logger - INFO - Processing - run - 1468 - end run - - - 2003-12-16T00:19:17 - 1071551957135 - 7472 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:19:17 - 1071551957135 - 7473 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:19:41 - 1071551981904 - 7474 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-16T00:19:41 - 1071551981904 - 7475 - org.codehaus.logger - INFO - Processing - run - 1469 - start run - - - 2003-12-16T00:19:41 - 1071551981905 - 7476 - org.codehaus.logger - INFO - Processing - run - 1469 - end run - - - 2003-12-16T00:19:41 - 1071551981905 - 7477 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-16T00:19:41 - 1071551981905 - 7478 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-16T00:19:47 - 1071551987234 - 7479 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2136162718 - - - - 2003-12-16T00:19:47 - 1071551987235 - 7480 - org.codehaus.logger - INFO - Processing - run - 1470 - start run - - - 2003-12-16T00:19:47 - 1071551987236 - 7481 - org.codehaus.logger - INFO - Processing - run - 1470 - end run - - - 2003-12-16T00:19:47 - 1071551987236 - 7482 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:19:47 - 1071551987236 - 7483 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:20:17 - 1071552017384 - 7484 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2166312769 - - - - 2003-12-16T00:20:17 - 1071552017385 - 7485 - org.codehaus.logger - INFO - Processing - run - 1471 - start run - - - 2003-12-16T00:20:17 - 1071552017385 - 7486 - org.codehaus.logger - INFO - Processing - run - 1471 - end run - - - 2003-12-16T00:20:17 - 1071552017385 - 7487 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:20:17 - 1071552017386 - 7488 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:20:47 - 1071552047534 - 7489 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2196452848 - - - - 2003-12-16T00:20:47 - 1071552047534 - 7490 - org.codehaus.logger - INFO - Processing - run - 1472 - start run - - - 2003-12-16T00:20:47 - 1071552047535 - 7491 - org.codehaus.logger - INFO - Processing - run - 1472 - end run - - - 2003-12-16T00:20:47 - 1071552047535 - 7492 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:20:47 - 1071552047535 - 7493 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:21:17 - 1071552077674 - 7494 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2226602930 - - - - 2003-12-16T00:21:17 - 1071552077675 - 7495 - org.codehaus.logger - INFO - Processing - run - 1473 - start run - - - 2003-12-16T00:21:17 - 1071552077675 - 7496 - org.codehaus.logger - INFO - Processing - run - 1473 - end run - - - 2003-12-16T00:21:17 - 1071552077675 - 7497 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:21:17 - 1071552077675 - 7498 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:21:47 - 1071552107864 - 7499 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2256753010 - - - - 2003-12-16T00:21:47 - 1071552107865 - 7500 - org.codehaus.logger - INFO - Processing - run - 1474 - start run - - - 2003-12-16T00:21:47 - 1071552107866 - 7501 - org.codehaus.logger - INFO - Processing - run - 1474 - end run - - - 2003-12-16T00:21:47 - 1071552107866 - 7502 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:21:47 - 1071552107866 - 7503 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:22:18 - 1071552138004 - 7504 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2286903140 - - - - 2003-12-16T00:22:18 - 1071552138005 - 7505 - org.codehaus.logger - INFO - Processing - run - 1475 - start run - - - 2003-12-16T00:22:18 - 1071552138005 - 7506 - org.codehaus.logger - INFO - Processing - run - 1475 - end run - - - 2003-12-16T00:22:18 - 1071552138006 - 7507 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:22:18 - 1071552138006 - 7508 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:22:48 - 1071552168134 - 7509 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2317053181 - - - - 2003-12-16T00:22:48 - 1071552168135 - 7510 - org.codehaus.logger - INFO - Processing - run - 1476 - start run - - - 2003-12-16T00:22:48 - 1071552168135 - 7511 - org.codehaus.logger - INFO - Processing - run - 1476 - end run - - - 2003-12-16T00:22:48 - 1071552168136 - 7512 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:22:48 - 1071552168137 - 7513 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:23:18 - 1071552198324 - 7514 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2347203264 - - - - 2003-12-16T00:23:18 - 1071552198325 - 7515 - org.codehaus.logger - INFO - Processing - run - 1477 - start run - - - 2003-12-16T00:23:18 - 1071552198325 - 7516 - org.codehaus.logger - INFO - Processing - run - 1477 - end run - - - 2003-12-16T00:23:18 - 1071552198325 - 7517 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:23:18 - 1071552198325 - 7518 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:23:48 - 1071552228415 - 7519 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2377343356 - - - - 2003-12-16T00:23:48 - 1071552228415 - 7520 - org.codehaus.logger - INFO - Processing - run - 1478 - start run - - - 2003-12-16T00:23:48 - 1071552228416 - 7521 - org.codehaus.logger - INFO - Processing - run - 1478 - end run - - - 2003-12-16T00:23:48 - 1071552228416 - 7522 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:23:48 - 1071552228416 - 7523 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:24:18 - 1071552258555 - 7524 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2407483443 - - - - 2003-12-16T00:24:18 - 1071552258555 - 7525 - org.codehaus.logger - INFO - Processing - run - 1479 - start run - - - 2003-12-16T00:24:18 - 1071552258556 - 7526 - org.codehaus.logger - INFO - Processing - run - 1479 - end run - - - 2003-12-16T00:24:18 - 1071552258556 - 7527 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:24:18 - 1071552258556 - 7528 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:24:41 - 1071552281895 - 7529 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-16T00:24:41 - 1071552281895 - 7530 - org.codehaus.logger - INFO - Processing - run - 1480 - start run - - - 2003-12-16T00:24:41 - 1071552281895 - 7531 - org.codehaus.logger - INFO - Processing - run - 1480 - end run - - - 2003-12-16T00:24:41 - 1071552281896 - 7532 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-16T00:24:41 - 1071552281896 - 7533 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-16T00:24:48 - 1071552288665 - 7534 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2437593531 - - - - 2003-12-16T00:24:48 - 1071552288666 - 7535 - org.codehaus.logger - INFO - Processing - run - 1481 - start run - - - 2003-12-16T00:24:48 - 1071552288666 - 7536 - org.codehaus.logger - INFO - Processing - run - 1481 - end run - - - 2003-12-16T00:24:48 - 1071552288667 - 7537 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:24:48 - 1071552288667 - 7538 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:25:18 - 1071552318815 - 7539 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2467743613 - - - - 2003-12-16T00:25:18 - 1071552318816 - 7540 - org.codehaus.logger - INFO - Processing - run - 1482 - start run - - - 2003-12-16T00:25:18 - 1071552318816 - 7541 - org.codehaus.logger - INFO - Processing - run - 1482 - end run - - - 2003-12-16T00:25:18 - 1071552318816 - 7542 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:25:18 - 1071552318816 - 7543 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:25:49 - 1071552349015 - 7544 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2497893698 - - - - 2003-12-16T00:25:49 - 1071552349015 - 7545 - org.codehaus.logger - INFO - Processing - run - 1483 - start run - - - 2003-12-16T00:25:49 - 1071552349016 - 7546 - org.codehaus.logger - INFO - Processing - run - 1483 - end run - - - 2003-12-16T00:25:49 - 1071552349016 - 7547 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:25:49 - 1071552349016 - 7548 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:26:19 - 1071552379155 - 7549 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2528053803 - - - - 2003-12-16T00:26:19 - 1071552379155 - 7550 - org.codehaus.logger - INFO - Processing - run - 1484 - start run - - - 2003-12-16T00:26:19 - 1071552379156 - 7551 - org.codehaus.logger - INFO - Processing - run - 1484 - end run - - - 2003-12-16T00:26:19 - 1071552379156 - 7552 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:26:19 - 1071552379157 - 7553 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:26:49 - 1071552409285 - 7554 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2558203887 - - - - 2003-12-16T00:26:49 - 1071552409286 - 7555 - org.codehaus.logger - INFO - Processing - run - 1485 - start run - - - 2003-12-16T00:26:49 - 1071552409286 - 7556 - org.codehaus.logger - INFO - Processing - run - 1485 - end run - - - 2003-12-16T00:26:49 - 1071552409286 - 7557 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:26:49 - 1071552409286 - 7558 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:27:19 - 1071552439445 - 7559 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2588373981 - - - - 2003-12-16T00:27:19 - 1071552439446 - 7560 - org.codehaus.logger - INFO - Processing - run - 1486 - start run - - - 2003-12-16T00:27:19 - 1071552439446 - 7561 - org.codehaus.logger - INFO - Processing - run - 1486 - end run - - - 2003-12-16T00:27:19 - 1071552439446 - 7562 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:27:19 - 1071552439447 - 7563 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:27:49 - 1071552469595 - 7564 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2618514081 - - - - 2003-12-16T00:27:49 - 1071552469596 - 7565 - org.codehaus.logger - INFO - Processing - run - 1487 - start run - - - 2003-12-16T00:27:49 - 1071552469596 - 7566 - org.codehaus.logger - INFO - Processing - run - 1487 - end run - - - 2003-12-16T00:27:49 - 1071552469596 - 7567 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:27:49 - 1071552469596 - 7568 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:28:19 - 1071552499775 - 7569 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2648664154 - - - - 2003-12-16T00:28:19 - 1071552499776 - 7570 - org.codehaus.logger - INFO - Processing - run - 1488 - start run - - - 2003-12-16T00:28:19 - 1071552499776 - 7571 - org.codehaus.logger - INFO - Processing - run - 1488 - end run - - - 2003-12-16T00:28:19 - 1071552499776 - 7572 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:28:19 - 1071552499777 - 7573 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:28:49 - 1071552529915 - 7574 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2678814255 - - - - 2003-12-16T00:28:49 - 1071552529916 - 7575 - org.codehaus.logger - INFO - Processing - run - 1489 - start run - - - 2003-12-16T00:28:49 - 1071552529917 - 7576 - org.codehaus.logger - INFO - Processing - run - 1489 - end run - - - 2003-12-16T00:28:49 - 1071552529918 - 7577 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:28:49 - 1071552529918 - 7578 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:29:20 - 1071552560085 - 7579 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2708964334 - - - - 2003-12-16T00:29:20 - 1071552560086 - 7580 - org.codehaus.logger - INFO - Processing - run - 1490 - start run - - - 2003-12-16T00:29:20 - 1071552560086 - 7581 - org.codehaus.logger - INFO - Processing - run - 1490 - end run - - - 2003-12-16T00:29:20 - 1071552560087 - 7582 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:29:20 - 1071552560087 - 7583 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:29:41 - 1071552581915 - 7584 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-16T00:29:41 - 1071552581916 - 7585 - org.codehaus.logger - INFO - Processing - run - 1491 - start run - - - 2003-12-16T00:29:41 - 1071552581916 - 7586 - org.codehaus.logger - INFO - Processing - run - 1491 - end run - - - 2003-12-16T00:29:41 - 1071552581917 - 7587 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-16T00:29:41 - 1071552581917 - 7588 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-16T00:29:50 - 1071552590196 - 7589 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2739114426 - - - - 2003-12-16T00:29:50 - 1071552590196 - 7590 - org.codehaus.logger - INFO - Processing - run - 1492 - start run - - - 2003-12-16T00:29:50 - 1071552590198 - 7591 - org.codehaus.logger - INFO - Processing - run - 1492 - end run - - - 2003-12-16T00:29:50 - 1071552590198 - 7592 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:29:50 - 1071552590198 - 7593 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:30:20 - 1071552620356 - 7594 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2769264518 - - - - 2003-12-16T00:30:20 - 1071552620357 - 7595 - org.codehaus.logger - INFO - Processing - run - 1493 - start run - - - 2003-12-16T00:30:20 - 1071552620357 - 7596 - org.codehaus.logger - INFO - Processing - run - 1493 - end run - - - 2003-12-16T00:30:20 - 1071552620358 - 7597 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:30:20 - 1071552620358 - 7598 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:30:50 - 1071552650496 - 7599 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2799424612 - - - - 2003-12-16T00:30:50 - 1071552650496 - 7600 - org.codehaus.logger - INFO - Processing - run - 1494 - start run - - - 2003-12-16T00:30:50 - 1071552650497 - 7601 - org.codehaus.logger - INFO - Processing - run - 1494 - end run - - - 2003-12-16T00:30:50 - 1071552650497 - 7602 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:30:50 - 1071552650497 - 7603 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:31:20 - 1071552680646 - 7604 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2829574706 - - - - 2003-12-16T00:31:20 - 1071552680647 - 7605 - org.codehaus.logger - INFO - Processing - run - 1495 - start run - - - 2003-12-16T00:31:20 - 1071552680648 - 7606 - org.codehaus.logger - INFO - Processing - run - 1495 - end run - - - 2003-12-16T00:31:20 - 1071552680648 - 7607 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:31:20 - 1071552680648 - 7608 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:31:50 - 1071552710806 - 7609 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2859724801 - - - - 2003-12-16T00:31:50 - 1071552710806 - 7610 - org.codehaus.logger - INFO - Processing - run - 1496 - start run - - - 2003-12-16T00:31:50 - 1071552710807 - 7611 - org.codehaus.logger - INFO - Processing - run - 1496 - end run - - - 2003-12-16T00:31:50 - 1071552710807 - 7612 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:31:50 - 1071552710807 - 7613 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:32:20 - 1071552740946 - 7614 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2889864899 - - - - 2003-12-16T00:32:20 - 1071552740946 - 7615 - org.codehaus.logger - INFO - Processing - run - 1497 - start run - - - 2003-12-16T00:32:20 - 1071552740947 - 7616 - org.codehaus.logger - INFO - Processing - run - 1497 - end run - - - 2003-12-16T00:32:20 - 1071552740947 - 7617 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:32:20 - 1071552740947 - 7618 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:32:51 - 1071552771136 - 7619 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2920024992 - - - - 2003-12-16T00:32:51 - 1071552771137 - 7620 - org.codehaus.logger - INFO - Processing - run - 1498 - start run - - - 2003-12-16T00:32:51 - 1071552771137 - 7621 - org.codehaus.logger - INFO - Processing - run - 1498 - end run - - - 2003-12-16T00:32:51 - 1071552771138 - 7622 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:32:51 - 1071552771138 - 7623 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:33:21 - 1071552801286 - 7624 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2950175088 - - - - 2003-12-16T00:33:21 - 1071552801287 - 7625 - org.codehaus.logger - INFO - Processing - run - 1499 - start run - - - 2003-12-16T00:33:21 - 1071552801288 - 7626 - org.codehaus.logger - INFO - Processing - run - 1499 - end run - - - 2003-12-16T00:33:21 - 1071552801288 - 7627 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:33:21 - 1071552801288 - 7628 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:33:51 - 1071552831396 - 7629 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2980325192 - - - - 2003-12-16T00:33:51 - 1071552831397 - 7630 - org.codehaus.logger - INFO - Processing - run - 1500 - start run - - - 2003-12-16T00:33:51 - 1071552831399 - 7631 - org.codehaus.logger - INFO - Processing - run - 1500 - end run - - - 2003-12-16T00:33:51 - 1071552831399 - 7632 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:33:51 - 1071552831399 - 7633 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:34:21 - 1071552861547 - 7634 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3010475282 - - - - 2003-12-16T00:34:21 - 1071552861547 - 7635 - org.codehaus.logger - INFO - Processing - run - 1501 - start run - - - 2003-12-16T00:34:21 - 1071552861547 - 7636 - org.codehaus.logger - INFO - Processing - run - 1501 - end run - - - 2003-12-16T00:34:21 - 1071552861548 - 7637 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:34:21 - 1071552861548 - 7638 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:34:41 - 1071552881876 - 7639 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-16T00:34:41 - 1071552881877 - 7640 - org.codehaus.logger - INFO - Processing - run - 1502 - start run - - - 2003-12-16T00:34:41 - 1071552881877 - 7641 - org.codehaus.logger - INFO - Processing - run - 1502 - end run - - - 2003-12-16T00:34:41 - 1071552881878 - 7642 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-16T00:34:41 - 1071552881878 - 7643 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-16T00:34:51 - 1071552891726 - 7644 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3040625384 - - - - 2003-12-16T00:34:51 - 1071552891727 - 7645 - org.codehaus.logger - INFO - Processing - run - 1503 - start run - - - 2003-12-16T00:34:51 - 1071552891727 - 7646 - org.codehaus.logger - INFO - Processing - run - 1503 - end run - - - 2003-12-16T00:34:51 - 1071552891728 - 7647 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:34:51 - 1071552891728 - 7648 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:35:21 - 1071552921907 - 7649 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3070835560 - - - - 2003-12-16T00:35:21 - 1071552921908 - 7650 - org.codehaus.logger - INFO - Processing - run - 1504 - start run - - - 2003-12-16T00:35:21 - 1071552921908 - 7651 - org.codehaus.logger - INFO - Processing - run - 1504 - end run - - - 2003-12-16T00:35:21 - 1071552921908 - 7652 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:35:21 - 1071552921908 - 7653 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:35:52 - 1071552952087 - 7654 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3100995589 - - - - 2003-12-16T00:35:52 - 1071552952088 - 7655 - org.codehaus.logger - INFO - Processing - run - 1505 - start run - - - 2003-12-16T00:35:52 - 1071552952088 - 7656 - org.codehaus.logger - INFO - Processing - run - 1505 - end run - - - 2003-12-16T00:35:52 - 1071552952088 - 7657 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:35:52 - 1071552952089 - 7658 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:36:22 - 1071552982247 - 7659 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3131145682 - - - - 2003-12-16T00:36:22 - 1071552982247 - 7660 - org.codehaus.logger - INFO - Processing - run - 1506 - start run - - - 2003-12-16T00:36:22 - 1071552982248 - 7661 - org.codehaus.logger - INFO - Processing - run - 1506 - end run - - - 2003-12-16T00:36:22 - 1071552982248 - 7662 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:36:22 - 1071552982248 - 7663 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:36:52 - 1071553012377 - 7664 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3161295788 - - - - 2003-12-16T00:36:52 - 1071553012378 - 7665 - org.codehaus.logger - INFO - Processing - run - 1507 - start run - - - 2003-12-16T00:36:52 - 1071553012378 - 7666 - org.codehaus.logger - INFO - Processing - run - 1507 - end run - - - 2003-12-16T00:36:52 - 1071553012379 - 7667 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:36:52 - 1071553012379 - 7668 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:37:22 - 1071553042537 - 7669 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3191445895 - - - - 2003-12-16T00:37:22 - 1071553042540 - 7670 - org.codehaus.logger - INFO - Processing - run - 1508 - start run - - - 2003-12-16T00:37:22 - 1071553042541 - 7671 - org.codehaus.logger - INFO - Processing - run - 1508 - end run - - - 2003-12-16T00:37:22 - 1071553042541 - 7672 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:37:22 - 1071553042541 - 7673 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:37:52 - 1071553072687 - 7674 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3221596031 - - - - 2003-12-16T00:37:52 - 1071553072688 - 7675 - org.codehaus.logger - INFO - Processing - run - 1509 - start run - - - 2003-12-16T00:37:52 - 1071553072688 - 7676 - org.codehaus.logger - INFO - Processing - run - 1509 - end run - - - 2003-12-16T00:37:52 - 1071553072688 - 7677 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:37:52 - 1071553072688 - 7678 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:38:22 - 1071553102867 - 7679 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3251746100 - - - - 2003-12-16T00:38:22 - 1071553102868 - 7680 - org.codehaus.logger - INFO - Processing - run - 1510 - start run - - - 2003-12-16T00:38:22 - 1071553102868 - 7681 - org.codehaus.logger - INFO - Processing - run - 1510 - end run - - - 2003-12-16T00:38:22 - 1071553102868 - 7682 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:38:22 - 1071553102868 - 7683 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:38:53 - 1071553133017 - 7684 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3281896196 - - - - 2003-12-16T00:38:53 - 1071553133018 - 7685 - org.codehaus.logger - INFO - Processing - run - 1511 - start run - - - 2003-12-16T00:38:53 - 1071553133018 - 7686 - org.codehaus.logger - INFO - Processing - run - 1511 - end run - - - 2003-12-16T00:38:53 - 1071553133019 - 7687 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:38:53 - 1071553133019 - 7688 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:39:23 - 1071553163157 - 7689 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3312056314 - - - - 2003-12-16T00:39:23 - 1071553163158 - 7690 - org.codehaus.logger - INFO - Processing - run - 1512 - start run - - - 2003-12-16T00:39:23 - 1071553163158 - 7691 - org.codehaus.logger - INFO - Processing - run - 1512 - end run - - - 2003-12-16T00:39:23 - 1071553163158 - 7692 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:39:23 - 1071553163159 - 7693 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:39:41 - 1071553181877 - 7694 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-16T00:39:41 - 1071553181878 - 7695 - org.codehaus.logger - INFO - Processing - run - 1513 - start run - - - 2003-12-16T00:39:41 - 1071553181878 - 7696 - org.codehaus.logger - INFO - Processing - run - 1513 - end run - - - 2003-12-16T00:39:41 - 1071553181879 - 7697 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-16T00:39:41 - 1071553181879 - 7698 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-16T00:39:53 - 1071553193278 - 7699 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3342206416 - - - - 2003-12-16T00:39:53 - 1071553193278 - 7700 - org.codehaus.logger - INFO - Processing - run - 1514 - start run - - - 2003-12-16T00:39:53 - 1071553193279 - 7701 - org.codehaus.logger - INFO - Processing - run - 1514 - end run - - - 2003-12-16T00:39:53 - 1071553193279 - 7702 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:39:53 - 1071553193279 - 7703 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:40:23 - 1071553223448 - 7704 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3372346526 - - - - 2003-12-16T00:40:23 - 1071553223449 - 7705 - org.codehaus.logger - INFO - Processing - run - 1515 - start run - - - 2003-12-16T00:40:23 - 1071553223449 - 7706 - org.codehaus.logger - INFO - Processing - run - 1515 - end run - - - 2003-12-16T00:40:23 - 1071553223450 - 7707 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:40:23 - 1071553223450 - 7708 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:40:53 - 1071553253568 - 7709 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3402496626 - - - - 2003-12-16T00:40:53 - 1071553253570 - 7710 - org.codehaus.logger - INFO - Processing - run - 1516 - start run - - - 2003-12-16T00:40:53 - 1071553253570 - 7711 - org.codehaus.logger - INFO - Processing - run - 1516 - end run - - - 2003-12-16T00:40:53 - 1071553253574 - 7712 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:40:53 - 1071553253574 - 7713 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:41:23 - 1071553283728 - 7714 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3432646727 - - - - 2003-12-16T00:41:23 - 1071553283728 - 7715 - org.codehaus.logger - INFO - Processing - run - 1517 - start run - - - 2003-12-16T00:41:23 - 1071553283729 - 7716 - org.codehaus.logger - INFO - Processing - run - 1517 - end run - - - 2003-12-16T00:41:23 - 1071553283729 - 7717 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:41:23 - 1071553283729 - 7718 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:41:53 - 1071553313878 - 7719 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3462786836 - - - - 2003-12-16T00:41:53 - 1071553313879 - 7720 - org.codehaus.logger - INFO - Processing - run - 1518 - start run - - - 2003-12-16T00:41:53 - 1071553313879 - 7721 - org.codehaus.logger - INFO - Processing - run - 1518 - end run - - - 2003-12-16T00:41:53 - 1071553313879 - 7722 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:41:53 - 1071553313879 - 7723 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:42:24 - 1071553344038 - 7724 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3492936943 - - - - 2003-12-16T00:42:24 - 1071553344039 - 7725 - org.codehaus.logger - INFO - Processing - run - 1519 - start run - - - 2003-12-16T00:42:24 - 1071553344039 - 7726 - org.codehaus.logger - INFO - Processing - run - 1519 - end run - - - 2003-12-16T00:42:24 - 1071553344039 - 7727 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:42:24 - 1071553344039 - 7728 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:42:54 - 1071553374158 - 7729 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3523087079 - - - - 2003-12-16T00:42:54 - 1071553374159 - 7730 - org.codehaus.logger - INFO - Processing - run - 1520 - start run - - - 2003-12-16T00:42:54 - 1071553374159 - 7731 - org.codehaus.logger - INFO - Processing - run - 1520 - end run - - - 2003-12-16T00:42:54 - 1071553374159 - 7732 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:42:54 - 1071553374160 - 7733 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:43:24 - 1071553404338 - 7734 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3553237800 - - - - 2003-12-16T00:43:24 - 1071553404339 - 7735 - org.codehaus.logger - INFO - Processing - run - 1521 - start run - - - 2003-12-16T00:43:24 - 1071553404339 - 7736 - org.codehaus.logger - INFO - Processing - run - 1521 - end run - - - 2003-12-16T00:43:24 - 1071553404339 - 7737 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:43:24 - 1071553404339 - 7738 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:43:54 - 1071553434458 - 7739 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3583387269 - - - - 2003-12-16T00:43:54 - 1071553434460 - 7740 - org.codehaus.logger - INFO - Processing - run - 1522 - start run - - - 2003-12-16T00:43:54 - 1071553434460 - 7741 - org.codehaus.logger - INFO - Processing - run - 1522 - end run - - - 2003-12-16T00:43:54 - 1071553434460 - 7742 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:43:54 - 1071553434461 - 7743 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:44:24 - 1071553464638 - 7744 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3613527383 - - - - 2003-12-16T00:44:24 - 1071553464639 - 7745 - org.codehaus.logger - INFO - Processing - run - 1523 - start run - - - 2003-12-16T00:44:24 - 1071553464639 - 7746 - org.codehaus.logger - INFO - Processing - run - 1523 - end run - - - 2003-12-16T00:44:24 - 1071553464640 - 7747 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:44:24 - 1071553464640 - 7748 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:44:41 - 1071553481939 - 7749 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-16T00:44:41 - 1071553481939 - 7750 - org.codehaus.logger - INFO - Processing - run - 1524 - start run - - - 2003-12-16T00:44:41 - 1071553481939 - 7751 - org.codehaus.logger - INFO - Processing - run - 1524 - end run - - - 2003-12-16T00:44:41 - 1071553481940 - 7752 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-16T00:44:41 - 1071553481940 - 7753 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-16T00:44:54 - 1071553494759 - 7754 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3643677497 - - - - 2003-12-16T00:44:54 - 1071553494759 - 7755 - org.codehaus.logger - INFO - Processing - run - 1525 - start run - - - 2003-12-16T00:44:54 - 1071553494759 - 7756 - org.codehaus.logger - INFO - Processing - run - 1525 - end run - - - 2003-12-16T00:44:54 - 1071553494760 - 7757 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:44:54 - 1071553494760 - 7758 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:45:24 - 1071553524909 - 7759 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3673837585 - - - - 2003-12-16T00:45:24 - 1071553524910 - 7760 - org.codehaus.logger - INFO - Processing - run - 1526 - start run - - - 2003-12-16T00:45:24 - 1071553524910 - 7761 - org.codehaus.logger - INFO - Processing - run - 1526 - end run - - - 2003-12-16T00:45:24 - 1071553524910 - 7762 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:45:24 - 1071553524910 - 7763 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:45:55 - 1071553555089 - 7764 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3703997640 - - - - 2003-12-16T00:45:55 - 1071553555089 - 7765 - org.codehaus.logger - INFO - Processing - run - 1527 - start run - - - 2003-12-16T00:45:55 - 1071553555090 - 7766 - org.codehaus.logger - INFO - Processing - run - 1527 - end run - - - 2003-12-16T00:45:55 - 1071553555090 - 7767 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:45:55 - 1071553555090 - 7768 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:46:25 - 1071553585319 - 7769 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3734187779 - - - - 2003-12-16T00:46:25 - 1071553585319 - 7770 - org.codehaus.logger - INFO - Processing - run - 1528 - start run - - - 2003-12-16T00:46:25 - 1071553585320 - 7771 - org.codehaus.logger - INFO - Processing - run - 1528 - end run - - - 2003-12-16T00:46:25 - 1071553585320 - 7772 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:46:25 - 1071553585320 - 7773 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:46:55 - 1071553615449 - 7774 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3764348390 - - - - 2003-12-16T00:46:55 - 1071553615450 - 7775 - org.codehaus.logger - INFO - Processing - run - 1529 - start run - - - 2003-12-16T00:46:55 - 1071553615450 - 7776 - org.codehaus.logger - INFO - Processing - run - 1529 - end run - - - 2003-12-16T00:46:55 - 1071553615451 - 7777 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:46:55 - 1071553615451 - 7778 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:47:25 - 1071553645619 - 7779 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3794497800 - - - - 2003-12-16T00:47:25 - 1071553645620 - 7780 - org.codehaus.logger - INFO - Processing - run - 1530 - start run - - - 2003-12-16T00:47:25 - 1071553645620 - 7781 - org.codehaus.logger - INFO - Processing - run - 1530 - end run - - - 2003-12-16T00:47:25 - 1071553645621 - 7782 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:47:25 - 1071553645621 - 7783 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:47:55 - 1071553675719 - 7784 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3824647908 - - - - 2003-12-16T00:47:55 - 1071553675720 - 7785 - org.codehaus.logger - INFO - Processing - run - 1531 - start run - - - 2003-12-16T00:47:55 - 1071553675720 - 7786 - org.codehaus.logger - INFO - Processing - run - 1531 - end run - - - 2003-12-16T00:47:55 - 1071553675721 - 7787 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:47:56 - 1071553676240 - 7788 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:48:25 - 1071553705949 - 7789 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3854827915 - - - - 2003-12-16T00:48:25 - 1071553705950 - 7790 - org.codehaus.logger - INFO - Processing - run - 1532 - start run - - - 2003-12-16T00:48:25 - 1071553705950 - 7791 - org.codehaus.logger - INFO - Processing - run - 1532 - end run - - - 2003-12-16T00:48:25 - 1071553705950 - 7792 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:48:25 - 1071553705950 - 7793 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:48:56 - 1071553736089 - 7794 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3884967972 - - - - 2003-12-16T00:48:56 - 1071553736090 - 7795 - org.codehaus.logger - INFO - Processing - run - 1533 - start run - - - 2003-12-16T00:48:56 - 1071553736090 - 7796 - org.codehaus.logger - INFO - Processing - run - 1533 - end run - - - 2003-12-16T00:48:56 - 1071553736090 - 7797 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:48:56 - 1071553736091 - 7798 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:49:26 - 1071553766239 - 7799 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3915128036 - - - - 2003-12-16T00:49:26 - 1071553766240 - 7800 - org.codehaus.logger - INFO - Processing - run - 1534 - start run - - - 2003-12-16T00:49:26 - 1071553766240 - 7801 - org.codehaus.logger - INFO - Processing - run - 1534 - end run - - - 2003-12-16T00:49:26 - 1071553766241 - 7802 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:49:26 - 1071553766241 - 7803 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:49:41 - 1071553781869 - 7804 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-16T00:49:41 - 1071553781870 - 7805 - org.codehaus.logger - INFO - Processing - run - 1535 - start run - - - 2003-12-16T00:49:41 - 1071553781870 - 7806 - org.codehaus.logger - INFO - Processing - run - 1535 - end run - - - 2003-12-16T00:49:41 - 1071553781870 - 7807 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-16T00:49:41 - 1071553781870 - 7808 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-16T00:49:56 - 1071553796379 - 7809 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3945288096 - - - - 2003-12-16T00:49:56 - 1071553796380 - 7810 - org.codehaus.logger - INFO - Processing - run - 1536 - start run - - - 2003-12-16T00:49:56 - 1071553796380 - 7811 - org.codehaus.logger - INFO - Processing - run - 1536 - end run - - - 2003-12-16T00:49:56 - 1071553796381 - 7812 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:49:56 - 1071553796381 - 7813 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:50:26 - 1071553826549 - 7814 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3975438157 - - - - 2003-12-16T00:50:26 - 1071553826550 - 7815 - org.codehaus.logger - INFO - Processing - run - 1537 - start run - - - 2003-12-16T00:50:26 - 1071553826551 - 7816 - org.codehaus.logger - INFO - Processing - run - 1537 - end run - - - 2003-12-16T00:50:26 - 1071553826551 - 7817 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:50:26 - 1071553826551 - 7818 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:50:56 - 1071553856679 - 7819 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4005588475 - - - - 2003-12-16T00:50:56 - 1071553856681 - 7820 - org.codehaus.logger - INFO - Processing - run - 1538 - start run - - - 2003-12-16T00:50:56 - 1071553856681 - 7821 - org.codehaus.logger - INFO - Processing - run - 1538 - end run - - - 2003-12-16T00:50:56 - 1071553856681 - 7822 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:50:56 - 1071553856682 - 7823 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:51:26 - 1071553886859 - 7824 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4035768315 - - - - 2003-12-16T00:51:26 - 1071553886861 - 7825 - org.codehaus.logger - INFO - Processing - run - 1539 - start run - - - 2003-12-16T00:51:26 - 1071553886861 - 7826 - org.codehaus.logger - INFO - Processing - run - 1539 - end run - - - 2003-12-16T00:51:26 - 1071553886861 - 7827 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:51:27 - 1071553887341 - 7828 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:51:57 - 1071553917029 - 7829 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4065928345 - - - - 2003-12-16T00:51:57 - 1071553917666 - 7830 - org.codehaus.logger - INFO - Processing - run - 1540 - start run - - - 2003-12-16T00:51:57 - 1071553917666 - 7831 - org.codehaus.logger - INFO - Processing - run - 1540 - end run - - - 2003-12-16T00:51:57 - 1071553917667 - 7832 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:51:57 - 1071553917667 - 7833 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:52:27 - 1071553947229 - 7834 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4096148406 - - - - 2003-12-16T00:52:27 - 1071553947231 - 7835 - org.codehaus.logger - INFO - Processing - run - 1541 - start run - - - 2003-12-16T00:52:27 - 1071553947231 - 7836 - org.codehaus.logger - INFO - Processing - run - 1541 - end run - - - 2003-12-16T00:52:27 - 1071553947232 - 7837 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:52:27 - 1071553947232 - 7838 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:52:57 - 1071553977380 - 7839 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4126308482 - - - - 2003-12-16T00:52:57 - 1071553977380 - 7840 - org.codehaus.logger - INFO - Processing - run - 1542 - start run - - - 2003-12-16T00:52:57 - 1071553977381 - 7841 - org.codehaus.logger - INFO - Processing - run - 1542 - end run - - - 2003-12-16T00:52:57 - 1071553977381 - 7842 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:52:57 - 1071553977381 - 7843 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:53:27 - 1071554007560 - 7844 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4156458538 - - - - 2003-12-16T00:53:27 - 1071554007560 - 7845 - org.codehaus.logger - INFO - Processing - run - 1543 - start run - - - 2003-12-16T00:53:27 - 1071554007560 - 7846 - org.codehaus.logger - INFO - Processing - run - 1543 - end run - - - 2003-12-16T00:53:27 - 1071554007561 - 7847 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:53:27 - 1071554007561 - 7848 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:53:57 - 1071554037730 - 7849 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4186608624 - - - - 2003-12-16T00:53:57 - 1071554037730 - 7850 - org.codehaus.logger - INFO - Processing - run - 1544 - start run - - - 2003-12-16T00:53:57 - 1071554037731 - 7851 - org.codehaus.logger - INFO - Processing - run - 1544 - end run - - - 2003-12-16T00:53:57 - 1071554037731 - 7852 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:53:57 - 1071554037731 - 7853 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:54:27 - 1071554067850 - 7854 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4216758675 - - - - 2003-12-16T00:54:27 - 1071554067850 - 7855 - org.codehaus.logger - INFO - Processing - run - 1545 - start run - - - 2003-12-16T00:54:27 - 1071554067851 - 7856 - org.codehaus.logger - INFO - Processing - run - 1545 - end run - - - 2003-12-16T00:54:27 - 1071554067851 - 7857 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:54:27 - 1071554067851 - 7858 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:54:41 - 1071554081840 - 7859 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-16T00:54:41 - 1071554081840 - 7860 - org.codehaus.logger - INFO - Processing - run - 1546 - start run - - - 2003-12-16T00:54:41 - 1071554081841 - 7861 - org.codehaus.logger - INFO - Processing - run - 1546 - end run - - - 2003-12-16T00:54:41 - 1071554081841 - 7862 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-16T00:54:41 - 1071554081841 - 7863 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-16T00:54:58 - 1071554098100 - 7864 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4246978745 - - - - 2003-12-16T00:54:58 - 1071554098100 - 7865 - org.codehaus.logger - INFO - Processing - run - 1547 - start run - - - 2003-12-16T00:54:58 - 1071554098102 - 7866 - org.codehaus.logger - INFO - Processing - run - 1547 - end run - - - 2003-12-16T00:54:58 - 1071554098102 - 7867 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:54:58 - 1071554098102 - 7868 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:55:28 - 1071554128220 - 7869 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4277118902 - - - - 2003-12-16T00:55:28 - 1071554128220 - 7870 - org.codehaus.logger - INFO - Processing - run - 1548 - start run - - - 2003-12-16T00:55:28 - 1071554128221 - 7871 - org.codehaus.logger - INFO - Processing - run - 1548 - end run - - - 2003-12-16T00:55:28 - 1071554128221 - 7872 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:55:28 - 1071554128221 - 7873 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:55:58 - 1071554158340 - 7874 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG12301590 - - - - 2003-12-16T00:55:58 - 1071554158342 - 7875 - org.codehaus.logger - INFO - Processing - run - 1549 - start run - - - 2003-12-16T00:55:58 - 1071554158342 - 7876 - org.codehaus.logger - INFO - Processing - run - 1549 - end run - - - 2003-12-16T00:55:58 - 1071554158342 - 7877 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:55:58 - 1071554158342 - 7878 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:56:28 - 1071554188520 - 7879 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG42451663 - - - - 2003-12-16T00:56:28 - 1071554188521 - 7880 - org.codehaus.logger - INFO - Processing - run - 1550 - start run - - - 2003-12-16T00:56:28 - 1071554188521 - 7881 - org.codehaus.logger - INFO - Processing - run - 1550 - end run - - - 2003-12-16T00:56:28 - 1071554188521 - 7882 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:56:28 - 1071554188521 - 7883 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:56:58 - 1071554218700 - 7884 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG72602440 - - - - 2003-12-16T00:56:58 - 1071554218701 - 7885 - org.codehaus.logger - INFO - Processing - run - 1551 - start run - - - 2003-12-16T00:56:58 - 1071554218701 - 7886 - org.codehaus.logger - INFO - Processing - run - 1551 - end run - - - 2003-12-16T00:56:58 - 1071554218701 - 7887 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:56:58 - 1071554218701 - 7888 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:57:28 - 1071554248790 - 7889 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG102751826 - - - - 2003-12-16T00:57:28 - 1071554248791 - 7890 - org.codehaus.logger - INFO - Processing - run - 1552 - start run - - - 2003-12-16T00:57:28 - 1071554248791 - 7891 - org.codehaus.logger - INFO - Processing - run - 1552 - end run - - - 2003-12-16T00:57:28 - 1071554248791 - 7892 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:57:28 - 1071554248791 - 7893 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:57:58 - 1071554278950 - 7894 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG132901883 - - - - 2003-12-16T00:57:58 - 1071554278951 - 7895 - org.codehaus.logger - INFO - Processing - run - 1553 - start run - - - 2003-12-16T00:57:58 - 1071554278952 - 7896 - org.codehaus.logger - INFO - Processing - run - 1553 - end run - - - 2003-12-16T00:57:58 - 1071554278952 - 7897 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:57:58 - 1071554278953 - 7898 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:58:29 - 1071554309110 - 7899 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG163061959 - - - - 2003-12-16T00:58:29 - 1071554309111 - 7900 - org.codehaus.logger - INFO - Processing - run - 1554 - start run - - - 2003-12-16T00:58:29 - 1071554309111 - 7901 - org.codehaus.logger - INFO - Processing - run - 1554 - end run - - - 2003-12-16T00:58:29 - 1071554309111 - 7902 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:58:29 - 1071554309111 - 7903 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:58:59 - 1071554339280 - 7904 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG193222035 - - - - 2003-12-16T00:58:59 - 1071554339281 - 7905 - org.codehaus.logger - INFO - Processing - run - 1555 - start run - - - 2003-12-16T00:58:59 - 1071554339283 - 7906 - org.codehaus.logger - INFO - Processing - run - 1555 - end run - - - 2003-12-16T00:58:59 - 1071554339283 - 7907 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:58:59 - 1071554339283 - 7908 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:59:29 - 1071554369461 - 7909 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG223382119 - - - - 2003-12-16T00:59:29 - 1071554369461 - 7910 - org.codehaus.logger - INFO - Processing - run - 1556 - start run - - - 2003-12-16T00:59:29 - 1071554369461 - 7911 - org.codehaus.logger - INFO - Processing - run - 1556 - end run - - - 2003-12-16T00:59:29 - 1071554369462 - 7912 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:59:29 - 1071554369462 - 7913 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T00:59:41 - 1071554381891 - 7914 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-16T00:59:41 - 1071554381891 - 7915 - org.codehaus.logger - INFO - Processing - run - 1557 - start run - - - 2003-12-16T00:59:41 - 1071554381891 - 7916 - org.codehaus.logger - INFO - Processing - run - 1557 - end run - - - 2003-12-16T00:59:41 - 1071554381892 - 7917 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-16T00:59:41 - 1071554381892 - 7918 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-16T00:59:59 - 1071554399611 - 7919 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG253532190 - - - - 2003-12-16T00:59:59 - 1071554399611 - 7920 - org.codehaus.logger - INFO - Processing - run - 1558 - start run - - - 2003-12-16T00:59:59 - 1071554399611 - 7921 - org.codehaus.logger - INFO - Processing - run - 1558 - end run - - - 2003-12-16T00:59:59 - 1071554399612 - 7922 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T00:59:59 - 1071554399612 - 7923 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:00:29 - 1071554429741 - 7924 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG283682271 - - - - 2003-12-16T01:00:29 - 1071554429741 - 7925 - org.codehaus.logger - INFO - Processing - run - 1559 - start run - - - 2003-12-16T01:00:29 - 1071554429742 - 7926 - org.codehaus.logger - INFO - Processing - run - 1559 - end run - - - 2003-12-16T01:00:29 - 1071554429742 - 7927 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:00:29 - 1071554429742 - 7928 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:00:59 - 1071554459921 - 7929 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG313832351 - - - - 2003-12-16T01:00:59 - 1071554459923 - 7930 - org.codehaus.logger - INFO - Processing - run - 1560 - start run - - - 2003-12-16T01:00:59 - 1071554459923 - 7931 - org.codehaus.logger - INFO - Processing - run - 1560 - end run - - - 2003-12-16T01:00:59 - 1071554459923 - 7932 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:00:59 - 1071554459924 - 7933 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:01:30 - 1071554490041 - 7934 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG343982432 - - - - 2003-12-16T01:01:30 - 1071554490041 - 7935 - org.codehaus.logger - INFO - Processing - run - 1561 - start run - - - 2003-12-16T01:01:30 - 1071554490042 - 7936 - org.codehaus.logger - INFO - Processing - run - 1561 - end run - - - 2003-12-16T01:01:30 - 1071554490042 - 7937 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:01:30 - 1071554490042 - 7938 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:02:00 - 1071554520221 - 7939 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG374152509 - - - - 2003-12-16T01:02:00 - 1071554520221 - 7940 - org.codehaus.logger - INFO - Processing - run - 1562 - start run - - - 2003-12-16T01:02:00 - 1071554520222 - 7941 - org.codehaus.logger - INFO - Processing - run - 1562 - end run - - - 2003-12-16T01:02:00 - 1071554520222 - 7942 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:02:00 - 1071554520222 - 7943 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:02:30 - 1071554550361 - 7944 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG404302590 - - - - 2003-12-16T01:02:30 - 1071554550363 - 7945 - org.codehaus.logger - INFO - Processing - run - 1563 - start run - - - 2003-12-16T01:02:30 - 1071554550363 - 7946 - org.codehaus.logger - INFO - Processing - run - 1563 - end run - - - 2003-12-16T01:02:30 - 1071554550363 - 7947 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:02:30 - 1071554550363 - 7948 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:03:00 - 1071554580513 - 7949 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG434442681 - - - - 2003-12-16T01:03:00 - 1071554580514 - 7950 - org.codehaus.logger - INFO - Processing - run - 1564 - start run - - - 2003-12-16T01:03:00 - 1071554580515 - 7951 - org.codehaus.logger - INFO - Processing - run - 1564 - end run - - - 2003-12-16T01:03:00 - 1071554580515 - 7952 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:03:00 - 1071554580515 - 7953 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:03:30 - 1071554610641 - 7954 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG464592783 - - - - 2003-12-16T01:03:30 - 1071554610642 - 7955 - org.codehaus.logger - INFO - Processing - run - 1565 - start run - - - 2003-12-16T01:03:30 - 1071554610642 - 7956 - org.codehaus.logger - INFO - Processing - run - 1565 - end run - - - 2003-12-16T01:03:30 - 1071554610643 - 7957 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:03:30 - 1071554610643 - 7958 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:04:00 - 1071554640831 - 7959 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG494752788 - - - - 2003-12-16T01:04:00 - 1071554640832 - 7960 - org.codehaus.logger - INFO - Processing - run - 1566 - start run - - - 2003-12-16T01:04:00 - 1071554640833 - 7961 - org.codehaus.logger - INFO - Processing - run - 1566 - end run - - - 2003-12-16T01:04:00 - 1071554640833 - 7962 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:04:00 - 1071554640834 - 7963 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:04:30 - 1071554670991 - 7964 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG524902853 - - - - 2003-12-16T01:04:30 - 1071554670992 - 7965 - org.codehaus.logger - INFO - Processing - run - 1567 - start run - - - 2003-12-16T01:04:30 - 1071554670992 - 7966 - org.codehaus.logger - INFO - Processing - run - 1567 - end run - - - 2003-12-16T01:04:30 - 1071554670992 - 7967 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:04:30 - 1071554670992 - 7968 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:04:41 - 1071554681911 - 7969 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-16T01:04:41 - 1071554681912 - 7970 - org.codehaus.logger - INFO - Processing - run - 1568 - start run - - - 2003-12-16T01:04:41 - 1071554681912 - 7971 - org.codehaus.logger - INFO - Processing - run - 1568 - end run - - - 2003-12-16T01:04:41 - 1071554681913 - 7972 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-16T01:04:41 - 1071554681913 - 7973 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-16T01:05:01 - 1071554701111 - 7974 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG555052921 - - - - 2003-12-16T01:05:01 - 1071554701112 - 7975 - org.codehaus.logger - INFO - Processing - run - 1569 - start run - - - 2003-12-16T01:05:01 - 1071554701112 - 7976 - org.codehaus.logger - INFO - Processing - run - 1569 - end run - - - 2003-12-16T01:05:01 - 1071554701112 - 7977 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:05:01 - 1071554701113 - 7978 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:05:31 - 1071554731301 - 7979 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG585213014 - - - - 2003-12-16T01:05:31 - 1071554731302 - 7980 - org.codehaus.logger - INFO - Processing - run - 1570 - start run - - - 2003-12-16T01:05:31 - 1071554731303 - 7981 - org.codehaus.logger - INFO - Processing - run - 1570 - end run - - - 2003-12-16T01:05:31 - 1071554731303 - 7982 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:05:31 - 1071554731304 - 7983 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:06:01 - 1071554761421 - 7984 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG615353122 - - - - 2003-12-16T01:06:01 - 1071554761423 - 7985 - org.codehaus.logger - INFO - Processing - run - 1571 - start run - - - 2003-12-16T01:06:01 - 1071554761423 - 7986 - org.codehaus.logger - INFO - Processing - run - 1571 - end run - - - 2003-12-16T01:06:01 - 1071554761423 - 7987 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:06:01 - 1071554761424 - 7988 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:06:31 - 1071554791561 - 7989 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG645503145 - - - - 2003-12-16T01:06:31 - 1071554791562 - 7990 - org.codehaus.logger - INFO - Processing - run - 1572 - start run - - - 2003-12-16T01:06:31 - 1071554791562 - 7991 - org.codehaus.logger - INFO - Processing - run - 1572 - end run - - - 2003-12-16T01:06:31 - 1071554791563 - 7992 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:06:31 - 1071554791563 - 7993 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:07:01 - 1071554821742 - 7994 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG675653214 - - - - 2003-12-16T01:07:01 - 1071554821743 - 7995 - org.codehaus.logger - INFO - Processing - run - 1573 - start run - - - 2003-12-16T01:07:01 - 1071554821743 - 7996 - org.codehaus.logger - INFO - Processing - run - 1573 - end run - - - 2003-12-16T01:07:01 - 1071554821744 - 7997 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:07:01 - 1071554821744 - 7998 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:07:31 - 1071554851862 - 7999 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG705803287 - - - - 2003-12-16T01:07:31 - 1071554851862 - 8000 - org.codehaus.logger - INFO - Processing - run - 1574 - start run - - - 2003-12-16T01:07:31 - 1071554851862 - 8001 - org.codehaus.logger - INFO - Processing - run - 1574 - end run - - - 2003-12-16T01:07:31 - 1071554851863 - 8002 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:07:31 - 1071554851863 - 8003 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:08:02 - 1071554882042 - 8004 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG735953358 - - - - 2003-12-16T01:08:02 - 1071554882042 - 8005 - org.codehaus.logger - INFO - Processing - run - 1575 - start run - - - 2003-12-16T01:08:02 - 1071554882042 - 8006 - org.codehaus.logger - INFO - Processing - run - 1575 - end run - - - 2003-12-16T01:08:02 - 1071554882043 - 8007 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:08:02 - 1071554882043 - 8008 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:08:32 - 1071554912162 - 8009 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG766103434 - - - - 2003-12-16T01:08:32 - 1071554912162 - 8010 - org.codehaus.logger - INFO - Processing - run - 1576 - start run - - - 2003-12-16T01:08:32 - 1071554912163 - 8011 - org.codehaus.logger - INFO - Processing - run - 1576 - end run - - - 2003-12-16T01:08:32 - 1071554912163 - 8012 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:08:32 - 1071554912163 - 8013 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:09:02 - 1071554942342 - 8014 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG796253585 - - - - 2003-12-16T01:09:02 - 1071554942342 - 8015 - org.codehaus.logger - INFO - Processing - run - 1577 - start run - - - 2003-12-16T01:09:02 - 1071554942343 - 8016 - org.codehaus.logger - INFO - Processing - run - 1577 - end run - - - 2003-12-16T01:09:02 - 1071554942343 - 8017 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:09:02 - 1071554942343 - 8018 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:09:32 - 1071554972492 - 8019 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG826403668 - - - - 2003-12-16T01:09:32 - 1071554972493 - 8020 - org.codehaus.logger - INFO - Processing - run - 1578 - start run - - - 2003-12-16T01:09:32 - 1071554972493 - 8021 - org.codehaus.logger - INFO - Processing - run - 1578 - end run - - - 2003-12-16T01:09:32 - 1071554972493 - 8022 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:09:32 - 1071554972493 - 8023 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:09:41 - 1071554981873 - 8024 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-16T01:09:41 - 1071554981874 - 8025 - org.codehaus.logger - INFO - Processing - run - 1579 - start run - - - 2003-12-16T01:09:41 - 1071554981874 - 8026 - org.codehaus.logger - INFO - Processing - run - 1579 - end run - - - 2003-12-16T01:09:41 - 1071554981874 - 8027 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-16T01:09:41 - 1071554981874 - 8028 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-16T01:10:02 - 1071555002582 - 8029 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG856543663 - - - - 2003-12-16T01:10:02 - 1071555002584 - 8030 - org.codehaus.logger - INFO - Processing - run - 1580 - start run - - - 2003-12-16T01:10:02 - 1071555002584 - 8031 - org.codehaus.logger - INFO - Processing - run - 1580 - end run - - - 2003-12-16T01:10:02 - 1071555002584 - 8032 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:10:02 - 1071555002585 - 8033 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:10:32 - 1071555032742 - 8034 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG886693738 - - - - 2003-12-16T01:10:32 - 1071555032764 - 8035 - org.codehaus.logger - INFO - Processing - run - 1581 - start run - - - 2003-12-16T01:10:32 - 1071555032764 - 8036 - org.codehaus.logger - INFO - Processing - run - 1581 - end run - - - 2003-12-16T01:10:32 - 1071555032764 - 8037 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:10:32 - 1071555032764 - 8038 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:11:02 - 1071555062902 - 8039 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG916843879 - - - - 2003-12-16T01:11:02 - 1071555062903 - 8040 - org.codehaus.logger - INFO - Processing - run - 1582 - start run - - - 2003-12-16T01:11:02 - 1071555062903 - 8041 - org.codehaus.logger - INFO - Processing - run - 1582 - end run - - - 2003-12-16T01:11:02 - 1071555062904 - 8042 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:11:02 - 1071555062904 - 8043 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:11:33 - 1071555093032 - 8044 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG946993899 - - - - 2003-12-16T01:11:33 - 1071555093034 - 8045 - org.codehaus.logger - INFO - Processing - run - 1583 - start run - - - 2003-12-16T01:11:33 - 1071555093034 - 8046 - org.codehaus.logger - INFO - Processing - run - 1583 - end run - - - 2003-12-16T01:11:33 - 1071555093035 - 8047 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:11:33 - 1071555093035 - 8048 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:12:03 - 1071555123232 - 8049 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG977153974 - - - - 2003-12-16T01:12:03 - 1071555123233 - 8050 - org.codehaus.logger - INFO - Processing - run - 1584 - start run - - - 2003-12-16T01:12:03 - 1071555123233 - 8051 - org.codehaus.logger - INFO - Processing - run - 1584 - end run - - - 2003-12-16T01:12:03 - 1071555123233 - 8052 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:12:03 - 1071555123234 - 8053 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:12:33 - 1071555153392 - 8054 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1007304063 - - - - 2003-12-16T01:12:33 - 1071555153393 - 8055 - org.codehaus.logger - INFO - Processing - run - 1585 - start run - - - 2003-12-16T01:12:33 - 1071555153393 - 8056 - org.codehaus.logger - INFO - Processing - run - 1585 - end run - - - 2003-12-16T01:12:33 - 1071555153393 - 8057 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:12:33 - 1071555153394 - 8058 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:13:03 - 1071555183533 - 8059 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1037454148 - - - - 2003-12-16T01:13:03 - 1071555183533 - 8060 - org.codehaus.logger - INFO - Processing - run - 1586 - start run - - - 2003-12-16T01:13:03 - 1071555183533 - 8061 - org.codehaus.logger - INFO - Processing - run - 1586 - end run - - - 2003-12-16T01:13:03 - 1071555183534 - 8062 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:13:03 - 1071555183535 - 8063 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:13:33 - 1071555213653 - 8064 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1067604233 - - - - 2003-12-16T01:13:33 - 1071555213653 - 8065 - org.codehaus.logger - INFO - Processing - run - 1587 - start run - - - 2003-12-16T01:13:33 - 1071555213654 - 8066 - org.codehaus.logger - INFO - Processing - run - 1587 - end run - - - 2003-12-16T01:13:33 - 1071555213654 - 8067 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:13:33 - 1071555213654 - 8068 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:14:03 - 1071555243813 - 8069 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1097754311 - - - - 2003-12-16T01:14:03 - 1071555243814 - 8070 - org.codehaus.logger - INFO - Processing - run - 1588 - start run - - - 2003-12-16T01:14:03 - 1071555243814 - 8071 - org.codehaus.logger - INFO - Processing - run - 1588 - end run - - - 2003-12-16T01:14:03 - 1071555243815 - 8072 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:14:03 - 1071555243815 - 8073 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:14:33 - 1071555273953 - 8074 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1127904395 - - - - 2003-12-16T01:14:33 - 1071555273953 - 8075 - org.codehaus.logger - INFO - Processing - run - 1589 - start run - - - 2003-12-16T01:14:33 - 1071555273954 - 8076 - org.codehaus.logger - INFO - Processing - run - 1589 - end run - - - 2003-12-16T01:14:33 - 1071555273954 - 8077 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:14:33 - 1071555273954 - 8078 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:14:41 - 1071555281873 - 8079 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-16T01:14:41 - 1071555281874 - 8080 - org.codehaus.logger - INFO - Processing - run - 1590 - start run - - - 2003-12-16T01:14:41 - 1071555281874 - 8081 - org.codehaus.logger - INFO - Processing - run - 1590 - end run - - - 2003-12-16T01:14:41 - 1071555281875 - 8082 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-16T01:14:41 - 1071555281875 - 8083 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-16T01:15:04 - 1071555304113 - 8084 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1158054480 - - - - 2003-12-16T01:15:04 - 1071555304114 - 8085 - org.codehaus.logger - INFO - Processing - run - 1591 - start run - - - 2003-12-16T01:15:04 - 1071555304115 - 8086 - org.codehaus.logger - INFO - Processing - run - 1591 - end run - - - 2003-12-16T01:15:04 - 1071555304115 - 8087 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:15:04 - 1071555304115 - 8088 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:15:34 - 1071555334253 - 8089 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1188204564 - - - - 2003-12-16T01:15:34 - 1071555334254 - 8090 - org.codehaus.logger - INFO - Processing - run - 1592 - start run - - - 2003-12-16T01:15:34 - 1071555334254 - 8091 - org.codehaus.logger - INFO - Processing - run - 1592 - end run - - - 2003-12-16T01:15:34 - 1071555334255 - 8092 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:15:34 - 1071555334255 - 8093 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:16:04 - 1071555364413 - 8094 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1218354642 - - - - 2003-12-16T01:16:04 - 1071555364414 - 8095 - org.codehaus.logger - INFO - Processing - run - 1593 - start run - - - 2003-12-16T01:16:04 - 1071555364415 - 8096 - org.codehaus.logger - INFO - Processing - run - 1593 - end run - - - 2003-12-16T01:16:04 - 1071555364415 - 8097 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:16:04 - 1071555364415 - 8098 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:16:34 - 1071555394553 - 8099 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1248504744 - - - - 2003-12-16T01:16:34 - 1071555394554 - 8100 - org.codehaus.logger - INFO - Processing - run - 1594 - start run - - - 2003-12-16T01:16:34 - 1071555394554 - 8101 - org.codehaus.logger - INFO - Processing - run - 1594 - end run - - - 2003-12-16T01:16:34 - 1071555394555 - 8102 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:16:34 - 1071555394555 - 8103 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:17:04 - 1071555424743 - 8104 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1278654826 - - - - 2003-12-16T01:17:04 - 1071555424744 - 8105 - org.codehaus.logger - INFO - Processing - run - 1595 - start run - - - 2003-12-16T01:17:04 - 1071555424744 - 8106 - org.codehaus.logger - INFO - Processing - run - 1595 - end run - - - 2003-12-16T01:17:04 - 1071555424744 - 8107 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:17:04 - 1071555424745 - 8108 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:17:34 - 1071555454863 - 8109 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1308794916 - - - - 2003-12-16T01:17:34 - 1071555454864 - 8110 - org.codehaus.logger - INFO - Processing - run - 1596 - start run - - - 2003-12-16T01:17:34 - 1071555454865 - 8111 - org.codehaus.logger - INFO - Processing - run - 1596 - end run - - - 2003-12-16T01:17:34 - 1071555454865 - 8112 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:17:34 - 1071555454865 - 8113 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:18:05 - 1071555485023 - 8114 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1338945072 - - - - 2003-12-16T01:18:05 - 1071555485024 - 8115 - org.codehaus.logger - INFO - Processing - run - 1597 - start run - - - 2003-12-16T01:18:05 - 1071555485024 - 8116 - org.codehaus.logger - INFO - Processing - run - 1597 - end run - - - 2003-12-16T01:18:05 - 1071555485024 - 8117 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:18:05 - 1071555485025 - 8118 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:18:35 - 1071555515144 - 8119 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1369105095 - - - - 2003-12-16T01:18:35 - 1071555515144 - 8120 - org.codehaus.logger - INFO - Processing - run - 1598 - start run - - - 2003-12-16T01:18:35 - 1071555515145 - 8121 - org.codehaus.logger - INFO - Processing - run - 1598 - end run - - - 2003-12-16T01:18:35 - 1071555515145 - 8122 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:18:35 - 1071555515145 - 8123 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:19:05 - 1071555545324 - 8124 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1399255188 - - - - 2003-12-16T01:19:05 - 1071555545324 - 8125 - org.codehaus.logger - INFO - Processing - run - 1599 - start run - - - 2003-12-16T01:19:05 - 1071555545324 - 8126 - org.codehaus.logger - INFO - Processing - run - 1599 - end run - - - 2003-12-16T01:19:05 - 1071555545325 - 8127 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:19:05 - 1071555545325 - 8128 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:19:35 - 1071555575444 - 8129 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1429395297 - - - - 2003-12-16T01:19:35 - 1071555575444 - 8130 - org.codehaus.logger - INFO - Processing - run - 1600 - start run - - - 2003-12-16T01:19:35 - 1071555575444 - 8131 - org.codehaus.logger - INFO - Processing - run - 1600 - end run - - - 2003-12-16T01:19:35 - 1071555575445 - 8132 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:19:35 - 1071555575445 - 8133 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:19:41 - 1071555581864 - 8134 - org.codehaus.logger - INFO - Listening - receive - 30 - <----PING :ALIVECHECK - - - - 2003-12-16T01:19:41 - 1071555581864 - 8135 - org.codehaus.logger - INFO - Processing - run - 1601 - start run - - - 2003-12-16T01:19:41 - 1071555581865 - 8136 - org.codehaus.logger - INFO - Processing - run - 1601 - end run - - - 2003-12-16T01:19:41 - 1071555581865 - 8137 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-16T01:19:41 - 1071555581865 - 8138 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - start waiting - - - 2003-12-16T01:20:05 - 1071555605624 - 8139 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1459545429 - - - - 2003-12-16T01:20:05 - 1071555605624 - 8140 - org.codehaus.logger - INFO - Processing - run - 1602 - start run - - - 2003-12-16T01:20:05 - 1071555605626 - 8141 - org.codehaus.logger - INFO - Processing - run - 1602 - end run - - - 2003-12-16T01:20:05 - 1071555605626 - 8142 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:20:05 - 1071555605626 - 8143 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:20:35 - 1071555635744 - 8144 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1489695563 - - - - 2003-12-16T01:20:35 - 1071555635744 - 8145 - org.codehaus.logger - INFO - Processing - run - 1603 - start run - - - 2003-12-16T01:20:35 - 1071555635745 - 8146 - org.codehaus.logger - INFO - Processing - run - 1603 - end run - - - 2003-12-16T01:20:35 - 1071555635745 - 8147 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:20:35 - 1071555635745 - 8148 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:20:47 - 1071555647684 - 8149 - org.codehaus.logger - INFO - Listening - receive - 30 - <----QUIT :ChatZilla 0.9.52 [Mozilla rv:1.6b/20031208] - - - - 2003-12-16T01:20:47 - 1071555647685 - 8150 - org.codehaus.logger - INFO - Processing - run - 1604 - start run - - - 2003-12-16T01:20:47 - 1071555647685 - 8151 - org.codehaus.logger - INFO - Processing - run - 1604 - end run - - - 2003-12-16T01:20:47 - 1071555647685 - 8152 - org.codehaus.logger - INFO - Talking - waitResponse - 31 - end waiting - - - 2003-12-16T01:20:47 - 1071555647685 - 8153 - org.codehaus.logger - INFO - Talking - run - 31 - end run - - - 2003-12-16T01:20:47 - 1071555647744 - 8154 - org.codehaus.logger - INFO - Listening - run - 30 - end run - - - 2003-12-16T01:20:47 - 1071555647754 - 8155 - org.codehaus.logger - INFO - Listening - run - 1605 - start run - - - 2003-12-16T01:20:47 - 1071555647788 - 8156 - org.codehaus.logger - INFO - Talking - run - 1606 - start run - - - 2003-12-16T01:20:47 - 1071555647821 - 8157 - org.codehaus.logger - INFO - Talking - waitResponse - 1606 - start waiting - - - 2003-12-16T01:20:47 - 1071555647821 - 8158 - org.codehaus.logger - INFO - Listening - receive - 1605 - <----NICK noah - - - - 2003-12-16T01:20:47 - 1071555647821 - 8159 - org.codehaus.logger - INFO - Processing - run - 1607 - start run - - - 2003-12-16T01:20:47 - 1071555647822 - 8160 - org.codehaus.logger - INFO - Processing - run - 1607 - end run - - - 2003-12-16T01:20:47 - 1071555647855 - 8161 - org.codehaus.logger - INFO - Talking - waitResponse - 1606 - end waiting - - - 2003-12-16T01:20:47 - 1071555647856 - 8162 - org.codehaus.logger - INFO - Talking - send - 1606 - ------>:localhost NOTICE noah :Your nickname has been set to noah - - - - 2003-12-16T01:20:47 - 1071555647856 - 8163 - org.codehaus.logger - INFO - Talking - waitResponse - 1606 - start waiting - - - 2003-12-16T01:21:05 - 1071555665924 - 8164 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1519835698 - - - - 2003-12-16T01:21:05 - 1071555665925 - 8165 - org.codehaus.logger - INFO - Processing - run - 1608 - start run - - - 2003-12-16T01:21:05 - 1071555665925 - 8166 - org.codehaus.logger - INFO - Processing - run - 1608 - end run - - - 2003-12-16T01:21:05 - 1071555665925 - 8167 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:21:05 - 1071555665925 - 8168 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:21:36 - 1071555696044 - 8169 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1549985834 - - - - 2003-12-16T01:21:36 - 1071555696046 - 8170 - org.codehaus.logger - INFO - Processing - run - 1609 - start run - - - 2003-12-16T01:21:36 - 1071555696046 - 8171 - org.codehaus.logger - INFO - Processing - run - 1609 - end run - - - 2003-12-16T01:21:36 - 1071555696046 - 8172 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:21:36 - 1071555696046 - 8173 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:22:06 - 1071555726205 - 8174 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1580135976 - - - - 2003-12-16T01:22:06 - 1071555726205 - 8175 - org.codehaus.logger - INFO - Processing - run - 1610 - start run - - - 2003-12-16T01:22:06 - 1071555726206 - 8176 - org.codehaus.logger - INFO - Processing - run - 1610 - end run - - - 2003-12-16T01:22:06 - 1071555726206 - 8177 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:22:06 - 1071555726206 - 8178 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:22:36 - 1071555756355 - 8179 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1610286114 - - - - 2003-12-16T01:22:36 - 1071555756355 - 8180 - org.codehaus.logger - INFO - Processing - run - 1611 - start run - - - 2003-12-16T01:22:36 - 1071555756896 - 8181 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:22:36 - 1071555756896 - 8182 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:22:36 - 1071555756896 - 8183 - org.codehaus.logger - INFO - Processing - run - 1611 - end run - - - 2003-12-16T01:23:06 - 1071555786525 - 8184 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1640436243 - - - - 2003-12-16T01:23:06 - 1071555786525 - 8185 - org.codehaus.logger - INFO - Processing - run - 1612 - start run - - - 2003-12-16T01:23:06 - 1071555786525 - 8186 - org.codehaus.logger - INFO - Processing - run - 1612 - end run - - - 2003-12-16T01:23:06 - 1071555786526 - 8187 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:23:06 - 1071555786526 - 8188 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:23:36 - 1071555816675 - 8189 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1670586382 - - - - 2003-12-16T01:23:36 - 1071555816675 - 8190 - org.codehaus.logger - INFO - Processing - run - 1613 - start run - - - 2003-12-16T01:23:36 - 1071555816676 - 8191 - org.codehaus.logger - INFO - Processing - run - 1613 - end run - - - 2003-12-16T01:23:36 - 1071555816676 - 8192 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:23:36 - 1071555816676 - 8193 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:24:06 - 1071555846825 - 8194 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1700756517 - - - - 2003-12-16T01:24:06 - 1071555846826 - 8195 - org.codehaus.logger - INFO - Processing - run - 1614 - start run - - - 2003-12-16T01:24:06 - 1071555846827 - 8196 - org.codehaus.logger - INFO - Processing - run - 1614 - end run - - - 2003-12-16T01:24:06 - 1071555846827 - 8197 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:24:06 - 1071555846828 - 8198 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:24:36 - 1071555876985 - 8199 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1730906653 - - - - 2003-12-16T01:24:36 - 1071555876986 - 8200 - org.codehaus.logger - INFO - Processing - run - 1615 - start run - - - 2003-12-16T01:24:36 - 1071555876986 - 8201 - org.codehaus.logger - INFO - Processing - run - 1615 - end run - - - 2003-12-16T01:24:36 - 1071555876986 - 8202 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:24:36 - 1071555876986 - 8203 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:25:07 - 1071555907135 - 8204 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1761056797 - - - - 2003-12-16T01:25:07 - 1071555907136 - 8205 - org.codehaus.logger - INFO - Processing - run - 1616 - start run - - - 2003-12-16T01:25:07 - 1071555907136 - 8206 - org.codehaus.logger - INFO - Processing - run - 1616 - end run - - - 2003-12-16T01:25:07 - 1071555907136 - 8207 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:25:07 - 1071555907136 - 8208 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:25:37 - 1071555937275 - 8209 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1791206939 - - - - 2003-12-16T01:25:37 - 1071555937276 - 8210 - org.codehaus.logger - INFO - Processing - run - 1617 - start run - - - 2003-12-16T01:25:37 - 1071555937276 - 8211 - org.codehaus.logger - INFO - Processing - run - 1617 - end run - - - 2003-12-16T01:25:37 - 1071555937277 - 8212 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:25:37 - 1071555937277 - 8213 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:26:07 - 1071555967415 - 8214 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1821367606 - - - - 2003-12-16T01:26:07 - 1071555967416 - 8215 - org.codehaus.logger - INFO - Processing - run - 1618 - start run - - - 2003-12-16T01:26:07 - 1071555967416 - 8216 - org.codehaus.logger - INFO - Processing - run - 1618 - end run - - - 2003-12-16T01:26:07 - 1071555967417 - 8217 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:26:07 - 1071555967417 - 8218 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:26:37 - 1071555997606 - 8219 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1851517216 - - - - 2003-12-16T01:26:38 - 1071555998158 - 8220 - org.codehaus.logger - INFO - Processing - run - 1619 - start run - - - 2003-12-16T01:26:38 - 1071555998158 - 8221 - org.codehaus.logger - INFO - Processing - run - 1619 - end run - - - 2003-12-16T01:26:38 - 1071555998158 - 8222 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:26:38 - 1071555998158 - 8223 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:27:07 - 1071556027706 - 8224 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1881667352 - - - - 2003-12-16T01:27:07 - 1071556027707 - 8225 - org.codehaus.logger - INFO - Processing - run - 1620 - start run - - - 2003-12-16T01:27:07 - 1071556027707 - 8226 - org.codehaus.logger - INFO - Processing - run - 1620 - end run - - - 2003-12-16T01:27:07 - 1071556027707 - 8227 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:27:07 - 1071556027707 - 8228 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:27:37 - 1071556057866 - 8229 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1911807488 - - - - 2003-12-16T01:27:37 - 1071556057867 - 8230 - org.codehaus.logger - INFO - Processing - run - 1621 - start run - - - 2003-12-16T01:27:37 - 1071556057867 - 8231 - org.codehaus.logger - INFO - Processing - run - 1621 - end run - - - 2003-12-16T01:27:37 - 1071556057867 - 8232 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:27:37 - 1071556057867 - 8233 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:28:07 - 1071556087996 - 8234 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1941957631 - - - - 2003-12-16T01:28:07 - 1071556087997 - 8235 - org.codehaus.logger - INFO - Processing - run - 1622 - start run - - - 2003-12-16T01:28:07 - 1071556087997 - 8236 - org.codehaus.logger - INFO - Processing - run - 1622 - end run - - - 2003-12-16T01:28:07 - 1071556087997 - 8237 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:28:07 - 1071556087998 - 8238 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:28:38 - 1071556118176 - 8239 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1972107770 - - - - 2003-12-16T01:28:38 - 1071556118177 - 8240 - org.codehaus.logger - INFO - Processing - run - 1623 - start run - - - 2003-12-16T01:28:38 - 1071556118177 - 8241 - org.codehaus.logger - INFO - Processing - run - 1623 - end run - - - 2003-12-16T01:28:38 - 1071556118177 - 8242 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:28:38 - 1071556118177 - 8243 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:29:08 - 1071556148306 - 8244 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2002267910 - - - - 2003-12-16T01:29:08 - 1071556148307 - 8245 - org.codehaus.logger - INFO - Processing - run - 1624 - start run - - - 2003-12-16T01:29:08 - 1071556148307 - 8246 - org.codehaus.logger - INFO - Processing - run - 1624 - end run - - - 2003-12-16T01:29:08 - 1071556148307 - 8247 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:29:08 - 1071556148308 - 8248 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:29:38 - 1071556178496 - 8249 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2032418050 - - - - 2003-12-16T01:29:38 - 1071556178497 - 8250 - org.codehaus.logger - INFO - Processing - run - 1625 - start run - - - 2003-12-16T01:29:38 - 1071556178497 - 8251 - org.codehaus.logger - INFO - Processing - run - 1625 - end run - - - 2003-12-16T01:29:38 - 1071556178498 - 8252 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:29:38 - 1071556178498 - 8253 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:30:08 - 1071556208617 - 8254 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2062558211 - - - - 2003-12-16T01:30:08 - 1071556208618 - 8255 - org.codehaus.logger - INFO - Processing - run - 1626 - start run - - - 2003-12-16T01:30:08 - 1071556208618 - 8256 - org.codehaus.logger - INFO - Processing - run - 1626 - end run - - - 2003-12-16T01:30:08 - 1071556208619 - 8257 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:30:08 - 1071556208619 - 8258 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:30:38 - 1071556238797 - 8259 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2092708339 - - - - 2003-12-16T01:30:38 - 1071556238799 - 8260 - org.codehaus.logger - INFO - Processing - run - 1627 - start run - - - 2003-12-16T01:30:38 - 1071556238799 - 8261 - org.codehaus.logger - INFO - Processing - run - 1627 - end run - - - 2003-12-16T01:30:38 - 1071556238800 - 8262 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:30:38 - 1071556238800 - 8263 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:31:08 - 1071556268897 - 8264 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2122858476 - - - - 2003-12-16T01:31:08 - 1071556268898 - 8265 - org.codehaus.logger - INFO - Processing - run - 1628 - start run - - - 2003-12-16T01:31:08 - 1071556268898 - 8266 - org.codehaus.logger - INFO - Processing - run - 1628 - end run - - - 2003-12-16T01:31:08 - 1071556268898 - 8267 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:31:08 - 1071556268898 - 8268 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:31:39 - 1071556299097 - 8269 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2153018617 - - - - 2003-12-16T01:31:39 - 1071556299098 - 8270 - org.codehaus.logger - INFO - Processing - run - 1629 - start run - - - 2003-12-16T01:31:39 - 1071556299098 - 8271 - org.codehaus.logger - INFO - Processing - run - 1629 - end run - - - 2003-12-16T01:31:39 - 1071556299098 - 8272 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:31:39 - 1071556299098 - 8273 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:32:09 - 1071556329207 - 8274 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2183168756 - - - - 2003-12-16T01:32:09 - 1071556329209 - 8275 - org.codehaus.logger - INFO - Processing - run - 1630 - start run - - - 2003-12-16T01:32:09 - 1071556329209 - 8276 - org.codehaus.logger - INFO - Processing - run - 1630 - end run - - - 2003-12-16T01:32:09 - 1071556329209 - 8277 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:32:09 - 1071556329210 - 8278 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:32:39 - 1071556359397 - 8279 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2213318908 - - - - 2003-12-16T01:32:39 - 1071556359398 - 8280 - org.codehaus.logger - INFO - Processing - run - 1631 - start run - - - 2003-12-16T01:32:39 - 1071556359399 - 8281 - org.codehaus.logger - INFO - Processing - run - 1631 - end run - - - 2003-12-16T01:32:39 - 1071556359399 - 8282 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:32:39 - 1071556359400 - 8283 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:33:09 - 1071556389517 - 8284 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2243469054 - - - - 2003-12-16T01:33:09 - 1071556389518 - 8285 - org.codehaus.logger - INFO - Processing - run - 1632 - start run - - - 2003-12-16T01:33:09 - 1071556389518 - 8286 - org.codehaus.logger - INFO - Processing - run - 1632 - end run - - - 2003-12-16T01:33:09 - 1071556389519 - 8287 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:33:09 - 1071556389519 - 8288 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:33:39 - 1071556419678 - 8289 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2273629191 - - - - 2003-12-16T01:33:39 - 1071556419678 - 8290 - org.codehaus.logger - INFO - Processing - run - 1633 - start run - - - 2003-12-16T01:33:39 - 1071556419678 - 8291 - org.codehaus.logger - INFO - Processing - run - 1633 - end run - - - 2003-12-16T01:33:39 - 1071556419679 - 8292 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:33:39 - 1071556419679 - 8293 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:34:09 - 1071556449818 - 8294 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2303779344 - - - - 2003-12-16T01:34:09 - 1071556449819 - 8295 - org.codehaus.logger - INFO - Processing - run - 1634 - start run - - - 2003-12-16T01:34:09 - 1071556449820 - 8296 - org.codehaus.logger - INFO - Processing - run - 1634 - end run - - - 2003-12-16T01:34:09 - 1071556449820 - 8297 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:34:09 - 1071556449820 - 8298 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:34:39 - 1071556479998 - 8299 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2333929480 - - - - 2003-12-16T01:34:39 - 1071556479999 - 8300 - org.codehaus.logger - INFO - Processing - run - 1635 - start run - - - 2003-12-16T01:34:39 - 1071556479999 - 8301 - org.codehaus.logger - INFO - Processing - run - 1635 - end run - - - 2003-12-16T01:34:40 - 1071556480000 - 8302 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:34:40 - 1071556480000 - 8303 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:35:10 - 1071556510178 - 8304 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2364089633 - - - - 2003-12-16T01:35:10 - 1071556510179 - 8305 - org.codehaus.logger - INFO - Processing - run - 1636 - start run - - - 2003-12-16T01:35:10 - 1071556510179 - 8306 - org.codehaus.logger - INFO - Processing - run - 1636 - end run - - - 2003-12-16T01:35:10 - 1071556510179 - 8307 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:35:10 - 1071556510179 - 8308 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:35:40 - 1071556540298 - 8309 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2394239773 - - - - 2003-12-16T01:35:40 - 1071556540299 - 8310 - org.codehaus.logger - INFO - Processing - run - 1637 - start run - - - 2003-12-16T01:35:40 - 1071556540299 - 8311 - org.codehaus.logger - INFO - Processing - run - 1637 - end run - - - 2003-12-16T01:35:40 - 1071556540299 - 8312 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:35:40 - 1071556540300 - 8313 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:36:10 - 1071556570458 - 8314 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2424389925 - - - - 2003-12-16T01:36:10 - 1071556570459 - 8315 - org.codehaus.logger - INFO - Processing - run - 1638 - start run - - - 2003-12-16T01:36:10 - 1071556570459 - 8316 - org.codehaus.logger - INFO - Processing - run - 1638 - end run - - - 2003-12-16T01:36:10 - 1071556570459 - 8317 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:36:10 - 1071556570459 - 8318 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:36:40 - 1071556600598 - 8319 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2454540021 - - - - 2003-12-16T01:36:40 - 1071556600599 - 8320 - org.codehaus.logger - INFO - Processing - run - 1639 - start run - - - 2003-12-16T01:36:40 - 1071556600599 - 8321 - org.codehaus.logger - INFO - Processing - run - 1639 - end run - - - 2003-12-16T01:36:40 - 1071556600600 - 8322 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:36:40 - 1071556600600 - 8323 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:37:10 - 1071556630778 - 8324 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2484690069 - - - - 2003-12-16T01:37:10 - 1071556630779 - 8325 - org.codehaus.logger - INFO - Processing - run - 1640 - start run - - - 2003-12-16T01:37:10 - 1071556630779 - 8326 - org.codehaus.logger - INFO - Processing - run - 1640 - end run - - - 2003-12-16T01:37:10 - 1071556630780 - 8327 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:37:10 - 1071556630780 - 8328 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:37:40 - 1071556660899 - 8329 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2514840115 - - - - 2003-12-16T01:37:40 - 1071556660900 - 8330 - org.codehaus.logger - INFO - Processing - run - 1641 - start run - - - 2003-12-16T01:37:40 - 1071556660900 - 8331 - org.codehaus.logger - INFO - Processing - run - 1641 - end run - - - 2003-12-16T01:37:40 - 1071556660900 - 8332 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:37:40 - 1071556660901 - 8333 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:38:11 - 1071556691079 - 8334 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2544990162 - - - - 2003-12-16T01:38:11 - 1071556691079 - 8335 - org.codehaus.logger - INFO - Processing - run - 1642 - start run - - - 2003-12-16T01:38:11 - 1071556691080 - 8336 - org.codehaus.logger - INFO - Processing - run - 1642 - end run - - - 2003-12-16T01:38:11 - 1071556691080 - 8337 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:38:11 - 1071556691081 - 8338 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:38:41 - 1071556721199 - 8339 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2575160217 - - - - 2003-12-16T01:38:41 - 1071556721199 - 8340 - org.codehaus.logger - INFO - Processing - run - 1643 - start run - - - 2003-12-16T01:38:41 - 1071556721200 - 8341 - org.codehaus.logger - INFO - Processing - run - 1643 - end run - - - 2003-12-16T01:38:41 - 1071556721200 - 8342 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:38:41 - 1071556721200 - 8343 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:39:11 - 1071556751379 - 8344 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2605320264 - - - - 2003-12-16T01:39:11 - 1071556751379 - 8345 - org.codehaus.logger - INFO - Processing - run - 1644 - start run - - - 2003-12-16T01:39:11 - 1071556751380 - 8346 - org.codehaus.logger - INFO - Processing - run - 1644 - end run - - - 2003-12-16T01:39:11 - 1071556751380 - 8347 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:39:11 - 1071556751380 - 8348 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:39:41 - 1071556781559 - 8349 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2635470316 - - - - 2003-12-16T01:39:41 - 1071556781559 - 8350 - org.codehaus.logger - INFO - Processing - run - 1645 - start run - - - 2003-12-16T01:39:41 - 1071556781560 - 8351 - org.codehaus.logger - INFO - Processing - run - 1645 - end run - - - 2003-12-16T01:39:41 - 1071556781560 - 8352 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:39:41 - 1071556781560 - 8353 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:40:11 - 1071556811679 - 8354 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2665640373 - - - - 2003-12-16T01:40:11 - 1071556811680 - 8355 - org.codehaus.logger - INFO - Processing - run - 1646 - start run - - - 2003-12-16T01:40:11 - 1071556811680 - 8356 - org.codehaus.logger - INFO - Processing - run - 1646 - end run - - - 2003-12-16T01:40:11 - 1071556811680 - 8357 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:40:11 - 1071556811680 - 8358 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:40:41 - 1071556841849 - 8359 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2695780423 - - - - 2003-12-16T01:40:41 - 1071556841849 - 8360 - org.codehaus.logger - INFO - Processing - run - 1647 - start run - - - 2003-12-16T01:40:41 - 1071556841850 - 8361 - org.codehaus.logger - INFO - Processing - run - 1647 - end run - - - 2003-12-16T01:40:41 - 1071556841850 - 8362 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:40:41 - 1071556841850 - 8363 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:41:11 - 1071556871989 - 8364 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2725930471 - - - - 2003-12-16T01:41:11 - 1071556871990 - 8365 - org.codehaus.logger - INFO - Processing - run - 1648 - start run - - - 2003-12-16T01:41:11 - 1071556871990 - 8366 - org.codehaus.logger - INFO - Processing - run - 1648 - end run - - - 2003-12-16T01:41:11 - 1071556871990 - 8367 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:41:11 - 1071556871990 - 8368 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:41:42 - 1071556902159 - 8369 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2756100532 - - - - 2003-12-16T01:41:42 - 1071556902160 - 8370 - org.codehaus.logger - INFO - Processing - run - 1649 - start run - - - 2003-12-16T01:41:42 - 1071556902161 - 8371 - org.codehaus.logger - INFO - Processing - run - 1649 - end run - - - 2003-12-16T01:41:42 - 1071556902161 - 8372 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:41:42 - 1071556902161 - 8373 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:42:12 - 1071556932339 - 8374 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2786260582 - - - - 2003-12-16T01:42:12 - 1071556932340 - 8375 - org.codehaus.logger - INFO - Processing - run - 1650 - start run - - - 2003-12-16T01:42:12 - 1071556932341 - 8376 - org.codehaus.logger - INFO - Processing - run - 1650 - end run - - - 2003-12-16T01:42:12 - 1071556932341 - 8377 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:42:12 - 1071556932341 - 8378 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:42:42 - 1071556962449 - 8379 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2816410642 - - - - 2003-12-16T01:42:42 - 1071556962450 - 8380 - org.codehaus.logger - INFO - Processing - run - 1651 - start run - - - 2003-12-16T01:42:42 - 1071556962450 - 8381 - org.codehaus.logger - INFO - Processing - run - 1651 - end run - - - 2003-12-16T01:42:42 - 1071556962450 - 8382 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:42:42 - 1071556962450 - 8383 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:43:12 - 1071556992650 - 8384 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2846560716 - - - - 2003-12-16T01:43:12 - 1071556992650 - 8385 - org.codehaus.logger - INFO - Processing - run - 1652 - start run - - - 2003-12-16T01:43:12 - 1071556992651 - 8386 - org.codehaus.logger - INFO - Processing - run - 1652 - end run - - - 2003-12-16T01:43:12 - 1071556992651 - 8387 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:43:12 - 1071556992651 - 8388 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:43:42 - 1071557022799 - 8389 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2876710759 - - - - 2003-12-16T01:43:42 - 1071557022800 - 8390 - org.codehaus.logger - INFO - Processing - run - 1653 - start run - - - 2003-12-16T01:43:42 - 1071557022800 - 8391 - org.codehaus.logger - INFO - Processing - run - 1653 - end run - - - 2003-12-16T01:43:42 - 1071557022800 - 8392 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:43:42 - 1071557022801 - 8393 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:44:12 - 1071557052949 - 8394 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2906860821 - - - - 2003-12-16T01:44:12 - 1071557052950 - 8395 - org.codehaus.logger - INFO - Processing - run - 1654 - start run - - - 2003-12-16T01:44:12 - 1071557052950 - 8396 - org.codehaus.logger - INFO - Processing - run - 1654 - end run - - - 2003-12-16T01:44:12 - 1071557052951 - 8397 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:44:12 - 1071557052951 - 8398 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:44:43 - 1071557083109 - 8399 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2937020880 - - - - 2003-12-16T01:44:43 - 1071557083110 - 8400 - org.codehaus.logger - INFO - Processing - run - 1655 - start run - - - 2003-12-16T01:44:43 - 1071557083110 - 8401 - org.codehaus.logger - INFO - Processing - run - 1655 - end run - - - 2003-12-16T01:44:43 - 1071557083111 - 8402 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:44:43 - 1071557083111 - 8403 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:45:13 - 1071557113249 - 8404 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2967180937 - - - - 2003-12-16T01:45:13 - 1071557113250 - 8405 - org.codehaus.logger - INFO - Processing - run - 1656 - start run - - - 2003-12-16T01:45:13 - 1071557113251 - 8406 - org.codehaus.logger - INFO - Processing - run - 1656 - end run - - - 2003-12-16T01:45:13 - 1071557113252 - 8407 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:45:13 - 1071557113252 - 8408 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:45:43 - 1071557143360 - 8409 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2997321064 - - - - 2003-12-16T01:45:43 - 1071557143360 - 8410 - org.codehaus.logger - INFO - Processing - run - 1657 - start run - - - 2003-12-16T01:45:43 - 1071557143361 - 8411 - org.codehaus.logger - INFO - Processing - run - 1657 - end run - - - 2003-12-16T01:45:43 - 1071557143361 - 8412 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:45:43 - 1071557143361 - 8413 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:46:13 - 1071557173539 - 8414 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3027471062 - - - - 2003-12-16T01:46:13 - 1071557173541 - 8415 - org.codehaus.logger - INFO - Processing - run - 1658 - start run - - - 2003-12-16T01:46:13 - 1071557173543 - 8416 - org.codehaus.logger - INFO - Processing - run - 1658 - end run - - - 2003-12-16T01:46:13 - 1071557173543 - 8417 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:46:13 - 1071557173543 - 8418 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:46:43 - 1071557203709 - 8419 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3057621137 - - - - 2003-12-16T01:46:43 - 1071557203711 - 8420 - org.codehaus.logger - INFO - Processing - run - 1659 - start run - - - 2003-12-16T01:46:43 - 1071557203711 - 8421 - org.codehaus.logger - INFO - Processing - run - 1659 - end run - - - 2003-12-16T01:46:43 - 1071557203712 - 8422 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:46:43 - 1071557203712 - 8423 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:47:13 - 1071557233850 - 8424 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3087771191 - - - - 2003-12-16T01:47:13 - 1071557233850 - 8425 - org.codehaus.logger - INFO - Processing - run - 1660 - start run - - - 2003-12-16T01:47:13 - 1071557233850 - 8426 - org.codehaus.logger - INFO - Processing - run - 1660 - end run - - - 2003-12-16T01:47:13 - 1071557233851 - 8427 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:47:13 - 1071557233851 - 8428 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:47:43 - 1071557263960 - 8429 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3117921264 - - - - 2003-12-16T01:47:43 - 1071557263961 - 8430 - org.codehaus.logger - INFO - Processing - run - 1661 - start run - - - 2003-12-16T01:47:43 - 1071557263961 - 8431 - org.codehaus.logger - INFO - Processing - run - 1661 - end run - - - 2003-12-16T01:47:43 - 1071557263961 - 8432 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:47:43 - 1071557263961 - 8433 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:48:14 - 1071557294120 - 8434 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3148071326 - - - - 2003-12-16T01:48:14 - 1071557294120 - 8435 - org.codehaus.logger - INFO - Processing - run - 1662 - start run - - - 2003-12-16T01:48:14 - 1071557294121 - 8436 - org.codehaus.logger - INFO - Processing - run - 1662 - end run - - - 2003-12-16T01:48:14 - 1071557294121 - 8437 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:48:14 - 1071557294121 - 8438 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:48:44 - 1071557324320 - 8439 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3178221401 - - - - 2003-12-16T01:48:44 - 1071557324320 - 8440 - org.codehaus.logger - INFO - Processing - run - 1663 - start run - - - 2003-12-16T01:48:44 - 1071557324321 - 8441 - org.codehaus.logger - INFO - Processing - run - 1663 - end run - - - 2003-12-16T01:48:44 - 1071557324321 - 8442 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:48:44 - 1071557324321 - 8443 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:49:14 - 1071557354440 - 8444 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3208381455 - - - - 2003-12-16T01:49:14 - 1071557354441 - 8445 - org.codehaus.logger - INFO - Processing - run - 1664 - start run - - - 2003-12-16T01:49:14 - 1071557354442 - 8446 - org.codehaus.logger - INFO - Processing - run - 1664 - end run - - - 2003-12-16T01:49:14 - 1071557354442 - 8447 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:49:14 - 1071557354442 - 8448 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:49:44 - 1071557384560 - 8449 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3238521529 - - - - 2003-12-16T01:49:44 - 1071557384561 - 8450 - org.codehaus.logger - INFO - Processing - run - 1665 - start run - - - 2003-12-16T01:49:44 - 1071557384562 - 8451 - org.codehaus.logger - INFO - Processing - run - 1665 - end run - - - 2003-12-16T01:49:44 - 1071557384562 - 8452 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:49:44 - 1071557384562 - 8453 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:50:14 - 1071557414751 - 8454 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3268661602 - - - - 2003-12-16T01:50:14 - 1071557414753 - 8455 - org.codehaus.logger - INFO - Processing - run - 1666 - start run - - - 2003-12-16T01:50:14 - 1071557414754 - 8456 - org.codehaus.logger - INFO - Processing - run - 1666 - end run - - - 2003-12-16T01:50:14 - 1071557414754 - 8457 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:50:14 - 1071557414754 - 8458 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:50:44 - 1071557444860 - 8459 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3298811669 - - - - 2003-12-16T01:50:44 - 1071557444861 - 8460 - org.codehaus.logger - INFO - Processing - run - 1667 - start run - - - 2003-12-16T01:50:44 - 1071557444861 - 8461 - org.codehaus.logger - INFO - Processing - run - 1667 - end run - - - 2003-12-16T01:50:44 - 1071557444861 - 8462 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:50:44 - 1071557444861 - 8463 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:51:15 - 1071557475040 - 8464 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3328951743 - - - - 2003-12-16T01:51:15 - 1071557475041 - 8465 - org.codehaus.logger - INFO - Processing - run - 1668 - start run - - - 2003-12-16T01:51:15 - 1071557475041 - 8466 - org.codehaus.logger - INFO - Processing - run - 1668 - end run - - - 2003-12-16T01:51:15 - 1071557475041 - 8467 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:51:15 - 1071557475042 - 8468 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:51:45 - 1071557505160 - 8469 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3359111814 - - - - 2003-12-16T01:51:45 - 1071557505161 - 8470 - org.codehaus.logger - INFO - Processing - run - 1669 - start run - - - 2003-12-16T01:51:45 - 1071557505162 - 8471 - org.codehaus.logger - INFO - Processing - run - 1669 - end run - - - 2003-12-16T01:51:45 - 1071557505162 - 8472 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:51:45 - 1071557505162 - 8473 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:52:15 - 1071557535340 - 8474 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3389261893 - - - - 2003-12-16T01:52:15 - 1071557535341 - 8475 - org.codehaus.logger - INFO - Processing - run - 1670 - start run - - - 2003-12-16T01:52:15 - 1071557535341 - 8476 - org.codehaus.logger - INFO - Processing - run - 1670 - end run - - - 2003-12-16T01:52:15 - 1071557535341 - 8477 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:52:15 - 1071557535341 - 8478 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:52:45 - 1071557565460 - 8479 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3419402006 - - - - 2003-12-16T01:52:45 - 1071557565461 - 8480 - org.codehaus.logger - INFO - Processing - run - 1671 - start run - - - 2003-12-16T01:52:45 - 1071557565461 - 8481 - org.codehaus.logger - INFO - Processing - run - 1671 - end run - - - 2003-12-16T01:52:45 - 1071557565462 - 8482 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:52:45 - 1071557565462 - 8483 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:53:15 - 1071557595620 - 8484 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3449562063 - - - - 2003-12-16T01:53:15 - 1071557595621 - 8485 - org.codehaus.logger - INFO - Processing - run - 1672 - start run - - - 2003-12-16T01:53:15 - 1071557595621 - 8486 - org.codehaus.logger - INFO - Processing - run - 1672 - end run - - - 2003-12-16T01:53:15 - 1071557595621 - 8487 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:53:15 - 1071557595622 - 8488 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:53:45 - 1071557625760 - 8489 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3479712102 - - - - 2003-12-16T01:53:45 - 1071557625761 - 8490 - org.codehaus.logger - INFO - Processing - run - 1673 - start run - - - 2003-12-16T01:53:45 - 1071557625762 - 8491 - org.codehaus.logger - INFO - Processing - run - 1673 - end run - - - 2003-12-16T01:53:45 - 1071557625763 - 8492 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:53:45 - 1071557625763 - 8493 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:54:15 - 1071557655941 - 8494 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3509862161 - - - - 2003-12-16T01:54:15 - 1071557655942 - 8495 - org.codehaus.logger - INFO - Processing - run - 1674 - start run - - - 2003-12-16T01:54:15 - 1071557655942 - 8496 - org.codehaus.logger - INFO - Processing - run - 1674 - end run - - - 2003-12-16T01:54:15 - 1071557655943 - 8497 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:54:15 - 1071557655943 - 8498 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:54:46 - 1071557686061 - 8499 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3540002277 - - - - 2003-12-16T01:54:46 - 1071557686061 - 8500 - org.codehaus.logger - INFO - Processing - run - 1675 - start run - - - 2003-12-16T01:54:46 - 1071557686062 - 8501 - org.codehaus.logger - INFO - Processing - run - 1675 - end run - - - 2003-12-16T01:54:46 - 1071557686062 - 8502 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:54:46 - 1071557686062 - 8503 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:55:16 - 1071557716231 - 8504 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3570152276 - - - - 2003-12-16T01:55:16 - 1071557716231 - 8505 - org.codehaus.logger - INFO - Processing - run - 1676 - start run - - - 2003-12-16T01:55:16 - 1071557716231 - 8506 - org.codehaus.logger - INFO - Processing - run - 1676 - end run - - - 2003-12-16T01:55:16 - 1071557716232 - 8507 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:55:16 - 1071557716232 - 8508 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:55:46 - 1071557746371 - 8509 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3600302336 - - - - 2003-12-16T01:55:46 - 1071557746371 - 8510 - org.codehaus.logger - INFO - Processing - run - 1677 - start run - - - 2003-12-16T01:55:46 - 1071557746372 - 8511 - org.codehaus.logger - INFO - Processing - run - 1677 - end run - - - 2003-12-16T01:55:46 - 1071557746372 - 8512 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:55:46 - 1071557746372 - 8513 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:56:16 - 1071557776541 - 8514 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3630452400 - - - - 2003-12-16T01:56:16 - 1071557776542 - 8515 - org.codehaus.logger - INFO - Processing - run - 1678 - start run - - - 2003-12-16T01:56:16 - 1071557776542 - 8516 - org.codehaus.logger - INFO - Processing - run - 1678 - end run - - - 2003-12-16T01:56:16 - 1071557776543 - 8517 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:56:16 - 1071557776543 - 8518 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:56:46 - 1071557806661 - 8519 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3660602464 - - - - 2003-12-16T01:56:46 - 1071557806661 - 8520 - org.codehaus.logger - INFO - Processing - run - 1679 - start run - - - 2003-12-16T01:56:46 - 1071557806662 - 8521 - org.codehaus.logger - INFO - Processing - run - 1679 - end run - - - 2003-12-16T01:56:46 - 1071557806662 - 8522 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:56:46 - 1071557806662 - 8523 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:57:16 - 1071557836831 - 8524 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3690752626 - - - - 2003-12-16T01:57:16 - 1071557836831 - 8525 - org.codehaus.logger - INFO - Processing - run - 1680 - start run - - - 2003-12-16T01:57:16 - 1071557836832 - 8526 - org.codehaus.logger - INFO - Processing - run - 1680 - end run - - - 2003-12-16T01:57:16 - 1071557836832 - 8527 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:57:16 - 1071557836832 - 8528 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:57:46 - 1071557866971 - 8529 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3720902787 - - - - 2003-12-16T01:57:46 - 1071557866971 - 8530 - org.codehaus.logger - INFO - Processing - run - 1681 - start run - - - 2003-12-16T01:57:46 - 1071557866972 - 8531 - org.codehaus.logger - INFO - Processing - run - 1681 - end run - - - 2003-12-16T01:57:46 - 1071557866972 - 8532 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:57:46 - 1071557866972 - 8533 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:58:17 - 1071557897151 - 8534 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3751052672 - - - - 2003-12-16T01:58:17 - 1071557897151 - 8535 - org.codehaus.logger - INFO - Processing - run - 1682 - start run - - - 2003-12-16T01:58:17 - 1071557897152 - 8536 - org.codehaus.logger - INFO - Processing - run - 1682 - end run - - - 2003-12-16T01:58:17 - 1071557897152 - 8537 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:58:17 - 1071557897152 - 8538 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:58:47 - 1071557927261 - 8539 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3781212767 - - - - 2003-12-16T01:58:47 - 1071557927262 - 8540 - org.codehaus.logger - INFO - Processing - run - 1683 - start run - - - 2003-12-16T01:58:47 - 1071557927262 - 8541 - org.codehaus.logger - INFO - Processing - run - 1683 - end run - - - 2003-12-16T01:58:47 - 1071557927262 - 8542 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:58:47 - 1071557927262 - 8543 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:59:17 - 1071557957431 - 8544 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3811372779 - - - - 2003-12-16T01:59:17 - 1071557957432 - 8545 - org.codehaus.logger - INFO - Processing - run - 1684 - start run - - - 2003-12-16T01:59:17 - 1071557957432 - 8546 - org.codehaus.logger - INFO - Processing - run - 1684 - end run - - - 2003-12-16T01:59:17 - 1071557957432 - 8547 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:59:17 - 1071557957432 - 8548 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T01:59:47 - 1071557987571 - 8549 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3841512840 - - - - 2003-12-16T01:59:47 - 1071557987573 - 8550 - org.codehaus.logger - INFO - Processing - run - 1685 - start run - - - 2003-12-16T01:59:47 - 1071557987573 - 8551 - org.codehaus.logger - INFO - Processing - run - 1685 - end run - - - 2003-12-16T01:59:47 - 1071557987574 - 8552 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T01:59:47 - 1071557987574 - 8553 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:00:17 - 1071558017751 - 8554 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3871662909 - - - - 2003-12-16T02:00:17 - 1071558017752 - 8555 - org.codehaus.logger - INFO - Processing - run - 1686 - start run - - - 2003-12-16T02:00:17 - 1071558017752 - 8556 - org.codehaus.logger - INFO - Processing - run - 1686 - end run - - - 2003-12-16T02:00:17 - 1071558017752 - 8557 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:00:17 - 1071558017752 - 8558 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:00:47 - 1071558047901 - 8559 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3901812981 - - - - 2003-12-16T02:00:47 - 1071558047902 - 8560 - org.codehaus.logger - INFO - Processing - run - 1687 - start run - - - 2003-12-16T02:00:47 - 1071558047903 - 8561 - org.codehaus.logger - INFO - Processing - run - 1687 - end run - - - 2003-12-16T02:00:47 - 1071558047903 - 8562 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:00:47 - 1071558047904 - 8563 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:01:18 - 1071558078041 - 8564 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3931953045 - - - - 2003-12-16T02:01:18 - 1071558078042 - 8565 - org.codehaus.logger - INFO - Processing - run - 1688 - start run - - - 2003-12-16T02:01:18 - 1071558078042 - 8566 - org.codehaus.logger - INFO - Processing - run - 1688 - end run - - - 2003-12-16T02:01:18 - 1071558078042 - 8567 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:01:18 - 1071558078043 - 8568 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:01:48 - 1071558108161 - 8569 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3962103127 - - - - 2003-12-16T02:01:48 - 1071558108162 - 8570 - org.codehaus.logger - INFO - Processing - run - 1689 - start run - - - 2003-12-16T02:01:48 - 1071558108162 - 8571 - org.codehaus.logger - INFO - Processing - run - 1689 - end run - - - 2003-12-16T02:01:48 - 1071558108163 - 8572 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:01:48 - 1071558108164 - 8573 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:02:18 - 1071558138342 - 8574 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3992253187 - - - - 2003-12-16T02:02:18 - 1071558138342 - 8575 - org.codehaus.logger - INFO - Processing - run - 1690 - start run - - - 2003-12-16T02:02:18 - 1071558138342 - 8576 - org.codehaus.logger - INFO - Processing - run - 1690 - end run - - - 2003-12-16T02:02:18 - 1071558138343 - 8577 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:02:18 - 1071558138343 - 8578 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:02:48 - 1071558168462 - 8579 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4022403657 - - - - 2003-12-16T02:02:48 - 1071558168462 - 8580 - org.codehaus.logger - INFO - Processing - run - 1691 - start run - - - 2003-12-16T02:02:48 - 1071558168463 - 8581 - org.codehaus.logger - INFO - Processing - run - 1691 - end run - - - 2003-12-16T02:02:48 - 1071558168463 - 8582 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:02:48 - 1071558168463 - 8583 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:03:18 - 1071558198622 - 8584 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4052553330 - - - - 2003-12-16T02:03:18 - 1071558198622 - 8585 - org.codehaus.logger - INFO - Processing - run - 1692 - start run - - - 2003-12-16T02:03:18 - 1071558198623 - 8586 - org.codehaus.logger - INFO - Processing - run - 1692 - end run - - - 2003-12-16T02:03:18 - 1071558198623 - 8587 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:03:18 - 1071558198623 - 8588 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:03:48 - 1071558228762 - 8589 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4082703402 - - - - 2003-12-16T02:03:48 - 1071558228763 - 8590 - org.codehaus.logger - INFO - Processing - run - 1693 - start run - - - 2003-12-16T02:03:48 - 1071558228763 - 8591 - org.codehaus.logger - INFO - Processing - run - 1693 - end run - - - 2003-12-16T02:03:48 - 1071558228764 - 8592 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:03:48 - 1071558228764 - 8593 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:04:18 - 1071558258942 - 8594 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4112853487 - - - - 2003-12-16T02:04:18 - 1071558258942 - 8595 - org.codehaus.logger - INFO - Processing - run - 1694 - start run - - - 2003-12-16T02:04:18 - 1071558258943 - 8596 - org.codehaus.logger - INFO - Processing - run - 1694 - end run - - - 2003-12-16T02:04:18 - 1071558258943 - 8597 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:04:18 - 1071558258943 - 8598 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:04:49 - 1071558289062 - 8599 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4143003607 - - - - 2003-12-16T02:04:49 - 1071558289063 - 8600 - org.codehaus.logger - INFO - Processing - run - 1695 - start run - - - 2003-12-16T02:04:49 - 1071558289063 - 8601 - org.codehaus.logger - INFO - Processing - run - 1695 - end run - - - 2003-12-16T02:04:49 - 1071558289063 - 8602 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:04:49 - 1071558289063 - 8603 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:05:19 - 1071558319242 - 8604 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4173153626 - - - - 2003-12-16T02:05:19 - 1071558319243 - 8605 - org.codehaus.logger - INFO - Processing - run - 1696 - start run - - - 2003-12-16T02:05:19 - 1071558319243 - 8606 - org.codehaus.logger - INFO - Processing - run - 1696 - end run - - - 2003-12-16T02:05:19 - 1071558319243 - 8607 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:05:19 - 1071558319243 - 8608 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:05:49 - 1071558349382 - 8609 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4203313708 - - - - 2003-12-16T02:05:49 - 1071558349383 - 8610 - org.codehaus.logger - INFO - Processing - run - 1697 - start run - - - 2003-12-16T02:05:49 - 1071558349384 - 8611 - org.codehaus.logger - INFO - Processing - run - 1697 - end run - - - 2003-12-16T02:05:49 - 1071558349384 - 8612 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:05:49 - 1071558349385 - 8613 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:06:19 - 1071558379542 - 8614 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4233453786 - - - - 2003-12-16T02:06:19 - 1071558379543 - 8615 - org.codehaus.logger - INFO - Processing - run - 1698 - start run - - - 2003-12-16T02:06:19 - 1071558379543 - 8616 - org.codehaus.logger - INFO - Processing - run - 1698 - end run - - - 2003-12-16T02:06:19 - 1071558379544 - 8617 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:06:19 - 1071558379544 - 8618 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:06:49 - 1071558409662 - 8619 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4263604561 - - - - 2003-12-16T02:06:49 - 1071558409663 - 8620 - org.codehaus.logger - INFO - Processing - run - 1699 - start run - - - 2003-12-16T02:06:49 - 1071558409663 - 8621 - org.codehaus.logger - INFO - Processing - run - 1699 - end run - - - 2003-12-16T02:06:49 - 1071558409664 - 8622 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:06:49 - 1071558409664 - 8623 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:07:19 - 1071558439782 - 8624 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4293743939 - - - - 2003-12-16T02:07:19 - 1071558439783 - 8625 - org.codehaus.logger - INFO - Processing - run - 1700 - start run - - - 2003-12-16T02:07:19 - 1071558439783 - 8626 - org.codehaus.logger - INFO - Processing - run - 1700 - end run - - - 2003-12-16T02:07:19 - 1071558439784 - 8627 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:07:19 - 1071558439784 - 8628 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:07:49 - 1071558469952 - 8629 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG28926729 - - - - 2003-12-16T02:07:49 - 1071558469953 - 8630 - org.codehaus.logger - INFO - Processing - run - 1701 - start run - - - 2003-12-16T02:07:49 - 1071558469953 - 8631 - org.codehaus.logger - INFO - Processing - run - 1701 - end run - - - 2003-12-16T02:07:49 - 1071558469954 - 8632 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:07:49 - 1071558469954 - 8633 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:08:20 - 1071558500092 - 8634 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG59077240 - - - - 2003-12-16T02:08:20 - 1071558500093 - 8635 - org.codehaus.logger - INFO - Processing - run - 1702 - start run - - - 2003-12-16T02:08:20 - 1071558500093 - 8636 - org.codehaus.logger - INFO - Processing - run - 1702 - end run - - - 2003-12-16T02:08:20 - 1071558500093 - 8637 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:08:20 - 1071558500094 - 8638 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:08:50 - 1071558530263 - 8639 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG89236876 - - - - 2003-12-16T02:08:50 - 1071558530264 - 8640 - org.codehaus.logger - INFO - Processing - run - 1703 - start run - - - 2003-12-16T02:08:50 - 1071558530264 - 8641 - org.codehaus.logger - INFO - Processing - run - 1703 - end run - - - 2003-12-16T02:08:50 - 1071558530265 - 8642 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:08:50 - 1071558530265 - 8643 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:09:20 - 1071558560383 - 8644 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG119376962 - - - - 2003-12-16T02:09:20 - 1071558560384 - 8645 - org.codehaus.logger - INFO - Processing - run - 1704 - start run - - - 2003-12-16T02:09:20 - 1071558560385 - 8646 - org.codehaus.logger - INFO - Processing - run - 1704 - end run - - - 2003-12-16T02:09:20 - 1071558560385 - 8647 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:09:20 - 1071558560385 - 8648 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:09:50 - 1071558590553 - 8649 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG149527044 - - - - 2003-12-16T02:09:50 - 1071558590554 - 8650 - org.codehaus.logger - INFO - Processing - run - 1705 - start run - - - 2003-12-16T02:09:50 - 1071558590556 - 8651 - org.codehaus.logger - INFO - Processing - run - 1705 - end run - - - 2003-12-16T02:09:50 - 1071558590556 - 8652 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:09:50 - 1071558590556 - 8653 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:10:20 - 1071558620723 - 8654 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG179677132 - - - - 2003-12-16T02:10:20 - 1071558620723 - 8655 - org.codehaus.logger - INFO - Processing - run - 1706 - start run - - - 2003-12-16T02:10:20 - 1071558620724 - 8656 - org.codehaus.logger - INFO - Processing - run - 1706 - end run - - - 2003-12-16T02:10:20 - 1071558620724 - 8657 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:10:20 - 1071558620724 - 8658 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:10:50 - 1071558650863 - 8659 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG209827229 - - - - 2003-12-16T02:10:50 - 1071558650864 - 8660 - org.codehaus.logger - INFO - Processing - run - 1707 - start run - - - 2003-12-16T02:10:50 - 1071558650864 - 8661 - org.codehaus.logger - INFO - Processing - run - 1707 - end run - - - 2003-12-16T02:10:50 - 1071558650865 - 8662 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:10:50 - 1071558650865 - 8663 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:11:20 - 1071558680983 - 8664 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG239977362 - - - - 2003-12-16T02:11:20 - 1071558680984 - 8665 - org.codehaus.logger - INFO - Processing - run - 1708 - start run - - - 2003-12-16T02:11:20 - 1071558680984 - 8666 - org.codehaus.logger - INFO - Processing - run - 1708 - end run - - - 2003-12-16T02:11:20 - 1071558680984 - 8667 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:11:20 - 1071558680985 - 8668 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:11:51 - 1071558711153 - 8669 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG270127518 - - - - 2003-12-16T02:11:51 - 1071558711154 - 8670 - org.codehaus.logger - INFO - Processing - run - 1709 - start run - - - 2003-12-16T02:11:51 - 1071558711154 - 8671 - org.codehaus.logger - INFO - Processing - run - 1709 - end run - - - 2003-12-16T02:11:51 - 1071558711154 - 8672 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:11:51 - 1071558711154 - 8673 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:12:21 - 1071558741293 - 8674 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG300277676 - - - - 2003-12-16T02:12:21 - 1071558741294 - 8675 - org.codehaus.logger - INFO - Processing - run - 1710 - start run - - - 2003-12-16T02:12:21 - 1071558741295 - 8676 - org.codehaus.logger - INFO - Processing - run - 1710 - end run - - - 2003-12-16T02:12:21 - 1071558741295 - 8677 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:12:21 - 1071558741296 - 8678 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:12:51 - 1071558771443 - 8679 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG330427765 - - - - 2003-12-16T02:12:51 - 1071558771444 - 8680 - org.codehaus.logger - INFO - Processing - run - 1711 - start run - - - 2003-12-16T02:12:51 - 1071558771444 - 8681 - org.codehaus.logger - INFO - Processing - run - 1711 - end run - - - 2003-12-16T02:12:51 - 1071558771444 - 8682 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:12:51 - 1071558771445 - 8683 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:13:21 - 1071558801584 - 8684 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG360577891 - - - - 2003-12-16T02:13:21 - 1071558801585 - 8685 - org.codehaus.logger - INFO - Processing - run - 1712 - start run - - - 2003-12-16T02:13:21 - 1071558801585 - 8686 - org.codehaus.logger - INFO - Processing - run - 1712 - end run - - - 2003-12-16T02:13:21 - 1071558801586 - 8687 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:13:21 - 1071558801586 - 8688 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:13:51 - 1071558831754 - 8689 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG390728084 - - - - 2003-12-16T02:13:51 - 1071558831755 - 8690 - org.codehaus.logger - INFO - Processing - run - 1713 - start run - - - 2003-12-16T02:13:51 - 1071558831756 - 8691 - org.codehaus.logger - INFO - Processing - run - 1713 - end run - - - 2003-12-16T02:13:51 - 1071558831756 - 8692 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:13:51 - 1071558831756 - 8693 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:14:21 - 1071558861894 - 8694 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG420878158 - - - - 2003-12-16T02:14:21 - 1071558861894 - 8695 - org.codehaus.logger - INFO - Processing - run - 1714 - start run - - - 2003-12-16T02:14:21 - 1071558861895 - 8696 - org.codehaus.logger - INFO - Processing - run - 1714 - end run - - - 2003-12-16T02:14:21 - 1071558861895 - 8697 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:14:21 - 1071558861895 - 8698 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:14:52 - 1071558892064 - 8699 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG451028297 - - - - 2003-12-16T02:14:52 - 1071558892064 - 8700 - org.codehaus.logger - INFO - Processing - run - 1715 - start run - - - 2003-12-16T02:14:52 - 1071558892065 - 8701 - org.codehaus.logger - INFO - Processing - run - 1715 - end run - - - 2003-12-16T02:14:52 - 1071558892065 - 8702 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:14:52 - 1071558892065 - 8703 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:15:22 - 1071558922224 - 8704 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG481208426 - - - - 2003-12-16T02:15:22 - 1071558922225 - 8705 - org.codehaus.logger - INFO - Processing - run - 1716 - start run - - - 2003-12-16T02:15:22 - 1071558922225 - 8706 - org.codehaus.logger - INFO - Processing - run - 1716 - end run - - - 2003-12-16T02:15:22 - 1071558922225 - 8707 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:15:22 - 1071558922225 - 8708 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:15:52 - 1071558952364 - 8709 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG511358563 - - - - 2003-12-16T02:15:52 - 1071558952365 - 8710 - org.codehaus.logger - INFO - Processing - run - 1717 - start run - - - 2003-12-16T02:15:52 - 1071558952365 - 8711 - org.codehaus.logger - INFO - Processing - run - 1717 - end run - - - 2003-12-16T02:15:52 - 1071558952366 - 8712 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:15:52 - 1071558952366 - 8713 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:16:22 - 1071558982544 - 8714 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG541498700 - - - - 2003-12-16T02:16:22 - 1071558982545 - 8715 - org.codehaus.logger - INFO - Processing - run - 1718 - start run - - - 2003-12-16T02:16:22 - 1071558982545 - 8716 - org.codehaus.logger - INFO - Processing - run - 1718 - end run - - - 2003-12-16T02:16:22 - 1071558982546 - 8717 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:16:22 - 1071558982546 - 8718 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:16:52 - 1071559012664 - 8719 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG571648837 - - - - 2003-12-16T02:16:52 - 1071559012665 - 8720 - org.codehaus.logger - INFO - Processing - run - 1719 - start run - - - 2003-12-16T02:16:52 - 1071559012665 - 8721 - org.codehaus.logger - INFO - Processing - run - 1719 - end run - - - 2003-12-16T02:16:52 - 1071559012666 - 8722 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:16:52 - 1071559012666 - 8723 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:17:22 - 1071559042845 - 8724 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG601799476 - - - - 2003-12-16T02:17:22 - 1071559042845 - 8725 - org.codehaus.logger - INFO - Processing - run - 1720 - start run - - - 2003-12-16T02:17:22 - 1071559042845 - 8726 - org.codehaus.logger - INFO - Processing - run - 1720 - end run - - - 2003-12-16T02:17:22 - 1071559042846 - 8727 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:17:22 - 1071559042846 - 8728 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:17:53 - 1071559073005 - 8729 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG631949105 - - - - 2003-12-16T02:17:53 - 1071559073006 - 8730 - org.codehaus.logger - INFO - Processing - run - 1721 - start run - - - 2003-12-16T02:17:53 - 1071559073007 - 8731 - org.codehaus.logger - INFO - Processing - run - 1721 - end run - - - 2003-12-16T02:17:53 - 1071559073007 - 8732 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:17:53 - 1071559073007 - 8733 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:18:23 - 1071559103145 - 8734 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG662109242 - - - - 2003-12-16T02:18:23 - 1071559103146 - 8735 - org.codehaus.logger - INFO - Processing - run - 1722 - start run - - - 2003-12-16T02:18:23 - 1071559103146 - 8736 - org.codehaus.logger - INFO - Processing - run - 1722 - end run - - - 2003-12-16T02:18:23 - 1071559103146 - 8737 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:18:23 - 1071559103146 - 8738 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:18:53 - 1071559133265 - 8739 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG692249380 - - - - 2003-12-16T02:18:53 - 1071559133266 - 8740 - org.codehaus.logger - INFO - Processing - run - 1723 - start run - - - 2003-12-16T02:18:53 - 1071559133266 - 8741 - org.codehaus.logger - INFO - Processing - run - 1723 - end run - - - 2003-12-16T02:18:53 - 1071559133266 - 8742 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:18:53 - 1071559133266 - 8743 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:19:23 - 1071559163445 - 8744 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG722409519 - - - - 2003-12-16T02:19:23 - 1071559163446 - 8745 - org.codehaus.logger - INFO - Processing - run - 1724 - start run - - - 2003-12-16T02:19:23 - 1071559163446 - 8746 - org.codehaus.logger - INFO - Processing - run - 1724 - end run - - - 2003-12-16T02:19:23 - 1071559163446 - 8747 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:19:23 - 1071559163446 - 8748 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:19:53 - 1071559193565 - 8749 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG752549654 - - - - 2003-12-16T02:19:53 - 1071559193566 - 8750 - org.codehaus.logger - INFO - Processing - run - 1725 - start run - - - 2003-12-16T02:19:53 - 1071559193566 - 8751 - org.codehaus.logger - INFO - Processing - run - 1725 - end run - - - 2003-12-16T02:19:53 - 1071559193567 - 8752 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:19:53 - 1071559193567 - 8753 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:20:23 - 1071559223725 - 8754 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG782699799 - - - - 2003-12-16T02:20:23 - 1071559223726 - 8755 - org.codehaus.logger - INFO - Processing - run - 1726 - start run - - - 2003-12-16T02:20:23 - 1071559223726 - 8756 - org.codehaus.logger - INFO - Processing - run - 1726 - end run - - - 2003-12-16T02:20:23 - 1071559223726 - 8757 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:20:23 - 1071559223727 - 8758 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:20:53 - 1071559253926 - 8759 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG812869934 - - - - 2003-12-16T02:20:53 - 1071559253926 - 8760 - org.codehaus.logger - INFO - Processing - run - 1727 - start run - - - 2003-12-16T02:20:53 - 1071559253927 - 8761 - org.codehaus.logger - INFO - Processing - run - 1727 - end run - - - 2003-12-16T02:20:53 - 1071559253927 - 8762 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:20:53 - 1071559253927 - 8763 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:21:24 - 1071559284046 - 8764 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG843010069 - - - - 2003-12-16T02:21:24 - 1071559284046 - 8765 - org.codehaus.logger - INFO - Processing - run - 1728 - start run - - - 2003-12-16T02:21:24 - 1071559284047 - 8766 - org.codehaus.logger - INFO - Processing - run - 1728 - end run - - - 2003-12-16T02:21:24 - 1071559284047 - 8767 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:21:24 - 1071559284047 - 8768 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:21:54 - 1071559314226 - 8769 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG873160657 - - - - 2003-12-16T02:21:54 - 1071559314227 - 8770 - org.codehaus.logger - INFO - Processing - run - 1729 - start run - - - 2003-12-16T02:21:54 - 1071559314227 - 8771 - org.codehaus.logger - INFO - Processing - run - 1729 - end run - - - 2003-12-16T02:21:54 - 1071559314228 - 8772 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:21:54 - 1071559314228 - 8773 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:22:24 - 1071559344336 - 8774 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG903320354 - - - - 2003-12-16T02:22:24 - 1071559344337 - 8775 - org.codehaus.logger - INFO - Processing - run - 1730 - start run - - - 2003-12-16T02:22:24 - 1071559344337 - 8776 - org.codehaus.logger - INFO - Processing - run - 1730 - end run - - - 2003-12-16T02:22:24 - 1071559344337 - 8777 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:22:24 - 1071559344337 - 8778 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:22:54 - 1071559374476 - 8779 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG933460519 - - - - 2003-12-16T02:22:54 - 1071559374477 - 8780 - org.codehaus.logger - INFO - Processing - run - 1731 - start run - - - 2003-12-16T02:22:54 - 1071559374477 - 8781 - org.codehaus.logger - INFO - Processing - run - 1731 - end run - - - 2003-12-16T02:22:54 - 1071559374478 - 8782 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:22:54 - 1071559374478 - 8783 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:23:24 - 1071559404646 - 8784 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG963610629 - - - - 2003-12-16T02:23:24 - 1071559404647 - 8785 - org.codehaus.logger - INFO - Processing - run - 1732 - start run - - - 2003-12-16T02:23:24 - 1071559404647 - 8786 - org.codehaus.logger - INFO - Processing - run - 1732 - end run - - - 2003-12-16T02:23:24 - 1071559404647 - 8787 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:23:24 - 1071559404648 - 8788 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:23:54 - 1071559434767 - 8789 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG993760772 - - - - 2003-12-16T02:23:54 - 1071559434767 - 8790 - org.codehaus.logger - INFO - Processing - run - 1733 - start run - - - 2003-12-16T02:23:54 - 1071559434768 - 8791 - org.codehaus.logger - INFO - Processing - run - 1733 - end run - - - 2003-12-16T02:23:54 - 1071559434768 - 8792 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:23:54 - 1071559434768 - 8793 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:24:24 - 1071559464937 - 8794 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1023900909 - - - - 2003-12-16T02:24:24 - 1071559464937 - 8795 - org.codehaus.logger - INFO - Processing - run - 1734 - start run - - - 2003-12-16T02:24:24 - 1071559464937 - 8796 - org.codehaus.logger - INFO - Processing - run - 1734 - end run - - - 2003-12-16T02:24:24 - 1071559464938 - 8797 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:24:24 - 1071559464938 - 8798 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:24:55 - 1071559495077 - 8799 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1054051053 - - - - 2003-12-16T02:24:55 - 1071559495077 - 8800 - org.codehaus.logger - INFO - Processing - run - 1735 - start run - - - 2003-12-16T02:24:55 - 1071559495078 - 8801 - org.codehaus.logger - INFO - Processing - run - 1735 - end run - - - 2003-12-16T02:24:55 - 1071559495078 - 8802 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:24:55 - 1071559495078 - 8803 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:25:25 - 1071559525247 - 8804 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1084201191 - - - - 2003-12-16T02:25:25 - 1071559525247 - 8805 - org.codehaus.logger - INFO - Processing - run - 1736 - start run - - - 2003-12-16T02:25:25 - 1071559525248 - 8806 - org.codehaus.logger - INFO - Processing - run - 1736 - end run - - - 2003-12-16T02:25:25 - 1071559525248 - 8807 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:25:25 - 1071559525249 - 8808 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:25:55 - 1071559555427 - 8809 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1114371333 - - - - 2003-12-16T02:25:55 - 1071559555428 - 8810 - org.codehaus.logger - INFO - Processing - run - 1737 - start run - - - 2003-12-16T02:25:55 - 1071559555428 - 8811 - org.codehaus.logger - INFO - Processing - run - 1737 - end run - - - 2003-12-16T02:25:55 - 1071559555428 - 8812 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:25:55 - 1071559555428 - 8813 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:26:25 - 1071559585537 - 8814 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1144521456 - - - - 2003-12-16T02:26:25 - 1071559585538 - 8815 - org.codehaus.logger - INFO - Processing - run - 1738 - start run - - - 2003-12-16T02:26:25 - 1071559585538 - 8816 - org.codehaus.logger - INFO - Processing - run - 1738 - end run - - - 2003-12-16T02:26:25 - 1071559585539 - 8817 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:26:25 - 1071559585540 - 8818 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:26:55 - 1071559615677 - 8819 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1174671619 - - - - 2003-12-16T02:26:55 - 1071559615678 - 8820 - org.codehaus.logger - INFO - Processing - run - 1739 - start run - - - 2003-12-16T02:26:55 - 1071559615678 - 8821 - org.codehaus.logger - INFO - Processing - run - 1739 - end run - - - 2003-12-16T02:26:55 - 1071559615679 - 8822 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:26:55 - 1071559615679 - 8823 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:27:25 - 1071559645847 - 8824 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1204821846 - - - - 2003-12-16T02:27:25 - 1071559645849 - 8825 - org.codehaus.logger - INFO - Processing - run - 1740 - start run - - - 2003-12-16T02:27:25 - 1071559645849 - 8826 - org.codehaus.logger - INFO - Processing - run - 1740 - end run - - - 2003-12-16T02:27:25 - 1071559645850 - 8827 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:27:25 - 1071559645850 - 8828 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:27:56 - 1071559676027 - 8829 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1234971867 - - - - 2003-12-16T02:27:56 - 1071559676029 - 8830 - org.codehaus.logger - INFO - Processing - run - 1741 - start run - - - 2003-12-16T02:27:56 - 1071559676029 - 8831 - org.codehaus.logger - INFO - Processing - run - 1741 - end run - - - 2003-12-16T02:27:56 - 1071559676030 - 8832 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:27:56 - 1071559676030 - 8833 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:28:26 - 1071559706198 - 8834 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1265141914 - - - - 2003-12-16T02:28:26 - 1071559706199 - 8835 - org.codehaus.logger - INFO - Processing - run - 1742 - start run - - - 2003-12-16T02:28:26 - 1071559706199 - 8836 - org.codehaus.logger - INFO - Processing - run - 1742 - end run - - - 2003-12-16T02:28:26 - 1071559706200 - 8837 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:28:26 - 1071559706200 - 8838 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:28:56 - 1071559736338 - 8839 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1295291939 - - - - 2003-12-16T02:28:56 - 1071559736338 - 8840 - org.codehaus.logger - INFO - Processing - run - 1743 - start run - - - 2003-12-16T02:28:56 - 1071559736338 - 8841 - org.codehaus.logger - INFO - Processing - run - 1743 - end run - - - 2003-12-16T02:28:56 - 1071559736339 - 8842 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:28:56 - 1071559736339 - 8843 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:29:26 - 1071559766448 - 8844 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1325431986 - - - - 2003-12-16T02:29:26 - 1071559766449 - 8845 - org.codehaus.logger - INFO - Processing - run - 1744 - start run - - - 2003-12-16T02:29:26 - 1071559766451 - 8846 - org.codehaus.logger - INFO - Processing - run - 1744 - end run - - - 2003-12-16T02:29:26 - 1071559766451 - 8847 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:29:26 - 1071559766451 - 8848 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:29:56 - 1071559796608 - 8849 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1355582022 - - - - 2003-12-16T02:29:56 - 1071559796608 - 8850 - org.codehaus.logger - INFO - Processing - run - 1745 - start run - - - 2003-12-16T02:29:56 - 1071559796609 - 8851 - org.codehaus.logger - INFO - Processing - run - 1745 - end run - - - 2003-12-16T02:29:56 - 1071559796609 - 8852 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:29:56 - 1071559796609 - 8853 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:30:26 - 1071559826748 - 8854 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1385732045 - - - - 2003-12-16T02:30:26 - 1071559826749 - 8855 - org.codehaus.logger - INFO - Processing - run - 1746 - start run - - - 2003-12-16T02:30:26 - 1071559826750 - 8856 - org.codehaus.logger - INFO - Processing - run - 1746 - end run - - - 2003-12-16T02:30:26 - 1071559826750 - 8857 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:30:26 - 1071559826751 - 8858 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:30:56 - 1071559856928 - 8859 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1415882112 - - - - 2003-12-16T02:30:56 - 1071559856928 - 8860 - org.codehaus.logger - INFO - Processing - run - 1747 - start run - - - 2003-12-16T02:30:56 - 1071559856929 - 8861 - org.codehaus.logger - INFO - Processing - run - 1747 - end run - - - 2003-12-16T02:30:56 - 1071559856929 - 8862 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:30:56 - 1071559856929 - 8863 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:31:27 - 1071559887108 - 8864 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1446052157 - - - - 2003-12-16T02:31:27 - 1071559887108 - 8865 - org.codehaus.logger - INFO - Processing - run - 1748 - start run - - - 2003-12-16T02:31:27 - 1071559887109 - 8866 - org.codehaus.logger - INFO - Processing - run - 1748 - end run - - - 2003-12-16T02:31:27 - 1071559887109 - 8867 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:31:27 - 1071559887109 - 8868 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:31:57 - 1071559917228 - 8869 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1476202194 - - - - 2003-12-16T02:31:57 - 1071559917229 - 8870 - org.codehaus.logger - INFO - Processing - run - 1749 - start run - - - 2003-12-16T02:31:57 - 1071559917229 - 8871 - org.codehaus.logger - INFO - Processing - run - 1749 - end run - - - 2003-12-16T02:31:57 - 1071559917229 - 8872 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:31:57 - 1071559917229 - 8873 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:32:27 - 1071559947388 - 8874 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1506352245 - - - - 2003-12-16T02:32:27 - 1071559947388 - 8875 - org.codehaus.logger - INFO - Processing - run - 1750 - start run - - - 2003-12-16T02:32:27 - 1071559947389 - 8876 - org.codehaus.logger - INFO - Processing - run - 1750 - end run - - - 2003-12-16T02:32:27 - 1071559947389 - 8877 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:32:27 - 1071559947389 - 8878 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:32:57 - 1071559977528 - 8879 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1536492287 - - - - 2003-12-16T02:32:57 - 1071559977529 - 8880 - org.codehaus.logger - INFO - Processing - run - 1751 - start run - - - 2003-12-16T02:32:57 - 1071559977529 - 8881 - org.codehaus.logger - INFO - Processing - run - 1751 - end run - - - 2003-12-16T02:32:57 - 1071559977529 - 8882 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:32:57 - 1071559977529 - 8883 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:33:27 - 1071560007648 - 8884 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1566632335 - - - - 2003-12-16T02:33:27 - 1071560007649 - 8885 - org.codehaus.logger - INFO - Processing - run - 1752 - start run - - - 2003-12-16T02:33:27 - 1071560007650 - 8886 - org.codehaus.logger - INFO - Processing - run - 1752 - end run - - - 2003-12-16T02:33:27 - 1071560007650 - 8887 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:33:27 - 1071560007650 - 8888 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:33:57 - 1071560037828 - 8889 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1596782410 - - - - 2003-12-16T02:33:57 - 1071560037829 - 8890 - org.codehaus.logger - INFO - Processing - run - 1753 - start run - - - 2003-12-16T02:33:57 - 1071560037829 - 8891 - org.codehaus.logger - INFO - Processing - run - 1753 - end run - - - 2003-12-16T02:33:57 - 1071560037829 - 8892 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:33:57 - 1071560037829 - 8893 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:34:27 - 1071560067948 - 8894 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1626932449 - - - - 2003-12-16T02:34:27 - 1071560067949 - 8895 - org.codehaus.logger - INFO - Processing - run - 1754 - start run - - - 2003-12-16T02:34:27 - 1071560067949 - 8896 - org.codehaus.logger - INFO - Processing - run - 1754 - end run - - - 2003-12-16T02:34:27 - 1071560067949 - 8897 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:34:27 - 1071560067950 - 8898 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:34:58 - 1071560098108 - 8899 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1657082883 - - - - 2003-12-16T02:34:58 - 1071560098109 - 8900 - org.codehaus.logger - INFO - Processing - run - 1755 - start run - - - 2003-12-16T02:34:58 - 1071560098109 - 8901 - org.codehaus.logger - INFO - Processing - run - 1755 - end run - - - 2003-12-16T02:34:58 - 1071560098109 - 8902 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:34:58 - 1071560098110 - 8903 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:35:28 - 1071560128248 - 8904 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1687242538 - - - - 2003-12-16T02:35:28 - 1071560128250 - 8905 - org.codehaus.logger - INFO - Processing - run - 1756 - start run - - - 2003-12-16T02:35:28 - 1071560128250 - 8906 - org.codehaus.logger - INFO - Processing - run - 1756 - end run - - - 2003-12-16T02:35:28 - 1071560128250 - 8907 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:35:28 - 1071560128251 - 8908 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:35:58 - 1071560158428 - 8909 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1717392595 - - - - 2003-12-16T02:35:58 - 1071560158429 - 8910 - org.codehaus.logger - INFO - Processing - run - 1757 - start run - - - 2003-12-16T02:35:58 - 1071560158429 - 8911 - org.codehaus.logger - INFO - Processing - run - 1757 - end run - - - 2003-12-16T02:35:58 - 1071560158429 - 8912 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:35:58 - 1071560158429 - 8913 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:36:28 - 1071560188548 - 8914 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1747542643 - - - - 2003-12-16T02:36:28 - 1071560188549 - 8915 - org.codehaus.logger - INFO - Processing - run - 1758 - start run - - - 2003-12-16T02:36:28 - 1071560188549 - 8916 - org.codehaus.logger - INFO - Processing - run - 1758 - end run - - - 2003-12-16T02:36:28 - 1071560188550 - 8917 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:36:28 - 1071560188550 - 8918 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:36:58 - 1071560218718 - 8919 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1777692703 - - - - 2003-12-16T02:36:58 - 1071560218719 - 8920 - org.codehaus.logger - INFO - Processing - run - 1759 - start run - - - 2003-12-16T02:36:58 - 1071560218719 - 8921 - org.codehaus.logger - INFO - Processing - run - 1759 - end run - - - 2003-12-16T02:36:58 - 1071560218720 - 8922 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:36:58 - 1071560218720 - 8923 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:37:28 - 1071560248858 - 8924 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1807842752 - - - - 2003-12-16T02:37:28 - 1071560248859 - 8925 - org.codehaus.logger - INFO - Processing - run - 1760 - start run - - - 2003-12-16T02:37:28 - 1071560248860 - 8926 - org.codehaus.logger - INFO - Processing - run - 1760 - end run - - - 2003-12-16T02:37:28 - 1071560248861 - 8927 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:37:28 - 1071560248861 - 8928 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:37:59 - 1071560279029 - 8929 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1837982814 - - - - 2003-12-16T02:37:59 - 1071560279030 - 8930 - org.codehaus.logger - INFO - Processing - run - 1761 - start run - - - 2003-12-16T02:37:59 - 1071560279030 - 8931 - org.codehaus.logger - INFO - Processing - run - 1761 - end run - - - 2003-12-16T02:37:59 - 1071560279031 - 8932 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:37:59 - 1071560279031 - 8933 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:38:29 - 1071560309149 - 8934 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1868142883 - - - - 2003-12-16T02:38:29 - 1071560309149 - 8935 - org.codehaus.logger - INFO - Processing - run - 1762 - start run - - - 2003-12-16T02:38:29 - 1071560309150 - 8936 - org.codehaus.logger - INFO - Processing - run - 1762 - end run - - - 2003-12-16T02:38:29 - 1071560309150 - 8937 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:38:29 - 1071560309150 - 8938 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:38:59 - 1071560339319 - 8939 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1898302972 - - - - 2003-12-16T02:38:59 - 1071560339319 - 8940 - org.codehaus.logger - INFO - Processing - run - 1763 - start run - - - 2003-12-16T02:38:59 - 1071560339319 - 8941 - org.codehaus.logger - INFO - Processing - run - 1763 - end run - - - 2003-12-16T02:38:59 - 1071560339320 - 8942 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:38:59 - 1071560339320 - 8943 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:39:29 - 1071560369459 - 8944 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1928453465 - - - - 2003-12-16T02:39:29 - 1071560369460 - 8945 - org.codehaus.logger - INFO - Processing - run - 1764 - start run - - - 2003-12-16T02:39:29 - 1071560369461 - 8946 - org.codehaus.logger - INFO - Processing - run - 1764 - end run - - - 2003-12-16T02:39:29 - 1071560369461 - 8947 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:39:29 - 1071560369461 - 8948 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:39:59 - 1071560399609 - 8949 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1958603060 - - - - 2003-12-16T02:39:59 - 1071560399610 - 8950 - org.codehaus.logger - INFO - Processing - run - 1765 - start run - - - 2003-12-16T02:39:59 - 1071560399610 - 8951 - org.codehaus.logger - INFO - Processing - run - 1765 - end run - - - 2003-12-16T02:39:59 - 1071560399610 - 8952 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:39:59 - 1071560399611 - 8953 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:40:29 - 1071560429809 - 8954 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1988753107 - - - - 2003-12-16T02:40:29 - 1071560429809 - 8955 - org.codehaus.logger - INFO - Processing - run - 1766 - start run - - - 2003-12-16T02:40:29 - 1071560429810 - 8956 - org.codehaus.logger - INFO - Processing - run - 1766 - end run - - - 2003-12-16T02:40:29 - 1071560429810 - 8957 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:40:29 - 1071560429810 - 8958 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:40:59 - 1071560459919 - 8959 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2018903166 - - - - 2003-12-16T02:40:59 - 1071560459920 - 8960 - org.codehaus.logger - INFO - Processing - run - 1767 - start run - - - 2003-12-16T02:40:59 - 1071560459920 - 8961 - org.codehaus.logger - INFO - Processing - run - 1767 - end run - - - 2003-12-16T02:40:59 - 1071560459921 - 8962 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:40:59 - 1071560459921 - 8963 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:41:30 - 1071560490059 - 8964 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2049053234 - - - - 2003-12-16T02:41:30 - 1071560490061 - 8965 - org.codehaus.logger - INFO - Processing - run - 1768 - start run - - - 2003-12-16T02:41:30 - 1071560490061 - 8966 - org.codehaus.logger - INFO - Processing - run - 1768 - end run - - - 2003-12-16T02:41:30 - 1071560490061 - 8967 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:41:30 - 1071560490061 - 8968 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:42:00 - 1071560520229 - 8969 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2079213362 - - - - 2003-12-16T02:42:00 - 1071560520230 - 8970 - org.codehaus.logger - INFO - Processing - run - 1769 - start run - - - 2003-12-16T02:42:00 - 1071560520230 - 8971 - org.codehaus.logger - INFO - Processing - run - 1769 - end run - - - 2003-12-16T02:42:00 - 1071560520230 - 8972 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:42:00 - 1071560520230 - 8973 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:42:30 - 1071560550449 - 8974 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2109393366 - - - - 2003-12-16T02:42:30 - 1071560550450 - 8975 - org.codehaus.logger - INFO - Processing - run - 1770 - start run - - - 2003-12-16T02:42:30 - 1071560550450 - 8976 - org.codehaus.logger - INFO - Processing - run - 1770 - end run - - - 2003-12-16T02:42:30 - 1071560550450 - 8977 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:42:30 - 1071560550450 - 8978 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:43:00 - 1071560580539 - 8979 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2139533492 - - - - 2003-12-16T02:43:00 - 1071560580540 - 8980 - org.codehaus.logger - INFO - Processing - run - 1771 - start run - - - 2003-12-16T02:43:00 - 1071560580540 - 8981 - org.codehaus.logger - INFO - Processing - run - 1771 - end run - - - 2003-12-16T02:43:00 - 1071560580541 - 8982 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:43:00 - 1071560580541 - 8983 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:43:30 - 1071560610709 - 8984 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2169683495 - - - - 2003-12-16T02:43:30 - 1071560610710 - 8985 - org.codehaus.logger - INFO - Processing - run - 1772 - start run - - - 2003-12-16T02:43:30 - 1071560610710 - 8986 - org.codehaus.logger - INFO - Processing - run - 1772 - end run - - - 2003-12-16T02:43:30 - 1071560610711 - 8987 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:43:30 - 1071560610711 - 8988 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:44:00 - 1071560640889 - 8989 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2199833951 - - - - 2003-12-16T02:44:00 - 1071560640890 - 8990 - org.codehaus.logger - INFO - Processing - run - 1773 - start run - - - 2003-12-16T02:44:00 - 1071560640890 - 8991 - org.codehaus.logger - INFO - Processing - run - 1773 - end run - - - 2003-12-16T02:44:00 - 1071560640890 - 8992 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:44:00 - 1071560640890 - 8993 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:44:31 - 1071560671009 - 8994 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2229983623 - - - - 2003-12-16T02:44:31 - 1071560671010 - 8995 - org.codehaus.logger - INFO - Processing - run - 1774 - start run - - - 2003-12-16T02:44:31 - 1071560671010 - 8996 - org.codehaus.logger - INFO - Processing - run - 1774 - end run - - - 2003-12-16T02:44:31 - 1071560671011 - 8997 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:44:31 - 1071560671011 - 8998 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:45:01 - 1071560701179 - 8999 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2260143667 - - - - 2003-12-16T02:45:01 - 1071560701180 - 9000 - org.codehaus.logger - INFO - Processing - run - 1775 - start run - - - 2003-12-16T02:45:01 - 1071560701180 - 9001 - org.codehaus.logger - INFO - Processing - run - 1775 - end run - - - 2003-12-16T02:45:01 - 1071560701181 - 9002 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:45:01 - 1071560701181 - 9003 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:45:31 - 1071560731369 - 9004 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2290313619 - - - - 2003-12-16T02:45:31 - 1071560731371 - 9005 - org.codehaus.logger - INFO - Processing - run - 1776 - start run - - - 2003-12-16T02:45:31 - 1071560731371 - 9006 - org.codehaus.logger - INFO - Processing - run - 1776 - end run - - - 2003-12-16T02:45:31 - 1071560731371 - 9007 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:45:31 - 1071560731372 - 9008 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:46:01 - 1071560761489 - 9009 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2320453586 - - - - 2003-12-16T02:46:01 - 1071560761490 - 9010 - org.codehaus.logger - INFO - Processing - run - 1777 - start run - - - 2003-12-16T02:46:01 - 1071560761490 - 9011 - org.codehaus.logger - INFO - Processing - run - 1777 - end run - - - 2003-12-16T02:46:01 - 1071560761490 - 9012 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:46:01 - 1071560761491 - 9013 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:46:31 - 1071560791609 - 9014 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2350593559 - - - - 2003-12-16T02:46:31 - 1071560791610 - 9015 - org.codehaus.logger - INFO - Processing - run - 1778 - start run - - - 2003-12-16T02:46:31 - 1071560791611 - 9016 - org.codehaus.logger - INFO - Processing - run - 1778 - end run - - - 2003-12-16T02:46:31 - 1071560791611 - 9017 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:46:31 - 1071560791611 - 9018 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:47:01 - 1071560821799 - 9019 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2380763526 - - - - 2003-12-16T02:47:01 - 1071560821800 - 9020 - org.codehaus.logger - INFO - Processing - run - 1779 - start run - - - 2003-12-16T02:47:01 - 1071560821800 - 9021 - org.codehaus.logger - INFO - Processing - run - 1779 - end run - - - 2003-12-16T02:47:01 - 1071560821800 - 9022 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:47:01 - 1071560821800 - 9023 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:47:31 - 1071560851939 - 9024 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2410913503 - - - - 2003-12-16T02:47:31 - 1071560851940 - 9025 - org.codehaus.logger - INFO - Processing - run - 1780 - start run - - - 2003-12-16T02:47:31 - 1071560851940 - 9026 - org.codehaus.logger - INFO - Processing - run - 1780 - end run - - - 2003-12-16T02:47:31 - 1071560851940 - 9027 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:47:31 - 1071560851940 - 9028 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:48:02 - 1071560882099 - 9029 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2441063473 - - - - 2003-12-16T02:48:02 - 1071560882100 - 9030 - org.codehaus.logger - INFO - Processing - run - 1781 - start run - - - 2003-12-16T02:48:02 - 1071560882100 - 9031 - org.codehaus.logger - INFO - Processing - run - 1781 - end run - - - 2003-12-16T02:48:02 - 1071560882100 - 9032 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:48:02 - 1071560882100 - 9033 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:48:32 - 1071560912269 - 9034 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2471223506 - - - - 2003-12-16T02:48:32 - 1071560912270 - 9035 - org.codehaus.logger - INFO - Processing - run - 1782 - start run - - - 2003-12-16T02:48:32 - 1071560912270 - 9036 - org.codehaus.logger - INFO - Processing - run - 1782 - end run - - - 2003-12-16T02:48:32 - 1071560912270 - 9037 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:48:32 - 1071560912270 - 9038 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:49:02 - 1071560942389 - 9039 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2501383426 - - - - 2003-12-16T02:49:02 - 1071560942390 - 9040 - org.codehaus.logger - INFO - Processing - run - 1783 - start run - - - 2003-12-16T02:49:02 - 1071560942390 - 9041 - org.codehaus.logger - INFO - Processing - run - 1783 - end run - - - 2003-12-16T02:49:02 - 1071560942391 - 9042 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:49:02 - 1071560942391 - 9043 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:49:32 - 1071560972639 - 9044 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2531613401 - - - - 2003-12-16T02:49:32 - 1071560972640 - 9045 - org.codehaus.logger - INFO - Processing - run - 1784 - start run - - - 2003-12-16T02:49:32 - 1071560972640 - 9046 - org.codehaus.logger - INFO - Processing - run - 1784 - end run - - - 2003-12-16T02:49:32 - 1071560972641 - 9047 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:49:32 - 1071560972641 - 9048 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:50:02 - 1071561002822 - 9049 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2561763381 - - - - 2003-12-16T02:50:02 - 1071561002823 - 9050 - org.codehaus.logger - INFO - Processing - run - 1785 - start run - - - 2003-12-16T02:50:02 - 1071561002823 - 9051 - org.codehaus.logger - INFO - Processing - run - 1785 - end run - - - 2003-12-16T02:50:02 - 1071561002824 - 9052 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:50:02 - 1071561002824 - 9053 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:50:32 - 1071561032969 - 9054 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2591913356 - - - - 2003-12-16T02:50:32 - 1071561032970 - 9055 - org.codehaus.logger - INFO - Processing - run - 1786 - start run - - - 2003-12-16T02:50:32 - 1071561032970 - 9056 - org.codehaus.logger - INFO - Processing - run - 1786 - end run - - - 2003-12-16T02:50:32 - 1071561032970 - 9057 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:50:32 - 1071561032971 - 9058 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:51:03 - 1071561063089 - 9059 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2622063339 - - - - 2003-12-16T02:51:03 - 1071561063090 - 9060 - org.codehaus.logger - INFO - Processing - run - 1787 - start run - - - 2003-12-16T02:51:03 - 1071561063090 - 9061 - org.codehaus.logger - INFO - Processing - run - 1787 - end run - - - 2003-12-16T02:51:03 - 1071561063090 - 9062 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:51:03 - 1071561063091 - 9063 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:51:33 - 1071561093269 - 9064 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2652243326 - - - - 2003-12-16T02:51:33 - 1071561093270 - 9065 - org.codehaus.logger - INFO - Processing - run - 1788 - start run - - - 2003-12-16T02:51:33 - 1071561093271 - 9066 - org.codehaus.logger - INFO - Processing - run - 1788 - end run - - - 2003-12-16T02:51:33 - 1071561093271 - 9067 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:51:33 - 1071561093271 - 9068 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:52:03 - 1071561123419 - 9069 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2682403308 - - - - 2003-12-16T02:52:03 - 1071561123421 - 9070 - org.codehaus.logger - INFO - Processing - run - 1789 - start run - - - 2003-12-16T02:52:03 - 1071561123421 - 9071 - org.codehaus.logger - INFO - Processing - run - 1789 - end run - - - 2003-12-16T02:52:03 - 1071561123422 - 9072 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:52:03 - 1071561123422 - 9073 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:52:33 - 1071561153559 - 9074 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2712553297 - - - - 2003-12-16T02:52:33 - 1071561153561 - 9075 - org.codehaus.logger - INFO - Processing - run - 1790 - start run - - - 2003-12-16T02:52:33 - 1071561153561 - 9076 - org.codehaus.logger - INFO - Processing - run - 1790 - end run - - - 2003-12-16T02:52:33 - 1071561153561 - 9077 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:52:33 - 1071561153561 - 9078 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:53:03 - 1071561183759 - 9079 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2742703281 - - - - 2003-12-16T02:53:03 - 1071561183759 - 9080 - org.codehaus.logger - INFO - Processing - run - 1791 - start run - - - 2003-12-16T02:53:03 - 1071561183760 - 9081 - org.codehaus.logger - INFO - Processing - run - 1791 - end run - - - 2003-12-16T02:53:03 - 1071561183760 - 9082 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:53:04 - 1071561184370 - 9083 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:53:33 - 1071561213909 - 9084 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2772853273 - - - - 2003-12-16T02:53:33 - 1071561213910 - 9085 - org.codehaus.logger - INFO - Processing - run - 1792 - start run - - - 2003-12-16T02:53:33 - 1071561213911 - 9086 - org.codehaus.logger - INFO - Processing - run - 1792 - end run - - - 2003-12-16T02:53:33 - 1071561213911 - 9087 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:53:33 - 1071561213911 - 9088 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:54:04 - 1071561244049 - 9089 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2803003724 - - - - 2003-12-16T02:54:04 - 1071561244050 - 9090 - org.codehaus.logger - INFO - Processing - run - 1793 - start run - - - 2003-12-16T02:54:04 - 1071561244050 - 9091 - org.codehaus.logger - INFO - Processing - run - 1793 - end run - - - 2003-12-16T02:54:04 - 1071561244050 - 9092 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:54:04 - 1071561244050 - 9093 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:54:34 - 1071561274229 - 9094 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2833183319 - - - - 2003-12-16T02:54:34 - 1071561274230 - 9095 - org.codehaus.logger - INFO - Processing - run - 1794 - start run - - - 2003-12-16T02:54:34 - 1071561274230 - 9096 - org.codehaus.logger - INFO - Processing - run - 1794 - end run - - - 2003-12-16T02:54:34 - 1071561274230 - 9097 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:54:34 - 1071561274230 - 9098 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:55:04 - 1071561304349 - 9099 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2863343243 - - - - 2003-12-16T02:55:04 - 1071561304350 - 9100 - org.codehaus.logger - INFO - Processing - run - 1795 - start run - - - 2003-12-16T02:55:04 - 1071561304351 - 9101 - org.codehaus.logger - INFO - Processing - run - 1795 - end run - - - 2003-12-16T02:55:04 - 1071561304351 - 9102 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:55:04 - 1071561304351 - 9103 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:55:34 - 1071561334529 - 9104 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2893493239 - - - - 2003-12-16T02:55:34 - 1071561334530 - 9105 - org.codehaus.logger - INFO - Processing - run - 1796 - start run - - - 2003-12-16T02:55:34 - 1071561334530 - 9106 - org.codehaus.logger - INFO - Processing - run - 1796 - end run - - - 2003-12-16T02:55:34 - 1071561334531 - 9107 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:55:34 - 1071561334531 - 9108 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:56:04 - 1071561364649 - 9109 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2923643239 - - - - 2003-12-16T02:56:04 - 1071561364650 - 9110 - org.codehaus.logger - INFO - Processing - run - 1797 - start run - - - 2003-12-16T02:56:04 - 1071561364650 - 9111 - org.codehaus.logger - INFO - Processing - run - 1797 - end run - - - 2003-12-16T02:56:04 - 1071561364651 - 9112 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:56:04 - 1071561364651 - 9113 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:56:34 - 1071561394809 - 9114 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2953803240 - - - - 2003-12-16T02:56:34 - 1071561394810 - 9115 - org.codehaus.logger - INFO - Processing - run - 1798 - start run - - - 2003-12-16T02:56:34 - 1071561394810 - 9116 - org.codehaus.logger - INFO - Processing - run - 1798 - end run - - - 2003-12-16T02:56:34 - 1071561394811 - 9117 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:56:34 - 1071561394811 - 9118 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:57:05 - 1071561425009 - 9119 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG2983953237 - - - - 2003-12-16T02:57:05 - 1071561425010 - 9120 - org.codehaus.logger - INFO - Processing - run - 1799 - start run - - - 2003-12-16T02:57:05 - 1071561425470 - 9121 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:57:05 - 1071561425470 - 9122 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:57:05 - 1071561425470 - 9123 - org.codehaus.logger - INFO - Processing - run - 1799 - end run - - - 2003-12-16T02:57:35 - 1071561455149 - 9124 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3014103229 - - - - 2003-12-16T02:57:35 - 1071561455149 - 9125 - org.codehaus.logger - INFO - Processing - run - 1800 - start run - - - 2003-12-16T02:57:35 - 1071561455150 - 9126 - org.codehaus.logger - INFO - Processing - run - 1800 - end run - - - 2003-12-16T02:57:35 - 1071561455150 - 9127 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:57:35 - 1071561455150 - 9128 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:58:05 - 1071561485329 - 9129 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3044273232 - - - - 2003-12-16T02:58:05 - 1071561485330 - 9130 - org.codehaus.logger - INFO - Processing - run - 1801 - start run - - - 2003-12-16T02:58:05 - 1071561485330 - 9131 - org.codehaus.logger - INFO - Processing - run - 1801 - end run - - - 2003-12-16T02:58:05 - 1071561485331 - 9132 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:58:05 - 1071561485331 - 9133 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:58:35 - 1071561515469 - 9134 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3074413231 - - - - 2003-12-16T02:58:35 - 1071561515470 - 9135 - org.codehaus.logger - INFO - Processing - run - 1802 - start run - - - 2003-12-16T02:58:35 - 1071561515470 - 9136 - org.codehaus.logger - INFO - Processing - run - 1802 - end run - - - 2003-12-16T02:58:35 - 1071561515470 - 9137 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:58:35 - 1071561515470 - 9138 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:59:05 - 1071561545609 - 9139 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3104563230 - - - - 2003-12-16T02:59:05 - 1071561545610 - 9140 - org.codehaus.logger - INFO - Processing - run - 1803 - start run - - - 2003-12-16T02:59:05 - 1071561545610 - 9141 - org.codehaus.logger - INFO - Processing - run - 1803 - end run - - - 2003-12-16T02:59:05 - 1071561545610 - 9142 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:59:05 - 1071561545610 - 9143 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T02:59:35 - 1071561575769 - 9144 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3134713299 - - - - 2003-12-16T02:59:35 - 1071561575770 - 9145 - org.codehaus.logger - INFO - Processing - run - 1804 - start run - - - 2003-12-16T02:59:35 - 1071561575771 - 9146 - org.codehaus.logger - INFO - Processing - run - 1804 - end run - - - 2003-12-16T02:59:35 - 1071561575771 - 9147 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T02:59:35 - 1071561575771 - 9148 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:00:05 - 1071561605879 - 9149 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3164863245 - - - - 2003-12-16T03:00:05 - 1071561605879 - 9150 - org.codehaus.logger - INFO - Processing - run - 1805 - start run - - - 2003-12-16T03:00:05 - 1071561605880 - 9151 - org.codehaus.logger - INFO - Processing - run - 1805 - end run - - - 2003-12-16T03:00:05 - 1071561605880 - 9152 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:00:05 - 1071561605880 - 9153 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:00:36 - 1071561636039 - 9154 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3195013252 - - - - 2003-12-16T03:00:36 - 1071561636040 - 9155 - org.codehaus.logger - INFO - Processing - run - 1806 - start run - - - 2003-12-16T03:00:36 - 1071561636040 - 9156 - org.codehaus.logger - INFO - Processing - run - 1806 - end run - - - 2003-12-16T03:00:36 - 1071561636040 - 9157 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:00:36 - 1071561636040 - 9158 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:01:06 - 1071561666209 - 9159 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3225173272 - - - - 2003-12-16T03:01:06 - 1071561666209 - 9160 - org.codehaus.logger - INFO - Processing - run - 1807 - start run - - - 2003-12-16T03:01:06 - 1071561666660 - 9161 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:01:06 - 1071561666660 - 9162 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:01:06 - 1071561666660 - 9163 - org.codehaus.logger - INFO - Processing - run - 1807 - end run - - - 2003-12-16T03:01:36 - 1071561696389 - 9164 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3255383270 - - - - 2003-12-16T03:01:36 - 1071561696391 - 9165 - org.codehaus.logger - INFO - Processing - run - 1808 - start run - - - 2003-12-16T03:01:36 - 1071561696391 - 9166 - org.codehaus.logger - INFO - Processing - run - 1808 - end run - - - 2003-12-16T03:01:36 - 1071561696392 - 9167 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:01:36 - 1071561696393 - 9168 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:01:37 - 1071561697529 - 9169 - org.codehaus.logger - INFO - Listening - receive - 26 - <----PRIVMSG #test :00:50 -!- [] has quit [Client exiting] - - - - 2003-12-16T03:01:37 - 1071561697529 - 9170 - org.codehaus.logger - INFO - Processing - run - 1809 - start run - - - 2003-12-16T03:01:37 - 1071561697530 - 9171 - org.codehaus.logger - INFO - Processing - run - 1809 - end run - - - 2003-12-16T03:01:37 - 1071561697530 - 9172 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:01:37 - 1071561697531 - 9173 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:trygvis PRIVMSG #test :00:50 -!- [] has quit [Client exiting] - - - - 2003-12-16T03:01:37 - 1071561697531 - 9174 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:01:37 - 1071561697531 - 9175 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-16T03:01:37 - 1071561697531 - 9176 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-16T03:01:41 - 1071561701679 - 9177 - org.codehaus.logger - INFO - Listening - receive - 26 - <----PRIVMSG #test :00:50 -!- Irssi: critical file nicklist.c: line 93 (nicklist_set_host): assertion `host != NULL' failed. - - - - 2003-12-16T03:01:41 - 1071561701680 - 9178 - org.codehaus.logger - INFO - Processing - run - 1810 - start run - - - 2003-12-16T03:01:41 - 1071561701680 - 9179 - org.codehaus.logger - INFO - Processing - run - 1810 - end run - - - 2003-12-16T03:01:41 - 1071561701681 - 9180 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:01:41 - 1071561701681 - 9181 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:trygvis PRIVMSG #test :00:50 -!- Irssi: critical file nicklist.c: line 93 (nicklist_set_host): assertion `host != NULL' failed. - - - - 2003-12-16T03:01:41 - 1071561701681 - 9182 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:01:41 - 1071561701681 - 9183 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-16T03:01:41 - 1071561701681 - 9184 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-16T03:01:50 - 1071561710619 - 9185 - org.codehaus.logger - INFO - Listening - receive - 26 - <----PRIVMSG #test :09:01 [Users #test] - - - - 2003-12-16T03:01:50 - 1071561710620 - 9186 - org.codehaus.logger - INFO - Processing - run - 1811 - start run - - - 2003-12-16T03:01:50 - 1071561710620 - 9187 - org.codehaus.logger - INFO - Processing - run - 1811 - end run - - - 2003-12-16T03:01:50 - 1071561710621 - 9188 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:01:50 - 1071561710621 - 9189 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:trygvis PRIVMSG #test :09:01 [Users #test] - - - - 2003-12-16T03:01:50 - 1071561710621 - 9190 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:01:50 - 1071561710990 - 9191 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-16T03:01:50 - 1071561710990 - 9192 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-16T03:01:50 - 1071561710990 - 9193 - org.codehaus.logger - INFO - Listening - receive - 26 - <----PRIVMSG #test :09:01 [@jason] [ jt] [ trygvis] -PRIVMSG #test :09:01 -!- Irssi: #test: Total of 3 nicks [1 ops, 0 halfops, 0 voices, 2 normal] - - - - 2003-12-16T03:01:50 - 1071561710991 - 9194 - org.codehaus.logger - INFO - Processing - run - 1812 - start run - - - 2003-12-16T03:01:51 - 1071561711027 - 9195 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:01:51 - 1071561711028 - 9196 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:trygvis PRIVMSG #test :09:01 [@jason] [ jt] [ trygvis] - - - - 2003-12-16T03:01:51 - 1071561711028 - 9197 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:01:51 - 1071561711033 - 9198 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:01:51 - 1071561711034 - 9199 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:trygvis PRIVMSG #test :09:01 -!- Irssi: #test: Total of 3 nicks [1 ops, 0 halfops, 0 voices, 2 normal] - - - - 2003-12-16T03:01:51 - 1071561711034 - 9200 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:01:51 - 1071561711037 - 9201 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-16T03:01:51 - 1071561711038 - 9202 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-16T03:01:51 - 1071561711038 - 9203 - org.codehaus.logger - INFO - Processing - run - 1812 - end run - - - 2003-12-16T03:01:54 - 1071561714189 - 9204 - org.codehaus.logger - INFO - Listening - receive - 26 - <----PRIVMSG #test :odd - - - - 2003-12-16T03:01:54 - 1071561714190 - 9205 - org.codehaus.logger - INFO - Processing - run - 1813 - start run - - - 2003-12-16T03:01:54 - 1071561714190 - 9206 - org.codehaus.logger - INFO - Processing - run - 1813 - end run - - - 2003-12-16T03:01:54 - 1071561714191 - 9207 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:01:54 - 1071561714191 - 9208 - org.codehaus.logger - INFO - Talking - send - 11 - ------>:trygvis PRIVMSG #test :odd - - - - 2003-12-16T03:01:54 - 1071561714191 - 9209 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:01:54 - 1071561714191 - 9210 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-16T03:01:54 - 1071561714191 - 9211 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-16T03:02:06 - 1071561726549 - 9212 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3285543272 - - - - 2003-12-16T03:02:06 - 1071561726550 - 9213 - org.codehaus.logger - INFO - Processing - run - 1814 - start run - - - 2003-12-16T03:02:06 - 1071561726550 - 9214 - org.codehaus.logger - INFO - Processing - run - 1814 - end run - - - 2003-12-16T03:02:06 - 1071561726550 - 9215 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:02:06 - 1071561726550 - 9216 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:02:36 - 1071561756699 - 9217 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3315693262 - - - - 2003-12-16T03:02:36 - 1071561756700 - 9218 - org.codehaus.logger - INFO - Processing - run - 1815 - start run - - - 2003-12-16T03:02:37 - 1071561757032 - 9219 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:02:37 - 1071561757032 - 9220 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:02:37 - 1071561757032 - 9221 - org.codehaus.logger - INFO - Processing - run - 1815 - end run - - - 2003-12-16T03:03:06 - 1071561786869 - 9222 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3345843232 - - - - 2003-12-16T03:03:06 - 1071561786870 - 9223 - org.codehaus.logger - INFO - Processing - run - 1816 - start run - - - 2003-12-16T03:03:06 - 1071561786871 - 9224 - org.codehaus.logger - INFO - Processing - run - 1816 - end run - - - 2003-12-16T03:03:06 - 1071561786871 - 9225 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:03:06 - 1071561786871 - 9226 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:03:37 - 1071561817049 - 9227 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3376003239 - - - - 2003-12-16T03:03:37 - 1071561817049 - 9228 - org.codehaus.logger - INFO - Processing - run - 1817 - start run - - - 2003-12-16T03:03:37 - 1071561817050 - 9229 - org.codehaus.logger - INFO - Processing - run - 1817 - end run - - - 2003-12-16T03:03:37 - 1071561817050 - 9230 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:03:37 - 1071561817050 - 9231 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:04:07 - 1071561847229 - 9232 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3406203234 - - - - 2003-12-16T03:04:07 - 1071561847229 - 9233 - org.codehaus.logger - INFO - Processing - run - 1818 - start run - - - 2003-12-16T03:04:07 - 1071561847230 - 9234 - org.codehaus.logger - INFO - Processing - run - 1818 - end run - - - 2003-12-16T03:04:07 - 1071561847230 - 9235 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:04:07 - 1071561847230 - 9236 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:04:37 - 1071561877409 - 9237 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3436353226 - - - - 2003-12-16T03:04:37 - 1071561877409 - 9238 - org.codehaus.logger - INFO - Processing - run - 1819 - start run - - - 2003-12-16T03:04:37 - 1071561877410 - 9239 - org.codehaus.logger - INFO - Processing - run - 1819 - end run - - - 2003-12-16T03:04:37 - 1071561877410 - 9240 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:04:37 - 1071561877410 - 9241 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:05:07 - 1071561907539 - 9242 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3466503254 - - - - 2003-12-16T03:05:07 - 1071561907540 - 9243 - org.codehaus.logger - INFO - Processing - run - 1820 - start run - - - 2003-12-16T03:05:07 - 1071561907540 - 9244 - org.codehaus.logger - INFO - Processing - run - 1820 - end run - - - 2003-12-16T03:05:07 - 1071561907541 - 9245 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:05:07 - 1071561907541 - 9246 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:05:37 - 1071561937659 - 9247 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3496643233 - - - - 2003-12-16T03:05:37 - 1071561937659 - 9248 - org.codehaus.logger - INFO - Processing - run - 1821 - start run - - - 2003-12-16T03:05:37 - 1071561937660 - 9249 - org.codehaus.logger - INFO - Processing - run - 1821 - end run - - - 2003-12-16T03:05:37 - 1071561937660 - 9250 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:05:37 - 1071561937660 - 9251 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:06:07 - 1071561967839 - 9252 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3526793224 - - - - 2003-12-16T03:06:07 - 1071561967839 - 9253 - org.codehaus.logger - INFO - Processing - run - 1822 - start run - - - 2003-12-16T03:06:07 - 1071561967840 - 9254 - org.codehaus.logger - INFO - Processing - run - 1822 - end run - - - 2003-12-16T03:06:07 - 1071561967840 - 9255 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:06:07 - 1071561967840 - 9256 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:06:37 - 1071561997959 - 9257 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3556933315 - - - - 2003-12-16T03:06:38 - 1071561998400 - 9258 - org.codehaus.logger - INFO - Processing - run - 1823 - start run - - - 2003-12-16T03:06:38 - 1071561998400 - 9259 - org.codehaus.logger - INFO - Processing - run - 1823 - end run - - - 2003-12-16T03:06:38 - 1071561998401 - 9260 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:06:38 - 1071561998401 - 9261 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:07:08 - 1071562028129 - 9262 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3587093628 - - - - 2003-12-16T03:07:08 - 1071562028129 - 9263 - org.codehaus.logger - INFO - Processing - run - 1824 - start run - - - 2003-12-16T03:07:08 - 1071562028130 - 9264 - org.codehaus.logger - INFO - Processing - run - 1824 - end run - - - 2003-12-16T03:07:08 - 1071562028130 - 9265 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:07:08 - 1071562028131 - 9266 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:07:38 - 1071562058249 - 9267 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3617243226 - - - - 2003-12-16T03:07:38 - 1071562058250 - 9268 - org.codehaus.logger - INFO - Processing - run - 1825 - start run - - - 2003-12-16T03:07:38 - 1071562058250 - 9269 - org.codehaus.logger - INFO - Processing - run - 1825 - end run - - - 2003-12-16T03:07:38 - 1071562058250 - 9270 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:07:38 - 1071562058250 - 9271 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:08:08 - 1071562088439 - 9272 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3647383231 - - - - 2003-12-16T03:08:08 - 1071562088440 - 9273 - org.codehaus.logger - INFO - Processing - run - 1826 - start run - - - 2003-12-16T03:08:08 - 1071562088440 - 9274 - org.codehaus.logger - INFO - Processing - run - 1826 - end run - - - 2003-12-16T03:08:08 - 1071562088441 - 9275 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:08:08 - 1071562088441 - 9276 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:08:38 - 1071562118589 - 9277 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3677533267 - - - - 2003-12-16T03:08:38 - 1071562118589 - 9278 - org.codehaus.logger - INFO - Processing - run - 1827 - start run - - - 2003-12-16T03:08:38 - 1071562118590 - 9279 - org.codehaus.logger - INFO - Processing - run - 1827 - end run - - - 2003-12-16T03:08:38 - 1071562118590 - 9280 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:08:38 - 1071562118590 - 9281 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:09:08 - 1071562148689 - 9282 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3707683247 - - - - 2003-12-16T03:09:08 - 1071562148690 - 9283 - org.codehaus.logger - INFO - Processing - run - 1828 - start run - - - 2003-12-16T03:09:08 - 1071562148691 - 9284 - org.codehaus.logger - INFO - Processing - run - 1828 - end run - - - 2003-12-16T03:09:08 - 1071562148691 - 9285 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:09:08 - 1071562148691 - 9286 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:09:38 - 1071562178849 - 9287 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3737833251 - - - - 2003-12-16T03:09:38 - 1071562178850 - 9288 - org.codehaus.logger - INFO - Processing - run - 1829 - start run - - - 2003-12-16T03:09:38 - 1071562178850 - 9289 - org.codehaus.logger - INFO - Processing - run - 1829 - end run - - - 2003-12-16T03:09:38 - 1071562178851 - 9290 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:09:38 - 1071562178851 - 9291 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:10:09 - 1071562209059 - 9292 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3768023254 - - - - 2003-12-16T03:10:09 - 1071562209059 - 9293 - org.codehaus.logger - INFO - Processing - run - 1830 - start run - - - 2003-12-16T03:10:09 - 1071562209060 - 9294 - org.codehaus.logger - INFO - Processing - run - 1830 - end run - - - 2003-12-16T03:10:09 - 1071562209060 - 9295 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:10:09 - 1071562209060 - 9296 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:10:39 - 1071562239219 - 9297 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3798173269 - - - - 2003-12-16T03:10:39 - 1071562239730 - 9298 - org.codehaus.logger - INFO - Processing - run - 1831 - start run - - - 2003-12-16T03:10:39 - 1071562239731 - 9299 - org.codehaus.logger - INFO - Processing - run - 1831 - end run - - - 2003-12-16T03:10:39 - 1071562239731 - 9300 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:10:39 - 1071562239731 - 9301 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:11:09 - 1071562269369 - 9302 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3828323290 - - - - 2003-12-16T03:11:09 - 1071562269370 - 9303 - org.codehaus.logger - INFO - Processing - run - 1832 - start run - - - 2003-12-16T03:11:09 - 1071562269370 - 9304 - org.codehaus.logger - INFO - Processing - run - 1832 - end run - - - 2003-12-16T03:11:09 - 1071562269370 - 9305 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:11:09 - 1071562269370 - 9306 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:11:39 - 1071562299489 - 9307 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3858473288 - - - - 2003-12-16T03:11:39 - 1071562299490 - 9308 - org.codehaus.logger - INFO - Processing - run - 1833 - start run - - - 2003-12-16T03:11:39 - 1071562299490 - 9309 - org.codehaus.logger - INFO - Processing - run - 1833 - end run - - - 2003-12-16T03:11:39 - 1071562299490 - 9310 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:11:39 - 1071562299490 - 9311 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:12:09 - 1071562329669 - 9312 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3888623291 - - - - 2003-12-16T03:12:09 - 1071562329670 - 9313 - org.codehaus.logger - INFO - Processing - run - 1834 - start run - - - 2003-12-16T03:12:09 - 1071562329670 - 9314 - org.codehaus.logger - INFO - Processing - run - 1834 - end run - - - 2003-12-16T03:12:09 - 1071562329670 - 9315 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:12:09 - 1071562329670 - 9316 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:12:39 - 1071562359789 - 9317 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3918773315 - - - - 2003-12-16T03:12:39 - 1071562359790 - 9318 - org.codehaus.logger - INFO - Processing - run - 1835 - start run - - - 2003-12-16T03:12:39 - 1071562359790 - 9319 - org.codehaus.logger - INFO - Processing - run - 1835 - end run - - - 2003-12-16T03:12:39 - 1071562359790 - 9320 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:12:39 - 1071562359790 - 9321 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:13:09 - 1071562389969 - 9322 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3948923332 - - - - 2003-12-16T03:13:09 - 1071562389970 - 9323 - org.codehaus.logger - INFO - Processing - run - 1836 - start run - - - 2003-12-16T03:13:09 - 1071562389970 - 9324 - org.codehaus.logger - INFO - Processing - run - 1836 - end run - - - 2003-12-16T03:13:09 - 1071562389970 - 9325 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:13:09 - 1071562389970 - 9326 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:13:40 - 1071562420089 - 9327 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG3979083471 - - - - 2003-12-16T03:13:40 - 1071562420090 - 9328 - org.codehaus.logger - INFO - Processing - run - 1837 - start run - - - 2003-12-16T03:13:40 - 1071562420091 - 9329 - org.codehaus.logger - INFO - Processing - run - 1837 - end run - - - 2003-12-16T03:13:40 - 1071562420091 - 9330 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:13:40 - 1071562420091 - 9331 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:14:10 - 1071562450269 - 9332 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4009243373 - - - - 2003-12-16T03:14:10 - 1071562450270 - 9333 - org.codehaus.logger - INFO - Processing - run - 1838 - start run - - - 2003-12-16T03:14:10 - 1071562450270 - 9334 - org.codehaus.logger - INFO - Processing - run - 1838 - end run - - - 2003-12-16T03:14:10 - 1071562450270 - 9335 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:14:10 - 1071562450270 - 9336 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:14:40 - 1071562480449 - 9337 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4039393404 - - - - 2003-12-16T03:14:40 - 1071562480450 - 9338 - org.codehaus.logger - INFO - Processing - run - 1839 - start run - - - 2003-12-16T03:14:40 - 1071562480450 - 9339 - org.codehaus.logger - INFO - Processing - run - 1839 - end run - - - 2003-12-16T03:14:40 - 1071562480450 - 9340 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:14:40 - 1071562480450 - 9341 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:15:10 - 1071562510569 - 9342 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4069553411 - - - - 2003-12-16T03:15:10 - 1071562510570 - 9343 - org.codehaus.logger - INFO - Processing - run - 1840 - start run - - - 2003-12-16T03:15:10 - 1071562510570 - 9344 - org.codehaus.logger - INFO - Processing - run - 1840 - end run - - - 2003-12-16T03:15:10 - 1071562510570 - 9345 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:15:10 - 1071562510570 - 9346 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:15:40 - 1071562540749 - 9347 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4099703427 - - - - 2003-12-16T03:15:40 - 1071562540750 - 9348 - org.codehaus.logger - INFO - Processing - run - 1841 - start run - - - 2003-12-16T03:15:40 - 1071562540750 - 9349 - org.codehaus.logger - INFO - Processing - run - 1841 - end run - - - 2003-12-16T03:15:40 - 1071562540750 - 9350 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:15:40 - 1071562540750 - 9351 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:16:10 - 1071562570869 - 9352 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4129853454 - - - - 2003-12-16T03:16:10 - 1071562570870 - 9353 - org.codehaus.logger - INFO - Processing - run - 1842 - start run - - - 2003-12-16T03:16:10 - 1071562570870 - 9354 - org.codehaus.logger - INFO - Processing - run - 1842 - end run - - - 2003-12-16T03:16:10 - 1071562570870 - 9355 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:16:10 - 1071562570870 - 9356 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:16:41 - 1071562601049 - 9357 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4160003474 - - - - 2003-12-16T03:16:41 - 1071562601050 - 9358 - org.codehaus.logger - INFO - Processing - run - 1843 - start run - - - 2003-12-16T03:16:41 - 1071562601051 - 9359 - org.codehaus.logger - INFO - Processing - run - 1843 - end run - - - 2003-12-16T03:16:41 - 1071562601051 - 9360 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:16:41 - 1071562601051 - 9361 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:17:11 - 1071562631239 - 9362 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4190183515 - - - - 2003-12-16T03:17:11 - 1071562631240 - 9363 - org.codehaus.logger - INFO - Processing - run - 1844 - start run - - - 2003-12-16T03:17:11 - 1071562631240 - 9364 - org.codehaus.logger - INFO - Processing - run - 1844 - end run - - - 2003-12-16T03:17:11 - 1071562631240 - 9365 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:17:11 - 1071562631240 - 9366 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:17:41 - 1071562661359 - 9367 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4220353532 - - - - 2003-12-16T03:17:41 - 1071562661360 - 9368 - org.codehaus.logger - INFO - Processing - run - 1845 - start run - - - 2003-12-16T03:17:41 - 1071562661360 - 9369 - org.codehaus.logger - INFO - Processing - run - 1845 - end run - - - 2003-12-16T03:17:41 - 1071562661361 - 9370 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:17:41 - 1071562661361 - 9371 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:18:11 - 1071562691559 - 9372 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4250513559 - - - - 2003-12-16T03:18:11 - 1071562691560 - 9373 - org.codehaus.logger - INFO - Processing - run - 1846 - start run - - - 2003-12-16T03:18:11 - 1071562691560 - 9374 - org.codehaus.logger - INFO - Processing - run - 1846 - end run - - - 2003-12-16T03:18:11 - 1071562691560 - 9375 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:18:12 - 1071562692020 - 9376 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:18:41 - 1071562721709 - 9377 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG4280663594 - - - - 2003-12-16T03:18:41 - 1071562721710 - 9378 - org.codehaus.logger - INFO - Processing - run - 1847 - start run - - - 2003-12-16T03:18:41 - 1071562721710 - 9379 - org.codehaus.logger - INFO - Processing - run - 1847 - end run - - - 2003-12-16T03:18:41 - 1071562721710 - 9380 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:18:41 - 1071562721710 - 9381 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:19:11 - 1071562751829 - 9382 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG15836304 - - - - 2003-12-16T03:19:11 - 1071562751830 - 9383 - org.codehaus.logger - INFO - Processing - run - 1848 - start run - - - 2003-12-16T03:19:11 - 1071562751830 - 9384 - org.codehaus.logger - INFO - Processing - run - 1848 - end run - - - 2003-12-16T03:19:11 - 1071562751831 - 9385 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:19:11 - 1071562751831 - 9386 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:19:42 - 1071562782009 - 9387 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG45986303 - - - - 2003-12-16T03:19:42 - 1071562782010 - 9388 - org.codehaus.logger - INFO - Processing - run - 1849 - start run - - - 2003-12-16T03:19:42 - 1071562782010 - 9389 - org.codehaus.logger - INFO - Processing - run - 1849 - end run - - - 2003-12-16T03:19:42 - 1071562782010 - 9390 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:19:42 - 1071562782011 - 9391 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:20:12 - 1071562812189 - 9392 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG76156377 - - - - 2003-12-16T03:20:12 - 1071562812190 - 9393 - org.codehaus.logger - INFO - Processing - run - 1850 - start run - - - 2003-12-16T03:20:12 - 1071562812190 - 9394 - org.codehaus.logger - INFO - Processing - run - 1850 - end run - - - 2003-12-16T03:20:12 - 1071562812190 - 9395 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:20:12 - 1071562812190 - 9396 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:20:42 - 1071562842309 - 9397 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG106336312 - - - - 2003-12-16T03:20:42 - 1071562842310 - 9398 - org.codehaus.logger - INFO - Processing - run - 1851 - start run - - - 2003-12-16T03:20:42 - 1071562842310 - 9399 - org.codehaus.logger - INFO - Processing - run - 1851 - end run - - - 2003-12-16T03:20:42 - 1071562842311 - 9400 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:20:42 - 1071562842311 - 9401 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:21:12 - 1071562872549 - 9402 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG136526331 - - - - 2003-12-16T03:21:12 - 1071562872551 - 9403 - org.codehaus.logger - INFO - Processing - run - 1852 - start run - - - 2003-12-16T03:21:12 - 1071562872551 - 9404 - org.codehaus.logger - INFO - Processing - run - 1852 - end run - - - 2003-12-16T03:21:12 - 1071562872551 - 9405 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:21:12 - 1071562872552 - 9406 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:21:42 - 1071562902669 - 9407 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG166666329 - - - - 2003-12-16T03:21:42 - 1071562902670 - 9408 - org.codehaus.logger - INFO - Processing - run - 1853 - start run - - - 2003-12-16T03:21:42 - 1071562902670 - 9409 - org.codehaus.logger - INFO - Processing - run - 1853 - end run - - - 2003-12-16T03:21:42 - 1071562902670 - 9410 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:21:42 - 1071562902671 - 9411 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:22:12 - 1071562932799 - 9412 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG196806386 - - - - 2003-12-16T03:22:12 - 1071562932800 - 9413 - org.codehaus.logger - INFO - Processing - run - 1854 - start run - - - 2003-12-16T03:22:13 - 1071562933180 - 9414 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:22:13 - 1071562933181 - 9415 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:22:13 - 1071562933181 - 9416 - org.codehaus.logger - INFO - Processing - run - 1854 - end run - - - 2003-12-16T03:22:42 - 1071562962939 - 9417 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG226956341 - - - - 2003-12-16T03:22:42 - 1071562962940 - 9418 - org.codehaus.logger - INFO - Processing - run - 1855 - start run - - - 2003-12-16T03:22:42 - 1071562962940 - 9419 - org.codehaus.logger - INFO - Processing - run - 1855 - end run - - - 2003-12-16T03:22:42 - 1071562962940 - 9420 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:22:42 - 1071562962941 - 9421 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:23:13 - 1071562993112 - 9422 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG257116344 - - - - 2003-12-16T03:23:13 - 1071562993112 - 9423 - org.codehaus.logger - INFO - Processing - run - 1856 - start run - - - 2003-12-16T03:23:13 - 1071562993113 - 9424 - org.codehaus.logger - INFO - Processing - run - 1856 - end run - - - 2003-12-16T03:23:13 - 1071562993113 - 9425 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:23:13 - 1071562993113 - 9426 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:23:43 - 1071563023239 - 9427 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG287266360 - - - - 2003-12-16T03:23:43 - 1071563023240 - 9428 - org.codehaus.logger - INFO - Processing - run - 1857 - start run - - - 2003-12-16T03:23:43 - 1071563023240 - 9429 - org.codehaus.logger - INFO - Processing - run - 1857 - end run - - - 2003-12-16T03:23:43 - 1071563023241 - 9430 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:23:43 - 1071563023241 - 9431 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:24:13 - 1071563053419 - 9432 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG317426372 - - - - 2003-12-16T03:24:13 - 1071563053421 - 9433 - org.codehaus.logger - INFO - Processing - run - 1858 - start run - - - 2003-12-16T03:24:13 - 1071563053421 - 9434 - org.codehaus.logger - INFO - Processing - run - 1858 - end run - - - 2003-12-16T03:24:13 - 1071563053421 - 9435 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:24:13 - 1071563053421 - 9436 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:24:43 - 1071563083550 - 9437 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG347576379 - - - - 2003-12-16T03:24:43 - 1071563083550 - 9438 - org.codehaus.logger - INFO - Processing - run - 1859 - start run - - - 2003-12-16T03:24:43 - 1071563083551 - 9439 - org.codehaus.logger - INFO - Processing - run - 1859 - end run - - - 2003-12-16T03:24:43 - 1071563083551 - 9440 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:24:43 - 1071563083551 - 9441 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:25:13 - 1071563113699 - 9442 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG377716403 - - - - 2003-12-16T03:25:13 - 1071563113700 - 9443 - org.codehaus.logger - INFO - Processing - run - 1860 - start run - - - 2003-12-16T03:25:13 - 1071563113700 - 9444 - org.codehaus.logger - INFO - Processing - run - 1860 - end run - - - 2003-12-16T03:25:13 - 1071563113700 - 9445 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:25:13 - 1071563113701 - 9446 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:25:43 - 1071563143879 - 9447 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG407866423 - - - - 2003-12-16T03:25:43 - 1071563143880 - 9448 - org.codehaus.logger - INFO - Processing - run - 1861 - start run - - - 2003-12-16T03:25:43 - 1071563143880 - 9449 - org.codehaus.logger - INFO - Processing - run - 1861 - end run - - - 2003-12-16T03:25:43 - 1071563143880 - 9450 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:25:43 - 1071563143881 - 9451 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:26:13 - 1071563173999 - 9452 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG438016461 - - - - 2003-12-16T03:26:14 - 1071563174000 - 9453 - org.codehaus.logger - INFO - Processing - run - 1862 - start run - - - 2003-12-16T03:26:14 - 1071563174331 - 9454 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:26:14 - 1071563174331 - 9455 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:26:14 - 1071563174331 - 9456 - org.codehaus.logger - INFO - Processing - run - 1862 - end run - - - 2003-12-16T03:26:44 - 1071563204199 - 9457 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG468176535 - - - - 2003-12-16T03:26:44 - 1071563204200 - 9458 - org.codehaus.logger - INFO - Processing - run - 1863 - start run - - - 2003-12-16T03:26:44 - 1071563204201 - 9459 - org.codehaus.logger - INFO - Processing - run - 1863 - end run - - - 2003-12-16T03:26:44 - 1071563204201 - 9460 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:26:44 - 1071563204202 - 9461 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:27:14 - 1071563234320 - 9462 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG498346470 - - - - 2003-12-16T03:27:14 - 1071563234321 - 9463 - org.codehaus.logger - INFO - Processing - run - 1864 - start run - - - 2003-12-16T03:27:14 - 1071563234321 - 9464 - org.codehaus.logger - INFO - Processing - run - 1864 - end run - - - 2003-12-16T03:27:14 - 1071563234322 - 9465 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:27:14 - 1071563234322 - 9466 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:27:44 - 1071563264519 - 9467 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG528496484 - - - - 2003-12-16T03:27:44 - 1071563264520 - 9468 - org.codehaus.logger - INFO - Processing - run - 1865 - start run - - - 2003-12-16T03:27:44 - 1071563264520 - 9469 - org.codehaus.logger - INFO - Processing - run - 1865 - end run - - - 2003-12-16T03:27:44 - 1071563264521 - 9470 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:27:44 - 1071563264521 - 9471 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:28:14 - 1071563294652 - 9472 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG558646507 - - - - 2003-12-16T03:28:14 - 1071563294653 - 9473 - org.codehaus.logger - INFO - Processing - run - 1866 - start run - - - 2003-12-16T03:28:14 - 1071563294654 - 9474 - org.codehaus.logger - INFO - Processing - run - 1866 - end run - - - 2003-12-16T03:28:14 - 1071563294654 - 9475 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:28:14 - 1071563294654 - 9476 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:28:44 - 1071563324790 - 9477 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG588796527 - - - - 2003-12-16T03:28:44 - 1071563324790 - 9478 - org.codehaus.logger - INFO - Processing - run - 1867 - start run - - - 2003-12-16T03:28:44 - 1071563324790 - 9479 - org.codehaus.logger - INFO - Processing - run - 1867 - end run - - - 2003-12-16T03:28:44 - 1071563324791 - 9480 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:28:44 - 1071563324791 - 9481 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:29:14 - 1071563354920 - 9482 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG618946552 - - - - 2003-12-16T03:29:14 - 1071563354920 - 9483 - org.codehaus.logger - INFO - Processing - run - 1868 - start run - - - 2003-12-16T03:29:14 - 1071563354921 - 9484 - org.codehaus.logger - INFO - Processing - run - 1868 - end run - - - 2003-12-16T03:29:14 - 1071563354921 - 9485 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:29:14 - 1071563354921 - 9486 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:29:29 - 1071563369420 - 9487 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PRIVMSG #test :howdy - - - - 2003-12-16T03:29:29 - 1071563369420 - 9488 - org.codehaus.logger - INFO - Processing - run - 1869 - start run - - - 2003-12-16T03:29:29 - 1071563369421 - 9489 - org.codehaus.logger - INFO - Processing - run - 1869 - end run - - - 2003-12-16T03:29:29 - 1071563369421 - 9490 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-16T03:29:29 - 1071563369421 - 9491 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:29:29 - 1071563369421 - 9492 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:29:29 - 1071563369701 - 9493 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:jason PRIVMSG #test :howdy - - - - 2003-12-16T03:29:29 - 1071563369701 - 9494 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-16T03:29:45 - 1071563385050 - 9495 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG649076577 - - - - 2003-12-16T03:29:45 - 1071563385050 - 9496 - org.codehaus.logger - INFO - Processing - run - 1870 - start run - - - 2003-12-16T03:29:45 - 1071563385051 - 9497 - org.codehaus.logger - INFO - Processing - run - 1870 - end run - - - 2003-12-16T03:29:45 - 1071563385051 - 9498 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:29:45 - 1071563385051 - 9499 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:29:48 - 1071563388250 - 9500 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PRIVMSG #test :i'm sure we can easily fix that - - - - 2003-12-16T03:29:48 - 1071563388250 - 9501 - org.codehaus.logger - INFO - Processing - run - 1871 - start run - - - 2003-12-16T03:29:48 - 1071563388251 - 9502 - org.codehaus.logger - INFO - Processing - run - 1871 - end run - - - 2003-12-16T03:29:48 - 1071563388251 - 9503 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-16T03:29:48 - 1071563388251 - 9504 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:jason PRIVMSG #test :i'm sure we can easily fix that - - - - 2003-12-16T03:29:48 - 1071563388251 - 9505 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-16T03:29:48 - 1071563388251 - 9506 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:29:48 - 1071563388251 - 9507 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:30:15 - 1071563415230 - 9508 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG679246602 - - - - 2003-12-16T03:30:15 - 1071563415230 - 9509 - org.codehaus.logger - INFO - Processing - run - 1872 - start run - - - 2003-12-16T03:30:15 - 1071563415230 - 9510 - org.codehaus.logger - INFO - Processing - run - 1872 - end run - - - 2003-12-16T03:30:15 - 1071563415231 - 9511 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:30:15 - 1071563415231 - 9512 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:30:45 - 1071563445370 - 9513 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG709396628 - - - - 2003-12-16T03:30:45 - 1071563445370 - 9514 - org.codehaus.logger - INFO - Processing - run - 1873 - start run - - - 2003-12-16T03:30:45 - 1071563445371 - 9515 - org.codehaus.logger - INFO - Processing - run - 1873 - end run - - - 2003-12-16T03:30:45 - 1071563445371 - 9516 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:30:45 - 1071563445371 - 9517 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:31:15 - 1071563475560 - 9518 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG739546654 - - - - 2003-12-16T03:31:15 - 1071563475560 - 9519 - org.codehaus.logger - INFO - Processing - run - 1874 - start run - - - 2003-12-16T03:31:15 - 1071563475561 - 9520 - org.codehaus.logger - INFO - Processing - run - 1874 - end run - - - 2003-12-16T03:31:15 - 1071563475561 - 9521 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:31:15 - 1071563475561 - 9522 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:31:45 - 1071563505680 - 9523 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG769706689 - - - - 2003-12-16T03:31:45 - 1071563505680 - 9524 - org.codehaus.logger - INFO - Processing - run - 1875 - start run - - - 2003-12-16T03:31:45 - 1071563505681 - 9525 - org.codehaus.logger - INFO - Processing - run - 1875 - end run - - - 2003-12-16T03:31:45 - 1071563505681 - 9526 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:31:45 - 1071563505681 - 9527 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:32:15 - 1071563535860 - 9528 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG799846742 - - - - 2003-12-16T03:32:15 - 1071563535866 - 9529 - org.codehaus.logger - INFO - Processing - run - 1876 - start run - - - 2003-12-16T03:32:15 - 1071563535866 - 9530 - org.codehaus.logger - INFO - Processing - run - 1876 - end run - - - 2003-12-16T03:32:15 - 1071563535866 - 9531 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:32:15 - 1071563535866 - 9532 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:32:46 - 1071563566020 - 9533 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG829996747 - - - - 2003-12-16T03:32:46 - 1071563566021 - 9534 - org.codehaus.logger - INFO - Processing - run - 1877 - start run - - - 2003-12-16T03:32:46 - 1071563566021 - 9535 - org.codehaus.logger - INFO - Processing - run - 1877 - end run - - - 2003-12-16T03:32:46 - 1071563566021 - 9536 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:32:46 - 1071563566022 - 9537 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:33:16 - 1071563596170 - 9538 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG860156777 - - - - 2003-12-16T03:33:16 - 1071563596171 - 9539 - org.codehaus.logger - INFO - Processing - run - 1878 - start run - - - 2003-12-16T03:33:16 - 1071563596171 - 9540 - org.codehaus.logger - INFO - Processing - run - 1878 - end run - - - 2003-12-16T03:33:16 - 1071563596172 - 9541 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:33:16 - 1071563596172 - 9542 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:33:46 - 1071563626320 - 9543 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG890306808 - - - - 2003-12-16T03:33:46 - 1071563626320 - 9544 - org.codehaus.logger - INFO - Processing - run - 1879 - start run - - - 2003-12-16T03:33:46 - 1071563626321 - 9545 - org.codehaus.logger - INFO - Processing - run - 1879 - end run - - - 2003-12-16T03:33:46 - 1071563626321 - 9546 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:33:46 - 1071563626321 - 9547 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:34:16 - 1071563656480 - 9548 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG920456840 - - - - 2003-12-16T03:34:16 - 1071563656480 - 9549 - org.codehaus.logger - INFO - Processing - run - 1880 - start run - - - 2003-12-16T03:34:16 - 1071563656481 - 9550 - org.codehaus.logger - INFO - Processing - run - 1880 - end run - - - 2003-12-16T03:34:16 - 1071563656481 - 9551 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:34:16 - 1071563656481 - 9552 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:34:46 - 1071563686630 - 9553 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG950606888 - - - - 2003-12-16T03:34:46 - 1071563686630 - 9554 - org.codehaus.logger - INFO - Processing - run - 1881 - start run - - - 2003-12-16T03:34:46 - 1071563686631 - 9555 - org.codehaus.logger - INFO - Processing - run - 1881 - end run - - - 2003-12-16T03:34:46 - 1071563686631 - 9556 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:34:46 - 1071563686631 - 9557 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:35:16 - 1071563716750 - 9558 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG980756906 - - - - 2003-12-16T03:35:16 - 1071563716750 - 9559 - org.codehaus.logger - INFO - Processing - run - 1882 - start run - - - 2003-12-16T03:35:16 - 1071563716751 - 9560 - org.codehaus.logger - INFO - Processing - run - 1882 - end run - - - 2003-12-16T03:35:16 - 1071563716751 - 9561 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:35:16 - 1071563716751 - 9562 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:35:46 - 1071563746940 - 9563 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1010937054 - - - - 2003-12-16T03:35:46 - 1071563746941 - 9564 - org.codehaus.logger - INFO - Processing - run - 1883 - start run - - - 2003-12-16T03:35:46 - 1071563746941 - 9565 - org.codehaus.logger - INFO - Processing - run - 1883 - end run - - - 2003-12-16T03:35:46 - 1071563746942 - 9566 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:35:46 - 1071563746942 - 9567 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:36:14 - 1071563774250 - 9568 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PRIVMSG #test :i am now sending mail to myself - - - - 2003-12-16T03:36:14 - 1071563774702 - 9569 - org.codehaus.logger - INFO - Processing - run - 1884 - start run - - - 2003-12-16T03:36:14 - 1071563774703 - 9570 - org.codehaus.logger - INFO - Processing - run - 1884 - end run - - - 2003-12-16T03:36:14 - 1071563774703 - 9571 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - end waiting - - - 2003-12-16T03:36:14 - 1071563774703 - 9572 - org.codehaus.logger - INFO - Talking - send - 25 - ------>:jason PRIVMSG #test :i am now sending mail to myself - - - - 2003-12-16T03:36:14 - 1071563774703 - 9573 - org.codehaus.logger - INFO - Talking - waitResponse - 25 - start waiting - - - 2003-12-16T03:36:14 - 1071563774703 - 9574 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:36:14 - 1071563774704 - 9575 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:36:17 - 1071563777100 - 9576 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1041097020 - - - - 2003-12-16T03:36:17 - 1071563777101 - 9577 - org.codehaus.logger - INFO - Processing - run - 1885 - start run - - - 2003-12-16T03:36:17 - 1071563777101 - 9578 - org.codehaus.logger - INFO - Processing - run - 1885 - end run - - - 2003-12-16T03:36:17 - 1071563777102 - 9579 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:36:17 - 1071563777102 - 9580 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:36:47 - 1071563807260 - 9581 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1071247145 - - - - 2003-12-16T03:36:47 - 1071563807261 - 9582 - org.codehaus.logger - INFO - Processing - run - 1886 - start run - - - 2003-12-16T03:36:47 - 1071563807261 - 9583 - org.codehaus.logger - INFO - Processing - run - 1886 - end run - - - 2003-12-16T03:36:47 - 1071563807261 - 9584 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:36:47 - 1071563807262 - 9585 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:37:17 - 1071563837370 - 9586 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1101387260 - - - - 2003-12-16T03:37:17 - 1071563837371 - 9587 - org.codehaus.logger - INFO - Processing - run - 1887 - start run - - - 2003-12-16T03:37:17 - 1071563837372 - 9588 - org.codehaus.logger - INFO - Processing - run - 1887 - end run - - - 2003-12-16T03:37:17 - 1071563837372 - 9589 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:37:17 - 1071563837372 - 9590 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:37:47 - 1071563867540 - 9591 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1131537432 - - - - 2003-12-16T03:37:47 - 1071563867541 - 9592 - org.codehaus.logger - INFO - Processing - run - 1888 - start run - - - 2003-12-16T03:37:47 - 1071563867542 - 9593 - org.codehaus.logger - INFO - Processing - run - 1888 - end run - - - 2003-12-16T03:37:47 - 1071563867542 - 9594 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:37:47 - 1071563867542 - 9595 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:38:17 - 1071563897661 - 9596 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1161687511 - - - - 2003-12-16T03:38:17 - 1071563897661 - 9597 - org.codehaus.logger - INFO - Processing - run - 1889 - start run - - - 2003-12-16T03:38:17 - 1071563897662 - 9598 - org.codehaus.logger - INFO - Processing - run - 1889 - end run - - - 2003-12-16T03:38:17 - 1071563897662 - 9599 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:38:17 - 1071563897662 - 9600 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:38:47 - 1071563927841 - 9601 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1191837625 - - - - 2003-12-16T03:38:47 - 1071563927842 - 9602 - org.codehaus.logger - INFO - Processing - run - 1890 - start run - - - 2003-12-16T03:38:47 - 1071563927842 - 9603 - org.codehaus.logger - INFO - Processing - run - 1890 - end run - - - 2003-12-16T03:38:47 - 1071563927842 - 9604 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:38:48 - 1071563928272 - 9605 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:39:17 - 1071563957971 - 9606 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1221978047 - - - - 2003-12-16T03:39:17 - 1071563957972 - 9607 - org.codehaus.logger - INFO - Processing - run - 1891 - start run - - - 2003-12-16T03:39:17 - 1071563957972 - 9608 - org.codehaus.logger - INFO - Processing - run - 1891 - end run - - - 2003-12-16T03:39:17 - 1071563957972 - 9609 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:39:17 - 1071563957972 - 9610 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:39:48 - 1071563988101 - 9611 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1252127871 - - - - 2003-12-16T03:39:48 - 1071563988102 - 9612 - org.codehaus.logger - INFO - Processing - run - 1892 - start run - - - 2003-12-16T03:39:48 - 1071563988102 - 9613 - org.codehaus.logger - INFO - Processing - run - 1892 - end run - - - 2003-12-16T03:39:48 - 1071563988102 - 9614 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:39:48 - 1071563988102 - 9615 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:40:18 - 1071564018301 - 9616 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1282287997 - - - - 2003-12-16T03:40:18 - 1071564018302 - 9617 - org.codehaus.logger - INFO - Processing - run - 1893 - start run - - - 2003-12-16T03:40:18 - 1071564018302 - 9618 - org.codehaus.logger - INFO - Processing - run - 1893 - end run - - - 2003-12-16T03:40:18 - 1071564018303 - 9619 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:40:18 - 1071564018303 - 9620 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:40:48 - 1071564048441 - 9621 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1312428122 - - - - 2003-12-16T03:40:48 - 1071564048442 - 9622 - org.codehaus.logger - INFO - Processing - run - 1894 - start run - - - 2003-12-16T03:40:48 - 1071564048442 - 9623 - org.codehaus.logger - INFO - Processing - run - 1894 - end run - - - 2003-12-16T03:40:48 - 1071564048442 - 9624 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:40:48 - 1071564048443 - 9625 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:41:18 - 1071564078541 - 9626 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1342568277 - - - - 2003-12-16T03:41:18 - 1071564078543 - 9627 - org.codehaus.logger - INFO - Processing - run - 1895 - start run - - - 2003-12-16T03:41:18 - 1071564078543 - 9628 - org.codehaus.logger - INFO - Processing - run - 1895 - end run - - - 2003-12-16T03:41:18 - 1071564078544 - 9629 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:41:18 - 1071564078544 - 9630 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:41:48 - 1071564108721 - 9631 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1372728783 - - - - 2003-12-16T03:41:48 - 1071564108722 - 9632 - org.codehaus.logger - INFO - Processing - run - 1896 - start run - - - 2003-12-16T03:41:48 - 1071564108722 - 9633 - org.codehaus.logger - INFO - Processing - run - 1896 - end run - - - 2003-12-16T03:41:48 - 1071564108723 - 9634 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:41:48 - 1071564108723 - 9635 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:42:18 - 1071564138871 - 9636 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1402868525 - - - - 2003-12-16T03:42:18 - 1071564138872 - 9637 - org.codehaus.logger - INFO - Processing - run - 1897 - start run - - - 2003-12-16T03:42:18 - 1071564138873 - 9638 - org.codehaus.logger - INFO - Processing - run - 1897 - end run - - - 2003-12-16T03:42:18 - 1071564138874 - 9639 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:42:18 - 1071564138874 - 9640 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - - 2003-12-16T03:42:49 - 1071564169042 - 9641 - org.codehaus.logger - INFO - Listening - receive - 10 - <----PING LAG1433018653 - - - - 2003-12-16T03:42:49 - 1071564169043 - 9642 - org.codehaus.logger - INFO - Processing - run - 1898 - start run - - - 2003-12-16T03:42:49 - 1071564169045 - 9643 - org.codehaus.logger - INFO - Processing - run - 1898 - end run - - - 2003-12-16T03:42:49 - 1071564169045 - 9644 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - end waiting - - - 2003-12-16T03:42:49 - 1071564169045 - 9645 - org.codehaus.logger - INFO - Talking - waitResponse - 11 - start waiting - - diff --git a/plexus-servers/ircd/log.xml.lck b/plexus-servers/ircd/log.xml.lck deleted file mode 100644 index e69de29bb..000000000 diff --git a/plexus-servers/ircd/maven.xml b/plexus-servers/ircd/maven.xml deleted file mode 100644 index bd302624f..000000000 --- a/plexus-servers/ircd/maven.xml +++ /dev/null @@ -1,8 +0,0 @@ - - diff --git a/plexus-servers/ircd/project.xml b/plexus-servers/ircd/project.xml deleted file mode 100644 index 7bb5b9df3..000000000 --- a/plexus-servers/ircd/project.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - ${maven.repo.local}/plexus/poms/plexus-server-1.0.pom - plexus-ircd - plexus-ircd - Plexus IRC Server - 1.0 - - - - - - - - - - - src/main - - - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/channel/Channel.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/channel/Channel.java deleted file mode 100644 index 7ab3495d1..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/channel/Channel.java +++ /dev/null @@ -1,732 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.channel; - -import org.codehaus.plexus.ircd.command.Privmsg; -import org.codehaus.plexus.ircd.exception.IRCException; -import org.codehaus.plexus.ircd.properties.Config; -import org.codehaus.plexus.ircd.user.HandleUser; -import org.codehaus.plexus.ircd.user.User; -import org.codehaus.plexus.ircd.utils.IRCString; -import org.codehaus.plexus.ircd.utils.Message; -import org.codehaus.plexus.ircd.utils.Replies; -import org.codehaus.plexus.ircd.utils.Utilities; - -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.Vector; -import java.util.regex.Pattern; - -public class Channel implements IRCString -{ - - private static String defaultTopic; - - static - { - defaultTopic = Config.getValue( "channel.default.topic", VOID ); - } - - private String topic = defaultTopic; - private String name; - private String password; - private ArrayList listBanMask = new ArrayList(); - private ArrayList listInvited = new ArrayList(); - private Hashtable userList = new Hashtable(); - private boolean typePrivate; - private boolean typeSecret; - private boolean typeIniviteOnly; - private boolean topicSettable = true; - private boolean typeClientInsideOnly; - private boolean typeModerated; - private int userLimit = Integer.MAX_VALUE; - - /** - * @param sOperatorName operator's name - * @param sName channel's name - */ - public Channel( String sOperatorName, String sName ) - { - name = sName; - userList.put( sOperatorName, new Rights( true ) ); - } - - /** - * to add a ban mask - * @param sBanMask the mask to add - */ - public void addBanMask( String sBanMask ) - { - if ( sBanMask != null && !sBanMask.equals( VOID ) ) - { - listBanMask.add( Utilities.replaceAll( sBanMask, STAR, DOT + STAR ) ); - } - } - - /** - * to add a guest - * @param sNickName the nickname of the guest to add - * @throws IRCException ERR_USERONCHANNEL's exception if the user is already on channel - */ - public void addGuest( String sNickName ) throws IRCException - { - if ( isUserOn( sNickName ) ) - { - throw new IRCException( Replies.ERR_USERONCHANNEL, new String[]{sNickName, getName()} ); - } - else - { - listInvited.add( sNickName ); - } - } - - /** - * to add a user on the list - */ - public void addUser( String sNickName ) - { - if ( userList.get( sNickName ) == null ) - { - userList.put( sNickName, new Rights() ); - } - } - - /** - * to know if the user can enter into the channel - * @param user the user to check - * @param sPassword the password given by the specific user - * @throws IRCException ERR_BANNEDFROMCHAN if the user is banned - * ERR_BADCHANNELKEY if the password given is not correct - * ERR_CHANNELISFULL if the user limit is already reached - * ERR_INVITEONLYCHAN if the channel is an invite only channel and the user is not a guest - */ - public void checkUser( User user, String sPassword ) throws IRCException - { - String[] sAllMasks = getBanMasks(); - if ( user != null && sAllMasks != null ) - { - for ( int i = 0; i < sAllMasks.length; i++ ) - { - if ( Pattern.matches( sAllMasks[i], user.getUserFullName() ) ) - { - throw new IRCException( Replies.ERR_BANNEDFROMCHAN, new String[]{getName()} ); - } - } - } - if ( getPassword() != null && !getPassword().equals( sPassword ) ) - { - throw new IRCException( Replies.ERR_BADCHANNELKEY, new String[]{getName()} ); - } - if ( getUserLimit() <= getUserNumber() ) - { - throw new IRCException( Replies.ERR_CHANNELISFULL, new String[]{getName()} ); - } - if ( isTypeIniviteOnly() ) - { - if ( isGuest( user ) ) - { - removeGuest( user.getNickName() ); - } - else - { - throw new IRCException( Replies.ERR_INVITEONLYCHAN, new String[]{getName()} ); - } - } - } - - /** - * to know if the user is on the channel - * @param sNickName the nickname of the user to check - * @return true if the user is on the channel - * @throws IRCException ERR_NOTONCHANNEL if the user is not on the channel - */ - public boolean checkUserOn( String sNickName ) throws IRCException - { - return ( getRights( sNickName ) != null ); - } - - /** - * to display all the modes of the channel - */ - public String displayModes() - { - StringBuffer sb = new StringBuffer( 100 ); - sb.append( PLUS_CHAR ); - if ( isTypePrivate() ) - { - sb.append( CHANNEL_PRIVATE_CHAR ); - } - if ( isTypeSecret() ) - { - sb.append( CHANNEL_SECRET_CHAR ); - } - if ( isTypeIniviteOnly() ) - { - sb.append( CHANNEL_INVITE_ONLY_CHAR ); - } - if ( !isTopicSettable() ) - { - sb.append( CHANNEL_TOPIC_SETTABLE_CHAR ); - } - if ( isTypeClientInsideOnly() ) - { - sb.append( CHANNEL_CLIENT_INSIDE_ONLY_CHAR ); - } - if ( isTypeModerated() ) - { - sb.append( CHANNEL_MODERATED_CHAR ); - } - if ( getUserLimit() != Integer.MAX_VALUE ) - { - sb.append( CHANNEL_USER_LIMIT + SPACE + getUserLimit() ); - } - if ( getPassword() != null ) - { - sb.append( CHANNEL_PASSWORD + SPACE + getPassword() ); - } - return sb.toString(); - } - - /** - * to get all the existing ban masks - */ - public String[] getBanMasks() - { - String[] sAllMasks = new String[listBanMask.size()]; - return (String[]) listBanMask.toArray( sAllMasks ); - } - - /** - * to get the displayed nickname - * @param sNickName the asked nickname - */ - private String getDisplayedValue( String sNickName ) - { - try - { - Rights rights = getRights( sNickName ); - if ( rights.isOperator() ) - { - return CHANNEL_IS_OPERATOR + sNickName; - } - else if ( rights.isAbleToSpeakIfModerated() ) - { - return CHANNEL_CAN_SPEAK_ON_MODERATED + sNickName; - } - else - { - return sNickName; - } - } - catch ( IRCException e ) - { - } - return VOID; - } - - /** - * to get the name of the channel - */ - public String getName() - { - return name; - } - - /** - * to get the current password - */ - public String getPassword() - { - return password; - } - - /** - * to get the rights on the channel of a specific user - * @param sNickName the asked nickname - * @return the rights if the user is on the channel - * @throws IRCException ERR_NOTONCHANNEL if the user is not on the channel - */ - public Rights getRights( String sNickName ) throws IRCException - { - if ( sNickName != null ) - { - Rights rights = (Rights) userList.get( sNickName ); - if ( rights != null ) - { - return rights; - } - } - throw new IRCException( Replies.ERR_NOTONCHANNEL, new String[]{getName()} ); - } - - /** - * to get the topic of the channel - */ - public String getTopic() - { - return topic; - } - - /** - * to get the limit of user accepted in the channel - */ - public int getUserLimit() - { - return userLimit; - } - - /** - * to get the list of users splited to be sent through IRC's messages - */ - public String[] getUserList() - { - Vector vAllUsers = new Vector(); - String sCurrentUser; - StringBuffer buffer = new StringBuffer( Message.getSizeLimit() + 20 ); - for ( Enumeration enum = userList.keys(); enum.hasMoreElements(); ) - { - sCurrentUser = getDisplayedValue( (String) enum.nextElement() ); - if ( !sCurrentUser.equals( VOID ) ) - { - buffer.append( sCurrentUser + SPACE ); - } - if ( buffer.length() > Message.getSizeLimit() ) - { - vAllUsers.addElement( buffer.toString() ); - buffer = new StringBuffer( Message.getSizeLimit() + 20 ); - } - } - if ( buffer.length() > 0 ) - { - vAllUsers.addElement( buffer.toString() ); - } - String[] sUsers = new String[vAllUsers.size()]; - return (String[]) vAllUsers.toArray( sUsers ); - } - - /** - * to get the number of users - */ - public int getUserNumber() - { - return userList.size(); - } - - /** - * to get all the users of the channel - */ - public User[] getUsers() - { - Vector vAllUser = new Vector(); - for ( Enumeration enum = userList.keys(); enum.hasMoreElements(); ) - { - try - { - vAllUser.addElement( HandleUser.getUser( (String) enum.nextElement() ) ); - } - catch ( IRCException e ) - { - } - } - User[] users = new User[vAllUser.size()]; - return (User[]) vAllUser.toArray( users ); - } - - /** - * to get the number of visible users - */ - public int getUserVisibleNumber() - { - User[] users = getUsers(); - int iCount = 0; - if ( users != null ) - { - for ( int i = 0; i < users.length; i++ ) - { - if ( !users[i].isInvisible() ) - { - iCount++; - } - } - } - return iCount; - } - - /** - * to know if the user is allowed to change the topic of the channel - * @param user the user to check - * @return true if the user can change the topic - * @throws IRCException ERR_CHANOPRIVSNEEDED if the user is not an operator - */ - public boolean isAllowedToChangeTopic( User user ) throws IRCException - { - if ( isTopicSettable() ) - { - return true; - } - else - { - return isOperator( user ); - } - } - - /** - * to know if the user is allowed to speak on the channel - * @param user the user to check - * @return true if the user can speak - * @throws IRCException ERR_CANNOTSENDTOCHAN if the user can not speak - */ - public boolean isAllowedToSpeak( User user ) throws IRCException - { - try - { - Rights rights = getRights( user.getNickName() ); - if ( rights.isOperator() || !isTypeModerated() || rights.isAbleToSpeakIfModerated() ) - { - return true; - } - } - catch ( IRCException e ) - { - if ( !isTypeClientInsideOnly() ) - { - return true; - } - } - throw new IRCException( Replies.ERR_CANNOTSENDTOCHAN, new String[]{getName()} ); - } - - /** - * to know if a specific user is a guest of the channel - * @param user the user to check - * @return true if the user is in the list false otherwise - */ - public boolean isGuest( User user ) - { - if ( user != null ) - { - return listInvited.indexOf( user.getNickName() ) != -1; - } - return false; - } - - /** - * to know if the user is an operator or not - * @param user the user to check - * @return true if the user is an operator - * @throws IRCException ERR_CHANOPRIVSNEEDED if the user is not an operator - */ - public boolean isOperator( User user ) throws IRCException - { - Rights rights = getRights( user.getNickName() ); - if ( rights.isOperator() ) - { - return true; - } - else - { - throw new IRCException( Replies.ERR_CHANOPRIVSNEEDED, new String[]{getName()} ); - } - } - - /** - * to know if it's on topic settable mode or not - */ - public boolean isTopicSettable() - { - return topicSettable; - } - - /** - * to know if it's on client inside only mode or not - */ - public boolean isTypeClientInsideOnly() - { - return typeClientInsideOnly; - } - - /** - * to know if it's on invite only mode or not - */ - public boolean isTypeIniviteOnly() - { - return typeIniviteOnly; - } - - /** - * to know if it's on moderated mode or not - */ - public boolean isTypeModerated() - { - return typeModerated; - } - - /** - * to know if it's on private mode or not - */ - public boolean isTypePrivate() - { - return typePrivate; - } - - /** - * to know if it's on secret mode or not - */ - public boolean isTypeSecret() - { - return typeSecret; - } - - /** - * to know if the user is on the channel - * @param sNickName the nickname of the user to check - * @return true if the user is on the channel false otherwise - */ - public boolean isUserOn( String sNickName ) - { - try - { - return ( getRights( sNickName ) != null ); - } - catch ( IRCException e ) - { - } - return false; - } - - /** - * to remove a ban mask - * @param sBanMask the ban mask to remove - */ - public void removeBanMask( String sBanMask ) - { - if ( sBanMask != null && !sBanMask.equals( VOID ) ) - { - listBanMask.remove( Utilities.replaceAll( sBanMask, STAR, DOT + STAR ) ); - } - } - - /** - * to remove a guest from the list - * @param sNickName the nickname of the guest to remove - */ - public void removeGuest( String sNickName ) - { - listInvited.remove( sNickName ); - } - - /** - * to remove the password - * @param sPwd the last password of the channel - */ - public void removePassword( String sPwd ) - { - if ( getPassword() != null && getPassword().equals( sPwd ) ) - { - setPassword( null ); - } - } - - /** - * to remove a user from the list - */ - public void removeUser( String sNickName ) - { - if ( userList.get( sNickName ) != null ) - { - userList.remove( sNickName ); - } - } - - /** - * to remove the user limit - */ - public void removeUserLimit() - { - setUserLimit( Integer.MAX_VALUE ); - } - - /** - * to rename a user in the list of users - * @param sOldNickName the old nickname - * @param sNewNickName the new nickname - */ - public void rename( String sOldNickName, String sNewNickName ) - { - if ( sNewNickName != null && !sNewNickName.equals( VOID ) && sOldNickName != null && !sOldNickName.equals( VOID ) ) - { - Object object = userList.get( sOldNickName ); - if ( object != null ) - { - userList.put( sNewNickName, object ); - userList.remove( sOldNickName ); - } - } - } - - /** - * to send a private message - * @param sNickName the nickname of the user who sends the message - * @param sMessage message's trailing - * @throws IRCException ERR_NOTEXTTOSEND if the message's trailing is empty - */ - public void sendMessage( String sNickName, String sMessage ) throws IRCException - { - sendMessage( sNickName, sNickName, new Privmsg().getName(), getName(), sMessage ); - } - - /** - * to send a message to all the users of the channel - * @param sPrefix message's prefix - * @param sCommand message's command - * @param sMiddle message's middle - * @param sMessage message's trailing - * @throws IRCException ERR_NOTEXTTOSEND if the message's trailing is empty - */ - public void sendMessage( String sPrefix, String sCommand, String sMiddle, String sMessage ) throws IRCException - { - sendMessage( null, sPrefix, sCommand, sMiddle, sMessage ); - } - - /** - * to send a message to all the users of the channel - * @param sNickName the nickname of the user who sends the message - * @param sPrefix message's prefix - * @param sCommand message's command - * @param sMiddle message's middle - * @param sMessage message's trailing - * @throws IRCException ERR_NOTEXTTOSEND if the message's trailing is empty - */ - public void sendMessage( String sNickName, String sPrefix, String sCommand, String sMiddle, String sMessage ) throws IRCException - { - User[] users = getUsers(); - if ( users == null ) - { - return; - } - if ( sMessage == null || sMessage.equals( VOID ) ) - { - throw new IRCException( Replies.ERR_NOTEXTTOSEND, new String[]{} ); - } - for ( int i = 0; i < users.length; i++ ) - { - User user = users[i]; - if ( ( sNickName == null || sNickName.equals( VOID ) || !sNickName.equals( user.getNickName() ) ) && - sPrefix != null && sCommand != null && sMiddle != null ) - { - user.addResponses( Message.createSingleMessage( new Message( sPrefix, VOID, sCommand, sMiddle, sMessage ) ) ); - } - } - } - - /** - * to permit or not a user to speak if the channel is on a moderated mode - * @param sNickName the nickname of the user - * @param bCanSpeakModeratedChannel permit or not - * @throws IRCException ERR_NOTONCHANNEL if the user is not on the channel - */ - public void setCanSpeakModeratedChannel( String sNickName, boolean bCanSpeakModeratedChannel ) throws IRCException - { - Rights rights = getRights( sNickName ); - rights.setAbleToSpeakIfModerated( bCanSpeakModeratedChannel ); - userList.put( sNickName, rights ); - } - - /** - * to set the operator's status to a specific user - * @param sNickName the nickname of the user - * @param isOperator give or not the status - * @throws IRCException ERR_NOTONCHANNEL if the user is not on the channel - */ - public void setIsOperator( String sNickName, boolean isOperator ) throws IRCException - { - Rights rights = getRights( sNickName ); - rights.setOperator( isOperator ); - userList.put( sNickName, rights ); - } - - /** - * to set the name of the channel - */ - public void setName( String name ) - { - this.name = name; - } - - /** - * to set the password - */ - public void setPassword( String password ) - { - this.password = password; - } - - /** - * to set the topic of the channel - */ - public void setTopic( String topic ) - { - this.topic = topic; - } - - /** - * to set the topic settable mode known as 't' - */ - public void setTopicSettable( boolean topicSettable ) - { - this.topicSettable = topicSettable; - } - - /** - * to set the "client inside only"'s mode known as 'n' - */ - public void setTypeClientInsideOnly( boolean isClientInsideOnly ) - { - this.typeClientInsideOnly = isClientInsideOnly; - } - - /** - * to set the "invite only"'s mode known as 'i' - */ - public void setTypeIniviteOnly( boolean typeIniviteOnly ) - { - this.typeIniviteOnly = typeIniviteOnly; - } - - /** - * to set the modarated's mode known as 'm' - */ - public void setTypeModerated( boolean typeModerated ) - { - this.typeModerated = typeModerated; - } - - /** - * to set the private's mode known as 'p' - */ - public void setTypePrivate( boolean typePrivate ) - { - this.typePrivate = typePrivate; - } - - /** - * to set the secret's mode known as 's' - */ - public void setTypeSecret( boolean typeSecret ) - { - this.typeSecret = typeSecret; - } - - /** - * to set the limit of users known as 'l' - * @param userLimit the limit of users accepted in the channel - */ - public void setUserLimit( int userLimit ) - { - this.userLimit = userLimit; - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/channel/HandleChannel.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/channel/HandleChannel.java deleted file mode 100644 index 3911503e3..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/channel/HandleChannel.java +++ /dev/null @@ -1,378 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.channel; - -import org.codehaus.plexus.ircd.command.Join; -import org.codehaus.plexus.ircd.command.Mode; -import org.codehaus.plexus.ircd.command.Nick; -import org.codehaus.plexus.ircd.exception.FatalException; -import org.codehaus.plexus.ircd.exception.IRCException; -import org.codehaus.plexus.ircd.token.MiddleToken; -import org.codehaus.plexus.ircd.token.ModeToken; -import org.codehaus.plexus.ircd.token.UserToken; -import org.codehaus.plexus.ircd.user.User; -import org.codehaus.plexus.ircd.utils.IRCString; -import org.codehaus.plexus.ircd.utils.Replies; - -import java.util.Enumeration; -import java.util.Hashtable; - -public class HandleChannel implements IRCString -{ - - private static Hashtable _hAllChannels = new Hashtable(); - - /** - * to add a user on a specific channel. If the channel exists the user is just added else - * the channel is created and the user is the operator - * @param user the user to add - * @param sNameChannel the name of the channel - * @throws IRCException ERR_NONICKNAMEGIVEN the channel's name is empty - * @throws FatalException if the channel did not be created - */ - public synchronized static void addUser( User user, String sNameChannel ) throws IRCException, FatalException - { - if ( sNameChannel != null && user != null ) - { - Channel channel = null; - try - { - channel = getChannel( sNameChannel ); - } - catch ( IRCException e ) - { - } - if ( channel == null ) - { - channel = new Channel( user.getNickName(), sNameChannel ); - } - else - { - channel.addUser( user.getNickName() ); - } - user.addChannel( sNameChannel ); - udateChannel( channel ); - channel.sendMessage( user.getUserFullName(), new Join().getName(), VOID, sNameChannel ); - } - } - - /** - * to change a single mode of a specific channel - * @param bIsAddMode to tell if the mode has to be added or not - * @param mode the resuested mode - * @param channel the channel which has to be changed - * @param mParams the given parameters - * @param index the index of the next parameter - * @return the index of the next parameter - * @throws IRCException ERR_NEEDMOREPARAMS if not enough parameter has been given - * ERR_UNKNOWNMODE if the resuested mode is unkown - */ - private static int changeMode( boolean bIsAddMode, char mode, Channel channel, MiddleToken[] mParams, int index ) throws IRCException - { - if ( mode != NULL_CHAR && channel != null ) - { - switch ( mode ) - { - case CHANNEL_OPERATOR_CHAR: - { - String value = getMiddleValue( mParams, index, bIsAddMode, mode ); - UserToken userToken = (UserToken) UserToken.getToken( value ); - channel.setIsOperator( userToken.getUserName(), bIsAddMode ); - index++; - break; - } - case CHANNEL_PRIVATE_CHAR: - { - channel.setTypePrivate( bIsAddMode ); - if ( channel.isTypeSecret() ) - { - channel.setTypeSecret( false ); - } - break; - } - case CHANNEL_SECRET_CHAR: - { - channel.setTypeSecret( bIsAddMode ); - if ( channel.isTypePrivate() ) - { - channel.setTypePrivate( false ); - } - break; - } - case CHANNEL_INVITE_ONLY_CHAR: - { - channel.setTypeIniviteOnly( bIsAddMode ); - break; - } - case CHANNEL_TOPIC_SETTABLE_CHAR: - { - channel.setTopicSettable( !bIsAddMode ); - break; - } - case CHANNEL_CLIENT_INSIDE_ONLY_CHAR: - { - channel.setTypeClientInsideOnly( bIsAddMode ); - break; - } - case CHANNEL_MODERATED_CHAR: - { - channel.setTypeModerated( bIsAddMode ); - break; - } - case CHANNEL_USER_LIMIT_CHAR: - { - if ( bIsAddMode ) - { - String sParam = getMiddleValue( mParams, index, bIsAddMode, mode ); - try - { - channel.setUserLimit( Integer.parseInt( sParam ) ); - index++; - } - catch ( NumberFormatException e ) - { - } - } - else - { - channel.removeUserLimit(); - } - break; - } - case CHANNEL_BAN_MASK_CHAR: - { - String sParam = getMiddleValue( mParams, index, bIsAddMode, mode ); - if ( bIsAddMode ) - { - channel.addBanMask( sParam ); - } - else - { - channel.removeBanMask( sParam ); - } - index++; - break; - } - case CHANNEL_SPEAK_ON_MODERATED_CHAR: - { - String sParam = getMiddleValue( mParams, index, bIsAddMode, mode ); - UserToken userToken = (UserToken) UserToken.getToken( sParam ); - channel.setCanSpeakModeratedChannel( userToken.getUserName(), bIsAddMode ); - index++; - break; - } - case CHANNEL_PASSWORD_CHAR: - { - String sParam = getMiddleValue( mParams, index, bIsAddMode, mode ); - if ( bIsAddMode ) - { - channel.setPassword( sParam ); - } - else - { - channel.removePassword( sParam ); - } - index++; - break; - } - default : - { - throw new IRCException( Replies.ERR_UNKNOWNMODE, new String[]{Character.toString( mode )} ); - } - } - try - { - udateChannel( channel ); - } - catch ( FatalException e ) - { - } - } - return index; - } - - /** - * to change several modes of a specific channel - * @param user the user who preforms modification - * @param sChannelName the name of the channel to modify - * @param modeToken the token corresponding to the requested modes - * @param mParams the given parameters - * @throws IRCException ERR_NEEDMOREPARAMS if not enough parameter has been given - * ERR_UNKNOWNMODE if the resuested mode is unkown - */ - public static void changeMode( User user, String sChannelName, ModeToken modeToken, MiddleToken[] mParams ) throws IRCException - { - Channel channel = getChannel( sChannelName ); - if ( channel != null && modeToken != null && channel.isOperator( user ) ) - { - int index = 2; - index = changeMode( modeToken.getAddMode(), modeToken.getFirstMode(), channel, mParams, index ); - index = changeMode( modeToken.getAddMode(), modeToken.getSecondMode(), channel, mParams, index ); - index = changeMode( modeToken.getAddMode(), modeToken.getThirdMode(), channel, mParams, index ); - } - } - - /** - * to delete a channel from the list - * @param sName the name of the channel to delele - */ - public synchronized static void deleteChannel( String sName ) - { - if ( sName != null ) - { - _hAllChannels.remove( sName ); - } - } - - /** - * to get the list of existing channel - */ - public synchronized static Enumeration getAllChannels() - { - return _hAllChannels.elements(); - } - - /** - * to get a channel from the list - * @param sName the name of the channel asked - * @return the channel if it exists - * @throws IRCException ERR_NOSUCHCHANNEL if the channel does not exist - */ - public synchronized static Channel getChannel( String sName ) throws IRCException - { - if ( sName != null ) - { - Channel channel = (Channel) _hAllChannels.get( sName ); - if ( channel != null ) - { - return channel; - } - } - throw new IRCException( Replies.ERR_NOSUCHCHANNEL, new String[]{sName} ); - } - - /** - * to get a specific parameter from the given index - * @param mParams all the given parameters - * @param index the index of the requested parameter - * @param bIsAddMode to tell if the mode has to be added or not - * @param mode the resuested mode - * @return the requested parameter - * @throws IRCException ERR_NEEDMOREPARAMS if not enough parameter has been given - */ - private static String getMiddleValue( MiddleToken[] mParams, int index, boolean bIsAddMode, char mode ) throws IRCException - { - if ( mParams != null && mParams.length > index ) - { - MiddleToken param = mParams[index]; - if ( param != null ) - { - String middleValue = param.getMiddleValue(); - if ( middleValue != null && !middleValue.equals( VOID ) ) - { - return middleValue; - } - } - } - throw new IRCException( Replies.ERR_NEEDMOREPARAMS, new String[]{new Mode().getName(), Boolean.toString( bIsAddMode ), Character.toString( mode )} ); - } - - /** - * to remove a user from a channel and if needed to send a message to the other members - * of the channel - * @param user the user to remove - * @param sNameChannel the name of the channel - * @param message tells if a message has to be send - * @param sPrefix message's prefix - * @param sCommand message's command - * @param sMiddle message's middle - * @param sMessage message's trailing - * @throws IRCException ERR_NOSUCHCHANNEL if the channel does not exist - * ERR_NOTEXTTOSEND if the message's trailing is empty - * ERR_NONICKNAMEGIVEN if the user has no nickname - * ERR_NOTONCHANNEL if the user is not on the channel - */ - public synchronized static void removeUser( User user, String sNameChannel, boolean message, String sPrefix, String sCommand, String sMiddle, String sMessage ) throws IRCException - { - Channel channel = getChannel( sNameChannel ); - if ( channel != null && user != null ) - { - if ( channel.isUserOn( user.getNickName() ) ) - { - if ( message ) - { - channel.sendMessage( sPrefix, sCommand, sMiddle, sMessage ); - } - channel.removeUser( user.getNickName() ); - user.removeChannel( sNameChannel ); - if ( channel.getUserNumber() != 0 ) - { - try - { - udateChannel( channel ); - } - catch ( FatalException e ) - { - } - } - else - { - deleteChannel( sNameChannel ); - } - } - else - { - throw new IRCException( Replies.ERR_NOTONCHANNEL, new String[]{sNameChannel} ); - } - } - } - - /** - * to rename a user in a specific channel and to notify the members - * @param sOldNickName the old nickname of the user - * @param sNewNickName the new nickname of the user - * @param sNameChannel the name of the channel - * @throws IRCException ERR_NOSUCHCHANNEL if the channel does not exist - */ - public synchronized static void renameUser( String sOldNickName, String sNewNickName, String sNameChannel ) throws IRCException - { - if ( sOldNickName != null && !sOldNickName.equals( VOID ) && sNewNickName != null && !sNewNickName.equals( VOID ) ) - { - Channel channel = getChannel( sNameChannel ); - if ( channel.isUserOn( sOldNickName ) ) - { - channel.rename( sOldNickName, sNewNickName ); - channel.sendMessage( sOldNickName, new Nick().getName(), VOID, sNewNickName ); - } - } - } - - /** - * to put the channel in the list - * @param channel the channel to insert - * @throws IRCException ERR_NONICKNAMEGIVEN if the channel has no name - * @throws FatalException if the channel is null - */ - public synchronized static void udateChannel( Channel channel ) throws IRCException, FatalException - { - if ( channel == null ) - { - throw new FatalException( "The channel object is null !!" ); - } - else - { - String sName = channel.getName(); - if ( sName == null || sName.equals( VOID ) ) - { - throw new IRCException( Replies.ERR_NONICKNAMEGIVEN ); - } - else - { - _hAllChannels.put( sName, channel ); - } - } - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/channel/Rights.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/channel/Rights.java deleted file mode 100644 index 51fa6a05a..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/channel/Rights.java +++ /dev/null @@ -1,60 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.channel; - -public class Rights -{ - - private boolean operator; - private boolean ableToSpeakIfModerated; - - /** - * to give the default rights - */ - public Rights() - { - } - - /** - * @param operator to give or not the operator's rights - */ - public Rights( boolean operator ) - { - this.operator = operator; - } - - /** - * to know if the rights permit to speak on a moderated channel - */ - public boolean isAbleToSpeakIfModerated() - { - return ableToSpeakIfModerated; - } - - /** - * to know if it's an operator's rights - */ - public boolean isOperator() - { - return operator; - } - - /** - * to permit or not to speak on a moderated channel - */ - public void setAbleToSpeakIfModerated( boolean ableToSpeakIfModerated ) - { - this.ableToSpeakIfModerated = ableToSpeakIfModerated; - } - - /** - * to set the operator's rights - */ - public void setOperator( boolean operator ) - { - this.operator = operator; - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Away.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Away.java deleted file mode 100644 index 4fe91c1b4..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Away.java +++ /dev/null @@ -1,74 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.command; - -import org.codehaus.plexus.ircd.exception.IRCException; -import org.codehaus.plexus.ircd.token.ParamsToken; -import org.codehaus.plexus.ircd.user.HandleUser; -import org.codehaus.plexus.ircd.utils.Message; - -import org.codehaus.plexus.ircd.user.User; - -public class Away extends Command -{ - - private static final Settings settings = new Settings(); - - /** - * to execute the Away's command - * @param user the user who sends the command - * @return the list of message to send back to the sender - */ - public Message[] exec( User user ) - { - ParamsToken paramsToken = getRequestMessage().getParamsToken(); - String sMessage = null; - if ( paramsToken != null ) - { - if ( paramsToken.getTrailingToken() != null ) - { - sMessage = paramsToken.getTrailingToken().toString(); - } - else if ( paramsToken.getMiddleTokens() != null && paramsToken.getMiddleTokens().length > 0 ) - { - sMessage = paramsToken.getMiddleTokens()[0].toString(); - } - } - if ( user != null ) - { - if ( sMessage == null ) - { - try - { - HandleUser.removeAwayState( user.getNickName() ); - } - catch ( IRCException e ) - { - } - } - else - { - try - { - HandleUser.setAwayState( user.getNickName(), sMessage ); - } - catch ( IRCException e ) - { - } - } - } - return null; - } - - /** - * to get the settings of Away's command - */ - protected Settings getSettings() - { - return settings; - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Command.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Command.java deleted file mode 100644 index bf33543db..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Command.java +++ /dev/null @@ -1,110 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.command; - -import org.codehaus.plexus.ircd.properties.Config; -import org.codehaus.plexus.ircd.token.MiddleToken; -import org.codehaus.plexus.ircd.utils.IRCString; -import org.codehaus.plexus.ircd.utils.Message; -import org.codehaus.plexus.ircd.utils.Replies; - -import org.codehaus.plexus.ircd.user.User; - -public abstract class Command implements IRCString -{ - - private static final String packageName = Config.getValue( "command.package.name", "org.codehaus.plexus.ircd.command" ); - - private Message requestMessage; - - /** - * to execute a specific command - * @param user the user who sends the command - * @return the list of message to send back to the sender - */ - protected abstract Message[] exec( User user ); - - /** - * to execute a specific command with the given settings - * @param user the user who sends the command - * @return the list of message to send back to the sender - */ - public Message[] execute( User user ) - { - Settings commandSettings = getSettings(); - if ( !commandSettings.isParamNeeded() ) - { - return exec( user ); - } - MiddleToken[] middleTokens = null; - if ( requestMessage.getParamsToken() != null ) - { - middleTokens = requestMessage.getParamsToken().getMiddleTokens(); - } - else if ( commandSettings.isMiddleTokenNeeded() ) - { - return Message.createSingleMessage( new Message( Replies.ERR_NEEDMOREPARAMS, new String[]{getName()} ) ); - } - if ( !commandSettings.isMiddleTokenNeeded() ) - { - return exec( user ); - } - if ( middleTokens != null ) - { - if ( middleTokens.length < commandSettings.getMinimumMiddleTokenNeeded() ) - { - return Message.createSingleMessage( new Message( Replies.ERR_NEEDMOREPARAMS, new String[]{getName()} ) ); - } - if ( middleTokens.length > commandSettings.getMaximumMiddleTokenNeeded() ) - { - return null; - } - } - else - { - return Message.createSingleMessage( new Message( Replies.ERR_NEEDMOREPARAMS, new String[]{getName()} ) ); - } - return exec( user ); - } - - /** - * to get the name of the command - */ - public String getName() - { - return getClass().getName().substring( getPackageName().length() + 1 ).toUpperCase(); - } - - /** - * to get the package's name of the command's module - */ - protected static String getPackageName() - { - return packageName; - } - - /** - * to get the request message - */ - protected Message getRequestMessage() - { - return requestMessage; - } - - /** - * to get the settings of the command - */ - protected abstract Settings getSettings(); - - /** - * to set the request message - */ - protected void setRequestMessage( Message requestMessage ) - { - this.requestMessage = requestMessage; - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/CommandHandler.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/CommandHandler.java deleted file mode 100644 index d4b2e51e5..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/CommandHandler.java +++ /dev/null @@ -1,70 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.command; - -import org.codehaus.plexus.ircd.exception.FatalException; -import org.codehaus.plexus.ircd.exception.IRCException; -import org.codehaus.plexus.ircd.token.CommandToken; -import org.codehaus.plexus.ircd.utils.IRCString; -import org.codehaus.plexus.ircd.utils.Message; -import org.codehaus.plexus.ircd.utils.Replies; - -public class CommandHandler implements IRCString -{ - - /** - * to get a command from the request's message - * @param message the request's message - * @return the asked command - * @throws IRCException ERR_UNKNOWNCOMMAND if the command is unknown - * @throws FatalException if an undesirable exception has been thrown - */ - public static Command getInstance( Message message ) throws IRCException, FatalException - { - String command = VOID; - - try - { - CommandToken commandToken = message.getCommandToken(); - - command = commandToken.getLetterValue(); - - command = command.substring( 0, 1 ).toUpperCase() + command.substring( 1, command.length() ).toLowerCase(); - - String className = Command.getPackageName() + DOT + command; - - System.out.println( "className = " + className ); - - //!!!! - - if ( className.endsWith( "Who" ) ) - { - className += "is"; - } - - Class commandClass = Class.forName( className ); - - Command commandRequested = (Command) commandClass.newInstance(); - - commandRequested.setRequestMessage( message ); - - return commandRequested; - } - catch ( ClassNotFoundException e ) - { - e.printStackTrace(); - - throw new IRCException( Replies.ERR_UNKNOWNCOMMAND, new String[]{command} ); - } - catch ( Exception e ) - { - e.printStackTrace(); - - throw new FatalException( e.getMessage() ); - } - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Invite.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Invite.java deleted file mode 100644 index 54547e5c6..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Invite.java +++ /dev/null @@ -1,81 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.command; - -import org.codehaus.plexus.ircd.channel.Channel; -import org.codehaus.plexus.ircd.channel.HandleChannel; -import org.codehaus.plexus.ircd.exception.FatalException; -import org.codehaus.plexus.ircd.exception.IRCException; -import org.codehaus.plexus.ircd.token.ChannelToken; -import org.codehaus.plexus.ircd.token.MiddleToken; -import org.codehaus.plexus.ircd.token.UserToken; -import org.codehaus.plexus.ircd.user.HandleUser; -import org.codehaus.plexus.ircd.utils.Message; -import org.codehaus.plexus.ircd.utils.Replies; - -public class Invite extends Command -{ - - private static final Settings settings = new Settings( true, true, 2, 2 ); - - /** - * to execute the Invite's command - * @param user the user who sends the command - * @return the list of message to send back to the sender - */ - public Message[] exec( org.codehaus.plexus.ircd.user.User user ) - { - MiddleToken[] middleTokens = getRequestMessage().getParamsToken().getMiddleTokens(); - UserToken userToken = (UserToken) UserToken.getToken( middleTokens[0].toString() ); - if ( userToken == null ) - { - return null; - } - ChannelToken channelToken = (ChannelToken) ChannelToken.getToken( middleTokens[1].toString() ); - if ( channelToken == null ) - { - return null; - } - String channelName = channelToken.getChannelName(); - String login = userToken.getUserName(); - try - { - Channel channel = HandleChannel.getChannel( channelName ); - if ( channel.isOperator( user ) ) - { - org.codehaus.plexus.ircd.user.User userTo = HandleUser.getUser( login ); - channel.addGuest( userTo.getNickName() ); - HandleChannel.udateChannel( channel ); - userTo.addResponses( Message.createSingleMessage( new Message( user.getUserFullName(), VOID, getName(), userTo.getNickName() + SPACE + channel.getName(), VOID ) ) ); - if ( userTo.isAway() ) - { - return Message.createSingleMessage( new Message( user.getNickName(), Replies.RPL_AWAY, new String[]{userTo.getNickName(), userTo.getAwayMessage()} ) ); - } - else - { - return Message.createSingleMessage( new Message( user.getNickName(), Replies.RPL_INVITING, new String[]{channel.getName(), userTo.getNickName()} ) ); - } - } - } - catch ( IRCException ircE ) - { - return Message.createSingleMessage( new Message( user.getNickName(), ircE.getReplies(), ircE.getParameters() ) ); - } - catch ( FatalException e ) - { - } - return null; - } - - /** - * to get the settings of Invite's command - */ - protected Settings getSettings() - { - return settings; - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Join.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Join.java deleted file mode 100644 index eec934965..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Join.java +++ /dev/null @@ -1,151 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.command; - -import org.codehaus.plexus.ircd.channel.Channel; -import org.codehaus.plexus.ircd.channel.HandleChannel; -import org.codehaus.plexus.ircd.exception.FatalException; -import org.codehaus.plexus.ircd.exception.IRCException; -import org.codehaus.plexus.ircd.token.AnyToken; -import org.codehaus.plexus.ircd.token.ChannelToken; -import org.codehaus.plexus.ircd.token.MiddleToken; -import org.codehaus.plexus.ircd.token.TargetToken; -import org.codehaus.plexus.ircd.token.ToToken; -import org.codehaus.plexus.ircd.utils.Message; -import org.codehaus.plexus.ircd.utils.Replies; - -import org.codehaus.plexus.ircd.user.User; - -import java.util.Vector; - -public class Join extends Command -{ - - private static final Settings settings = new Settings( true, true, 1, 2 ); - - /** - * to add in the list of messages the names of the current members of the channel - * @param vCurrentMessages the current list of message - * @param channel the corresponding channel - * @param sNickName the nickname of the sender - */ - private void addUserList( Vector vCurrentMessages, Channel channel, String sNickName ) - { - String topic; - if ( channel != null && ( topic = channel.getTopic() ) != null && !topic.equals( VOID ) ) - { - vCurrentMessages.addElement( new Message( sNickName, Replies.RPL_TOPIC, new String[]{channel.getName(), topic} ) ); - } - String[] sUsers = channel.getUserList(); - for ( int j = 0; j < sUsers.length; j++ ) - { - vCurrentMessages.addElement( new Message( sNickName, Replies.RPL_NAMREPLY, new String[]{channel.getName(), sUsers[j]} ) ); - } - vCurrentMessages.addElement( new Message( sNickName, Replies.RPL_ENDOFNAMES, new String[]{channel.getName()} ) ); - } - - /** - * to execute the Join's command - * @param user the user who sends the command - * @return the list of message to send back to the sender - */ - public Message[] exec( User user ) - { - System.out.println( "executing join command" ); - - MiddleToken[] middleTokens = getRequestMessage().getParamsToken().getMiddleTokens(); - - TargetToken targetToken = (TargetToken) TargetToken.getToken( middleTokens[0].toString() ); - - System.out.println( "targetToken = " + targetToken ); - - if ( targetToken == null ) - { - return null; - } - ToToken[] toTokensPwd = null; - if ( middleTokens.length > 1 ) - { - TargetToken targetTokenPwd = (TargetToken) TargetToken.getToken( middleTokens[1].toString() ); - if ( targetTokenPwd != null ) - { - toTokensPwd = targetTokenPwd.getToTokens(); - } - } - ToToken[] toTokens = targetToken.getToTokens(); - Vector vMessage = new Vector(); - if ( toTokens != null ) - { - for ( int i = 0; i < toTokens.length; i++ ) - { - ToToken currentToToken = toTokens[i]; - ChannelToken channelToken = currentToToken.getChannelToken(); - Channel channel = null; - if ( channelToken == null ) - { - continue; - } - String channelName = channelToken.getChannelName(); - try - { - channel = HandleChannel.getChannel( channelName ); - } - catch ( IRCException e ) - { - } - try - { - String sNickName = user.getNickName(); - if ( channel != null ) - { - String sPassword = getPassword( toTokensPwd, i ); - channel.checkUser( user, sPassword ); - } - HandleChannel.addUser( user, channelName ); - if ( channel == null ) - { - channel = HandleChannel.getChannel( channelName ); - } - addUserList( vMessage, channel, sNickName ); - } - catch ( IRCException e ) - { - vMessage.addElement( new Message( user.getNickName(), e.getReplies(), e.getParameters() ) ); - } - catch ( FatalException e ) - { - } - } - return Message.vector2Messages( vMessage ); - } - return null; - } - - /** - * to get the password in the list of parameters - * @param toTokensPwd the list of parameters - * @param index the index of the requested parameter - * @return the requested parameter - */ - private String getPassword( ToToken[] toTokensPwd, int index ) - { - if ( toTokensPwd != null && toTokensPwd.length > index ) - { - AnyToken anyToken = toTokensPwd[index].getAnyToken(); - return anyToken.toString(); - } - return null; - } - - /** - * to get the settings of Join's command - */ - protected Settings getSettings() - { - return settings; - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Kick.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Kick.java deleted file mode 100644 index 16db1dd68..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Kick.java +++ /dev/null @@ -1,75 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.command; - -import org.codehaus.plexus.ircd.channel.Channel; -import org.codehaus.plexus.ircd.channel.HandleChannel; -import org.codehaus.plexus.ircd.exception.IRCException; -import org.codehaus.plexus.ircd.token.ChannelToken; -import org.codehaus.plexus.ircd.token.MiddleToken; -import org.codehaus.plexus.ircd.token.NickToken; -import org.codehaus.plexus.ircd.token.ParamsToken; -import org.codehaus.plexus.ircd.token.TrailingToken; -import org.codehaus.plexus.ircd.user.HandleUser; -import org.codehaus.plexus.ircd.utils.Message; - -public class Kick extends Command -{ - - private static final Settings settings = new Settings( true, true, 2, 2 ); - - /** - * to execute the Kick's command - * @param user the user who sends the command - * @return the list of message to send back to the sender - */ - public Message[] exec( org.codehaus.plexus.ircd.user.User user ) - { - ParamsToken paramsToken = getRequestMessage().getParamsToken(); - MiddleToken[] middleTokens = paramsToken.getMiddleTokens(); - ChannelToken channelToken = (ChannelToken) ChannelToken.getToken( middleTokens[0].toString() ); - if ( channelToken == null ) - { - return null; - } - NickToken nickToken = (NickToken) NickToken.getToken( middleTokens[1].toString() ); - if ( nickToken == null ) - { - return null; - } - String channelName = channelToken.getChannelName(); - String login = nickToken.getNickName(); - try - { - Channel channel = HandleChannel.getChannel( channelName ); - if ( channel.isOperator( user ) && channel.checkUserOn( login ) ) - { - org.codehaus.plexus.ircd.user.User userToKick = HandleUser.getUser( login ); - String sComment = user.getNickName(); - TrailingToken trailing = paramsToken.getTrailingToken(); - if ( trailing != null ) - { - sComment = trailing.getTrailingValue(); - } - HandleChannel.removeUser( userToKick, channel.getName(), true, user.getUserFullName(), getName(), channel.getName() + SPACE + userToKick.getNickName(), sComment ); - } - } - catch ( IRCException ircE ) - { - return Message.createSingleMessage( new Message( user.getNickName(), ircE.getReplies(), ircE.getParameters() ) ); - } - return null; - } - - /** - * to get the settings of Kick's command - */ - protected Settings getSettings() - { - return settings; - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/List.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/List.java deleted file mode 100644 index f49f059cc..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/List.java +++ /dev/null @@ -1,121 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.command; - -import org.codehaus.plexus.ircd.channel.Channel; -import org.codehaus.plexus.ircd.channel.HandleChannel; -import org.codehaus.plexus.ircd.exception.IRCException; -import org.codehaus.plexus.ircd.token.ChannelToken; -import org.codehaus.plexus.ircd.token.MiddleToken; -import org.codehaus.plexus.ircd.token.ParamsToken; -import org.codehaus.plexus.ircd.token.TargetToken; -import org.codehaus.plexus.ircd.token.ToToken; -import org.codehaus.plexus.ircd.utils.Message; -import org.codehaus.plexus.ircd.utils.Replies; - -import java.util.Enumeration; -import java.util.Vector; - -public class List extends Command -{ - - private static final Settings settings = new Settings(); - - /** - * to add a channel in the list of messages - * @param vCurrentMessages the list of current messages - * @param channel the channel to add - * @param sNickName the nickname of the sender - */ - private void addChannelInList( Vector vCurrentMessages, Channel channel, String sNickName ) - { - if ( channel.isUserOn( sNickName ) || ( !channel.isTypePrivate() && !channel.isTypeSecret() ) ) - { - vCurrentMessages.addElement( new Message( sNickName, Replies.RPL_LIST, new String[]{channel.getName(), Integer.toString( channel.getUserVisibleNumber() ), channel.getTopic()} ) ); - } - else if ( channel.isTypePrivate() ) - { - vCurrentMessages.addElement( new Message( sNickName, Replies.RPL_LIST, new String[]{channel.getName(), Integer.toString( channel.getUserVisibleNumber() )} ) ); - } - } - - /** - * to execute the List's command - * @param user the user who sends the command - * @return the list of message to send back to the sender - */ - public Message[] exec( org.codehaus.plexus.ircd.user.User user ) - { - ParamsToken paramsToken = getRequestMessage().getParamsToken(); - String sNickName = user.getNickName(); - MiddleToken[] middleTokens = null; - - if ( paramsToken != null ) - { - middleTokens = paramsToken.getMiddleTokens(); - } - - Vector vMessage = new Vector(); - vMessage.addElement( new Message( sNickName, Replies.RPL_LISTSTART, new String[]{} ) ); - - if ( middleTokens == null ) - { - for ( Enumeration enum = HandleChannel.getAllChannels(); enum.hasMoreElements(); ) - { - Channel channel = (Channel) enum.nextElement(); - addChannelInList( vMessage, channel, sNickName ); - } - } - else if ( middleTokens.length != 1 ) - { - return null; - } - else - { - TargetToken targetToken = (TargetToken) TargetToken.getToken( middleTokens[0].toString() ); - if ( targetToken == null ) - { - return null; - } - ToToken[] toTokens = targetToken.getToTokens(); - if ( toTokens == null ) - { - return null; - } - for ( int i = 0; i < toTokens.length; i++ ) - { - ChannelToken channelToken = toTokens[i].getChannelToken(); - if ( channelToken == null ) - { - continue; - } - String channelName = channelToken.getChannelName(); - Channel channel = null; - try - { - channel = HandleChannel.getChannel( channelName ); - } - catch ( IRCException e ) - { - } - if ( channel != null ) - { - addChannelInList( vMessage, channel, sNickName ); - } - } - } - vMessage.addElement( new Message( sNickName, Replies.RPL_LISTEND, new String[]{} ) ); - return Message.vector2Messages( vMessage ); - } - - /** - * to get the settings of List's command - */ - protected Settings getSettings() - { - return settings; - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Mode.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Mode.java deleted file mode 100644 index 1ac2806ea..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Mode.java +++ /dev/null @@ -1,123 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.command; - -import org.codehaus.plexus.ircd.channel.Channel; -import org.codehaus.plexus.ircd.channel.HandleChannel; -import org.codehaus.plexus.ircd.exception.IRCException; -import org.codehaus.plexus.ircd.token.ChannelToken; -import org.codehaus.plexus.ircd.token.MiddleToken; -import org.codehaus.plexus.ircd.token.ModeToken; -import org.codehaus.plexus.ircd.token.NickToken; -import org.codehaus.plexus.ircd.user.HandleUser; -import org.codehaus.plexus.ircd.utils.Message; -import org.codehaus.plexus.ircd.utils.Replies; - -import java.util.Vector; - -public class Mode extends Command -{ - - private static final Settings settings = new Settings( true, true, 1, Integer.MAX_VALUE ); - - /** - * to add the list of ban masks in the list of messages - * @param vCurrentMessages the current list of messages - * @param user the user who sends the command - * @param channel the asked channel - */ - private void addBanList( Vector vCurrentMessages, org.codehaus.plexus.ircd.user.User user, Channel channel ) - { - String[] sMasks = channel.getBanMasks(); - for ( int j = 0; j < sMasks.length; j++ ) - { - vCurrentMessages.addElement( new Message( user.getNickName(), Replies.RPL_BANLIST, new String[]{channel.getName(), sMasks[j]} ) ); - } - vCurrentMessages.addElement( new Message( user.getNickName(), Replies.RPL_ENDOFBANLIST, new String[]{channel.getName()} ) ); - } - - /** - * to execute the Mode's command - * @param user the user who sends the command - * @return the list of message to send back to the sender - */ - public Message[] exec( org.codehaus.plexus.ircd.user.User user ) - { - MiddleToken[] middleTokens = getRequestMessage().getParamsToken().getMiddleTokens(); - NickToken nickToken = (NickToken) NickToken.getToken( middleTokens[0].toString() ); - if ( nickToken != null && middleTokens.length > 1 ) - { - try - { - HandleUser.changeMode( user, nickToken.toString(), (ModeToken) ModeToken.getToken( middleTokens[1].toString() ) ); - } - catch ( IRCException e ) - { - return Message.createSingleMessage( new Message( user.getNickName(), e.getReplies(), e.getParameters() ) ); - } - return Message.createSingleMessage( new Message( user.getNickName(), Replies.RPL_UMODEIS, new String[]{user.getMode()} ) ); - } - else - { - ChannelToken channelToken = (ChannelToken) ChannelToken.getToken( middleTokens[0].toString() ); - if ( channelToken == null ) - { - return null; - } - String channelName = channelToken.getChannelName(); - Channel channel = null; - try - { - channel = HandleChannel.getChannel( channelName ); - } - catch ( IRCException e ) - { - return Message.createSingleMessage( new Message( user.getNickName(), e.getReplies(), e.getParameters() ) ); - } - if ( middleTokens.length == 1 ) - { - return Message.createSingleMessage( new Message( user.getNickName(), Replies.RPL_CHANNELMODEIS, new String[]{channel.getName(), channel.displayModes()} ) ); - } - else - { - ModeToken modeToken = (ModeToken) ModeToken.getToken( middleTokens[1].toString() ); - try - { - HandleChannel.changeMode( user, channel.getName(), modeToken, middleTokens ); - String sArgs = VOID; - for ( int i = 0; i < middleTokens.length; i++ ) - { - sArgs += SPACE + middleTokens[i].toString(); - } - channel.sendMessage( user.getUserFullName(), getName(), sArgs, SPACE ); - } - catch ( IRCException e ) - { - Replies replies = e.getReplies(); - if ( replies.getCode() == Replies.ERR_NEEDMOREPARAMS.getCode() && new Boolean( e.getParameters()[1] ).booleanValue() && e.getParameters()[2].equalsIgnoreCase( CHANNEL_BAN_MASK ) ) - { - Vector vAllMessage = new Vector(); - addBanList( vAllMessage, user, channel ); - return Message.vector2Messages( vAllMessage ); - } - else - { - return Message.createSingleMessage( new Message( user.getNickName(), e.getReplies(), e.getParameters() ) ); - } - } - } - } - return null; - } - - /** - * to get the settings of Mode's command - */ - protected Settings getSettings() - { - return settings; - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Nick.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Nick.java deleted file mode 100644 index 7ae2ee417..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Nick.java +++ /dev/null @@ -1,104 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.command; - -import org.codehaus.plexus.ircd.exception.FatalException; -import org.codehaus.plexus.ircd.exception.IRCException; -import org.codehaus.plexus.ircd.properties.Config; -import org.codehaus.plexus.ircd.token.MiddleToken; -import org.codehaus.plexus.ircd.token.NickToken; -import org.codehaus.plexus.ircd.token.ParamsToken; -import org.codehaus.plexus.ircd.token.TrailingToken; -import org.codehaus.plexus.ircd.user.HandleUser; -import org.codehaus.plexus.ircd.utils.Message; -import org.codehaus.plexus.ircd.utils.Replies; -import org.codehaus.plexus.ircd.utils.Utilities; - -public class Nick extends Command -{ - - private static final Settings settings = new Settings( true, false, 1, Integer.MAX_VALUE ); - - /** - * to execute the Nick's command - * @param user the user who sends the command - * @return the list of message to send back to the sender - */ - public Message[] exec( org.codehaus.plexus.ircd.user.User user ) - { - ParamsToken paramsToken = getRequestMessage().getParamsToken(); - MiddleToken[] middleTokens = paramsToken.getMiddleTokens(); - TrailingToken trailingToken = paramsToken.getTrailingToken(); - if ( ( middleTokens == null || middleTokens.length == 0 ) && ( trailingToken == null ) ) - { - return Message.createSingleMessage( new Message( Replies.ERR_NEEDMOREPARAMS, new String[]{getName()} ) ); - } - else - { - String sLogin = null; - if ( middleTokens != null ) - { - sLogin = middleTokens[0].toString(); - } - else - { - sLogin = trailingToken.toString(); - } - String sOldLogin = user.getNickName(); - NickToken nickToken = (NickToken) NickToken.getToken( sLogin ); - if ( nickToken == null ) - { - return null; - } - sLogin = nickToken.getNickName(); - if ( sLogin.equals( VOID ) ) - { - return null; - } - if ( sOldLogin == null || sOldLogin.equals( VOID ) ) - { - sOldLogin = VOID; - user.setNickName( sLogin ); - try - { - HandleUser.udateUser( user ); - } - catch ( IRCException e ) - { - user.setNickName( sOldLogin ); - return Message.createSingleMessage( new Message( user.getNoNullNickName(), e.getReplies(), e.getParameters() ) ); - } - catch ( FatalException e ) - { - user.setNickName( sOldLogin ); - return null; - } - } - else - { - try - { - HandleUser.renameUser( sLogin, sOldLogin ); - } - catch ( IRCException e ) - { - user.setNickName( sOldLogin ); - return Message.createSingleMessage( new Message( user.getNoNullNickName(), e.getReplies(), e.getParameters() ) ); - } - } - return Message.createSingleMessage( new Message( user.getNoNullNickName(), new Notice().getName(), VOID, Utilities.getMessage( Config.getValue( "command.nick.change.message.syntax" ), new String[]{user.getNoNullNickName()} ) ) ); - } - } - - /** - * to get the settings of Nick's command - */ - protected Settings getSettings() - { - return settings; - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Notice.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Notice.java deleted file mode 100644 index 2156abb26..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Notice.java +++ /dev/null @@ -1,82 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.command; - -import org.codehaus.plexus.ircd.exception.IRCException; -import org.codehaus.plexus.ircd.token.MiddleToken; -import org.codehaus.plexus.ircd.token.NickToken; -import org.codehaus.plexus.ircd.token.ParamsToken; -import org.codehaus.plexus.ircd.token.TargetToken; -import org.codehaus.plexus.ircd.token.ToToken; -import org.codehaus.plexus.ircd.token.TrailingToken; -import org.codehaus.plexus.ircd.user.HandleUser; -import org.codehaus.plexus.ircd.utils.Message; -import org.codehaus.plexus.ircd.utils.Replies; - -public class Notice extends Command -{ - - private static final Settings settings = new Settings( true, true, 1, 1 ); - - /** - * to execute the Notice's command - * @param userExp the user who sends the command - * @return the list of message to send back to the sender - */ - public Message[] exec( org.codehaus.plexus.ircd.user.User userExp ) - { - ParamsToken paramsToken = getRequestMessage().getParamsToken(); - MiddleToken[] middleTokens = paramsToken.getMiddleTokens(); - TrailingToken trailingToken = paramsToken.getTrailingToken(); - if ( trailingToken == null ) - { - return Message.createSingleMessage( new Message( Replies.ERR_NEEDMOREPARAMS, new String[]{getName()} ) ); - } - else - { - String sMessage = trailingToken.getTrailingValue(); - TargetToken targetToken = (TargetToken) TargetToken.getToken( middleTokens[0].toString() ); - if ( targetToken == null ) - { - return null; - } - ToToken[] toTokens = targetToken.getToTokens(); - if ( toTokens != null ) - { - for ( int i = 0; i < toTokens.length; i++ ) - { - NickToken nickToken = toTokens[i].getNickToken(); - org.codehaus.plexus.ircd.user.User user = null; - if ( nickToken == null ) - { - continue; - } - String login = nickToken.getNickName(); - try - { - user = HandleUser.getUser( login ); - } - catch ( IRCException e ) - { - } - if ( user != null ) - { - user.addResponses( Message.createSingleMessage( new Message( userExp.getNickName(), user.getNickName(), getName(), VOID, sMessage ) ) ); - } - } - } - return null; - } - } - - /** - * to get the settings of Notice's command - */ - protected Settings getSettings() - { - return settings; - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Part.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Part.java deleted file mode 100644 index 542a7fb41..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Part.java +++ /dev/null @@ -1,69 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.command; - -import org.codehaus.plexus.ircd.channel.HandleChannel; -import org.codehaus.plexus.ircd.exception.IRCException; -import org.codehaus.plexus.ircd.token.ChannelToken; -import org.codehaus.plexus.ircd.token.MiddleToken; -import org.codehaus.plexus.ircd.token.TargetToken; -import org.codehaus.plexus.ircd.token.ToToken; -import org.codehaus.plexus.ircd.utils.Message; - -import java.util.Vector; - -public class Part extends Command -{ - - private static final Settings settings = new Settings( true, true, 1, 2 ); - - /** - * to execute the Part's command - * @param user the user who sends the command - * @return the list of message to send back to the sender - */ - public Message[] exec( org.codehaus.plexus.ircd.user.User user ) - { - MiddleToken[] middleTokens = getRequestMessage().getParamsToken().getMiddleTokens(); - TargetToken targetToken = (TargetToken) TargetToken.getToken( middleTokens[0].toString() ); - if ( targetToken == null ) - { - return null; - } - ToToken[] toTokens = targetToken.getToTokens(); - Vector vMessage = new Vector(); - if ( toTokens != null ) - { - for ( int i = 0; i < toTokens.length; i++ ) - { - ChannelToken channelToken = toTokens[i].getChannelToken(); - if ( channelToken == null ) - { - continue; - } - String channelName = channelToken.getChannelName(); - try - { - HandleChannel.removeUser( user, channelName, true, user.getUserFullName(), getName(), channelName, SPACE ); - } - catch ( IRCException e ) - { - vMessage.addElement( new Message( user.getNickName(), e.getReplies(), e.getParameters() ) ); - } - } - } - return Message.vector2Messages( vMessage ); - } - - /** - * to get the settings of Part's command - */ - protected Settings getSettings() - { - return settings; - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Ping.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Ping.java deleted file mode 100644 index 0b9ebab00..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Ping.java +++ /dev/null @@ -1,37 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.command; - -import org.codehaus.plexus.ircd.token.ParamsToken; -import org.codehaus.plexus.ircd.user.User; -import org.codehaus.plexus.ircd.utils.Message; - -public class Ping extends Command -{ - - private static final Settings settings = new Settings(); - - /** - * to execute the Away's command - * @param user the user who sends the command - * @return the list of message to send back to the sender - */ - public Message[] exec( User user ) - { - ParamsToken paramsToken = getRequestMessage().getParamsToken(); - - return null; - } - - /** - * to get the settings of Away's command - */ - protected Settings getSettings() - { - return settings; - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Privmsg.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Privmsg.java deleted file mode 100644 index e476a8e4a..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Privmsg.java +++ /dev/null @@ -1,117 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.command; - -import org.codehaus.plexus.ircd.channel.Channel; -import org.codehaus.plexus.ircd.channel.HandleChannel; -import org.codehaus.plexus.ircd.exception.IRCException; -import org.codehaus.plexus.ircd.token.ChannelToken; -import org.codehaus.plexus.ircd.token.MiddleToken; -import org.codehaus.plexus.ircd.token.NickToken; -import org.codehaus.plexus.ircd.token.ParamsToken; -import org.codehaus.plexus.ircd.token.TargetToken; -import org.codehaus.plexus.ircd.token.ToToken; -import org.codehaus.plexus.ircd.token.TrailingToken; -import org.codehaus.plexus.ircd.user.HandleUser; -import org.codehaus.plexus.ircd.utils.Message; -import org.codehaus.plexus.ircd.utils.Replies; - -public class Privmsg extends Command -{ - - private static final Settings settings = new Settings( true, true, 1, 1 ); - - /** - * to execute the Privmsg's command - * @param userExp the user who sends the command - * @return the list of message to send back to the sender - */ - public Message[] exec( org.codehaus.plexus.ircd.user.User userExp ) - { - ParamsToken paramsToken = getRequestMessage().getParamsToken(); - MiddleToken[] middleTokens = paramsToken.getMiddleTokens(); - TrailingToken trailingToken = paramsToken.getTrailingToken(); - if ( trailingToken == null ) - { - return Message.createSingleMessage( new Message( Replies.ERR_NEEDMOREPARAMS, new String[]{getName()} ) ); - } - else - { - String sMessage = trailingToken.getTrailingValue(); - TargetToken targetToken = (TargetToken) TargetToken.getToken( middleTokens[0].toString() ); - if ( targetToken == null ) - { - return null; - } - ToToken[] toTokens = targetToken.getToTokens(); - if ( toTokens != null ) - { - for ( int i = 0; i < toTokens.length; i++ ) - { - ToToken currentToToken = toTokens[i]; - NickToken nickToken = currentToToken.getNickToken(); - org.codehaus.plexus.ircd.user.User user = null; - if ( nickToken != null ) - { - try - { - user = HandleUser.getUser( nickToken.toString() ); - } - catch ( IRCException e ) - { - userExp.addResponses( Message.createSingleMessage( new Message( userExp.getNickName(), e.getReplies(), e.getParameters() ) ) ); - } - if ( user != null ) - { - if ( !user.isAway() ) - { - if ( sMessage == null || sMessage.equals( VOID ) ) - { - userExp.addResponses( Message.createSingleMessage( new Message( userExp.getNickName(), Replies.ERR_NOTEXTTOSEND, new String[]{} ) ) ); - } - else - { - user.addResponses( Message.createSingleMessage( new Message( userExp.getNickName(), user.getNickName(), getName(), VOID, sMessage ) ) ); - } - } - else - { - userExp.addResponses( Message.createSingleMessage( new Message( userExp.getNickName(), Replies.RPL_AWAY, new String[]{user.getNickName(), user.getAwayMessage()} ) ) ); - } - continue; - } - } - ChannelToken channelToken = currentToToken.getChannelToken(); - if ( channelToken != null ) - { - try - { - Channel channel = HandleChannel.getChannel( channelToken.toString() ); - if ( channel.isAllowedToSpeak( userExp ) ) - { - channel.sendMessage( userExp.getNickName(), sMessage ); - } - } - catch ( IRCException e ) - { - userExp.addResponses( Message.createSingleMessage( new Message( userExp.getNickName(), e.getReplies(), e.getParameters() ) ) ); - } - } - } - } - return null; - } - } - - /** - * to get the settings of Privmsg's command - */ - protected Settings getSettings() - { - return settings; - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Quit.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Quit.java deleted file mode 100644 index 45243a8c8..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Quit.java +++ /dev/null @@ -1,52 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.command; - -import org.codehaus.plexus.ircd.token.ParamsToken; -import org.codehaus.plexus.ircd.token.TrailingToken; -import org.codehaus.plexus.ircd.utils.Message; - -public class Quit extends Command -{ - - private static final Settings settings = new Settings(); - - /** - * to execute the Quit's command - * @param user the user who sends the command - * @return the list of message to send back to the sender - */ - public Message[] exec( org.codehaus.plexus.ircd.user.User user ) - { - ParamsToken paramsToken = getRequestMessage().getParamsToken(); - String sMessage = VOID; - if ( paramsToken != null ) - { - TrailingToken trailing = paramsToken.getTrailingToken(); - if ( trailing != null ) - { - sMessage = trailing.toString(); - } - } - try - { - user.disconnect( sMessage ); - } - catch ( Exception e ) - { - } - return null; - } - - /** - * to get the settings of Quit's command - */ - protected Settings getSettings() - { - return settings; - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Settings.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Settings.java deleted file mode 100644 index 4fae1bf1f..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Settings.java +++ /dev/null @@ -1,100 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.command; - -public class Settings -{ - - private boolean paramNeeded; - private boolean middleTokenNeeded; - private int minimumMiddleTokenNeeded; - private int maximumMiddleTokenNeeded; - - /** - * The default settings - */ - Settings() - { - } - - /** - * @param paramNeeded to tell if parameters are needed - * @param middleTokenNeeded to tell if a middle token is needed - * @param minimumMiddleTokenNeeded minimum of middle token needed - * @param maximumMiddleTokenNeeded maximum of middle token needed - */ - Settings( boolean paramNeeded, boolean middleTokenNeeded, int minimumMiddleTokenNeeded, int maximumMiddleTokenNeeded ) - { - setParamNeeded( paramNeeded ); - setMiddleTokenNeeded( middleTokenNeeded ); - setMinimumMiddleTokenNeeded( minimumMiddleTokenNeeded ); - setMaximumMiddleTokenNeeded( maximumMiddleTokenNeeded ); - } - - /** - * to get the maximum of middle token needed - */ - int getMaximumMiddleTokenNeeded() - { - return maximumMiddleTokenNeeded; - } - - /** - * to get the minimum of middle token needed - */ - int getMinimumMiddleTokenNeeded() - { - return minimumMiddleTokenNeeded; - } - - /** - * to know a middle token is needed - */ - boolean isMiddleTokenNeeded() - { - return middleTokenNeeded; - } - - /** - * to know parameters are needed - */ - boolean isParamNeeded() - { - return paramNeeded; - } - - /** - * to set the maximum of middle token needed - */ - private void setMaximumMiddleTokenNeeded( int maximumMiddleTokenNeeded ) - { - this.maximumMiddleTokenNeeded = maximumMiddleTokenNeeded; - } - - /** - * to tell if the middle token are needed - */ - private void setMiddleTokenNeeded( boolean middleTokenNeeded ) - { - this.middleTokenNeeded = middleTokenNeeded; - } - - /** - * to set the minimum of middle token needed - */ - private void setMinimumMiddleTokenNeeded( int minimumMiddleTokenNeeded ) - { - this.minimumMiddleTokenNeeded = minimumMiddleTokenNeeded; - } - - /** - * to tell if parameters are needed - */ - private void setParamNeeded( boolean paramNeeded ) - { - this.paramNeeded = paramNeeded; - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Topic.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Topic.java deleted file mode 100644 index dec5dff04..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Topic.java +++ /dev/null @@ -1,90 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.command; - -import org.codehaus.plexus.ircd.channel.Channel; -import org.codehaus.plexus.ircd.channel.HandleChannel; -import org.codehaus.plexus.ircd.exception.FatalException; -import org.codehaus.plexus.ircd.exception.IRCException; -import org.codehaus.plexus.ircd.token.ChannelToken; -import org.codehaus.plexus.ircd.token.MiddleToken; -import org.codehaus.plexus.ircd.token.ParamsToken; -import org.codehaus.plexus.ircd.token.TrailingToken; -import org.codehaus.plexus.ircd.utils.Message; -import org.codehaus.plexus.ircd.utils.Replies; - -public class Topic extends Command -{ - - private static final Settings settings = new Settings( true, true, 1, 1 ); - - /** - * to execute the Topic's command - * @param user the user who sends the command - * @return the list of message to send back to the sender - */ - public Message[] exec( org.codehaus.plexus.ircd.user.User user ) - { - ParamsToken paramsToken = getRequestMessage().getParamsToken(); - MiddleToken[] middleTokens = paramsToken.getMiddleTokens(); - TrailingToken trailingToken = paramsToken.getTrailingToken(); - ChannelToken channelToken = (ChannelToken) ChannelToken.getToken( middleTokens[0].toString() ); - if ( channelToken == null ) - { - return null; - } - Channel channel = null; - try - { - channel = HandleChannel.getChannel( channelToken.toString() ); - } - catch ( IRCException e ) - { - return Message.createSingleMessage( new Message( user.getNickName(), e.getReplies(), e.getParameters() ) ); - } - if ( trailingToken != null ) - { - try - { - if ( channel.isAllowedToChangeTopic( user ) ) - { - String topic = trailingToken.getTrailingValue(); - channel.setTopic( topic ); - HandleChannel.udateChannel( channel ); - channel.sendMessage( user.getNickName(), getName(), channel.getName(), topic ); - } - } - catch ( IRCException e ) - { - return Message.createSingleMessage( new Message( user.getNickName(), e.getReplies(), e.getParameters() ) ); - } - catch ( FatalException e ) - { - } - } - else - { - if ( !channel.getTopic().equals( VOID ) ) - { - return Message.createSingleMessage( new Message( user.getNickName(), Replies.RPL_TOPIC, new String[]{channel.getName(), channel.getTopic()} ) ); - } - else - { - return Message.createSingleMessage( new Message( user.getNickName(), Replies.RPL_NOTOPIC, new String[]{channel.getName()} ) ); - } - } - return null; - } - - /** - * to get the settings of Topic's command - */ - protected Settings getSettings() - { - return settings; - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/User.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/User.java deleted file mode 100644 index 79ef85775..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/User.java +++ /dev/null @@ -1,93 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.command; - -import org.codehaus.plexus.ircd.properties.Config; -import org.codehaus.plexus.ircd.server.Server; -import org.codehaus.plexus.ircd.token.MiddleToken; -import org.codehaus.plexus.ircd.token.ParamsToken; -import org.codehaus.plexus.ircd.token.TrailingToken; -import org.codehaus.plexus.ircd.utils.Message; -import org.codehaus.plexus.ircd.utils.Replies; -import org.codehaus.plexus.ircd.utils.Utilities; - -import java.io.BufferedReader; -import java.io.FileReader; -import java.io.IOException; -import java.util.Vector; - -public class User extends Command -{ - - private static final Settings settings = new Settings( true, true, 3, 3 ); - - /** - * to add the content of the host file in the list of message - * @param allMessage the list of current message - * @param user the user who sends the command - */ - private void displayHostFile( Vector allMessage, org.codehaus.plexus.ircd.user.User user ) - { - try - { - FileReader hostFileReader = - new FileReader( System.getProperty( "org.server.path" ) + - SLASH + Config.getValue( "command.user.host.file.path", "conf/HostFile.txt" ) ); - - BufferedReader in = new BufferedReader( hostFileReader ); - String buffer; - while ( ( buffer = in.readLine() ) != null ) - { - allMessage.addElement( new Message( user.getNoNullNickName(), Replies.RPL_MOTD, new String[]{buffer} ) ); - } - } - catch ( IOException e ) - { - allMessage.addElement( new Message( user.getNickName(), Replies.ERR_NOMOTD, new String[]{} ) ); - } - } - - /** - * to execute the User's command - * @param user the user who sends the command - * @return the list of message to send back to the sender - */ - public Message[] exec( org.codehaus.plexus.ircd.user.User user ) - { - ParamsToken paramsToken = getRequestMessage().getParamsToken(); - MiddleToken[] middleTokens = paramsToken.getMiddleTokens(); - TrailingToken trailingToken = paramsToken.getTrailingToken(); - - if ( trailingToken == null ) - { - trailingToken = new TrailingToken( "Fake name" ); - //return Message.createSingleMessage( new Message( Replies.ERR_NEEDMOREPARAMS, new String[]{getName()} ) ); - } - - if ( user != null && user.getUserName() == null ) - { - user.setUserName( middleTokens[0].toString() ); - user.setHostName( user.getHost() ); - user.setServerName( Server.getHost() ); - user.setRealName( trailingToken.toString() ); - Vector vMessage = new Vector(); - vMessage.addElement( new Message( user.getNoNullNickName(), Replies.RPL_MOTDSTART, new String[]{Server.getHost()} ) ); - vMessage.addElement( new Message( user.getNoNullNickName(), Replies.RPL_MOTD, new String[]{Utilities.getMessage( Config.getValue( "command.user.host.message.syntax" ), new String[]{user.getUserFullName()} )} ) ); - displayHostFile( vMessage, user ); - vMessage.addElement( new Message( user.getNoNullNickName(), Replies.RPL_ENDOFMOTD, new String[]{} ) ); - return Message.vector2Messages( vMessage ); - } - return null; - } - - /** - * to get the settings of User's command - */ - protected Settings getSettings() - { - return settings; - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Whois.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Whois.java deleted file mode 100644 index e6504a47b..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/command/Whois.java +++ /dev/null @@ -1,98 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.command; - -import org.codehaus.plexus.ircd.exception.IRCException; -import org.codehaus.plexus.ircd.token.MiddleToken; -import org.codehaus.plexus.ircd.token.NickToken; -import org.codehaus.plexus.ircd.token.TargetToken; -import org.codehaus.plexus.ircd.token.ToToken; -import org.codehaus.plexus.ircd.user.HandleUser; -import org.codehaus.plexus.ircd.utils.Message; -import org.codehaus.plexus.ircd.utils.Replies; - -import java.util.Vector; - -public class Whois extends Command -{ - - private static final Settings settings = new Settings( true, true, 1, 1 ); - - /** - * to execute the Whois's command - * @param user the user who sends the command - * @return the list of message to send back to the sender - */ - public Message[] exec( org.codehaus.plexus.ircd.user.User user ) - { - MiddleToken[] middleTokens = getRequestMessage().getParamsToken().getMiddleTokens(); - TargetToken targetToken = (TargetToken) TargetToken.getToken( middleTokens[0].toString() ); - if ( targetToken == null ) - { - return null; - } - ToToken[] toTokens = targetToken.getToTokens(); - if ( toTokens != null ) - { - Vector vMessage = new Vector(); - for ( int i = 0; i < toTokens.length; i++ ) - { - ToToken currentToToken = toTokens[i]; - NickToken nickToken = currentToToken.getNickToken(); - if ( nickToken == null ) - { - continue; - } - org.codehaus.plexus.ircd.user.User userToIdentify = null; - try - { - userToIdentify = HandleUser.getUser( nickToken.toString() ); - } - catch ( IRCException e ) - { - vMessage.addElement( new Message( user.getNickName(), e.getReplies(), e.getParameters() ) ); - } - if ( userToIdentify != null ) - { - identifyUser( vMessage, user, userToIdentify ); - } - } - return Message.vector2Messages( vMessage ); - } - return null; - } - - /** - * to get the settings of Whois's command - */ - protected Settings getSettings() - { - return settings; - } - - /** - * to add all known informations about the requested user - * @param vCurrentMessages the list of current message - * @param user the user who sends the command - * @param userToIdentify the user to identify - */ - private void identifyUser( Vector vCurrentMessages, org.codehaus.plexus.ircd.user.User user, org.codehaus.plexus.ircd.user.User userToIdentify ) - { - vCurrentMessages.addElement( new Message( user.getNickName(), Replies.RPL_WHOISUSER, new String[]{userToIdentify.getNickName(), userToIdentify.getUserName(), userToIdentify.getHostName(), userToIdentify.getRealName()} ) ); - String[] sChannels = userToIdentify.getChannelList( user.getNickName() ); - for ( int j = 0; j < sChannels.length; j++ ) - { - vCurrentMessages.addElement( new Message( user.getNickName(), Replies.RPL_WHOISCHANNELS, new String[]{userToIdentify.getNickName(), sChannels[j]} ) ); - } - if ( user.isAway() ) - { - vCurrentMessages.addElement( new Message( user.getNickName(), Replies.RPL_AWAY, new String[]{userToIdentify.getNickName(), userToIdentify.getAwayMessage()} ) ); - } - vCurrentMessages.addElement( new Message( user.getNickName(), Replies.RPL_WHOISIDLE, new String[]{userToIdentify.getNickName(), Long.toString( userToIdentify.getIdle() )} ) ); - vCurrentMessages.addElement( new Message( user.getNickName(), Replies.RPL_ENDOFWHOIS, new String[]{userToIdentify.getNickName()} ) ); - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/exception/FatalException.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/exception/FatalException.java deleted file mode 100644 index 030db09fc..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/exception/FatalException.java +++ /dev/null @@ -1,29 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.exception; - -public class FatalException extends Exception -{ - - private String message; - - /** - * @param message the exception's message - */ - public FatalException( String message ) - { - this.message = message; - } - - /** - * to get the exception's message - */ - public String getMessage() - { - return message; - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/exception/IRCException.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/exception/IRCException.java deleted file mode 100644 index 1fd9d5c01..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/exception/IRCException.java +++ /dev/null @@ -1,50 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.exception; - -import org.codehaus.plexus.ircd.utils.Replies; - -public class IRCException extends Exception -{ - - private Replies replies; - private String[] parameters; - - /** - * @param replies the replies corresponding to the exception - */ - public IRCException( Replies replies ) - { - this.replies = replies; - } - - /** - * @param replies the replies corresponding to the exception - * @param sParameters parameters needed by the replies - */ - public IRCException( Replies replies, String[] sParameters ) - { - this.replies = replies; - parameters = sParameters; - } - - /** - * to get the parameters - */ - public String[] getParameters() - { - return parameters; - } - - /** - * to get the replies - */ - public Replies getReplies() - { - return replies; - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/properties/Config.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/properties/Config.java deleted file mode 100644 index d24b0d2a6..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/properties/Config.java +++ /dev/null @@ -1,55 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.properties; - -import java.util.ResourceBundle; - -public class Config -{ - - private static ResourceBundle allResources; - - static - { - init(); - } - - /** - * to get a specific value from the config - * @param key the key of the value to get from the configuration - * @return the requested value - */ - public static String getValue( String key ) - { - return getValue( key, null ); - } - - /** - * to get a specific value from the config - * @param key the key of the element to get from the configuration - * @param defaultValue the default value given - * @return the requested value - */ - public static String getValue( String key, String defaultValue ) - { - try - { - return allResources.getString( key ); - } - catch ( Exception e ) - { - return defaultValue; - } - } - - /** - * to initialize the resource bundle - */ - private static void init() - { - allResources = ResourceBundle.getBundle( "org.codehaus.plexus.ircd.properties.irc" ); - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/properties/irc.properties b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/properties/irc.properties deleted file mode 100644 index dace61655..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/properties/irc.properties +++ /dev/null @@ -1,42 +0,0 @@ -####################################################### -# -# Server properties -# -####################################################### -server.default.port=6667 -####################################################### -# -# Log properties -# -####################################################### -log.logger.name=org.codehaus.logger -log.file.pathname=log.xml -log.level=ALL -####################################################### -# -# Message properties -# -####################################################### -message.size.limit=400 -####################################################### -# -# Channel properties -# -####################################################### -channel.default.topic=My topic -####################################################### -# -# Command properties -# -####################################################### -command.package.name=org.codehaus.plexus.ircd.command -command.quit.default.message=Bye bye -command.nick.change.message.syntax=Your nickname has been set to -command.user.host.message.syntax=Welcome to my IRC Network -command.user.host.file.path=welcome.txt -####################################################### -# -# User properties -# -####################################################### -user.default.nickname=AUTH \ No newline at end of file diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/server/IrcServer.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/server/IrcServer.java deleted file mode 100644 index 5a8e9d47e..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/server/IrcServer.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.codehaus.plexus.ircd.server; - -import org.codehaus.plexus.ircd.user.HandleUser; -import org.codehaus.plexus.ircd.user.User; -import org.codehaus.plexus.synapse.AbstractSynapseServer; -import org.codehaus.plexus.synapse.handler.AbstractServiceHandler; - -import java.net.Socket; - -/** - * - * - * @author Jason van Zyl - * - * @version $Id$ - */ -public class IrcServer - extends AbstractSynapseServer -{ - /** @see org.apache.avalon.framework.activity.Initializable#initialize */ - public void initialize() - throws Exception - { - super.initialize(); - - getReactor().registerServiceHandler( new IrcServiceHandler() ); - } - - /** @see org.apache.avalon.framework.activity.Disposable#dispose() */ - public void dispose() - { - HandleUser.disconnectAll(); - } - - static class IrcServiceHandler - extends AbstractServiceHandler - { - public String getHandleKey() - { - return "PROCESS"; - } - - public void handleEvents() - throws Exception - { - } - - public void handleEvent( Socket socket ) - throws Exception - { - User user = new User( socket ); - - user.startProcess(); - } - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/server/Server.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/server/Server.java deleted file mode 100644 index 2bea872a2..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/server/Server.java +++ /dev/null @@ -1,188 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.server; - -import org.codehaus.plexus.ircd.properties.Config; -import org.codehaus.plexus.ircd.user.HandleUser; -import org.codehaus.plexus.ircd.user.User; -import org.codehaus.plexus.ircd.utils.Log; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.ServerSocket; -import java.net.Socket; -import java.net.UnknownHostException; -import java.util.logging.Level; - -public class Server -{ - - private static int port; - private static int defaultPort; - private static Thread serverThread; - private static boolean serverStarted; - private static InetAddress localAddress; - private static ServerSocket serverSocket; - - static - { - defaultPort = Integer.parseInt( Config.getValue( "server.default.port", "6667" ) ); - } - - /** - * to create a server on the default port - */ - public Server() throws UnknownHostException, IOException - { - this.port = defaultPort; - serverSocket = new ServerSocket( port ); - localAddress = InetAddress.getLocalHost(); - } - - /** - * to create a server on the given port - */ - public Server( int port ) throws UnknownHostException, IOException - { - this.port = port; - serverSocket = new ServerSocket( port ); - localAddress = InetAddress.getLocalHost(); - } - - /** - * to get the host name of the server - */ - public static String getHost() - { - - //!!!!!!! - return "localhost"; - //return localAddress.getHostName(); - } - - /** - * to get the host address of the server - */ - public static String getHostAddress() - { - return "127.0.0.1"; - //return localAddress.getHostAddress(); - } - - /** - * to get the port of the server - */ - public static int getPort() - { - return port; - } - - /** - * to know if the server is started - */ - public static boolean isServerStarted() - { - return serverStarted; - } - - /** - * to start the server - */ - public static void main( String[] args ) throws Exception - { - Server server; - try - { - port = Integer.parseInt( args[0] ); - server = new Server( port ); - } - catch ( NumberFormatException e ) - { - server = new Server(); - } - catch ( ArrayIndexOutOfBoundsException e ) - { - server = new Server(); - } - server.start(); - } - - /** - * to accept a new connection and to create a new user - */ - public synchronized void processRequest() throws IOException - { - Socket socket = serverSocket.accept(); - User user = new User( socket ); - user.startProcess(); - } - - /** - * to set the server port - */ - public static void setPort( int port ) - { - Server.port = port; - } - - /** - * to change the server's status - */ - private static void setServerStarted( boolean serverStarted ) - { - Server.serverStarted = serverStarted; - } - - /** - * to start the server - */ - public void start() - { - if ( serverThread != null ) - { - return; - } - setServerStarted( true ); - serverThread = new Thread( new Runnable() - { - public void run() - { - while ( isServerStarted() ) - { - try - { - processRequest(); - } - catch ( Exception e ) - { - Log.log( Level.WARNING, "Server", "start", "", e ); - } - } - } - } ); - serverThread.start(); - Log.log( Level.CONFIG, "Serveur", "start", "Java IRC Server Port = " + port + "." ); - } - - /** - * to stop the server - */ - public void stop() - { - setServerStarted( false ); - HandleUser.disconnectAll(); - serverThread = null; - try - { - serverSocket.close(); - } - catch ( IOException e ) - { - e.printStackTrace(); - } - Log.log( Level.CONFIG, "Serveur", "stop", "Java IRC Server stopped." ); - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/AnyToken.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/AnyToken.java deleted file mode 100644 index 3e9abccc2..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/AnyToken.java +++ /dev/null @@ -1,82 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.token; - -import org.codehaus.plexus.ircd.exception.FatalException; - -import java.util.regex.Pattern; - -public class AnyToken extends IRCToken -{ - - private String value; - - /** - * @param token content of the token - */ - protected AnyToken( String token ) - { - super( token ); - } - - /** - * to parse the content of the content and to get the corresponding AnyToken - * @param sToken the token to parse - * @return the corresponding token - */ - public static IRCToken getToken( String sToken ) - { - return getToken( new AnyToken( sToken ) ); - } - - /** - * to get the content of the token - */ - public String getValue() - { - return value; - } - - /** - * to parse the given token - * @param sToken the token to parse - * @throws FatalException parsing's exception - */ - public void parseToken( String sToken ) throws FatalException - { - if ( sToken != null ) - { - if ( Pattern.matches( "[^ |\015|\012]+", sToken ) ) - { - setValue( sToken ); - } - else - { - throw new FatalException( "The token 'anyToken' is incorrect !!" ); - } - } - else - { - throw new FatalException( "The token 'anyToken' is null !!" ); - } - } - - /** - * to set the content of the token - */ - private void setValue( String value ) - { - this.value = value; - } - - /** - * to get the content of the token - */ - public String toString() - { - return value == null ? VOID : value; - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/ChannelToken.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/ChannelToken.java deleted file mode 100644 index be252aace..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/ChannelToken.java +++ /dev/null @@ -1,83 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.token; - -import org.codehaus.plexus.ircd.exception.FatalException; - -import java.util.regex.Pattern; - -public class ChannelToken extends IRCToken -{ - - private String channelName; - - /** - * @param token content of the token - */ - protected ChannelToken( String token ) - { - super( token ); - } - - /** - * to get the channel name - */ - public String getChannelName() - { - return channelName; - } - - /** - * to parse the content of the content and to get the corresponding ChannelToken - * @param sToken the token to parse - * @return the corresponding token - */ - public static IRCToken getToken( String sToken ) - { - return getToken( new ChannelToken( sToken ) ); - } - - /** - * to parse the given token - * @param sToken the token to parse - * @throws FatalException parsing's exception - */ - public void parseToken( String sToken ) throws FatalException - { - if ( sToken != null ) - { - if ( Pattern.matches( "(#|&)[^\u0020|\u0007|,|\015|\012]+", sToken ) ) - { - setChannelName( sToken ); - } - else - { - throw new FatalException( "The token 'channelToken' is incorrect !!" ); - } - } - else - { - throw new FatalException( "The token 'channelToken' is null !!" ); - } - } - - /** - * to set the channel name - */ - private void setChannelName( String channelName ) - { - this.channelName = channelName; - } - - /** - * to get the content of the token - */ - public String toString() - { - return channelName == null ? VOID : channelName; - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/CommandToken.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/CommandToken.java deleted file mode 100644 index 6e08f2af5..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/CommandToken.java +++ /dev/null @@ -1,114 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.token; - -import org.codehaus.plexus.ircd.exception.FatalException; - -import java.util.regex.Pattern; - -public class CommandToken extends IRCToken -{ - - private String letterValue; - private String numberValue; - - /** - * @param token content of the token - */ - protected CommandToken( String token ) - { - super( token ); - } - - /** - * to get the letter value - */ - public String getLetterValue() - { - return letterValue; - } - - /** - * to get the number value - */ - public String getNumberValue() - { - return numberValue; - } - - /** - * to parse the content of the content and to get the corresponding CommandToken - * @param sToken the token to parse - * @return the corresponding token - */ - public static IRCToken getToken( String sToken ) - { - return getToken( new CommandToken( sToken ) ); - } - - /** - * to parse the given token - * @param sToken the token to parse - * @throws FatalException parsing's exception - */ - public void parseToken( String sToken ) throws FatalException - { - if ( sToken != null ) - { - if ( Pattern.matches( "[a-zA-Z]+", sToken ) ) - { - setLetterValue( sToken ); - } - else if ( Pattern.matches( "\\d\\d\\d", sToken ) ) - { - setNumberValue( sToken ); - } - else - { - throw new FatalException( "The token 'commandToken' is incorrect !!" ); - } - } - else - { - throw new FatalException( "The token 'commandToken' is null !!" ); - } - } - - /** - * to set the letter value - */ - private void setLetterValue( String letterValue ) - { - this.letterValue = letterValue; - } - - /** - * to set the number value - */ - private void setNumberValue( String numberValue ) - { - this.numberValue = numberValue; - } - - /** - * to get the content of the token - */ - public String toString() - { - if ( letterValue != null ) - { - return letterValue; - } - else if ( numberValue != null ) - { - return numberValue; - } - else - { - return VOID; - } - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/IRCToken.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/IRCToken.java deleted file mode 100644 index 92fdfcea4..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/IRCToken.java +++ /dev/null @@ -1,49 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.token; - -import org.codehaus.plexus.ircd.exception.FatalException; -import org.codehaus.plexus.ircd.utils.IRCString; - -public abstract class IRCToken implements IRCString -{ - - private String token; - - /** - * @param token content of the token - */ - protected IRCToken( String token ) - { - this.token = token; - } - - /** - * to parse the content of the content and to get the corresponding Token - * @param ircToken the token to parse - * @return the corresponding token - */ - public static IRCToken getToken( IRCToken ircToken ) - { - try - { - ircToken.parseToken( ircToken.token ); - return ircToken; - } - catch ( Exception e ) - { - return null; - } - } - - /** - * to parse a token - * @param sToken content the token parsed - * @throws FatalException parsing's exception - */ - public abstract void parseToken( String sToken ) throws FatalException; -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/MaskToken.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/MaskToken.java deleted file mode 100644 index 84a36faf1..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/MaskToken.java +++ /dev/null @@ -1,82 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.token; - -import org.codehaus.plexus.ircd.exception.FatalException; - -import java.util.regex.Pattern; - -public class MaskToken extends IRCToken -{ - - private String maskValue; - - /** - * @param token content of the token - */ - protected MaskToken( String token ) - { - super( token ); - } - - /** - * to get the content of the token - */ - public String getMaskValue() - { - return maskValue; - } - - /** - * to parse the content of the content and to get the corresponding MaskToken - * @param sToken the token to parse - * @return the corresponding token - */ - public static IRCToken getToken( String sToken ) - { - return getToken( new MaskToken( sToken ) ); - } - - /** - * to parse the given token - * @param sToken the token to parse - * @throws FatalException parsing's exception - */ - public void parseToken( String sToken ) throws FatalException - { - if ( sToken != null ) - { - if ( Pattern.matches( "(*|$)[^\u0020|\u0007|,|\015|\012]+", sToken ) ) - { - setMaskValue( sToken ); - } - else - { - throw new FatalException( "The token 'maskToken' is incorrect !!" ); - } - } - else - { - throw new FatalException( "The token 'maskToken' is null !!" ); - } - } - - /** - * to set the content of the token - */ - private void setMaskValue( String maskValue ) - { - this.maskValue = maskValue; - } - - /** - * to get the content of the token - */ - public String toString() - { - return maskValue == null ? VOID : maskValue; - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/MiddleToken.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/MiddleToken.java deleted file mode 100644 index 5308b0fb2..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/MiddleToken.java +++ /dev/null @@ -1,82 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.token; - -import org.codehaus.plexus.ircd.exception.FatalException; - -import java.util.regex.Pattern; - -public class MiddleToken extends IRCToken -{ - - private String middleValue; - - /** - * @param token content of the token - */ - protected MiddleToken( String token ) - { - super( token ); - } - - /** - * to get the content of the token - */ - public String getMiddleValue() - { - return middleValue; - } - - /** - * to parse the content of the content and to get the corresponding MiddleToken - * @param sToken the token to parse - * @return the corresponding token - */ - public static IRCToken getToken( String sToken ) - { - return getToken( new MiddleToken( sToken ) ); - } - - /** - * to parse the given token - * @param sToken the token to parse - * @throws FatalException parsing's exception - */ - public void parseToken( String sToken ) throws FatalException - { - if ( sToken != null ) - { - if ( Pattern.matches( "[^ |\015|\012|:][^ |\015|\012]*", sToken ) ) - { - setMiddleValue( sToken ); - } - else - { - throw new FatalException( "The token 'middleToken' is incorrect !!" ); - } - } - else - { - throw new FatalException( "The token 'middleToken' is null !!" ); - } - } - - /** - * to set the content of the token - */ - private void setMiddleValue( String middleValue ) - { - this.middleValue = middleValue; - } - - /** - * to get the content of the token - */ - public String toString() - { - return middleValue == null ? VOID : middleValue; - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/ModeToken.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/ModeToken.java deleted file mode 100644 index cf191bf83..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/ModeToken.java +++ /dev/null @@ -1,158 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.token; - -import org.codehaus.plexus.ircd.exception.FatalException; - -import java.util.regex.Pattern; - -public class ModeToken extends IRCToken -{ - - private boolean addMode; - private char firstMode; - private char secondMode; - private char thirdMode; - - /** - * @param token content of the token - */ - protected ModeToken( String token ) - { - super( token ); - addMode = true; - } - - /** - * to know if it is on add mode - */ - public boolean getAddMode() - { - return addMode; - } - - /** - * to get the first given mode - */ - public char getFirstMode() - { - return firstMode; - } - - /** - * to get the second given mode - */ - public char getSecondMode() - { - return secondMode; - } - - /** - * to get the third given mode - */ - public char getThirdMode() - { - return thirdMode; - } - - /** - * to parse the content of the content and to get the corresponding ModeToken - * @param sToken the token to parse - * @return the corresponding token - */ - public static IRCToken getToken( String sToken ) - { - return getToken( new ModeToken( sToken ) ); - } - - /** - * to parse the given token - * @param sToken the token to parse - * @throws FatalException parsing's exception - */ - public void parseToken( String sToken ) throws FatalException - { - if ( sToken != null && sToken.length() >= 2 ) - { - if ( Pattern.matches( "[+|-][o|p|s|i|t|n|m|l|b|v|k|w]{1,3}", sToken ) ) - { - setAddMode( sToken.charAt( 0 ) == PLUS_CHAR ); - setFirstMode( sToken.charAt( 1 ) ); - if ( sToken.length() >= 3 ) - { - setSecondMode( sToken.charAt( 2 ) ); - } - if ( sToken.length() >= 4 ) - { - setThirdMode( sToken.charAt( 3 ) ); - } - } - else - { - throw new FatalException( "The token 'modeToken' is incorrect !!" ); - } - } - else - { - throw new FatalException( "The token 'modeToken' is incomplete !!" ); - } - } - - /** - * to set the add mode - */ - private void setAddMode( boolean isAddMode ) - { - addMode = isAddMode; - } - - /** - * to set the first given mode - */ - private void setFirstMode( char firstMode ) - { - this.firstMode = firstMode; - } - - /** - * to set the second given mode - */ - private void setSecondMode( char secondMode ) - { - this.secondMode = secondMode; - } - - /** - * to set the third given mode - */ - private void setThirdMode( char thirdMode ) - { - this.thirdMode = thirdMode; - } - - /** - * to get the content of the token - */ - public String toString() - { - StringBuffer buffer = new StringBuffer( 10 ); - buffer.append( addMode ? PLUS_CHAR : MINUS_CHAR ); - if ( firstMode != NULL_CHAR ) - { - buffer.append( firstMode ); - } - if ( secondMode != NULL_CHAR ) - { - buffer.append( secondMode ); - } - if ( thirdMode != NULL_CHAR ) - { - buffer.append( thirdMode ); - } - return buffer.toString(); - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/NickToken.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/NickToken.java deleted file mode 100644 index 8f128337c..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/NickToken.java +++ /dev/null @@ -1,83 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.token; - -import org.codehaus.plexus.ircd.exception.FatalException; - -import java.util.regex.Pattern; - -public class NickToken extends IRCToken -{ - - private String nickName; - - /** - * @param token content of the token - */ - protected NickToken( String token ) - { - super( token ); - } - - /** - * to get the content of the token - */ - public String getNickName() - { - return nickName; - } - - /** - * to parse the content of the content and to get the corresponding NickToken - * @param sToken the token to parse - * @return the corresponding token - */ - public static IRCToken getToken( String sToken ) - { - return getToken( new NickToken( sToken ) ); - } - - /** - * to parse the given token - * @param sToken the token to parse - * @throws FatalException parsing's exception - */ - public void parseToken( String sToken ) throws FatalException - { - if ( sToken != null ) - { - if ( Pattern.matches( "[a-zA-Z][[a-zA-Z] | \\d | \\-|\\[|\\]|\\\\|\\`|\\^|\\{|\\}]*", sToken ) ) - { - setNickName( sToken ); - } - else - { - throw new FatalException( "The token 'nickToken' is incorrect !!" ); - } - } - else - { - throw new FatalException( "The token 'nickToken' is null !!" ); - } - } - - /** - * to set the content of the token - */ - private void setNickName( String nickName ) - { - this.nickName = nickName; - } - - /** - * to get the content of the token - */ - public String toString() - { - return nickName == null ? VOID : nickName; - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/ParamsToken.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/ParamsToken.java deleted file mode 100644 index 5c401c4ea..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/ParamsToken.java +++ /dev/null @@ -1,129 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.token; - -import org.codehaus.plexus.ircd.exception.FatalException; -import org.codehaus.plexus.ircd.utils.Utilities; - -import java.util.Vector; - -public class ParamsToken extends IRCToken -{ - - private MiddleToken[] middleTokens; - private TrailingToken trailingToken; - - /** - * @param token content of the token - */ - protected ParamsToken( String token ) - { - super( token ); - } - - /** - * to get the middle tokens - */ - public MiddleToken[] getMiddleTokens() - { - return middleTokens; - } - - /** - * to parse the content of the content and to get the corresponding ParamsToken - * @param sToken the token to parse - * @return the corresponding token - */ - public static IRCToken getToken( String sToken ) - { - return getToken( new ParamsToken( sToken ) ); - } - - /** - * to get the trailing token - */ - public TrailingToken getTrailingToken() - { - return trailingToken; - } - - /** - * to parse the given tokens - * @param sTokens the tokens to parse - * @throws FatalException parsing's exception - */ - public void parseToken( String sTokens ) throws FatalException - { - if ( sTokens != null ) - { - Vector vAllToken = new Vector(); - sTokens = Utilities.getRest( sTokens ); - while ( sTokens != null && !sTokens.equals( VOID ) ) - { - String sHead = Utilities.getHead( sTokens ); - if ( sHead.startsWith( DOUBLE_POINTS ) ) - { - setTrailingToken( (TrailingToken) TrailingToken.getToken( sTokens.substring( 1 ) ) ); - break; - } - else - { - IRCToken ircToken = MiddleToken.getToken( sHead ); - if ( ircToken != null ) - { - vAllToken.addElement( ircToken ); - } - } - sTokens = Utilities.getRest( sTokens.substring( sHead.length() ) ); - } - if ( vAllToken.size() != 0 ) - { - MiddleToken[] toTokens = new MiddleToken[vAllToken.size()]; - setMiddleTokens( (MiddleToken[]) vAllToken.toArray( toTokens ) ); - } - } - else - { - throw new FatalException( "The token 'paramsToken' is null !!" ); - } - } - - /** - * to set the middle tokens - */ - private void setMiddleTokens( MiddleToken[] middleTokens ) - { - this.middleTokens = middleTokens; - } - - /** - * to set the trailing token - */ - private void setTrailingToken( TrailingToken trailingToken ) - { - this.trailingToken = trailingToken; - } - - /** - * to get the content of the token - */ - public String toString() - { - StringBuffer buffer = new StringBuffer( 10000 ); - if ( middleTokens != null ) - { - for ( int i = 0; i < middleTokens.length; i++ ) - { - buffer.append( " " + middleTokens[i].toString() ); - } - } - if ( trailingToken != null ) - { - buffer.append( " :" + trailingToken.toString() ); - } - return buffer.toString(); - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/PrefixToken.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/PrefixToken.java deleted file mode 100644 index 577ab3d82..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/PrefixToken.java +++ /dev/null @@ -1,175 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.token; - -import org.codehaus.plexus.ircd.exception.FatalException; - -public class PrefixToken extends IRCToken -{ - - private NickToken nickToken; - private UserToken userToken; - private ServerNameToken hostToken; - private ServerNameToken serverNameToken; - - /** - * @param token content of the token - */ - protected PrefixToken( String token ) - { - super( token ); - } - - /** - * to get the host token - */ - public ServerNameToken getHostToken() - { - return hostToken; - } - - /** - * to get the nick token - */ - public NickToken getNickToken() - { - return nickToken; - } - - /** - * to get the server name token - */ - public ServerNameToken getServerNameToken() - { - return serverNameToken; - } - - /** - * to parse the content of the content and to get the corresponding PrefixToken - * @param sToken the token to parse - * @return the corresponding token - */ - public static IRCToken getToken( String sToken ) - { - return getToken( new PrefixToken( sToken ) ); - } - - /** - * to get the user token - */ - public UserToken getUserToken() - { - return userToken; - } - - /** - * to parse the given token - * @param sToken the token to parse - * @throws FatalException parsing's exception - */ - public void parseToken( String sToken ) throws FatalException - { - if ( sToken != null ) - { - String sFirstToken = sToken; - int index2 = sToken.indexOf( '@' ); - if ( index2 >= 0 ) - { - sFirstToken = sToken.substring( 0, index2 ); - } - int index1 = sToken.indexOf( '!' ); - if ( index1 >= 0 ) - { - sFirstToken = sToken.substring( 0, index1 ); - } - IRCToken ircToken = NickToken.getToken( sFirstToken ); - if ( ircToken != null ) - { - setNickToken( (NickToken) ircToken ); - if ( index1 != -1 ) - { - if ( index2 != -1 ) - { - setUserToken( (UserToken) UserToken.getToken( sToken.substring( index1 + 1, index2 ) ) ); - } - else - { - setUserToken( (UserToken) UserToken.getToken( sToken.substring( index1 + 1 ) ) ); - } - } - if ( index2 != -1 ) - { - setHostToken( (ServerNameToken) ServerNameToken.getToken( sToken.substring( index2 + 1 ) ) ); - } - } - else - { - setServerNameToken( (ServerNameToken) ServerNameToken.getToken( sFirstToken ) ); - } - } - else - { - throw new FatalException( "The token 'prefixToken' is null !!" ); - } - } - - /** - * to set the host token - */ - private void setHostToken( ServerNameToken serverNameToken ) - { - hostToken = serverNameToken; - } - - /** - * to set the nick token - */ - private void setNickToken( NickToken nickToken ) - { - this.nickToken = nickToken; - } - - /** - * to set the server name token - */ - private void setServerNameToken( ServerNameToken serverNameToken ) - { - this.serverNameToken = serverNameToken; - } - - /** - * to set the user token - */ - private void setUserToken( UserToken userToken ) - { - this.userToken = userToken; - } - - /** - * to get the content of the token - */ - public String toString() - { - StringBuffer buffer = new StringBuffer( 100 ); - if ( serverNameToken != null ) - { - buffer.append( serverNameToken ); - } - if ( nickToken != null ) - { - buffer.append( nickToken ); - } - if ( userToken != null ) - { - buffer.append( "!" + userToken ); - } - if ( hostToken != null ) - { - buffer.append( "@" + hostToken ); - } - return buffer.toString(); - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/ServerNameToken.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/ServerNameToken.java deleted file mode 100644 index 4360f5599..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/ServerNameToken.java +++ /dev/null @@ -1,84 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.token; - -import org.codehaus.plexus.ircd.exception.FatalException; - -import java.net.URI; - -public class ServerNameToken extends IRCToken -{ - - private String serverName; - - /** - * @param token content of the token - */ - protected ServerNameToken( String token ) - { - super( token ); - } - - /** - * to get the content of the token - */ - public String getServerName() - { - return serverName; - } - - /** - * to parse the content of the content and to get the corresponding ServerNameToken - * @param sToken the token to parse - * @return the corresponding token - */ - public static IRCToken getToken( String sToken ) - { - return getToken( new ServerNameToken( sToken ) ); - } - - /** - * to parse the given token - * @param sToken the token to parse - * @throws FatalException parsing's exception - */ - public void parseToken( String sToken ) throws FatalException - { - if ( sToken != null ) - { - try - { - new URI( "codehaus://" + sToken ); - setServerName( sToken ); - } - catch ( Exception e ) - { - throw new FatalException( e.getMessage() ); - } - } - else - { - throw new FatalException( "The token 'serverName' is null !!" ); - } - } - - /** - * to set the content of the token - */ - private void setServerName( String serverName ) - { - this.serverName = serverName; - } - - /** - * to get the content of the token - */ - public String toString() - { - return serverName == null ? VOID : serverName; - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/TargetToken.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/TargetToken.java deleted file mode 100644 index 2185b5adb..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/TargetToken.java +++ /dev/null @@ -1,105 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.token; - -import org.codehaus.plexus.ircd.exception.FatalException; - -import java.util.Vector; -import java.util.regex.Pattern; - -public class TargetToken extends IRCToken -{ - - private ToToken[] toTokens; - - /** - * @param token content of the token - */ - protected TargetToken( String token ) - { - super( token ); - } - - /** - * to parse the content of the content and to get the corresponding TargetToken - * @param sToken the token to parse - * @return the corresponding token - */ - public static IRCToken getToken( String sToken ) - { - return getToken( new TargetToken( sToken ) ); - } - - /** - * to get the list of content token - */ - public ToToken[] getToTokens() - { - return toTokens; - } - - /** - * to parse the given tokens - * @param sTokens the tokens to parse - * @throws FatalException parsing's exception - */ - public void parseToken( String sTokens ) throws FatalException - { - if ( sTokens != null ) - { - String[] sAllToken = Pattern.compile( "," ).split( sTokens ); - if ( sAllToken != null ) - { - Vector vAllToken = new Vector(); - for ( int i = 0; i < sAllToken.length; i++ ) - { - IRCToken currentIRCToken = ToToken.getToken( sAllToken[i] ); - if ( currentIRCToken != null ) - { - vAllToken.addElement( currentIRCToken ); - } - } - if ( vAllToken.size() != 0 ) - { - ToToken[] toTokens = new ToToken[vAllToken.size()]; - setToTokens( (ToToken[]) vAllToken.toArray( toTokens ) ); - } - } - } - else - { - throw new FatalException( "The token 'targetToken' is null !!" ); - } - } - - /** - * to set the list of content token - */ - private void setToTokens( ToToken[] toTokens ) - { - this.toTokens = toTokens; - } - - /** - * to get the content of the token - */ - public String toString() - { - StringBuffer buffer = new StringBuffer( 100 ); - if ( toTokens != null ) - { - for ( int i = 0; i < toTokens.length; i++ ) - { - if ( i > 0 ) - { - buffer.append( ',' ); - } - buffer.append( toTokens[i].toString() ); - } - } - return buffer.toString(); - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/ToToken.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/ToToken.java deleted file mode 100644 index 261183632..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/ToToken.java +++ /dev/null @@ -1,212 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.token; - -import org.codehaus.plexus.ircd.exception.FatalException; - -public class ToToken extends IRCToken -{ - - private AnyToken anyToken; - private UserToken userToken; - private NickToken nickToken; - private MaskToken maskToken; - private ChannelToken channelToken; - private ServerNameToken serverNameToken; - - /** - * @param token content of the token - */ - protected ToToken( String token ) - { - super( token ); - } - - /** - * to get the any token - */ - public AnyToken getAnyToken() - { - return anyToken; - } - - /** - * to get the channel token - */ - public ChannelToken getChannelToken() - { - return channelToken; - } - - /** - * to get the mask token - */ - public MaskToken getMaskToken() - { - return maskToken; - } - - /** - * to get the nick token - */ - public NickToken getNickToken() - { - return nickToken; - } - - /** - * to get the server name token - */ - public ServerNameToken getServerNameToken() - { - return serverNameToken; - } - - /** - * to parse the content of the content and to get the corresponding ToToken - * @param sToken the token to parse - * @return the corresponding token - */ - public static IRCToken getToken( String sToken ) - { - return getToken( new ToToken( sToken ) ); - } - - /** - * to get the user token - */ - public UserToken getUserToken() - { - return userToken; - } - - /** - * to parse the given token - * @param sToken the token to parse - * @throws FatalException parsing's exception - */ - public void parseToken( String sToken ) throws FatalException - { - if ( sToken != null ) - { - IRCToken ircToken = ChannelToken.getToken( sToken ); - if ( ircToken != null ) - { - setChannelToken( (ChannelToken) ircToken ); - } - ircToken = MaskToken.getToken( sToken ); - if ( ircToken != null ) - { - setMaskToken( (MaskToken) ircToken ); - } - ircToken = NickToken.getToken( sToken ); - if ( ircToken != null ) - { - setNickToken( (NickToken) ircToken ); - } - int index = sToken.indexOf( '@' ); - if ( index != -1 ) - { - ircToken = UserToken.getToken( sToken.substring( 0, index ) ); - if ( ircToken != null ) - { - setUserToken( (UserToken) ircToken ); - } - ircToken = ServerNameToken.getToken( sToken.substring( index + 1 ) ); - if ( ircToken != null ) - { - setServerNameToken( (ServerNameToken) ircToken ); - } - } - ircToken = AnyToken.getToken( sToken ); - if ( ircToken != null ) - { - setAnyToken( (AnyToken) ircToken ); - } - } - else - { - throw new FatalException( "The token 'toToken' is null !!" ); - } - } - - /** - * to set the any token - */ - private void setAnyToken( AnyToken anyToken ) - { - this.anyToken = anyToken; - } - - /** - * to set the channel token - */ - private void setChannelToken( ChannelToken channelToken ) - { - this.channelToken = channelToken; - } - - /** - * to set the mask token - */ - private void setMaskToken( MaskToken maskToken ) - { - this.maskToken = maskToken; - } - - /** - * to set the nick token - */ - private void setNickToken( NickToken nickToken ) - { - this.nickToken = nickToken; - } - - /** - * to set the server name token - */ - private void setServerNameToken( ServerNameToken serverNameToken ) - { - this.serverNameToken = serverNameToken; - } - - /** - * to set the user token - */ - private void setUserToken( UserToken userToken ) - { - this.userToken = userToken; - } - - /** - * to get the content of the token - */ - public String toString() - { - StringBuffer buffer = new StringBuffer( 50 ); - if ( channelToken != null ) - { - buffer.append( channelToken ); - } - if ( nickToken != null ) - { - buffer.append( nickToken ); - } - if ( maskToken != null ) - { - buffer.append( maskToken ); - } - if ( userToken != null ) - { - buffer.append( userToken ); - } - if ( serverNameToken != null ) - { - buffer.append( "@" + serverNameToken ); - } - return buffer.toString(); - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/TrailingToken.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/TrailingToken.java deleted file mode 100644 index a2502cbd0..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/TrailingToken.java +++ /dev/null @@ -1,82 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.token; - -import org.codehaus.plexus.ircd.exception.FatalException; - -import java.util.regex.Pattern; - -public class TrailingToken extends IRCToken -{ - - private String trailingValue; - - /** - * @param token content of the token - */ - public TrailingToken( String token ) - { - super( token ); - } - - /** - * to parse the content of the content and to get the corresponding TrailingToken - * @param sToken the token to parse - * @return the corresponding token - */ - public static IRCToken getToken( String sToken ) - { - return getToken( new TrailingToken( sToken ) ); - } - - /** - * to get the content of the token - */ - public String getTrailingValue() - { - return trailingValue; - } - - /** - * to parse the given token - * @param sToken the token to parse - * @throws FatalException parsing's exception - */ - public void parseToken( String sToken ) throws FatalException - { - if ( sToken != null ) - { - if ( Pattern.matches( "[^\015|\012]+", sToken ) ) - { - setTrailingValue( sToken ); - } - else - { - throw new FatalException( "The token 'trailingToken' is incorrect !!" ); - } - } - else - { - throw new FatalException( "The token 'trailingToken' is null !!" ); - } - } - - /** - * to set the content of the token - */ - private void setTrailingValue( String trailingValue ) - { - this.trailingValue = trailingValue; - } - - /** - * to get the content of the token - */ - public String toString() - { - return trailingValue == null ? VOID : trailingValue; - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/UserToken.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/UserToken.java deleted file mode 100644 index b2813c0a6..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/token/UserToken.java +++ /dev/null @@ -1,82 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.token; - -import org.codehaus.plexus.ircd.exception.FatalException; - -import java.util.regex.Pattern; - -public class UserToken extends IRCToken -{ - - private String userName; - - /** - * @param token content of the token - */ - protected UserToken( String token ) - { - super( token ); - } - - /** - * to parse the content of the content and to get the corresponding UserToken - * @param sToken the token to parse - * @return the corresponding token - */ - public static IRCToken getToken( String sToken ) - { - return getToken( new UserToken( sToken ) ); - } - - /** - * to get the content of the token - */ - public String getUserName() - { - return userName; - } - - /** - * to parse the given token - * @param sToken the token to parse - * @throws FatalException parsing's exception - */ - public void parseToken( String sToken ) throws FatalException - { - if ( sToken != null ) - { - if ( Pattern.matches( "[^ |\015|\012|:|#|&|*|$|@][^ |\015|\012]+", sToken ) ) - { - setUserName( sToken ); - } - else - { - throw new FatalException( "The token 'userToken' is incorrect !!" ); - } - } - else - { - throw new FatalException( "The token 'userToken' is null !!" ); - } - } - - /** - * to set the content of the token - */ - private void setUserName( String userName ) - { - this.userName = userName; - } - - /** - * to get the content of the token - */ - public String toString() - { - return userName == null ? VOID : userName; - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/user/HandleUser.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/user/HandleUser.java deleted file mode 100644 index c40222452..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/user/HandleUser.java +++ /dev/null @@ -1,266 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.user; - -import org.codehaus.plexus.ircd.exception.FatalException; -import org.codehaus.plexus.ircd.exception.IRCException; -import org.codehaus.plexus.ircd.token.ModeToken; -import org.codehaus.plexus.ircd.utils.IRCString; -import org.codehaus.plexus.ircd.utils.Replies; - -import java.util.Enumeration; -import java.util.Hashtable; - -public class HandleUser implements IRCString -{ - - private static Hashtable _hAllUsers = new Hashtable(); - - /** - * to set the away state of a specific user - * @param sNickName the nickname of the user - * @param sMessage the away message to set - * @throws IRCException ERR_NOSUCHNICK if the user does not exist - * ERR_NONICKNAMEGIVEN if the nickname is empty - */ - public static void setAwayState( String sNickName, String sMessage ) throws IRCException - { - User user = getUser( sNickName ); - user.setAwayState( sMessage ); - try - { - udateUser( user ); - } - catch ( FatalException e ) - { - } - } - - /** - * to change a single mode of a specific user - * @param bIsAddMode to tell if the mode is added - * @param mode the mode to set - * @param user the corresponding user - * @throws IRCException ERR_UNKNOWNMODE if the mode is unknown - */ - private static void changeMode( boolean bIsAddMode, char mode, User user ) throws IRCException - { - if ( mode != NULL_CHAR && user != null ) - { - switch ( mode ) - { - case USER_OPERATOR_CHAR: - { - if ( !bIsAddMode ) - { - user.setOperator( false ); - } - break; - } - case USER_INVISIBLE_CHAR: - { - user.setInvisible( bIsAddMode ); - break; - } - default : - { - throw new IRCException( Replies.ERR_UNKNOWNMODE, new String[]{Character.toString( mode )} ); - } - } - try - { - udateUser( user ); - } - catch ( FatalException e ) - { - } - } - } - - /** - * to change serveral mode of a specific user - * @param userFrom the user who performs the modifications - * @param sNickName the nickname of the user who is changing his modes - * @param modeToken the modes to set - * @throws IRCException ERR_UNKNOWNMODE if the mode is unknown - */ - public static void changeMode( User userFrom, String sNickName, ModeToken modeToken ) throws IRCException - { - User user = getUser( sNickName ); - if ( userFrom != null && modeToken != null && userFrom.isMatching( sNickName ) ) - { - changeMode( modeToken.getAddMode(), modeToken.getFirstMode(), user ); - } - } - - /** - * to delete a user from the list - * @param sLogin the login of the user to remove - */ - public synchronized static void deleteUser( String sLogin ) - { - if ( sLogin != null ) - { - _hAllUsers.remove( sLogin ); - } - } - - /** - * to disconnect all the users connected to the server - */ - public synchronized static void disconnectAll() - { - for ( Enumeration enum = _hAllUsers.elements(); enum.hasMoreElements(); ) - { - final User user = (User) enum.nextElement(); - if ( user != null ) - { - Thread t = new Thread( new Runnable() - { - public void run() - { - try - { - user.disconnectUser(); - } - catch ( Exception e ) - { - } - } - } ); - t.start(); - } - } - } - - /** - * to get a user from his nickname - * @param sLogin the nickname of the user to find - * @return the requested user - * @throws IRCException ERR_NOSUCHNICK if the user does not exist - */ - public synchronized static User getUser( String sLogin ) throws IRCException - { - if ( sLogin != null ) - { - User user = (User) _hAllUsers.get( sLogin ); - if ( user != null ) - { - return user; - } - } - throw new IRCException( Replies.ERR_NOSUCHNICK, new String[]{sLogin} ); - } - - /** - * to know if a specific user exists - * @param sLogin the login of the user to check - * @return true if the user exists false otherwise - */ - public static boolean isUserExist( String sLogin ) - { - if ( sLogin != null ) - { - return _hAllUsers.containsKey( sLogin ); - } - else - { - return false; - } - } - - /** - * to remove the away state of a specific user - * @param sNickName the corresponding user - * @throws IRCException ERR_NOSUCHNICK if the user does not exist - * ERR_NONICKNAMEGIVEN if the nickname is empty - */ - public static void removeAwayState( String sNickName ) throws IRCException - { - User user = getUser( sNickName ); - user.removeAwayState(); - try - { - udateUser( user ); - } - catch ( FatalException e ) - { - } - } - - /** - * to rename a user - * @param sNewLogin the new login - * @param sOldLogin the old login - * @throws IRCException ERR_NOSUCHNICK if the user does not exist - * ERR_NONICKNAMEGIVEN if the nickname is empty - * ERR_NICKNAMEINUSE if the nickname is already in use - */ - public synchronized static void renameUser( String sNewLogin, String sOldLogin ) throws IRCException - { - User user = getUser( sOldLogin ); - user.setNickName( sNewLogin ); - try - { - udateUser( sNewLogin, user ); - deleteUser( sOldLogin ); - user.rename( sOldLogin, sNewLogin ); - } - catch ( FatalException e ) - { - } - } - - /** - * to update the datas of a user - * @param sLogin the login of the user - * @param user the corresponding User object - * @throws IRCException ERR_NONICKNAMEGIVEN if the nickname is empty - * ERR_NICKNAMEINUSE if the nickname is already in use - * @throws FatalException if the user is null - */ - private synchronized static void udateUser( String sLogin, User user ) throws IRCException, FatalException - { - if ( user == null ) - { - throw new FatalException( "The user object is null !!" ); - } - else - { - if ( sLogin == null || sLogin.equals( VOID ) ) - { - throw new IRCException( Replies.ERR_NONICKNAMEGIVEN ); - } - else - { - if ( isUserExist( sLogin ) ) - { - throw new IRCException( Replies.ERR_NICKNAMEINUSE, new String[]{sLogin} ); - } - else - { - _hAllUsers.put( sLogin, user ); - } - } - } - } - - /** - * to update the datas of a user - * @param user the user to update - * @throws IRCException ERR_NONICKNAMEGIVEN if the nickname is empty - * ERR_NICKNAMEINUSE if the nickname is already in use - * @throws FatalException if the user is null - */ - public synchronized static void udateUser( User user ) throws IRCException, FatalException - { - if ( user != null ) - { - udateUser( user.getNickName(), user ); - } - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/user/Listening.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/user/Listening.java deleted file mode 100644 index a0cf71e33..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/user/Listening.java +++ /dev/null @@ -1,176 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.user; - -import org.codehaus.plexus.ircd.utils.Log; -import org.codehaus.plexus.ircd.utils.Message; - -import java.io.IOException; -import java.io.InputStream; -import java.util.logging.Level; - -public class Listening - extends Thread -{ - - private User user; - private int state; - private long startIdleTime; - private boolean disconnected; - private InputStream inputStream; - - /** - * The listening thread of a specific user. This thread waits for the client's request - * @param inputStream stream corresponding to the connection with the client - * @param user the connected user - */ - Listening( InputStream inputStream, User user ) - { - this.inputStream = inputStream; - this.user = user; - setIdleTime(); - } - - /** - * to add requests to the list of messages to treat - */ - private void addRequest() throws IOException - { - byte[] receive = receive(); - if ( receive != null ) - { - Message[] messages = Message.parse( new String( receive ), getNextState() ); - Processing processing = new Processing( messages, user ); - processing.start(); - state = messages[messages.length - 1].getState(); - setIdleTime(); - } - } - - /** - * to disconnect the user's connection - */ - void disconnect() - { - setDisconnected( true ); - } - - /** - * to know the idle's time of the client - */ - public long getIdle() - { - return (int) ( ( System.currentTimeMillis() - startIdleTime ) / 1000 ); - } - - /** - * to get the state of connection - */ - public synchronized int getNextState() - { - int iLastState = 3; - if ( state < iLastState - 1 ) - { - state++; - } - else - { - state = iLastState; - } - return state; - } - - /** - * to know if the user is already disconnected - */ - public boolean isDisconnected() - { - return disconnected; - } - - /** - * to get the bytes send by the user through the connection - */ - private byte[] receive() throws IOException - { - int nbr = inputStream.available(); - if ( nbr == 0 ) - { - return null; - } - byte[] buffer = new byte[nbr]; - try - { - inputStream.read( buffer ); - - Log.log( Level.INFO, "Listening", "receive", "<----" + new String( buffer ) ); - - //Command command = CommandHandler.getInstance(); - - System.out.println( "here we need to look up the command and execute it." ); - } - catch ( java.net.SocketException e ) - { - try - { - user.disconnect(); - } - catch ( Exception ex ) - { - } - } - return buffer; - } - - /** - * the run's method of the thread - */ - public void run() - { - Log.log( Level.INFO, "Listening", "run", "start run" ); - while ( !isDisconnected() ) - { - try - { - sleep( 50 ); - addRequest(); - } - catch ( IOException e ) - { - } - catch ( Exception e ) - { - Log.log( Level.WARNING, "Listening", "run", "", e ); - } - } - try - { - inputStream.close(); - } - catch ( IOException e ) - { - Log.log( Level.WARNING, "Listening", "run", "", e ); - } - Log.log( Level.INFO, "Listening", "run", "end run" ); - } - - /** - * to change the thread's status to disconnect - */ - private void setDisconnected( boolean disconnected ) - { - this.disconnected = disconnected; - } - - /** - * to set the idle's time - */ - public void setIdleTime() - { - startIdleTime = System.currentTimeMillis(); - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/user/Processing.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/user/Processing.java deleted file mode 100644 index 48aad539a..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/user/Processing.java +++ /dev/null @@ -1,135 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.user; - -import org.codehaus.plexus.ircd.command.Command; -import org.codehaus.plexus.ircd.command.CommandHandler; -import org.codehaus.plexus.ircd.exception.FatalException; -import org.codehaus.plexus.ircd.exception.IRCException; -import org.codehaus.plexus.ircd.utils.IRCString; -import org.codehaus.plexus.ircd.utils.Log; -import org.codehaus.plexus.ircd.utils.Message; - -import java.util.Vector; -import java.util.logging.Level; - -public class Processing extends Thread -{ - - private User user; - private Message[] allRequests; - private Vector allResponses = new Vector(); - - /** - * The processing thread of a specific user. This thread treats the client's requests - * @param allRequests all the requests to treat - * @param user the sender of the requests - */ - Processing( Message[] allRequests, User user ) - { - this.allRequests = allRequests; - this.user = user; - } - - /** - * to add messages to the list of messages to treat - * @param messages the messages to treat - */ - private void addResponses( Message[] messages ) - { - if ( messages != null ) - { - for ( int i = 0; i < messages.length; i++ ) - { - Message message = messages[i]; - if ( message != null ) - { - allResponses.addElement( message ); - } - } - } - } - - /** - * to get the responses corresponding to the requests already treated - */ - private Message[] getResponses() - { - Message[] result = new Message[allResponses.size()]; - return (Message[]) allResponses.toArray( result ); - } - - /** - * to treat a single request - * @param request the request - */ - private void handleRequest( Message request ) throws FatalException - { - try - { - Command command = CommandHandler.getInstance( request ); - addResponses( command.execute( user ) ); - } - catch ( IRCException e ) - { - if ( user != null ) - { - String sLogin = user.getNickName(); - if ( sLogin != null && !sLogin.equals( IRCString.VOID ) ) - { - addResponses( Message.createSingleMessage( new Message( sLogin, e.getReplies(), e.getParameters() ) ) ); - } - } - else - { - addResponses( Message.createSingleMessage( new Message( e.getReplies(), e.getParameters() ) ) ); - } - } - catch ( Exception e ) - { - e.printStackTrace(); - throw new FatalException( e.getMessage() ); - } - } - - /** - * to treat several requests - * @param requests the requests - */ - private void handleRequest( Message[] requests ) throws FatalException - { - if ( requests != null ) - { - for ( int i = 0; i < requests.length; i++ ) - { - Message request = requests[i]; - if ( request != null && !request.isNull() ) - { - handleRequest( request ); - } - } - } - } - - /** - * the run's method of the thread - */ - public void run() - { - Log.log( Level.INFO, "Processing", "run", "start run" ); - try - { - handleRequest( allRequests ); - user.addResponses( getResponses() ); - } - catch ( Exception e ) - { - e.printStackTrace(); - } - Log.log( Level.INFO, "Processing", "run", "end run" ); - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/user/Talking.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/user/Talking.java deleted file mode 100644 index 2164f5671..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/user/Talking.java +++ /dev/null @@ -1,173 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.user; - -import org.codehaus.plexus.ircd.utils.Log; -import org.codehaus.plexus.ircd.utils.Message; - -import java.io.IOException; -import java.io.OutputStream; -import java.util.Vector; -import java.util.logging.Level; - -public class Talking extends Thread -{ - - private User user; - private boolean disconnected; - private Vector allResponses; - private OutputStream outputStream; - - /** - * The talking thread of a specific user. This thread answers to the client - * @param outputStream stream corresponding to the connection with the client - * @param user the connected user - */ - Talking( OutputStream outputStream, User user ) - { - this.user = user; - this.allResponses = new Vector(); - this.outputStream = outputStream; - } - - /** - * to add responses to the list of response's messages to send back to the client - * @param messages the response to add - */ - public synchronized void addResponses( Message[] messages ) - { - if ( messages != null ) - { - for ( int i = 0; i < messages.length; i++ ) - { - Message message = messages[i]; - if ( message != null ) - { - allResponses.addElement( message ); - } - } - } - notify(); - } - - /** - * to disconnect the user's connection - */ - void disconnect() - { - setDisconnected( true ); - } - - /** - * to know if the user is already disconnected - */ - public boolean isDisconnected() - { - return disconnected; - } - - /** - * to notify the talking's thread that it has responses to send - */ - synchronized void notifyTalking() - { - addResponses( null ); - } - - /** - * the run's method of the thread - */ - public void run() - { - Log.log( Level.INFO, "Talking", "run", "start run" ); - while ( !isDisconnected() ) - { - try - { - sendAll(); - } - catch ( Exception e ) - { - Log.log( Level.WARNING, "Talking", "run", "", e ); - } - } - try - { - outputStream.close(); - } - catch ( IOException e ) - { - Log.log( Level.WARNING, "Talking", "run", "", e ); - } - Log.log( Level.INFO, "Talking", "run", "end run" ); - } - - /** - * to send back a message to the client - * @param message the message to send - */ - private void send( Message message ) throws IOException - { - send( message.toString() ); - } - - /** - * to send back a specific content to the client - * @param sMessage the content of the response to send to the client - */ - private synchronized void send( String sMessage ) throws IOException - { - try - { - Log.log( Level.INFO, "Talking", "send", "------>" + sMessage ); - outputStream.write( sMessage.getBytes() ); - } - catch ( java.net.SocketException e ) - { - try - { - user.disconnect(); - } - catch ( Exception ex ) - { - } - } - } - - /** - * to send all the buffered responses - */ - private synchronized void sendAll() throws IOException, InterruptedException - { - waitResponse(); - int size = allResponses.size(); - for ( int i = 0; i < size; i++ ) - { - Object object = allResponses.firstElement(); - send( (Message) object ); - allResponses.removeElementAt( 0 ); - } - } - - /** - * to change the thread's status to disconnect - */ - private void setDisconnected( boolean disconnected ) - { - this.disconnected = disconnected; - } - - /** - * to wait for a response to send - */ - private void waitResponse() throws InterruptedException - { - Log.log( Level.INFO, "Talking", "waitResponse", "start waiting" ); - wait(); - Log.log( Level.INFO, "Talking", "waitResponse", "end waiting" ); - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/user/User.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/user/User.java deleted file mode 100644 index a7dded47a..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/user/User.java +++ /dev/null @@ -1,525 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.user; - -import org.codehaus.plexus.ircd.channel.Channel; -import org.codehaus.plexus.ircd.channel.HandleChannel; -import org.codehaus.plexus.ircd.channel.Rights; -import org.codehaus.plexus.ircd.command.Quit; -import org.codehaus.plexus.ircd.exception.IRCException; -import org.codehaus.plexus.ircd.properties.Config; -import org.codehaus.plexus.ircd.utils.IRCString; -import org.codehaus.plexus.ircd.utils.Message; -import org.codehaus.plexus.ircd.utils.Replies; - -import java.io.IOException; -import java.net.Socket; -import java.util.ArrayList; -import java.util.Vector; - -public class User implements IRCString -{ - - private String nickName; - private String userName; - private String hostName; - private String serverName; - private String realName; - private String awayMessage; - private boolean invisible; - private boolean operator; - private boolean away; - private ArrayList channelList; - private Socket socket; - private Listening listeningThread; - private Talking talkingThread; - private static String defaultNickName; - - static - { - defaultNickName = Config.getValue( "user.default.nickname", "AUTH" ); - } - - /** - * @param socket the socket corresponding to the connection with the client - */ - public User( Socket socket ) throws IOException - { - this.socket = socket; - this.channelList = new ArrayList(); - } - - /** - * to add a channel's name to the channel list - * @param sName the name of the channel to add - */ - public void addChannel( String sName ) - { - if ( channelList.indexOf( sName ) == -1 ) - { - channelList.add( sName ); - } - } - - /** - * to add responses to the list of responses to send back to the client - * @param messages the messages to add - */ - public synchronized void addResponses( Message[] messages ) - { - talkingThread.addResponses( messages ); - } - - /** - * to disconnect the client - */ - public void disconnect() throws Exception - { - disconnect( VOID ); - } - - /** - * to disconnect the client with a special exit's message - * @param sMessage the exist's message - */ - public void disconnect( String sMessage ) throws Exception - { - Channel[] channels = getChannels(); - for ( int i = 0; i < channels.length; i++ ) - { - channels[i].sendMessage( getNickName(), VOID, new Quit().getName(), VOID, sMessage ); - } - disconnectUser(); - } - - /** - * to handle only the dosconnection of the user - */ - public synchronized void disconnectUser() throws Exception - { - HandleUser.deleteUser( getNickName() ); - listeningThread.disconnect(); - talkingThread.disconnect(); - talkingThread.notifyTalking(); - socket.close(); - } - - /** - * to get the away message - */ - public String getAwayMessage() - { - return awayMessage; - } - - /** - * to get a channel's name from the channel's list - * @param index the index of the channel - */ - private String getChannelAt( int index ) - { - if ( channelList.size() > index ) - { - return (String) channelList.get( index ); - } - else - { - return null; - } - } - - /** - * to get the list of channels which contain the current user and which can be see - * by the user who is asking for - * @param sAskerNickName the nickname of the user who asks for - */ - public String[] getChannelList( String sAskerNickName ) - { - Vector vAllChannels = new Vector(); - StringBuffer buffer = new StringBuffer( Message.getSizeLimit() + 20 ); - String sCurrentChannel; - for ( int i = 0; i < channelList.size(); i++ ) - { - sCurrentChannel = getDisplayedValue( getChannelAt( i ), sAskerNickName ); - if ( !sCurrentChannel.equals( VOID ) ) - { - buffer.append( sCurrentChannel + SPACE ); - } - if ( buffer.length() > Message.getSizeLimit() ) - { - vAllChannels.addElement( buffer.toString() ); - buffer = new StringBuffer( Message.getSizeLimit() + 20 ); - } - } - if ( buffer.length() > 0 ) - { - vAllChannels.addElement( buffer.toString() ); - } - String[] sChannels = new String[vAllChannels.size()]; - return (String[]) vAllChannels.toArray( sChannels ); - } - - /** - * to get all the list of channels which contain the current user - */ - public Channel[] getChannels() - { - Vector vAllChannels = new Vector(); - for ( int i = 0; i < channelList.size(); i++ ) - { - try - { - vAllChannels.addElement( HandleChannel.getChannel( (String) channelList.get( i ) ) ); - } - catch ( Exception e ) - { - } - } - Channel[] channels = new Channel[vAllChannels.size()]; - return (Channel[]) vAllChannels.toArray( channels ); - } - - /** - * to get the default nickname - */ - public static String getDefaultNickName() - { - return defaultNickName; - } - - /** - * to get the displayed value of a specific channel for a specific user - * @param sChannelName the name of the channel to display - * @param sAskerNickName the nickname of the user who is asking for - */ - private String getDisplayedValue( String sChannelName, String sAskerNickName ) - { - try - { - Channel channel = HandleChannel.getChannel( sChannelName ); - Rights rights = channel.getRights( nickName ); - if ( ( channel.isUserOn( sAskerNickName ) ) || ( !channel.isTypePrivate() && !channel.isTypeSecret() ) ) - { - if ( rights.isOperator() ) - { - return CHANNEL_IS_OPERATOR + sChannelName; - } - else if ( rights.isAbleToSpeakIfModerated() ) - { - return CHANNEL_CAN_SPEAK_ON_MODERATED + sChannelName; - } - else - { - return sChannelName; - } - } - } - catch ( IRCException e ) - { - } - return VOID; - } - - /** - * to get the host address - */ - public String getHost() - { - return socket.getInetAddress().getHostAddress(); - } - - /** - * to get the host name - */ - public String getHostName() - { - return hostName; - } - - /** - * to get the idle's time of the user - */ - public long getIdle() - { - return listeningThread.getIdle(); - } - - /** - * to get the modes of the user - */ - public String getMode() - { - StringBuffer buffer = new StringBuffer( 50 ); - buffer.append( PLUS_CHAR ); - if ( isInvisible() ) - { - buffer.append( USER_INVISIBLE_CHAR ); - } - if ( isOperator() ) - { - buffer.append( USER_OPERATOR_CHAR ); - } - return buffer.toString(); - } - - /** - * to get the nickname - */ - public String getNickName() - { - return nickName; - } - - /** - * to get the nickname if it exists the default nickname otherwise - */ - public String getNoNullNickName() - { - if ( getNickName() == null || getNickName().equals( VOID ) ) - { - return defaultNickName; - } - else - { - return getNickName(); - } - } - - /** - * to get the real name - */ - public String getRealName() - { - return realName; - } - - /** - * to get the server name - */ - public String getServerName() - { - return serverName; - } - - /** - * to get the user's full name - */ - public String getUserFullName() - { - return getNoNullNickName() + "!~" + getUserName() + "@" + getHostName(); - } - - /** - * to get the user's name - */ - public String getUserName() - { - return userName; - } - - /** - * to know if the user is away - */ - public boolean isAway() - { - return away; - } - - /** - * to know if the user is invisible - */ - public boolean isInvisible() - { - return invisible; - } - - /** - * to know if the given nickname is matching with the user - * @param sNickName the nickname to check - * @throws IRCException ERR_USERSDONTMATCH if the nickname does not match - */ - public boolean isMatching( String sNickName ) throws IRCException - { - if ( sNickName != null && getNickName().equals( sNickName ) ) - { - return true; - } - throw new IRCException( Replies.ERR_USERSDONTMATCH, new String[]{} ); - } - - /** - * to know if the user is an operator - */ - public boolean isOperator() - { - return operator; - } - - /** - * to remove the user from all the channels - */ - public void remove() - { - for ( int i = 0; i < channelList.size(); i++ ) - { - try - { - HandleChannel.removeUser( this, getChannelAt( i ), true, getUserFullName(), new Quit().getName(), VOID, Config.getValue( "command.quit.default.message", "Bye bye" ) ); - } - catch ( IRCException e ) - { - } - } - } - - /** - * to remove the away's state - */ - public void removeAwayState() - { - setAway( false ); - setAwayMessage( null ); - addResponses( Message.createSingleMessage( new Message( nickName, Replies.RPL_UNAWAY, new String[]{} ) ) ); - } - - /** - * to remove the user from a specific channel - * @param sChannelName the name of the concerning channel - */ - public void removeChannel( String sChannelName ) - { - channelList.remove( sChannelName ); - } - - /** - * to rename the user in all the channels - * @param sOldNickName the old nickname - * @param sNewNickName the new nickname - */ - public void rename( String sOldNickName, String sNewNickName ) - { - for ( int i = 0; i < channelList.size(); i++ ) - { - try - { - HandleChannel.renameUser( sOldNickName, sNewNickName, getChannelAt( i ) ); - } - catch ( IRCException e ) - { - } - } - } - - /** - * to set the away's state - */ - private void setAway( boolean away ) - { - this.away = away; - } - - /** - * to set the away's message - * @param awayMessage the away's message - */ - private void setAwayMessage( String awayMessage ) - { - this.awayMessage = awayMessage; - } - - /** - * to set the away's state with a specific message - * @param sMessage the away's message - */ - public void setAwayState( String sMessage ) - { - setAway( true ); - setAwayMessage( sMessage ); - addResponses( Message.createSingleMessage( new Message( nickName, Replies.RPL_NOWAWAY, new String[]{} ) ) ); - } - - /** - * to set the default nickname - */ - public static void setDefaultNickName( String defaultNickName ) - { - User.defaultNickName = defaultNickName; - } - - /** - * to set the host name - */ - public void setHostName( String hostName ) - { - this.hostName = hostName; - } - - /** - * to set the invisible mode - */ - public void setInvisible( boolean invisible ) - { - this.invisible = invisible; - } - - /** - * to set the nickname - */ - public void setNickName( String nickName ) - { - this.nickName = nickName; - } - - /** - * to set the operator mode - */ - public void setOperator( boolean operator ) - { - this.operator = operator; - } - - /** - * to set the real name - */ - public void setRealName( String realName ) - { - this.realName = realName; - } - - /** - * to set the server name - */ - public void setServerName( String serverName ) - { - this.serverName = serverName; - } - - /** - * to set the user name - */ - public void setUserName( String userName ) - { - this.userName = userName; - } - - /** - * to start the listening and the talking thread - */ - public void startProcess() throws IOException - { - if ( listeningThread == null ) - { - listeningThread = new Listening( socket.getInputStream(), this ); - listeningThread.start(); - } - - if ( talkingThread == null ) - { - talkingThread = new Talking( socket.getOutputStream(), this ); - talkingThread.start(); - } - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/utils/IRCString.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/utils/IRCString.java deleted file mode 100644 index e2e3a41ab..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/utils/IRCString.java +++ /dev/null @@ -1,59 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.utils; - -public interface IRCString -{ - static char CHANNEL_BAN_MASK_CHAR = 'b'; - static char CHANNEL_CAN_SPEAK_ON_MODERATED_CHAR = '+'; - static char CHANNEL_CLIENT_INSIDE_ONLY_CHAR = 'n'; - static char CHANNEL_INVITE_ONLY_CHAR = 'i'; - static char CHANNEL_IS_OPERATOR_CHAR = '@'; - static char CHANNEL_MODERATED_CHAR = 'm'; - static char CHANNEL_OPERATOR_CHAR = 'o'; - static char CHANNEL_PASSWORD_CHAR = 'k'; - static char CHANNEL_PRIVATE_CHAR = 'p'; - static char CHANNEL_SECRET_CHAR = 's'; - static char CHANNEL_SPEAK_ON_MODERATED_CHAR = 'v'; - static char CHANNEL_TOPIC_SETTABLE_CHAR = 't'; - static char CHANNEL_USER_LIMIT_CHAR = 'l'; - static char DOT_CHAR = '.'; - static char DOUBLE_POINTS_CHAR = ':'; - static char PLUS_CHAR = '+'; - static char MINUS_CHAR = '-'; - static char SLASH_CHAR = '/'; - static char SPACE_CHAR = ' '; - static char STAR_CHAR = '*'; - static char USER_OPERATOR_CHAR = 'o'; - static char USER_INVISIBLE_CHAR = 'i'; - static char NULL_CHAR = '\u0000'; - - static String CHANNEL_BAN_MASK = "b"; - static String CHANNEL_CAN_SPEAK_ON_MODERATED = "+"; - static String CHANNEL_CLIENT_INSIDE_ONLY = "n"; - static String CHANNEL_INVITE_ONLY = "i"; - static String CHANNEL_IS_OPERATOR = "@"; - static String CHANNEL_MODERATED = "m"; - static String CHANNEL_OPERATOR = "o"; - static String CHANNEL_PASSWORD = "k"; - static String CHANNEL_PRIVATE = "p"; - static String CHANNEL_SECRET = "s"; - static String CHANNEL_SPEAK_ON_MODERATED = "v"; - static String CHANNEL_TOPIC_SETTABLE = "t"; - static String CHANNEL_USER_LIMIT = "l"; - static String DOT = "."; - static String DOUBLE_POINTS = ":"; - static String FALSE = "false"; - static String PLUS = "+"; - static String MINUS = "-"; - static String SLASH = "/"; - static String SPACE = " "; - static String STAR = "*"; - static String TRUE = "true"; - static String USER_OPERATOR = "o"; - static String USER_INVISIBLE = "i"; - static String VOID = ""; -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/utils/Log.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/utils/Log.java deleted file mode 100644 index e89778293..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/utils/Log.java +++ /dev/null @@ -1,66 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.utils; - -import org.codehaus.plexus.ircd.properties.Config; - -import java.io.IOException; -import java.util.logging.FileHandler; -import java.util.logging.Level; -import java.util.logging.Logger; - -public class Log -{ - - private static Logger log; - - static - { - init(); - } - - /** - * to initialize the logger - */ - private static void init() - { - log = Logger.getLogger( Config.getValue( "log.logger.name" ) ); - log.setLevel( Level.parse( Config.getValue( "log.level" ) ) ); - try - { - log.addHandler( new FileHandler( Config.getValue( "log.file.pathname" ) ) ); - } - catch ( IOException e ) - { - e.printStackTrace(); - } - } - - /** - * to add a message in the log - * @param level the log's level - * @param sourceClass the name of the source class - * @param sourceMethod the name of the source method - * @param msg the message to insert - */ - public static void log( Level level, String sourceClass, String sourceMethod, String msg ) - { - log.logp( level, sourceClass, sourceMethod, msg ); - } - - /** - * to add a message in the log with a specific exception - * @param level the log's level - * @param sourceClass the name of the source class - * @param sourceMethod the name of the source method - * @param msg the message to insert - * @param thrown the corresponding exception - */ - public static void log( Level level, String sourceClass, String sourceMethod, String msg, Throwable thrown ) - { - log.logp( level, sourceClass, sourceMethod, msg, thrown ); - } -} diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/utils/Message.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/utils/Message.java deleted file mode 100644 index 9e2821938..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/utils/Message.java +++ /dev/null @@ -1,275 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.utils; - -import org.codehaus.plexus.ircd.properties.Config; -import org.codehaus.plexus.ircd.server.Server; -import org.codehaus.plexus.ircd.token.CommandToken; -import org.codehaus.plexus.ircd.token.ParamsToken; -import org.codehaus.plexus.ircd.token.PrefixToken; -import org.codehaus.plexus.ircd.user.User; - -import java.text.NumberFormat; -import java.util.Vector; -import java.util.logging.Level; -import java.util.regex.Pattern; - -public class Message implements IRCString -{ - - private PrefixToken prefixToken; - private CommandToken commandToken; - private ParamsToken paramsToken; - private static int sizeLimit; - private int state; - private static NumberFormat errorCodeFormat = NumberFormat.getInstance(); - - static - { - sizeLimit = Integer.parseInt( Config.getValue( "message.size.limit", "400" ) ); - errorCodeFormat.setMaximumFractionDigits( 0 ); - errorCodeFormat.setMaximumIntegerDigits( 3 ); - errorCodeFormat.setMinimumFractionDigits( 0 ); - errorCodeFormat.setMinimumIntegerDigits( 3 ); - } - - /** - * the default message - */ - public Message() - { - } - - /** - * @param replies the corresponding replies - * @param sParameters the parameters required - */ - public Message( Replies replies, String[] sParameters ) - { - this( User.getDefaultNickName(), replies, sParameters ); - } - - /** - * @param sLogin the sender's login - * @param replies the corresponding replies - * @param sParameters the parameters required - */ - public Message( String sLogin, Replies replies, String[] sParameters ) - { - this( sLogin, errorCodeFormat.format( replies.getCode() ), replies.getMessage( sParameters ), VOID ); - } - - /** - * @param sLogin the sender's login - * @param sCommand the message's command - * @param sMiddle the message's middle - * @param sTrailing the message's trailing - */ - public Message( String sLogin, String sCommand, String sMiddle, String sTrailing ) - { - this( Server.getHost(), sLogin, sCommand, sMiddle, sTrailing ); - } - - /** - * @param sPrefix the message's prefix - * @param sLogin the sender's login - * @param sCommand the message's command - * @param sMiddle the message's middle - * @param sTrailing the message's trailing - */ - public Message( String sPrefix, String sLogin, String sCommand, String sMiddle, String sTrailing ) - { - setPrefixToken( (PrefixToken) PrefixToken.getToken( sPrefix ) ); - setCommandToken( (CommandToken) CommandToken.getToken( sCommand ) ); - if ( sTrailing == null || sTrailing.equals( VOID ) ) - { - setParamsToken( (ParamsToken) ParamsToken.getToken( SPACE + sLogin + SPACE + sMiddle ) ); - } - else - { - setParamsToken( (ParamsToken) ParamsToken.getToken( SPACE + sLogin + SPACE + sMiddle + SPACE + DOUBLE_POINTS + sTrailing ) ); - } - } - - /** - * to create a list of messages from a single message - * @return the resulting list - */ - public static Message[] createSingleMessage( Message message ) - { - return new Message[]{message}; - } - - /** - * to get the command's token - */ - public CommandToken getCommandToken() - { - return commandToken; - } - - /** - * to get the params's token - */ - public ParamsToken getParamsToken() - { - return paramsToken; - } - - /** - * to get the prefix's token - */ - public PrefixToken getPrefixToken() - { - return prefixToken; - } - - /** - * to get the message's size limit - */ - public static int getSizeLimit() - { - return sizeLimit; - } - - /** - * to get the current state - */ - public int getState() - { - return state; - } - - /** - * to know if the message is null - */ - public boolean isNull() - { - return toString().equals( "\015\012" ); - } - - /** - * to parse the mesages - * @param sMessages the messages to parse - * @param iInitialState the initial state - * @return the parsed messages - */ - public static Message[] parse( String sMessages, int iInitialState ) - { - Message[] messages = null; - if ( sMessages == null ) - { - return null; - } - String[] splitedMessages = Pattern.compile( "[\015\012|\012]" ).split( sMessages ); - messages = new Message[splitedMessages.length]; - for ( int i = 0; i < splitedMessages.length; i++ ) - { - messages[i] = new Message(); - messages[i].setState( iInitialState + i ); - String sMessage = splitedMessages[i]; - try - { - String sHead = Utilities.getHead( sMessage ); - if ( sMessage.startsWith( DOUBLE_POINTS ) ) - { - messages[i].setPrefixToken( (PrefixToken) PrefixToken.getToken( sHead.substring( 1 ) ) ); - sMessage = Utilities.getRest( sMessage.substring( sHead.length() ) ); - sHead = Utilities.getHead( sMessage ); - } - messages[i].setCommandToken( (CommandToken) CommandToken.getToken( sHead ) ); - sMessage = sMessage.substring( sHead.length() ); - messages[i].setParamsToken( (ParamsToken) ParamsToken.getToken( sMessage ) ); - } - catch ( Exception e ) - { - Log.log( Level.SEVERE, "Message", "parse", VOID, e ); - } - } - return messages; - } - - /** - * to set the command's token - */ - private void setCommandToken( CommandToken commandToken ) - { - this.commandToken = commandToken; - } - - /** - * to set the params's token - */ - private void setParamsToken( ParamsToken paramsToken ) - { - this.paramsToken = paramsToken; - } - - /** - * to set the prefix's token - */ - private void setPrefixToken( PrefixToken prefixToken ) - { - this.prefixToken = prefixToken; - } - - /** - * to set the message's size limit - */ - public static void setSizeLimit( int sizeLimit ) - { - Message.sizeLimit = sizeLimit; - } - - /** - * to set the current state - */ - private void setState( int state ) - { - this.state = state; - } - - /** - * to get the content of the message - */ - public String toString() - { - StringBuffer buffer = new StringBuffer( 10000 ); - if ( prefixToken != null ) - { - buffer.append( DOUBLE_POINTS + prefixToken + SPACE ); - } - if ( commandToken != null ) - { - buffer.append( commandToken ); - } - if ( paramsToken != null ) - { - buffer.append( paramsToken ); - } - buffer.append( "\015\012" ); - return buffer.toString(); - } - - /** - * to convert a vector of messages to an array of messages - * @param vMessage the source - * @return the resulting array - */ - public static Message[] vector2Messages( Vector vMessage ) - { - if ( vMessage != null ) - { - Message[] messages = new Message[vMessage.size()]; - return (Message[]) vMessage.toArray( messages ); - } - else - { - return null; - } - } -} - diff --git a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/utils/Replies.java b/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/utils/Replies.java deleted file mode 100644 index 824f678f2..000000000 --- a/plexus-servers/ircd/src/main/org/codehaus/plexus/ircd/utils/Replies.java +++ /dev/null @@ -1,173 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.ircd.utils; - -public class Replies -{ - - // IRC Messages - public static final Replies RPL_TRACELINK = new Replies( 200, "Link " ); - public static final Replies RPL_TRACECONNECTING = new Replies( 201, "Try. " ); - public static final Replies RPL_TRACEHANDSHAKE = new Replies( 202, "H.S. " ); - public static final Replies RPL_TRACEUNKNOWN = new Replies( 203, "???? " ); - public static final Replies RPL_TRACEOPERATOR = new Replies( 204, "Oper " ); - public static final Replies RPL_TRACEUSER = new Replies( 205, "User " ); - public static final Replies RPL_TRACESERVER = new Replies( 206, "Serv S C @" ); - public static final Replies RPL_TRACENEWTYPE = new Replies( 208, " 0 " ); - public static final Replies RPL_STATSLINKINFO = new Replies( 211, "

- FtpServer Remote Admin - Introduction - - - - - FtpServer documentation is under construction. Everything you - can find outside this page is to be considered obsolete. - -
- -
Overview -

- All the FTP server administrative tasks can be performed using remote admin - user interface. We can also use SITE command to do that. You can start the admin - console using java -jar ftp-admin.jar. -

-

- The admin UI uses RMI to connect to the server. It also displays the server - real-time data. -

-
-
Configuration Parameters - To be done. -
-
Screenshots - To be done. -
- - diff --git a/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/conf.xml b/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/conf.xml deleted file mode 100644 index bf7e52061..000000000 --- a/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/conf.xml +++ /dev/null @@ -1,201 +0,0 @@ - - - - -
- FtpServer Configuration - - - -
- -
Overview -

- The configuration file is ftp-config.xml. Each configurable component has a xml element - to configure that component. -

-
thread-manager -

- As we are using a single thread pool, we have only one default thread-group xml element. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDefault ValueDescription
nameN/Athread pool name (don't change)
priority5thread priority - normal priority = 5, max-priority = 10 (don't change)
is-daemonfalsedeamon thread or not (don't change)
max-threads10maximum number of threads
min-threads5minimum number of threads
min-spare-threadsmaxThreads - minThreadsminimum number of spare threads
-
-
sockets -

- It configures the socket factories (both server and client). So we have two xml elements - - one for server socket factory and another for client socket factory. Please don't change anything here. -

-
-
ftp-server -

- This is the ftp server configuration block. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDefault ValueDescription
ftp-host127.0.0.1server IP. This is required if we want multihome support.
ftp-port21server port
max-connection20maximum number of ftp client connections
anonymous-max-connection10maximum number of anonymous ftp client connections
anonymous-login-allowedtruedoes it allow anonymous connection
remote-admin-allowedtruedoes it allow RMI based remote administration
remote-admin-port1099port number to be used for remote administration
create-user-homefalsecreate user home if necessary (ie. user home does not exist)
poll-interval120interval in seconds to kick out idle users and reload user manager if necessary
default-idle-time300default idle timeout in seconds
default-user-root/default user root directory
-
-
objectstorage -

- This is used by the file based object repository. This object storage is used - by the object store based file manager. As the default file manager is the - properties file based user manager, this is not used normally. Please don't - change anything here. -

-
-
user-manager -

- This is used by the user manager component. Currently we have four user manager implementations. - All the user manager implementations are in org.apache.ftpserver.usermanager package. -

-
    -
  • - PropertiesUserManager - properties file - based user manager. This is the default user manager. -
  • -
  • - ObjStoreUserManager - object store based user manager. -
  • -
  • - DbUserManager - databased based user manager. - Please see "DB Support" for more details. -
  • -
  • - LdapUserManager - LDAP based user manager. - Please see "LDAP Support" for more details. -
  • -
- - - - - - - - - - - - - - - - -
NameDefault ValueDescription
ftp-admin-nameadminadmin user name
encryptfalsepassword encryption flag - used by the properties file based user manager. The algorithm is MD5.
-
-
ip-restrictor -

- IP restrictor allows/bans specified IPs. - IPs can be specified using a simplified regular expression (*?[^-]). -

- - - - - - - - - - - -
NameDefault ValueDescription
allow-ipfalse"false" value bans the ftp requests from the specified IPs
- and "true" value allows the ftp requests only from the specified Ips.
-
-
- -
diff --git a/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/index.xml b/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/index.xml deleted file mode 100644 index 3386f7812..000000000 --- a/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/index.xml +++ /dev/null @@ -1,146 +0,0 @@ - - - - -
- Apache FtpServer - FTP server based on Apache Avalon - - - - - FtpServer documentation is under construction. Everything you - can find outside this page is to be considered obsolete. - -
- -
Overview -

- FtpServer is a server component for Avalon Phoenix that allows remote FTP client to - attach and download files. The client software can be any type of FTP client - written in any language. The criteria for eligibility is RFC compliance. -

-

- The server uses several components. Some of the components have multiple - implementations. For example user management has implementations that will use - LDAP, JDBC and Cornerstone's Store facility for storage. -

-

- The server has a management console (GUI) that can connect over RMI to the - server. -

-
-
Features -
    -
  1. 100% pure Java, free, open source resumable FTP server!!!
  2. -
  3. Multi platform support and multithreaded design.
  4. -
  5. User virtual directory, write permission, idle time-out and upload/download bandwidth limitation support.
  6. -
  7. You can monitor all the user activities.
  8. -
  9. Anonymous login support.
  10. -
  11. Both upload and download files are resumable.
  12. -
  13. Handles both ASCII and binary data transfers.
  14. -
  15. IP restriction support. You can use a limited set of regular expressions (*?[^-]) to specify the allowed/banned IPs.
  16. -
  17. The server reloads the user data at a regular interval if necessary.
  18. -
  19. Database and LDAP can be used to store user data.
  20. -
  21. Default users admin/admin and anonymous will be created by the server when you start it for the first time.
  22. -
  23. New user managers can be added very easily by adding new user manager.
  24. -
  25. Supports SITE commands. Use SITE HELP to get the available commands.
  26. -
-
-
Components -

- The ftp server consists of several components. The component - implementations and dependencies are declared in ftp-assembly.xml file. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescription
thread-managerManages a set of thread pools
socketsA service to manage the socket factories
connectionsThis is the service through which connection management occurs.
objectstorageManages object repository.
user-managerHandles all ftp server user management.
ip-restrictorIt allows/bans the specified IPs depending on the configuration.
ftp-serverThis is the ftp server starting point.
-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Name>Interfaces
thread-managerorg.apache.avalon.cornerstone.services.threads.ThreadManager
socketsorg.apache.avalon.cornerstone.services.sockets.SocketManager
connectionsorg.apache.avalon.cornerstone.services.connection.ConnectionManager
objectstorageorg.apache.avalon.cornerstone.services.store.Store
user-managerorg.apache.ftpserver.usermanager.UserManagerInterface
ip-restrictororg.apache.ftpserver.ip.IpRestrictorInterface
ftp-serverorg.apache.ftpserver.ip.FtpServerInterface
-

- - - - - - - - - - - - - - - - - -
NameDependency
connectionsthread-manager
user-managerobjectstorage (if we use object store based user manager)
ftp-serversockets, connections, ip-restrictor, user-manager
-

-

- -
diff --git a/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/ip_restr.xml b/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/ip_restr.xml deleted file mode 100644 index c1029cca1..000000000 --- a/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/ip_restr.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - -
- IP Restriction - - - -
- -
Overview -

- You can either ban or allow IPs to access the FTP server. - You can use a limited set of regular expressions (*?[^-]) to specify the allowed/banned IPs. -

-

- The IP restrictor component name is ip-restrictor. - The configuration parameter - allow-ip specifies whether to allow/deny - IPs. IP informations are stored in ip.properties file. -

-
-
Examples -

If allow-ip value is false, the server bans all the specified IPs.

-
    -
  1. 123.234.111.* will ban all IPs from 123.234.111.0 to 123.234.111.255
  2. -
  3. 123.234.111.22? will ban all IPs from 123.234.111.220 to 123.234.111.229
  4. -
  5. 123.234.111.2[1-3]1 will ban 123.234.111.211, 123.234.111.221, 123.234.111.231
  6. -
  7. 123.234.111.2[^1-7]1 will ban 123.234.111.201, 123.234.111.281, 123.234.111.291
  8. -
-

Similarly, allow-ip=true will only allow the specified IPs.

-
- -
diff --git a/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/jdbc_conf.xml b/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/jdbc_conf.xml deleted file mode 100644 index be13c3132..000000000 --- a/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/jdbc_conf.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - -
- Database Support - - - -
- -
Overview -

- DbUserManager is a JDBC based user manager. You would use this module if you have your - username, password and other informations in a JDBC accessible database. -

-

- This user manager has been tested using Oracle 8i and mySQL server. - All the user informations are stored in FTP_USER table. The SQL file is ftp-db.sql. -

- - - - - - - - - - - -
FTP_USER
NameDatatype
LOGIN_IDVARCHAR(64), Primary key
PASSWORDVARCHAR(64)
HOME_DIRVARCHAR(128)
ENABLEDVARCHAR(8)
WRITE_PERMVARCHAR(8)
IDLE_TIMEINT
UPLOAD_RATEINT
DOWNLOAD_RATEINT
-
-
Configurations -
ftp-assembly.xml -

- The first step is to make sure that we are using the right user manager implementation. - The fully qualified name of the LDAP based user manager is org.apache.ftpserver.DbUserManager. - So we have to use this class name in ftp-assembly.xml file. The user-manager block should be: -

- -<!-- user manager block --> -<block class="org.apache.ftpserver.usermanager.DbUserManager" name="user-manager"/> - -
-
ftp-config.xml -

- The next step is to use appropriate configuration parameters. So we have to modify ftp-config.xml file. - The sample block is for MySQL database. -

- -<!-- Database based user manager --> -<driver>org.gjt.mm.mysql.Driver</driver> -<url>jdbc:mysql://localhost/ftpDB</url> -<user>user</user> -<password>password</password> - -

- Configuration parameters : -

-
    -
  • driver : Fully qualified name of the JDBC driver to be used.
  • -
  • url : JDBC database URL.
  • -
  • user : Database user.
  • -
  • password : Database password.
  • -
-

- Besides these, you need to copy the driver jar file in the lib directory. -

-
-
- -
diff --git a/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/ldap_conf.xml b/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/ldap_conf.xml deleted file mode 100644 index ccab18ad1..000000000 --- a/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/ldap_conf.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - -
- LDAP Support - - - -
- -
Overview -

- The LdapUserManager is an user manager implementation that authenticates against an - LDAP server using JNDI login using the ftp server configuration options. You would use - the LdapUserManager if your username and credential information are store in an LDAP - server that is accessible using a JNDI LDAP provider. -

-

- This user manager has been tested using Netscape Directory Server 4.1. - LDAP requires the password to be nonempty for simple authentication. - So instead of using empty string password (""), we will be using single space (" "). - The required LDAP attribute types: -

-
    -
  • memberuid
  • -
  • uid
  • -
  • cn
  • -
  • sn
  • -
  • userpassword
  • -
  • objectclass
  • -
  • enableflag (created by ftp-db.ldif file)
  • -
  • homedirectory
  • -
  • writepermission (created by ftp-db.ldif file)
  • -
  • idletime (created by ftp-db.ldif file)
  • -
  • uploadrate (created by ftp-db.ldif file)
  • -
  • downloadrate (created by ftp-db.ldif file)
  • -
-

- Some of the above mentioned attribute types are created by ftp-db.ldif schema file. - The schema file also creates an object class called ftpUsers derived from - inetOrgPerson and have all these attributes. Assumed LDAP objectclass hierarchy: -

- - top - | - person - | -organizationalPerson - | - inetOrgPerson - | - ftpUsers - -

- Load LDAP schema ftp-db.ldif to add user manager attributes. The commands to load the schema is -

- -ldapmodify -v -h localhost -p 389 -D "cn=Directory Manager" -w <password> -f ftp-db.ldif - -

- Please change host, port, user and password parameters. -

-
-
Configuration -
ftp-assembly.xml -

- The first step is to make sure that we are using the right user manager implementation. - The fully qualified name of the LDAP based user manager is org.apache.ftpserver.LdapUserManager. - So we have to use this class name in ftp-assembly.xml file. The user-manager block should be: -

- -<!-- user manager block --> -<block class="org.apache.ftpserver.usermanager.LdapUserManager" name="user-manager"/> - -
-
ftp-config.xml -

- The next step is to use appropriate configuration parameters. So we have to modify ftp-config.xml file. -

- -<!-- LDAP based user manager --> -<url>ldap://localhost:389</url> -<admin>cn=Directory Manager</admin> -<password>password</password> -<authentication>simple</authentication> -<root>ou=people,o=apache.org</root> -<prefix>uid=</prefix> -<suffix>,ou=people,o=apache.org</suffix> - -

- Configuration parameters : -

-
    -
  • url : The ldap URL for the LDAP server. - For example, ldap://localhost:389 URL means LDAP has been installed in the local machine and the port is 389.
  • -
  • admin : This is the distinguished name (DN) of the LDAP administrator.
  • -
  • password : LDAP administrator's password.
  • -
  • authentication : Security level to use. This defaults to "simple".
  • -
  • root : The LDAP root where the ftp users will be stored.
  • -
  • prefix : A prefix to add to the username to form the user distinguished name (DN). - See suffix for more info..
  • -
  • suffix : Suffix to add to the username when forming the user distiguished name (DN). - This is useful if you prompt a user for a username and you don't want the user to have to enter the - fully distinguished name. Using this property and prefix the userDN will be formed as String userDN = prefix + username + suffix;
  • -
-
-
- -
diff --git a/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/rfc765.xml b/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/rfc765.xml deleted file mode 100644 index fd49175b2..000000000 --- a/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/rfc765.xml +++ /dev/null @@ -1,3906 +0,0 @@ - - - -
- RFC 765 - - - - -
- -
RFC 765 text - -| User | - |\----^----/| -------- - ---------- | | | - |/------\| FTP Commands |/----V----\| - ||Server|<---------------->| User || - || PI || FTP Replies || PI || - |\--^---/| |\----^----/| - | | | | | | - -------- |/--V---\| Data |/----V----\| -------- - | File |<--->|Server|<---------------->| User |<--->| File | - |System| || DTP || Connection || DTP || |System| - -------- |\------/| |\---------/| -------- - ---------- ------------- - - Server-FTP USER-FTP - - NOTES: 1. The data connection may be used in either direction. - 2. The data connection need not exist all of the time. - - Figure 1 Model for FTP Use - - In the model described in Figure 1, the user-protocol interpreter - initiates the control connection. The control connection follows - the Telnet protocol. At the initiation of the user, standard FTP - commands are generated by the user-PI and transmitted to the - server process via the control connection. (The user may - establish a direct control connection to the server-FTP, from a - TAC terminal for example, and generate standard FTP commands - independently, bypassing the user-FTP process.) Standard replies - are sent from the server-PI to the user-PI over the control - connection in response to the commands. - - The FTP commands specify the parameters for the data connection - (data port, transfer mode, representation type, and structure) and - the nature of file system operation (store, retrieve, append, - delete, etc.). The user-DTP or its designate should "listen" on - the specified data port, and the server initiate the data - connection and data transfer in accordance with the specified - parameters. It should be noted that the data port need not be in - - -Postel & Reynolds [Page 8] - - - -RFC 959 October 1985 -File Transfer Protocol - - - the same host that initiates the FTP commands via the control - connection, but the user or the user-FTP process must ensure a - "listen" on the specified data port. It ought to also be noted - that the data connection may be used for simultaneous sending and - receiving. - - In another situation a user might wish to transfer files between - two hosts, neither of which is a local host. The user sets up - control connections to the two servers and then arranges for a - data connection between them. In this manner, control information - is passed to the user-PI but data is transferred between the - server data transfer processes. Following is a model of this - server-server interaction. - - - Control ------------ Control - ---------->| User-FTP |<----------- - | | User-PI | | - | | "C" | | - V ------------ V - -------------- -------------- - | Server-FTP | Data Connection | Server-FTP | - | "A" |<---------------------->| "B" | - -------------- Port (A) Port (B) -------------- - - - Figure 2 - - The protocol requires that the control connections be open while - data transfer is in progress. It is the responsibility of the - user to request the closing of the control connections when - finished using the FTP service, while it is the server who takes - the action. The server may abort data transfer if the control - connections are closed without command. - - The Relationship between FTP and Telnet: - - The FTP uses the Telnet protocol on the control connection. - This can be achieved in two ways: first, the user-PI or the - server-PI may implement the rules of the Telnet Protocol - directly in their own procedures; or, second, the user-PI or - the server-PI may make use of the existing Telnet module in the - system. - - Ease of implementaion, sharing code, and modular programming - argue for the second approach. Efficiency and independence - - - -Postel & Reynolds [Page 9] - - - -RFC 959 October 1985 -File Transfer Protocol - - - argue for the first approach. In practice, FTP relies on very - little of the Telnet Protocol, so the first approach does not - necessarily involve a large amount of code. - -3. DATA TRANSFER FUNCTIONS - - Files are transferred only via the data connection. The control - connection is used for the transfer of commands, which describe the - functions to be performed, and the replies to these commands (see the - Section on FTP Replies). Several commands are concerned with the - transfer of data between hosts. These data transfer commands include - the MODE command which specify how the bits of the data are to be - transmitted, and the STRUcture and TYPE commands, which are used to - define the way in which the data are to be represented. The - transmission and representation are basically independent but the - "Stream" transmission mode is dependent on the file structure - attribute and if "Compressed" transmission mode is used, the nature - of the filler byte depends on the representation type. - - 3.1. DATA REPRESENTATION AND STORAGE - - Data is transferred from a storage device in the sending host to a - storage device in the receiving host. Often it is necessary to - perform certain transformations on the data because data storage - representations in the two systems are different. For example, - NVT-ASCII has different data storage representations in different - systems. DEC TOPS-20s's generally store NVT-ASCII as five 7-bit - ASCII characters, left-justified in a 36-bit word. IBM Mainframe's - store NVT-ASCII as 8-bit EBCDIC codes. Multics stores NVT-ASCII - as four 9-bit characters in a 36-bit word. It is desirable to - convert characters into the standard NVT-ASCII representation when - transmitting text between dissimilar systems. The sending and - receiving sites would have to perform the necessary - transformations between the standard representation and their - internal representations. - - A different problem in representation arises when transmitting - binary data (not character codes) between host systems with - different word lengths. It is not always clear how the sender - should send data, and the receiver store it. For example, when - transmitting 32-bit bytes from a 32-bit word-length system to a - 36-bit word-length system, it may be desirable (for reasons of - efficiency and usefulness) to store the 32-bit bytes - right-justified in a 36-bit word in the latter system. In any - case, the user should have the option of specifying data - representation and transformation functions. It should be noted - - - -Postel & Reynolds [Page 10] - - - -RFC 959 October 1985 -File Transfer Protocol - - - that FTP provides for very limited data type representations. - Transformations desired beyond this limited capability should be - performed by the user directly. - - 3.1.1. DATA TYPES - - Data representations are handled in FTP by a user specifying a - representation type. This type may implicitly (as in ASCII or - EBCDIC) or explicitly (as in Local byte) define a byte size for - interpretation which is referred to as the "logical byte size." - Note that this has nothing to do with the byte size used for - transmission over the data connection, called the "transfer - byte size", and the two should not be confused. For example, - NVT-ASCII has a logical byte size of 8 bits. If the type is - Local byte, then the TYPE command has an obligatory second - parameter specifying the logical byte size. The transfer byte - size is always 8 bits. - - 3.1.1.1. ASCII TYPE - - This is the default type and must be accepted by all FTP - implementations. It is intended primarily for the transfer - of text files, except when both hosts would find the EBCDIC - type more convenient. - - The sender converts the data from an internal character - representation to the standard 8-bit NVT-ASCII - representation (see the Telnet specification). The receiver - will convert the data from the standard form to his own - internal form. - - In accordance with the NVT standard, the sequence - should be used where necessary to denote the end of a line - of text. (See the discussion of file structure at the end - of the Section on Data Representation and Storage.) - - Using the standard NVT-ASCII representation means that data - must be interpreted as 8-bit bytes. - - The Format parameter for ASCII and EBCDIC types is discussed - below. - - - - - - - - -Postel & Reynolds [Page 11] - - - -RFC 959 October 1985 -File Transfer Protocol - - - 3.1.1.2. EBCDIC TYPE - - This type is intended for efficient transfer between hosts - which use EBCDIC for their internal character - representation. - - For transmission, the data are represented as 8-bit EBCDIC - characters. The character code is the only difference - between the functional specifications of EBCDIC and ASCII - types. - - End-of-line (as opposed to end-of-record--see the discussion - of structure) will probably be rarely used with EBCDIC type - for purposes of denoting structure, but where it is - necessary the character should be used. - - 3.1.1.3. IMAGE TYPE - - The data are sent as contiguous bits which, for transfer, - are packed into the 8-bit transfer bytes. The receiving - site must store the data as contiguous bits. The structure - of the storage system might necessitate the padding of the - file (or of each record, for a record-structured file) to - some convenient boundary (byte, word or block). This - padding, which must be all zeros, may occur only at the end - of the file (or at the end of each record) and there must be - a way of identifying the padding bits so that they may be - stripped off if the file is retrieved. The padding - transformation should be well publicized to enable a user to - process a file at the storage site. - - Image type is intended for the efficient storage and - retrieval of files and for the transfer of binary data. It - is recommended that this type be accepted by all FTP - implementations. - - 3.1.1.4. LOCAL TYPE - - The data is transferred in logical bytes of the size - specified by the obligatory second parameter, Byte size. - The value of Byte size must be a decimal integer; there is - no default value. The logical byte size is not necessarily - the same as the transfer byte size. If there is a - difference in byte sizes, then the logical bytes should be - packed contiguously, disregarding transfer byte boundaries - and with any necessary padding at the end. - - - -Postel & Reynolds [Page 12] - - - -RFC 959 October 1985 -File Transfer Protocol - - - When the data reaches the receiving host, it will be - transformed in a manner dependent on the logical byte size - and the particular host. This transformation must be - invertible (i.e., an identical file can be retrieved if the - same parameters are used) and should be well publicized by - the FTP implementors. - - For example, a user sending 36-bit floating-point numbers to - a host with a 32-bit word could send that data as Local byte - with a logical byte size of 36. The receiving host would - then be expected to store the logical bytes so that they - could be easily manipulated; in this example putting the - 36-bit logical bytes into 64-bit double words should - suffice. - - In another example, a pair of hosts with a 36-bit word size - may send data to one another in words by using TYPE L 36. - The data would be sent in the 8-bit transmission bytes - packed so that 9 transmission bytes carried two host words. - - 3.1.1.5. FORMAT CONTROL - - The types ASCII and EBCDIC also take a second (optional) - parameter; this is to indicate what kind of vertical format - control, if any, is associated with a file. The following - data representation types are defined in FTP: - - A character file may be transferred to a host for one of - three purposes: for printing, for storage and later - retrieval, or for processing. If a file is sent for - printing, the receiving host must know how the vertical - format control is represented. In the second case, it must - be possible to store a file at a host and then retrieve it - later in exactly the same form. Finally, it should be - possible to move a file from one host to another and process - the file at the second host without undue trouble. A single - ASCII or EBCDIC format does not satisfy all these - conditions. Therefore, these types have a second parameter - specifying one of the following three formats: - - 3.1.1.5.1. NON PRINT - - This is the default format to be used if the second - (format) parameter is omitted. Non-print format must be - accepted by all FTP implementations. - - - - -Postel & Reynolds [Page 13] - - - -RFC 959 October 1985 -File Transfer Protocol - - - The file need contain no vertical format information. If - it is passed to a printer process, this process may - assume standard values for spacing and margins. - - Normally, this format will be used with files destined - for processing or just storage. - - 3.1.1.5.2. TELNET FORMAT CONTROLS - - The file contains ASCII/EBCDIC vertical format controls - (i.e., , , , , ) which the printer - process will interpret appropriately. , in exactly - this sequence, also denotes end-of-line. - - 3.1.1.5.2. CARRIAGE CONTROL (ASA) - - The file contains ASA (FORTRAN) vertical format control - characters. (See RFC 740 Appendix C; and Communications - of the ACM, Vol. 7, No. 10, p. 606, October 1964.) In a - line or a record formatted according to the ASA Standard, - the first character is not to be printed. Instead, it - should be used to determine the vertical movement of the - paper which should take place before the rest of the - record is printed. - - The ASA Standard specifies the following control - characters: - - Character Vertical Spacing - - blank Move paper up one line - 0 Move paper up two lines - 1 Move paper to top of next page - + No movement, i.e., overprint - - Clearly there must be some way for a printer process to - distinguish the end of the structural entity. If a file - has record structure (see below) this is no problem; - records will be explicitly marked during transfer and - storage. If the file has no record structure, the - end-of-line sequence is used to separate printing lines, - but these format effectors are overridden by the ASA - controls. - - - - - - -Postel & Reynolds [Page 14] - - - -RFC 959 October 1985 -File Transfer Protocol - - - 3.1.2. DATA STRUCTURES - - In addition to different representation types, FTP allows the - structure of a file to be specified. Three file structures are - defined in FTP: - - file-structure, where there is no internal structure and - the file is considered to be a - continuous sequence of data bytes, - - record-structure, where the file is made up of sequential - records, - - and page-structure, where the file is made up of independent - indexed pages. - - File-structure is the default to be assumed if the STRUcture - command has not been used but both file and record structures - must be accepted for "text" files (i.e., files with TYPE ASCII - or EBCDIC) by all FTP implementations. The structure of a file - will affect both the transfer mode of a file (see the Section - on Transmission Modes) and the interpretation and storage of - the file. - - The "natural" structure of a file will depend on which host - stores the file. A source-code file will usually be stored on - an IBM Mainframe in fixed length records but on a DEC TOPS-20 - as a stream of characters partitioned into lines, for example - by . If the transfer of files between such disparate - sites is to be useful, there must be some way for one site to - recognize the other's assumptions about the file. - - With some sites being naturally file-oriented and others - naturally record-oriented there may be problems if a file with - one structure is sent to a host oriented to the other. If a - text file is sent with record-structure to a host which is file - oriented, then that host should apply an internal - transformation to the file based on the record structure. - Obviously, this transformation should be useful, but it must - also be invertible so that an identical file may be retrieved - using record structure. - - In the case of a file being sent with file-structure to a - record-oriented host, there exists the question of what - criteria the host should use to divide the file into records - which can be processed locally. If this division is necessary, - the FTP implementation should use the end-of-line sequence, - - -Postel & Reynolds [Page 15] - - - -RFC 959 October 1985 -File Transfer Protocol - - - for ASCII, or for EBCDIC text files, as the - delimiter. If an FTP implementation adopts this technique, it - must be prepared to reverse the transformation if the file is - retrieved with file-structure. - - 3.1.2.1. FILE STRUCTURE - - File structure is the default to be assumed if the STRUcture - command has not been used. - - In file-structure there is no internal structure and the - file is considered to be a continuous sequence of data - bytes. - - 3.1.2.2. RECORD STRUCTURE - - Record structures must be accepted for "text" files (i.e., - files with TYPE ASCII or EBCDIC) by all FTP implementations. - - In record-structure the file is made up of sequential - records. - - 3.1.2.3. PAGE STRUCTURE - - To transmit files that are discontinuous, FTP defines a page - structure. Files of this type are sometimes known as - "random access files" or even as "holey files". In these - files there is sometimes other information associated with - the file as a whole (e.g., a file descriptor), or with a - section of the file (e.g., page access controls), or both. - In FTP, the sections of the file are called pages. - - To provide for various page sizes and associated - information, each page is sent with a page header. The page - header has the following defined fields: - - Header Length - - The number of logical bytes in the page header - including this byte. The minimum header length is 4. - - Page Index - - The logical page number of this section of the file. - This is not the transmission sequence number of this - page, but the index used to identify this page of the - file. - - -Postel & Reynolds [Page 16] - - - -RFC 959 October 1985 -File Transfer Protocol - - - Data Length - - The number of logical bytes in the page data. The - minimum data length is 0. - - Page Type - - The type of page this is. The following page types - are defined: - - 0 = Last Page - - This is used to indicate the end of a paged - structured transmission. The header length must - be 4, and the data length must be 0. - - 1 = Simple Page - - This is the normal type for simple paged files - with no page level associated control - information. The header length must be 4. - - 2 = Descriptor Page - - This type is used to transmit the descriptive - information for the file as a whole. - - 3 = Access Controlled Page - - This type includes an additional header field - for paged files with page level access control - information. The header length must be 5. - - Optional Fields - - Further header fields may be used to supply per page - control information, for example, per page access - control. - - All fields are one logical byte in length. The logical byte - size is specified by the TYPE command. See Appendix I for - further details and a specific case at the page structure. - - A note of caution about parameters: a file must be stored and - retrieved with the same parameters if the retrieved version is to - - - - -Postel & Reynolds [Page 17] - - - -RFC 959 October 1985 -File Transfer Protocol - - - be identical to the version originally transmitted. Conversely, - FTP implementations must return a file identical to the original - if the parameters used to store and retrieve a file are the same. - - 3.2. ESTABLISHING DATA CONNECTIONS - - The mechanics of transferring data consists of setting up the data - connection to the appropriate ports and choosing the parameters - for transfer. Both the user and the server-DTPs have a default - data port. The user-process default data port is the same as the - control connection port (i.e., U). The server-process default - data port is the port adjacent to the control connection port - (i.e., L-1). - - The transfer byte size is 8-bit bytes. This byte size is relevant - only for the actual transfer of the data; it has no bearing on - representation of the data within a host's file system. - - The passive data transfer process (this may be a user-DTP or a - second server-DTP) shall "listen" on the data port prior to - sending a transfer request command. The FTP request command - determines the direction of the data transfer. The server, upon - receiving the transfer request, will initiate the data connection - to the port. When the connection is established, the data - transfer begins between DTP's, and the server-PI sends a - confirming reply to the user-PI. - - Every FTP implementation must support the use of the default data - ports, and only the USER-PI can initiate a change to non-default - ports. - - It is possible for the user to specify an alternate data port by - use of the PORT command. The user may want a file dumped on a TAC - line printer or retrieved from a third party host. In the latter - case, the user-PI sets up control connections with both - server-PI's. One server is then told (by an FTP command) to - "listen" for a connection which the other will initiate. The - user-PI sends one server-PI a PORT command indicating the data - port of the other. Finally, both are sent the appropriate - transfer commands. The exact sequence of commands and replies - sent between the user-controller and the servers is defined in the - Section on FTP Replies. - - In general, it is the server's responsibility to maintain the data - connection--to initiate it and to close it. The exception to this - - - - -Postel & Reynolds [Page 18] - - - -RFC 959 October 1985 -File Transfer Protocol - - - is when the user-DTP is sending the data in a transfer mode that - requires the connection to be closed to indicate EOF. The server - MUST close the data connection under the following conditions: - - 1. The server has completed sending data in a transfer mode - that requires a close to indicate EOF. - - 2. The server receives an ABORT command from the user. - - 3. The port specification is changed by a command from the - user. - - 4. The control connection is closed legally or otherwise. - - 5. An irrecoverable error condition occurs. - - Otherwise the close is a server option, the exercise of which the - server must indicate to the user-process by either a 250 or 226 - reply only. - - 3.3. DATA CONNECTION MANAGEMENT - - Default Data Connection Ports: All FTP implementations must - support use of the default data connection ports, and only the - User-PI may initiate the use of non-default ports. - - Negotiating Non-Default Data Ports: The User-PI may specify a - non-default user side data port with the PORT command. The - User-PI may request the server side to identify a non-default - server side data port with the PASV command. Since a connection - is defined by the pair of addresses, either of these actions is - enough to get a different data connection, still it is permitted - to do both commands to use new ports on both ends of the data - connection. - - Reuse of the Data Connection: When using the stream mode of data - transfer the end of the file must be indicated by closing the - connection. This causes a problem if multiple files are to be - transfered in the session, due to need for TCP to hold the - connection record for a time out period to guarantee the reliable - communication. Thus the connection can not be reopened at once. - - There are two solutions to this problem. The first is to - negotiate a non-default port. The second is to use another - transfer mode. - - A comment on transfer modes. The stream transfer mode is - - -Postel & Reynolds [Page 19] - - - -RFC 959 October 1985 -File Transfer Protocol - - - inherently unreliable, since one can not determine if the - connection closed prematurely or not. The other transfer modes - (Block, Compressed) do not close the connection to indicate the - end of file. They have enough FTP encoding that the data - connection can be parsed to determine the end of the file. - Thus using these modes one can leave the data connection open - for multiple file transfers. - - 3.4. TRANSMISSION MODES - - The next consideration in transferring data is choosing the - appropriate transmission mode. There are three modes: one which - formats the data and allows for restart procedures; one which also - compresses the data for efficient transfer; and one which passes - the data with little or no processing. In this last case the mode - interacts with the structure attribute to determine the type of - processing. In the compressed mode, the representation type - determines the filler byte. - - All data transfers must be completed with an end-of-file (EOF) - which may be explicitly stated or implied by the closing of the - data connection. For files with record structure, all the - end-of-record markers (EOR) are explicit, including the final one. - For files transmitted in page structure a "last-page" page type is - used. - - NOTE: In the rest of this section, byte means "transfer byte" - except where explicitly stated otherwise. - - For the purpose of standardized transfer, the sending host will - translate its internal end of line or end of record denotation - into the representation prescribed by the transfer mode and file - structure, and the receiving host will perform the inverse - translation to its internal denotation. An IBM Mainframe record - count field may not be recognized at another host, so the - end-of-record information may be transferred as a two byte control - code in Stream mode or as a flagged bit in a Block or Compressed - mode descriptor. End-of-line in an ASCII or EBCDIC file with no - record structure should be indicated by or , - respectively. Since these transformations imply extra work for - some systems, identical systems transferring non-record structured - text files might wish to use a binary representation and stream - mode for the transfer. - - - - - - -Postel & Reynolds [Page 20] - - - -RFC 959 October 1985 -File Transfer Protocol - - - The following transmission modes are defined in FTP: - - 3.4.1. STREAM MODE - - The data is transmitted as a stream of bytes. There is no - restriction on the representation type used; record structures - are allowed. - - In a record structured file EOR and EOF will each be indicated - by a two-byte control code. The first byte of the control code - will be all ones, the escape character. The second byte will - have the low order bit on and zeros elsewhere for EOR and the - second low order bit on for EOF; that is, the byte will have - value 1 for EOR and value 2 for EOF. EOR and EOF may be - indicated together on the last byte transmitted by turning both - low order bits on (i.e., the value 3). If a byte of all ones - was intended to be sent as data, it should be repeated in the - second byte of the control code. - - If the structure is a file structure, the EOF is indicated by - the sending host closing the data connection and all bytes are - data bytes. - - 3.4.2. BLOCK MODE - - The file is transmitted as a series of data blocks preceded by - one or more header bytes. The header bytes contain a count - field, and descriptor code. The count field indicates the - total length of the data block in bytes, thus marking the - beginning of the next data block (there are no filler bits). - The descriptor code defines: last block in the file (EOF) last - block in the record (EOR), restart marker (see the Section on - Error Recovery and Restart) or suspect data (i.e., the data - being transferred is suspected of errors and is not reliable). - This last code is NOT intended for error control within FTP. - It is motivated by the desire of sites exchanging certain types - of data (e.g., seismic or weather data) to send and receive all - the data despite local errors (such as "magnetic tape read - errors"), but to indicate in the transmission that certain - portions are suspect). Record structures are allowed in this - mode, and any representation type may be used. - - The header consists of the three bytes. Of the 24 bits of - header information, the 16 low order bits shall represent byte - count, and the 8 high order bits shall represent descriptor - codes as shown below. - - - -Postel & Reynolds [Page 21] - - - -RFC 959 October 1985 -File Transfer Protocol - - - Block Header - - +----------------+----------------+----------------+ - | Descriptor | Byte Count | - | 8 bits | 16 bits | - +----------------+----------------+----------------+ - - - The descriptor codes are indicated by bit flags in the - descriptor byte. Four codes have been assigned, where each - code number is the decimal value of the corresponding bit in - the byte. - - Code Meaning - - 128 End of data block is EOR - 64 End of data block is EOF - 32 Suspected errors in data block - 16 Data block is a restart marker - - With this encoding, more than one descriptor coded condition - may exist for a particular block. As many bits as necessary - may be flagged. - - The restart marker is embedded in the data stream as an - integral number of 8-bit bytes representing printable - characters in the language being used over the control - connection (e.g., default--NVT-ASCII). (Space, in the - appropriate language) must not be used WITHIN a restart marker. - - For example, to transmit a six-character marker, the following - would be sent: - - +--------+--------+--------+ - |Descrptr| Byte count | - |code= 16| = 6 | - +--------+--------+--------+ - - +--------+--------+--------+ - | Marker | Marker | Marker | - | 8 bits | 8 bits | 8 bits | - +--------+--------+--------+ - - +--------+--------+--------+ - | Marker | Marker | Marker | - | 8 bits | 8 bits | 8 bits | - +--------+--------+--------+ - - -Postel & Reynolds [Page 22] - - - -RFC 959 October 1985 -File Transfer Protocol - - - 3.4.3. COMPRESSED MODE - - There are three kinds of information to be sent: regular data, - sent in a byte string; compressed data, consisting of - replications or filler; and control information, sent in a - two-byte escape sequence. If n>0 bytes (up to 127) of regular - data are sent, these n bytes are preceded by a byte with the - left-most bit set to 0 and the right-most 7 bits containing the - number n. - - Byte string: - - 1 7 8 8 - +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ - |0| n | | d(1) | ... | d(n) | - +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ - ^ ^ - |---n bytes---| - of data - - String of n data bytes d(1),..., d(n) - Count n must be positive. - - To compress a string of n replications of the data byte d, the - following 2 bytes are sent: - - Replicated Byte: - - 2 6 8 - +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ - |1 0| n | | d | - +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ - - A string of n filler bytes can be compressed into a single - byte, where the filler byte varies with the representation - type. If the type is ASCII or EBCDIC the filler byte is - (Space, ASCII code 32, EBCDIC code 64). If the type is Image - or Local byte the filler is a zero byte. - - Filler String: - - 2 6 - +-+-+-+-+-+-+-+-+ - |1 1| n | - +-+-+-+-+-+-+-+-+ - - The escape sequence is a double byte, the first of which is the - - -Postel & Reynolds [Page 23] - - - -RFC 959 October 1985 -File Transfer Protocol - - - escape byte (all zeros) and the second of which contains - descriptor codes as defined in Block mode. The descriptor - codes have the same meaning as in Block mode and apply to the - succeeding string of bytes. - - Compressed mode is useful for obtaining increased bandwidth on - very large network transmissions at a little extra CPU cost. - It can be most effectively used to reduce the size of printer - files such as those generated by RJE hosts. - - 3.5. ERROR RECOVERY AND RESTART - - There is no provision for detecting bits lost or scrambled in data - transfer; this level of error control is handled by the TCP. - However, a restart procedure is provided to protect users from - gross system failures (including failures of a host, an - FTP-process, or the underlying network). - - The restart procedure is defined only for the block and compressed - modes of data transfer. It requires the sender of data to insert - a special marker code in the data stream with some marker - information. The marker information has meaning only to the - sender, but must consist of printable characters in the default or - negotiated language of the control connection (ASCII or EBCDIC). - The marker could represent a bit-count, a record-count, or any - other information by which a system may identify a data - checkpoint. The receiver of data, if it implements the restart - procedure, would then mark the corresponding position of this - marker in the receiving system, and return this information to the - user. - - In the event of a system failure, the user can restart the data - transfer by identifying the marker point with the FTP restart - procedure. The following example illustrates the use of the - restart procedure. - - The sender of the data inserts an appropriate marker block in the - data stream at a convenient point. The receiving host marks the - corresponding data point in its file system and conveys the last - known sender and receiver marker information to the user, either - directly or over the control connection in a 110 reply (depending - on who is the sender). In the event of a system failure, the user - or controller process restarts the server at the last server - marker by sending a restart command with server's marker code as - its argument. The restart command is transmitted over the control - - - - -Postel & Reynolds [Page 24] - - - -RFC 959 October 1985 -File Transfer Protocol - - - connection and is immediately followed by the command (such as - RETR, STOR or LIST) which was being executed when the system - failure occurred. - -4. FILE TRANSFER FUNCTIONS - - The communication channel from the user-PI to the server-PI is - established as a TCP connection from the user to the standard server - port. The user protocol interpreter is responsible for sending FTP - commands and interpreting the replies received; the server-PI - interprets commands, sends replies and directs its DTP to set up the - data connection and transfer the data. If the second party to the - data transfer (the passive transfer process) is the user-DTP, then it - is governed through the internal protocol of the user-FTP host; if it - is a second server-DTP, then it is governed by its PI on command from - the user-PI. The FTP replies are discussed in the next section. In - the description of a few of the commands in this section, it is - helpful to be explicit about the possible replies. - - 4.1. FTP COMMANDS - - 4.1.1. ACCESS CONTROL COMMANDS - - The following commands specify access control identifiers - (command codes are shown in parentheses). - - USER NAME (USER) - - The argument field is a Telnet string identifying the user. - The user identification is that which is required by the - server for access to its file system. This command will - normally be the first command transmitted by the user after - the control connections are made (some servers may require - this). Additional identification information in the form of - a password and/or an account command may also be required by - some servers. Servers may allow a new USER command to be - entered at any point in order to change the access control - and/or accounting information. This has the effect of - flushing any user, password, and account information already - supplied and beginning the login sequence again. All - transfer parameters are unchanged and any file transfer in - progress is completed under the old access control - parameters. - - - - - - -Postel & Reynolds [Page 25] - - - -RFC 959 October 1985 -File Transfer Protocol - - - PASSWORD (PASS) - - The argument field is a Telnet string specifying the user's - password. This command must be immediately preceded by the - user name command, and, for some sites, completes the user's - identification for access control. Since password - information is quite sensitive, it is desirable in general - to "mask" it or suppress typeout. It appears that the - server has no foolproof way to achieve this. It is - therefore the responsibility of the user-FTP process to hide - the sensitive password information. - - ACCOUNT (ACCT) - - The argument field is a Telnet string identifying the user's - account. The command is not necessarily related to the USER - command, as some sites may require an account for login and - others only for specific access, such as storing files. In - the latter case the command may arrive at any time. - - There are reply codes to differentiate these cases for the - automation: when account information is required for login, - the response to a successful PASSword command is reply code - 332. On the other hand, if account information is NOT - required for login, the reply to a successful PASSword - command is 230; and if the account information is needed for - a command issued later in the dialogue, the server should - return a 332 or 532 reply depending on whether it stores - (pending receipt of the ACCounT command) or discards the - command, respectively. - - CHANGE WORKING DIRECTORY (CWD) - - This command allows the user to work with a different - directory or dataset for file storage or retrieval without - altering his login or accounting information. Transfer - parameters are similarly unchanged. The argument is a - pathname specifying a directory or other system dependent - file group designator. - - CHANGE TO PARENT DIRECTORY (CDUP) - - This command is a special case of CWD, and is included to - simplify the implementation of programs for transferring - directory trees between operating systems having different - - - - -Postel & Reynolds [Page 26] - - - -RFC 959 October 1985 -File Transfer Protocol - - - syntaxes for naming the parent directory. The reply codes - shall be identical to the reply codes of CWD. See - Appendix II for further details. - - STRUCTURE MOUNT (SMNT) - - This command allows the user to mount a different file - system data structure without altering his login or - accounting information. Transfer parameters are similarly - unchanged. The argument is a pathname specifying a - directory or other system dependent file group designator. - - REINITIALIZE (REIN) - - This command terminates a USER, flushing all I/O and account - information, except to allow any transfer in progress to be - completed. All parameters are reset to the default settings - and the control connection is left open. This is identical - to the state in which a user finds himself immediately after - the control connection is opened. A USER command may be - expected to follow. - - LOGOUT (QUIT) - - This command terminates a USER and if file transfer is not - in progress, the server closes the control connection. If - file transfer is in progress, the connection will remain - open for result response and the server will then close it. - If the user-process is transferring files for several USERs - but does not wish to close and then reopen connections for - each, then the REIN command should be used instead of QUIT. - - An unexpected close on the control connection will cause the - server to take the effective action of an abort (ABOR) and a - logout (QUIT). - - 4.1.2. TRANSFER PARAMETER COMMANDS - - All data transfer parameters have default values, and the - commands specifying data transfer parameters are required only - if the default parameter values are to be changed. The default - value is the last specified value, or if no value has been - specified, the standard default value is as stated here. This - implies that the server must "remember" the applicable default - values. The commands may be in any order except that they must - precede the FTP service request. The following commands - specify data transfer parameters: - - -Postel & Reynolds [Page 27] - - - -RFC 959 October 1985 -File Transfer Protocol - - - DATA PORT (PORT) - - The argument is a HOST-PORT specification for the data port - to be used in data connection. There are defaults for both - the user and server data ports, and under normal - circumstances this command and its reply are not needed. If - this command is used, the argument is the concatenation of a - 32-bit internet host address and a 16-bit TCP port address. - This address information is broken into 8-bit fields and the - value of each field is transmitted as a decimal number (in - character string representation). The fields are separated - by commas. A port command would be: - - PORT h1,h2,h3,h4,p1,p2 - - where h1 is the high order 8 bits of the internet host - address. - - PASSIVE (PASV) - - This command requests the server-DTP to "listen" on a data - port (which is not its default data port) and to wait for a - connection rather than initiate one upon receipt of a - transfer command. The response to this command includes the - host and port address this server is listening on. - - REPRESENTATION TYPE (TYPE) - - The argument specifies the representation type as described - in the Section on Data Representation and Storage. Several - types take a second parameter. The first parameter is - denoted by a single Telnet character, as is the second - Format parameter for ASCII and EBCDIC; the second parameter - for local byte is a decimal integer to indicate Bytesize. - The parameters are separated by a (Space, ASCII code - 32). - - The following codes are assigned for type: - - \ / - A - ASCII | | N - Non-print - |-><-| T - Telnet format effectors - E - EBCDIC| | C - Carriage Control (ASA) - / \ - I - Image - - L - Local byte Byte size - - -Postel & Reynolds [Page 28] - - - -RFC 959 October 1985 -File Transfer Protocol - - - The default representation type is ASCII Non-print. If the - Format parameter is changed, and later just the first - argument is changed, Format then returns to the Non-print - default. - - FILE STRUCTURE (STRU) - - The argument is a single Telnet character code specifying - file structure described in the Section on Data - Representation and Storage. - - The following codes are assigned for structure: - - F - File (no record structure) - R - Record structure - P - Page structure - - The default structure is File. - - TRANSFER MODE (MODE) - - The argument is a single Telnet character code specifying - the data transfer modes described in the Section on - Transmission Modes. - - The following codes are assigned for transfer modes: - - S - Stream - B - Block - C - Compressed - - The default transfer mode is Stream. - - 4.1.3. FTP SERVICE COMMANDS - - The FTP service commands define the file transfer or the file - system function requested by the user. The argument of an FTP - service command will normally be a pathname. The syntax of - pathnames must conform to server site conventions (with - standard defaults applicable), and the language conventions of - the control connection. The suggested default handling is to - use the last specified device, directory or file name, or the - standard default defined for local users. The commands may be - in any order except that a "rename from" command must be - followed by a "rename to" command and the restart command must - be followed by the interrupted service command (e.g., STOR or - RETR). The data, when transferred in response to FTP service - - -Postel & Reynolds [Page 29] - - - -RFC 959 October 1985 -File Transfer Protocol - - - commands, shall always be sent over the data connection, except - for certain informative replies. The following commands - specify FTP service requests: - - RETRIEVE (RETR) - - This command causes the server-DTP to transfer a copy of the - file, specified in the pathname, to the server- or user-DTP - at the other end of the data connection. The status and - contents of the file at the server site shall be unaffected. - - STORE (STOR) - - This command causes the server-DTP to accept the data - transferred via the data connection and to store the data as - a file at the server site. If the file specified in the - pathname exists at the server site, then its contents shall - be replaced by the data being transferred. A new file is - created at the server site if the file specified in the - pathname does not already exist. - - STORE UNIQUE (STOU) - - This command behaves like STOR except that the resultant - file is to be created in the current directory under a name - unique to that directory. The 250 Transfer Started response - must include the name generated. - - APPEND (with create) (APPE) - - This command causes the server-DTP to accept the data - transferred via the data connection and to store the data in - a file at the server site. If the file specified in the - pathname exists at the server site, then the data shall be - appended to that file; otherwise the file specified in the - pathname shall be created at the server site. - - ALLOCATE (ALLO) - - This command may be required by some servers to reserve - sufficient storage to accommodate the new file to be - transferred. The argument shall be a decimal integer - representing the number of bytes (using the logical byte - size) of storage to be reserved for the file. For files - sent with record or page structure a maximum record or page - size (in logical bytes) might also be necessary; this is - indicated by a decimal integer in a second argument field of - - -Postel & Reynolds [Page 30] - - - -RFC 959 October 1985 -File Transfer Protocol - - - the command. This second argument is optional, but when - present should be separated from the first by the three - Telnet characters R . This command shall be - followed by a STORe or APPEnd command. The ALLO command - should be treated as a NOOP (no operation) by those servers - which do not require that the maximum size of the file be - declared beforehand, and those servers interested in only - the maximum record or page size should accept a dummy value - in the first argument and ignore it. - - RESTART (REST) - - The argument field represents the server marker at which - file transfer is to be restarted. This command does not - cause file transfer but skips over the file to the specified - data checkpoint. This command shall be immediately followed - by the appropriate FTP service command which shall cause - file transfer to resume. - - RENAME FROM (RNFR) - - This command specifies the old pathname of the file which is - to be renamed. This command must be immediately followed by - a "rename to" command specifying the new file pathname. - - RENAME TO (RNTO) - - This command specifies the new pathname of the file - specified in the immediately preceding "rename from" - command. Together the two commands cause a file to be - renamed. - - ABORT (ABOR) - - This command tells the server to abort the previous FTP - service command and any associated transfer of data. The - abort command may require "special action", as discussed in - the Section on FTP Commands, to force recognition by the - server. No action is to be taken if the previous command - has been completed (including data transfer). The control - connection is not to be closed by the server, but the data - connection must be closed. - - There are two cases for the server upon receipt of this - command: (1) the FTP service command was already completed, - or (2) the FTP service command is still in progress. - - - -Postel & Reynolds [Page 31] - - - -RFC 959 October 1985 -File Transfer Protocol - - - In the first case, the server closes the data connection - (if it is open) and responds with a 226 reply, indicating - that the abort command was successfully processed. - - In the second case, the server aborts the FTP service in - progress and closes the data connection, returning a 426 - reply to indicate that the service request terminated - abnormally. The server then sends a 226 reply, - indicating that the abort command was successfully - processed. - - DELETE (DELE) - - This command causes the file specified in the pathname to be - deleted at the server site. If an extra level of protection - is desired (such as the query, "Do you really wish to - delete?"), it should be provided by the user-FTP process. - - REMOVE DIRECTORY (RMD) - - This command causes the directory specified in the pathname - to be removed as a directory (if the pathname is absolute) - or as a subdirectory of the current working directory (if - the pathname is relative). See Appendix II. - - MAKE DIRECTORY (MKD) - - This command causes the directory specified in the pathname - to be created as a directory (if the pathname is absolute) - or as a subdirectory of the current working directory (if - the pathname is relative). See Appendix II. - - PRINT WORKING DIRECTORY (PWD) - - This command causes the name of the current working - directory to be returned in the reply. See Appendix II. - - LIST (LIST) - - This command causes a list to be sent from the server to the - passive DTP. If the pathname specifies a directory or other - group of files, the server should transfer a list of files - in the specified directory. If the pathname specifies a - file then the server should send current information on the - file. A null argument implies the user's current working or - default directory. The data transfer is over the data - connection in type ASCII or type EBCDIC. (The user must - - -Postel & Reynolds [Page 32] - - - -RFC 959 October 1985 -File Transfer Protocol - - - ensure that the TYPE is appropriately ASCII or EBCDIC). - Since the information on a file may vary widely from system - to system, this information may be hard to use automatically - in a program, but may be quite useful to a human user. - - NAME LIST (NLST) - - This command causes a directory listing to be sent from - server to user site. The pathname should specify a - directory or other system-specific file group descriptor; a - null argument implies the current directory. The server - will return a stream of names of files and no other - information. The data will be transferred in ASCII or - EBCDIC type over the data connection as valid pathname - strings separated by or . (Again the user must - ensure that the TYPE is correct.) This command is intended - to return information that can be used by a program to - further process the files automatically. For example, in - the implementation of a "multiple get" function. - - SITE PARAMETERS (SITE) - - This command is used by the server to provide services - specific to his system that are essential to file transfer - but not sufficiently universal to be included as commands in - the protocol. The nature of these services and the - specification of their syntax can be stated in a reply to - the HELP SITE command. - - SYSTEM (SYST) - - This command is used to find out the type of operating - system at the server. The reply shall have as its first - word one of the system names listed in the current version - of the Assigned Numbers document [4]. - - STATUS (STAT) - - This command shall cause a status response to be sent over - the control connection in the form of a reply. The command - may be sent during a file transfer (along with the Telnet IP - and Synch signals--see the Section on FTP Commands) in which - case the server will respond with the status of the - operation in progress, or it may be sent between file - transfers. In the latter case, the command may have an - argument field. If the argument is a pathname, the command - is analogous to the "list" command except that data shall be - - -Postel & Reynolds [Page 33] - - - -RFC 959 October 1985 -File Transfer Protocol - - - transferred over the control connection. If a partial - pathname is given, the server may respond with a list of - file names or attributes associated with that specification. - If no argument is given, the server should return general - status information about the server FTP process. This - should include current values of all transfer parameters and - the status of connections. - - HELP (HELP) - - This command shall cause the server to send helpful - information regarding its implementation status over the - control connection to the user. The command may take an - argument (e.g., any command name) and return more specific - information as a response. The reply is type 211 or 214. - It is suggested that HELP be allowed before entering a USER - command. The server may use this reply to specify - site-dependent parameters, e.g., in response to HELP SITE. - - NOOP (NOOP) - - This command does not affect any parameters or previously - entered commands. It specifies no action other than that the - server send an OK reply. - - The File Transfer Protocol follows the specifications of the Telnet - protocol for all communications over the control connection. Since - the language used for Telnet communication may be a negotiated - option, all references in the next two sections will be to the - "Telnet language" and the corresponding "Telnet end-of-line code". - Currently, one may take these to mean NVT-ASCII and . No other - specifications of the Telnet protocol will be cited. - - FTP commands are "Telnet strings" terminated by the "Telnet end of - line code". The command codes themselves are alphabetic characters - terminated by the character (Space) if parameters follow and - Telnet-EOL otherwise. The command codes and the semantics of - commands are described in this section; the detailed syntax of - commands is specified in the Section on Commands, the reply sequences - are discussed in the Section on Sequencing of Commands and Replies, - and scenarios illustrating the use of commands are provided in the - Section on Typical FTP Scenarios. - - FTP commands may be partitioned as those specifying access-control - identifiers, data transfer parameters, or FTP service requests. - Certain commands (such as ABOR, STAT, QUIT) may be sent over the - control connection while a data transfer is in progress. Some - - -Postel & Reynolds [Page 34] - - - -RFC 959 October 1985 -File Transfer Protocol - - - servers may not be able to monitor the control and data connections - simultaneously, in which case some special action will be necessary - to get the server's attention. The following ordered format is - tentatively recommended: - - 1. User system inserts the Telnet "Interrupt Process" (IP) signal - in the Telnet stream. - - 2. User system sends the Telnet "Synch" signal. - - 3. User system inserts the command (e.g., ABOR) in the Telnet - stream. - - 4. Server PI, after receiving "IP", scans the Telnet stream for - EXACTLY ONE FTP command. - - (For other servers this may not be necessary but the actions listed - above should have no unusual effect.) - - 4.2. FTP REPLIES - - Replies to File Transfer Protocol commands are devised to ensure - the synchronization of requests and actions in the process of file - transfer, and to guarantee that the user process always knows the - state of the Server. Every command must generate at least one - reply, although there may be more than one; in the latter case, - the multiple replies must be easily distinguished. In addition, - some commands occur in sequential groups, such as USER, PASS and - ACCT, or RNFR and RNTO. The replies show the existence of an - intermediate state if all preceding commands have been successful. - A failure at any point in the sequence necessitates the repetition - of the entire sequence from the beginning. - - The details of the command-reply sequence are made explicit in - a set of state diagrams below. - - An FTP reply consists of a three digit number (transmitted as - three alphanumeric characters) followed by some text. The number - is intended for use by automata to determine what state to enter - next; the text is intended for the human user. It is intended - that the three digits contain enough encoded information that the - user-process (the User-PI) will not need to examine the text and - may either discard it or pass it on to the user, as appropriate. - In particular, the text may be server-dependent, so there are - likely to be varying texts for each reply code. - - A reply is defined to contain the 3-digit code, followed by Space - - -Postel & Reynolds [Page 35] - - - -RFC 959 October 1985 -File Transfer Protocol - - - , followed by one line of text (where some maximum line length - has been specified), and terminated by the Telnet end-of-line - code. There will be cases however, where the text is longer than - a single line. In these cases the complete text must be bracketed - so the User-process knows when it may stop reading the reply (i.e. - stop processing input on the control connection) and go do other - things. This requires a special format on the first line to - indicate that more than one line is coming, and another on the - last line to designate it as the last. At least one of these must - contain the appropriate reply code to indicate the state of the - transaction. To satisfy all factions, it was decided that both - the first and last line codes should be the same. - - Thus the format for multi-line replies is that the first line - will begin with the exact required reply code, followed - immediately by a Hyphen, "-" (also known as Minus), followed by - text. The last line will begin with the same code, followed - immediately by Space , optionally some text, and the Telnet - end-of-line code. - - For example: - 123-First line - Second line - 234 A line beginning with numbers - 123 The last line - - The user-process then simply needs to search for the second - occurrence of the same reply code, followed by (Space), at - the beginning of a line, and ignore all intermediary lines. If - an intermediary line begins with a 3-digit number, the Server - must pad the front to avoid confusion. - - This scheme allows standard system routines to be used for - reply information (such as for the STAT reply), with - "artificial" first and last lines tacked on. In rare cases - where these routines are able to generate three digits and a - Space at the beginning of any line, the beginning of each - text line should be offset by some neutral text, like Space. - - This scheme assumes that multi-line replies may not be nested. - - The three digits of the reply each have a special significance. - This is intended to allow a range of very simple to very - sophisticated responses by the user-process. The first digit - denotes whether the response is good, bad or incomplete. - (Referring to the state diagram), an unsophisticated user-process - will be able to determine its next action (proceed as planned, - - -Postel & Reynolds [Page 36] - - - -RFC 959 October 1985 -File Transfer Protocol - - - redo, retrench, etc.) by simply examining this first digit. A - user-process that wants to know approximately what kind of error - occurred (e.g. file system error, command syntax error) may - examine the second digit, reserving the third digit for the finest - gradation of information (e.g., RNTO command without a preceding - RNFR). - - There are five values for the first digit of the reply code: - - 1yz Positive Preliminary reply - - The requested action is being initiated; expect another - reply before proceeding with a new command. (The - user-process sending another command before the - completion reply would be in violation of protocol; but - server-FTP processes should queue any commands that - arrive while a preceding command is in progress.) This - type of reply can be used to indicate that the command - was accepted and the user-process may now pay attention - to the data connections, for implementations where - simultaneous monitoring is difficult. The server-FTP - process may send at most, one 1yz reply per command. - - 2yz Positive Completion reply - - The requested action has been successfully completed. A - new request may be initiated. - - 3yz Positive Intermediate reply - - The command has been accepted, but the requested action - is being held in abeyance, pending receipt of further - information. The user should send another command - specifying this information. This reply is used in - command sequence groups. - - 4yz Transient Negative Completion reply - - The command was not accepted and the requested action did - not take place, but the error condition is temporary and - the action may be requested again. The user should - return to the beginning of the command sequence, if any. - It is difficult to assign a meaning to "transient", - particularly when two distinct sites (Server- and - User-processes) have to agree on the interpretation. - Each reply in the 4yz category might have a slightly - different time value, but the intent is that the - - -Postel & Reynolds [Page 37] - - - -RFC 959 October 1985 -File Transfer Protocol - - - user-process is encouraged to try again. A rule of thumb - in determining if a reply fits into the 4yz or the 5yz - (Permanent Negative) category is that replies are 4yz if - the commands can be repeated without any change in - command form or in properties of the User or Server - (e.g., the command is spelled the same with the same - arguments used; the user does not change his file access - or user name; the server does not put up a new - implementation.) - - 5yz Permanent Negative Completion reply - - The command was not accepted and the requested action did - not take place. The User-process is discouraged from - repeating the exact request (in the same sequence). Even - some "permanent" error conditions can be corrected, so - the human user may want to direct his User-process to - reinitiate the command sequence by direct action at some - point in the future (e.g., after the spelling has been - changed, or the user has altered his directory status.) - - The following function groupings are encoded in the second - digit: - - x0z Syntax - These replies refer to syntax errors, - syntactically correct commands that don't fit any - functional category, unimplemented or superfluous - commands. - - x1z Information - These are replies to requests for - information, such as status or help. - - x2z Connections - Replies referring to the control and - data connections. - - x3z Authentication and accounting - Replies for the login - process and accounting procedures. - - x4z Unspecified as yet. - - x5z File system - These replies indicate the status of the - Server file system vis-a-vis the requested transfer or - other file system action. - - The third digit gives a finer gradation of meaning in each of - the function categories, specified by the second digit. The - list of replies below will illustrate this. Note that the text - - -Postel & Reynolds [Page 38] - - - -RFC 959 October 1985 -File Transfer Protocol - - - associated with each reply is recommended, rather than - mandatory, and may even change according to the command with - which it is associated. The reply codes, on the other hand, - must strictly follow the specifications in the last section; - that is, Server implementations should not invent new codes for - situations that are only slightly different from the ones - described here, but rather should adapt codes already defined. - - A command such as TYPE or ALLO whose successful execution - does not offer the user-process any new information will - cause a 200 reply to be returned. If the command is not - implemented by a particular Server-FTP process because it - has no relevance to that computer system, for example ALLO - at a TOPS20 site, a Positive Completion reply is still - desired so that the simple User-process knows it can proceed - with its course of action. A 202 reply is used in this case - with, for example, the reply text: "No storage allocation - necessary." If, on the other hand, the command requests a - non-site-specific action and is unimplemented, the response - is 502. A refinement of that is the 504 reply for a command - that is implemented, but that requests an unimplemented - parameter. - - 4.2.1 Reply Codes by Function Groups - - 200 Command okay. - 500 Syntax error, command unrecognized. - This may include errors such as command line too long. - 501 Syntax error in parameters or arguments. - 202 Command not implemented, superfluous at this site. - 502 Command not implemented. - 503 Bad sequence of commands. - 504 Command not implemented for that parameter. - - - - - - - - - - - - - - - - -Postel & Reynolds [Page 39] - - - -RFC 959 October 1985 -File Transfer Protocol - - - 110 Restart marker reply. - In this case, the text is exact and not left to the - particular implementation; it must read: - MARK yyyy = mmmm - Where yyyy is User-process data stream marker, and mmmm - server's equivalent marker (note the spaces between markers - and "="). - 211 System status, or system help reply. - 212 Directory status. - 213 File status. - 214 Help message. - On how to use the server or the meaning of a particular - non-standard command. This reply is useful only to the - human user. - 215 NAME system type. - Where NAME is an official system name from the list in the - Assigned Numbers document. - - 120 Service ready in nnn minutes. - 220 Service ready for new user. - 221 Service closing control connection. - Logged out if appropriate. - 421 Service not available, closing control connection. - This may be a reply to any command if the service knows it - must shut down. - 125 Data connection already open; transfer starting. - 225 Data connection open; no transfer in progress. - 425 Can't open data connection. - 226 Closing data connection. - Requested file action successful (for example, file - transfer or file abort). - 426 Connection closed; transfer aborted. - 227 Entering Passive Mode (h1,h2,h3,h4,p1,p2). - - 230 User logged in, proceed. - 530 Not logged in. - 331 User name okay, need password. - 332 Need account for login. - 532 Need account for storing files. - - - - - - - - - - -Postel & Reynolds [Page 40] - - - -RFC 959 October 1985 -File Transfer Protocol - - - 150 File status okay; about to open data connection. - 250 Requested file action okay, completed. - 257 "PATHNAME" created. - 350 Requested file action pending further information. - 450 Requested file action not taken. - File unavailable (e.g., file busy). - 550 Requested action not taken. - File unavailable (e.g., file not found, no access). - 451 Requested action aborted. Local error in processing. - 551 Requested action aborted. Page type unknown. - 452 Requested action not taken. - Insufficient storage space in system. - 552 Requested file action aborted. - Exceeded storage allocation (for current directory or - dataset). - 553 Requested action not taken. - File name not allowed. - - - 4.2.2 Numeric Order List of Reply Codes - - 110 Restart marker reply. - In this case, the text is exact and not left to the - particular implementation; it must read: - MARK yyyy = mmmm - Where yyyy is User-process data stream marker, and mmmm - server's equivalent marker (note the spaces between markers - and "="). - 120 Service ready in nnn minutes. - 125 Data connection already open; transfer starting. - 150 File status okay; about to open data connection. - - - - - - - - - - - - - - - - - - -Postel & Reynolds [Page 41] - - - -RFC 959 October 1985 -File Transfer Protocol - - - 200 Command okay. - 202 Command not implemented, superfluous at this site. - 211 System status, or system help reply. - 212 Directory status. - 213 File status. - 214 Help message. - On how to use the server or the meaning of a particular - non-standard command. This reply is useful only to the - human user. - 215 NAME system type. - Where NAME is an official system name from the list in the - Assigned Numbers document. - 220 Service ready for new user. - 221 Service closing control connection. - Logged out if appropriate. - 225 Data connection open; no transfer in progress. - 226 Closing data connection. - Requested file action successful (for example, file - transfer or file abort). - 227 Entering Passive Mode (h1,h2,h3,h4,p1,p2). - 230 User logged in, proceed. - 250 Requested file action okay, completed. - 257 "PATHNAME" created. - - 331 User name okay, need password. - 332 Need account for login. - 350 Requested file action pending further information. - - 421 Service not available, closing control connection. - This may be a reply to any command if the service knows it - must shut down. - 425 Can't open data connection. - 426 Connection closed; transfer aborted. - 450 Requested file action not taken. - File unavailable (e.g., file busy). - 451 Requested action aborted: local error in processing. - 452 Requested action not taken. - Insufficient storage space in system. - - - - - - - - - - - -Postel & Reynolds [Page 42] - - - -RFC 959 October 1985 -File Transfer Protocol - - - 500 Syntax error, command unrecognized. - This may include errors such as command line too long. - 501 Syntax error in parameters or arguments. - 502 Command not implemented. - 503 Bad sequence of commands. - 504 Command not implemented for that parameter. - 530 Not logged in. - 532 Need account for storing files. - 550 Requested action not taken. - File unavailable (e.g., file not found, no access). - 551 Requested action aborted: page type unknown. - 552 Requested file action aborted. - Exceeded storage allocation (for current directory or - dataset). - 553 Requested action not taken. - File name not allowed. - - -5. DECLARATIVE SPECIFICATIONS - - 5.1. MINIMUM IMPLEMENTATION - - In order to make FTP workable without needless error messages, the - following minimum implementation is required for all servers: - - TYPE - ASCII Non-print - MODE - Stream - STRUCTURE - File, Record - COMMANDS - USER, QUIT, PORT, - TYPE, MODE, STRU, - for the default values - RETR, STOR, - NOOP. - - The default values for transfer parameters are: - - TYPE - ASCII Non-print - MODE - Stream - STRU - File - - All hosts must accept the above as the standard defaults. - - - - - - - - -Postel & Reynolds [Page 43] - - - -RFC 959 October 1985 -File Transfer Protocol - - - 5.2. CONNECTIONS - - The server protocol interpreter shall "listen" on Port L. The - user or user protocol interpreter shall initiate the full-duplex - control connection. Server- and user- processes should follow the - conventions of the Telnet protocol as specified in the - ARPA-Internet Protocol Handbook [1]. Servers are under no - obligation to provide for editing of command lines and may require - that it be done in the user host. The control connection shall be - closed by the server at the user's request after all transfers and - replies are completed. - - The user-DTP must "listen" on the specified data port; this may be - the default user port (U) or a port specified in the PORT command. - The server shall initiate the data connection from his own default - data port (L-1) using the specified user data port. The direction - of the transfer and the port used will be determined by the FTP - service command. - - Note that all FTP implementation must support data transfer using - the default port, and that only the USER-PI may initiate the use - of non-default ports. - - When data is to be transferred between two servers, A and B (refer - to Figure 2), the user-PI, C, sets up control connections with - both server-PI's. One of the servers, say A, is then sent a PASV - command telling him to "listen" on his data port rather than - initiate a connection when he receives a transfer service command. - When the user-PI receives an acknowledgment to the PASV command, - which includes the identity of the host and port being listened - on, the user-PI then sends A's port, a, to B in a PORT command; a - reply is returned. The user-PI may then send the corresponding - service commands to A and B. Server B initiates the connection - and the transfer proceeds. The command-reply sequence is listed - below where the messages are vertically synchronous but - horizontally asynchronous: - - - - - - - - - - - - - -Postel & Reynolds [Page 44] - - - -RFC 959 October 1985 -File Transfer Protocol - - - User-PI - Server A User-PI - Server B - ------------------ ------------------ - - C->A : Connect C->B : Connect - C->A : PASV - A->C : 227 Entering Passive Mode. A1,A2,A3,A4,a1,a2 - C->B : PORT A1,A2,A3,A4,a1,a2 - B->C : 200 Okay - C->A : STOR C->B : RETR - B->A : Connect to HOST-A, PORT-a - - Figure 3 - - The data connection shall be closed by the server under the - conditions described in the Section on Establishing Data - Connections. If the data connection is to be closed following a - data transfer where closing the connection is not required to - indicate the end-of-file, the server must do so immediately. - Waiting until after a new transfer command is not permitted - because the user-process will have already tested the data - connection to see if it needs to do a "listen"; (remember that the - user must "listen" on a closed data port BEFORE sending the - transfer request). To prevent a race condition here, the server - sends a reply (226) after closing the data connection (or if the - connection is left open, a "file transfer completed" reply (250) - and the user-PI should wait for one of these replies before - issuing a new transfer command). - - Any time either the user or server see that the connection is - being closed by the other side, it should promptly read any - remaining data queued on the connection and issue the close on its - own side. - - 5.3. COMMANDS - - The commands are Telnet character strings transmitted over the - control connections as described in the Section on FTP Commands. - The command functions and semantics are described in the Section - on Access Control Commands, Transfer Parameter Commands, FTP - Service Commands, and Miscellaneous Commands. The command syntax - is specified here. - - The commands begin with a command code followed by an argument - field. The command codes are four or fewer alphabetic characters. - Upper and lower case alphabetic characters are to be treated - identically. Thus, any of the following may represent the - retrieve command: - - -Postel & Reynolds [Page 45] - - - -RFC 959 October 1985 -File Transfer Protocol - - - RETR Retr retr ReTr rETr - - This also applies to any symbols representing parameter values, - such as A or a for ASCII TYPE. The command codes and the argument - fields are separated by one or more spaces. - - The argument field consists of a variable length character string - ending with the character sequence (Carriage Return, Line - Feed) for NVT-ASCII representation; for other negotiated languages - a different end of line character might be used. It should be - noted that the server is to take no action until the end of line - code is received. - - The syntax is specified below in NVT-ASCII. All characters in the - argument field are ASCII characters including any ASCII - represented decimal integers. Square brackets denote an optional - argument field. If the option is not taken, the appropriate - default is implied. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Postel & Reynolds [Page 46] - - - -RFC 959 October 1985 -File Transfer Protocol - - - 5.3.1. FTP COMMANDS - - The following are the FTP commands: - - USER - PASS - ACCT - CWD - CDUP - SMNT - QUIT - REIN - PORT - PASV - TYPE - STRU - MODE - RETR - STOR - STOU - APPE - ALLO - [ R ] - REST - RNFR - RNTO - ABOR - DELE - RMD - MKD - PWD - LIST [ ] - NLST [ ] - SITE - SYST - STAT [ ] - HELP [ ] - NOOP - - - - - - - - - - - -Postel & Reynolds [Page 47] - - - -RFC 959 October 1985 -File Transfer Protocol - - - 5.3.2. FTP COMMAND ARGUMENTS - - The syntax of the above argument fields (using BNF notation - where applicable) is: - - ::= - ::= - ::= - ::= | - ::= any of the 128 ASCII characters except and - - ::= - ::= | - ::= printable characters, any - ASCII code 33 through 126 - ::= - ::= , - ::= ,,, - ::= , - ::= any decimal integer 1 through 255 - ::= N | T | C - ::= A [ ] - | E [ ] - | I - | L - ::= F | R | P - ::= S | B | C - ::= - ::= any decimal integer - - - - - - - - - - - - - - - - - - - - -Postel & Reynolds [Page 48] - - - -RFC 959 October 1985 -File Transfer Protocol - - - 5.4. SEQUENCING OF COMMANDS AND REPLIES - - The communication between the user and server is intended to be an - alternating dialogue. As such, the user issues an FTP command and - the server responds with a prompt primary reply. The user should - wait for this initial primary success or failure response before - sending further commands. - - Certain commands require a second reply for which the user should - also wait. These replies may, for example, report on the progress - or completion of file transfer or the closing of the data - connection. They are secondary replies to file transfer commands. - - One important group of informational replies is the connection - greetings. Under normal circumstances, a server will send a 220 - reply, "awaiting input", when the connection is completed. The - user should wait for this greeting message before sending any - commands. If the server is unable to accept input right away, a - 120 "expected delay" reply should be sent immediately and a 220 - reply when ready. The user will then know not to hang up if there - is a delay. - - Spontaneous Replies - - Sometimes "the system" spontaneously has a message to be sent - to a user (usually all users). For example, "System going down - in 15 minutes". There is no provision in FTP for such - spontaneous information to be sent from the server to the user. - It is recommended that such information be queued in the - server-PI and delivered to the user-PI in the next reply - (possibly making it a multi-line reply). - - The table below lists alternative success and failure replies for - each command. These must be strictly adhered to; a server may - substitute text in the replies, but the meaning and action implied - by the code numbers and by the specific command reply sequence - cannot be altered. - - Command-Reply Sequences - - In this section, the command-reply sequence is presented. Each - command is listed with its possible replies; command groups are - listed together. Preliminary replies are listed first (with - their succeeding replies indented and under them), then - positive and negative completion, and finally intermediary - - - - -Postel & Reynolds [Page 49] - - - -RFC 959 October 1985 -File Transfer Protocol - - - replies with the remaining commands from the sequence - following. This listing forms the basis for the state - diagrams, which will be presented separately. - - Connection Establishment - 120 - 220 - 220 - 421 - Login - USER - 230 - 530 - 500, 501, 421 - 331, 332 - PASS - 230 - 202 - 530 - 500, 501, 503, 421 - 332 - ACCT - 230 - 202 - 530 - 500, 501, 503, 421 - CWD - 250 - 500, 501, 502, 421, 530, 550 - CDUP - 200 - 500, 501, 502, 421, 530, 550 - SMNT - 202, 250 - 500, 501, 502, 421, 530, 550 - Logout - REIN - 120 - 220 - 220 - 421 - 500, 502 - QUIT - 221 - 500 - - - - -Postel & Reynolds [Page 50] - - - -RFC 959 October 1985 -File Transfer Protocol - - - Transfer parameters - PORT - 200 - 500, 501, 421, 530 - PASV - 227 - 500, 501, 502, 421, 530 - MODE - 200 - 500, 501, 504, 421, 530 - TYPE - 200 - 500, 501, 504, 421, 530 - STRU - 200 - 500, 501, 504, 421, 530 - File action commands - ALLO - 200 - 202 - 500, 501, 504, 421, 530 - REST - 500, 501, 502, 421, 530 - 350 - STOR - 125, 150 - (110) - 226, 250 - 425, 426, 451, 551, 552 - 532, 450, 452, 553 - 500, 501, 421, 530 - STOU - 125, 150 - (110) - 226, 250 - 425, 426, 451, 551, 552 - 532, 450, 452, 553 - 500, 501, 421, 530 - RETR - 125, 150 - (110) - 226, 250 - 425, 426, 451 - 450, 550 - 500, 501, 421, 530 - - - - -Postel & Reynolds [Page 51] - - - -RFC 959 October 1985 -File Transfer Protocol - - - LIST - 125, 150 - 226, 250 - 425, 426, 451 - 450 - 500, 501, 502, 421, 530 - NLST - 125, 150 - 226, 250 - 425, 426, 451 - 450 - 500, 501, 502, 421, 530 - APPE - 125, 150 - (110) - 226, 250 - 425, 426, 451, 551, 552 - 532, 450, 550, 452, 553 - 500, 501, 502, 421, 530 - RNFR - 450, 550 - 500, 501, 502, 421, 530 - 350 - RNTO - 250 - 532, 553 - 500, 501, 502, 503, 421, 530 - DELE - 250 - 450, 550 - 500, 501, 502, 421, 530 - RMD - 250 - 500, 501, 502, 421, 530, 550 - MKD - 257 - 500, 501, 502, 421, 530, 550 - PWD - 257 - 500, 501, 502, 421, 550 - ABOR - 225, 226 - 500, 501, 502, 421 - - - - - - -Postel & Reynolds [Page 52] - - - -RFC 959 October 1985 -File Transfer Protocol - - - Informational commands - SYST - 215 - 500, 501, 502, 421 - STAT - 211, 212, 213 - 450 - 500, 501, 502, 421, 530 - HELP - 211, 214 - 500, 501, 502, 421 - Miscellaneous commands - SITE - 200 - 202 - 500, 501, 530 - NOOP - 200 - 500 421 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Postel & Reynolds [Page 53] - - - -RFC 959 October 1985 -File Transfer Protocol - - -6. STATE DIAGRAMS - - Here we present state diagrams for a very simple minded FTP - implementation. Only the first digit of the reply codes is used. - There is one state diagram for each group of FTP commands or command - sequences. - - The command groupings were determined by constructing a model for - each command then collecting together the commands with structurally - identical models. - - For each command or command sequence there are three possible - outcomes: success (S), failure (F), and error (E). In the state - diagrams below we use the symbol B for "begin", and the symbol W for - "wait for reply". - - We first present the diagram that represents the largest group of FTP - commands: - - - 1,3 +---+ - ----------->| E | - | +---+ - | - +---+ cmd +---+ 2 +---+ - | B |---------->| W |---------->| S | - +---+ +---+ +---+ - | - | 4,5 +---+ - ----------->| F | - +---+ - - - This diagram models the commands: - - ABOR, ALLO, DELE, CWD, CDUP, SMNT, HELP, MODE, NOOP, PASV, - QUIT, SITE, PORT, SYST, STAT, RMD, MKD, PWD, STRU, and TYPE. - - - - - - - - - - - - -Postel & Reynolds [Page 54] - - - -RFC 959 October 1985 -File Transfer Protocol - - - The other large group of commands is represented by a very similar - diagram: - - - 3 +---+ - ----------->| E | - | +---+ - | - +---+ cmd +---+ 2 +---+ - | B |---------->| W |---------->| S | - +---+ --->+---+ +---+ - | | | - | | | 4,5 +---+ - | 1 | ----------->| F | - ----- +---+ - - - This diagram models the commands: - - APPE, LIST, NLST, REIN, RETR, STOR, and STOU. - - Note that this second model could also be used to represent the first - group of commands, the only difference being that in the first group - the 100 series replies are unexpected and therefore treated as error, - while the second group expects (some may require) 100 series replies. - Remember that at most, one 100 series reply is allowed per command. - - The remaining diagrams model command sequences, perhaps the simplest - of these is the rename sequence: - - - +---+ RNFR +---+ 1,2 +---+ - | B |---------->| W |---------->| E | - +---+ +---+ -->+---+ - | | | - 3 | | 4,5 | - -------------- ------ | - | | | +---+ - | ------------->| S | - | | 1,3 | | +---+ - | 2| -------- - | | | | - V | | | - +---+ RNTO +---+ 4,5 ----->+---+ - | |---------->| W |---------->| F | - +---+ +---+ +---+ - - - -Postel & Reynolds [Page 55] - - - -RFC 959 October 1985 -File Transfer Protocol - - - The next diagram is a simple model of the Restart command: - - - +---+ REST +---+ 1,2 +---+ - | B |---------->| W |---------->| E | - +---+ +---+ -->+---+ - | | | - 3 | | 4,5 | - -------------- ------ | - | | | +---+ - | ------------->| S | - | | 3 | | +---+ - | 2| -------- - | | | | - V | | | - +---+ cmd +---+ 4,5 ----->+---+ - | |---------->| W |---------->| F | - +---+ -->+---+ +---+ - | | - | 1 | - ------ - - - Where "cmd" is APPE, STOR, or RETR. - - We note that the above three models are similar. The Restart differs - from the Rename two only in the treatment of 100 series replies at - the second stage, while the second group expects (some may require) - 100 series replies. Remember that at most, one 100 series reply is - allowed per command. - - - - - - - - - - - - - - - - - - - -Postel & Reynolds [Page 56] - - - -RFC 959 October 1985 -File Transfer Protocol - - - The most complicated diagram is for the Login sequence: - - - 1 - +---+ USER +---+------------->+---+ - | B |---------->| W | 2 ---->| E | - +---+ +---+------ | -->+---+ - | | | | | - 3 | | 4,5 | | | - -------------- ----- | | | - | | | | | - | | | | | - | --------- | - | 1| | | | - V | | | | - +---+ PASS +---+ 2 | ------>+---+ - | |---------->| W |------------->| S | - +---+ +---+ ---------->+---+ - | | | | | - 3 | |4,5| | | - -------------- -------- | - | | | | | - | | | | | - | ----------- - | 1,3| | | | - V | 2| | | - +---+ ACCT +---+-- | ----->+---+ - | |---------->| W | 4,5 -------->| F | - +---+ +---+------------->+---+ - - - - - - - - - - - - - - - - - - - - -Postel & Reynolds [Page 57] - - - -RFC 959 October 1985 -File Transfer Protocol - - - Finally, we present a generalized diagram that could be used to model - the command and reply interchange: - - - ------------------------------------ - | | - Begin | | - | V | - | +---+ cmd +---+ 2 +---+ | - -->| |------->| |---------->| | | - | | | W | | S |-----| - -->| | -->| |----- | | | - | +---+ | +---+ 4,5 | +---+ | - | | | | | | | - | | | 1| |3 | +---+ | - | | | | | | | | | - | | ---- | ---->| F |----- - | | | | | - | | | +---+ - ------------------- - | - | - V - End - - - - - - - - - - - - - - - - - - - - - - - - - -Postel & Reynolds [Page 58] - - - -RFC 959 October 1985 -File Transfer Protocol - - -7. TYPICAL FTP SCENARIO - - User at host U wanting to transfer files to/from host S: - - In general, the user will communicate to the server via a mediating - user-FTP process. The following may be a typical scenario. The - user-FTP prompts are shown in parentheses, '---->' represents - commands from host U to host S, and '<----' represents replies from - host S to host U. - - LOCAL COMMANDS BY USER ACTION INVOLVED - - ftp (host) multics Connect to host S, port L, - establishing control connections. - <---- 220 Service ready . - username Doe USER Doe----> - <---- 331 User name ok, - need password. - password mumble PASS mumble----> - <---- 230 User logged in. - retrieve (local type) ASCII - (local pathname) test 1 User-FTP opens local file in ASCII. - (for. pathname) test.pl1 RETR test.pl1 ----> - <---- 150 File status okay; - about to open data - connection. - Server makes data connection - to port U. - - <---- 226 Closing data connection, - file transfer successful. - type Image TYPE I ----> - <---- 200 Command OK - store (local type) image - (local pathname) file dump User-FTP opens local file in Image. - (for.pathname) >udd>cn>fd STOR >udd>cn>fd ----> - <---- 550 Access denied - terminate QUIT ----> - Server closes all - connections. - -8. CONNECTION ESTABLISHMENT - - The FTP control connection is established via TCP between the user - process port U and the server process port L. This protocol is - assigned the service port 21 (25 octal), that is L=21. - - - -Postel & Reynolds [Page 59] - - - -RFC 959 October 1985 -File Transfer Protocol - - -APPENDIX I - PAGE STRUCTURE - - The need for FTP to support page structure derives principally from - the need to support efficient transmission of files between TOPS-20 - systems, particularly the files used by NLS. - - The file system of TOPS-20 is based on the concept of pages. The - operating system is most efficient at manipulating files as pages. - The operating system provides an interface to the file system so that - many applications view files as sequential streams of characters. - However, a few applications use the underlying page structures - directly, and some of these create holey files. - - A TOPS-20 disk file consists of four things: a pathname, a page - table, a (possibly empty) set of pages, and a set of attributes. - - The pathname is specified in the RETR or STOR command. It includes - the directory name, file name, file name extension, and generation - number. - - The page table contains up to 2**18 entries. Each entry may be - EMPTY, or may point to a page. If it is not empty, there are also - some page-specific access bits; not all pages of a file need have the - same access protection. - - A page is a contiguous set of 512 words of 36 bits each. - - The attributes of the file, in the File Descriptor Block (FDB), - contain such things as creation time, write time, read time, writer's - byte-size, end-of-file pointer, count of reads and writes, backup - system tape numbers, etc. - - Note that there is NO requirement that entries in the page table be - contiguous. There may be empty page table slots between occupied - ones. Also, the end of file pointer is simply a number. There is no - requirement that it in fact point at the "last" datum in the file. - Ordinary sequential I/O calls in TOPS-20 will cause the end of file - pointer to be left after the last datum written, but other operations - may cause it not to be so, if a particular programming system so - requires. - - In fact, in both of these special cases, "holey" files and - end-of-file pointers NOT at the end of the file, occur with NLS data - files. - - - - - -Postel & Reynolds [Page 60] - - - -RFC 959 October 1985 -File Transfer Protocol - - - The TOPS-20 paged files can be sent with the FTP transfer parameters: - TYPE L 36, STRU P, and MODE S (in fact, any mode could be used). - - Each page of information has a header. Each header field, which is a - logical byte, is a TOPS-20 word, since the TYPE is L 36. - - The header fields are: - - Word 0: Header Length. - - The header length is 5. - - Word 1: Page Index. - - If the data is a disk file page, this is the number of that - page in the file's page map. Empty pages (holes) in the file - are simply not sent. Note that a hole is NOT the same as a - page of zeros. - - Word 2: Data Length. - - The number of data words in this page, following the header. - Thus, the total length of the transmission unit is the Header - Length plus the Data Length. - - Word 3: Page Type. - - A code for what type of chunk this is. A data page is type 3, - the FDB page is type 2. - - Word 4: Page Access Control. - - The access bits associated with the page in the file's page - map. (This full word quantity is put into AC2 of an SPACS by - the program reading from net to disk.) - - After the header are Data Length data words. Data Length is - currently either 512 for a data page or 31 for an FDB. Trailing - zeros in a disk file page may be discarded, making Data Length less - than 512 in that case. - - - - - - - - - -Postel & Reynolds [Page 61] - - - -RFC 959 October 1985 -File Transfer Protocol - - -APPENDIX II - DIRECTORY COMMANDS - - Since UNIX has a tree-like directory structure in which directories - are as easy to manipulate as ordinary files, it is useful to expand - the FTP servers on these machines to include commands which deal with - the creation of directories. Since there are other hosts on the - ARPA-Internet which have tree-like directories (including TOPS-20 and - Multics), these commands are as general as possible. - - Four directory commands have been added to FTP: - - MKD pathname - - Make a directory with the name "pathname". - - RMD pathname - - Remove the directory with the name "pathname". - - PWD - - Print the current working directory name. - - CDUP - - Change to the parent of the current working directory. - - The "pathname" argument should be created (removed) as a - subdirectory of the current working directory, unless the "pathname" - string contains sufficient information to specify otherwise to the - server, e.g., "pathname" is an absolute pathname (in UNIX and - Multics), or pathname is something like "" to - TOPS-20. - - REPLY CODES - - The CDUP command is a special case of CWD, and is included to - simplify the implementation of programs for transferring directory - trees between operating systems having different syntaxes for - naming the parent directory. The reply codes for CDUP be - identical to the reply codes of CWD. - - The reply codes for RMD be identical to the reply codes for its - file analogue, DELE. - - The reply codes for MKD, however, are a bit more complicated. A - freshly created directory will probably be the object of a future - - -Postel & Reynolds [Page 62] - - - -RFC 959 October 1985 -File Transfer Protocol - - - CWD command. Unfortunately, the argument to MKD may not always be - a suitable argument for CWD. This is the case, for example, when - a TOPS-20 subdirectory is created by giving just the subdirectory - name. That is, with a TOPS-20 server FTP, the command sequence - - MKD MYDIR - CWD MYDIR - - will fail. The new directory may only be referred to by its - "absolute" name; e.g., if the MKD command above were issued while - connected to the directory , the new subdirectory - could only be referred to by the name . - - Even on UNIX and Multics, however, the argument given to MKD may - not be suitable. If it is a "relative" pathname (i.e., a pathname - which is interpreted relative to the current directory), the user - would need to be in the same current directory in order to reach - the subdirectory. Depending on the application, this may be - inconvenient. It is not very robust in any case. - - To solve these problems, upon successful completion of an MKD - command, the server should return a line of the form: - - 257"" - - That is, the server will tell the user what string to use when - referring to the created directory. The directory name can - contain any character; embedded double-quotes should be escaped by - double-quotes (the "quote-doubling" convention). - - For example, a user connects to the directory /usr/dm, and creates - a subdirectory, named pathname: - - CWD /usr/dm - 200 directory changed to /usr/dm - MKD pathname - 257 "/usr/dm/pathname" directory created - - An example with an embedded double quote: - - MKD foo"bar - 257 "/usr/dm/foo""bar" directory created - CWD /usr/dm/foo"bar - 200 directory changed to /usr/dm/foo"bar - - - - - -Postel & Reynolds [Page 63] - - - -RFC 959 October 1985 -File Transfer Protocol - - - The prior existence of a subdirectory with the same name is an - error, and the server must return an "access denied" error reply - in that case. - - CWD /usr/dm - 200 directory changed to /usr/dm - MKD pathname - 521-"/usr/dm/pathname" directory already exists; - 521 taking no action. - - The failure replies for MKD are analogous to its file creating - cousin, STOR. Also, an "access denied" return is given if a file - name with the same name as the subdirectory will conflict with the - creation of the subdirectory (this is a problem on UNIX, but - shouldn't be one on TOPS-20). - - Essentially because the PWD command returns the same type of - information as the successful MKD command, the successful PWD - command uses the 257 reply code as well. - - SUBTLETIES - - Because these commands will be most useful in transferring - subtrees from one machine to another, carefully observe that the - argument to MKD is to be interpreted as a sub-directory of the - current working directory, unless it contains enough information - for the destination host to tell otherwise. A hypothetical - example of its use in the TOPS-20 world: - - CWD - 200 Working directory changed - MKD overrainbow - 257 "" directory created - CWD overrainbow - 431 No such directory - CWD - 200 Working directory changed - - CWD - 200 Working directory changed to - MKD - 257 "" directory created - CWD - - Note that the first example results in a subdirectory of the - connected directory. In contrast, the argument in the second - example contains enough information for TOPS-20 to tell that the - - -Postel & Reynolds [Page 64] - - - -RFC 959 October 1985 -File Transfer Protocol - - - directory is a top-level directory. Note also that - in the first example the user "violated" the protocol by - attempting to access the freshly created directory with a name - other than the one returned by TOPS-20. Problems could have - resulted in this case had there been an directory; - this is an ambiguity inherent in some TOPS-20 implementations. - Similar considerations apply to the RMD command. The point is - this: except where to do so would violate a host's conventions for - denoting relative versus absolute pathnames, the host should treat - the operands of the MKD and RMD commands as subdirectories. The - 257 reply to the MKD command must always contain the absolute - pathname of the created directory. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Postel & Reynolds [Page 65] - - - -RFC 959 October 1985 -File Transfer Protocol - - -APPENDIX III - RFCs on FTP - - Bhushan, Abhay, "A File Transfer Protocol", RFC 114 (NIC 5823), - MIT-Project MAC, 16 April 1971. - - Harslem, Eric, and John Heafner, "Comments on RFC 114 (A File - Transfer Protocol)", RFC 141 (NIC 6726), RAND, 29 April 1971. - - Bhushan, Abhay, et al, "The File Transfer Protocol", RFC 172 - (NIC 6794), MIT-Project MAC, 23 June 1971. - - Braden, Bob, "Comments on DTP and FTP Proposals", RFC 238 (NIC 7663), - UCLA/CCN, 29 September 1971. - - Bhushan, Abhay, et al, "The File Transfer Protocol", RFC 265 - (NIC 7813), MIT-Project MAC, 17 November 1971. - - McKenzie, Alex, "A Suggested Addition to File Transfer Protocol", - RFC 281 (NIC 8163), BBN, 8 December 1971. - - Bhushan, Abhay, "The Use of "Set Data Type" Transaction in File - Transfer Protocol", RFC 294 (NIC 8304), MIT-Project MAC, - 25 January 1972. - - Bhushan, Abhay, "The File Transfer Protocol", RFC 354 (NIC 10596), - MIT-Project MAC, 8 July 1972. - - Bhushan, Abhay, "Comments on the File Transfer Protocol (RFC 354)", - RFC 385 (NIC 11357), MIT-Project MAC, 18 August 1972. - - Hicks, Greg, "User FTP Documentation", RFC 412 (NIC 12404), Utah, - 27 November 1972. - - Bhushan, Abhay, "File Transfer Protocol (FTP) Status and Further - Comments", RFC 414 (NIC 12406), MIT-Project MAC, 20 November 1972. - - Braden, Bob, "Comments on File Transfer Protocol", RFC 430 - (NIC 13299), UCLA/CCN, 7 February 1973. - - Thomas, Bob, and Bob Clements, "FTP Server-Server Interaction", - RFC 438 (NIC 13770), BBN, 15 January 1973. - - Braden, Bob, "Print Files in FTP", RFC 448 (NIC 13299), UCLA/CCN, - 27 February 1973. - - McKenzie, Alex, "File Transfer Protocol", RFC 454 (NIC 14333), BBN, - 16 February 1973. - - -Postel & Reynolds [Page 66] - - - -RFC 959 October 1985 -File Transfer Protocol - - - Bressler, Bob, and Bob Thomas, "Mail Retrieval via FTP", RFC 458 - (NIC 14378), BBN-NET and BBN-TENEX, 20 February 1973. - - Neigus, Nancy, "File Transfer Protocol", RFC 542 (NIC 17759), BBN, - 12 July 1973. - - Krilanovich, Mark, and George Gregg, "Comments on the File Transfer - Protocol", RFC 607 (NIC 21255), UCSB, 7 January 1974. - - Pogran, Ken, and Nancy Neigus, "Response to RFC 607 - Comments on the - File Transfer Protocol", RFC 614 (NIC 21530), BBN, 28 January 1974. - - Krilanovich, Mark, George Gregg, Wayne Hathaway, and Jim White, - "Comments on the File Transfer Protocol", RFC 624 (NIC 22054), UCSB, - Ames Research Center, SRI-ARC, 28 February 1974. - - Bhushan, Abhay, "FTP Comments and Response to RFC 430", RFC 463 - (NIC 14573), MIT-DMCG, 21 February 1973. - - Braden, Bob, "FTP Data Compression", RFC 468 (NIC 14742), UCLA/CCN, - 8 March 1973. - - Bhushan, Abhay, "FTP and Network Mail System", RFC 475 (NIC 14919), - MIT-DMCG, 6 March 1973. - - Bressler, Bob, and Bob Thomas "FTP Server-Server Interaction - II", - RFC 478 (NIC 14947), BBN-NET and BBN-TENEX, 26 March 1973. - - White, Jim, "Use of FTP by the NIC Journal", RFC 479 (NIC 14948), - SRI-ARC, 8 March 1973. - - White, Jim, "Host-Dependent FTP Parameters", RFC 480 (NIC 14949), - SRI-ARC, 8 March 1973. - - Padlipsky, Mike, "An FTP Command-Naming Problem", RFC 506 - (NIC 16157), MIT-Multics, 26 June 1973. - - Day, John, "Memo to FTP Group (Proposal for File Access Protocol)", - RFC 520 (NIC 16819), Illinois, 25 June 1973. - - Merryman, Robert, "The UCSD-CC Server-FTP Facility", RFC 532 - (NIC 17451), UCSD-CC, 22 June 1973. - - Braden, Bob, "TENEX FTP Problem", RFC 571 (NIC 18974), UCLA/CCN, - 15 November 1973. - - - - -Postel & Reynolds [Page 67] - - - -RFC 959 October 1985 -File Transfer Protocol - - - McKenzie, Alex, and Jon Postel, "Telnet and FTP Implementation - - Schedule Change", RFC 593 (NIC 20615), BBN and MITRE, - 29 November 1973. - - Sussman, Julie, "FTP Error Code Usage for More Reliable Mail - Service", RFC 630 (NIC 30237), BBN, 10 April 1974. - - Postel, Jon, "Revised FTP Reply Codes", RFC 640 (NIC 30843), - UCLA/NMC, 5 June 1974. - - Harvey, Brian, "Leaving Well Enough Alone", RFC 686 (NIC 32481), - SU-AI, 10 May 1975. - - Harvey, Brian, "One More Try on the FTP", RFC 691 (NIC 32700), SU-AI, - 28 May 1975. - - Lieb, J., "CWD Command of FTP", RFC 697 (NIC 32963), 14 July 1975. - - Harrenstien, Ken, "FTP Extension: XSEN", RFC 737 (NIC 42217), SRI-KL, - 31 October 1977. - - Harrenstien, Ken, "FTP Extension: XRSQ/XRCP", RFC 743 (NIC 42758), - SRI-KL, 30 December 1977. - - Lebling, P. David, "Survey of FTP Mail and MLFL", RFC 751, MIT, - 10 December 1978. - - Postel, Jon, "File Transfer Protocol Specification", RFC 765, ISI, - June 1980. - - Mankins, David, Dan Franklin, and Buzz Owen, "Directory Oriented FTP - Commands", RFC 776, BBN, December 1980. - - Padlipsky, Michael, "FTP Unique-Named Store Command", RFC 949, MITRE, - July 1985. - - - -Postel & Reynolds [Page 68] - - - -RFC 959 October 1985 -File Transfer Protocol - - -REFERENCES - - [1] Feinler, Elizabeth, "Internet Protocol Transition Workbook", - Network Information Center, SRI International, March 1982. - - [2] Postel, Jon, "Transmission Control Protocol - DARPA Internet - Program Protocol Specification", RFC 793, DARPA, September 1981. - - [3] Postel, Jon, and Joyce Reynolds, "Telnet Protocol - Specification", RFC 854, ISI, May 1983. - - [4] Reynolds, Joyce, and Jon Postel, "Assigned Numbers", RFC 943, - ISI, April 1985. - - -Postel & Reynolds [Page 69] - -]]> -
- - -
diff --git a/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/site.xml b/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/site.xml deleted file mode 100644 index 0ea8a5f2d..000000000 --- a/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/site.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/site_cmd.xml b/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/site_cmd.xml deleted file mode 100644 index 0468f0571..000000000 --- a/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/site_cmd.xml +++ /dev/null @@ -1,204 +0,0 @@ - - - - - -
- SITE Command - - - -
- -
Overview -

SITE command is used by the server to provide services specific to the system. Most of the SITE commands - can be used by the admin only. You can get all the available SITE commands by "SITE HELP". -

-

All the server administrative tasks can be performed by the SITE command. So the administrator - can monitor, control the server remotely. All the available SITE commands descriptions with sample outputs are as follows: -

-
-
SITE HELP -

- This is the only SITE command that can be executed by non-admin user. It returns all the available SITE commands. -

- -ftp> quote SITE HELP -200- -ADDIP <IP> : add banned IP entry -ADDUSER <userName> : add user -DELIP <IP> : delete banned IP entry -DELUSER <userName> : delete user -DESCUSER <userName> : describe user -HELP : display this message -KICK <userName> : close the connection -LISTIP : display all banned IPs -LISTUSER : display all user names -SETATTR <userName> <attrName> <attrValue> : set user attributes -STAT : show statistics -WHO : display all connected users -200 -ftp> - -
- -
SITE WHO -

- You can get the list of all the currently connected user by this SITE command. It returns user name, client IP, login time and last access time. - You can disconnect a client connection using SITE KICK <userName>. If an user has logged-in multiple times, all these connections will - get disconnected. -

- -ftp> quote SITE WHO -200- -admin 127.0.0.1 10/17 19:45:42 10/17 20:17:37 -admin 127.0.0.1 10/17 19:46:13 10/17 20:17:24 -anonymous 127.0.0.1 10/17 19:46:21 10/17 20:16:45 -anonymous 127.0.0.1 10/17 19:46:42 10/17 20:02:50 -ranab 127.0.0.1 10/17 20:09:39 10/17 20:09:40 -200 -ftp> quote SITE KICK ranab -200 Command SITE okay -ftp> quote SITE WHO -200- -admin 127.0.0.1 10/17 19:45:42 10/17 20:17:37 -admin 127.0.0.1 10/17 19:46:13 10/17 20:18:33 -anonymous 127.0.0.1 10/17 19:46:21 10/17 20:18:16 -anonymous 127.0.0.1 10/17 19:46:42 10/17 20:02:50 -200 -ftp> - -
-
SITE LISTIP -

- SITE LISTIP returns all the banned/allowed IPs. - New entries can be added by SITE ADDIP <entry>. - Similarly existing entries can be removed by SITE DELIP <entry>. -

- -ftp> quote SITE LISTIP -200- -200 -ftp> quote SITE ADDIP 111.222.* -200 Command SITE okay -ftp> quote SITE ADDIP 222.111.100.* -200 Command SITE okay -ftp> quote SITE LISTIP -200- -111.222.* -222.111.100.* -200 -ftp> quote SITE DELIP 111.222.* -200 Command SITE okay -ftp> quote SITE LISTIP -200- -222.111.100.* -200 -ftp> - -
-
SITE LISTUSER -

- This command returns all the user names in the user store. - By executing SITE DESCUSER <userName> we can get the user parameters (except password). - Existing users can be removed by SITE DELUSER <userName>. -

- -ftp> quote SITE LISTUSER -200- -admin -anonymous -ranab -user1 -200 -ftp> quote SITE DESCUSER user1 -200- -login : user1 -password : ****** -home : C:/ -writepermission : true -enable : true -maxidletime : 1800 -maxuploadrate : 0 -maxdownloadrate : 0 -200 -ftp> quote SITE DELUSER user1 -200 Command SITE okay -ftp> quote SITE LISTUSER -200- -admin -anonymous -ranab -200 -ftp> - -
- -
SITE ADDUSER -

- New users can be added using this command. - The newly created user will have default parameters. The attributes are : -

-
    -
  • password (default - empty string : "")
  • -
  • home (default - configured default root)
  • -
  • writepermission (default - false)
  • -
  • enable (default - false)
  • -
  • maxidletime (default - configured default idle time)
  • -
  • maxuploadrate (default - no limit)
  • -
  • maxdownloadrate (default - no limit)
  • -
-

- We can change any user attribute by SITE SETATTR <userName> <attrName> <attrValue> command. -

- -ftp> quote SITE LISTUSER -200- -admin -anonymous -ranab -200 -ftp> quote SITE ADDUSER user2 -200 Command SITE okay -ftp> quote SITE DESCUSER user2 -200- -login : user2 -password : ****** -home : C:/ -writepermission : false -enable : false -maxidletime : 300 -maxuploadrate : 0 -maxdownloadrate : 0 -200 -ftp> quote SITE SETATTR user2 password userpassword -200 Command SITE okay -ftp> quote SITE SETATTR user2 home C:/myCode -200 Command SITE okay -ftp> quote SITE SETATTR user2 enable true -200 Command SITE okay -ftp> quote SITE SETATTR user2 maxuploadrate 5600 -200 Command SITE okay -ftp> quote SITE DESCUSER user2 -200- -login : user2 -password : ****** -home : C:/myCode/ -writepermission : false -enable : true -maxidletime : 300 -maxuploadrate : 5600 -maxdownloadrate : 0 -200 -ftp> quote SITE LISTUSER -200- -admin -anonymous -ranab -user2 -200 -ftp> - -
- -
diff --git a/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/tabs.xml b/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/tabs.xml deleted file mode 100644 index fd14e590a..000000000 --- a/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/tabs.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - diff --git a/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/user_manager.xml b/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/user_manager.xml deleted file mode 100644 index 0eba67109..000000000 --- a/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/user_manager.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - -
- User Manager - - - -
- -
User Manager -

- The default user manager is properties file based. All the user - informations (login, password, home directory, upload/download rate etc.) are stored in - user.properties file. The default user manager class is org.apache.ftpserver.usermanager.PropertiesUserManager - If you want to use different user manager, please change the user-manager block in assembly.xml file. -

-

- You can encrypt the password in properties based user manager by specifying - encrypt key in config.xml file. The encryption algorithm is MD5. -

-

- If you are using property file based default user manager, - make sure that the user properties file is not accesible by the FTP users. Otherwise it will be - a security problem. Keep it below the user virtual root directory. -

-

- You can change the default user manager or even write your own user manager - by implementating org.apache.ftpserver.usermanager.UserManagerInterface class. - You have to specify your user manager class (fully qualified) in the assembly file too. -

-
- -
diff --git a/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/weare.xml b/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/weare.xml deleted file mode 100644 index 6e074d23e..000000000 --- a/plexus-servers/plexus-ftpd/src/documentation/content/xdocs/weare.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - -
- We Are - - - -
- -
This list -

- Special thanks go to the following people for their contributions to this project. - We also appreciate documentation, feedback, and bug reports. This is a living document - that describes the key contributors to James. Last Updated March 2003. -

-
-
Active Commiters -
    -
  • Rana Bhattacharyya (rana_b at yahoo.com)
  • -
  • Paul Hammant
  • -
-
- -
diff --git a/plexus-servers/plexus-ftpd/src/documentation/resources/images/ftpserver-logo.gif b/plexus-servers/plexus-ftpd/src/documentation/resources/images/ftpserver-logo.gif deleted file mode 100644 index 01bc01607..000000000 Binary files a/plexus-servers/plexus-ftpd/src/documentation/resources/images/ftpserver-logo.gif and /dev/null differ diff --git a/plexus-servers/plexus-ftpd/src/documentation/resources/images/incubator-logo.gif b/plexus-servers/plexus-ftpd/src/documentation/resources/images/incubator-logo.gif deleted file mode 100644 index 310b42661..000000000 Binary files a/plexus-servers/plexus-ftpd/src/documentation/resources/images/incubator-logo.gif and /dev/null differ diff --git a/plexus-servers/plexus-ftpd/src/documentation/skinconf.xml b/plexus-servers/plexus-ftpd/src/documentation/skinconf.xml deleted file mode 100644 index de4f75838..000000000 --- a/plexus-servers/plexus-ftpd/src/documentation/skinconf.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ]> - - - - false - - false - - false - - true - - false - - incubator.apache.org - Incubator - - - FTPServer - http://incubator.apache.org/projects/ftpserver/ - images/ftpserver-logo.gif - - - Apache Incubator - http://incubator.apache.org - images/incubator-logo.gif - - - - - - - 2003 - The Apache Software Foundation. - - - - - - - - - - - - Built with Apache Forrest - http://xml.apache.org/forrest/ - images/built-with-forrest-button.png - 88 - 31 - - - - - diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/BaseFtpConnection.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/BaseFtpConnection.java deleted file mode 100644 index 3dc80a386..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/BaseFtpConnection.java +++ /dev/null @@ -1,336 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */package org.apache.ftpserver; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.net.InetAddress; -import java.net.Socket; - -import org.apache.avalon.cornerstone.services.connection.ConnectionHandler; -import org.apache.ftpserver.interfaces.FtpConnectionObserver; -import org.apache.ftpserver.interfaces.SpyConnectionInterface; -import org.apache.ftpserver.util.IoUtils; -import org.apache.ftpserver.util.Message; -import org.apache.ftpserver.util.StreamConnectorObserver; - - -/** - * This is a generic ftp connection handler. It delegates - * the request to appropriate methods in subclasses. - * - * @author Rana Bhattacharyya - */ -public -class BaseFtpConnection implements ConnectionHandler, StreamConnectorObserver { - - protected static final Class[] METHOD_INPUT_SIG = new Class[] {FtpRequest.class, FtpWriter.class}; - - protected FtpConfig mConfig = null; - protected FtpStatus mFtpStatus = null; - protected FtpDataConnection mDataConnection = null; - protected FtpUser mUser = null; - protected SpyConnectionInterface mSpy = null; - protected FtpConnectionObserver mObserver = null; - protected Socket mControlSocket = null; - protected FtpWriter mWriter = null; - protected boolean mbStopRequest = false; - - - /** - * Set configuration file and the control socket. - */ - public BaseFtpConnection(FtpConfig ftpConfig) { - mConfig = ftpConfig; - mFtpStatus = mConfig.getStatus(); - mUser = new FtpUser(); - } - - /** - * Server one FTP connection. - */ - public void handleConnection(final Socket socket) { - mControlSocket = socket; - InetAddress clientAddress = mControlSocket.getInetAddress(); - mConfig.getLogger().info("Handling new request from " + clientAddress.getHostAddress()); - mDataConnection = new FtpDataConnection(mConfig); - mUser.setClientAddress(clientAddress); - mConfig.getConnectionService().newConnection(this); - - BufferedReader in = null; - try { - in = new BufferedReader(new InputStreamReader(mControlSocket.getInputStream(), "ASCII")); - mWriter = new FtpWriter(mControlSocket, mConfig); - - // permission check - if( !mConfig.getIpRestrictor().hasPermission(mControlSocket.getInetAddress()) ) { - mWriter.write(mFtpStatus.getResponse(530, null, mUser, null)); - return; - } - mWriter.write(mFtpStatus.getResponse(220, null, mUser, null)); - - do { - notifyObserver(); - String commandLine = in.readLine(); - - // test command line - if(commandLine == null) { - break; - } - - spyRequest(commandLine); - if(commandLine.equals("")) { - continue; - } - - FtpRequest request = new FtpRequest(commandLine); - if(!hasPermission(request)) { - mWriter.write(mFtpStatus.getResponse(530, request, mUser, null)); - break; - } - - // execute command - service(request, mWriter); - } - while(!mbStopRequest); - } - catch(Exception ex) { - } - finally { - IoUtils.close(in); - IoUtils.close(mWriter); - ConnectionService conService = mConfig.getConnectionService(); - if (conService != null) { - conService.closeConnection(mUser.getSessionId()); - } - } - } - - - /** - * Execute the ftp command. - */ - public void service(FtpRequest request, FtpWriter writer) throws IOException { - try { - String metName = "do" + request.getCommand(); - Method actionMet = getClass().getDeclaredMethod(metName, METHOD_INPUT_SIG); - actionMet.invoke(this, new Object[] {request, writer}); - } - catch(NoSuchMethodException ex) { - writer.write(mFtpStatus.getResponse(502, request, mUser, null)); - } - catch(InvocationTargetException ex) { - writer.write(mFtpStatus.getResponse(500, request, mUser, null)); - Throwable th = ex.getTargetException(); - if (th instanceof java.io.IOException) { - throw (IOException)th; - } - else { - mConfig.getLogger().warn("BaseFtpConnection.service()", th); - } - } - catch(Exception ex) { - writer.write(mFtpStatus.getResponse(500, request, mUser, null)); - if (ex instanceof java.io.IOException) { - throw (IOException)ex; - } - else { - mConfig.getLogger().warn("BaseFtpConnection.service()", ex); - } - } - } - - /** - * Check permission - default implementation - does nothing. - */ - protected boolean hasPermission(FtpRequest request) { - return true; - } - - /** - * User logout and stop this thread. - */ - public void stop() { - mbStopRequest = true; - if (mDataConnection != null) { - mDataConnection.dispose(); - mDataConnection = null; - } - if (mControlSocket != null) { - try { - mControlSocket.close(); - } - catch(Exception ex) { - } - mControlSocket = null; - } - if (mUser.hasLoggedIn()) { - mUser.logout(); - } - mObserver = null; - } - - /** - * Is the connection closed? - */ - public boolean isClosed() { - return mbStopRequest; - } - - /** - * Monitor the user request. - */ - protected void spyRequest(final String str) { - final SpyConnectionInterface spy = mSpy; - if (spy != null) { - Message msg = new Message() { - public void execute() { - try { - spy.request(str + '\n'); - } - catch(Exception ex) { - mSpy = null; - mConfig.getLogger().error("BaseFtpConnection.spyPrint()", ex); - } - } - }; - mConfig.getMessageQueue().add(msg); - } - } - - /** - * Get user object - */ - public FtpUser getUser() { - return mUser; - } - - /** - * Get connection spy object - */ - public SpyConnectionInterface getSpyObject() { - return mSpy; - } - - /** - * Set spy object - */ - public void setSpyObject(SpyConnectionInterface spy) { - mWriter.setSpyObject(spy); - mSpy = spy; - } - - /** - * Get observer - */ - public FtpConnectionObserver getObserver() { - return mObserver; - } - - /** - * Set observer - */ - public void setObserver(FtpConnectionObserver obsr) { - mObserver = obsr; - } - - /** - * Notify observer. - */ - public void notifyObserver() { - mUser.hitUser(); - final FtpUser thisUser = mUser; - final FtpConnectionObserver obsr = mObserver; - - if (obsr != null) { - Message msg = new Message() { - public void execute() { - obsr.updateConnection(thisUser); - } - }; - mConfig.getMessageQueue().add(msg); - } - } - - /** - * This method tracks data transfer. - */ - public void dataTransferred(int sz) { - notifyObserver(); - } - - /** - * Get config object - */ - public FtpConfig getConfig() { - return mConfig; - } - - /** - * Get status object - */ - public FtpStatus getStatus() { - return mFtpStatus; - } - -} - - - - diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/ConnectionService.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/ConnectionService.java deleted file mode 100644 index 5ee18def7..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/ConnectionService.java +++ /dev/null @@ -1,500 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver; - -import java.io.File; -import java.util.List; -import java.util.Vector; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.Timer; -import java.util.TimerTask; -import org.apache.ftpserver.util.Message; -import org.apache.ftpserver.interfaces.FtpConnectionObserver; -import org.apache.ftpserver.interfaces.SpyConnectionInterface; -import org.apache.ftpserver.usermanager.User; -import org.apache.ftpserver.usermanager.UserManagerInterface; - -/** - * Ftp connection service class. It tracks all ftp connections. - * - * @author Rana Bhattacharyya - */ -public -class ConnectionService { - - private FtpConnectionObserver mObserver; - private FtpConfig mConfig; - private Timer mTimer; - private Vector mConList; - - - /** - * Constructor. Start scheduler job. - */ - public ConnectionService(FtpConfig cfg) throws Exception { - mConfig = cfg; - mConList = new Vector(); - - // default users creation - createDefaultUsers(); - - // set timer to remove inactive users and load data - mTimer = new Timer(); - TimerTask timerTask = new TimerTask() { - public void run() { - timerTask(); - } - }; - mTimer.schedule(timerTask, 0, mConfig.getSchedulerInterval()*1000); - } - - /** - * Create default users (admin/anonymous) if necessary - */ - private void createDefaultUsers() throws Exception { - UserManagerInterface userManager = mConfig.getUserManager(); - - // create admin user - String adminName = userManager.getAdminName(); - if(!userManager.doesExist(adminName)) { - mConfig.getLogger().info("Creating user " + adminName); - User adminUser = new User(); - adminUser.setName(adminName); - adminUser.setPassword(adminName); - adminUser.setEnabled(true); - adminUser.getVirtualDirectory().setWritePermission(true); - adminUser.setMaxUploadRate(0); - adminUser.setMaxDownloadRate(0); - adminUser.getVirtualDirectory().setRootDirectory(mConfig.getDefaultRoot()); - adminUser.setMaxIdleTime(mConfig.getDefaultIdleTime()); - userManager.save(adminUser); - } - - // create anonymous user - if(!userManager.doesExist(FtpUser.ANONYMOUS)) { - mConfig.getLogger().info("Creating user " + FtpUser.ANONYMOUS); - User anonUser = new User(); - anonUser.setName(FtpUser.ANONYMOUS); - anonUser.setPassword(""); - anonUser.setEnabled(true); - anonUser.getVirtualDirectory().setWritePermission(false); - anonUser.setMaxUploadRate(4800); - anonUser.setMaxDownloadRate(4800); - anonUser.getVirtualDirectory().setRootDirectory(mConfig.getDefaultRoot()); - anonUser.setMaxIdleTime(mConfig.getDefaultIdleTime()); - userManager.save(anonUser); - } - } - - /** - * It returns a list of all the currently connected users. - */ - public List getAllUsers() { - List userList = new ArrayList(); - synchronized(mConList) { - for(Iterator conIt=mConList.iterator(); conIt.hasNext(); ) { - BaseFtpConnection conObj = (BaseFtpConnection)conIt.next(); - if (conObj != null) { - userList.add(conObj.getUser()); - } - } - } - return userList; - } - - /** - * Set user manager observer. - */ - public void setObserver(FtpConnectionObserver obsr ) { - mObserver = obsr; - synchronized(mConList) { - for(Iterator conIt=mConList.iterator(); conIt.hasNext(); ) { - BaseFtpConnection conObj = (BaseFtpConnection)conIt.next(); - if (conObj != null) { - conObj.setObserver(mObserver); - } - } - } - } - - /** - * Get the observer. - */ - public FtpConnectionObserver getObserver() { - return mObserver; - } - - /** - * User login method. If successfull, populates the user object. - */ - public boolean login(final FtpUser thisUser) { - - // already logged in - if(thisUser.hasLoggedIn()) { - return true; - } - - // get name and password - String user = thisUser.getName(); - String password = thisUser.getPassword(); - if( (user == null) || (password == null) ) { - return false; - } - - // authenticate user - UserManagerInterface userManager = mConfig.getUserManager(); - boolean bAnonymous = thisUser.getIsAnonymous(); - if ( !(bAnonymous || userManager.authenticate(user, password)) ) { - mConfig.getLogger().warn("Authentication failed - " + user); - return false; - } - - // populate user properties - if (!populateProperties(thisUser, user)){ - return false; - } - - // user enable check - if(!thisUser.getEnabled()) { - return false; - } - - // connection limit check - if (!checkConnection(thisUser)){ - return false; - } - - thisUser.login(); - thisUser.setPassword(null); - - // create user home if necessary - if( !createHome(thisUser) ) { - return false; - } - mConfig.getLogger().info("User login - " + thisUser.getClientAddress().getHostAddress() + " - " + thisUser.getName()); - - // update global statistics - mConfig.getStatistics().setLogin(thisUser.getIsAnonymous()); - return true; - } - - /** - * Close ftp connection for this session id. - */ - public void closeConnection(final String sessId) { - BaseFtpConnection con = null; - synchronized(mConList) { - con = getConnection(sessId); - if (con != null) { - mConList.remove(con); - } - } - - // close connection - if (con != null) { - - // logout notification - final FtpUser thisUser = con.getUser(); - if (thisUser.hasLoggedIn()) { - mConfig.getStatistics().setLogout(thisUser.getIsAnonymous()); - } - - // close socket - con.stop(); - - // send message - Message msg = new Message() { - public void execute() { - FtpConnectionObserver observer = mObserver; - if(observer != null) { - observer.removeConnection(thisUser); - } - } - }; - mConfig.getMessageQueue().add(msg); - mConfig.getStatistics().setCloseConnection(); - } - } - - - /** - * Close all - close all the connections. - */ - public void closeAllConnections() { - List allUsers = getAllUsers(); - for( Iterator userIt = allUsers.iterator(); userIt.hasNext(); ) { - FtpUser user = (FtpUser)userIt.next(); - closeConnection(user.getSessionId()); - } - } - - /** - * Populate user properties - */ - private boolean populateProperties(FtpUser thisUser, String user) { - - // get the existing user - UserManagerInterface userManager = mConfig.getUserManager(); - User existUser = userManager.getUserByName(user); - if(existUser == null) { - return false; - } - - // map properties - thisUser.getVirtualDirectory().setRootDirectory(new File(existUser.getVirtualDirectory().getRootDirectory())); - thisUser.setEnabled(existUser.getEnabled()); - thisUser.getVirtualDirectory().setWritePermission(existUser.getVirtualDirectory().getWritePermission()); - thisUser.setMaxIdleTime(existUser.getMaxIdleTime()); - thisUser.setMaxUploadRate(existUser.getMaxUploadRate()); - thisUser.setMaxDownloadRate(existUser.getMaxDownloadRate()); - return true; - } - - /** - * Connection limit check. - */ - private boolean checkConnection(FtpUser thisUser) { - int maxLogins = mConfig.getMaxConnections(); - int maxAnonLogins = mConfig.getMaxAnonymousLogins(); - int anonNbr = mConfig.getStatistics().getAnonLoginNbr(); - int totalNbr = mConfig.getStatistics().getLoginNbr(); - - // final check - if(thisUser.getIsAnonymous()) { - if(!mConfig.isAnonymousLoginAllowed()) { - return false; - } - if( (anonNbr>=maxAnonLogins) || (totalNbr>=maxLogins) ) { - return false; - } - mConfig.getLogger().info("Anonymous connection - " + thisUser.getClientAddress().getHostAddress() + " - " + thisUser.getPassword()); - } - else { - if(totalNbr>=maxLogins) { - return false; - } - } - return true; - } - - - /** - * Create user home directory if necessary - */ - private boolean createHome(FtpUser user) { - - File userHome = new File( user.getVirtualDirectory().getRootDirectory() ); - if( userHome.exists() ) { - if( !userHome.isDirectory() ) { - mConfig.getLogger().warn("User home (" + userHome.getAbsolutePath() + ") for user " + user.getName() + " is not a directory."); - return false; - } - } - else { - if( mConfig.isCreateHome() ) { - mConfig.getLogger().info("Creating home (" + userHome.getAbsolutePath() + ") for user " + user.getName()); - if( !userHome.mkdirs() ) { - mConfig.getLogger().warn("Cannot create home (" + userHome.getAbsolutePath() + ") for user " + user.getName()); - return false; - } - } - else { - mConfig.getLogger().warn("Cannot find home (" + userHome.getAbsolutePath() + ") for user " + user.getName()); - return false; - } - } - - return true; - } - - - /** - * New connection has been established - not yet logged-in. - */ - public void newConnection(final BaseFtpConnection newCon) { - - // null user - ignore - if (newCon == null) { - return; - } - - final FtpUser newUser = newCon.getUser(); - - mConList.add(newCon); - newUser.setMaxIdleTime(mConfig.getDefaultIdleTime()); - newUser.getVirtualDirectory().setRootDirectory(mConfig.getDefaultRoot()); - newCon.setObserver(mObserver); - mConfig.getLogger().info("New connection from " + newUser.getClientAddress().getHostAddress()); - - // notify observer about a new connection - final FtpConnectionObserver observer = mObserver; - if (observer != null) { - Message msg = new Message() { - public void execute() { - observer.newConnection(newUser); - } - }; - mConfig.getMessageQueue().add(msg); - } - - // update global statistics - mConfig.getStatistics().setOpenConnection(); - } - - - /** - * Set connection spy object - */ - public void setSpyObject(String sessId, SpyConnectionInterface spy) { - BaseFtpConnection con = getConnection(sessId); - if (con != null) { - con.setSpyObject(spy); - } - } - - /** - * Get connection object - */ - public BaseFtpConnection getConnection(String sessId) { - BaseFtpConnection con = null; - synchronized(mConList) { - for(Iterator conIt=mConList.iterator(); conIt.hasNext(); ) { - BaseFtpConnection conObj = (BaseFtpConnection)conIt.next(); - if (conObj != null) { - if ( conObj.getUser().getSessionId().equals(sessId) ) { - con = conObj; - break; - } - } - } - } - return con; - } - - /** - * Reset all spy objects - */ - public void resetAllSpyObjects() { - synchronized(mConList) { - for(Iterator conIt=mConList.iterator(); conIt.hasNext(); ) { - BaseFtpConnection conObj = (BaseFtpConnection)conIt.next(); - if (conObj != null) { - conObj.setSpyObject(null); - } - } - } - } - - /** - * Timer thread will call this method periodically to - * close inactice connections and load user information. - */ - public void timerTask() { - - // get inactive user list - ArrayList inactiveUserList = new ArrayList(); - long currTime = System.currentTimeMillis(); - synchronized(mConList) { - for( Iterator conIt=mConList.iterator(); conIt.hasNext(); ) { - BaseFtpConnection con = (BaseFtpConnection)conIt.next(); - if (con != null) { - FtpUser user = con.getUser(); - if (!user.isActive(currTime)) { - inactiveUserList.add(user); - } - } - } - } - - // remove inactive users - for( Iterator userIt=inactiveUserList.iterator(); userIt.hasNext(); ) { - FtpUser user = (FtpUser)userIt.next(); - mConfig.getLogger().info("Removing idle user " + user); - closeConnection(user.getSessionId()); - } - - // reload user data - UserManagerInterface userManager = mConfig.getUserManager(); - try { - userManager.reload(); - } - catch(Exception ex) { - mConfig.getLogger().error("ConnectionService.timerTask()", ex); - } - } - - /** - * Dispose connection service. If logs out all the connected - * users and stops the cleaner thread. - */ - public void dispose() { - - // close all connections - if (mConList != null) { - closeAllConnections(); - mConList = null; - } - - // stop timer - if (mTimer != null) { - mTimer.cancel(); - mTimer = null; - } - } - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpConfig.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpConfig.java deleted file mode 100644 index 4a804336a..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpConfig.java +++ /dev/null @@ -1,507 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver; - -import java.io.File; -import java.io.IOException; -import java.net.InetAddress; -import java.util.StringTokenizer; - -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.context.Context; -import org.apache.avalon.framework.logger.Logger; -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.ftpserver.ip.IpRestrictorInterface; -import org.apache.ftpserver.remote.RemoteHandler; -import org.apache.ftpserver.usermanager.UserManagerInterface; -import org.apache.ftpserver.util.AsyncMessageQueue; - -/** - * Ftp configuration class. It has all ftp server configuration - * parameters. This is not hot-editable. parameters will be loaded - * once during server startup. We can add our own config parameters. - * - * @author Rana Bhattacharyya - */ -public -class FtpConfig { - - private FtpStatus mStatus = null; - private ConnectionService mConService = null; - private IpRestrictorInterface mIpRestrictor = null; - private UserManagerInterface mUserManager = null; - - private InetAddress mServerAddress = null; - private InetAddress mSelfAddress = null; - - private Configuration mConf = null; - private Context mContext = null; - private Logger mLogger = null; - - private FtpStatistics mStatistics = null; - - private RemoteHandler mRemoteHandler = null; - - private int miServerPort; - private int miDataPort[][]; - private int miRmiPort; - private int miMaxLogin; - private int miAnonLogin; - private int miPollInterval; - private int miDefaultIdle; - private boolean mbAnonAllowed; - private boolean mbCreateHome; - private boolean mbRemoteAdminAllowed; - private File mDefaultRoot; - private AsyncMessageQueue mQueue; - - /** - * Default constructor - first step. - */ - public FtpConfig() throws IOException { - mStatus = new FtpStatus(); - mQueue = new AsyncMessageQueue(); - mQueue.setMaxSize(4096); - } - - /** - * Set logger - second step. - */ - public void setLogger(Logger logger) { - mLogger = logger; - } - - /** - * Set context - third step. - */ - public void setContext(Context ctx) { - mContext = ctx; - } - - /** - * Set component manager - fourth step. - * TODO - case for more blocks here? - PJH - */ - public void setServiceManager(ServiceManager serviceManager) throws ServiceException { - mIpRestrictor = (IpRestrictorInterface)serviceManager.lookup(IpRestrictorInterface.ROLE); - mUserManager = (UserManagerInterface)serviceManager.lookup(UserManagerInterface.ROLE); - } - - - /** - * Set configuration - fifth step. - */ - public void setConfiguration(Configuration conf) throws Exception { - mConf = conf; - Configuration tmpConf = null; - - // get server address - tmpConf = conf.getChild("server-host", false); - if(tmpConf != null) { - mServerAddress = InetAddress.getByName(tmpConf.getValue()); - } - - // get self address - tmpConf = conf.getChild("self-host", false); - if(tmpConf != null) { - mSelfAddress = InetAddress.getByName(tmpConf.getValue()); - } - - // get server port - miServerPort = 21; - tmpConf = conf.getChild("ftp-port", false); - if(tmpConf != null) { - miServerPort = tmpConf.getValueAsInteger(miServerPort); - } - - // get maximum number of connections - miMaxLogin = 20; - tmpConf = conf.getChild("max-connection", false); - if(tmpConf != null) { - miMaxLogin = tmpConf.getValueAsInteger(miMaxLogin); - } - - // get anonymous login allow flag - mbAnonAllowed = true; - tmpConf = conf.getChild("anonymous-login-allowed", false); - if(tmpConf != null) { - mbAnonAllowed = tmpConf.getValueAsBoolean(mbAnonAllowed); - } - - // get maximum number of anonymous connections - miAnonLogin = 10; - tmpConf = conf.getChild("anonymous-max-connection", false); - if(tmpConf != null) { - miAnonLogin = tmpConf.getValueAsInteger(miAnonLogin); - } - - // get scheduler interval - miPollInterval = 120; - tmpConf = conf.getChild("poll-interval", false); - if(tmpConf != null) { - miPollInterval = tmpConf.getValueAsInteger(miPollInterval); - } - - // get rmi port - miRmiPort = java.rmi.registry.Registry.REGISTRY_PORT; - tmpConf = conf.getChild("remote-admin-port", false); - if(tmpConf != null) { - miRmiPort = tmpConf.getValueAsInteger(miRmiPort); - } - - // get remote admin allow flag - mbRemoteAdminAllowed = true; - tmpConf = conf.getChild("remote-admin-allowed", false); - if(tmpConf != null) { - mbRemoteAdminAllowed = tmpConf.getValueAsBoolean(mbRemoteAdminAllowed); - } - - // get autometic user home creation flag - mbCreateHome = false; - tmpConf = conf.getChild("create-user-home", false); - if(tmpConf != null) { - mbCreateHome = tmpConf.getValueAsBoolean(mbCreateHome); - } - - // get default idle time - miDefaultIdle = 300; - tmpConf = conf.getChild("default-idle-time", false); - if(tmpConf != null) { - miDefaultIdle = tmpConf.getValueAsInteger(miDefaultIdle); - } - - // get default root - String defaultRoot = "/"; - tmpConf = conf.getChild("default-user-root", false); - if(tmpConf != null) { - defaultRoot = tmpConf.getValue(defaultRoot); - } - mDefaultRoot = new File(defaultRoot); - - // get data port number - String dataPort = "0"; - tmpConf = conf.getChild("data-port-pool", false); - if(tmpConf != null) { - dataPort = tmpConf.getValue(dataPort); - } - StringTokenizer st = new StringTokenizer(dataPort, ", \t\n\r\f"); - miDataPort = new int[st.countTokens()][2]; - for(int i=0; i= 0) && (!currThread.isInterrupted()) ) { - - // search for a free port - for(int i=0; iFtpServer.stop() method will call this method. - */ - public void dispose() { - - // close remote handler - if (mRemoteHandler != null) { - mRemoteHandler.dispose(); - mRemoteHandler = null; - } - - // close connection service - if(mConService != null) { - mConService.dispose(); - mConService = null; - } - - // close message queue - if (mQueue != null) { - mQueue.stop(); - mQueue = null; - } - } - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpConnection.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpConnection.java deleted file mode 100644 index 07068e1c3..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpConnection.java +++ /dev/null @@ -1,1351 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver; - -import java.io.File; -import java.io.RandomAccessFile; -import java.io.InputStream; -import java.io.FileInputStream; -import java.io.OutputStream; -import java.io.FileOutputStream; -import java.io.Writer; -import java.io.OutputStreamWriter; -import java.io.IOException; -import java.net.Socket; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.StringTokenizer; - -import org.apache.ftpserver.util.IoUtils; -import org.apache.ftpserver.util.StreamConnector; - -/** - * This class handles each ftp connection. Here all the ftp command - * methods take two arguments - a ftp request and a writer object. - * This is the main backbone of the ftp server. - *
- * The ftp command method signature is: - * public void doXYZ(FtpRequest request, FtpWriter out) throws IOException. - *
- * Here XYZ is the capitalized ftp command. - * - * @author Rana Bhattacharyya - */ -public -class FtpConnection extends BaseFtpConnection { - - // as SimpleDateFormat is not thread-safe we have to use ThreadLocal - private final static ThreadLocal DATE_FMT = new ThreadLocal() { - protected Object initialValue() { - return new SimpleDateFormat("yyyyMMddHHmmss.SSS"); - } - }; - - // command state specific temporary variables - private boolean mbReset = false; - private long mlSkipLen = 0; - - private boolean mbRenFr = false; - private String mstRenFr = null; - - private boolean mbUser = false; - private boolean mbPass = false; - - /** - * Set configuration file and the control socket. - */ - public FtpConnection(FtpConfig cfg) { - super(cfg); - } - - /** - * Check the user permission to execute this command. - */ - protected boolean hasPermission(FtpRequest request) { - String cmd = request.getCommand(); - return mUser.hasLoggedIn() || - cmd.equals("USER") || - cmd.equals("PASS") || - cmd.equals("AUTH") || - cmd.equals("HELP") || - cmd.equals("SYST"); - } - - /** - * Reset temporary state variables. - */ - private void resetState() { - mbRenFr = false; - mstRenFr = null; - - mbReset = false; - mlSkipLen = 0; - - mbUser = false; - mbPass = false; - } - - //////////////////////////////////////////////////////////// - ///////////////// all the FTP handlers ///////////////// - //////////////////////////////////////////////////////////// - /** - * ABOR <CRLF>
- * - * This command tells the server to abort the previous FTP - * service command and any associated transfer of data. - * No action is to be taken if the previous command - * has been completed (including data transfer). The control - * connection is not to be closed by the server, but the data - * connection must be closed. - * Current implementation does not do anything. As here data - * transfers are not multi-threaded. - */ - public void doABOR(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // and abort any data connection - mDataConnection.closeDataSocket(); - out.write(mFtpStatus.getResponse(225, request, mUser, null)); - } - - - /** - * APPE <SP> <pathname> <CRLF>
- * - * This command causes the server-DTP to accept the data - * transferred via the data connection and to store the data in - * a file at the server site. If the file specified in the - * pathname exists at the server site, then the data shall be - * appended to that file; otherwise the file specified in the - * pathname shall be created at the server site. - */ - public void doAPPE(FtpRequest request, FtpWriter out) throws IOException { - - InputStream is = null; - OutputStream os = null; - String[] args = null; - - try { - - // reset state variables - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // get filenames - String fileName = request.getArgument(); - fileName = mUser.getVirtualDirectory().getAbsoluteName(fileName); - String physicalName = mUser.getVirtualDirectory().getPhysicalName(fileName); - File requestedFile = new File(physicalName); - args = new String[] {fileName}; - - // check file existance - if(!(requestedFile.exists() && requestedFile.isFile())) { - out.write(mFtpStatus.getResponse(550, request, mUser, args)); - return ; - } - - // check permission - if(!mUser.getVirtualDirectory().hasWritePermission(physicalName, true)) { - out.write(mFtpStatus.getResponse(450, request, mUser, args)); - return ; - } - - // now transfer file data - out.write(mFtpStatus.getResponse(150, request, mUser, args)); - Socket dataSoc = mDataConnection.getDataSocket(); - if(dataSoc == null) { - out.write(mFtpStatus.getResponse(550, request, mUser, args)); - return ; - } - - // go to the end of the file - is = dataSoc.getInputStream(); - RandomAccessFile raf = new RandomAccessFile(requestedFile, "rw"); - raf.seek(raf.length()); - os = mUser.getOutputStream(new FileOutputStream(raf.getFD())); - - // receive data from client - StreamConnector msc = new StreamConnector(is, os); - msc.setMaxTransferRate(mUser.getMaxUploadRate()); - msc.setObserver(this); - msc.connect(); - - if(msc.hasException()) { - out.write(mFtpStatus.getResponse(451, request, mUser, args)); - } - else { - mConfig.getStatistics().setUpload(requestedFile, mUser, msc.getTransferredSize()); - } - - out.write(mFtpStatus.getResponse(226, request, mUser, args)); - } - catch(IOException ex) { - out.write(mFtpStatus.getResponse(425, request, mUser, args)); - } - finally { - IoUtils.close(is); - IoUtils.close(os); - mDataConnection.closeDataSocket(); - } - } - - - /** - * CDUP <CRLF>
- * - * This command is a special case of CWD, and is included to - * simplify the implementation of programs for transferring - * directory trees between operating systems having different - * syntaxes for naming the parent directory. The reply codes - * shall be identical to the reply codes of CWD. - */ - public void doCDUP(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // change directory - if(mUser.getVirtualDirectory().changeDirectory("..")) { - String args[] = {mUser.getVirtualDirectory().getCurrentDirectory()}; - out.write(mFtpStatus.getResponse(250, request, mUser, args)); - } - else { - out.write(mFtpStatus.getResponse(550, request, mUser, null)); - } - } - - - /** - * CWD <SP> <pathname> <CRLF>
- * - * This command allows the user to work with a different - * directory for file storage or retrieval without - * altering his login or accounting information. Transfer - * parameters are similarly unchanged. The argument is a - * pathname specifying a directory. - */ - public void doCWD(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // get new directory name - String dirName = "/"; - if(request.hasArgument()) { - dirName = request.getArgument(); - } - - // change directory - if(mUser.getVirtualDirectory().changeDirectory(dirName)) { - String args[] = {mUser.getVirtualDirectory().getCurrentDirectory()}; - out.write(mFtpStatus.getResponse(250, request, mUser, args)); - } - else { - out.write(mFtpStatus.getResponse(550, request, mUser, null)); - } - } - - - /** - * DELE <SP> <pathname> <CRLF>
- * - * This command causes the file specified in the pathname to be - * deleted at the server site. - */ - public void doDELE(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // get filenames - String fileName = request.getArgument(); - fileName = mUser.getVirtualDirectory().getAbsoluteName(fileName); - String physicalName = mUser.getVirtualDirectory().getPhysicalName(fileName); - File requestedFile = new File(physicalName); - String[] args = {fileName}; - - // check file existance - if( !(requestedFile.exists() && requestedFile.isFile()) ) { - out.write(mFtpStatus.getResponse(550, request, mUser, args)); - return; - } - - // check permission - if(!mUser.getVirtualDirectory().hasWritePermission(physicalName, true)) { - out.write(mFtpStatus.getResponse(450, request, mUser, args)); - return ; - } - - // now delete - if(requestedFile.delete()) { - out.write(mFtpStatus.getResponse(250, request, mUser, args)); - mConfig.getStatistics().setDelete(requestedFile, mUser); - } - else { - out.write(mFtpStatus.getResponse(450, request, mUser, args)); - } - } - - - /** - * HELP [<SP> ] <CRLF>
- * - * This command shall cause the server to send helpful - * information regarding its implementation status over the - * control connection to the user. The command may take an - * argument (e.g., any command name) and return more specific - * information as a response. - */ - public void doHELP(FtpRequest request, FtpWriter out) throws IOException { - resetState(); - - // print global help - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(214, null, mUser, null)); - return ; - } - - // print command specific help - String ftpCmd = request.getArgument().toUpperCase(); - String args[] = null; - FtpRequest tempRequest = new FtpRequest(ftpCmd); - out.write(mFtpStatus.getResponse(214, tempRequest, mUser, args)); - return ; - } - - - /** - * LIST [<SP> <pathname>] <CRLF>
- * - * This command causes a list to be sent from the server to the - * passive DTP. If the pathname specifies a directory or other - * group of files, the server should transfer a list of files - * in the specified directory. If the pathname specifies a - * file then the server should send current information on the - * file. A null argument implies the user's current working or - * default directory. The data transfer is over the data - * connection - */ - public void doLIST(FtpRequest request, FtpWriter out) throws IOException { - - Writer os = null; - try { - - // reset state variables - resetState(); - - // get data connection - out.write(mFtpStatus.getResponse(150, request, mUser, null)); - Socket dataSoc = mDataConnection.getDataSocket(); - if(dataSoc == null) { - out.write(mFtpStatus.getResponse(550, request, mUser, null)); - return ; - } - - // transfer listing data - os = new OutputStreamWriter(dataSoc.getOutputStream()); - if(!mUser.getVirtualDirectory().printList(request.getArgument(), os)) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - } - else { - out.write(mFtpStatus.getResponse(226, request, mUser, null)); - } - } - catch(IOException ex) { - out.write(mFtpStatus.getResponse(425, request, mUser, null)); - } - finally { - IoUtils.close(os); - mDataConnection.closeDataSocket(); - } - } - - - /** - * MDTM <SP> <pathname> <CRLF>
- * - * Returns the date and time of when a file was modified. - */ - public void doMDTM(FtpRequest request, FtpWriter out) throws IOException { - - // reset state - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // get filenames - String fileName = request.getArgument(); - fileName = mUser.getVirtualDirectory().getAbsoluteName(fileName); - String physicalName = mUser.getVirtualDirectory().getPhysicalName(fileName); - File reqFile = new File(physicalName); - - // now print date - if(reqFile.exists()) { - SimpleDateFormat fmt = (SimpleDateFormat)DATE_FMT.get(); - String args[] = {fmt.format(new Date(reqFile.lastModified()))}; - out.write(mFtpStatus.getResponse(213, request, mUser, args)); - } - else { - out.write(mFtpStatus.getResponse(550, request, mUser, null)); - } - } - - - /** - * MKD <SP> <pathname> <CRLF>
- * - * This command causes the directory specified in the pathname - * to be created as a directory (if the pathname is absolute) - * or as a subdirectory of the current working directory (if - * the pathname is relative). - */ - public void doMKD(FtpRequest request, FtpWriter out) throws IOException { - - // reset state - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // get filename - String fileName = request.getArgument(); - fileName = mUser.getVirtualDirectory().getAbsoluteName(fileName); - String physicalName = mUser.getVirtualDirectory().getPhysicalName(fileName); - String args[] = {fileName}; - - // check permission - if(!mUser.getVirtualDirectory().hasCreatePermission(physicalName, true)) { - out.write(mFtpStatus.getResponse(450, request, mUser, args)); - return ; - } - - // now create directory - if(new File(physicalName).mkdirs()) { - out.write(mFtpStatus.getResponse(250, request, mUser, args)); - } - else { - out.write(mFtpStatus.getResponse(450, request, mUser, args)); - } - } - - - /** - * MODE <SP> <CRLF>
- * - * The argument is a single Telnet character code specifying - * the data transfer modes described in the Section on - * Transmission Modes. - */ - public void doMODE(FtpRequest request, FtpWriter out) throws IOException { - - // reset state - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // set mode - if(mUser.setMode(request.getArgument().charAt(0))) { - out.write(mFtpStatus.getResponse(200, request, mUser, null)); - } - else { - out.write(mFtpStatus.getResponse(504, request, mUser, null)); - } - } - - - /** - * NLST [<SP> <pathname>] <CRLF>
- * - * This command causes a directory listing to be sent from - * server to user site. The pathname should specify a - * directory or other system-specific file group descriptor; a - * null argument implies the current directory. The server - * will return a stream of names of files and no other - * information. - */ - public void doNLST(FtpRequest request, FtpWriter out) throws IOException { - - Writer os = null; - try { - - // reset state - resetState(); - - // get data connection - out.write(mFtpStatus.getResponse(150, request, mUser, null)); - Socket dataSoc = mDataConnection.getDataSocket(); - if(dataSoc == null) { - out.write(mFtpStatus.getResponse(550, request, mUser, null)); - return ; - } - - // print listing data - os = new OutputStreamWriter(dataSoc.getOutputStream()); - if(!mUser.getVirtualDirectory().printNList(request.getArgument(), os)) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - } - else { - out.write(mFtpStatus.getResponse(226, request, mUser, null)); - } - } - catch(IOException ex) { - out.write(mFtpStatus.getResponse(425, request, mUser, null)); - } - finally { - IoUtils.close(os); - mDataConnection.closeDataSocket(); - } - } - - - /** - * NOOP <CRLF>
- * - * This command does not affect any parameters or previously - * entered commands. It specifies no action other than that the - * server send an OK reply. - */ - public void doNOOP(FtpRequest request, FtpWriter out) throws IOException { - resetState(); - out.write(mFtpStatus.getResponse(200, request, mUser, null)); - } - - - /** - * PASS <SP> <CRLF>
- * - * The argument field is a Telnet string specifying the user's - * password. This command must be immediately preceded by the - * user name command. - */ - public void doPASS(FtpRequest request, FtpWriter out) throws IOException { - - // set state variables - if(!mbUser) { - out.write(mFtpStatus.getResponse(500, request, mUser, null)); - resetState(); - return ; - } - resetState(); - mbPass = true; - - // set user password and login - String pass = request.hasArgument() ? request.getArgument() : ""; - mUser.setPassword(pass); - - // login failure - close connection - String args[] = {mUser.getName()}; - if(mConfig.getConnectionService().login(mUser)) { - out.write(mFtpStatus.getResponse(230, request, mUser, args)); - } - else { - out.write(mFtpStatus.getResponse(530, request, mUser, args)); - ConnectionService conService = mConfig.getConnectionService(); - if(conService != null) { - conService.closeConnection(mUser.getSessionId()); - } - } - } - - - /** - * PASV <CRLF>
- * - * This command requests the server-DTP to "listen" on a data - * port (which is not its default data port) and to wait for a - * connection rather than initiate one upon receipt of a - * transfer command. The response to this command includes the - * host and port address this server is listening on. - */ - public void doPASV(FtpRequest request, FtpWriter out) throws IOException { - - // reset state - resetState(); - - // set data connection - if(!mDataConnection.setPasvCommand()) { - out.write(mFtpStatus.getResponse(550, request, mUser, null)); - return ; - } - - // get connection info - InetAddress servAddr = mDataConnection.getInetAddress(); - if(servAddr == null) { - servAddr = mConfig.getSelfAddress(); - } - - int servPort = mDataConnection.getPort(); - - // send connection info to client - String addrStr = servAddr.getHostAddress().replace('.', ',') + ',' + (servPort >> 8) + ',' + (servPort & 0xFF); - String[] args = {addrStr}; - out.write(mFtpStatus.getResponse(227, request, mUser, args)); - } - - - /** - * PORT <SP> <CRLF>
- * - * The argument is a HOST-PORT specification for the data port - * to be used in data connection. There are defaults for both - * the user and server data ports, and under normal - * circumstances this command and its reply are not needed. If - * this command is used, the argument is the concatenation of a - * 32-bit internet host address and a 16-bit TCP port address. - * This address information is broken into 8-bit fields and the - * value of each field is transmitted as a decimal number (in - * character string representation). The fields are separated - * by commas. A port command would be: - * - * PORT h1,h2,h3,h4,p1,p2 - * - * where h1 is the high order 8 bits of the internet host address. - */ - public void doPORT(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - StringTokenizer st = new StringTokenizer(request.getArgument(), ","); - if(st.countTokens() != 6) { - out.write(mFtpStatus.getResponse(510, request, mUser, null)); - return ; - } - - // get data server - String dataSrvName = st.nextToken() + '.' + st.nextToken() + '.' + - st.nextToken() + '.' + st.nextToken(); - InetAddress clientAddr = null; - try { - clientAddr = InetAddress.getByName(dataSrvName); - } - catch(UnknownHostException ex) { - out.write(mFtpStatus.getResponse(553, request, mUser, null)); - return ; - } - - // get data server port - int clientPort = 0; - try { - int hi = Integer.parseInt(st.nextToken()); - int lo = Integer.parseInt(st.nextToken()); - clientPort = (hi << 8) | lo; - } - catch(NumberFormatException ex) { - out.write(mFtpStatus.getResponse(552, request, mUser, null)); - return ; - } - - mDataConnection.setPortCommand(clientAddr, clientPort); - out.write(mFtpStatus.getResponse(200, request, mUser, null)); - } - - - /** - * PWD <CRLF>
- * - * This command causes the name of the current working - * directory to be returned in the reply. - */ - public void doPWD(FtpRequest request, FtpWriter out) throws IOException { - resetState(); - String args[] = {mUser.getVirtualDirectory().getCurrentDirectory()}; - out.write(mFtpStatus.getResponse(257, request, mUser, args)); - } - - - /** - * QUIT <CRLF>
- * - * This command terminates a USER and if file transfer is not - * in progress, the server closes the control connection. - */ - public void doQUIT(FtpRequest request, FtpWriter out) throws IOException { - resetState(); - out.write(mFtpStatus.getResponse(221, request, mUser, null)); - ConnectionService conService = mConfig.getConnectionService(); - if(conService != null) { - conService.closeConnection(mUser.getSessionId()); - } - } - - - /** - * REST <SP> <CRLF>
- * - * The argument field represents the server marker at which - * file transfer is to be restarted. This command does not - * cause file transfer but skips over the file to the specified - * data checkpoint. This command shall be immediately followed - * by the appropriate FTP service command which shall cause - * file transfer to resume. - */ - public void doREST(FtpRequest request, FtpWriter out) throws IOException { - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - resetState(); - mlSkipLen = 0; - String skipNum = request.getArgument(); - try { - mlSkipLen = Long.parseLong(skipNum); - } - catch(NumberFormatException ex) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - if(mlSkipLen < 0) { - mlSkipLen = 0; - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - mbReset = true; - out.write(mFtpStatus.getResponse(350, request, mUser, null)); - } - - - /** - * RETR <SP> <pathname> <CRLF>
- * - * This command causes the server-DTP to transfer a copy of the - * file, specified in the pathname, to the server- or user-DTP - * at the other end of the data connection. The status and - * contents of the file at the server site shall be unaffected. - */ - public void doRETR(FtpRequest request, FtpWriter out) throws IOException { - - InputStream is = null; - OutputStream os = null; - try { - - // set state variables - long skipLen = (mbReset) ? mlSkipLen : 0; - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // get filename - String fileName = request.getArgument(); - fileName = mUser.getVirtualDirectory().getAbsoluteName(fileName); - String physicalName = mUser.getVirtualDirectory().getPhysicalName(fileName); - File requestedFile = new File(physicalName); - String args[] = {fileName}; - - // check file existance - if(!(requestedFile.exists() && requestedFile.isFile())) { - out.write(mFtpStatus.getResponse(550, request, mUser, args)); - return ; - } - - // check permission - if(!mUser.getVirtualDirectory().hasReadPermission(physicalName, true)) { - out.write(mFtpStatus.getResponse(550, request, mUser, args)); - return ; - } - - // now transfer file data - out.write(mFtpStatus.getResponse(150, request, mUser, null)); - Socket dataSoc = mDataConnection.getDataSocket(); - if(dataSoc == null) { - out.write(mFtpStatus.getResponse(550, request, mUser, args)); - return ; - } - - os = mUser.getOutputStream(dataSoc.getOutputStream()); - - // move to the appropriate offset - RandomAccessFile raf = new RandomAccessFile(requestedFile, "r"); - raf.seek(skipLen); - is = new FileInputStream(raf.getFD()); - - - // send file data to client - StreamConnector msc = new StreamConnector(is, os); - msc.setMaxTransferRate(mUser.getMaxDownloadRate()); - msc.setObserver(this); - msc.connect(); - - if(msc.hasException()) { - out.write(mFtpStatus.getResponse(451, request, mUser, args)); - return ; - } - else { - mConfig.getStatistics().setDownload(requestedFile, mUser, msc.getTransferredSize()); - } - - out.write(mFtpStatus.getResponse(226, request, mUser, null)); - } - catch(IOException ex) { - out.write(mFtpStatus.getResponse(425, request, mUser, null)); - } - finally { - IoUtils.close(is); - IoUtils.close(os); - mDataConnection.closeDataSocket(); - } - } - - - /** - * RMD <SP> <pathname> <CRLF>
- * - * This command causes the directory specified in the pathname - * to be removed as a directory (if the pathname is absolute) - * or as a subdirectory of the current working directory (if - * the pathname is relative). - */ - public void doRMD(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // get file names - String fileName = request.getArgument(); - fileName = mUser.getVirtualDirectory().getAbsoluteName(fileName); - String physicalName = mUser.getVirtualDirectory().getPhysicalName(fileName); - File requestedFile = new File(physicalName); - String args[] = {fileName}; - - // check permission - if(!mUser.getVirtualDirectory().hasWritePermission(physicalName, true)) { - out.write(mFtpStatus.getResponse(450, request, mUser, args)); - return ; - } - - // now delete - if(requestedFile.delete()) { - out.write(mFtpStatus.getResponse(250, request, mUser, args)); - } - else { - out.write(mFtpStatus.getResponse(450, request, mUser, args)); - } - } - - - /** - * RNFR <SP> <pathname> <CRLF>
- * - * This command specifies the old pathname of the file which is - * to be renamed. This command must be immediately followed by - * a "rename to" command specifying the new file pathname. - */ - public void doRNFR(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variable - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // set state variable - mbRenFr = true; - - // get filename - String fileName = request.getArgument(); - fileName = mUser.getVirtualDirectory().getAbsoluteName(fileName); - mstRenFr = mUser.getVirtualDirectory().getPhysicalName(fileName); - String args[] = {fileName}; - - out.write(mFtpStatus.getResponse(350, request, mUser, args)); - } - - - /** - * RNTO <SP> <pathname> <CRLF>
- * - * This command specifies the new pathname of the file - * specified in the immediately preceding "rename from" - * command. Together the two commands cause a file to be - * renamed. - */ - public void doRNTO(FtpRequest request, FtpWriter out) throws IOException { - - // argument check - if(!request.hasArgument()) { - resetState(); - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // set state variables - if((!mbRenFr) || (mstRenFr == null)) { - resetState(); - out.write(mFtpStatus.getResponse(100, request, mUser, null)); - return ; - } - - // get filenames - String fromFileStr = mUser.getVirtualDirectory().getVirtualName(mstRenFr); - String toFileStr = request.getArgument(); - toFileStr = mUser.getVirtualDirectory().getAbsoluteName(toFileStr); - String physicalToFileStr = mUser.getVirtualDirectory().getPhysicalName(toFileStr); - File fromFile = new File(mstRenFr); - File toFile = new File(physicalToFileStr); - String args[] = {fromFileStr, toFileStr}; - - resetState(); - - // check permission - if(!mUser.getVirtualDirectory().hasCreatePermission(physicalToFileStr, true)) { - out.write(mFtpStatus.getResponse(553, request, mUser, null)); - return ; - } - - // now rename - if(fromFile.renameTo(toFile)) { - out.write(mFtpStatus.getResponse(250, request, mUser, args)); - } - else { - out.write(mFtpStatus.getResponse(553, request, mUser, args)); - } - } - - - /** - * SITE <SP> <CRLF>
- * - * This command is used by the server to provide services - * specific to his system that are essential to file transfer - * but not sufficiently universal to be included as commands in - * the protocol. - */ - public void doSITE(FtpRequest request, FtpWriter out) throws IOException { - resetState(); - SiteCommandHandler siteCmd = new SiteCommandHandler(mConfig, mUser); - out.write(siteCmd.getResponse(request)); - } - - - /** - * SIZE <SP> <pathname> <CRLF>
- * - * Returns the size of the file in bytes. - */ - public void doSIZE(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // get filenames - String fileName = request.getArgument(); - fileName = mUser.getVirtualDirectory().getAbsoluteName(fileName); - String physicalName = mUser.getVirtualDirectory().getPhysicalName(fileName); - File reqFile = new File(physicalName); - - // print file size - if(reqFile.exists()) { - String args[] = {String.valueOf(reqFile.length())}; - out.write(mFtpStatus.getResponse(213, request, mUser, args)); - } - else { - out.write(mFtpStatus.getResponse(550, request, mUser, null)); - } - } - - - /** - * STAT [<SP> <pathname>] <CRLF>
- * - * This command shall cause a status response to be sent over - * the control connection in the form of a reply. - */ - public void doSTAT(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // write the status info - String args[] = { - mConfig.getSelfAddress().getHostAddress(), - mControlSocket.getInetAddress().getHostAddress(), - mUser.getName() - }; - out.write(mFtpStatus.getResponse(211, request, mUser, args)); - } - - - /** - * STOR <SP> <pathname> <CRLF>
- * - * This command causes the server-DTP to accept the data - * transferred via the data connection and to store the data as - * a file at the server site. If the file specified in the - * pathname exists at the server site, then its contents shall - * be replaced by the data being transferred. A new file is - * created at the server site if the file specified in the - * pathname does not already exist. - */ - public void doSTOR(FtpRequest request, FtpWriter out) throws IOException { - - InputStream is = null; - OutputStream os = null; - try { - - // set state variables - long skipLen = (mbReset) ? mlSkipLen : 0; - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // get filenames - String fileName = request.getArgument(); - fileName = mUser.getVirtualDirectory().getAbsoluteName(fileName); - String physicalName = mUser.getVirtualDirectory().getPhysicalName(fileName); - File requestedFile = new File(physicalName); - - // get permission - if(!mUser.getVirtualDirectory().hasCreatePermission(physicalName, true)) { - out.write(mFtpStatus.getResponse(550, request, mUser, null)); - return ; - } - - // now transfer file data - out.write(mFtpStatus.getResponse(150, request, mUser, null)); - - // get data connection - Socket dataSoc = mDataConnection.getDataSocket(); - if(dataSoc == null) { - out.write(mFtpStatus.getResponse(550, request, mUser, null)); - return ; - } - is = dataSoc.getInputStream(); - - // go to the appropriate offset - RandomAccessFile raf = new RandomAccessFile(requestedFile, "rw"); - raf.setLength(skipLen); - raf.seek(skipLen); - os = mUser.getOutputStream(new FileOutputStream(raf.getFD())); - - // get data from client - StreamConnector msc = new StreamConnector(is, os); - msc.setMaxTransferRate(mUser.getMaxUploadRate()); - msc.setObserver(this); - msc.connect(); - if(msc.hasException()) { - out.write(mFtpStatus.getResponse(451, request, mUser, null)); - return ; - } - else { - mConfig.getStatistics().setUpload(requestedFile, mUser, msc.getTransferredSize()); - } - - out.write(mFtpStatus.getResponse(226, request, mUser, null)); - } - catch(IOException ex) { - out.write(mFtpStatus.getResponse(425, request, mUser, null)); - } - finally { - IoUtils.close(is); - IoUtils.close(os); - mDataConnection.closeDataSocket(); - } - } - - - /** - * STOU <CRLF>
- * - * This command behaves like STOR except that the resultant - * file is to be created in the current directory under a name - * unique to that directory. The 250 Transfer Started response - * must include the name generated. - */ - public void doSTOU(FtpRequest request, FtpWriter out) throws IOException { - - InputStream is = null; - OutputStream os = null; - try { - - // reset state variables - resetState(); - - // get filenames - String fileName = mUser.getVirtualDirectory().getAbsoluteName("ftp.dat"); - String physicalName = mUser.getVirtualDirectory().getPhysicalName(fileName); - File requestedFile = new File(physicalName); - requestedFile = IoUtils.getUniqueFile(requestedFile); - fileName = mUser.getVirtualDirectory().getVirtualName(requestedFile.getAbsolutePath()); - String args[] = {fileName}; - - // check permission - if(!mUser.getVirtualDirectory().hasCreatePermission(fileName, false)) { - out.write(mFtpStatus.getResponse(550, request, mUser, null)); - return ; - } - - // now transfer file data - out.write(mFtpStatus.getResponse(150, request, mUser, null)); - Socket dataSoc = mDataConnection.getDataSocket(); - if(dataSoc == null) { - out.write(mFtpStatus.getResponse(550, request, mUser, args)); - return ; - } - - // receive data from client - is = dataSoc.getInputStream(); - os = mUser.getOutputStream(new FileOutputStream(requestedFile)); - - StreamConnector msc = new StreamConnector(is, os); - msc.setMaxTransferRate(mUser.getMaxUploadRate()); - msc.setObserver(this); - msc.connect(); - if(msc.hasException()) { - out.write(mFtpStatus.getResponse(451, request, mUser, null)); - return ; - } - else { - mConfig.getStatistics().setUpload(requestedFile, mUser, msc.getTransferredSize()); - } - - out.write(mFtpStatus.getResponse(226, request, mUser, null)); - mDataConnection.closeDataSocket(); - out.write(mFtpStatus.getResponse(250, request, mUser, args)); - } - catch(IOException ex) { - out.write(mFtpStatus.getResponse(425, request, mUser, null)); - } - finally { - IoUtils.close(is); - IoUtils.close(os); - mDataConnection.closeDataSocket(); - } - } - - - /** - * STRU <SP> <structure-code> <CRLF>
- * - * The argument is a single Telnet character code specifying - * file structure. - */ - public void doSTRU(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // set structure - if(mUser.setStructure(request.getArgument().charAt(0))) { - out.write(mFtpStatus.getResponse(200, request, mUser, null)); - } - else { - out.write(mFtpStatus.getResponse(504, request, mUser, null)); - } - } - - - /** - * SYST <CRLF>
- * - * This command is used to find out the type of operating - * system at the server. - */ - public void doSYST(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // and print server system info - String args[] = {mConfig.getSystemName()}; - out.write(mFtpStatus.getResponse(215, request, mUser, args)); - } - - - /** - * TYPE <SP> <type-code> <CRLF>
- * - * The argument specifies the representation type. - */ - public void doTYPE(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // get type from argument - char type = 'A'; - if(request.hasArgument()) { - type = request.getArgument().charAt(0); - } - - // set it - if(mUser.setType(type)) { - out.write(mFtpStatus.getResponse(200, request, mUser, null)); - } - else { - out.write(mFtpStatus.getResponse(504, request, mUser, null)); - } - } - - - /** - * USER <SP> <username> <CRLF>
- * - * The argument field is a Telnet string identifying the user. - * The user identification is that which is required by the - * server for access to its file system. This command will - * normally be the first command transmitted by the user after - * the control connections are made. - */ - public void doUSER(FtpRequest request, FtpWriter out) throws IOException { - - // reset state variables - resetState(); - - // argument check - if(!request.hasArgument()) { - out.write(mFtpStatus.getResponse(501, request, mUser, null)); - return ; - } - - // check user login status - mbUser = true; - if(mUser.hasLoggedIn()) { - if(mUser.getName().equals(request.getArgument())) { - out.write(mFtpStatus.getResponse(230, request, mUser, null)); - return ; - } - else { - mConfig.getConnectionService().closeConnection(mUser.getSessionId()); - } - } - - // set user name and send appropriate message - mUser.setName(request.getArgument()); - if(mUser.getIsAnonymous()) { - if(mConfig.isAnonymousLoginAllowed()) { - FtpRequest anoRequest = new FtpRequest(mUser.getName()); - out.write(mFtpStatus.getResponse(331, anoRequest, mUser, null)); - } - else { - out.write(mFtpStatus.getResponse(530, request, mUser, null)); - ConnectionService conService = mConfig.getConnectionService(); - if(conService != null) { - conService.closeConnection(mUser.getSessionId()); - } - } - } - else { - out.write(mFtpStatus.getResponse(331, request, mUser, null)); - } - } - -} - diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpDataConnection.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpDataConnection.java deleted file mode 100644 index 994c56630..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpDataConnection.java +++ /dev/null @@ -1,226 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver; - -import java.net.InetAddress; -import java.net.ServerSocket; -import java.net.Socket; - - -/** - * We can get the ftp data connection using this class. - * It uses either PORT or PASV command. - * - * @author Rana Bhattacharyya - */ -class FtpDataConnection { - - private FtpConfig mConfig = null; - private Socket mDataSoc = null; - private ServerSocket mServSoc = null; - - private InetAddress mAddress = null; - private int miPort = 0; - - private boolean mbPort = false; - private boolean mbPasv = false; - - - /** - * Constructor. - * @param cfg ftp config object. - */ - public FtpDataConnection(FtpConfig cfg) { - mConfig = cfg; - } - - - /** - * Close data socket. - */ - public void closeDataSocket() { - - // close client socket if any - if(mDataSoc != null) { - try { - mDataSoc.close(); - } - catch(Exception ex) { - mConfig.getLogger().warn("FtpDataConnection.closeDataSocket()", ex); - } - mDataSoc = null; - } - - // close server socket if any - if(mServSoc != null) { - try { - mServSoc.close(); - } - catch(Exception ex) { - mConfig.getLogger().warn("FtpDataConnection.closeDataSocket()", ex); - } - mConfig.releaseDataPort(miPort); - mServSoc = null; - } - } - - - /** - * Port command. - */ - public void setPortCommand(InetAddress addr, int port) { - - // close old sockets if any - closeDataSocket(); - - // set variables - mbPort = true; - mbPasv = false; - mAddress = addr; - miPort = port; - } - - - /** - * Passive command. It returns the success flag. - */ - public boolean setPasvCommand() { - boolean bRet = false; - - // close old sockets if any - closeDataSocket(); - - try { - - // open passive server socket and get parameters - int port = getPassivePort(); - if(port == -1) { - throw new Exception("No available port found for PASV connection."); - } - mServSoc = new ServerSocket(port, 1, mConfig.getSelfAddress()); - mAddress = mConfig.getServerAddress(); - miPort = mServSoc.getLocalPort(); - - // set different state variables - mbPort = false; - mbPasv = true; - bRet = true; - } - catch(Exception ex) { - mServSoc = null; - mConfig.getLogger().warn("FtpDataConnection.setPasvCommand()", ex); - } - return bRet; - } - - - /** - * Get client address. - */ - public InetAddress getInetAddress() { - return mAddress; - } - - - /** - * Get port number. - */ - public int getPort() { - return miPort; - } - - - /** - * Get the data socket. In case of error returns null. - */ - public Socket getDataSocket() { - - try { - - // get socket depending on the selection - if(mbPort) { - mDataSoc = new Socket(mAddress, miPort); - } - else if(mbPasv) { - mDataSoc = mServSoc.accept(); - } - } - catch(Exception ex) { - mConfig.getLogger().warn("FtpDataConnection.getDataSocket()", ex); - mDataSoc = null; - } - - return mDataSoc; - } - - - /** - * Get the passive port. Get it from the port pool. - */ - private int getPassivePort() { - return mConfig.getDataPort(); - } - - /** - * Dispose data connection - */ - public void dispose() { - closeDataSocket(); - } - -} - diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpRequest.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpRequest.java deleted file mode 100644 index b5a6ed0f3..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpRequest.java +++ /dev/null @@ -1,132 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver; - -/** - * Ftp command request class. We can access command, line and argument using - * {CMD}, {ARG} within ftp status file. This represents - * single Ftp request. - * - * @author Rana Bhattacharyya - */ -public -class FtpRequest { - - private String mstLine = null; - private String mstCommand = null; - private String mstArgument = null; - - - /** - * Constructor. - * - * @param commandLine ftp input command line. - */ - public FtpRequest(String commandLine) { - mstLine = commandLine.trim(); - parse(); - } - - /** - * Parse the ftp command line. - */ - private void parse() { - int spInd = mstLine.indexOf(' '); - - if(spInd != -1) { - mstArgument = mstLine.substring(spInd + 1); - mstCommand = mstLine.substring(0, spInd).toUpperCase(); - } - else { - mstCommand = mstLine.toUpperCase(); - } - - if( (mstCommand.length()>0) && (mstCommand.charAt(0)=='X') ) { - mstCommand = mstCommand.substring(1); - } - } - - - /** - * Get the ftp command. - */ - public String getCommand() { - return mstCommand; - } - - /** - * Get ftp input argument. - */ - public String getArgument() { - return mstArgument; - } - - /** - * Get the ftp request line. - */ - public String getCommandLine() { - return mstLine; - } - - /** - * Has argument. - */ - public boolean hasArgument() { - return getArgument() != null; - } - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpServerImpl.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpServerImpl.java deleted file mode 100644 index 2fd731c2e..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpServerImpl.java +++ /dev/null @@ -1,236 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver; - -import java.net.InetAddress; -import java.net.ServerSocket; - -import org.apache.avalon.cornerstone.services.connection.ConnectionHandler; -import org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory; -import org.apache.avalon.cornerstone.services.connection.ConnectionManager; -import org.apache.avalon.cornerstone.services.sockets.ServerSocketFactory; -import org.apache.avalon.cornerstone.services.sockets.SocketManager; -import org.apache.avalon.cornerstone.blocks.connection.DefaultConnectionManager; -import org.apache.avalon.framework.activity.Disposable; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.context.Context; -import org.apache.avalon.framework.context.ContextException; -import org.apache.avalon.framework.context.Contextualizable; -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.service.Serviceable; -import org.apache.ftpserver.interfaces.FtpServerInterface; - -/** - * Ftp server starting point. Avalon framework will load this - * from the jar file. This is also the starting point of remote - * admin. - * - * @author Rana Bhattacharyya - * @author Paul Hammant - * @version 1.0 - * @phoenix:block - * @phoenix:service name="org.apache.ftpserver.interfaces.FtpServerInterface" - */ -public class FtpServerImpl - extends AbstractLogEnabled - implements FtpServerInterface, Contextualizable, Serviceable, Configurable, Disposable, ConnectionHandlerFactory -{ - private ServerSocket serverSocket = null; - private SocketManager socketManager = null; - private ConnectionManager connectionManager = null; - private Context context = null; - private FtpConfig configuration = null; - - /** - * Default constructor - does nothing. - */ - public FtpServerImpl() - { - } - - /** - * Set application context - first spep. - */ - public void contextualize( Context context ) throws ContextException - { - try - { - configuration = new FtpConfig(); - - configuration.setLogger( getLogger() ); - - this.context = context; - - configuration.setContext( this.context ); - } - catch ( Exception ex ) - { - getLogger().error( "FtpServerImpl.contextualize()", ex ); - throw new ContextException( "FtpServerImpl.contextualize()", ex ); - } - } - - - /** - * Get all managers - second step. - * - * @phoenix:dependency name="org.apache.avalon.cornerstone.services.sockets.SocketManager" - * @phoenix:dependency name="org.apache.avalon.cornerstone.services.connection.ConnectionManager" - * @phoenix:dependency name="org.apache.ftpserver.usermanager.UserManagerInterface" - * @phoenix:dependency name="org.apache.ftpserver.ip.IpRestrictorInterface" - */ - public void service( ServiceManager serviceManager ) throws ServiceException - { - configuration.setServiceManager( serviceManager ); - - socketManager = (SocketManager) serviceManager.lookup( SocketManager.ROLE ); - - connectionManager = (ConnectionManager) serviceManager.lookup( ConnectionManager.ROLE ); - } - - /** - * Configure the server - third step. - * - * @param conf the XML configuration block - */ - public void configure( Configuration conf ) throws ConfigurationException - { - try - { - configuration.setConfiguration( conf ); - - // open server socket - ServerSocketFactory factory = socketManager.getServerSocketFactory( "plain" ); - - InetAddress serverAddress = configuration.getSelfAddress(); - - if ( serverAddress == null ) - { - serverSocket = factory.createServerSocket( configuration.getServerPort(), 5 ); - } - else - { - serverSocket = factory.createServerSocket( configuration.getServerPort(), 5, serverAddress ); - } - - connectionManager.connect( DISPLAY_NAME, serverSocket, this ); - - System.out.println( "FTP server ready!" ); - - if ( configuration.isRemoteAdminAllowed() ) - { - System.out.println( "You can start the remote admin by executing \"java -jar ftp-admin.jar\"." ); - } - } - catch ( Exception ex ) - { - getLogger().error( "FtpServerImpl.configure()", ex ); - - throw new ConfigurationException( ex.getMessage(), ex ); - } - } - - /** - * Release all resources. - */ - public void dispose() - { - getLogger().info( "Closing Ftp server..." ); - - if ( configuration != null ) - { - try - { - configuration.dispose(); - - ((DefaultConnectionManager)connectionManager).dispose(); - - serverSocket.close(); - } - catch ( Exception ex ) - { - getLogger().warn( "FtpServerImpl.dispose()", ex ); - } - } - } - - /** - * Construct an appropriate ConnectionHandler - * to handle a new connection. - * - * @return the new ConnectionHandler - * @throws Exception if an error occurs - */ - public ConnectionHandler createConnectionHandler() throws Exception - { - BaseFtpConnection conHandle = new FtpConnection( configuration ); - return conHandle; - } - - /** - * Release a previously created ConnectionHandler. - * e.g. for spooling. - */ - public void releaseConnectionHandler( ConnectionHandler connectionHandler ) - { - } -} - diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpStatistics.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpStatistics.java deleted file mode 100644 index 3820b65f0..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpStatistics.java +++ /dev/null @@ -1,410 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ - package org.apache.ftpserver; - -import java.io.File; -import java.util.Date; -import org.apache.ftpserver.util.Message; -import org.apache.ftpserver.interfaces.FtpStatisticsListener; -import org.apache.ftpserver.interfaces.FtpFileListener; - -/** - * This class encapsulates all the global statistics. - * - * @author Rana Bhattacharyya - */ -public -class FtpStatistics { - - private FtpStatisticsListener mListener = null; - private FtpFileListener mFileListener = null; - private FtpConfig mConfig = null; - - private Date mStartTime = new Date(); - - private int miNbrUpload = 0; - private int miNbrDownload = 0; - private int miNbrDelete = 0; - - private int miLogins = 0; - private int miTotalLogins = 0; - - private int miAnonLogins = 0; - private int miTotalAnonLogins = 0; - - private int miConnections = 0; - private int miTotalConnections = 0; - - private long mlBytesUpload = 0L; - private long mlBytesDownload = 0L; - - /** - * Default constructor. - */ - public FtpStatistics(FtpConfig cfg) { - mConfig = cfg; - } - - - ///////////////// All get methods ///////////////// - /** - * Get server start time. - */ - public Date getStartTime() { - return mStartTime; - } - - /** - * Get number of files uploaded. - */ - public int getFileUploadNbr() { - return miNbrUpload; - } - - /** - * Get number of files downloaded. - */ - public int getFileDownloadNbr() { - return miNbrDownload; - } - - /** - * Get number of files deleted. - */ - public int getFileDeleteNbr() { - return miNbrDelete; - } - - /** - * Get total number of bytes uploaded. - */ - public long getFileUploadSize() { - return mlBytesUpload; - } - - /** - * Get total number of bytes downloaded. - */ - public long getFileDownloadSize() { - return mlBytesDownload; - } - - /** - * Get current number of connections. - */ - public int getConnectionNbr() { - return miConnections; - } - - /** - * Get total connection number - */ - public int getTotalConnectionNbr() { - return miTotalConnections; - } - - /** - * Get current number of logins - */ - public int getLoginNbr() { - return miLogins; - } - - /** - * Get total number of logins - */ - public int getTotalLoginNbr() { - return miTotalLogins; - } - - /** - * Get current anonymous logins. - */ - public int getAnonLoginNbr() { - return miAnonLogins; - } - - /** - * Get total anonymous logins - */ - public int getTotalAnonLoginNbr() { - return miTotalAnonLogins; - } - - - ///////////////// All set methods /////////////////// - /** - * Increment upload count. - */ - void setUpload(File fl, FtpUser user, long sz) { - ++miNbrUpload; - mlBytesUpload += sz; - mConfig.getLogger().info("File upload : " + user.getName() + " - " + fl.getAbsolutePath()); - notifyUpload(fl, user); - } - - /** - * Increment download count. - */ - void setDownload(File fl, FtpUser user, long sz) { - ++miNbrDownload; - mlBytesDownload += sz; - mConfig.getLogger().info("File download : " + user.getName() + " - " + fl.getAbsolutePath()); - notifyDownload(fl, user); - } - - /** - * Increment delete count. - */ - void setDelete(File fl, FtpUser user) { - ++miNbrDelete; - mConfig.getLogger().info("File delete : " + user.getName() + " - " + fl.getAbsolutePath()); - notifyDelete(fl, user); - } - - /** - * New login. - */ - void setLogin(boolean anonymous) { - ++miLogins; - ++miTotalLogins; - if(anonymous) { - ++miAnonLogins; - ++miTotalAnonLogins; - } - notifyLogin(); - } - - /** - * User logout - */ - void setLogout(boolean anonymous) { - --miLogins; - if(anonymous) { - --miAnonLogins; - } - notifyLogout(); - } - - /** - * New connection - */ - void setOpenConnection() { - ++miConnections; - ++miTotalConnections; - notifyConnection(); - } - - /** - * Close connection - */ - void setCloseConnection() { - --miConnections; - notifyConnection(); - } - - //////////////////////////////////////////////////////////// - // Event listener methods // - //////////////////////////////////////////////////////////// - /** - * Add a listener object. - */ - public void setListener(FtpStatisticsListener listener) { - mListener = listener; - } - - /** - * Get listener object. - */ - public FtpStatisticsListener getListener() { - return mListener; - } - - /** - * Get file listener - */ - public void setFileListener(FtpFileListener listener) { - mFileListener = listener; - } - - /** - * Set file listener - */ - public FtpFileListener getFileListener() { - return mFileListener; - } - - /** - * Listener upload notification. - */ - private void notifyUpload(final File fl, final FtpUser user) { - final FtpStatisticsListener listener = mListener; - if (listener != null) { - Message msg = new Message() { - public void execute() { - listener.notifyUpload(); - } - }; - mConfig.getMessageQueue().add(msg); - } - - final FtpFileListener fileListener = mFileListener; - if (fileListener != null) { - Message msg = new Message() { - public void execute() { - fileListener.notifyUpload(fl, user.getSessionId()); - } - }; - mConfig.getMessageQueue().add(msg); - } - } - - /** - * Listener download notification. - */ - private void notifyDownload(final File fl, final FtpUser user) { - final FtpStatisticsListener listener = mListener; - if (listener != null) { - Message msg = new Message() { - public void execute() { - listener.notifyDownload(); - } - }; - mConfig.getMessageQueue().add(msg); - } - - final FtpFileListener fileListener = mFileListener; - if (fileListener != null) { - Message msg = new Message() { - public void execute() { - fileListener.notifyDownload(fl, user.getSessionId()); - } - }; - mConfig.getMessageQueue().add(msg); - } - } - - /** - * Listener delete notification. - */ - private void notifyDelete(final File fl, final FtpUser user) { - final FtpStatisticsListener listener = mListener; - if (listener != null) { - Message msg = new Message() { - public void execute() { - listener.notifyDelete(); - } - }; - mConfig.getMessageQueue().add(msg); - } - - final FtpFileListener fileListener = mFileListener; - if (fileListener != null) { - Message msg = new Message() { - public void execute() { - fileListener.notifyDelete(fl, user.getSessionId()); - } - }; - mConfig.getMessageQueue().add(msg); - } - } - - /** - * Listener user login notification. - */ - private void notifyLogin() { - final FtpStatisticsListener listener = mListener; - if (listener != null) { - Message msg = new Message() { - public void execute() { - listener.notifyLogin(); - } - }; - mConfig.getMessageQueue().add(msg); - } - } - - /** - * Listener user logout notification. - */ - private void notifyLogout() { - final FtpStatisticsListener listener = mListener; - if (listener != null) { - Message msg = new Message() { - public void execute() { - listener.notifyLogout(); - } - }; - mConfig.getMessageQueue().add(msg); - } - } - - /** - * Listener user connection open/close notification. - */ - private void notifyConnection() { - final FtpStatisticsListener listener = mListener; - if (listener != null) { - Message msg = new Message() { - public void execute() { - listener.notifyConnection(); - } - }; - mConfig.getMessageQueue().add(msg); - } - } -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpStatus.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpStatus.java deleted file mode 100644 index a5b2fe59b..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpStatus.java +++ /dev/null @@ -1,240 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver; - -import java.io.IOException; -import java.io.InputStream; -import java.io.BufferedReader; -import java.io.StringReader; -import java.util.Properties; - -/** - * Ftp status line parser class. This class loads FtpStatus.properties - * file from the classpath. It generates the descriptive ftp status for - * astatus code. The actual response depends on the status code, the ftp - * command and the passed argument list. - * - * @author Rana Bhattacharyya - */ -public -class FtpStatus extends Properties { - - private static final String RESOURCE = "org/apache/ftpserver/FtpStatus.properties"; - private static final String PREFIX = "FtpServer.status."; - private static final String EMPTY = ""; - private static final String CRLF = "\r\n"; - - private static final String CMD = "CMD"; - private static final String ARG = "ARG"; - - /** - * Load status propeties file from the classpath. - */ - public FtpStatus() throws IOException { - InputStream pis = getClass().getClassLoader().getResourceAsStream(RESOURCE); - load(pis); - pis.close(); - } - - - /** - * Process ftp response new line character. - */ - public String processNewLine(String msg, int status) { - - // no newline - if(msg.indexOf('\n') == -1) { - return status + " " + msg + CRLF; - } - - StringBuffer sw = new StringBuffer(256); - - try { - BufferedReader sr = new BufferedReader(new StringReader(msg)); - - sw.append(String.valueOf(status)); - sw.append('-'); - - String line = sr.readLine(); - for(;;) { - String nextLine = sr.readLine(); - - if(nextLine != null) { - sw.append(line); - sw.append(CRLF); - } - else { - sw.append(String.valueOf(status)); - sw.append(' '); - sw.append(line); - sw.append(CRLF); - break; - } - line = nextLine; - } - sr.close(); - } - catch(IOException ex) { - } - - return sw.toString(); - } - - - /** - * Get ftp message from the properties file and replace the variables. - */ - private String getMessage(int status, FtpRequest cmdLine, String[] args) { - - // make the key from the passed parameters - String key = PREFIX + status; - String keyc = key; - if(cmdLine != null) { - keyc = keyc + '.' + cmdLine.getCommand(); - } - - // get status property - String str = getProperty(keyc); - if(str == null) { - str = getProperty(key); - } - if(str == null) { - str = EMPTY; - } - - // replace variables - int startIndex = 0; - int openIndex = str.indexOf('{', startIndex); - if (openIndex == -1) { - return str; - } - - int closeIndex = str.indexOf('}', startIndex); - if( (closeIndex == -1) || (openIndex > closeIndex) ) { - return str; - } - - StringBuffer sb = new StringBuffer(); - sb.append(str.substring(startIndex, openIndex)); - while(true) { - String intStr = str.substring(openIndex+1, closeIndex); - sb.append(getParam(cmdLine, args, intStr)); - - startIndex = closeIndex + 1; - openIndex = str.indexOf('{', startIndex); - if (openIndex == -1) { - sb.append(str.substring(startIndex)); - break; - } - - closeIndex = str.indexOf('}', startIndex); - if( (closeIndex == -1) || (openIndex > closeIndex) ) { - sb.append(str.substring(startIndex)); - break; - } - sb.append(str.substring(startIndex, openIndex)); - } - return sb.toString(); - } - - - /** - * Get variable value. - */ - private String getParam(FtpRequest cmdLine, String[] elms, String intStr) { - - // command line param - if(cmdLine != null) { - if(intStr.equals(CMD)) { - return cmdLine.getCommand(); - } - if(intStr.equals(ARG)) { - return cmdLine.getArgument(); - } - } - - // list param - if(elms == null) { - return EMPTY; - } - - int index = 0; - try { - index = Integer.parseInt(intStr); - } - catch(NumberFormatException ex) { - return EMPTY; - } - if( (index < 0) || (index >= elms.length) ) { - return EMPTY; - } - return elms[index]; - } - - - /** - * Get ftp response. - * @param status ftp status code. - * @param cmd ftp request object (may be null). - * @param ars variable arguent list (may be null). - */ - public String getResponse(int status, FtpRequest cmd, FtpUser user, String[] args) { - String strRes = getMessage(status, cmd, args); - return processNewLine(strRes, status); - } - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpUser.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpUser.java deleted file mode 100644 index d60e79f6c..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpUser.java +++ /dev/null @@ -1,170 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ - package org.apache.ftpserver; - -import java.io.OutputStream; -import java.io.Serializable; - -import org.apache.ftpserver.usermanager.User; -import org.apache.ftpserver.util.AsciiOutputStream; -import org.apache.ftpserver.util.IoUtils; - - -/** - * Ftp user class. It handles all user specific file system task. - * It supports user virtual root directory. - * - * @author Rana Bhattacharyya - */ -public -class FtpUser extends User implements Serializable { - - public static final String ANONYMOUS = "anonymous"; - - private char mcDataType = 'A'; - private char mcStructure = 'F'; - private char mcMode = 'S'; - - /** - * Constructor - does nothing. - */ - public FtpUser() { - } - - /** - * Get the user data type. - */ - public char getType() { - return mcDataType; - } - - /** - * Set the data type. Supported types are A (ascii) and I (binary). - * @return true if success - */ - public boolean setType(char type) { - type = Character.toUpperCase(type); - if( (type != 'A') && (type != 'I') ) { - return false; - } - mcDataType = type; - return true; - } - - - /** - * Get the file structure. - */ - public char getStructure() { - return mcStructure; - } - - /** - * Set the file structure. Supported structure type is F (file). - * @return true if success - */ - public boolean setStructure(char stru) { - stru = Character.toUpperCase(stru); - if(stru != 'F') { - return false; - } - mcStructure = stru; - return true; - } - - - /** - * Get the transfer mode. - */ - public char getMode() { - return mcMode; - } - - /** - * Set the transfer type. Supported transfer type is S (stream). - * @return true if success - */ - public boolean setMode(char md) { - md = Character.toUpperCase(md); - if(md != 'S') { - return false; - } - mcMode = md; - return true; - } - - /** - * Get output stream. Returns ftpserver.util.AsciiOutputStream - * if the transfer type is ASCII. - */ - public OutputStream getOutputStream(OutputStream os) { - os = IoUtils.getBufferedOutputStream(os); - if(mcDataType == 'A') { - os = new AsciiOutputStream(os); - } - return os; - } - - /** - * Is an anonymous user? - */ - public boolean getIsAnonymous() { - return ANONYMOUS.equals(getName()); - } -} - - diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpWriter.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpWriter.java deleted file mode 100644 index 7085f5228..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/FtpWriter.java +++ /dev/null @@ -1,185 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver; - -import java.io.IOException; -import java.io.Writer; -import java.io.OutputStreamWriter; -import java.net.Socket; - -import org.apache.ftpserver.util.Message; -import org.apache.ftpserver.interfaces.SpyConnectionInterface; - -/** - * Writer object used by the server. It has the spying capability. - * - * @author Rana Bhattacharyya - */ -public -class FtpWriter extends Writer { - - private OutputStreamWriter mOriginalWriter; - private SpyConnectionInterface mSpy; - private FtpConfig mConfig; - - /** - * Constructor - set the actual writer object - */ - public FtpWriter(Socket soc, FtpConfig config) throws IOException { - mOriginalWriter = new OutputStreamWriter(soc.getOutputStream()); - mConfig = config; - } - - /** - * Get the spy object to get what the user is writing. - */ - public SpyConnectionInterface getSpyObject() { - return mSpy; - } - - /** - * Set the connection spy object. - */ - public void setSpyObject(SpyConnectionInterface spy) { - mSpy = spy; - } - - /** - * Spy print. Monitor server response. - */ - private void spyResponse(final String str) throws IOException { - final SpyConnectionInterface spy = mSpy; - if (spy != null) { - Message msg = new Message() { - public void execute() { - try { - spy.response(str); - } - catch(Exception ex) { - mSpy = null; - mConfig.getLogger().error("FtpWriter.spyResponse()", ex); - } - } - }; - mConfig.getMessageQueue().add(msg); - } - } - - /** - * Write a character array. - */ - public void write(char[] cbuf) throws IOException { - String str = new String(cbuf); - spyResponse(str); - mOriginalWriter.write(cbuf); - mOriginalWriter.flush(); - } - - /** - * Write a portion of character array - */ - public void write(char[] cbuf, int off, int len) throws IOException { - String str = new String(cbuf, off, len); - spyResponse(str); - mOriginalWriter.write(cbuf, off, len); - mOriginalWriter.flush(); - } - - /** - * Write a single character - */ - public void write(int c) throws IOException { - String str = "" + (char)c; - spyResponse(str); - mOriginalWriter.write(c); - mOriginalWriter.flush(); - } - - /** - * Write a string - */ - public void write(String str) throws IOException { - spyResponse(str); - mOriginalWriter.write(str); - mOriginalWriter.flush(); - } - - /** - * Write a portion of the string. - */ - public void write(String str, int off, int len) throws IOException { - String strpart = str.substring(off, len); - spyResponse(strpart); - mOriginalWriter.write(str, off, len); - mOriginalWriter.flush(); - } - - /** - * Close writer. - */ - public void close() throws IOException { - mOriginalWriter.close(); - } - - /** - * Flush the stream - */ - public void flush() throws IOException { - mOriginalWriter.flush(); - } - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/SiteCommandHandler.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/SiteCommandHandler.java deleted file mode 100644 index 28f05d23e..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/SiteCommandHandler.java +++ /dev/null @@ -1,475 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver; - -import java.util.Date; -import java.util.List; -import java.util.Collection; -import java.util.Iterator; -import java.util.StringTokenizer; -import java.text.SimpleDateFormat; -import java.lang.reflect.Method; - -import org.apache.ftpserver.util.StringUtils; -import org.apache.ftpserver.ip.IpRestrictorInterface; -import org.apache.ftpserver.usermanager.User; -import org.apache.ftpserver.usermanager.UserManagerInterface; - -/** - * Handle ftp site command. - * - * @author Rana Bhattacharyya - */ -public -class SiteCommandHandler { - - // as SimpleDateFormat is not thread-safe we have to use ThreadLocal - private final static ThreadLocal DATE_FMT = new ThreadLocal() { - protected Object initialValue() { - return new SimpleDateFormat("MM/dd HH:mm:ss"); - } - }; - - protected final static Class[] INPUT_SIG = new Class[] {String[].class, FtpRequest.class}; - - private FtpConfig mConfig; - private FtpUser mUser; - - - /** - * Constructor - set the configuration object - */ - public SiteCommandHandler(FtpConfig cfg, FtpUser user) { - mConfig = cfg; - mUser = user; - } - - - /** - * Handle site. - */ - public String getResponse(FtpRequest request) { - String argArray[] = parseArg(request.getArgument()); - - String response = ""; - if(hasPermission(argArray)) { - if((argArray != null) && (argArray.length != 0)) { - try { - String metName = "do" + argArray[0].toUpperCase(); - Method actionMet = getClass().getDeclaredMethod(metName, INPUT_SIG); - response = (String)actionMet.invoke(this, new Object[] {argArray, request}); - } - catch(Throwable th) { - mConfig.getLogger().warn("SiteCommandHandler.getResponse()", th); - response = mConfig.getStatus().getResponse(530, request, mUser, null); - } - } - else { - response = mConfig.getStatus().getResponse(200, request, mUser, null); - } - } - else { - response = mConfig.getStatus().getResponse(530, request, mUser, null); - } - - return response; - } - - - /** - * Parse all the tokens. - */ - private String[] parseArg(String arg) { - if(arg == null) { - return null; - } - - StringTokenizer st = new StringTokenizer(arg, " "); - String[] args = new String[st.countTokens()]; - for(int i = 0;i < args.length;i++) { - args[i] = st.nextToken(); - } - - return args; - } - - - /** - * Has permission - */ - private boolean hasPermission(String args[]) { - UserManagerInterface userManager = mConfig.getUserManager(); - String adminName = userManager.getAdminName(); - if(args == null || mUser.getName().equals(adminName)) { - return true; - } - return ((args.length > 0) && "HELP".equalsIgnoreCase(args[0])); - } - - - //////////////////////////////////////////////////////////////////////////// - //////////////////////// All site command handlers //////////////////////// - /** - * Add banned IP - */ - public String doADDIP(String[] args, FtpRequest cmd) { - if(args.length != 2) { - return mConfig.getStatus().getResponse(501, cmd, mUser, null); - } - - String response = ""; - try { - IpRestrictorInterface ipRestrictor = mConfig.getIpRestrictor(); - ipRestrictor.addEntry(args[1]); - ipRestrictor.save(); - response = mConfig.getStatus().getResponse(200, cmd, mUser, null); - } - catch(Exception ex) { - mConfig.getLogger().warn("SiteCommandHandler.doADDIP()", ex); - response = mConfig.getStatus().getResponse(451, cmd, mUser, null); - } - return response; - } - - - /** - * Add user - */ - public String doADDUSER(String[] args, FtpRequest cmd) { - if(args.length != 2) { - return mConfig.getStatus().getResponse(501, cmd, mUser, null); - } - - String response = ""; - try { - String userName = args[1]; - UserManagerInterface userManager = mConfig.getUserManager(); - if(!userManager.doesExist(userName)) { - User user = new User(); - user.setName(userName); - user.setPassword(""); - user.setEnabled(false); - user.getVirtualDirectory().setWritePermission(false); - user.setMaxUploadRate(0); - user.setMaxDownloadRate(0); - user.getVirtualDirectory().setRootDirectory(mConfig.getDefaultRoot()); - user.setMaxIdleTime(mConfig.getDefaultIdleTime()); - mConfig.getUserManager().save(user); - } - response = mConfig.getStatus().getResponse(200, cmd, mUser, null); - } - catch(Exception ex) { - mConfig.getLogger().warn("SiteCommandHandler.doADDUSER()", ex); - response = mConfig.getStatus().getResponse(451, cmd, mUser, null); - } - return response; - } - - - /** - * Add banned IP - */ - public String doDELIP(String[] args, FtpRequest cmd) { - if(args.length != 2) { - return mConfig.getStatus().getResponse(501, cmd, mUser, null); - } - - String response = ""; - try { - IpRestrictorInterface ipRestrictor = mConfig.getIpRestrictor(); - ipRestrictor.removeEntry(args[1]); - ipRestrictor.save(); - response = mConfig.getStatus().getResponse(200, cmd, mUser, null); - } - catch(Exception ex) { - mConfig.getLogger().warn("SiteCommandHandler.doDELIP()", ex); - response = mConfig.getStatus().getResponse(451, cmd, mUser, null); - } - return response; - } - - - /** - * Delete user from repository. - */ - public String doDELUSER(String[] args, FtpRequest cmd) { - if(args.length != 2) { - return mConfig.getStatus().getResponse(501, cmd, mUser, null); - } - - String response = ""; - try { - mConfig.getUserManager().delete(args[1]); - response = mConfig.getStatus().getResponse(200, cmd, mUser, null); - } - catch(Exception ex) { - mConfig.getLogger().warn("SiteCommandHandler.doDELUSER()", ex); - response = mConfig.getStatus().getResponse(451, cmd, mUser, null); - } - return response; - } - - /** - * Describe user. - */ - public String doDESCUSER(String[] args, FtpRequest cmd) { - if(args.length != 2) { - return mConfig.getStatus().getResponse(501, cmd, mUser, null); - } - - StringBuffer sb = new StringBuffer(); - sb.append('\n'); - User user = mConfig.getUserManager().getUserByName(args[1]); - if(user != null) { - sb.append(User.ATTR_LOGIN).append(" : ").append(user.getName()).append('\n'); - sb.append(User.ATTR_PASSWORD).append(" : ").append("******").append('\n'); - sb.append(User.ATTR_HOME).append(" : ").append(user.getVirtualDirectory().getRootDirectory()).append('\n'); - sb.append(User.ATTR_WRITE_PERM).append(" : ").append(user.getVirtualDirectory().getWritePermission()).append('\n'); - sb.append(User.ATTR_ENABLE).append(" : ").append(user.getEnabled()).append('\n'); - sb.append(User.ATTR_MAX_IDLE_TIME).append(" : ").append(user.getMaxIdleTime()).append('\n'); - sb.append(User.ATTR_MAX_UPLOAD_RATE).append(" : ").append(user.getMaxUploadRate()).append('\n'); - sb.append(User.ATTR_MAX_DOWNLOAD_RATE).append(" : ").append(user.getMaxDownloadRate()).append('\n'); - } - sb.append('\n'); - return mConfig.getStatus().processNewLine(sb.toString(), 200); - } - - - /** - * Display site help. - */ - public String doHELP(String[] args, FtpRequest cmd) { - StringBuffer sb = new StringBuffer(); - sb.append('\n'); - sb.append("ADDIP : add banned IP entry").append('\n'); - sb.append("ADDUSER : add user").append('\n'); - sb.append("DELIP : delete banned IP entry").append('\n'); - sb.append("DELUSER : delete user").append('\n'); - sb.append("DESCUSER : describe user").append('\n'); - sb.append("HELP : display this message").append('\n'); - sb.append("KICK : close the connection").append('\n'); - sb.append("LISTIP : display all banned IPs").append('\n'); - sb.append("LISTUSER : display all user names").append('\n'); - sb.append("SETATTR : set user attributes").append('\n'); - sb.append("STAT : show statistics").append('\n'); - sb.append("WHO : display all connected users").append('\n'); - sb.append('\n'); - return mConfig.getStatus().processNewLine(sb.toString(), 200); - } - - /** - * Disconnect ftp connections - */ - public String doKICK(String[] args, FtpRequest cmd) { - if(args.length != 2) { - return mConfig.getStatus().getResponse(501, cmd, mUser, null); - } - String userName = args[1]; - List allUsers = mConfig.getConnectionService().getAllUsers(); - for(Iterator userIt = allUsers.iterator();userIt.hasNext();) { - FtpUser user = (FtpUser)userIt.next(); - if(userName.equals(user.getName())) { - mConfig.getConnectionService().closeConnection(user.getSessionId()); - } - } - return mConfig.getStatus().getResponse(200, cmd, mUser, null); - } - - - /** - * List all banned IPs. - */ - public String doLISTIP(String[] args, FtpRequest cmd) { - StringBuffer sb = new StringBuffer(); - sb.append('\n'); - for(Iterator ipIt = mConfig.getIpRestrictor().getAllEntries().iterator();ipIt.hasNext();) { - sb.append(ipIt.next()).append('\n'); - } - sb.append('\n'); - return mConfig.getStatus().processNewLine(sb.toString(), 200); - } - - - /** - * List all the users. - */ - public String doLISTUSER(String[] args, FtpRequest cmd) { - Collection userNames = mConfig.getUserManager().getAllUserNames(); - StringBuffer sb = new StringBuffer(); - sb.append('\n'); - for(Iterator userIt = userNames.iterator();userIt.hasNext();) { - sb.append(userIt.next()).append('\n'); - } - sb.append('\n'); - return mConfig.getStatus().processNewLine(sb.toString(), 200); - } - - - /** - * Delete user from repository. - */ - public String doSETATTR(String[] args, FtpRequest cmd) { - if(args.length != 4) { - return mConfig.getStatus().getResponse(501, cmd, mUser, null); - } - - boolean bSuccess = true; - try { - User user = mConfig.getUserManager().getUserByName(args[1]); - if(user != null) { - - if ( User.ATTR_PASSWORD.equals(args[2]) ) { - user.setPassword(args[3]); - } - else if ( User.ATTR_HOME.equals(args[2]) ) { - user.getVirtualDirectory().setRootDirectory(args[3]); - } - else if ( User.ATTR_WRITE_PERM.equals(args[2]) ) { - user.getVirtualDirectory().setWritePermission("true".equals(args[3])); - } - else if ( User.ATTR_ENABLE.equals(args[2]) ) { - user.setEnabled("true".equals(args[3])); - } - else if ( User.ATTR_MAX_IDLE_TIME.equals(args[2]) ) { - user.setMaxIdleTime(Integer.parseInt(args[3])); - } - else if ( User.ATTR_MAX_UPLOAD_RATE.equals(args[2]) ) { - user.setMaxUploadRate(Integer.parseInt(args[3])); - } - else if ( User.ATTR_MAX_DOWNLOAD_RATE.equals(args[2]) ) { - user.setMaxDownloadRate(Integer.parseInt(args[3])); - } - else { - bSuccess = false; - } - - if(bSuccess) { - mConfig.getUserManager().save(user); - } - } - else { - bSuccess = false; - } - } - catch(Exception ex) { - mConfig.getLogger().warn("SiteCommandHandler.doSETATTR()", ex); - bSuccess = false; - } - - String response = ""; - if(bSuccess) { - response = mConfig.getStatus().getResponse(200, cmd, mUser, null); - } - else { - response = mConfig.getStatus().getResponse(451, cmd, mUser, null); - } - - return response; - } - - - /** - * Delete user from repository. - */ - public String doSTAT(String[] args, FtpRequest cmd) { - FtpStatistics stat = mConfig.getStatistics(); - StringBuffer sb = new StringBuffer(); - sb.append('\n'); - sb.append("Start Time : ").append(((SimpleDateFormat)DATE_FMT.get()).format(stat.getStartTime())).append('\n'); - sb.append("Upload Number : ").append(stat.getFileUploadNbr()).append('\n'); - sb.append("Download Number : ").append(stat.getFileDownloadNbr()).append('\n'); - sb.append("Delete Number : ").append(stat.getFileDeleteNbr()).append('\n'); - sb.append("Uploade Bytes : ").append(stat.getFileUploadSize()).append('\n'); - sb.append("Downloaded Bytes : ").append(stat.getFileDownloadSize()).append('\n'); - sb.append("Current Logins : ").append(stat.getLoginNbr()).append('\n'); - sb.append("Total Logins : ").append(stat.getTotalLoginNbr()).append('\n'); - sb.append("Current Anonymous Logins : ").append(stat.getAnonLoginNbr()).append('\n'); - sb.append("Total Anonymous Logins : ").append(stat.getTotalAnonLoginNbr()).append('\n'); - sb.append("Current Connections : ").append(stat.getConnectionNbr()).append('\n'); - sb.append("Total Connections : ").append(stat.getTotalConnectionNbr()).append('\n'); - sb.append('\n'); - return mConfig.getStatus().processNewLine(sb.toString(), 200); - } - - - /** - * Display all connected users. - */ - public String doWHO(String[] args, FtpRequest cmd) { - StringBuffer sb = new StringBuffer(); - List allUsers = mConfig.getConnectionService().getAllUsers(); - - sb.append('\n'); - for(Iterator userIt = allUsers.iterator();userIt.hasNext();) { - FtpUser user = (FtpUser)userIt.next(); - if(!user.hasLoggedIn()) { - continue; - } - - SimpleDateFormat fmt = (SimpleDateFormat)DATE_FMT.get(); - sb.append(StringUtils.pad(user.getName(), ' ', true, 16)); - sb.append(StringUtils.pad(user.getClientAddress().getHostAddress(), ' ', true, 16)); - sb.append(StringUtils.pad(fmt.format(new Date(user.getLoginTime())), ' ', true, 16)); - sb.append(StringUtils.pad(fmt.format(new Date(user.getLastAccessTime())), ' ', true, 16)); - sb.append('\n'); - } - sb.append('\n'); - return mConfig.getStatus().processNewLine(sb.toString(), 200); - } - -} - diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/interfaces/FtpConnectionObserver.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/interfaces/FtpConnectionObserver.java deleted file mode 100644 index c7c7ff502..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/interfaces/FtpConnectionObserver.java +++ /dev/null @@ -1,86 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.interfaces; - -import org.apache.ftpserver.FtpUser; - -/** - * This observer interface monitors all the ftp connections. - * - * @author Rana Bhattacharyya - */ -public -interface FtpConnectionObserver { - - /** - * New connection notification. - * @param user new connected user. - */ - void newConnection(final FtpUser user); - - /** - * Close connection notification - * @param user closed user object - */ - void removeConnection(final FtpUser user); - - /** - * Update connection notification - * @param user updated user object - */ - void updateConnection(final FtpUser user); -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/interfaces/FtpFileListener.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/interfaces/FtpFileListener.java deleted file mode 100644 index 350c54a48..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/interfaces/FtpFileListener.java +++ /dev/null @@ -1,84 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.interfaces; - -import java.io.File; - -/** - * Ftp file upload/download/delete listener interface. - * - * @author Rana Bhattacharyya - */ -public -interface FtpFileListener { - - /** - * User file upload notification. - */ - void notifyUpload(final File file, final String sessionId); - - /** - * User file download notification. - */ - void notifyDownload(final File file, final String sessionId); - - /** - * User file delete notification. - */ - void notifyDelete(final File file, final String sessionId); -} - diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/interfaces/FtpServerInterface.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/interfaces/FtpServerInterface.java deleted file mode 100644 index cfc386982..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/interfaces/FtpServerInterface.java +++ /dev/null @@ -1,76 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.interfaces; - - -/** - * Ftp server interface. - * @author Rana Bhattacharyya - */ -public -interface FtpServerInterface { - - /** - * Service role name. It will be used for RMI binding too. - */ - String ROLE = "org.apache.ftpserver.interfaces.FtpServerInterface"; - - /** - * Ftp server name - */ - String DISPLAY_NAME = "Ftp"; -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/interfaces/FtpStatisticsListener.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/interfaces/FtpStatisticsListener.java deleted file mode 100644 index 3577a2d03..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/interfaces/FtpStatisticsListener.java +++ /dev/null @@ -1,98 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.interfaces; - - -/** - * Ftp statistics listener interface. - * - * @author Rana Bhattacharyya - */ -public -interface FtpStatisticsListener { - - /** - * User file upload notification. - */ - void notifyUpload(); - - /** - * User file download notification. - */ - void notifyDownload(); - - /** - * User file delete notification. - */ - void notifyDelete(); - - /** - * New user login notification. - */ - void notifyLogin(); - - /** - * User logout notification. - */ - void notifyLogout(); - - /** - * Connection open/close notification - */ - void notifyConnection(); - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/interfaces/SpyConnectionInterface.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/interfaces/SpyConnectionInterface.java deleted file mode 100644 index 3319ca991..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/interfaces/SpyConnectionInterface.java +++ /dev/null @@ -1,78 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.interfaces; - -import java.io.IOException; - -/** - * This interface is used to monitor user activities; - * - * @author Rana Bhattacharyya - */ -public -interface SpyConnectionInterface { - - /** - * Write user request. - */ - void request(final String msg) throws IOException; - - /** - * Write server response. - */ - void response(final String msg) throws IOException; -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/ip/AbstractIpRestrictor.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/ip/AbstractIpRestrictor.java deleted file mode 100644 index 7ce751198..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/ip/AbstractIpRestrictor.java +++ /dev/null @@ -1,158 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ - -package org.apache.ftpserver.ip; - -import java.io.IOException; - -import org.apache.avalon.framework.activity.Disposable; -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.context.Context; -import org.apache.avalon.framework.context.ContextException; -import org.apache.avalon.framework.context.Contextualizable; -import org.apache.avalon.framework.logger.AbstractLogEnabled; -//import org.apache.avalon.phoenix.BlockContext; - -/** - * Abstract ip restrictor class. - * - * @author Rana Bhattacharyya - */ -public -abstract class AbstractIpRestrictor extends AbstractLogEnabled - implements IpRestrictorInterface, - Contextualizable, - Configurable, - Initializable, - Disposable { - - protected Configuration mConfig; - protected boolean mbAllowIp; - private String mBaseDirectory = null; - - /** - * Set context object - first step. - */ - public void contextualize(Context context) throws ContextException { -// mBlockContext = (BlockContext) context; - } - - - /** - * Configure user manager - third step. - */ - public void configure(Configuration config) throws ConfigurationException { - mConfig = config; - - // get server address - Configuration tmpConf = mConfig.getChild("allow-ip", false); - mbAllowIp = false; - if(tmpConf != null) { - mbAllowIp = tmpConf.getValueAsBoolean(mbAllowIp); - } - - mBaseDirectory = config.getChild("base-directory").getValue(null); - - if(mBaseDirectory == null) - throw new ConfigurationException("Missing configuration element 'base-directory'"); - } - - /** - * Get allow/ban IP flag. - */ - public boolean isAllowIp() { - return mbAllowIp; - } - - /** - * Get config object. - */ - public Configuration getConfig() { - return mConfig; - } - - - /** - * - */ - public String getBaseDirectory() { - return mBaseDirectory; - } - - /** - * Initialize - fourth step. - */ - public void initialize() throws Exception { - } - - /** - * Reload banned ip list - dummy implementation - */ - public void reload() throws IOException { - } - - /** - * Close user manager - dummy implementation. - */ - public void dispose() { - getLogger().info("Closing ip restrictor..."); - } - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/ip/FileIpRestrictor.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/ip/FileIpRestrictor.java deleted file mode 100644 index dec4552fe..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/ip/FileIpRestrictor.java +++ /dev/null @@ -1,211 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.ip; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.net.InetAddress; -import java.util.Collection; -import java.util.Vector; - -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.context.Context; -import org.apache.avalon.framework.context.ContextException; -import org.apache.ftpserver.util.IoUtils; -import org.apache.ftpserver.util.RegularExpr; -//import org.apache.avalon.phoenix.BlockContext; - - -/** - * This class provides IP restriction functionality. - * - * @phoenix:block - * @phoenix:service name="org.apache.ftpserver.ip.IpRestrictorInterface" - * - * @author Rana Bhattacharyya - */ -public class FileIpRestrictor extends AbstractIpRestrictor { - - private static final String LINE_SEP = System.getProperty("line.separator", "\n"); - - private File mIpFile = null; - private Vector mAllEntries = new Vector(); - - /** - * Set application context. - */ - public void contextualize(Context context) throws ContextException { - super.contextualize(context); - - mIpFile = new File( getBaseDirectory(), "ip.properties" ); - try { - reload(); - } - catch(IOException ex) { - getLogger().error("IpRestrictor:contextualize()", ex); - throw new ContextException("IpRestrictor:contextualize()", ex); - } - getLogger().info("IP restrictor file = " + mIpFile); - } - - /** - * Read the list from the file. - */ - public synchronized void reload() throws IOException { - BufferedReader br = null; - Vector newEntries = new Vector(); - try { - if (mIpFile.exists()) { - br = IoUtils.getBufferedReader(new FileReader(mIpFile)); - String line = null; - while((line = br.readLine()) != null) { - line = line.trim(); - if(!line.equals("")) { - newEntries.add(line); - } - } - } - mAllEntries = newEntries; - } - finally { - IoUtils.close(br); - } - } - - /** - * Get IP resrictor file object. - */ - public File getFile() { - return mIpFile; - } - - /** - * Save this IP restriction list. - */ - public synchronized void save() throws IOException { - FileWriter fw = null; - try { - fw = new FileWriter(mIpFile); - Object[] entries = mAllEntries.toArray(); - for(int i=entries.length; --i>=0; ) { - fw.write(entries[i].toString()); - fw.write(LINE_SEP); - } - } - finally { - IoUtils.close(fw); - } - } - - /** - * Check IP permission. Compare it with all the entries in the list. - */ - public boolean hasPermission(InetAddress addr) { - boolean bMatch = false; - Object[] entries = mAllEntries.toArray(); - for(int i=entries.length; --i>=0; ) { - RegularExpr regExp = new RegularExpr(entries[i].toString()); - bMatch = regExp.isMatch(addr.getHostAddress()); - if(bMatch) { - break; - } - } - - if (isAllowIp()) { - return bMatch; - } - else { - return !bMatch; - } - } - - /** - * Add a new entry. - */ - public void addEntry(String entry) { - entry = entry.trim(); - if(entry.equals("")) { - return; - } - mAllEntries.add(entry); - } - - /** - * Remove entry - */ - public void removeEntry(String entry) { - mAllEntries.remove(entry); - } - - /** - * Get all entries - */ - public Collection getAllEntries() { - return (Collection)mAllEntries.clone(); - } - - /** - * Remove all entries - */ - public void clear() { - mAllEntries.clear(); - } -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/ip/IpRestrictorInterface.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/ip/IpRestrictorInterface.java deleted file mode 100644 index a18e73fca..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/ip/IpRestrictorInterface.java +++ /dev/null @@ -1,114 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.ip; - -import java.io.IOException; -import java.net.InetAddress; -import java.util.Collection; - - -/** - * IP Restrictor interface - * - * @author Rana Bhattacharyya - */ - -public -interface IpRestrictorInterface { - - String ROLE = IpRestrictorInterface.class.getName(); - - /** - * Allow/ban the listed IPs flag. - */ - boolean isAllowIp(); - - /** - * Reload data from store. - */ - void reload() throws IOException; - - /** - * Save data into store. - */ - void save() throws IOException; - - /** - * Check IP permission. - */ - boolean hasPermission(InetAddress addr); - - /** - * Clear all entries. - */ - void clear(); - - /** - * Add new entry - */ - void addEntry(String str); - - /** - * Remove entry - */ - void removeEntry(String str); - - /** - * Get all entries - */ - Collection getAllEntries(); -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/ConnectionService.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/ConnectionService.java deleted file mode 100644 index ddb00abeb..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/ConnectionService.java +++ /dev/null @@ -1,159 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote; - -import java.util.List; -import java.rmi.RemoteException; -import java.rmi.server.UnicastRemoteObject; - -import org.apache.ftpserver.FtpUser; -import org.apache.ftpserver.BaseFtpConnection; -import org.apache.ftpserver.remote.adapter.FtpConnectionObserverAdapter; -import org.apache.ftpserver.remote.adapter.SpyConnectionAdapter; -import org.apache.ftpserver.remote.interfaces.SpyConnectionInterface; -import org.apache.ftpserver.remote.interfaces.FtpConnectionObserver; - -/** - * Ftp remote user service adapter class - used by remote admin GUI. - * - * @author Rana Bhattacharyya - */ -public -class ConnectionService implements org.apache.ftpserver.remote.interfaces.ConnectionServiceInterface { - - private org.apache.ftpserver.ConnectionService mConnectionService; - private FtpConnectionObserverAdapter mConnectionObserverAdapter; - - - /** - * Constructor - sets the actual connection service object - */ - public ConnectionService(final org.apache.ftpserver.ConnectionService conService) throws RemoteException { - mConnectionService = conService; - mConnectionObserverAdapter = new FtpConnectionObserverAdapter(); - UnicastRemoteObject.exportObject(this); - } - - /** - * Get the actual object. - */ - public org.apache.ftpserver.ConnectionService getConnectionService() { - return mConnectionService; - } - - /** - * It returns a list of all the currently connected users. - */ - public List getAllUsers() { - return mConnectionService.getAllUsers(); - } - - /** - * Set connection observer. - */ - public void setObserver(final FtpConnectionObserver obsr) { - mConnectionObserverAdapter.setConnectionObserver(obsr); - if (obsr == null) { - mConnectionService.setObserver(null); - } - else { - mConnectionService.setObserver(mConnectionObserverAdapter); - } - } - - /** - * Get the observer. - */ - public FtpConnectionObserver getObserver() { - return mConnectionObserverAdapter.getConnectionObserver(); - } - - /** - * Get connected user - */ - public FtpUser getUser(final String sessId) { - BaseFtpConnection con = mConnectionService.getConnection(sessId); - return (con != null) ? con.getUser() : null; - } - - /** - * Set spy object - */ - public void setSpyObject(final String sessId, final SpyConnectionInterface spy) { - if (spy == null) { - mConnectionService.setSpyObject(sessId, null); - } - else { - SpyConnectionAdapter newAdapter = new SpyConnectionAdapter(spy); - mConnectionService.setSpyObject(sessId, newAdapter); - } - } - - /** - * Close ftp connection for this session id. - */ - public void closeConnection(final String sessionId) { - mConnectionService.closeConnection(sessionId); - } - - /** - * Close all - close all the connections. - */ - public void closeAllConnections() { - mConnectionService.closeAllConnections(); - } -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/FtpConfig.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/FtpConfig.java deleted file mode 100644 index b90cc24f1..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/FtpConfig.java +++ /dev/null @@ -1,208 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote; - -import java.rmi.RemoteException; -import java.rmi.server.UnicastRemoteObject; -import java.net.InetAddress; - -import org.apache.ftpserver.remote.interfaces.FtpConfigInterface; -import org.apache.ftpserver.remote.interfaces.IpRestrictorInterface; -import org.apache.ftpserver.remote.interfaces.ConnectionServiceInterface; -import org.apache.ftpserver.remote.interfaces.UserManagerInterface; -import org.apache.ftpserver.remote.interfaces.FtpStatisticsInterface; - -/** - * Ftp configuration remote adapter. It is used by remote admin GUI. - * - * @author Rana Bhattacharyya - */ -public -class FtpConfig implements FtpConfigInterface { - - private org.apache.ftpserver.FtpConfig mConfig; - - private IpRestrictor mIpRestrictor; - private UserManager mUserManager; - private ConnectionService mConService; - private FtpStatistics mStatistics; - - /** - * Constructor - sets the actual config object. - */ - public FtpConfig(org.apache.ftpserver.FtpConfig config) throws RemoteException { - mConfig = config; - mIpRestrictor = new IpRestrictor(config.getIpRestrictor()); - mUserManager = new UserManager(config.getUserManager()); - mConService = new ConnectionService(config.getConnectionService()); - mStatistics = new FtpStatistics(config.getStatistics()); - - UnicastRemoteObject.exportObject(this); - } - - /** - * Get config - */ - public org.apache.ftpserver.FtpConfig getConfig() { - return mConfig; - } - - /** - * Get user manager - */ - public UserManagerInterface getUserManager() { - return mUserManager; - } - - /** - * Get IP restrictor object. - */ - public IpRestrictorInterface getIpRestrictor() { - return mIpRestrictor; - } - - /** - * Get server bind address. - */ - public InetAddress getServerAddress() { - return mConfig.getServerAddress(); - } - - /** - * Get address string - */ - public String getAddressString() { - return mConfig.getSelfAddress().toString(); - } - - /** - * Get server port. - */ - public int getServerPort() { - return mConfig.getServerPort(); - } - - /** - * Check annonymous login support. - */ - public boolean isAnonymousLoginAllowed() { - return mConfig.isAnonymousLoginAllowed(); - } - - /** - * Get the connection handler - */ - public ConnectionServiceInterface getConnectionService() { - return mConService; - } - - /** - * Get maximum number of connections. - */ - public int getMaxConnections() { - return mConfig.getMaxConnections(); - } - - /** - * Get maximum number of anonymous connections. - */ - public int getMaxAnonymousLogins() { - return mConfig.getMaxAnonymousLogins(); - } - - /** - * Get poll interval in seconds. - */ - public int getSchedulerInterval() { - return mConfig.getSchedulerInterval(); - } - - /** - * Get default idle time in seconds. - */ - public int getDefaultIdleTime() { - return mConfig.getDefaultIdleTime(); - } - - /** - * Get default root directory - */ - public String getDefaultRoot() { - return mConfig.getDefaultRoot().getAbsolutePath(); - } - - /** - * Get global statistics object. - */ - public FtpStatisticsInterface getStatistics() { - return mStatistics; - } - - /** - * Get rmi port - */ - public int getRemoteAdminPort() { - return mConfig.getRemoteAdminPort(); - } - - /** - * Is remote admin allowed - */ - public boolean isRemoteAdminAllowed() { - return mConfig.isRemoteAdminAllowed(); - } -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/FtpStatistics.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/FtpStatistics.java deleted file mode 100644 index 4decc4c2f..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/FtpStatistics.java +++ /dev/null @@ -1,219 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote; - -import java.rmi.RemoteException; -import java.rmi.server.UnicastRemoteObject; -import java.util.Date; - -import org.apache.ftpserver.remote.adapter.FtpFileListenerAdapter; -import org.apache.ftpserver.remote.adapter.FtpStatisticsListenerAdapter; -import org.apache.ftpserver.remote.interfaces.FtpStatisticsInterface; -import org.apache.ftpserver.remote.interfaces.FtpStatisticsListener; -import org.apache.ftpserver.remote.interfaces.FtpFileListener; - -/** - * Ftp statistis remote adapter class. - * - * @author Rana Bhattacharyya - */ -public -class FtpStatistics implements FtpStatisticsInterface { - - private org.apache.ftpserver.FtpStatistics mStatistics; - - private FtpStatisticsListenerAdapter mStatisticsListener; - private FtpFileListenerAdapter mFileListener; - - /** - * Constructor - sets the actual statistics object - */ - public FtpStatistics(final org.apache.ftpserver.FtpStatistics statistics) throws RemoteException { - mStatistics = statistics; - - mStatisticsListener = new FtpStatisticsListenerAdapter(); - mFileListener = new FtpFileListenerAdapter(); - - UnicastRemoteObject.exportObject(this); - } - - /** - * Get server start time. - */ - public Date getStartTime() { - return mStatistics.getStartTime(); - } - - /** - * Get number of files uploaded. - */ - public int getFileUploadNbr() { - return mStatistics.getFileUploadNbr(); - } - - /** - * Get number of files downloaded. - */ - public int getFileDownloadNbr() { - return mStatistics.getFileDownloadNbr(); - } - - /** - * Get number of files deleted. - */ - public int getFileDeleteNbr() { - return mStatistics.getFileDeleteNbr(); - } - - /** - * Get total number of bytes uploaded. - */ - public long getFileUploadSize() { - return mStatistics.getFileUploadSize(); - } - - /** - * Get total number of bytes downloaded. - */ - public long getFileDownloadSize() { - return mStatistics.getFileDownloadSize(); - } - - /** - * Get current number of connections. - */ - public int getConnectionNbr() { - return mStatistics.getConnectionNbr(); - } - - /** - * Get total number of connections - */ - public int getTotalConnectionNbr() { - return mStatistics.getTotalConnectionNbr(); - } - - /** - * Get current number of logins - */ - public int getLoginNbr() { - return mStatistics.getLoginNbr(); - } - - /** - * Get total number of logins - */ - public int getTotalLoginNbr() { - return mStatistics.getTotalLoginNbr(); - } - - /** - * Get current number of anonymous logins. - */ - public int getAnonLoginNbr() { - return mStatistics.getAnonLoginNbr(); - } - - /** - * Get total number of anonymous logins - */ - public int getTotalAnonLoginNbr() { - return mStatistics.getTotalAnonLoginNbr(); - } - - /** - * Set a listener object. - */ - public void setListener(FtpStatisticsListener listener) { - mStatisticsListener.setStatisticsListener(listener); - if (listener == null) { - mStatistics.setListener(null); - } - else { - mStatistics.setListener(mStatisticsListener); - } - } - - /** - * Get listener object. - */ - public FtpStatisticsListener getListener() { - return mStatisticsListener.getStatisticsListener(); - } - - /** - * Get file listener - */ - public void setFileListener(FtpFileListener listener) { - mFileListener.setFileListener(listener); - if (listener == null) { - mStatistics.setFileListener(null); - } - else { - mStatistics.setFileListener(mFileListener); - } - } - - /** - * Set file listener - */ - public FtpFileListener getFileListener() { - return mFileListener.getFileListener(); - } - - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/IpRestrictor.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/IpRestrictor.java deleted file mode 100644 index bd9cffb48..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/IpRestrictor.java +++ /dev/null @@ -1,145 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote; - -import java.io.IOException; -import java.net.InetAddress; -import java.util.Collection; -import java.rmi.RemoteException; -import java.rmi.server.UnicastRemoteObject; - -/** - * IP Restrictor remotr adapter class. Used by admin GUI. - * - * @author Rana Bhattacharyya - */ -public -class IpRestrictor implements org.apache.ftpserver.remote.interfaces.IpRestrictorInterface{ - - private org.apache.ftpserver.ip.IpRestrictorInterface mIpRestrictor; - - /** - * Constructor - sets the actual ip restrictor object - */ - public IpRestrictor(org.apache.ftpserver.ip.IpRestrictorInterface ipRestrictor) throws RemoteException { - mIpRestrictor = ipRestrictor; - UnicastRemoteObject.exportObject(this); - } - - /** - * Get the actual object. - */ - public org.apache.ftpserver.ip.IpRestrictorInterface getActualObject() { - return mIpRestrictor; - } - - /** - * Allow/ban IP flag - */ - public boolean isAllowIp() { - return mIpRestrictor.isAllowIp(); - } - - /** - * Reload data from store. - */ - public void reload() throws IOException { - mIpRestrictor.reload(); - } - - /** - * Save data into store. - */ - public void save() throws IOException { - mIpRestrictor.save(); - } - - /** - * Check IP permission. - */ - public boolean hasPermission(InetAddress addr) { - return mIpRestrictor.hasPermission(addr); - } - - /** - * Clear all entries. - */ - public void clear() { - mIpRestrictor.clear(); - } - - /** - * Add new entry - */ - public void addEntry(String str) { - mIpRestrictor.addEntry(str); - } - - /** - * Remove entry - */ - public void removeEntry(String str) { - mIpRestrictor.removeEntry(str); - } - - /** - * Get all entries - */ - public Collection getAllEntries() { - return mIpRestrictor.getAllEntries(); - } -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/RemoteHandler.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/RemoteHandler.java deleted file mode 100644 index e57b650fb..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/RemoteHandler.java +++ /dev/null @@ -1,209 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote; - -import java.rmi.RemoteException; -import java.rmi.registry.Registry; -import java.rmi.registry.LocateRegistry; -import java.rmi.server.UnicastRemoteObject; -import java.rmi.server.Unreferenced; -import java.rmi.server.UID; - -import org.apache.ftpserver.usermanager.User; -import org.apache.ftpserver.usermanager.UserManagerInterface; -import org.apache.ftpserver.remote.interfaces.FtpConfigInterface; -import org.apache.ftpserver.remote.interfaces.RemoteHandlerInterface; - -/** - * Ftp server remote admin adapter. This is the starting point of remote admin. - * - * @author Rana Bhattacharyya - */ -public -class RemoteHandler implements RemoteHandlerInterface, Unreferenced { - - private FtpConfig mFtpConfig; - private String mstAdminSession; - private Registry mRegistry; - - /** - * Constructor - set the actual user config object - */ - public RemoteHandler(org.apache.ftpserver.FtpConfig config) throws RemoteException { - - // open registry - int rmiPort = config.getRemoteAdminPort(); - try { - mRegistry = LocateRegistry.getRegistry(rmiPort); - mRegistry.list(); - } - catch(RemoteException ex) { - mRegistry = null; - } - - if(mRegistry == null) { - mRegistry = LocateRegistry.createRegistry(rmiPort); - } - - UnicastRemoteObject.exportObject(this); - mRegistry.rebind(BIND_NAME, this); - mFtpConfig = new FtpConfig(config); - } - - /** - * Remote admin login - */ - public synchronized String login(String id, String password) throws Exception { - try { - mFtpConfig.getConfig().getLogger().info("Remote admin login request from " + UnicastRemoteObject.getClientHost()); - } - catch(Exception ex) { - mFtpConfig.getConfig().getLogger().error("RemoteHandler.login()", ex); - } - - // data validation - if(mstAdminSession != null) { - throw new Exception("Multiple admin session is not possible."); - } - if(id == null) { - throw new Exception("Please specify user Id"); - } - if(password == null) { - throw new Exception("Please specify password"); - } - - // admin login - UserManagerInterface userManager = mFtpConfig.getConfig().getUserManager(); - String adminName = userManager.getAdminName(); - boolean bSuccess = false; - if ( id.equals(adminName) ) { - bSuccess = userManager.authenticate(id, password); - } - if(!bSuccess) { - throw new Exception("Login failure."); - } - - try { - mFtpConfig.getConfig().getLogger().info("Remote admin login from " + UnicastRemoteObject.getClientHost()); - } - catch(Exception ex) { - mFtpConfig.getConfig().getLogger().error("RemoteHandler.login()", ex); - } - mstAdminSession = new UID().toString(); - return mstAdminSession; - } - - /** - * Remote admin logout - */ - public synchronized boolean logout(String sessId) { - if( (sessId == null) || (!sessId.equals(mstAdminSession)) ) { - return false; - } - mFtpConfig.getConfig().getLogger().info("Remote admin logout"); - resetObservers(); - mstAdminSession = null; - return true; - } - - /** - * Get configuration interface - */ - public FtpConfigInterface getConfigInterface(String sessId) { - if( (sessId == null) || (!sessId.equals(mstAdminSession)) ) { - return null; - } - return mFtpConfig; - } - - /** - * Reset observers - */ - private void resetObservers() { - ConnectionService conService = (ConnectionService)mFtpConfig.getConnectionService(); - conService.setObserver(null); - conService.getConnectionService().resetAllSpyObjects(); - - FtpStatistics statistics = (FtpStatistics)mFtpConfig.getStatistics(); - statistics.setListener(null); - statistics.setFileListener(null); - } - - /** - * Close the remote handler - */ - public void dispose() { - mFtpConfig.getConfig().getLogger().info("Closing remote handler..."); - resetObservers(); - try { - if (mRegistry != null) { - mRegistry.unbind(BIND_NAME); - mRegistry = null; - } - } - catch(Exception ex) { - } - } - - /** - * Unreferenced - admin user idle timeout - */ - public synchronized void unreferenced() { - mFtpConfig.getConfig().getLogger().info("Remote admin timeout"); - logout(mstAdminSession); - } -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/UserManager.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/UserManager.java deleted file mode 100644 index f5c755ec4..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/UserManager.java +++ /dev/null @@ -1,151 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote; - -import java.util.List; -import java.rmi.RemoteException; -import java.rmi.server.UnicastRemoteObject; -import org.apache.ftpserver.usermanager.User; -import org.apache.ftpserver.remote.interfaces.UserManagerInterface; - -/** - * This is user manager remote adapter class. This is used by remote admin GUI. - * - * @author Rana Bhattacharyya - */ -public -class UserManager implements UserManagerInterface { - - private org.apache.ftpserver.usermanager.UserManagerInterface mUserManager; - - /** - * Constructor - sets the actual user manager - */ - public UserManager(org.apache.ftpserver.usermanager.UserManagerInterface userManager) throws RemoteException { - mUserManager = userManager; - UnicastRemoteObject.exportObject(this); - } - - /** - * Get the actual user manager - */ - public org.apache.ftpserver.usermanager.UserManagerInterface getUserManager() { - return mUserManager; - } - - /** - * Save the user. If a new user, create it else update the - * existing user. - */ - public void save(User user) throws Exception { - mUserManager.save(user); - } - - /** - * Delete the user from the system. - * - * @param name name of the user to be deleted. - */ - public void delete(String userName) throws Exception { - mUserManager.delete(userName); - } - - /** - * Get user by name. - */ - public User getUserByName(String name) { - return mUserManager.getUserByName(name); - } - - /** - * Get all user names in the system. - */ - public List getAllUserNames() { - return mUserManager.getAllUserNames(); - } - - /** - * User existance check. - * - * @param name user name - */ - public boolean doesExist(String name) { - return mUserManager.doesExist(name); - } - - /** - * Authenticate user - */ - public boolean authenticate(String login, String password) { - return mUserManager.authenticate(login, password); - } - - /** - * Load the user data again - */ - public void reload() throws Exception { - mUserManager.reload(); - } - - /** - * Get admin name - */ - public String getAdminName() { - return mUserManager.getAdminName(); - } - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/adapter/FtpConnectionObserverAdapter.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/adapter/FtpConnectionObserverAdapter.java deleted file mode 100644 index f4a25a0c3..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/adapter/FtpConnectionObserverAdapter.java +++ /dev/null @@ -1,141 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote.adapter; - -import java.rmi.RemoteException; -import org.apache.ftpserver.FtpUser; -import org.apache.ftpserver.remote.interfaces.FtpConnectionObserver; - - -/** - * This connection observer remote adapter class. - * - * @author Rana Bhattacharyya - */ -public -class FtpConnectionObserverAdapter implements org.apache.ftpserver.interfaces.FtpConnectionObserver { - - private FtpConnectionObserver mObserver; - - /** - * Default constructor. - */ - public FtpConnectionObserverAdapter() { - } - - /** - * Get observer - */ - public FtpConnectionObserver getConnectionObserver() { - return mObserver; - } - - /** - * Set observer - */ - public void setConnectionObserver(FtpConnectionObserver observer) { - mObserver = observer; - } - - /** - * New connection notification. - * @param user newly connected user - */ - public void newConnection(final FtpUser user) { - FtpConnectionObserver observer = mObserver; - if (observer != null) { - try { - observer.newConnection(user); - } - catch(RemoteException ex) { - mObserver = null; - } - } - } - - /** - * Close connection notification - * @param user closed user object. - */ - public void removeConnection(final FtpUser user) { - FtpConnectionObserver observer = mObserver; - if (observer != null) { - try { - observer.removeConnection(user); - } - catch(RemoteException ex) { - mObserver = null; - } - } - } - - /** - * Update connection notification - * @param user updated user object - */ - public void updateConnection(final FtpUser user) { - FtpConnectionObserver observer = mObserver; - if (observer != null) { - try { - observer.updateConnection(user); - } - catch(RemoteException ex) { - mObserver = null; - } - } - } -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/adapter/FtpFileListenerAdapter.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/adapter/FtpFileListenerAdapter.java deleted file mode 100644 index de6c8c741..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/adapter/FtpFileListenerAdapter.java +++ /dev/null @@ -1,139 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote.adapter; - -import java.io.File; -import java.rmi.RemoteException; -import org.apache.ftpserver.remote.interfaces.FtpFileListener; - -/** - * Ftp file upload/download/delete listener remote interface. - * - * @author Rana Bhattacharyya - */ -public -class FtpFileListenerAdapter implements org.apache.ftpserver.interfaces.FtpFileListener { - - private FtpFileListener mFileListener = null; - - /** - * Default constructor. - */ - public FtpFileListenerAdapter() { - } - - /** - * Get actual listener object - */ - public FtpFileListener getFileListener() { - return mFileListener; - } - - /** - * Set file listener - */ - public void setFileListener(FtpFileListener listener) { - mFileListener = listener; - } - - /** - * User file upload notification. - */ - public void notifyUpload(final File file, final String sessionId) { - FtpFileListener listener = mFileListener; - if (listener != null) { - try { - listener.notifyUpload(file.getAbsolutePath(), sessionId); - } - catch(RemoteException ex) { - mFileListener = null; - } - } - } - - /** - * User file download notification. - */ - public void notifyDownload(final File file, final String sessionId) { - FtpFileListener listener = mFileListener; - if (listener != null) { - try { - listener.notifyDownload(file.getAbsolutePath(), sessionId); - } - catch(RemoteException ex) { - mFileListener = null; - } - } - } - - /** - * User file delete notification. - */ - public void notifyDelete(final File file, final String sessionId) { - FtpFileListener listener = mFileListener; - if (listener != null) { - try { - listener.notifyDelete(file.getAbsolutePath(), sessionId); - } - catch(RemoteException ex) { - mFileListener = null; - } - } - } - -} - diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/adapter/FtpStatisticsListenerAdapter.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/adapter/FtpStatisticsListenerAdapter.java deleted file mode 100644 index 6063f16b1..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/adapter/FtpStatisticsListenerAdapter.java +++ /dev/null @@ -1,183 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote.adapter; - - -import java.rmi.RemoteException; -import org.apache.ftpserver.remote.interfaces.FtpStatisticsListener; - -/** - * Ftp statistics listener remote interface. - * - * @author Rana Bhattacharyya - */ -public -class FtpStatisticsListenerAdapter implements org.apache.ftpserver.interfaces.FtpStatisticsListener { - - private FtpStatisticsListener mListener = null; - - /** - * Constructor - set the actual listener object - */ - public FtpStatisticsListenerAdapter() { - } - - /** - * Get the actual listener object - */ - public FtpStatisticsListener getStatisticsListener() { - return mListener; - } - - /** - * Set the actual listener object. - */ - public void setStatisticsListener(FtpStatisticsListener listener) { - mListener = listener; - } - - /** - * User file upload notification. - */ - public void notifyUpload() { - FtpStatisticsListener listener = mListener; - if (listener != null) { - try { - listener.notifyUpload(); - } - catch(RemoteException ex) { - mListener = null; - } - } - } - - /** - * User file download notification. - */ - public void notifyDownload() { - FtpStatisticsListener listener = mListener; - if (listener != null) { - try { - listener.notifyDownload(); - } - catch(RemoteException ex) { - mListener = null; - } - } - } - - /** - * User file delete notification. - */ - public void notifyDelete() { - FtpStatisticsListener listener = mListener; - if (listener != null) { - try { - listener.notifyDelete(); - } - catch(RemoteException ex) { - mListener = null; - } - } - } - - /** - * New user login notification. - */ - public void notifyLogin() { - FtpStatisticsListener listener = mListener; - if (listener != null) { - try { - listener.notifyLogin(); - } - catch(RemoteException ex) { - mListener = null; - } - } - } - - /** - * User logout notification. - */ - public void notifyLogout() { - FtpStatisticsListener listener = mListener; - if (listener != null) { - try { - listener.notifyLogout(); - } - catch(RemoteException ex) { - mListener = null; - } - } - } - - /** - * Connection open/close notification - */ - public void notifyConnection() { - FtpStatisticsListener listener = mListener; - if (listener != null) { - try { - listener.notifyConnection(); - } - catch(RemoteException ex){ - mListener = null; - } - } - } - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/adapter/SpyConnectionAdapter.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/adapter/SpyConnectionAdapter.java deleted file mode 100644 index f9fbd3f7d..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/adapter/SpyConnectionAdapter.java +++ /dev/null @@ -1,122 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote.adapter; - -import java.io.IOException; -import java.rmi.RemoteException; -import org.apache.ftpserver.remote.interfaces.SpyConnectionInterface; - -/** - * This remote spy user adapter. - */ -public -class SpyConnectionAdapter implements org.apache.ftpserver.interfaces.SpyConnectionInterface { - - private SpyConnectionInterface mSpy; - - /** - * Default constructor. - */ - public SpyConnectionAdapter(SpyConnectionInterface spy) { - mSpy = spy; - } - - /** - * Get spy user - */ - public SpyConnectionInterface getSpyObject() { - return mSpy; - } - - /** - * Get spy user - */ - public void setSpyObject(SpyConnectionInterface spy) { - mSpy = spy; - } - - /** - * Write user request. - */ - public void request(final String msg) throws IOException { - SpyConnectionInterface spy = mSpy; - if(spy != null) { - try { - spy.request(msg); - } - catch(RemoteException ex) { - mSpy = null; - } - } - } - - - /** - * Write server response. - */ - public void response(final String msg) throws IOException { - SpyConnectionInterface spy = mSpy; - if(spy != null) { - try { - spy.response(msg); - } - catch(RemoteException ex) { - mSpy = null; - } - } - } -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/ConnectionServiceInterface.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/ConnectionServiceInterface.java deleted file mode 100644 index cd7477fd7..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/ConnectionServiceInterface.java +++ /dev/null @@ -1,107 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ - -package org.apache.ftpserver.remote.interfaces; - -import java.util.List; -import java.rmi.Remote; -import java.rmi.RemoteException; -import org.apache.ftpserver.FtpUser; - -/** - * Ftp user service interface - used by remote admin GUI. - * - * @author Rana Bhattacharyya - */ -public -interface ConnectionServiceInterface extends Remote { - - /** - * It returns a list of all the currently connected user objects. - */ - List getAllUsers() throws RemoteException; - - /** - * Set user manager observer. - */ - void setObserver(final FtpConnectionObserver obsr) throws RemoteException; - - /** - * Get the observer. - */ - FtpConnectionObserver getObserver() throws RemoteException; - - /** - * Close ftp connection for this session id. - */ - void closeConnection(final String sessionId) throws RemoteException; - - /** - * Close all - close all the connections. - */ - void closeAllConnections() throws RemoteException; - - /** - * Get connected user - */ - FtpUser getUser(String sessId) throws RemoteException; - - /** - * Set spy object - */ - void setSpyObject(String sessId, SpyConnectionInterface spy) throws RemoteException; -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/FtpConfigInterface.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/FtpConfigInterface.java deleted file mode 100644 index 26979cea5..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/FtpConfigInterface.java +++ /dev/null @@ -1,147 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ - -package org.apache.ftpserver.remote.interfaces; - -import java.rmi.Remote; -import java.rmi.RemoteException; -import java.net.InetAddress; - -/** - * Ftp configuration remote interface. It is used by remote admin GUI. - * - * @author Rana Bhattacharyya - */ -public -interface FtpConfigInterface extends Remote { - - /** - * Get user manager - */ - UserManagerInterface getUserManager() throws RemoteException; - - /** - * Get ip restrictor - */ - IpRestrictorInterface getIpRestrictor() throws RemoteException; - - /** - * Get server bind address. - */ - InetAddress getServerAddress() throws RemoteException; - - /** - * Get address string - */ - String getAddressString() throws RemoteException; - - /** - * Get server port. - */ - int getServerPort() throws RemoteException; - - /** - * Check annonymous login support. - */ - boolean isAnonymousLoginAllowed() throws RemoteException; - - /** - * Get user properties. - */ - ConnectionServiceInterface getConnectionService() throws RemoteException; - - /** - * Get maximum number of connections. - */ - int getMaxConnections() throws RemoteException; - - /** - * Get maximum number of anonymous connections. - */ - int getMaxAnonymousLogins() throws RemoteException; - - /** - * Get poll interval in seconds. - */ - int getSchedulerInterval() throws RemoteException; - - /** - * Get default idle time in seconds. - */ - int getDefaultIdleTime() throws RemoteException; - - /** - * Get default root directory - */ - String getDefaultRoot() throws RemoteException; - - /** - * Get global statistics object. - */ - FtpStatisticsInterface getStatistics() throws RemoteException; - - /** - * Get rmi port - */ - int getRemoteAdminPort() throws RemoteException; - - /** - * Is remote admin allowed - */ - boolean isRemoteAdminAllowed() throws RemoteException; -} - diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/FtpConnectionObserver.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/FtpConnectionObserver.java deleted file mode 100644 index 1e1364344..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/FtpConnectionObserver.java +++ /dev/null @@ -1,88 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote.interfaces; - -import java.rmi.Remote; -import java.rmi.RemoteException; -import org.apache.ftpserver.FtpUser; - -/** - * This observer interface monitors all the ftp connections. - * - * @author Rana Bhattacharyya - */ -public -interface FtpConnectionObserver extends Remote { - - /** - * New connection notification. - * @param user new connected user. - */ - void newConnection(final FtpUser user) throws RemoteException; - - /** - * Close connection notification - * @param user closed user object - */ - void removeConnection(final FtpUser user) throws RemoteException; - - /** - * Update connection notification - * @param user updated user - */ - void updateConnection(final FtpUser user) throws RemoteException; -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/FtpFileListener.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/FtpFileListener.java deleted file mode 100644 index 17973bd13..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/FtpFileListener.java +++ /dev/null @@ -1,86 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote.interfaces; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -/** - * Ftp file upload/download/delete listener remote interface. - * - * @author Rana Bhattacharyya - */ -public -interface FtpFileListener extends Remote { - - /** - * User file upload notification. - */ - void notifyUpload(final String file, final String sessionId) throws RemoteException; - - /** - * User file download notification. - */ - void notifyDownload(final String file, final String sessionId) throws RemoteException; - - /** - * User file delete notification. - */ - void notifyDelete(final String file, final String sessionId) throws RemoteException; - -} - diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/FtpStatisticsInterface.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/FtpStatisticsInterface.java deleted file mode 100644 index a8dc235bc..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/FtpStatisticsInterface.java +++ /dev/null @@ -1,152 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote.interfaces; - -import java.rmi.Remote; -import java.rmi.RemoteException; -import java.util.Date; - - -/** - * Ftp statistis remote interface. - * - * @author Rana Bhattacharyya - */ -public -interface FtpStatisticsInterface extends Remote { - - /** - * Get server start time. - */ - Date getStartTime() throws RemoteException; - - /** - * Get number of files uploaded. - */ - int getFileUploadNbr() throws RemoteException; - - /** - * Get number of files downloaded. - */ - int getFileDownloadNbr() throws RemoteException; - - /** - * Get number of files deleted. - */ - int getFileDeleteNbr() throws RemoteException; - - /** - * Get total number of bytes uploaded. - */ - long getFileUploadSize() throws RemoteException; - - /** - * Get total number of bytes downloaded. - */ - long getFileDownloadSize() throws RemoteException; - - /** - * Get current number of connections. - */ - int getConnectionNbr() throws RemoteException; - - /** - * Get total number of connections - */ - int getTotalConnectionNbr() throws RemoteException; - - /** - * Get current number of logins - */ - int getLoginNbr() throws RemoteException; - - /** - * Get total number of logins - */ - int getTotalLoginNbr() throws RemoteException; - - /** - * Get current number of anonymous logins. - */ - int getAnonLoginNbr() throws RemoteException; - - /** - * Get total number of anonymous logins - */ - int getTotalAnonLoginNbr() throws RemoteException; - - /** - * Set a listener object. - */ - void setListener(FtpStatisticsListener listener) throws RemoteException; - - /** - * Get listener object. - */ - FtpStatisticsListener getListener() throws RemoteException; - - /** - * Get file listener - */ - void setFileListener(FtpFileListener listener) throws RemoteException; - - /** - * Set file listener - */ - FtpFileListener getFileListener() throws RemoteException; - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/FtpStatisticsListener.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/FtpStatisticsListener.java deleted file mode 100644 index c8d7d6188..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/FtpStatisticsListener.java +++ /dev/null @@ -1,101 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ - -package org.apache.ftpserver.remote.interfaces; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -/** - * Ftp statistics listener remote interface. - * - * @author Rana Bhattacharyya - */ -public -interface FtpStatisticsListener extends Remote { - - /** - * User file upload notification. - */ - void notifyUpload() throws RemoteException; - - /** - * User file download notification. - */ - void notifyDownload() throws RemoteException; - - /** - * User file delete notification. - */ - void notifyDelete() throws RemoteException; - - /** - * New user login notification. - */ - void notifyLogin() throws RemoteException; - - /** - * User logout notification. - */ - void notifyLogout() throws RemoteException; - - /** - * Connection open/close notification - */ - void notifyConnection() throws RemoteException; - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/IpRestrictorInterface.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/IpRestrictorInterface.java deleted file mode 100644 index 687995c81..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/IpRestrictorInterface.java +++ /dev/null @@ -1,113 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote.interfaces; - -import java.io.IOException; -import java.net.InetAddress; -import java.util.Collection; -import java.rmi.Remote; -import java.rmi.RemoteException; - -/** - * IP Restrictor remotr interface. Used by admin GUI. - * - * @author Rana Bhattacharyya - */ - -public -interface IpRestrictorInterface extends Remote { - - /** - * Allow/ban IP flag - */ - boolean isAllowIp() throws RemoteException; - - /** - * Reload data from store. - */ - void reload() throws IOException; - - /** - * Save data into store. - */ - void save() throws IOException; - - /** - * Check IP permission. - */ - boolean hasPermission(final InetAddress addr) throws RemoteException; - - /** - * Clear all entries. - */ - void clear() throws RemoteException; - - /** - * Add new entry - */ - void addEntry(final String str) throws RemoteException; - - /** - * Remove entry - */ - void removeEntry(final String str) throws RemoteException; - - /** - * Get all entries - */ - Collection getAllEntries() throws RemoteException; -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/RemoteHandlerInterface.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/RemoteHandlerInterface.java deleted file mode 100644 index 1982f3ff1..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/RemoteHandlerInterface.java +++ /dev/null @@ -1,109 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote.interfaces; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -/** - * Ftp server remote admin interface. This is the starting point of remote admin. - * Call stack: - *
- *    RemoteHandlerInterface
- *    |
- *    +---- FtpConfigInterface
- *          |
- *          +---- FtpStatisticsInterface <- FtpStatisticsListener, FtpFileListener
- *          |
- *          +---- ConnectionServiceInterface <- FtpConnectionObserver
- *          |
- *          +---- IpRestrictorInterface
- *          |
- *          +---- UserManagerInterface
- * 
- * - * @author Rana Bhattacharyya - */ -public -interface RemoteHandlerInterface extends Remote { - - /** - * Remote interface ID - */ - String BIND_NAME = "ftp_admin"; - - /** - * Display server name - */ - String DISPLAY_NAME = "Ftp"; - - /** - * Remote admin login - */ - String login(final String id, final String password) throws Exception; - - /** - * Remote admin logout - */ - boolean logout(final String sessId) throws RemoteException; - - /** - * Get configuration interface - */ - FtpConfigInterface getConfigInterface(final String sessId) throws RemoteException; - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/SpyConnectionInterface.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/SpyConnectionInterface.java deleted file mode 100644 index c57ca325c..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/SpyConnectionInterface.java +++ /dev/null @@ -1,79 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ - -package org.apache.ftpserver.remote.interfaces; - -import java.io.IOException; -import java.rmi.Remote; - - -/** - * This interface is used to monitor user activities - remote admin. - */ -public -interface SpyConnectionInterface extends Remote { - - /** - * Write user request. - */ - void request(final String msg) throws IOException; - - /** - * Write server response. - */ - void response(final String msg) throws IOException; -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/UserManagerInterface.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/UserManagerInterface.java deleted file mode 100644 index 22ed9f4e1..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/remote/interfaces/UserManagerInterface.java +++ /dev/null @@ -1,117 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.remote.interfaces; - -import java.util.List; -import java.rmi.Remote; -import java.rmi.RemoteException; -import org.apache.ftpserver.usermanager.User; - -/** - * This is user manager remote interface. This is used by remote admin GUI. - * - * @author Rana Bhattacharyya - */ -public -interface UserManagerInterface extends Remote { - - /** - * Save the user. If a new user, create it else update the - * existing user. - */ - void save(final User user) throws Exception; - - /** - * Delete the user from the system. - * - * @param name name of the user to be deleted. - */ - void delete(final String userName) throws Exception; - - /** - * Get user by name. - */ - User getUserByName(final String name) throws RemoteException; - - /** - * Get all user names in the system. - */ - List getAllUserNames() throws RemoteException; - - /** - * User existance check. - * - * @param name user name - */ - boolean doesExist(final String name) throws RemoteException; - - /** - * Authenticate user - */ - boolean authenticate(final String login, final String password) throws RemoteException; - - /** - * Load the user data again - */ - void reload() throws Exception; - - /** - * Get admin user name - */ - String getAdminName() throws RemoteException; - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/usermanager/AbstractUserManager.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/usermanager/AbstractUserManager.java deleted file mode 100644 index b322dd104..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/usermanager/AbstractUserManager.java +++ /dev/null @@ -1,161 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.usermanager; - -//import org.apache.avalon.phoenix.BlockContext; - -import org.apache.avalon.framework.logger.AbstractLogEnabled; -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.activity.Disposable; - -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; - -import org.apache.avalon.framework.service.Serviceable; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.service.ServiceException; - -import org.apache.avalon.framework.context.Contextualizable; -import org.apache.avalon.framework.context.Context; -import org.apache.avalon.framework.context.ContextException; - -/** - * Abstract user manager class. - * - * @author Paul Hammant Paul_Hammant@yahoo.com - */ -public -abstract class AbstractUserManager extends AbstractLogEnabled - implements UserManagerInterface, - Contextualizable, - Configurable, - Initializable, - Disposable { - - protected Configuration mConfig; - protected String mstAdminName; - private String mBaseDirectory; - - /** - * Set context object - first step. - */ - public void contextualize(Context context) throws ContextException { - } - - - /** - * Configure user manager - third step. - */ - public void configure(Configuration config) throws ConfigurationException { - mConfig = config; - - Configuration adminConf = mConfig.getChild("ftp-admin-name", false); - mstAdminName = "admin"; - if(adminConf != null) { - mstAdminName = adminConf.getValue(mstAdminName); - } - - mBaseDirectory = config.getChild("base-directory").getValue(null); - - if(mBaseDirectory == null) - throw new ConfigurationException("Missing configuration element 'base-directory'"); - } - - - /** - * Get config object. - */ - public Configuration getConfig() { - return mConfig; - } - - /** - * Get the basedir. - */ - public String getBaseDirectory() { - return mBaseDirectory; - } - - /** - * Initialize - fourth step. - */ - public void initialize() throws Exception { - } - - - /** - * Reload user data - dummy implementation. - */ - public void reload() throws Exception { - } - - /** - * Get admin name - */ - public String getAdminName() { - return mstAdminName; - } - - /** - * Close user manager - dummy implementation. - */ - public void dispose() { - getLogger().info("Closing user manager..."); - } - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/usermanager/DbUserManager.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/usermanager/DbUserManager.java deleted file mode 100644 index 7d21c3d97..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/usermanager/DbUserManager.java +++ /dev/null @@ -1,420 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.usermanager; - -import java.io.File; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.ftpserver.util.StringUtils; - -/** - * This is another database based user manager class. I have - * tested it using MySQL and Oracle database. The sql file is ftp-db.sql - * - * @phoenix:block - * @phoenix:service name="org.apache.ftpserver.usermanager.UserManagerInterface" - * - * @author Rana Bhattacharyya - */ -public -class DbUserManager extends AbstractUserManager { - - private Connection mDbConnection = null; - - private String mInsUserStmt = null; - private String mDelUserStmt = null; - private String mSelUserStmt = null; - private String mGetAllStmt = null; - private String mUpdUserStmt = null; - - private String mUrl = null; - private String mUser = null; - private String mPassword = null; - - - /** - * Instantiate user manager - default constructor. - * - * @param cfg Ftp config object. - */ - public DbUserManager() throws Exception { - } - - - /** - * Set configuration - open database connection - */ - public void configure(Configuration conf) throws ConfigurationException { - super.configure(conf); - - String className = conf.getChild("driver").getValue(); - mUrl = conf.getChild("url").getValue(); - mUser = conf.getChild("user").getValue(); - mPassword = conf.getChild("password").getValue(); - mInsUserStmt = conf.getChild("sql-insert").getValue(); - mDelUserStmt = conf.getChild("sql-delete").getValue(); - mSelUserStmt = conf.getChild("sql-select").getValue(); - mGetAllStmt = conf.getChild("sql-all").getValue(); - mUpdUserStmt = conf.getChild("sql-update").getValue(); - - try { - Class.forName(className); - - openDbConnection(); - getLogger().info("Database user manager opened."); - } - catch(Exception ex) { - throw new ConfigurationException("DbUserManager.configure()", ex); - } - } - - /** - * Open connection to database. - */ - private void openDbConnection() throws SQLException { - mDbConnection = DriverManager.getConnection(mUrl, mUser, mPassword); - mDbConnection.setAutoCommit(true); - getLogger().info("Connection opened."); - } - - /** - * Close connection to database. - */ - private void closeDbConnection() { - if (mDbConnection != null) { - try {mDbConnection.close(); } catch(SQLException ex) {} - mDbConnection = null; - } - - getLogger().info("Connection closed."); - } - - /** - * Prepare connection to database. - */ - private void prepareDbConnection() throws SQLException { - boolean closed = false; - try { - if ( (null == mDbConnection) || mDbConnection.isClosed() ) { - closed = true; - } - } - catch ( final SQLException se ) { - closed = true; - } - - if ( closed ) { - closeDbConnection(); - openDbConnection(); - } - } - - /** - * Delete user. Delete the row from the table. - */ - public synchronized void delete(String name) throws SQLException { - HashMap map = new HashMap(); - map.put(User.ATTR_LOGIN, name); - String sql = StringUtils.replaceString(mDelUserStmt, map); - - prepareDbConnection(); - Statement stmt = mDbConnection.createStatement(); - stmt.executeUpdate(sql); - stmt.close(); - } - - - /** - * Save user. If new insert a new row, else update the existing row. - */ - public synchronized void save(User user) throws SQLException { - - // null value check - if(user.getName() == null) { - throw new NullPointerException("User name is null."); - } - - prepareDbConnection(); - - HashMap map = new HashMap(); - map.put(User.ATTR_LOGIN, user.getName()); - map.put(User.ATTR_PASSWORD, getPassword(user)); - map.put(User.ATTR_HOME, user.getVirtualDirectory().getRootDirectory()); - map.put(User.ATTR_ENABLE, String.valueOf(user.getEnabled())); - map.put(User.ATTR_WRITE_PERM, String.valueOf(user.getVirtualDirectory().getWritePermission())); - map.put(User.ATTR_MAX_IDLE_TIME, new Long(user.getMaxIdleTime())); - map.put(User.ATTR_MAX_UPLOAD_RATE, new Integer(user.getMaxUploadRate())); - map.put(User.ATTR_MAX_DOWNLOAD_RATE, new Integer(user.getMaxDownloadRate())); - - String sql = null; - if( !doesExist(user.getName()) ) { - sql = StringUtils.replaceString(mInsUserStmt, map); - } - else { - sql = StringUtils.replaceString(mUpdUserStmt, map); - } - - Statement stmt = mDbConnection.createStatement(); - stmt.executeUpdate(sql); - stmt.close(); - } - - - /** - * Get the user object. Fetch the row from the table. - */ - public synchronized User getUserByName(String name) { - - Statement stmt = null; - ResultSet rs = null; - try { - User thisUser = null; - HashMap map = new HashMap(); - map.put(User.ATTR_LOGIN, name); - String sql = StringUtils.replaceString(mSelUserStmt, map); - - prepareDbConnection(); - stmt = mDbConnection.createStatement(); - rs = stmt.executeQuery(sql); - - if(rs.next()) { - thisUser = new User(); - thisUser.setName(rs.getString(1)); - thisUser.getVirtualDirectory().setRootDirectory(new File(rs.getString(3))); - thisUser.setEnabled(rs.getString(4).equals(Boolean.TRUE.toString())); - thisUser.getVirtualDirectory().setWritePermission(rs.getString(5).equals(Boolean.TRUE.toString())); - thisUser.setMaxIdleTime(rs.getInt(6)); - thisUser.setMaxUploadRate(rs.getInt(7)); - thisUser.setMaxDownloadRate(rs.getInt(8)); - } - return thisUser; - } - catch(Exception ex) { - getLogger().error("DbUserManager.getUserByName()", ex); - } - finally { - if(rs != null) { - try { rs.close(); } catch(Exception ex) {} - } - if(stmt != null) { - try { stmt.close(); } catch(Exception ex) {} - } - } - - return null; - } - - - /** - * User existance check - */ - public synchronized boolean doesExist(String name) { - - boolean bValid = false; - Statement stmt = null; - ResultSet rs = null; - - try { - HashMap map = new HashMap(); - map.put(User.ATTR_LOGIN, name); - String sql = StringUtils.replaceString(mSelUserStmt, map); - - prepareDbConnection(); - stmt = mDbConnection.createStatement(); - rs = stmt.executeQuery(sql); - bValid = rs.next(); - - } - catch(Exception ex) { - bValid = false; - getLogger().error("DbUserManager.doesExist()", ex); - } - finally { - if(rs != null) { - try { rs.close(); } catch(Exception ex) {} - } - if(stmt != null) { - try { stmt.close(); } catch(Exception ex) {} - } - } - - return bValid; - } - - - /** - * Get all user names from the database. - */ - public synchronized List getAllUserNames() { - - ArrayList names = new ArrayList(); - Statement stmt = null; - ResultSet rs = null; - - try { - String sql = mGetAllStmt; - - prepareDbConnection(); - stmt = mDbConnection.createStatement(); - rs = stmt.executeQuery(sql); - while(rs.next()) { - names.add(rs.getString(1)); - } - } - catch(Exception ex) { - getLogger().error("DbUserManager.getAllUserNames()", ex); - } - finally { - if(rs != null) { - try { rs.close(); } catch(Exception ex) {} - } - if(stmt != null) { - try { stmt.close(); } catch(Exception ex) {} - } - } - - return names; - } - - - /** - * Get user password. - *
-     * If the password value is not null
-     *    password = new password
-     * else
-     *   if user does exist
-     *     password = old password
-     *   else
-     *     password = ""
-     * 
- */ - private synchronized String getPassword(User user) throws SQLException { - if (user.getPassword() != null) { - return user.getPassword(); - } - - String password = ""; - HashMap map = new HashMap(); - map.put(User.ATTR_LOGIN, user.getName()); - String sql = StringUtils.replaceString(mSelUserStmt, map); - - prepareDbConnection(); - Statement stmt = mDbConnection.createStatement(); - ResultSet rs = stmt.executeQuery(sql); - if (rs.next()) { - password = rs.getString(2); - } - rs.close(); - stmt.close(); - - if (password == null) { - password = ""; - } - return password; - } - - /** - * User authentication - */ - public synchronized boolean authenticate(String user, String password) { - - String existPassword = null; - - try { - HashMap map = new HashMap(); - map.put(User.ATTR_LOGIN, user); - String sql = StringUtils.replaceString(mSelUserStmt, map); - - prepareDbConnection(); - Statement stmt = mDbConnection.createStatement(); - ResultSet rs = stmt.executeQuery(sql); - if (rs.next()) { - existPassword = rs.getString(2); - } - rs.close(); - stmt.close(); - } - catch(Exception ex) { - getLogger().error("DbUserManager.authenticate()", ex); - return false; - } - - if (existPassword == null) { - existPassword = ""; - } - - return existPassword.equals(password); - } - - - /** - * Close this user manager. Close the database statements and connection. - */ - public synchronized void dispose() { - closeDbConnection(); - } -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/usermanager/LdapUserManager.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/usermanager/LdapUserManager.java deleted file mode 100644 index d2e8186c5..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/usermanager/LdapUserManager.java +++ /dev/null @@ -1,425 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.usermanager; - - -import java.io.File; -import java.util.List; -import java.util.ArrayList; -import java.util.Properties; -import java.util.Collections; -import javax.naming.NamingException; -import javax.naming.Context; -import javax.naming.NamingEnumeration; -import javax.naming.directory.Attribute; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.DirContext; -import javax.naming.directory.InitialDirContext; -import javax.naming.directory.Attributes; -import javax.naming.directory.BasicAttributes; -import javax.naming.directory.SearchResult; -import javax.naming.directory.ModificationItem; - -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.ftpserver.util.StringUtils; - -/** - * Ldap based user manager class. Tested using Netscape Directory Server 4.1. - * The LDAP requires the password to be nonempty for simple authentication. So - * instead of using empty string password (""), we will be using single space (" "). - *
- * The required LDAP attribute types: - *
    - *
  • memberuid
  • - *
  • uid
  • - *
  • cn
  • - *
  • sn
  • - *
  • userpassword
  • - *
  • objectclass
  • - *
  • enableflag (created by ftp-db.ldif file)
  • - *
  • homedirectory
  • - *
  • writepermission (created by ftp-db.ldif file)
  • - *
  • idletime (created by ftp-db.ldif file)
  • - *
  • uploadrate (created by ftp-db.ldif file)
  • - *
  • downloadrate (created by ftp-db.ldif file)
  • - *
- * - * Some of the above mentioned attribute types are created by ftd-db.ldif schema file. - * The schema file also creates an object class called ftpUsers derived from - * inetOrgPerson and have all these attributes.
- * Assumed LDAP objectclass hierarchy:
- *
- *        top
- *         |
- *       person
- *         |
- * organizationalPerson
- *         |
- *    inetOrgPerson
- *         |
- *      ftpUsers
- * 
- * - * @phoenix:block - * @phoenix:service name="org.apache.ftpserver.usermanager.UserManagerInterface" - * - * @author Rana Bhattacharyya - */ -public -class LdapUserManager extends AbstractUserManager { - - - // LDAP attributes - private final static String LOGIN = "memberuid"; - private final static String CN = "cn"; - private final static String SN = "sn"; - private final static String OBJ_CLASS = "objectclass"; - - private final static String[] ALL_ATTRS = { - User.ATTR_LOGIN, - User.ATTR_ENABLE, - User.ATTR_HOME, - User.ATTR_WRITE_PERM, - User.ATTR_MAX_IDLE_TIME, - User.ATTR_MAX_UPLOAD_RATE, - User.ATTR_MAX_DOWNLOAD_RATE - }; - - private final static String[] UID_ATTRS = { - User.ATTR_LOGIN - }; - - - // Currently we are using only one connection. - // So all the methods are synchronized. - private DirContext mAdminContext; - private Properties mAdminEnv; - private String mstRoot; - private String mstDnPrefix; - private String mstDnSuffix; - private Attribute mObjClassAttr; - - - /** - * Default constructor - */ - public LdapUserManager() { - } - - - /** - * Instantiate UserManager implementation. - * Open LDAP connection. - */ - public void configure(Configuration conf) throws ConfigurationException { - super.configure(conf); - - // get ldap parameters - String url = conf.getChild("url").getValue(); - String admin = conf.getChild("admin").getValue(); - String password = conf.getChild("password").getValue(); - String auth = conf.getChild("authentication").getValue(); - - mstRoot = conf.getChild("root").getValue(); - mstDnPrefix = conf.getChild("prefix").getValue(); - mstDnSuffix = conf.getChild("suffix").getValue(); - - try { - mAdminEnv = new Properties(); - mAdminEnv.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); - mAdminEnv.setProperty(Context.PROVIDER_URL, url); - mAdminEnv.setProperty(Context.SECURITY_AUTHENTICATION, auth); - mAdminEnv.setProperty(Context.SECURITY_PRINCIPAL, admin); - mAdminEnv.setProperty(Context.SECURITY_CREDENTIALS, password); - mAdminContext = new InitialDirContext(mAdminEnv); - - - // create objectClass attribute - mObjClassAttr = new BasicAttribute(OBJ_CLASS, false); - mObjClassAttr.add("ftpUsers"); - mObjClassAttr.add("inetOrgPerson"); - mObjClassAttr.add("organizationalPerson"); - mObjClassAttr.add("person"); - mObjClassAttr.add("top"); - - getLogger().info("LDAP user manager opened."); - } - catch(NamingException ex) { - throw new ConfigurationException("LdapUserManager.configure()", ex); - } - } - - - /** - * Get all user names. - */ - public synchronized List getAllUserNames() { - ArrayList allUsers = new ArrayList(); - - try { - Attributes matchAttrs = new BasicAttributes(true); - matchAttrs.put(mObjClassAttr); - NamingEnumeration answers = mAdminContext.search(mstRoot, matchAttrs, UID_ATTRS); - while (answers.hasMore()) { - SearchResult sr = (SearchResult)answers.next(); - String uid = sr.getAttributes().get(User.ATTR_LOGIN).get().toString(); - allUsers.add(uid); - } - } - catch(Exception ex) { - getLogger().error("LdapUserManager.getAllUserNames()", ex); - } - - Collections.sort(allUsers); - return allUsers; - } - - - /** - * Get user object. - */ - public synchronized User getUserByName(String name) { - User user = null; - - try { - String dn = getDN(name); - Attributes attrs = mAdminContext.getAttributes(dn, ALL_ATTRS); - - user = new User(); - user.setName(attrs.get(User.ATTR_LOGIN).get().toString()); - user.getVirtualDirectory().setRootDirectory(new File(attrs.get(User.ATTR_HOME).get().toString())); - user.setEnabled(Boolean.TRUE.toString().equals(attrs.get(User.ATTR_ENABLE).get().toString())); - user.getVirtualDirectory().setWritePermission(Boolean.TRUE.toString().equals(attrs.get(User.ATTR_WRITE_PERM).get().toString())); - user.setMaxIdleTime( Integer.parseInt(attrs.get(User.ATTR_MAX_IDLE_TIME).get().toString()) ); - user.setMaxUploadRate( Integer.parseInt(attrs.get(User.ATTR_MAX_UPLOAD_RATE).get().toString()) ); - user.setMaxDownloadRate( Integer.parseInt(attrs.get(User.ATTR_MAX_DOWNLOAD_RATE).get().toString()) ); - } - catch(Exception ex) { - getLogger().error("LdapUserManager.getUserByName()", ex); - user = null; - } - - return user; - } - - - /** - * User authentication. - */ - public boolean authenticate(String login, String password) { - - // empty password string is not allowed - if (password == null) { - password = " "; - } - if (password.equals("")) { - password = " "; - } - - try { - if( doesExist(login) ) { - Properties userProp = (Properties)mAdminEnv.clone(); - String dn = getDN(login); - userProp.setProperty(Context.SECURITY_PRINCIPAL, dn); - userProp.setProperty(Context.SECURITY_CREDENTIALS, password); - - DirContext userContext = new InitialDirContext(userProp); - userContext.close(); - return true; - } - } - catch(NamingException ex) { - } - return false; - } - - - /** - * Save user - */ - public synchronized void save(User user) throws NamingException { - if (doesExist(user.getName())) { - update(user); - } - else { - add(user); - } - } - - - /** - * Add a new user - */ - private synchronized void add(User user) throws NamingException { - - // empty password is not allowed - if (user.getPassword() == null) { - user.setPassword(" "); - } - if (user.getPassword().equals("")) { - user.setPassword(" "); - } - - String dn = getDN(user.getName()); - - Attributes attrs = new BasicAttributes(true); - attrs.put(new BasicAttribute(LOGIN, user.getName())); - attrs.put(new BasicAttribute(User.ATTR_LOGIN, user.getName())); - attrs.put(new BasicAttribute(CN, user.getName())); - attrs.put(new BasicAttribute(SN, user.getName())); - attrs.put(new BasicAttribute(User.ATTR_PASSWORD, user.getPassword())); - - attrs.put(mObjClassAttr); - - attrs.put(new BasicAttribute(User.ATTR_ENABLE, String.valueOf(user.getEnabled()))); - attrs.put(new BasicAttribute(User.ATTR_HOME, user.getVirtualDirectory().getRootDirectory())); - attrs.put(new BasicAttribute(User.ATTR_WRITE_PERM, String.valueOf(user.getVirtualDirectory().getWritePermission()))); - attrs.put(new BasicAttribute(User.ATTR_MAX_IDLE_TIME, String.valueOf(user.getMaxIdleTime()))); - attrs.put(new BasicAttribute(User.ATTR_MAX_UPLOAD_RATE, String.valueOf(user.getMaxUploadRate()))); - attrs.put(new BasicAttribute(User.ATTR_MAX_DOWNLOAD_RATE, String.valueOf(user.getMaxDownloadRate()))); - - mAdminContext.bind(dn, null, attrs); - } - - - /** - * Update an existing user - */ - private synchronized void update(User user) throws NamingException { - String dn = getDN(user.getName()); - ArrayList mods = new ArrayList(); - - if (user.getPassword() != null) { - if (user.getPassword().equals("")) { - user.setPassword(" "); - } - mods.add(new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute(User.ATTR_PASSWORD, user.getPassword()))); - } - mods.add(new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute(User.ATTR_ENABLE, String.valueOf(user.getEnabled())))); - mods.add(new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute(User.ATTR_HOME, user.getVirtualDirectory().getRootDirectory()))); - mods.add(new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute(User.ATTR_WRITE_PERM, String.valueOf(user.getVirtualDirectory().getWritePermission())))); - mods.add(new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute(User.ATTR_MAX_IDLE_TIME, String.valueOf(user.getMaxIdleTime())))); - mods.add(new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute(User.ATTR_MAX_UPLOAD_RATE, String.valueOf(user.getMaxUploadRate())))); - mods.add(new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute(User.ATTR_MAX_DOWNLOAD_RATE, String.valueOf(user.getMaxDownloadRate())))); - - - ModificationItem modArr[] = new ModificationItem[mods.size()]; - for(int i=0; i", "\\>"); - userName = StringUtils.replaceString(userName, ";", "\\;"); - - return mstDnPrefix + userName + mstDnSuffix; - } - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/usermanager/PropertiesUserManager.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/usermanager/PropertiesUserManager.java deleted file mode 100644 index ec6b7b640..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/usermanager/PropertiesUserManager.java +++ /dev/null @@ -1,327 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.usermanager; - -import java.io.File; -import java.io.IOException; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.util.List; -import java.util.Collections; -import java.util.Enumeration; -import java.util.ArrayList; -import java.util.Iterator; - -import org.apache.avalon.framework.context.Context; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.context.ContextException; - -//import org.apache.avalon.phoenix.BlockContext; - -import org.apache.ftpserver.util.IoUtils; -import org.apache.ftpserver.util.BaseProperties; -import org.apache.ftpserver.util.EncryptUtils; - -/** - * Properties file based UserManager - * implementation. We use user.properties file - * to store user data. - * - * @phoenix:block - * @phoenix:service name="org.apache.ftpserver.usermanager.UserManagerInterface" - * - * @author Rana Bhattacharyya - */ -public class PropertiesUserManager extends AbstractUserManager { - - private static final String PREFIX = "FtpServer.user."; - private static final String USER_PROP = "user.properties"; - - private BaseProperties mUserData; - private File mUserDataFile; - private boolean mbEncrypt; - - private long mlLastModified; - - /** - * Instantiate user manager - default constructor. - * - * @param cfg Ftp config object. - */ - public PropertiesUserManager() throws Exception { - } - - /** - * Set application context - */ - public void contextualize(Context context) throws ContextException { - super.contextualize(context); - } - - /** - * Set configuration - */ - public void configure(Configuration conf) throws ConfigurationException { - super.configure(conf); - mbEncrypt = conf.getChild("encrypt").getValueAsBoolean(false); - - try { - mUserDataFile = new File(getBaseDirectory(), USER_PROP); - mUserDataFile.createNewFile(); - mUserData = new BaseProperties(mUserDataFile); - mlLastModified = mUserDataFile.lastModified(); - getLogger().info("Loaded user data file - " + mUserDataFile); - } - catch(IOException ex) { - getLogger().error(ex.getMessage(), ex); - throw new ConfigurationException(ex.getMessage()); - } - } - - - /** - * Save user data. Store the properties. - */ - public synchronized void save(User usr) throws IOException { - - // null value check - if(usr.getName() == null) { - throw new NullPointerException("User name is null."); - } - String thisPrefix = PREFIX + usr.getName() + '.'; - - // set other properties - mUserData.setProperty(thisPrefix + User.ATTR_PASSWORD, getPassword(usr)); - mUserData.setProperty(thisPrefix + User.ATTR_HOME, usr.getVirtualDirectory().getRootDirectory()); - mUserData.setProperty(thisPrefix + User.ATTR_ENABLE, usr.getEnabled()); - mUserData.setProperty(thisPrefix + User.ATTR_WRITE_PERM, usr.getVirtualDirectory().getWritePermission()); - mUserData.setProperty(thisPrefix + User.ATTR_MAX_IDLE_TIME, usr.getMaxIdleTime()); - mUserData.setProperty(thisPrefix + User.ATTR_MAX_UPLOAD_RATE, usr.getMaxUploadRate()); - mUserData.setProperty(thisPrefix + User.ATTR_MAX_DOWNLOAD_RATE, usr.getMaxDownloadRate()); - - // save user data - FileOutputStream fos = null; - try { - fos = new FileOutputStream(mUserDataFile); - mUserData.store(fos, "Generated file - don't edit (please)"); - mlLastModified = mUserDataFile.lastModified(); - } - finally { - IoUtils.close(fos); - } - } - - - /** - * Delete an user. Removes all this user entries from the properties. - * After removing the corresponding from the properties, save the data. - */ - public synchronized void delete(String usrName) throws IOException { - - // remove entries from properties - String thisPrefix = PREFIX + usrName + '.'; - Enumeration propNames = mUserData.propertyNames(); - ArrayList remKeys = new ArrayList(); - while(propNames.hasMoreElements()) { - String thisKey = propNames.nextElement().toString(); - if(thisKey.startsWith(thisPrefix)) { - remKeys.add(thisKey); - } - } - Iterator remKeysIt = remKeys.iterator(); - while (remKeysIt.hasNext()) { - mUserData.remove(remKeysIt.next().toString()); - } - - // save user data - FileOutputStream fos = null; - try { - fos = new FileOutputStream(mUserDataFile); - mUserData.store(fos, "Generated file - don't edit (please)"); - mlLastModified = mUserDataFile.lastModified(); - } - finally { - IoUtils.close(fos); - } - } - - - /** - * Get user password. Returns the encrypted value. - *
-     * If the password value is not null
-     *    password = new password
-     * else
-     *   if user does exist
-     *     password = old password
-     *   else
-     *     password = ""
-     * 
- */ - private String getPassword(User usr) { - String password = usr.getPassword(); - if (password != null) { - if (mbEncrypt) { - password = EncryptUtils.encryptMD5(password); - } - } - else if ( doesExist(usr.getName()) ) { - String key = PREFIX + usr.getName() + '.' + User.ATTR_PASSWORD; - password = mUserData.getProperty(key, ""); - } - - if (password == null) { - password = ""; - } - - return password; - } - - - /** - * Get all user names. - */ - public synchronized List getAllUserNames() { - - // get all user names - String suffix = '.' + User.ATTR_HOME; - ArrayList ulst = new ArrayList(); - Enumeration allKeys = mUserData.propertyNames(); - while(allKeys.hasMoreElements()) { - String key = (String)allKeys.nextElement(); - if(key.endsWith(suffix)) { - String name = key.substring(PREFIX.length()); - int endIndex = name.length() - suffix.length(); - name = name.substring(0, endIndex); - ulst.add(name); - } - } - - Collections.sort(ulst); - return ulst; - } - - - /** - * Load user data. - */ - public synchronized User getUserByName(String userName) { - - if (!doesExist(userName)) { - return null; - } - - String baseKey = PREFIX + userName + '.'; - User user = new User(); - user.setName(userName); - user.setEnabled(mUserData.getBoolean(baseKey + User.ATTR_ENABLE, true)); - user.getVirtualDirectory().setRootDirectory( mUserData.getFile(baseKey + User.ATTR_HOME, new File("/")) ); - user.getVirtualDirectory().setWritePermission(mUserData.getBoolean(baseKey + User.ATTR_WRITE_PERM, false)); - user.setMaxIdleTime(mUserData.getInteger(baseKey + User.ATTR_MAX_IDLE_TIME, 0)); - user.setMaxUploadRate(mUserData.getInteger(baseKey + User.ATTR_MAX_UPLOAD_RATE, 0)); - user.setMaxDownloadRate(mUserData.getInteger(baseKey + User.ATTR_MAX_DOWNLOAD_RATE, 0)); - return user; - } - - - /** - * User existance check - */ - public synchronized boolean doesExist(String name) { - String key = PREFIX + name + '.' + User.ATTR_HOME; - return mUserData.containsKey(key); - } - - - /** - * User authenticate method - */ - public synchronized boolean authenticate(String user, String password) { - String passVal = mUserData.getProperty(PREFIX + user + '.' + User.ATTR_PASSWORD); - if (mbEncrypt) { - password = EncryptUtils.encryptMD5(password); - } - return password.equals(passVal); - } - - /** - * Reload the user data if necessary - */ - public synchronized void reload() throws Exception { - long lastModified = mUserDataFile.lastModified(); - if (lastModified > mlLastModified) { - FileInputStream fis = new FileInputStream(mUserDataFile); - mUserData.load(fis); - fis.close(); - mlLastModified = lastModified; - getLogger().info("File modified - loading " + mUserDataFile.getAbsolutePath()); - } - } - - /** - * Close the user manager - remove existing entries. - */ - public void dispose() { - getLogger().info("Closing properties user manager..."); - if (mUserData != null) { - mUserData.clear(); - mUserData = null; - } - } -} - diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/usermanager/User.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/usermanager/User.java deleted file mode 100644 index fd8955588..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/usermanager/User.java +++ /dev/null @@ -1,355 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.usermanager; - -import java.io.Serializable; -import java.net.InetAddress; -import java.rmi.server.UID; -import org.apache.ftpserver.util.VirtualDirectory; - -/** - * Generic user class. All the application specific user classes will - * be derived from this. - *
    - *
  • uid
  • - *
  • userpassword
  • - *
  • objectclass
  • - *
  • enableflag
  • - *
  • homedirectory
  • - *
  • writepermission
  • - *
  • idletime
  • - *
  • uploadrate
  • - *
  • downloadrate
  • - *
- * @author Rana Bhattacharyya - */ - -public -class User implements Serializable { - - /** - * uid - */ - public static final String ATTR_LOGIN = "uid"; - - /** - * userpassword - */ - public static final String ATTR_PASSWORD = "userpassword"; - - /** - * homedirectory - */ - public static final String ATTR_HOME = "homedirectory"; - - /** - * writepermission - */ - public static final String ATTR_WRITE_PERM = "writepermission"; - - /** - * enableflag - */ - public static final String ATTR_ENABLE = "enableflag"; - - /** - * idletime - */ - public static final String ATTR_MAX_IDLE_TIME = "idletime"; - - /** - * uploadrate - */ - public static final String ATTR_MAX_UPLOAD_RATE = "uploadrate"; - - /** - * downloadrate - */ - public static final String ATTR_MAX_DOWNLOAD_RATE = "downloadrate"; - - private String mstUserName = null; - private String mstPassword = null; - - private long mlIdleTime = 0; // no limit - private int miUploadRateLimit = 0; // no limit - private int miDownloadRateLimit = 0; // no limit - - private long mlLoginTime = 0; - private long mlLastAccessTime = 0; - - private boolean mbEnabled = true; - - private VirtualDirectory mUserDirectory = null; - private String mstSessionId = null; - private InetAddress mClientAddress = null; - - /** - * Constructor, set session id and default virtual directory object. - */ - public User() { - mUserDirectory = new VirtualDirectory(); - mstSessionId = new UID().toString(); - } - - - /** - * Get the user name. - */ - public String getName() { - return mstUserName; - } - - /** - * Set user name. - */ - public void setName(String name) { - mstUserName = name; - } - - - /** - * Get the user password. - */ - public String getPassword() { - return mstPassword; - } - - /** - * Set user password - */ - public void setPassword(String pass) { - mstPassword = pass; - } - - - /** - * Get the maximum idle time in second. - */ - public int getMaxIdleTime() { - return (int)(mlIdleTime/1000); - } - - /** - * Set the maximum idle time in second. - */ - public void setMaxIdleTime(int idleSec) { - if(idleSec < 0L) { - mlIdleTime = 0L; - } - mlIdleTime = idleSec * 1000L; - } - - - /** - * Get the user enable status. - */ - public boolean getEnabled() { - return mbEnabled; - } - - /** - * Set the user enable status - */ - public void setEnabled(boolean enb) { - mbEnabled = enb; - } - - - /** - * Get maximum user upload rate in bytes/sec. - */ - public int getMaxUploadRate() { - return miUploadRateLimit; - } - - /** - * Set user maximum upload rate limit. - * Less than or equal to zero means no limit. - */ - public void setMaxUploadRate(int rate) { - miUploadRateLimit = rate; - } - - - /** - * Get maximum user download rate in bytes/sec - */ - public int getMaxDownloadRate() { - return miDownloadRateLimit; - } - - /** - * Set user maximum download rate limit. - * Less than or equal to zero means no limit. - */ - public void setMaxDownloadRate(int rate) { - miDownloadRateLimit = rate; - } - - - /** - * Get client address - */ - public InetAddress getClientAddress() { - return mClientAddress; - } - - /** - * Set client address - */ - public void setClientAddress(InetAddress clientAddress) { - mClientAddress = clientAddress; - } - - - /** - * get user filesystem view - */ - public VirtualDirectory getVirtualDirectory() { - return mUserDirectory; - } - - /** - * Get session id. - */ - public String getSessionId() { - return mstSessionId; - } - - /** - * Get user loglin time. - */ - public long getLoginTime() { - return mlLoginTime; - } - - /** - * Get last access time - */ - public long getLastAccessTime() { - return mlLastAccessTime; - } - - /** - * Check the user login status. - */ - public boolean hasLoggedIn() { - return mlLoginTime != 0; - } - - /** - * User login. - */ - public void login() { - mlLoginTime = System.currentTimeMillis(); - mlLastAccessTime = mlLoginTime; - } - - /** - * User logout - */ - public void logout() { - mlLoginTime = 0; - } - - - /** - * Is an active user (is removable)? - * Compares the last access time with the specified time. - */ - public boolean isActive(long currTime) { - boolean bActive = true; - long maxIdleTime = getMaxIdleTime() * 1000; // milliseconds - if(maxIdleTime != 0L) { - long idleTime = currTime - mlLastAccessTime; - bActive = maxIdleTime > idleTime; - } - return bActive; - } - - /** - * Is still active. Compares the last access time with the - * current time. - */ - public boolean isActive() { - return isActive(System.currentTimeMillis()); - } - - /** - * Hit user - update last access time - */ - public void hitUser() { - mlLastAccessTime = System.currentTimeMillis(); - } - - /** - * Equality check. - */ - public boolean equals(Object obj) { - if (obj instanceof User) { - return ((User)obj).mstSessionId.equals(mstSessionId); - } - return false; - } - - /** - * String representation - */ - public String toString() { - return mstUserName; - } -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/usermanager/UserManagerInterface.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/usermanager/UserManagerInterface.java deleted file mode 100644 index 771b5e8d1..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/usermanager/UserManagerInterface.java +++ /dev/null @@ -1,117 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.usermanager; - -import java.util.List; - -/** - * This is user manager interface. All the user manager classes - * implement this interface. If we want to add a new user manager, - * we have to implement this class. - * - * @author Rana Bhattacharyya - */ -public -interface UserManagerInterface { - - String ROLE = UserManagerInterface.class.getName(); - - /** - * Save the user. If a new user, create it else update the - * existing user. - */ - void save(User user) throws Exception; - - /** - * Delete the user from the system. - * - * @param name name of the user to be deleted. - */ - void delete(String userName) throws Exception; - - /** - * Get user by name. - */ - User getUserByName(String name); - - /** - * Get all user names in the system. - */ - List getAllUserNames(); - - /** - * User existance check. - * - * @param name user name - */ - boolean doesExist(String name); - - /** - * Authenticate user - */ - boolean authenticate(String login, String password); - - /** - * Load the user data again - */ - void reload() throws Exception; - - /** - * Get admin user name - */ - String getAdminName(); -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/AsciiOutputStream.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/AsciiOutputStream.java deleted file mode 100644 index d5763bc6b..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/AsciiOutputStream.java +++ /dev/null @@ -1,151 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -import java.io.IOException; -import java.io.OutputStream; - -/** - * Write ASCII data. Before writing it filters the data. - * - * @author Rana Bhattacharyya - */ -public -class AsciiOutputStream extends OutputStream { - - private long mlActualByteWritten = 0; - private boolean mbIgnoreNonAscii = true; - private OutputStream mOutputStream; - - /** - * Constructor. - * @param os java.io.OutputStream to be filtered. - */ - public AsciiOutputStream(OutputStream os) { - mOutputStream = os; - } - - /** - * Write a single byte. - * ASCII characters are defined to be - * the lower half of an eight-bit code set (i.e., the most - * significant bit is zero). Change "\n" to "\r\n". - */ - public void write(int i) throws IOException { - - if (mbIgnoreNonAscii && (i > 0x7F) ) { - return; - } - - if (i == '\r') { - return; - } - if (i == '\n') { - actualWrite('\r'); - } - actualWrite(i); - - } - - /** - * Close stream - */ - public void close() throws IOException { - mOutputStream.close(); - } - - /** - * Flush stream data - */ - public void flush() throws IOException { - mOutputStream.flush(); - } - - /** - * write actual data. - */ - private void actualWrite(int b) throws IOException { - mOutputStream.write(b); - ++mlActualByteWritten; - } - - - /** - * Get actual byte written. - */ - public long getByteWritten() { - return mlActualByteWritten; - } - - /** - * Is non ascii character ignored. - * If true don't write non-ascii character. - * Else first convert it to ascii by ANDing with 0x7F. - */ - public boolean getIsIgnoreNonAscii() { - return mbIgnoreNonAscii; - } - - /** - * Set non-ascii ignore boolean value. - */ - public void setIsIgnoreNonAscii(boolean ig) { - mbIgnoreNonAscii = ig; - } - -} - diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/AsyncMessageQueue.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/AsyncMessageQueue.java deleted file mode 100644 index 39b7e9a39..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/AsyncMessageQueue.java +++ /dev/null @@ -1,148 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -/** - * Simple message queue implementation. - * - * @author Rana Bhattacharyya - */ -public -class AsyncMessageQueue implements Runnable { - - private Queue mMsgQueue; - private boolean mbStopRequest; - private Thread mThread; - - /** - * Constructor - instantiate the queue and start the thread. - */ - public AsyncMessageQueue() { - mMsgQueue = new Queue(true); - mbStopRequest = false; - mThread = new Thread(this); - mThread.start(); - } - - /** - * Add a new message object. - */ - public void add(Message msg) { - if(mbStopRequest) { - throw new IllegalArgumentException("Message queue has been stopped."); - } - mMsgQueue.put(msg); - } - - /** - * Get the number of elements in the queue. - */ - public int size() { - return mMsgQueue.size(); - } - - /** - * Get max size - */ - public int getMaxSize() { - return mMsgQueue.getMaxSize(); - } - - /** - * Set max size - */ - public void setMaxSize(int maxSize) { - mMsgQueue.setMaxSize(maxSize); - } - - /** - * Thread starting point - get message ant execute. - */ - public void run() { - while(!mbStopRequest) { - Message msg = (Message)mMsgQueue.get(); - if(msg == null) { - return; - } - try { - msg.execute(); - } catch(Exception ex) { - ex.printStackTrace(); - } - } - } - - /** - * Stop the message queue. - */ - public void stop() { - mbStopRequest = true; - mMsgQueue.clear(); - if(mThread != null) { - mThread.interrupt(); - mThread = null; - } - } - - /** - * Check whether the message queue is active or not. - */ - public boolean isDisposed() { - return mbStopRequest; - } - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/BaseProperties.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/BaseProperties.java deleted file mode 100644 index fda3e744c..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/BaseProperties.java +++ /dev/null @@ -1,431 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -import java.io.*; -import java.net.*; -import java.util.*; -import java.text.*; - -/** - * This class encapsulates java.util.Properties to - * add java primitives and some other java classes. - * - * @author Rana Bhattacharyya - */ -public -class BaseProperties extends Properties { - - - /** - * Default constructor. - */ - public BaseProperties() { - } - - /** - * Load existing property. - */ - public BaseProperties(Properties prop) { - super(prop); - } - - /** - * Load properties from file - */ - public BaseProperties(File fl) throws IOException { - FileInputStream fis = new FileInputStream(fl); - load(fis); - fis.close(); - } - - /** - * Load properties from InputStream - */ - public BaseProperties(InputStream is) throws IOException { - load(is); - } - - /** - * Get all property key names. - */ - public List getAllKeys() { - Vector keys = new Vector(); - for(Enumeration en = propertyNames(); en.hasMoreElements(); ) { - keys.add(en.nextElement().toString()); - } - return keys; - } - - - ////////////////////////////////////////// - //////// Properties Get Methods //////// - ////////////////////////////////////////// - /** - * Get boolean value. - */ - public boolean getBoolean(String str) throws PropertiesException { - str = getProperty(str); - if (str == null) { - throw new PropertiesException(str + " : not found"); - } - - return str.toLowerCase().equals("true"); - } - - public boolean getBoolean(String str, boolean bol) { - try { - return getBoolean(str); - } catch (PropertiesException ex) { - return bol; - } - } - - - /** - * Get integer value. - */ - public int getInteger(String str) throws PropertiesException { - str = getProperty(str); - if (str == null) { - throw new PropertiesException(str + " : not found"); - } - - try { - return Integer.parseInt(str); - } catch (NumberFormatException ex) { - throw new PropertiesException(ex); - } - } - - public int getInteger(String str, int intVal) { - try { - return getInteger(str); - } catch (PropertiesException ex) { - return intVal; - } - } - - - /** - * Get long value. - */ - public long getLong(String str) throws PropertiesException { - str = getProperty(str); - if (str == null) { - throw new PropertiesException(str + " : not found"); - } - - try { - return Long.parseLong(str); - } catch (NumberFormatException ex) { - throw new PropertiesException(ex); - } - } - - public long getLong(String str, long val) { - try { - return getLong(str); - } catch (PropertiesException ex) { - return val; - } - } - - - /** - * Get double value. - */ - public double getDouble(String str) throws PropertiesException { - str = getProperty(str); - if (str == null) { - throw new PropertiesException(str + " : not found"); - } - - try { - return Double.parseDouble(str); - } catch (NumberFormatException ex) { - throw new PropertiesException(ex); - } - } - - public double getDouble(String str, double doubleVal) { - try { - return getDouble(str); - } catch (PropertiesException ex) { - return doubleVal; - } - } - - /** - * Get InetAddress. - */ - public InetAddress getInetAddress(String str) throws PropertiesException { - str = getProperty(str); - if(str == null) { - throw new PropertiesException(str + " : not found"); - } - - try { - return InetAddress.getByName(str); - } - catch(UnknownHostException ex) { - throw new PropertiesException("Host " + str + " not found"); - } - } - - public InetAddress getInetAddress(String str, InetAddress addr) { - try { - return getInetAddress(str); - } - catch(PropertiesException ex) { - return addr; - } - } - - /** - * Get File object. - */ - public File getFile(String str) throws PropertiesException { - str = getProperty(str); - if (str == null) { - throw new PropertiesException(str + " : not found"); - } - return new File(str); - } - - public File getFile(String str, File fl) { - try { - return getFile(str); - } catch (PropertiesException ex) { - return fl; - } - - } - - - /** - * Get Class object - */ - public Class getClass(String str) throws PropertiesException { - str = getProperty(str); - if (str == null) { - throw new PropertiesException(str + " : not found"); - } - - try { - return Class.forName(str); - } catch (ClassNotFoundException ex) { - throw new PropertiesException(ex); - } - } - - public Class getClass(String str, Class cls) { - try { - return getClass(str); - } catch (PropertiesException ex) { - return cls; - } - } - - - /** - * Get TimeZone - */ - public TimeZone getTimeZone(String str) throws PropertiesException { - str = getProperty(str); - if (str == null) { - throw new PropertiesException(str + " : not found"); - } - return TimeZone.getTimeZone(str); - } - - public TimeZone getTimeZone(String str, TimeZone tz) { - try { - return getTimeZone(str); - } catch (PropertiesException ex) { - return tz; - } - } - - - /** - * Get DateFormat object. - */ - public SimpleDateFormat getDateFormat(String str) throws PropertiesException { - str = getProperty(str); - if (str == null) { - throw new PropertiesException(str + " : not found"); - } - return new SimpleDateFormat(str); - } - - public SimpleDateFormat getDateFormat(String str, SimpleDateFormat fmt) { - try { - return getDateFormat(str); - } catch (PropertiesException ex) { - return fmt; - } - } - - - /** - * Get Date object. - */ - public Date getDate(String str, DateFormat fmt) throws PropertiesException { - str = getProperty(str); - if (str == null) { - throw new PropertiesException(str + " : not found"); - } - - try { - return fmt.parse(str); - } catch (ParseException ex) { - throw new PropertiesException(ex); - } - } - - public Date getDate(String str, DateFormat fmt, Date dt) { - try { - return getDate(str, fmt); - } catch (PropertiesException ex) { - return dt; - } - } - - - ////////////////////////////////////////// - //////// Properties Set Methods //////// - ////////////////////////////////////////// - /** - * Set boolean value. - */ - public void setProperty(String key, boolean val) { - setProperty(key, String.valueOf(val)); - } - - /** - * Set integer value. - */ - public void setProperty(String key, int val) { - setProperty(key, String.valueOf(val)); - } - - - /** - * Set double value. - */ - public void setProperty(String key, double val) { - setProperty(key, String.valueOf(val)); - } - - /** - * Set float value. - */ - public void setProperty(String key, float val) { - setProperty(key, String.valueOf(val)); - } - - /** - * Set long value. - */ - public void setProperty(String key, long val) { - setProperty(key, String.valueOf(val)); - } - - /** - * Set InetAddress. - */ - public void setInetAddress(String key, InetAddress val) { - setProperty(key, val.getHostAddress()); - } - - /** - * Set File object. - */ - public void setProperty(String key, File val) { - setProperty(key, val.getAbsolutePath()); - } - - /** - * Set DateFormat object. - */ - public void setProperty(String key, SimpleDateFormat val) { - setProperty(key, val.toPattern()); - } - - /** - * Set TimeZone object. - */ - public void setProperty(String key, TimeZone val) { - setProperty(key, val.getID()); - } - - /** - * Set Date object. - */ - public void setProperty(String key, Date val, DateFormat fmt) { - setProperty(key, fmt.format(val)); - } - - /** - * Set Class object. - */ - public void setProperty(String key, Class val) { - setProperty(key, val.getName()); - } - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/DateUtils.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/DateUtils.java deleted file mode 100644 index 31168ff8c..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/DateUtils.java +++ /dev/null @@ -1,201 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -import java.util.*; -import java.text.*; - -/** - * This is a timezone conversion utility class. - * - * @author Rana Bhattacharyya - */ - -public class DateUtils { - - private static final String[] MONTHS = { - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" - }; - - // as SimpleDateFormat is not thread-safe - we have to use ThreadLocal - private final static ThreadLocal AFTER_SIX = new ThreadLocal() { - protected Object initialValue() { - return new SimpleDateFormat(" yyyy"); - } - }; - private final static ThreadLocal BEFORE_SIX = new ThreadLocal() { - protected Object initialValue() { - return new SimpleDateFormat("HH:mm"); - } - }; - - - /** - * Get unix style date string. - */ - public static String getUnixDate(Date date) { - long dateTime = date.getTime(); - if (dateTime < 0) { - return "------------"; - } - - Calendar cal = new GregorianCalendar(); - cal.setTime(date); - String firstPart = MONTHS[cal.get(Calendar.MONTH)] + ' '; - - String dateStr = String.valueOf(cal.get(Calendar.DATE)); - if (dateStr.length() == 1) { - dateStr = ' ' + dateStr; - } - firstPart += dateStr + ' '; - - long nowTime = System.currentTimeMillis(); - if ( Math.abs(nowTime - dateTime) > 183L * 24L * 60L * 60L * 1000L) { - DateFormat fmt = (DateFormat)AFTER_SIX.get(); - return firstPart + fmt.format(date); - } - else { - DateFormat fmt = (DateFormat)BEFORE_SIX.get(); - return firstPart + fmt.format(date); - } - } - - /** - * Get the timezone specific string. - */ - public static String getString(Date dt, DateFormat df, TimeZone to) { - df.setTimeZone(to); - return df.format(dt); - } - - /** - * Get the timezone specific calendar. - */ - public static Calendar getCalendar(Date dt, TimeZone to) { - Calendar cal = Calendar.getInstance(to); - cal.setTime(dt); - return cal; - } - - /** - * Get date object. - */ - public static Date getDate(String str, DateFormat df, TimeZone from) - throws java.text.ParseException { - df.setTimeZone(from); - return df.parse(str); - } - - /** - * Get date difference => d1 - d2. - */ - public static String getDifference(Date d1, Date d2) { - Calendar calendar = new GregorianCalendar(); - calendar.setTime(d2); - int year2 = calendar.get(Calendar.YEAR); - int day2 = calendar.get(Calendar.DAY_OF_YEAR); - int hour2 = calendar.get(Calendar.HOUR_OF_DAY); - int min2 = calendar.get(Calendar.MINUTE); - - calendar.setTime(d1); - int year1 = calendar.get(Calendar.YEAR); - int day1 = calendar.get(Calendar.DAY_OF_YEAR); - int hour1 = calendar.get(Calendar.HOUR_OF_DAY); - int min1 = calendar.get(Calendar.MINUTE); - - int leftDays = (day1-day2)+(year1-year2)*365; - int leftHours = hour1-hour2; - int leftMins = min1 - min2; - - if(leftMins < 0) { - leftMins += 60; - --leftHours; - } - if(leftHours < 0) { - leftHours += 24; - --leftDays; - } - - String interval = ""; - if(leftDays > 0) { - interval = leftDays + " Days"; - } - else if((leftHours > 0) && (leftDays == 0)) { - interval = leftHours + " Hours"; - } - else if((leftMins > 0) && (leftHours == 0) && (leftDays == 0)) { - interval = leftMins + " Minutes"; - } - else { - interval = ""; - } - return interval; - } - - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/EncryptUtils.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/EncryptUtils.java deleted file mode 100644 index 2976cc529..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/EncryptUtils.java +++ /dev/null @@ -1,125 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; - -/** - * String encryption utility methods. - * - * @author Rana Bhattacharyya - */ - -public -class EncryptUtils { - - /** - * Encrypt byte array. - */ - public static byte[] encrypt(byte[] source, String algorithm) throws NoSuchAlgorithmException { - MessageDigest md = MessageDigest.getInstance(algorithm); - md.reset(); - md.update(source); - return md.digest(); - } - - /** - * Encrypt string - */ - public static String encrypt(String source, String algorithm) throws NoSuchAlgorithmException { - byte[] resByteArray = encrypt(source.getBytes(), algorithm); - return StringUtils.toHexString(resByteArray); - } - - /** - * Encrypt string using MD5 algorithm - */ - public static String encryptMD5(String source) { - if (source == null) { - source = ""; - } - - String result = ""; - try { - result = encrypt(source, "MD5"); - } - catch(NoSuchAlgorithmException ex) { - ex.printStackTrace(); - } - return result; - } - - /** - * Encrypt string using SHA algorithm - */ - public static String encryptSHA(String source) { - if (source == null) { - source = ""; - } - - String result = ""; - try { - result = encrypt(source, "SHA"); - } - catch(NoSuchAlgorithmException ex) { - ex.printStackTrace(); - } - return result; - } - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/FileRegularFilter.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/FileRegularFilter.java deleted file mode 100644 index 205f1c0dd..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/FileRegularFilter.java +++ /dev/null @@ -1,97 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -import java.io.File; -import java.io.FilenameFilter; -import org.apache.ftpserver.util.RegularExpr; - -/** - * This is regular expression filename filter. - * - * @author Rana Bhattacharyya - */ -public -class FileRegularFilter implements FilenameFilter { - - private RegularExpr mRegularExpr = null; - - /** - * Constructor. - * @param pattern regular expression - */ - public FileRegularFilter(String pattern) { - if ((pattern == null) || pattern.equals("") || pattern.equals("*")) { - mRegularExpr = null; - } - else { - mRegularExpr = new RegularExpr(pattern); - } - } - - /** - * Tests if a specified file should be included in a file list. - * @param dir - the directory in which the file was found - * @param name - the name of the file. - */ - public boolean accept(File dir, String name) { - if (mRegularExpr == null) { - return true; - } - return mRegularExpr.isMatch(name); - } -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/IoUtils.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/IoUtils.java deleted file mode 100644 index 17b8ffc71..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/IoUtils.java +++ /dev/null @@ -1,254 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -import java.io.*; -import java.util.Random; - -/** - * IO utility methods. - * - * @author Rana Bhattacharyya - */ -public -class IoUtils { - - /** - * Random number generator to make unique file name - */ - private static final Random RANDOM_GEN = new Random(System.currentTimeMillis()); - - - /** - * Get a BufferedInputStream. - */ - public static BufferedInputStream getBufferedInputStream(InputStream in) { - BufferedInputStream bin = null; - if(in instanceof java.io.BufferedInputStream) { - bin = (BufferedInputStream)in; - } - else { - bin = new BufferedInputStream(in); - } - return bin; - } - - - /** - * Get a BufferedOutputStream. - */ - public static BufferedOutputStream getBufferedOutputStream(OutputStream out) { - BufferedOutputStream bout = null; - if(out instanceof java.io.BufferedOutputStream) { - bout = (BufferedOutputStream)out; - } - else { - bout = new BufferedOutputStream(out); - } - return bout; - } - - - /** - * Get BufferedReader. - */ - public static BufferedReader getBufferedReader(Reader rd) { - BufferedReader br = null; - if(br instanceof java.io.BufferedReader) { - br = (BufferedReader)rd; - } - else { - br = new BufferedReader(rd); - } - return br; - } - - - /** - * Get BufferedWriter. - */ - public static BufferedWriter getBufferedWriter(Writer wr) { - BufferedWriter bw = null; - if(wr instanceof java.io.BufferedWriter) { - bw = (BufferedWriter)wr; - } - else { - bw = new BufferedWriter(wr); - } - return bw; - } - - - /** - * Get unique file object. - */ - public static File getUniqueFile(File oldFile) { - File newFile = oldFile; - while (true) { - if (!newFile.exists()) { - break; - } - newFile = new File(oldFile.getAbsolutePath() + '.' + Math.abs(RANDOM_GEN.nextLong())); - } - return newFile; - } - - - /** - * No exception InputStream close method. - */ - public static void close(InputStream is) { - if(is != null) { - try { is.close(); } catch(Exception ex) {} - } - } - - /** - * No exception OutputStream close method. - */ - public static void close(OutputStream os) { - if(os != null) { - try { os.close(); } catch(Exception ex) {} - } - } - - /** - * No exception java.io.Reader close method. - */ - public static void close(Reader rd) { - if(rd != null) { - try { rd.close(); } catch(Exception ex) {} - } - } - - - /** - * No exception java.io.Writer close method. - */ - public static void close(Writer wr) { - if(wr != null) { - try { wr.close(); } catch(Exception ex) {} - } - } - - - /** - * Get exception stack trace. - */ - public static String getStackTrace(Throwable ex) { - String result = ""; - try { - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - ex.printStackTrace(pw); - pw.close(); - sw.close(); - result = sw.toString(); - } - catch(Exception e) { - e.printStackTrace(); - } - return result; - } - - - /** - * Copy chars from a Reader to a Writer. - * @param bufferSize Size of internal buffer to use. - */ - public static void copy(Reader input, Writer output, int bufferSize ) throws IOException { - char buffer[] = new char[bufferSize]; - int n = 0; - while( (n=input.read(buffer)) != -1) { - output.write(buffer, 0, n); - } - } - - /** - * Copy chars from a InputStream to a OutputStream. - * @param bufferSize Size of internal buffer to use. - */ - public static void copy(InputStream input, OutputStream output, int bufferSize ) throws IOException { - byte buffer[] = new byte[bufferSize]; - int n = 0; - while( (n=input.read(buffer)) != -1) { - output.write(buffer, 0, n); - } - } - - - /** - * Read fully from reader - */ - public static String readFully(Reader reader) throws IOException { - StringWriter writer = new StringWriter(); - copy(reader, writer, 1024); - return writer.toString(); - } - - - /** - * Read fully from stream - */ - public static String readFully(InputStream input) throws IOException { - StringWriter writer = new StringWriter(); - InputStreamReader reader = new InputStreamReader(input); - copy(reader, writer, 1024); - return writer.toString(); - } - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/Message.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/Message.java deleted file mode 100644 index 4540c4fe1..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/Message.java +++ /dev/null @@ -1,68 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -/** - * Message interface - used in message queue. - * - * @author Rana Bhattacharyya - */ - -public -interface Message { - void execute() throws Exception; -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/PropertiesException.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/PropertiesException.java deleted file mode 100644 index 2b3d74554..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/PropertiesException.java +++ /dev/null @@ -1,73 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -public -class PropertiesException extends Exception { - - public PropertiesException() { - super(); - } - - public PropertiesException(String msg) { - super(msg); - } - - public PropertiesException(Exception ex) { - super(ex.getMessage()); - } -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/Queue.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/Queue.java deleted file mode 100644 index 194c5bb6c..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/Queue.java +++ /dev/null @@ -1,184 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -import java.util.LinkedList; - -/** - * Queue (first in first out) implementation. It supports two types of queues. - *
    - *
  • Queue is empty : throws NoSuchElementException.
  • - *
  • Queue is empty : waits for the new element.
  • - *
- * Null values cannot be inserted. - * - * @author Rana Bhattacharyya - */ - -public -class Queue { - - private LinkedList mList = new LinkedList(); - private boolean mbWait; - private int miMaxSize = 0; - - /** - * Constructor. - * @param bWait - thread will wait or not - */ - public Queue(boolean bWait) { - mbWait = bWait; - } - - - /** - * Try to get the first element. If the list is empty, - * the thread will wait. If interrupted returns null. - */ - public synchronized Object get() { - if(mbWait) { - while(mList.size() == 0) { - try { - wait(); - } - catch(InterruptedException ex) { - return null; - } - } - return mList.removeFirst(); - } - else { - return mList.removeFirst(); - } - } - - /** - * Try to get the first element. If the list is empty, - * the thread will wait. If interrupted returns null. - */ - public synchronized Object get(long waitTimeMillis) { - if(mbWait) { - if(mList.size() == 0) { - try { - wait(waitTimeMillis); - } - catch(InterruptedException ex) { - return null; - } - } - - if(mList.size() == 0) { - return null; - } - else { - return mList.removeFirst(); - } - } - else { - return mList.removeFirst(); - } - } - - /** - * Put an object into the queue and notify the waiting thread. - */ - public synchronized void put(Object obj) { - if(obj == null) { - throw new NullPointerException("Queue element cannot be null"); - } - - if (miMaxSize <= 0 || mList.size() < miMaxSize) { - mList.addLast(obj); - notify(); - } - } - - /** - * Get the number of elements in the queue. - */ - public synchronized int size() { - return mList.size(); - } - - /** - * Get max size - */ - public int getMaxSize() { - return miMaxSize; - } - - /** - * Set max size - */ - public void setMaxSize(int maxSize) { - miMaxSize = maxSize; - } - - /** - * Is the list empty (size == 0) - */ - public synchronized boolean isEmpty() { - return mList.size() == 0; - } - - /** - * Remove all the elements. - */ - public synchronized void clear() { - mList.clear(); - } -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/RegularExpr.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/RegularExpr.java deleted file mode 100644 index c56acaf3f..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/RegularExpr.java +++ /dev/null @@ -1,243 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -/** - * This is a simplified regular character mattching class. - * Supports *?^[]- pattern characters. - * - * @author Rana Bhattacharyya - */ -public -class RegularExpr { - - private char[] mcPattern; - - /** - * Constructor. - * @param pattern regular expression - */ - public RegularExpr(String pattern) { - mcPattern = pattern.toCharArray(); - } - - /** - * Compare string with a regular expression. - */ - public boolean isMatch(String name) { - - // common pattern - * - if( (mcPattern.length == 1) && (mcPattern[0] == '*') ) { - return true; - } - - return isMatch(name.toCharArray(), 0, 0); - } - - - /** - * Is a match? - */ - private boolean isMatch(char[] strName, int strIndex, int patternIndex) { - - while(true) { - - // no more pattern characters - // if no more strName characters - return true - if(patternIndex >= mcPattern.length) { - return strIndex == strName.length; - } - - char pc = mcPattern[patternIndex++]; - switch(pc) { - - // Match a single character in the range - // If no more strName character - return false - case '[' : - - // no more string character - returns false - // example : pattern = ab[^c] and string = ab - if(strIndex >= strName.length) { - return false; - } - - char fc = strName[strIndex++]; - char lastc = 0; - boolean bMatch = false; - boolean bNegete = false; - boolean bFirst = true; - - while(true) { - - // single character match - // no more pattern character - error condition. - if(patternIndex>=mcPattern.length) { - return false; - } - pc = mcPattern[patternIndex++]; - - // end character - break out the loop - // if end bracket is the first character - always a match. - // example pattern - [], [^] - if(pc == ']') { - if (bFirst) { - bMatch = true; - } - break; - } - - // if already matched - just read the rest till we get ']'. - if(bMatch) { - continue; - } - - // if the first character is the negete - // character - inverse the matching condition - if((pc == '^') && bFirst) { - bNegete = true; - continue; - } - bFirst = false; - - // '-' range check - if(pc == '-') { - - // pattern string is [a- error condition. - if(patternIndex>=mcPattern.length) { - return false; - } - - // read the high range character and compare. - pc = mcPattern[patternIndex++]; - bMatch = (fc>=lastc) && (fc<=pc); - lastc = pc; - } - - // Single character match check. It might also be the - // low range character. - else { - lastc = pc; - bMatch = (pc == fc); - } - } - - // no match - return false. - if(bNegete) { - if(bMatch) { - return false; - } - } - else { - if(!bMatch) { - return false; - } - } - break; - - - // * - skip zero or more characters - // No more patern character - return true - // Increment strIndex till the rest of the pattern matches. - case '*' : - - // no more string character remaining - returns true - if(patternIndex >= mcPattern.length) { - return true; - } - - // compare rest of the string - do { - if(isMatch(strName, strIndex++, patternIndex)) { - return true; - } - } - while(strIndex < strName.length); - - // Example pattern is (a*b) and the string is (adfdc). - return false; - - - // ? - skip one character - increment strIndex. - // If no more strName character - return false. - case '?' : - - // already at the end - no more character - returns false - if(strIndex >= strName.length) { - return false; - } - strIndex++; - break; - - - // match character. - default: - - // already at the end - no match - if (strIndex >= strName.length) { - return false; - } - - // the characters are not equal - no match - if(strName[strIndex++] != pc) { - return false; - } - break; - } - } - } - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/StreamConnector.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/StreamConnector.java deleted file mode 100644 index d787bd9ac..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/StreamConnector.java +++ /dev/null @@ -1,301 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -import java.io.InputStream; -import java.io.OutputStream; - -/** - * Connect one java.io.InputStream with a - * java.io.OutputStream. - * - * Features: - *
    - *
  • Buffered transfer or not (default unbuffered).
  • - *
  • Threaded transfer or not (default false).
  • - *
  • Set transfer rate limit (default no limit).
  • - *
  • Stop transfer at any time.
  • - *
  • Get current byte transferred.
  • - *
  • Transfer notification
  • - *
- * @author Rana Bhattacharyya - */ -public -class StreamConnector implements Runnable { - - private InputStream mInStream; - private OutputStream mOutStream; - - private boolean mbThreaded = false; - private boolean mbBuffered = false; - private boolean mbStopRequest = false; - - private int miTransferLimit = 0; - private long mlTransferSize = 0; - - private Exception mExp = null; - private Thread mConThread = null; // stream conneector thread - - private StreamConnectorObserver mObserver = null; - - - /** - * Constructors - * @param in pipe input - * @param out pipe output - */ - public StreamConnector(InputStream in, OutputStream out) { - mInStream = in; - mOutStream = out; - } - - /** - * Set stream connector observer. - */ - public synchronized void setObserver(StreamConnectorObserver obsr) { - mObserver = obsr; - } - - /** - * Set buffered transferred property. - */ - public void setIsBuffered(boolean buf) { - mbBuffered = buf; - } - - /** - * Get is buffered. - */ - public boolean getIsBuffered() { - return mbBuffered; - } - - /** - * Set threaded transfer property. - */ - public void setIsThreaded(boolean thr) { - mbThreaded = thr; - } - - /** - * Is the data transfer threaded? - */ - public boolean getIsThreaded() { - return mbThreaded; - } - - /** - * Get exception. - */ - public Exception getException() { - return mExp; - } - - /** - * Get transferred size in bytes. - */ - public long getTransferredSize() { - return mlTransferSize; - } - - /** - * Get transfer limit in bytes/second. - */ - public int getMaxTransferRate() { - return miTransferLimit; - } - - /** - * Set transfer limit - bytes/second. - */ - public void setMaxTransferRate(int limit) { - miTransferLimit = limit; - } - - /** - * Check exception status. - */ - public boolean hasException() { - return mExp != null; - } - - /** - * Stop data transfer. - */ - public synchronized void stopTransfer() { - mbStopRequest = true; - if(mConThread != null) { - mConThread.interrupt(); - } - IoUtils.close(mInStream); - IoUtils.close(mOutStream); - mConThread = null; - mInStream = null; - mOutStream = null; - } - - /** - * Is stopped? - */ - public boolean isStopped() { - return mbStopRequest; - } - - /** - * Connect two streams. - */ - public void connect() { - - // error test - if(mbStopRequest) { - throw new IllegalStateException("Data already transferred."); - } - if(mConThread != null) { - throw new IllegalStateException("Streams already connected."); - } - - // now connect - if(mbThreaded) { - new Thread(this).start(); - } - else { - run(); - } - } - - - /** - * Transfer data from one stream to another. - */ - public void run() { - long startTime = System.currentTimeMillis(); - mConThread = Thread.currentThread(); - InputStream in = mInStream; - OutputStream out = mOutStream; - byte[] buff = new byte[4096]; - - if(mbBuffered) { - in = IoUtils.getBufferedInputStream(in); - out = IoUtils.getBufferedOutputStream(out); - } - - try { - while(! (mbStopRequest || mConThread.isInterrupted()) ) { - - // check transfer rate - if(miTransferLimit > 0) { - long interval = System.currentTimeMillis() - startTime; - - // prevent "divide by zero" exception - if(interval == 0) { - interval = 1; - } - - int rate = (int)((mlTransferSize*1000)/interval); - if(rate > miTransferLimit) { - try { Thread.sleep(100); } catch(InterruptedException ex) {break;} - continue; - } - } - - // read data - int count = in.read(buff); - if(count == -1) { - break; - } - - // write data - out.write(buff, 0, count); - mlTransferSize += count; - notifyObserver(count); - } - out.flush(); - } - catch(Exception ex) { - mExp = ex; - } - finally { - synchronized (this) { - mbStopRequest = true; - IoUtils.close(in); - IoUtils.close(out); - notifyObserver(-1); - mConThread = null; - } - } - } - - /** - * Notify the observer. - * @param sz bytes transferred - */ - private void notifyObserver(int sz) { - StreamConnectorObserver observer = mObserver; - if(observer != null) { - observer.dataTransferred(sz); - } - } - - /** - * Last defense to stop thread. - */ - protected void finalize() throws Throwable { - stopTransfer(); - super.finalize(); - } - -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/StreamConnectorObserver.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/StreamConnectorObserver.java deleted file mode 100644 index 614018927..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/StreamConnectorObserver.java +++ /dev/null @@ -1,72 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -/** - * This interface observes stream connector activity. - * - * @author Rana Bhattacharyya - */ -public -interface StreamConnectorObserver { - /** - * Data has been transferred. - * - * @size transferred byte size. If finished, it is -1. - */ - void dataTransferred(int size); -} diff --git a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/StringUtils.java b/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/StringUtils.java deleted file mode 100644 index 9796e7b11..000000000 --- a/plexus-servers/plexus-ftpd/src/main/java/org/apache/ftpserver/util/StringUtils.java +++ /dev/null @@ -1,284 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Incubator", "FtpServer", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * $Id$ - */ -package org.apache.ftpserver.util; - -import java.util.Map; - -/** - * String utility methods. - * - * @author Rana Bhattacharyya - */ - -public -class StringUtils { - - private static final char SEPARATOR = '\n'; - - /** - * This is a string replacement method. - */ - public static String replaceString(String source, String oldStr, String newStr) { - StringBuffer sb = new StringBuffer(source.length()); - int sind = 0; - int cind = 0; - while ((cind=source.indexOf(oldStr, sind)) != -1) { - sb.append(source.substring(sind, cind)); - sb.append(newStr); - sind = cind + oldStr.length(); - } - sb.append(source.substring(sind)); - return sb.toString(); - } - - /** - * Replace string - */ - public static String replaceString(String source, Object[] args) { - int startIndex = 0; - int openIndex = source.indexOf('{', startIndex); - if (openIndex == -1) { - return source; - } - - int closeIndex = source.indexOf('}', startIndex); - if( (closeIndex == -1) || (openIndex > closeIndex) ) { - return source; - } - - StringBuffer sb = new StringBuffer(); - sb.append(source.substring(startIndex, openIndex)); - while(true) { - String intStr = source.substring(openIndex+1, closeIndex); - int index = Integer.parseInt(intStr); - sb.append(args[index]); - - startIndex = closeIndex + 1; - openIndex = source.indexOf('{', startIndex); - if (openIndex == -1) { - sb.append(source.substring(startIndex)); - break; - } - - closeIndex = source.indexOf('}', startIndex); - if( (closeIndex == -1) || (openIndex > closeIndex) ) { - sb.append(source.substring(startIndex)); - break; - } - sb.append(source.substring(startIndex, openIndex)); - } - return sb.toString(); - } - - - /** - * Replace string - */ - public static String replaceString(String source, Map args) { - int startIndex = 0; - int openIndex = source.indexOf('{', startIndex); - if (openIndex == -1) { - return source; - } - - int closeIndex = source.indexOf('}', startIndex); - if( (closeIndex == -1) || (openIndex > closeIndex) ) { - return source; - } - - StringBuffer sb = new StringBuffer(); - sb.append(source.substring(startIndex, openIndex)); - while(true) { - String key = source.substring(openIndex+1, closeIndex); - Object val = args.get(key); - if(val != null) { - sb.append(val); - } - - startIndex = closeIndex + 1; - openIndex = source.indexOf('{', startIndex); - if (openIndex == -1) { - sb.append(source.substring(startIndex)); - break; - } - - closeIndex = source.indexOf('}', startIndex); - if( (closeIndex == -1) || (openIndex > closeIndex) ) { - sb.append(source.substring(startIndex)); - break; - } - sb.append(source.substring(startIndex, openIndex)); - } - return sb.toString(); - } - - - /** - * This method is used to insert HTML block dynamically - * - * @param source the HTML code to be processes - * @param bReplaceNl if true '\n' will be replaced by
- * @param bReplaceTag if true '<' will be replaced by < and - * '>' will be replaced by > - * @param bReplaceQuote if true '\"' will be replaced by " - */ - public static String formatHtml(String source, - boolean bReplaceNl, - boolean bReplaceTag, - boolean bReplaceQuote) { - - StringBuffer sb = new StringBuffer(); - int len = source.length(); - for (int i=0; i': - if (bReplaceTag) sb.append(">"); - else sb.append(c); - break; - - case '\n': - if (bReplaceNl) { - if (bReplaceTag) sb.append("<br>"); - else sb.append("
"); - } else { - sb.append(c); - } - break; - - case '\r': - break; - - case '&': - sb.append("&"); - break; - - default: - sb.append(c); - break; - } - } - return sb.toString(); - } - - /** - * Pad string object - */ - public static String pad(String src, - char padChar, - boolean rightPad, - int totalLength) { - - int srcLength = src.length(); - if (srcLength >= totalLength) { - return src; - } - - int padLength = totalLength - srcLength; - StringBuffer sb = new StringBuffer(padLength); - for(int i=0; i> 1; - byte buff[] = new byte[arrLength]; - for(int i=0; i. - * - * $Id$ - */ -package org.apache.ftpserver.util; - -import java.io.File; -import java.io.Writer; -import java.io.IOException; -import java.io.Serializable; -import java.util.Comparator; -import java.util.Arrays; -import java.util.Date; -import java.util.StringTokenizer; - -/** - * This class is responsible to handle all virtual directory activities. - * - * @author Rana Bhattacharyya - */ -public -class VirtualDirectory implements Serializable { - - private static final String NEWLINE = "\r\n"; - private static final String DELIM = " "; - - private String mstRoot = "/"; - private String mstCurrDir = "/"; - - private boolean mbWritePerm = false; - - - /** - * Default constructor does nothing - */ - public VirtualDirectory() { - } - - /** - * Set write permission. - */ - public void setWritePermission(boolean perm) { - mbWritePerm = perm; - } - - /** - * Set root directory. Root directory string will always - * end with '/'. - */ - public void setRootDirectory(File root) { - - if(root == null) { - root = new File("/"); - } - mstRoot = normalizeSeparateChar(root.getAbsolutePath()); - - // if not ends with '/' - add one - if(mstRoot.charAt(mstRoot.length()-1) != '/') { - mstRoot = mstRoot + '/'; - } - mstCurrDir = "/"; - } - - /** - * Set root directory. - */ - public void setRootDirectory(String root) throws IOException { - mstRoot = normalizeSeparateChar(root); - - // if not ends with '/' - add one - if(mstRoot.charAt(mstRoot.length()-1) != '/') { - mstRoot = mstRoot + '/'; - } - mstCurrDir = "/"; - } - - /** - * Get write permission in this system - */ - public boolean getWritePermission() { - return mbWritePerm; - } - - /** - * Get current working directory. - */ - public String getCurrentDirectory() { - return mstCurrDir; - } - - - /** - * Get root directory. - */ - public String getRootDirectory() { - return mstRoot; - } - - - /** - * Get physical name (wrt the machine root). - */ - public String getPhysicalName(String virtualName) { - virtualName = normalizeSeparateChar(virtualName); - return replaceDots(virtualName); - } - - - /** - * Get virtual name (wrt the virtual root). - * The return value will never end with '/' unless it is '/'. - */ - public String getAbsoluteName(String virtualName) { - virtualName = normalizeSeparateChar(virtualName); - String physicalName = replaceDots(virtualName); - - String absoluteName = physicalName.substring(mstRoot.length()-1).trim(); - return removeLastSlash(absoluteName); - } - - - /** - * Get virtual name (wrt the virtual root). The virtual - * name will never end with '/' unless it is '/'. - */ - public String getVirtualName(String physicalName) { - physicalName = normalizeSeparateChar(physicalName); - if (!physicalName.startsWith(mstRoot)) { - return null; - } - - String virtualName = physicalName.substring(mstRoot.length()-1).trim(); - return removeLastSlash(virtualName); - } - - - /** - * Change directory. The current directory will never have '/' - * at the end unless it is '/'. - * @param dirName change the current working directory. - * @return true if success - */ - public boolean changeDirectory(String virtualDir) { - - String physcialDir = getPhysicalName(virtualDir); - if (physcialDir.equals("")) { - physcialDir = "/"; - } - - File dirFl = new File(physcialDir); - if (dirFl.exists() && dirFl.isDirectory()) { - mstCurrDir = physcialDir.substring(mstRoot.length() - 1).trim(); - mstCurrDir = removeLastSlash(mstCurrDir); - return true; - } - - return false; - } - - - /** - * Check read permission. - */ - public boolean hasReadPermission(String fileName, boolean bPhysical) { - if(bPhysical) { - fileName = normalizeSeparateChar(fileName); - } - else { - fileName = getPhysicalName(fileName); - } - - if(!fileName.startsWith(mstRoot)) { - return false; - } - - return new File(fileName).canRead(); - } - - - /** - * Chech file write/delete permission. - */ - public boolean hasWritePermission(String fileName, boolean bPhysical) { - - // no write permission - if(!mbWritePerm) { - return false; - } - - // if virtual name - get the physical name - if(bPhysical) { - fileName = normalizeSeparateChar(fileName); - } - else { - fileName = getPhysicalName(fileName); - } - - if(!fileName.startsWith(mstRoot)) { - return false; - } - - return new File(fileName).canWrite(); - } - - - /** - * Check file create permission. - */ - public boolean hasCreatePermission(String fileName, boolean bPhysical) { - - // no write permission - if(!mbWritePerm) { - return false; - } - - // if virtual name - get the physical name - if(bPhysical) { - fileName = normalizeSeparateChar(fileName); - } - else { - fileName = getPhysicalName(fileName); - } - - return fileName.startsWith(mstRoot); - } - - - /** - * Print file list. Detail listing. - *
-     *   -a : display all (including hidden files)
-     * 
- * @return true if success - */ - public boolean printList(String argument, Writer out) throws IOException { - - FileLister lister = new FileLister(argument); - File[] flLst = lister.getFiles(); - if (flLst == null) { - return false; - } - else { - for(int i=0; i - * -l : detail listing - * -a : display all (including hidden files) - * - * @return true if success - */ - public boolean printNList(String argument, Writer out) throws IOException { - - FileLister lister = new FileLister(argument); - File[] flLst = lister.getFiles(); - if (flLst == null) { - return false; - } - else { - for(int i=0; i initStr.length()) { - return szStr; - } - return initStr.substring(0, initStr.length() - szStr.length()) + szStr; - } - - - /** - * Get last modified date string. - */ - private String getLastModified(File fl) { - long modTime = fl.lastModified(); - Date date = new Date(modTime); - return DateUtils.getUnixDate(date); - } - - - /** - * Get file name. - */ - private String getName(File fl) { - return fl.getName(); - } - - - /** - * Get permission string. - */ - private String getPermission(File fl) { - - StringBuffer sb = new StringBuffer(13); - if(fl.isDirectory()) { - sb.append('d'); - } - else { - sb.append('-'); - } - - if (fl.canRead()) { - sb.append('r'); - } - else { - sb.append('-'); - } - - if (mbWritePerm && fl.canWrite()) { - sb.append('w'); - } - else { - sb.append('-'); - } - sb.append("-------"); - return sb.toString(); - } - - - /** - * Normalize separate characher. Separate character should be '/' always. - */ - private String normalizeSeparateChar(String pathName) { - pathName = pathName.replace(File.separatorChar, '/'); - pathName = pathName.replace('\\', '/'); - return pathName; - } - - - /** - * Replace dots. Returns physical name. - * @param inArg the virtaul name - */ - private String replaceDots(String inArg) { - - // get the starting directory - String resArg; - if(inArg.charAt(0) != '/') { - resArg = mstRoot + mstCurrDir.substring(1); - } - else { - resArg = mstRoot; - } - - // strip last '/' - if(resArg.charAt(resArg.length() -1) == '/') { - resArg = resArg.substring(0, resArg.length()-1); - } - - // replace ., ~ and .. - StringTokenizer st = new StringTokenizer(inArg, "/"); - while(st.hasMoreTokens()) { - - String tok = st.nextToken().trim(); - - // . => current directory - if(tok.equals(".")) { - continue; - } - - // .. => parent directory (if not root) - if(tok.equals("..")) { - if(resArg.startsWith(mstRoot)) { - int slashIndex = resArg.lastIndexOf('/'); - if(slashIndex != -1) { - resArg = resArg.substring(0, slashIndex); - } - } - continue; - } - - // ~ => home directory (in this case /) - if (tok.equals("~")) { - resArg = mstRoot.substring(0, mstRoot.length()-1).trim(); - continue; - } - - resArg = resArg + '/' + tok; - } - - // add last slash if necessary - if( !inArg.equals("") && (inArg.charAt(inArg.length()-1)=='/') ) { - resArg = resArg + '/'; - } - - // final check - if (resArg.length() < mstRoot.length()) { - resArg = mstRoot; - } - - return resArg; - } - - - /** - * Get each directory line. - */ - private void printLine(File fl, Writer out) throws IOException { - out.write(getPermission(fl)); - out.write(DELIM); - out.write(DELIM); - out.write(DELIM); - out.write(getLinkCount(fl)); - out.write(DELIM); - out.write(getOwner(fl)); - out.write(DELIM); - out.write(getGroup(fl)); - out.write(DELIM); - out.write(getLength(fl)); - out.write(DELIM); - out.write(getLastModified(fl)); - out.write(DELIM); - out.write(getName(fl)); - } - - /** - * If the string is not '/', remove last slash. - */ - private String removeLastSlash(String str) { - if ( (str.length()>1) && (str.charAt(str.length()-1)=='/') ) { - str = str.substring(0, str.length()-1); - } - return str; - } - - - - ////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////// - /** - * Inner class to compare files - */ - private class FileComparator implements Comparator { - public int compare(Object o1, Object o2) { - String s1 = ((File)o1).getName(); - String s2 = ((File)o2).getName(); - return s1.compareTo(s2); - } - } - - - ///////////////////////////////////////////////////////////////////// - ///////////////////////////////////////////////////////////////////// - /** - * File lister to list files properly - */ - private class FileLister { - - private File[] files = null; - private boolean bAll = false; - private boolean bDetail = false; - - /** - * Parse arguments - get options and get file list. - */ - public FileLister(String argument) { - String lsDirName = "./"; - String options = ""; - String pattern = "*"; - - // get options, directory name and pattern - if(argument != null) { - argument = argument.trim(); - StringBuffer optionsSb = new StringBuffer(4); - StringTokenizer st = new StringTokenizer(argument, " "); - while(st.hasMoreTokens()) { - String token = st.nextToken(); - if(token.charAt(0) == '-') { - if (token.length() > 1) { - optionsSb.append(token.substring(1)); - } - } - else { - lsDirName = token; - } - } - options = optionsSb.toString(); - } - - // check options - bAll = options.indexOf('a') != -1; - bDetail = options.indexOf('l') != -1; - - // check pattern - lsDirName = getPhysicalName(lsDirName); - File lstDirObj = new File(lsDirName); - if ( !(lstDirObj.exists() && lstDirObj.isDirectory()) ) { - int slashIndex = lsDirName.lastIndexOf('/'); - if( (slashIndex != -1) && (slashIndex != (lsDirName.length() -1)) ) { - pattern = lsDirName.substring(slashIndex+1); - lsDirName = lsDirName.substring(0, slashIndex+1); - } - } - - // check directory - lstDirObj = new File(lsDirName); - if(!lstDirObj.exists()) { - return; - } - if(!lstDirObj.isDirectory()) { - return; - } - - // get file list - if ( (pattern == null) || pattern.equals("*") || pattern.equals("") ) { - files = lstDirObj.listFiles(); - } - else { - files = lstDirObj.listFiles(new FileRegularFilter(pattern)); - } - //Arrays.sort(files, new FileComparator()); - } - - - /** - * Get files - */ - public File[] getFiles() { - return files; - } - - /** - * Display all flag - */ - public boolean isAll() { - return bAll; - } - - /** - * Display detail flag - */ - public boolean isDetail() { - return bDetail; - } - } - -} diff --git a/plexus-servers/plexus-ftpd/src/main/resources/META-INF/plexus/components.xml b/plexus-servers/plexus-ftpd/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index 4e8c2246a..000000000 --- a/plexus-servers/plexus-ftpd/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - org.apache.avalon.framework.component.ComponentManager - org.codehaus.plexus.personality.avalon.AvalonComponentManager - plexus - - - - org.apache.avalon.framework.service.ServiceManager - org.codehaus.plexus.personality.avalon.AvalonServiceManager - plexus - - - - - diff --git a/plexus-servers/plexus-ftpd/src/main/resources/org/apache/ftpserver/FtpStatus.properties b/plexus-servers/plexus-ftpd/src/main/resources/org/apache/ftpserver/FtpStatus.properties deleted file mode 100644 index 32b4c4fa5..000000000 --- a/plexus-servers/plexus-ftpd/src/main/resources/org/apache/ftpserver/FtpStatus.properties +++ /dev/null @@ -1,126 +0,0 @@ -# Ftp server status properties -# Change if necessary -# {CMD} => FTP command -# {ARG} => FTP command argument -# {n} => the n-th element of the passed list - -# Positive Preliminary Replies -FtpServer.status.110=Restart marker reply -FtpServer.status.120=Service ready in {0} minutes -FtpServer.status.125=Data connection already open; transfer starting -FtpServer.status.150=File status okay; about to open data connection - - -# Positive Completion Replies -FtpServer.status.200=Command {CMD} okay - -FtpServer.status.202=Command {CMD} not implemented, superfluous at this site - -FtpServer.status.211=System status, or system help reply -FtpServer.status.211.STAT=FtpServer\nConnected to {0}\nConnected from {1}\nLogged in as {2}\nEnd of status - -FtpServer.status.212=Directory status - -FtpServer.status.213=File status -FtpServer.status.213.SIZE={0} -FtpServer.status.213.MDTM={0} - -FtpServer.status.214=The following commands are implemented.\nABOR APPE CDUP CWD DELE HELP LIST MDTM\nMKD MODE NLST NOOP PASS PASV PORT PWD\nQUIT REST RETR RMD RNFR RNTO SITE SIZE\nSTAT STOR STOU STRU SYST TYPE USER\nEnd of help - -FtpServer.status.214.ABOR=Syntax: ABOR -FtpServer.status.214.APPE=Syntax: APPE -FtpServer.status.214.CDUP=Syntax: CDUP -FtpServer.status.214.CWD=Syntax: CWD -FtpServer.status.214.DELE=Syntax: DELE -FtpServer.status.214.HELP=Syntax: HELP [ ] -FtpServer.status.214.LIST=Syntax: LIST [ ] -FtpServer.status.214.MDTM=Syntax: MDTM -FtpServer.status.214.MKD=Syntax: MKD -FtpServer.status.214.MODE=Syntax: MODE -FtpServer.status.214.NLST=Syntax: NLST [ ] -FtpServer.status.214.NOOP=Syntax: NOOP -FtpServer.status.214.PASS=Syntax: PASS -FtpServer.status.214.PASV=Syntax: PASV -FtpServer.status.214.PORT=Syntax: PORT -FtpServer.status.214.PWD=Syntax: PWD -FtpServer.status.214.QUIT=Syntax: QUIT -FtpServer.status.214.REST=Syntax: RETR -FtpServer.status.214.RETR=Syntax: RETR -FtpServer.status.214.RMD=Syntax: RMD -FtpServer.status.214.RNFR=Syntax: RNFR -FtpServer.status.214.RNTO=Syntax: RNTO -FtpServer.status.214.SITE=Syntax: SITE -FtpServer.status.214.STOR=Syntax: STOR -FtpServer.status.214.STOU=Syntax: STOU -FtpServer.status.214.SYST=Syntax: SYST -FtpServer.status.214.TYPE=Syntax: TYPE -FtpServer.status.214.USER=Syntax: USER - -FtpServer.status.214.UNKNOWN=Unknown command {0} - -FtpServer.status.215=UNIX Type: FtpServer -FtpServer.status.220=Service ready for new user -FtpServer.status.221=Service closing control connection -FtpServer.status.221.QUIT=Goodbye -FtpServer.status.225=Can't open data connection -FtpServer.status.225.ABOR=ABOR command successful -FtpServer.status.226=Closing data connection -FtpServer.status.227.PASV=Entering Passive Mode ({0}) -FtpServer.status.230=User logged in, proceed - -FtpServer.status.250=Requested file action okay, completed -FtpServer.status.250.STOU=Requested file action okay, completed. Generated file: {0} -FtpServer.status.250.CWD=Directory changed to {0} -FtpServer.status.250.CDUP=Directory changed to {0} - -FtpServer.status.257.MKD=\"{0}\" created -FtpServer.status.257.PWD=\"{0}\" is current directory -FtpServer.status.257.PWD=\"{0}\" is current directory -FtpServer.status.257.RMD=\"{0}\" deleted - - -# Positive Intermediate Replies -FtpServer.status.331=User name okay, need password for {ARG} -FtpServer.status.331.ANONYMOUS=Guest login ok, send your complete e-mail address as password - -FtpServer.status.332=Need account for login - -FtpServer.status.350=Requested file action pending further information -FtpServer.status.350.REST=Restarting at {ARG}. Send STORE or RETRIEVE to initiate transfer - - -# Transient Negative Completion Replies -FtpServer.status.421=Service not available, closing control connection -FtpServer.status.425=Can't open data connection -FtpServer.status.426=Connection closed; transfer aborted -FtpServer.status.450=Requested file action not taken -FtpServer.status.451=Requested action aborted. Local error in processing -FtpServer.status.452=Requested action not taken - - -# Permanent Negative Completion Replies -FtpServer.status.500=Syntax error, command {CMD} unrecognized - -FtpServer.status.501=Syntax error in parameters or arguments -FtpServer.status.501.REST=\"{ARG}\" is not a valid argument -FtpServer.status.501.MLST=\"{ARG}\" is not a valid pathname -FtpServer.status.501.MLSD=\"{ARG}\" is not a valid directory - -FtpServer.status.502=Command {CMD} not implemented -FtpServer.status.503=Bad sequence of commands -FtpServer.status.504=Command {CMD} not implemented for that parameter -FtpServer.status.521.MKD=\"{0}\" already exists -FtpServer.status.530=Access denied -FtpServer.status.532=Need account for storing files - -FtpServer.status.550=Requested action not taken -FtpServer.status.550.CDUP=No such directory -FtpServer.status.550.CWD=No such directory -FtpServer.status.550.RETR=File {ARG} unavailable -FtpServer.status.550.APPE=File {ARG} unavailable -FtpServer.status.550.DELE=File {ARG} unavailable -FtpServer.status.550.SIZE=File {ARG} unavailable -FtpServer.status.550.MDTM=File {ARG} unavailable - -FtpServer.status.552=Requested file action aborted -FtpServer.status.553=Requested action not taken diff --git a/plexus-servers/plexus-ftpd/src/test/java/org/apache/ftpserver/FtpServerImplTest.java b/plexus-servers/plexus-ftpd/src/test/java/org/apache/ftpserver/FtpServerImplTest.java deleted file mode 100644 index c56eacfbe..000000000 --- a/plexus-servers/plexus-ftpd/src/test/java/org/apache/ftpserver/FtpServerImplTest.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.apache.ftpserver; - -/* - * LICENSE - */ - -import java.net.URL; - -import org.apache.ftpserver.interfaces.FtpServerInterface; - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.util.IOUtil; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class FtpServerImplTest - extends PlexusTestCase -{ - public void testBasic() - throws Exception - { - FtpServerInterface server = (FtpServerInterface)lookup( FtpServerInterface.ROLE ); - - URL url = new URL( "ftp", "localhost", 10021, "test-file.txt" ); - - String contents = IOUtil.toString( url.openStream() ); - - assertEquals( "Hello World!", contents ); - - release( server ); - } -} diff --git a/plexus-servers/plexus-ftpd/src/test/resources/org/apache/ftpserver/FtpServerImplTest.xml b/plexus-servers/plexus-ftpd/src/test/resources/org/apache/ftpserver/FtpServerImplTest.xml deleted file mode 100644 index cd4e6493f..000000000 --- a/plexus-servers/plexus-ftpd/src/test/resources/org/apache/ftpserver/FtpServerImplTest.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - avalon - - - avalon - Avalon Lifecycle Handler - - - - - - - - - - - - - - - - - - - - - - - - - - - - org.apache.avalon.cornerstone.services.threads.ThreadManager - org.apache.avalon.cornerstone.blocks.threads.DefaultThreadManager - - - default - - 5 - - false - 40 - - 20 - 20 - - - - - - org.apache.avalon.cornerstone.services.connection.ConnectionManager - org.apache.avalon.cornerstone.blocks.connection.DefaultConnectionManager - - - - - org.apache.avalon.cornerstone.services.sockets.SocketManager - org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketManager - - - - - - - - - - - - org.apache.ftpserver.usermanager.UserManagerInterface - org.apache.ftpserver.usermanager.PropertiesUserManager - - ${plexus.home} - - - - - org.apache.ftpserver.ip.IpRestrictorInterface - org.apache.ftpserver.ip.FileIpRestrictor - - ${plexus.home}/../../src/test/resources - - - - - org.apache.ftpserver.interfaces.FtpServerInterface - org.apache.ftpserver.FtpServerImpl - - - localhost - localhost - false - 10021 - ${plexus.home}/../../src/test/resources - - - - diff --git a/plexus-servers/plexus-ftpd/src/test/resources/test-file.txt b/plexus-servers/plexus-ftpd/src/test/resources/test-file.txt deleted file mode 100644 index c57eff55e..000000000 --- a/plexus-servers/plexus-ftpd/src/test/resources/test-file.txt +++ /dev/null @@ -1 +0,0 @@ -Hello World! \ No newline at end of file diff --git a/plexus-servers/plexus-server-apacheds/pom.xml b/plexus-servers/plexus-server-apacheds/pom.xml deleted file mode 100644 index 964e449f7..000000000 --- a/plexus-servers/plexus-server-apacheds/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - 4.0.0 - - plexus-servers - org.codehaus.plexus - 1.0.3 - - plexus - plexus-server-apacheds - 0.9-SNAPSHOT - Plexus Apached Server - - - plexus - plexus-appserver - 1.0-alpha-1-SNAPSHOT - - - incubator-directory - apacheds-core - 0.9-SNAPSHOT - - - diff --git a/plexus-servers/plexus-server-apacheds/src/main/java/org/codehaus/plexus/server/apacheds/ApacheDS.java b/plexus-servers/plexus-server-apacheds/src/main/java/org/codehaus/plexus/server/apacheds/ApacheDS.java deleted file mode 100644 index fa4da297e..000000000 --- a/plexus-servers/plexus-server-apacheds/src/main/java/org/codehaus/plexus/server/apacheds/ApacheDS.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.codehaus.plexus.server.apacheds; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public interface ApacheDS -{ - String ROLE = ApacheDS.class.getName(); -} diff --git a/plexus-servers/plexus-server-apacheds/src/main/java/org/codehaus/plexus/server/apacheds/DefaultApacheDS.java b/plexus-servers/plexus-server-apacheds/src/main/java/org/codehaus/plexus/server/apacheds/DefaultApacheDS.java deleted file mode 100644 index 445a8135d..000000000 --- a/plexus-servers/plexus-server-apacheds/src/main/java/org/codehaus/plexus/server/apacheds/DefaultApacheDS.java +++ /dev/null @@ -1,299 +0,0 @@ -package org.codehaus.plexus.server.apacheds; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.util.Iterator; -import java.util.List; -import java.util.Properties; -import java.util.TreeMap; -import java.util.Map; - -import javax.naming.Context; -import javax.naming.directory.InitialDirContext; - -import org.apache.ldap.server.jndi.EnvKeys; - -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable; -import org.codehaus.plexus.util.StringUtils; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class DefaultApacheDS - extends AbstractLogEnabled - implements ApacheDS, Initializable, Startable -{ - // ---------------------------------------------------------------------- - // Configuration - // ---------------------------------------------------------------------- - - /** - * @configuration - */ - private String providerUrl; - - /** - * @configuration - */ - private String principal; - - /** - * @configuration - */ - private String credentials; - - /** - * @configuration - */ - private String workingDirectory; - - /** - * @configuration - */ - private String disableAnonymous; - - /** - * @configuration - */ - private int port; - - /** - * @configuration - */ - private int sslPort; - - /** - * @configuration - */ - private List partitions; - - /** - * @configuration - */ - private List schemas; - - /** - * @configuration - */ - private Properties extraProperties; - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - private Properties serverProperties; - - private InitialDirContext rootContext; - - // ---------------------------------------------------------------------- - // Component Lifecycle - // ---------------------------------------------------------------------- - - public void initialize() - throws Exception - { - serverProperties = new Properties( extraProperties ); - - setProperty( Context.INITIAL_CONTEXT_FACTORY, "org.apache.ldap.server.jndi.ServerContextFactory" ); - - setProperty( Context.PROVIDER_URL, providerUrl ); - - setProperty( Context.SECURITY_PRINCIPAL, principal ); - - setProperty( Context.SECURITY_CREDENTIALS, credentials ); - - setProperty( EnvKeys.WKDIR, workingDirectory ); - - setProperty( EnvKeys.DISABLE_ANONYMOUS, disableAnonymous ); - - if ( port != 0 ) - { - getLogger().info( "Apache DS will be listening on port " + port ); - - setProperty( EnvKeys.LDAP_PORT, Integer.toString( port ) ); - } - - if ( sslPort != 0 ) - { - getLogger().info( "Apache DS will be listening on SSL port " + sslPort ); - - setProperty( EnvKeys.LDAPS_PORT, Integer.toString( sslPort ) ); - } - - // ---------------------------------------------------------------------- - // Partitions - // ---------------------------------------------------------------------- - - String partitionsString = ""; - - for ( Iterator it = partitions.iterator(); it.hasNext(); ) - { - Partition partition = (Partition) it.next(); - - // ---------------------------------------------------------------------- - // Partition name - // ---------------------------------------------------------------------- - - String name = partition.getName(); - - if ( StringUtils.isEmpty( name ) ) - { - throw new Exception( "Error in configuration: Missing or empty element 'name' for partition." ); - } - - partitionsString += name + " "; - - // ---------------------------------------------------------------------- - // Suffix - // ---------------------------------------------------------------------- - - String suffix = partition.getSuffix(); - - if ( StringUtils.isEmpty( suffix ) ) - { - throw new Exception( "Error in configuration: Missing or empty element 'suffix' for partition '" + name + "'." ); - } - - setProperty( EnvKeys.SUFFIX + name, suffix ); - - // ---------------------------------------------------------------------- - // Object classes - // ---------------------------------------------------------------------- - - List objectClasses = partition.getObjectClasses(); - - if ( objectClasses.size() == 0 ) - { - getLogger().warn( "No object classes configured for partition: '" + name + "'." ); - } - - String objectClassesString = ""; - - for ( Iterator it2 = objectClasses.iterator(); it2.hasNext(); ) - { - String objectClass = (String) it2.next(); - - if ( StringUtils.isEmpty( objectClass ) ) - { - throw new Exception( "Error in configuration: Missing or empty element 'objectClass' for partition '" + name + "'." ); - } - - objectClassesString += objectClass + " "; - } - - setProperty( EnvKeys.ATTRIBUTES + name + ".objectClass", objectClassesString ); - - // ---------------------------------------------------------------------- - // Indices classes - // ---------------------------------------------------------------------- - - List indices = partition.getIndices(); - - String indicesString = ""; - - for ( Iterator it2 = indices.iterator(); it2.hasNext(); ) - { - String index = (String) it2.next(); - - if ( StringUtils.isEmpty( index ) ) - { - throw new Exception( "Error in configuration: Missing or empty element 'index' for partition '" + name + "'." ); - } - - indicesString += index + " "; - } - - setProperty( EnvKeys.INDICES + name, indicesString ); - } - - setProperty( EnvKeys.PARTITIONS, partitionsString ); - - // ---------------------------------------------------------------------- - // Schemas - // ---------------------------------------------------------------------- - - String schemasString = ""; - - for ( Iterator it = schemas.iterator(); it.hasNext(); ) - { - String schema = (String) it.next(); - - schemasString += schema + " "; - } - - setProperty( EnvKeys.SCHEMAS, schemasString ); - - // Dump the configuration -// for ( Iterator it = new TreeMap( serverProperties ).entrySet().iterator(); it.hasNext(); ) -// { -// Map.Entry entry = (Map.Entry) it.next(); -// -// System.err.println( entry.getKey() + "=" + entry.getValue() ); -// } - } - - public void start() - throws Exception - { - getLogger().info( "Starting the Apache Directory Server." ); - - rootContext = new InitialDirContext( serverProperties ); - } - - public void stop() - throws Exception - { - getLogger().info( "Stopping the Apache Directory Server." ); - - Properties shutdownProperties = new Properties(); - - shutdownProperties.setProperty( EnvKeys.SHUTDOWN, "" ); - - new InitialDirContext( shutdownProperties ); - - // Loose the reference to the main context to it can be GCed - - rootContext = null; - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - private void setProperty( String key, String value ) - { - String oldValue = serverProperties.getProperty( key ); - - if ( !StringUtils.isEmpty( oldValue ) ) - { - getLogger().warn( "Extra property will be overridden: '" + key + "'." ); - } - - serverProperties.setProperty( key, value ); - } -} diff --git a/plexus-servers/plexus-server-apacheds/src/main/java/org/codehaus/plexus/server/apacheds/Partition.java b/plexus-servers/plexus-server-apacheds/src/main/java/org/codehaus/plexus/server/apacheds/Partition.java deleted file mode 100644 index f67b7c5e9..000000000 --- a/plexus-servers/plexus-server-apacheds/src/main/java/org/codehaus/plexus/server/apacheds/Partition.java +++ /dev/null @@ -1,66 +0,0 @@ -package org.codehaus.plexus.server.apacheds; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.util.List; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class Partition -{ - private String name; - - private String suffix; - - private List indices; - - private List objectClasses; - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - public String getName() - { - return name; - } - - public String getSuffix() - { - return suffix; - } - - public List getIndices() - { - return indices; - } - - public List getObjectClasses() - { - return objectClasses; - } -} diff --git a/plexus-servers/plexus-server-apacheds/src/main/resources/META-INF/plexus/components.xml b/plexus-servers/plexus-server-apacheds/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index 1064cca28..000000000 --- a/plexus-servers/plexus-server-apacheds/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - org.codehaus.plexus.server.apacheds.ApacheDS - org.codehaus.plexus.server.apacheds.DefaultApacheDS - - ou=system - uid=admin,ou=system - secret - ${plexus.home}/apacheds - false - 10389 - 10636 - - - test - dc=test,dc=org - - ou - uid - objectClass - - - top - domain - person - extensibleObject - - - - - org.apache.ldap.server.schema.bootstrap.AutofsSchema - org.apache.ldap.server.schema.bootstrap.CorbaSchema - org.apache.ldap.server.schema.bootstrap.CoreSchema - org.apache.ldap.server.schema.bootstrap.CosineSchema - org.apache.ldap.server.schema.bootstrap.ApacheSchema - org.apache.ldap.server.schema.bootstrap.InetorgpersonSchema - org.apache.ldap.server.schema.bootstrap.JavaSchema - org.apache.ldap.server.schema.bootstrap.Krb5kdcSchema - org.apache.ldap.server.schema.bootstrap.NisSchema - org.apache.ldap.server.schema.bootstrap.ScheduleworldSchema - org.apache.ldap.server.schema.bootstrap.SystemSchema - - - - - - - - diff --git a/plexus-servers/plexus-server-apacheds/src/test/java/org/codehaus/plexus/server/apacheds/DefaultApacheDSTest.java b/plexus-servers/plexus-server-apacheds/src/test/java/org/codehaus/plexus/server/apacheds/DefaultApacheDSTest.java deleted file mode 100644 index 69b445f44..000000000 --- a/plexus-servers/plexus-server-apacheds/src/test/java/org/codehaus/plexus/server/apacheds/DefaultApacheDSTest.java +++ /dev/null @@ -1,175 +0,0 @@ -package org.codehaus.plexus.server.apacheds; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.io.File; -import java.util.Hashtable; - -import javax.naming.Context; -import javax.naming.directory.InitialDirContext; - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.util.FileUtils; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class DefaultApacheDSTest - extends PlexusTestCase -{ - private String baseDN = "dc=test,dc=org"; - - private Hashtable enviroment; - - private String bindDn = null; - - private String password = null; - - private static PersonObjectFactory object = new PersonObjectFactory(); - - private static PersonStateFactory state = new PersonStateFactory(); - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - protected void setUp() - throws Exception - { - super.setUp(); - - // ---------------------------------------------------------------------- - // Create a enviroment - // ---------------------------------------------------------------------- - - enviroment = new Hashtable(); - - enviroment.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" ); - - enviroment.put( Context.PROVIDER_URL, "ldap://localhost:10389/" ); - - enviroment.put( Context.SECURITY_AUTHENTICATION, "simple" ); - - if ( bindDn != null ) - { - enviroment.put( Context.SECURITY_PRINCIPAL, bindDn ); - } - - if ( password != null ) - { - enviroment.put( Context.SECURITY_CREDENTIALS, password ); - } - - enviroment.put( Context.OBJECT_FACTORIES, new PersonObjectFactory().getClass().getName() ); - - enviroment.put( Context.STATE_FACTORIES, new PersonStateFactory().getClass().getName() ); - - // ---------------------------------------------------------------------- - // Clean out the store for ApacheDS - // ---------------------------------------------------------------------- - - File store = new File( getContainer().getContext().get( "plexus.home" ).toString(), "apacheds" ); - - if ( store.isDirectory() ) - { - FileUtils.deleteDirectory( store ); - } - - assertTrue( store.mkdirs() ); - } - - protected void tearDown() - throws Exception - { - super.tearDown(); - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - public void testFoo() - throws Exception - { - DefaultApacheDS server; - - // this will start the server - server = (DefaultApacheDS) lookup( DefaultApacheDS.ROLE ); - - // ---------------------------------------------------------------------- - // Adding a Person - // ---------------------------------------------------------------------- - - String uid = "rodriguez"; - - Person expectedPerson = new Person( "Rodriguez", "Mr. Kerberos", "noices", "555-1212", "erodriguez", "committer" ); - - System.err.println( "Adding" ); - Context context = new InitialDirContext( enviroment ); - - context.bind( "uid=" + uid + "," + baseDN, expectedPerson ); - - context.close(); - System.err.println( "added" ); - - // ---------------------------------------------------------------------- - // Querying for the Person - // ---------------------------------------------------------------------- - - System.err.println( "quering" ); - context = new InitialDirContext( enviroment ); - - Object object = context.lookup( "uid=" + uid + "," + baseDN ); - - context.close(); - System.err.println( "queried" ); - - assertNotNull( "Lookup on uid='" + uid + "', returned null." ); - - assertEquals( "The returned object was of the wrong type", Person.class, object.getClass() ); - - Person actualPerson = (Person) object; - - // ---------------------------------------------------------------------- - // Assert the Person - // ---------------------------------------------------------------------- - - assertEquals( expectedPerson.getLastname(), actualPerson.getLastname() ); - - assertEquals( expectedPerson.getCn(), actualPerson.getCn() ); - - assertEquals( expectedPerson.getPassword(), actualPerson.getPassword() ); - - assertEquals( expectedPerson.getTelephoneNumber(), actualPerson.getTelephoneNumber() ); - - assertEquals( expectedPerson.getSeealso(), actualPerson.getSeealso() ); - - assertEquals( expectedPerson.getDescription(), actualPerson.getDescription() ); - - // this will stop the server - release( server ); - } -} diff --git a/plexus-servers/plexus-server-apacheds/src/test/java/org/codehaus/plexus/server/apacheds/Person.java b/plexus-servers/plexus-server-apacheds/src/test/java/org/codehaus/plexus/server/apacheds/Person.java deleted file mode 100644 index 987f17ac6..000000000 --- a/plexus-servers/plexus-server-apacheds/src/test/java/org/codehaus/plexus/server/apacheds/Person.java +++ /dev/null @@ -1,74 +0,0 @@ -package org.codehaus.plexus.server.apacheds; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class Person -{ - private String sn, cn, pwd, tele, seealso, desc; - - public Person( String sn, String cn, String pwd, String tele, String seealso, String desc ) - { - this.sn = sn; - this.cn = cn; - this.pwd = pwd; - this.tele = tele; - this.seealso = seealso; - this.desc = desc; - } - - public String getLastname() - { - return sn; - } - - public String getCn() - { - return cn; - } - - public String getPassword() - { - return pwd; - } - - public String getTelephoneNumber() - { - return tele; - } - - public String getSeealso() - { - return seealso; - } - - public String getDescription() - { - return desc; - } -} \ No newline at end of file diff --git a/plexus-servers/plexus-server-apacheds/src/test/java/org/codehaus/plexus/server/apacheds/PersonObjectFactory.java b/plexus-servers/plexus-server-apacheds/src/test/java/org/codehaus/plexus/server/apacheds/PersonObjectFactory.java deleted file mode 100644 index dc000e307..000000000 --- a/plexus-servers/plexus-server-apacheds/src/test/java/org/codehaus/plexus/server/apacheds/PersonObjectFactory.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.codehaus.plexus.server.apacheds; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.util.Hashtable; - -import javax.naming.Context; -import javax.naming.Name; -import javax.naming.directory.Attribute; -import javax.naming.directory.Attributes; -import javax.naming.spi.DirObjectFactory; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class PersonObjectFactory - implements DirObjectFactory -{ - public Object getObjectInstance( Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs ) - throws Exception - { - // Only interested in Attributes with "person" objectclass - // System.out.println("object factory: " + attrs); - Attribute oc = ( attrs != null ? attrs.get( "objectclass" ) : null ); - - if ( oc == null && !oc.contains( "person" ) ) - { - return null; - } - - // Extract the password - Attribute attr = attrs.get( "userPassword" ); - - String passwd = null; - - if ( attr != null ) - { - Object pw = attr.get(); - - if ( pw instanceof String ) - { - passwd = (String) pw; - } - else - { - passwd = new String( (byte[]) pw ); - } - } - - Person person = new Person( (String) attrs.get( "sn" ).get(), - (String) attrs.get( "cn" ).get(), - passwd, - ( attr = attrs.get( "telephoneNumber" ) ) != null ? (String) attr.get() : null, - ( attr = attrs.get( "seealso" ) ) != null ? (String) attr.get() : null, - ( attr = attrs.get( "description" ) ) != null ? (String) attr.get() : null ); - return person; - } - - public Object getObjectInstance( Object obj, Name name, Context nameCtx, Hashtable environment ) - throws Exception - { - throw new UnsupportedOperationException( "Please use directory support overload with Attributes argument." ); - } -} diff --git a/plexus-servers/plexus-server-apacheds/src/test/java/org/codehaus/plexus/server/apacheds/PersonStateFactory.java b/plexus-servers/plexus-server-apacheds/src/test/java/org/codehaus/plexus/server/apacheds/PersonStateFactory.java deleted file mode 100644 index 4a6df964a..000000000 --- a/plexus-servers/plexus-server-apacheds/src/test/java/org/codehaus/plexus/server/apacheds/PersonStateFactory.java +++ /dev/null @@ -1,123 +0,0 @@ -package org.codehaus.plexus.server.apacheds; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.util.Hashtable; - -import javax.naming.Context; -import javax.naming.Name; -import javax.naming.NamingException; -import javax.naming.directory.Attributes; -import javax.naming.directory.BasicAttributes; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.SchemaViolationException; -import javax.naming.spi.DirStateFactory; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class PersonStateFactory - implements DirStateFactory -{ - public DirStateFactory.Result getStateToBind( Object obj, Name name, Context nameCtx, Hashtable environment, Attributes inAttrs ) - throws NamingException - { - // Only interested in Person objects - if ( obj instanceof Person ) - { - - Attributes outAttrs; - - if ( inAttrs == null ) - { - outAttrs = new BasicAttributes( true ); - } - else - { - outAttrs = (Attributes) inAttrs.clone(); - } - - // Set up object class - if ( outAttrs.get( "objectclass" ) == null ) - { - BasicAttribute oc = new BasicAttribute( "objectclass", "person" ); - - oc.add( "top" ); - - outAttrs.put( oc ); - } - - Person per = (Person) obj; - - // mandatory attributes - if ( per.getLastname() != null ) - { - outAttrs.put( "sn", per.getLastname() ); - } - else - { - throw new SchemaViolationException( "Person must have surname" ); - } - - if ( per.getCn() != null ) - { - outAttrs.put( "cn", per.getCn() ); - } - else - { - throw new SchemaViolationException( "Person must have common name" ); - } - - // optional attributes - if ( per.getPassword() != null ) - { - outAttrs.put( "userPassword", per.getPassword() ); - } - if ( per.getTelephoneNumber() != null ) - { - outAttrs.put( "telephoneNumber", per.getTelephoneNumber() ); - } - if ( per.getSeealso() != null ) - { - outAttrs.put( "seeAlso", per.getSeealso() ); - } - if ( per.getDescription() != null ) - { - outAttrs.put( "description", per.getDescription() ); - } - - return new DirStateFactory.Result( null, outAttrs ); - } - - return null; - } - - public Object getStateToBind( Object obj, Name name, Context nameCtx, Hashtable environment ) - throws NamingException - { - throw new UnsupportedOperationException( "Please use directory support overload with Attributes argument." ); - } -} diff --git a/plexus-servers/pom.xml b/plexus-servers/pom.xml deleted file mode 100644 index baa0dd50a..000000000 --- a/plexus-servers/pom.xml +++ /dev/null @@ -1,23 +0,0 @@ - - 4.0.0 - - plexus - org.codehaus.plexus - 1.0.5 - - plexus-servers - 1.0.3 - pom - Plexus Servers Parent Project - - - plexus - plexus-container-default - 1.0-alpha-9 - - - - plexus-ftpd - plexus-server-apacheds - - diff --git a/plexus-servers/popd/LICENSE.txt b/plexus-servers/popd/LICENSE.txt deleted file mode 100644 index 62ee735f4..000000000 --- a/plexus-servers/popd/LICENSE.txt +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Eric Daugherty nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/plexus-servers/popd/maven.xml b/plexus-servers/popd/maven.xml deleted file mode 100644 index cbf7877d0..000000000 --- a/plexus-servers/popd/maven.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plexus-servers/popd/project.properties b/plexus-servers/popd/project.properties deleted file mode 100644 index 482a37c02..000000000 --- a/plexus-servers/popd/project.properties +++ /dev/null @@ -1,8 +0,0 @@ -# Display the date on the web site -maven.xdoc.date = left - -# Display the version the web site is documenting -maven.xdoc.version = ${pom.currentVersion} - -# Define the repository for dependencies -maven.repo.remote = http://www.ibiblio.org/maven,http://www.ericdaugherty.com/maven \ No newline at end of file diff --git a/plexus-servers/popd/project.xml b/plexus-servers/popd/project.xml deleted file mode 100644 index a60b9f751..000000000 --- a/plexus-servers/popd/project.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - ${maven.repo.local}/plexus/poms/plexus-server-1.0.pom - plexus-popd - plexus-popd - Java Email Server Core - POP3 - 2.0-alpha-2 - - - - - Eric Daugherty - edaugherty - java@ericdaugherty.com - - http://www.ericdaugherty.com - - - - - - - - Siegfried Goeschl - siegfried.goeschl@it20one.at - - - - - - - - dnsjava - dnsjava - 1.3.2 - - - - - diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/dns/DNSJavaResolver.java b/plexus-servers/popd/src/java/org/codehaus/plexus/dns/DNSJavaResolver.java deleted file mode 100644 index 7b9925dd6..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/dns/DNSJavaResolver.java +++ /dev/null @@ -1,91 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.dns; - -import org.xbill.DNS.MXRecord; -import org.xbill.DNS.Record; -import org.xbill.DNS.Type; -import org.xbill.DNS.dns; - -import java.util.ArrayList; -import java.util.Collection; - -/** - * Uses the DnsJava Library to resolve MX entries. - * - * @author Eric Daugherty - */ -public class DNSJavaResolver - implements DNSResolver -{ - - /** - * Returns a collection of Strings that contain - * the addresses of the SMTP Servers for the specified domain. - * - * @param domain the domain to query. - * @return Collection of addresses as Strings. - */ - public Collection getMXEntries( String domain ) - { - //TODO: Sort Entries. Update DnsJava Code. Are these Old APIS? - - ArrayList addresses = new ArrayList(); - - Record[] records = dns.getRecords( domain, Type.MX ); - - //Just return an empty collection if no domains were found. - if ( records == null ) - { - return addresses; - } - - int numEntries = records.length; - MXRecord record; - for ( int index = 0; index < numEntries; index++ ) - { - record = (MXRecord) records[index]; - addresses.add( record.getTarget().toString() ); - } - - return addresses; - } -} diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/dns/DNSResolver.java b/plexus-servers/popd/src/java/org/codehaus/plexus/dns/DNSResolver.java deleted file mode 100644 index 13f5593aa..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/dns/DNSResolver.java +++ /dev/null @@ -1,63 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.dns; - -import java.util.Collection; - -/** - * Provides access to DNS information. - * - * @author Eric Daugherty - */ -public interface DNSResolver -{ - /** Role of this component. */ - public static String ROLE = DNSResolver.class.getName(); - - /** - * Returns a collection of Strings that contain - * the addresses of the SMTP Servers for the specified domain. - * - * @param domain the domain to query. - * @return Collection of addresses as Strings. - */ - Collection getMXEntries( String domain ); -} diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/pop3/DefaultPop3Server.java b/plexus-servers/popd/src/java/org/codehaus/plexus/pop3/DefaultPop3Server.java deleted file mode 100644 index ee1137c8f..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/pop3/DefaultPop3Server.java +++ /dev/null @@ -1,955 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.pop3; - -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.service.Serviceable; -import org.codehaus.plexus.smtp.mailbox.Mailbox; -import org.codehaus.plexus.smtp.mailbox.MailboxManager; -import org.codehaus.plexus.smtp.server.AbstractServer; -import org.codehaus.plexus.smtp.server.connection.ConnectionHandler; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.Reader; -import java.lang.reflect.Field; -import java.net.InetAddress; -import java.text.MessageFormat; - -/** - * Manages the interaction between the server plugins and the - * POP3 client. This class provides the implementation - * of rfc1939. - * - * @author Eric Daugherty - */ -public class DefaultPop3Server - extends AbstractServer - implements Serviceable, Initializable -{ - //*************************************************************** - // Constants - //*************************************************************** - - // Message Names. These constants are used to load messages from - // the configuration data. - public static final String MESSAGE_WELCOME = "welcome"; - public static final String MESSAGE_STAT = "stat"; - public static final String MESSAGE_LIST_ALL = "list.all"; - public static final String MESSAGE_LIST_ONE = "list.one"; - public static final String MESSAGE_UIDL_ALL = "uidl.all"; - public static final String MESSAGE_UIDL_ONE = "uidl.one"; - - public static final String MESSAGE_OK = "ok"; - public static final String MESSAGE_CLIENT_INVALID = "client.invalid"; - public static final String MESSAGE_UNKNOWN_USER = "unknown.user"; - public static final String MESSAGE_NEED_USER_COMMAND = "need.user.command"; - public static final String MESSAGE_MAILBOX_LOCK_FAILED = "mailbox.lock.failed"; - public static final String MESSAGE_INVALID_AUTHENTICATION = "invalid.authentication"; - public static final String MESSAGE_INVALID_MESSAGE_NUMBER = "invalid.message.number"; - public static final String MESSAGE_MISSING_ARGUMENT = "argument.missing"; - public static final String MESSAGE_MISSING_SECOND_ARGUMENT = "second.argument.missing"; - public static final String MESSAGE_COMMAND_INVALID = "command.invalid"; - public static final String MESSAGE_COMMAND_NOT_IMPLEMENTED = "command.not.implemented"; - public static final String MESSAGE_COMMAND_ORDER_INVALID = "command.order.invalid"; - - // These have been made public due to the use - // of reflection. Otherwise, they would be private. - public static final int COMMAND_USER = 0; - public static final int COMMAND_PASS = 1; - public static final int COMMAND_APOP = 2; - public static final int COMMAND_STAT = 3; - public static final int COMMAND_LIST = 4; - public static final int COMMAND_RETR = 5; - public static final int COMMAND_DELE = 6; - public static final int COMMAND_NOOP = 7; - public static final int COMMAND_RSET = 8; - public static final int COMMAND_TOP = 9; - public static final int COMMAND_UIDL = 10; - public static final int COMMAND_QUIT = 11; - - // Valid states. - private static final int STATE_INITIAL = 0; - private static final int STATE_AUTHORIZATION = 1; - private static final int STATE_TRANSACTION = 2; - - /** - * Assigns a bit (flag) to each possible command. - */ - private static final int[] COMMAND_FLAGS = {( 1 << COMMAND_USER ), - ( 1 << COMMAND_PASS ), - ( 1 << COMMAND_APOP ), - ( 1 << COMMAND_STAT ), - ( 1 << COMMAND_LIST ), - ( 1 << COMMAND_RETR ), - ( 1 << COMMAND_DELE ), - ( 1 << COMMAND_NOOP ), - ( 1 << COMMAND_RSET ), - ( 1 << COMMAND_TOP ), - ( 1 << COMMAND_UIDL ), - ( 1 << COMMAND_QUIT ) - }; - - /** - * These commands are defined in the spec (as optional), but are not implemented. - */ - private static final int COMMAND_UNIMPLEMENTED_FLAG = ( COMMAND_FLAGS[COMMAND_APOP] ); - - /** - * These commands are always allowed, according to the spec. The unimplemented - * commands are included here since they will result in a message indicating - * they are invalid, so we may as well allow them anywhere. - */ - private static final int COMMAND_ALWAYS_ALLOWED_FLAG = ( COMMAND_UNIMPLEMENTED_FLAG | - COMMAND_FLAGS[COMMAND_QUIT] - ); - - /** - * Defines the commands that are allowed in the AUTHORIZATION state. - */ - private static final int STATE_AUTHORIZATION_COMMANDS = COMMAND_ALWAYS_ALLOWED_FLAG | - COMMAND_FLAGS[COMMAND_USER] | - COMMAND_FLAGS[COMMAND_PASS]; - - private static final int STATE_TRANSACTION_COMMANDS = COMMAND_ALWAYS_ALLOWED_FLAG | - COMMAND_FLAGS[COMMAND_STAT] | - COMMAND_FLAGS[COMMAND_LIST] | - COMMAND_FLAGS[COMMAND_RETR] | - COMMAND_FLAGS[COMMAND_DELE] | - COMMAND_FLAGS[COMMAND_NOOP] | - COMMAND_FLAGS[COMMAND_RSET] | - COMMAND_FLAGS[COMMAND_TOP] | - COMMAND_FLAGS[COMMAND_UIDL]; - - /** - * Defines the commands that are allowed for each state. - */ - private static final int[] STATE_ALLOWED_COMMANDS = {( 0 ), - ( STATE_AUTHORIZATION_COMMANDS ), - ( STATE_TRANSACTION_COMMANDS ) - }; - - //*************************************************************** - // Variables - //*************************************************************** - - /** - * The current state of the client's 'transaction'. Used to determine which - * commands are acceptable. - */ - private int state; - - /** - * Provides validation of user authentication and access to individual mailboxes. - */ - private MailboxManager mailboxManager; - - /** - * Provides access to a specific user's Mailbox. - */ - private Mailbox mailbox; - - /** - * The current line of input. - */ - private String inputLine; - - /** - * The name specified to the USER command. Only valid - * during the AUTHORIZATION state. - */ - private String user; - - //*************************************************************** - // Constructor - //*************************************************************** - - public DefaultPop3Server() - { - } - - // ---------------------------------------------------------------------- - // Lifecylce Management - // ---------------------------------------------------------------------- - - /** @see org.apache.avalon.framework.service.Serviceable#service */ - public void service( ServiceManager serviceManager ) - throws ServiceException - { - mailboxManager = (MailboxManager) serviceManager.lookup( MailboxManager.ROLE ); - } - - /** @see org.apache.avalon.framework.activity.Initializable#initialize */ - public void initialize() - throws Exception - { - state = STATE_INITIAL; - } - - //*************************************************************** - // LineServerProcessor Method Implementations - //*************************************************************** - - protected boolean setLine( String line ) - { - if ( line != null && line.trim().length() > 0 ) - { - inputLine = line.trim(); - return true; - } - else - { - return false; - } - } - - //*************************************************************** - // ServerProcessor Method Implementations - //*************************************************************** - - /** - * Called when the client input needs to be processed. - */ - public void process( ConnectionHandler connectionHandler ) - { - try - { - // If the connection was just established, write a welcome message. - if ( state == STATE_INITIAL ) - { - InetAddress clientAddress = connectionHandler.getClientAddress(); - - // Log the connection. - if ( getLogger().isInfoEnabled() ) getLogger().info( "POP3 Connection made from client: " + clientAddress.getHostName() + " (" + clientAddress.getHostAddress() + ")." ); - - // Verify that this is a valid client. - if ( mailboxManager.acceptClient( clientAddress ) ) - { - state = STATE_AUTHORIZATION; - writeLine( connectionHandler, getMessage( MESSAGE_WELCOME ) ); - } - else - { - // If the client is not valid, display an error message and close the connection. - writeLine( connectionHandler, getMessage( MESSAGE_CLIENT_INVALID ) ); - connectionHandler.close(); - } - } - else - { - processCommand( connectionHandler ); - } - } - catch ( IOException ioException ) - { - getLogger().error( "IOException while processing POP3 Connection: " + ioException.toString(), ioException ); - // Unlock and roll back the mailbox. - if ( mailbox != null ) - { - mailbox.rollbackUpdates(); - } - try - { - connectionHandler.close(); - } - catch ( IOException e ) - { - getLogger().warn( "Error closing channel after IOException occured." ); - } - } - catch ( Throwable throwable ) - { - getLogger().error( "Unknown exception occured while processing POP3 Connection: " + throwable.toString(), throwable ); - // Unlock and roll back the mailbox. - if ( mailbox != null ) - { - mailbox.rollbackUpdates(); - } - try - { - connectionHandler.close(); - } - catch ( IOException e ) - { - getLogger().warn( "Error closing channel after IOException occured." ); - } - } - } - - /** - * This method allows the Service to indicate that the - * client has closed the connection. This allows the implementation - * to free any resources it may have allocated. - */ - public void cleanup() - { - // Nothing to clean up. - } - - //*************************************************************** - // Private Processing Methods - //*************************************************************** - - /** - * Process a POP3 Command. - * - * @throws java.io.IOException thrown if an error occurs writing a client response. - */ - private void processCommand( ConnectionHandler connectionHandler ) throws IOException - { - String command = inputLine; - - // Get the requested command. - int commandId = getCommandId( command ); - if ( commandId == -1 ) - { - String[] invalidCommandArguments = {command}; - writeLine( connectionHandler, getMessage( MESSAGE_COMMAND_INVALID, invalidCommandArguments ) ); - return; - } - - // Verify that the command is valid in the current state. - if ( !isCommandValid( commandId ) ) - { - String[] invalidOrderArguments = {command}; - writeLine( connectionHandler, getMessage( MESSAGE_COMMAND_ORDER_INVALID, invalidOrderArguments ) ); - return; - } - - // Handle the specific command. - switch ( commandId ) - { - case COMMAND_USER: - processUserCommand( connectionHandler); - break; - case COMMAND_PASS: - processPassCommand(connectionHandler); - break; - case COMMAND_APOP: - writeLine( connectionHandler, getMessage( MESSAGE_COMMAND_NOT_IMPLEMENTED ) ); - break; - case COMMAND_STAT: - processStatCommand(connectionHandler); - break; - case COMMAND_LIST: - processListCommand(connectionHandler); - break; - case COMMAND_RETR: - processRetrCommand(connectionHandler); - break; - case COMMAND_DELE: - processDeleCommand(connectionHandler); - break; - case COMMAND_NOOP: - writeLine( connectionHandler, getMessage( MESSAGE_OK ) ); - break; - case COMMAND_RSET: - processRsetCommand(connectionHandler); - break; - case COMMAND_TOP: - processTopCommand(connectionHandler); - break; - case COMMAND_UIDL: - processUidlCommand(connectionHandler); - break; - case COMMAND_QUIT: - if ( mailbox != null ) - { - mailbox.commitUpdates(); - } - writeLine( connectionHandler, getMessage( MESSAGE_OK ) ); - connectionHandler.close(); - break; - default: - String[] defaultArguments = {command}; - writeLine( connectionHandler, getMessage( MESSAGE_COMMAND_INVALID, defaultArguments ) ); - break; - } - } - - /** - * Handles the verfication and parsing of a USER command during authentication. - * - * @throws java.io.IOException - */ - private void processUserCommand( ConnectionHandler connectionHandler ) throws IOException - { - String userName = getCommandArgument(); - - if ( userName == null || userName.length() < 1 ) - { - user = null; - String[] arguments = {"USER"}; - writeLine( connectionHandler, getMessage( MESSAGE_MISSING_ARGUMENT, arguments ) ); - } - else - { - if ( mailboxManager.validateUser( userName ) ) - { - user = userName; - writeLine( connectionHandler, getMessage( MESSAGE_OK ) ); - } - else - { - user = null; - writeLine( connectionHandler, getMessage( MESSAGE_UNKNOWN_USER ) ); - } - } - } - - /** - * Handles the verification and parsing of a PASS command during authentication. - * - * @throws java.io.IOException - */ - private void processPassCommand( ConnectionHandler connectionHandler ) throws IOException - { - String password = getCommandArgument(); - - // Must specify the user before the password. - if ( user == null ) - { - writeLine( connectionHandler, getMessage( MESSAGE_NEED_USER_COMMAND ) ); - } - // Make sure they actually gave a password. - else if ( password == null || password.length() < 1 ) - { - String[] arguments = {"PASS"}; - writeLine( connectionHandler, getMessage( MESSAGE_MISSING_ARGUMENT, arguments ) ); - } - // Validate the username and password. - else - { - String mailboxId = mailboxManager.valiateMailbox( user, password ); - if ( mailboxId != null ) - { - mailbox = mailboxManager.lockMailbox( mailboxId ); - if ( mailbox != null ) - { - state = STATE_TRANSACTION; - if ( getLogger().isInfoEnabled() ) getLogger().info( "User: " + user + " logged in to POP3 Server." ); - writeLine( connectionHandler, getMessage( MESSAGE_OK ) ); - } - else - { - writeLine( connectionHandler, getMessage( MESSAGE_MAILBOX_LOCK_FAILED ) ); - } - } - else - { - writeLine( connectionHandler, getMessage( MESSAGE_INVALID_AUTHENTICATION ) ); - } - } - } - - /** - * Handles the processing of a STAT command during TRANSACTION. - *

- * The STAT command returns the total number of messages in the mailbox, - * and the total size of all the messages. - * - * @throws java.io.IOException - */ - private void processStatCommand( ConnectionHandler connectionHandler ) throws IOException - { - String messageCount = String.valueOf( mailbox.getMessageCount() ); - String mailboxSize = String.valueOf( mailbox.getMailboxSize() ); - String[] arguments = {messageCount, mailboxSize}; - writeLine( connectionHandler, getMessage( MESSAGE_STAT, arguments ) ); - } - - /** - * Handles the processing of a LIST command during TRANSACTION. - *

- * The LIST command returns the total number of messages in the mailbox, - * and the total size of all messages. It also lists each of the individual - * messages and the size of each. - *

- * If a specific message number is specified, the LIST command only returns - * information about that message. - * - * @throws java.io.IOException - */ - private void processListCommand( ConnectionHandler connectionHandler ) throws IOException - { - String argument = getCommandArgument(); - - // List all messages - if ( argument.equals( "" ) ) - { - String messageCount = String.valueOf( mailbox.getMessageCount() ); - String mailboxSize = String.valueOf( mailbox.getMailboxSize() ); - String[] arguments = {messageCount, mailboxSize}; - writeLine( connectionHandler, getMessage( MESSAGE_LIST_ALL, arguments ) ); - - String[] messageIds = mailbox.getMessageIds(); - String messageSize; - for ( int index = 0; index < messageIds.length; index++ ) - { - messageSize = String.valueOf( mailbox.getMessageSize( messageIds[index] ) ); - writeLine( connectionHandler, String.valueOf( index + 1 ) + " " + messageSize ); - } - writeLine( connectionHandler, "." ); - } - // List a specific message - else - { - int messageNumber = getMessageNumber(); - - // If the number is invalid, display an error message. - if ( messageNumber < 0 ) - { - String[] arguments = {argument}; - writeLine( connectionHandler, getMessage( MESSAGE_INVALID_MESSAGE_NUMBER, arguments ) ); - return; - } - - // Calcluate the index into the messageIds array. - int index = messageNumber - 1; - - // Verify the message exists and is valid. - String[] messageIds = mailbox.getMessageIds(); - if ( messageIds.length > messageNumber || mailbox.isMessageDeleted( messageIds[index] ) ) - { - String[] arguments = {argument}; - writeLine( connectionHandler, getMessage( MESSAGE_INVALID_MESSAGE_NUMBER, arguments ) ); - } - else - { - String messageNumberString = String.valueOf( messageNumber ); - String messageSize = String.valueOf( mailbox.getMessageSize( messageIds[index] ) ); - String[] arguments = {messageNumberString, messageSize}; - writeLine( connectionHandler, getMessage( MESSAGE_LIST_ONE, arguments ) ); - } - } - } - - /** - * Handles the processing of a RETR command during TRANSACTION. - *

- * Retrieves the message from the Mailbox and sends it to the user. - * - * @throws java.io.IOException - */ - private void processRetrCommand( ConnectionHandler connectionHandler ) throws IOException - { - int messageNumber = getMessageNumber(); - - // If the number is invalid, display an error message. - if ( messageNumber < 0 ) - { - String[] arguments = {getCommandArgument()}; - writeLine( connectionHandler, getMessage( MESSAGE_INVALID_MESSAGE_NUMBER, arguments ) ); - return; - } - - // Calcluate the index into the messageIds array. - int index = messageNumber - 1; - - // Verify the message exists and is valid. - String[] messageIds = mailbox.getMessageIds(); - if ( messageIds.length > messageNumber || mailbox.isMessageDeleted( messageIds[index] ) ) - { - String[] arguments = {getCommandArgument()}; - writeLine( connectionHandler, getMessage( MESSAGE_INVALID_MESSAGE_NUMBER, arguments ) ); - } - else - { - writeLine( connectionHandler, getMessage( MESSAGE_OK ) ); - - Reader reader = mailbox.getMessage( messageIds[index] ); - BufferedReader messageReader = null; - try - { - messageReader = new BufferedReader( reader ); - - String currentLine = messageReader.readLine(); - while ( currentLine != null ) - { - writeLine( connectionHandler, currentLine ); - currentLine = messageReader.readLine(); - } - - writeLine( connectionHandler, "." ); - } - finally - { - if ( messageReader != null ) - { - messageReader.close(); - } - } - } - } - - /** - * Handles the processing of a DELE command during TRANSACTION. - *

- * Marks the specified message for deletion. - * - * @throws java.io.IOException - */ - private void processDeleCommand( ConnectionHandler connectionHandler ) throws IOException - { - int messageNumber = getMessageNumber(); - - // If the number is invalid, display an error message. - if ( messageNumber < 0 ) - { - String[] arguments = {getCommandArgument()}; - writeLine( connectionHandler, getMessage( MESSAGE_INVALID_MESSAGE_NUMBER, arguments ) ); - return; - } - - // Calcluate the index into the messageIds array. - int index = messageNumber - 1; - - // Verify the message exists and is valid. - String[] messageIds = mailbox.getMessageIds(); - if ( messageIds.length > messageNumber || mailbox.isMessageDeleted( messageIds[index] ) ) - { - String[] arguments = {getCommandArgument()}; - writeLine( connectionHandler, getMessage( MESSAGE_INVALID_MESSAGE_NUMBER, arguments ) ); - } - else - { - mailbox.deleteMessage( messageIds[index] ); - writeLine( connectionHandler, getMessage( MESSAGE_OK ) ); - } - - } - - /** - * Handles the processing of a RSET command during TRANSACTION. - *

- * Unmarks all messages marked for deletion. - * - * @throws java.io.IOException - */ - private void processRsetCommand( ConnectionHandler connectionHandler ) throws IOException - { - mailbox.resetDeleteFlags(); - writeLine( connectionHandler, getMessage( MESSAGE_OK ) ); - } - - /** - * Handles the processing of a TOP command during TRANSACTION. - *

- * Returns the message header and the top of the message. - * - * @throws java.io.IOException - */ - private void processTopCommand( ConnectionHandler connectionHandler) throws IOException - { - String argument = getCommandArgument(); - - // Parse the message number and lines to read from the command input - int messageNumber = 0; - int numberOfLines = 0; - - int delimiterIndex = argument.indexOf( " " ); - if ( delimiterIndex < -1 || delimiterIndex + 1 > argument.length() ) - { - String[] arguments = {"TOP"}; - writeLine( connectionHandler, getMessage( MESSAGE_MISSING_SECOND_ARGUMENT, arguments ) ); - return; - } - - String messageNumberString = argument.substring( 0, delimiterIndex ).trim(); - String numberOfLinesString = argument.substring( delimiterIndex + 1 ).trim(); - - try - { - messageNumber = Integer.parseInt( messageNumberString ); - numberOfLines = Integer.parseInt( numberOfLinesString ); - } - catch ( NumberFormatException nfe ) - { - String[] arguments = {argument}; - writeLine( connectionHandler, getMessage( MESSAGE_INVALID_MESSAGE_NUMBER, arguments ) ); - return; - } - - // Calcluate the index into the messageIds array. - int index = messageNumber - 1; - - // Verify the message exists and is valid. - String[] messageIds = mailbox.getMessageIds(); - if ( messageIds.length > messageNumber || mailbox.isMessageDeleted( messageIds[index] ) ) - { - String[] arguments = {argument}; - writeLine( connectionHandler, getMessage( MESSAGE_INVALID_MESSAGE_NUMBER, arguments ) ); - return; - } - else - { - writeLine( connectionHandler, getMessage( MESSAGE_OK ) ); - - Reader reader = mailbox.getMessage( messageIds[index] ); - BufferedReader messageReader = null; - try - { - messageReader = new BufferedReader( reader ); - - // Write the header - String currentLine = messageReader.readLine(); - while ( currentLine != null && !currentLine.equals( "" ) ) - { - writeLine( connectionHandler, currentLine ); - currentLine = messageReader.readLine(); - } - - //Write an empty line to seperate header from body. - writeLine( connectionHandler, "" ); - - // Write the body - int lineNumber = 0; - currentLine = messageReader.readLine(); - while ( currentLine != null && lineNumber < numberOfLines ) - { - writeLine( connectionHandler, currentLine ); - currentLine = messageReader.readLine(); - lineNumber++; - } - - writeLine( connectionHandler, "." ); - } - finally - { - if ( messageReader != null ) - { - messageReader.close(); - } - } - } - } - - /** - * Handles the verfication and parsing of a UIDL command during authentication. - *

- * Returns the unique ID of all the messages, or the unique ID of a specific - * message if a message number is specified. - * - * @throws java.io.IOException - */ - private void processUidlCommand( ConnectionHandler connectionHandler) throws IOException - { - - String argument = getCommandArgument(); - String[] messageIds = mailbox.getMessageIds(); - - // List all messages - if ( argument.equals( "" ) ) - { - writeLine( connectionHandler, getMessage( MESSAGE_OK ) ); - - for ( int index = 0; index < messageIds.length; index++ ) - { - String[] arguments = {String.valueOf( index + 1 ), messageIds[index]}; - writeLine( connectionHandler, getMessage( MESSAGE_UIDL_ALL, arguments ) ); - } - - writeLine( connectionHandler, "." ); - } - // List a specific message - else - { - int messageNumber = getMessageNumber(); - - // If the number is invalid, display an error message. - if ( messageNumber < 0 ) - { - String[] arguments = {argument}; - writeLine( connectionHandler, getMessage( MESSAGE_INVALID_MESSAGE_NUMBER, arguments ) ); - return; - } - - // Calcluate the index into the messageIds array. - int index = messageNumber - 1; - - // Verify the message exists and is valid. - if ( messageIds.length > messageNumber || mailbox.isMessageDeleted( messageIds[index] ) ) - { - String[] arguments = {argument}; - writeLine( connectionHandler, getMessage( MESSAGE_INVALID_MESSAGE_NUMBER, arguments ) ); - } - else - { - String[] arguments = {String.valueOf( messageNumber ), messageIds[index]}; - writeLine( connectionHandler, getMessage( MESSAGE_UIDL_ONE, arguments ) ); - } - } - } - - //*************************************************************** - // Private Utility Methods - //*************************************************************** - - /** - * Checks to verify the specified command is valid for the current state. - * - * @param commandID - * @return - */ - private boolean isCommandValid( int commandID ) - { - int allowedCommands = STATE_ALLOWED_COMMANDS[state]; - int commandFlag = COMMAND_FLAGS[commandID]; - return ( allowedCommands & commandFlag ) != 0; - } - - /** - * Returns the commandId for the specified command string. - * - * @param command - * @return - */ - private int getCommandId( String command ) - { - command = command.trim(); - command = command.toUpperCase(); - - // All the commands are at least 3 charecters. - if ( command.length() < 3 ) - { - return -1; - } - - String fieldName; - if ( command.length() == 3 ) - { - fieldName = command.substring( 0, 3 ); - } - else - { - fieldName = command.substring( 0, 4 ); - } - fieldName = "COMMAND_" + fieldName; - - try - { - Field field = this.getClass().getField( fieldName ); - - return field.getInt( this ); - } - catch ( Exception exception ) - { - // Command does not exist. - return -1; - } - } - - /** - * Parses the argument from the command input data. - * - * @return argument string, or empty string if no argument was specified. - */ - private String getCommandArgument() - { - // Get the argument - int index = inputLine.indexOf( " " ); - - String argument; - if ( index == -1 ) - { - argument = ""; - } - else - { - argument = inputLine.substring( index + 1 ); - } - - if ( argument.length() > 0 ) - { - argument = argument.trim(); - } - - return argument; - } - - /** - * Returns the command argument as an integer, or -1 if the - * argument is not a valid number - * - * @return the command argument as a number, or -1 if invalid. - */ - private int getMessageNumber() - { - String numberString = getCommandArgument(); - try - { - return Integer.parseInt( numberString ); - } - catch ( NumberFormatException numberFormatException ) - { - return -1; - } - } - - /** - * Returns the message retrieved from the ConfigurationManager. - * - * @param messageName name of the message to retrieve. - * @return the message text. - * - * @todo this will require the i18n service. - * - */ - private String getMessage( String messageName ) - { - return "we need a localized pop3 message here!" + messageName; - } - - /** - * Returns a message from the ConfigurationManager formatted using the - * MessageFormat class and the specified arguments. - * - * @param messageName name of the message to retrieve. - * @param arguments objects used to format the message. - * @return the formatted message text. - */ - private String getMessage( String messageName, String[] arguments ) - { - return MessageFormat.format( getMessage( messageName ), arguments ); - } -} diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/Address.java b/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/Address.java deleted file mode 100644 index c93cc51e8..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/Address.java +++ /dev/null @@ -1,135 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp; - - -/** - * Represents an email address. - */ -public class Address -{ - // Attributes - - private String username = ""; - private String domain = ""; - - //*************************************************************** - // Constructor - //*************************************************************** - - public Address( String address ) throws InvalidAddressException - { - parseAddress( address ); - } - - public Address( String username, String domain ) - { - this.username = username; - this.domain = domain; - } - - //*************************************************************** - // Java Bean Methods - //*************************************************************** - - public String getUsername() - { - return username; - } - - public void setUsername( String username ) - { - this.username = username; - } - - public String getDomain() - { - return domain; - } - - public void setDomain( String domain ) - { - this.domain = domain; - } - - //*************************************************************** - // java.lang.Object Methods - //*************************************************************** - - public int hashCode() - { - return getUsername().hashCode() + ( 1000 * domain.hashCode() ); - } - - public boolean equals( Object obj ) - { - if ( obj == null || !( obj instanceof Address ) ) - { - return false; - } - - Address address = (Address) obj; - return getUsername().equals( address.getUsername() ) && - getDomain().equals( address.getDomain() ); - } - - public String toString() - { - return getUsername() + "@" + getDomain(); - } - - //*************************************************************** - // Private Methods - //*************************************************************** - - private void parseAddress( String address ) throws InvalidAddressException - { - //Parse toAddress into username and domain. - int index = address.indexOf( "@" ); - if ( index == -1 ) - { - throw new InvalidAddressException(); - } - - setUsername( address.substring( 0, index ) ); - setDomain( address.substring( index + 1 ) ); - } -} diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/DefaultSmtpServer.java b/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/DefaultSmtpServer.java deleted file mode 100644 index 78591582c..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/DefaultSmtpServer.java +++ /dev/null @@ -1,72 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp; - -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.service.Serviceable; -import org.codehaus.plexus.synapse.AbstractSynapseServer; - -/** - * Manages the interaction between the server plugins and the - * SMTP client. This class provides the implementation - * of rfc821. - * - * @author Eric Daugherty - */ -public class DefaultSmtpServer - extends AbstractSynapseServer - implements Serviceable, Configurable, Initializable, SmtpServer -{ - - /** @see Initializable#initialize */ - public void initialize() - throws Exception - { - super.initialize(); - - getReactor().registerServiceHandler( new SmtpServiceHandler() ); - } - - public void dispose() - { - } -} diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/InvalidAddressException.java b/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/InvalidAddressException.java deleted file mode 100644 index f0fc9cada..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/InvalidAddressException.java +++ /dev/null @@ -1,46 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp; - -public class InvalidAddressException extends Exception -{ - -} diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/SmtpMessage.java b/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/SmtpMessage.java deleted file mode 100644 index cddf82f01..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/SmtpMessage.java +++ /dev/null @@ -1,244 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp; - -import org.codehaus.plexus.smtp.Address; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Date; - -/** - * Represents a SMTP Email message. This message is used by the SMTPServerProcessor and - * the SMTPDelivery systems to represent the current state of an incoming/outgoing - * SMTP message. - * - * @author Eric Daugherty - */ -public class SmtpMessage -{ - private String id; - private Address fromAddress; - private Collection toAddresses = new ArrayList(); - private String data; - private Date timeReceived; - private Date scheduledDelivery; - private int deliveryAttempts; - - public SmtpMessage( String messageId ) - { - id = messageId; - Date now = new Date(); - timeReceived = now; - scheduledDelivery = now; - deliveryAttempts = 0; - } - - /** - * The ID of the SMTP Message. - * - * @return The message's Id. - */ - public String getId() - { - return id; - } - - /** - * The ID of the SMTP Message. - * - * @param id The message's Id. - */ - public void setId( String id ) - { - this.id = id; - } - - /** - * Address the email is from. - * - * @return sender's address. - */ - public Address getFromAddress() - { - return fromAddress; - } - - /** - * Address the email is from. - * - * @param fromAddress sender's address. - */ - public void setFromAddress( Address fromAddress ) - { - this.fromAddress = fromAddress; - } - - /** - * A collection of addresses this email message needs to be delivered to. - * - * @return delivery addresses. - */ - public Collection getToAddresses() - { - return toAddresses; - - } - - /** - * - * @param toAddresses - */ - public void setToAddresses( Collection toAddresses ) - { - this.toAddresses = toAddresses; - } - - /** - * Adds a new address to deliver this message to. - * - * @param address delivery address. - */ - public void addToAddress( Address address ) - { - toAddresses.add( address ); - } - - /** - * Removes an address from the list, after successful delivery. - * - * @param address delivery Address. - */ - public void removeAddress( Address address ) - { - toAddresses.remove( address ); - } - - /** - * Removes all the addresses in the collection, after successful delivery (or permanent error). - * - * @param addresses collection of addresses to remove. - */ - public void removeAddresses( Collection addresses ) - { - toAddresses.removeAll( addresses ); - } - - /** - * The actual message. - * - * @return the message. - */ - public String getData() - { - return data; - } - - /** - * The actual message. - * - * @param data the message. - */ - public void setData( String data ) - { - this.data = data; - } - - /** - * The time the message was first received by the system. - * - * @return time the message was received. - */ - public Date getTimeReceived() - { - return timeReceived; - } - - /** - * The time the message was first received by the system. - * - * @param timeReceived time the message was received. - */ - public void setTimeReceived( Date timeReceived ) - { - this.timeReceived = timeReceived; - } - - /** - * The next time delivery of this message should be attempted. - * - * @return the next schedule delivery time. - */ - public Date getScheduledDelivery() - { - return scheduledDelivery; - } - - /** - * The next time delivery of this message should be attempted. - * - * @param scheduledDelivery the next schedule delivery time. - */ - public void setScheduledDelivery( Date scheduledDelivery ) - { - this.scheduledDelivery = scheduledDelivery; - } - - /** - * The number of times delivery of this message has been attempted. - * - * @return number of delivery attempts. - */ - public int getDeliveryAttempts() - { - return deliveryAttempts; - } - - /** - * The number of times delivery of this message has been attempted. - * - * @param deliveryAttempts number of delivery attempts. - */ - public void setDeliveryAttempts( int deliveryAttempts ) - { - this.deliveryAttempts = deliveryAttempts; - } -} diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/SmtpServer.java b/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/SmtpServer.java deleted file mode 100644 index ccc257f36..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/SmtpServer.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.codehaus.plexus.smtp; - -import org.codehaus.plexus.synapse.SynapseServer; - -/** - * - * - * @author Jason van Zyl - * - * @version $Id$ - */ -public interface SmtpServer - extends SynapseServer -{ - public static String ROLE = SmtpServer.class.getName(); -} diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/SmtpServiceHandler.java b/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/SmtpServiceHandler.java deleted file mode 100644 index eacd0bdc3..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/SmtpServiceHandler.java +++ /dev/null @@ -1,631 +0,0 @@ -package org.codehaus.plexus.smtp; - -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; -import org.codehaus.plexus.synapse.handler.AbstractServiceHandler; -import org.codehaus.plexus.smtp.queue.DeliveryQueueException; -import org.codehaus.plexus.smtp.queue.Queue; - -import java.io.IOException; -import java.lang.reflect.Field; -import java.net.InetAddress; -import java.net.Socket; -import java.text.MessageFormat; -import java.util.Random; - -/** - * Manages the interaction between the server plugins and the - * SMTP client. This class provides the implementation - * of rfc821. - * - * @author Eric Daugherty - */ -public class SmtpServiceHandler - extends AbstractServiceHandler -{ - //*************************************************************** - // Constants - //*************************************************************** - - private static final int READ_COMMAND = 0; - private static final int READ_DATA = 1; - - private static final int DATA_BUFFER_SIZE = 1024; - - // Message Names. These constants are used to load messages from - // the configuration data. - public static final String MESSAGE_WELCOME = "welcome"; - public static final String MESSAGE_HELO = "helo"; - public static final String MESSAGE_DATA = "data"; - public static final String MESSAGE_HELP = "help"; - public static final String MESSAGE_QUIT = "quit"; - - public static final String MESSAGE_OK = "ok"; - public static final String MESSAGE_CLIENT_INVALID = "client.invalid"; - public static final String MESSAGE_HELO_INVALID = "helo.invalid"; - public static final String MESSAGE_MAIL_ADDRESS_REJECTED = "mail.address.rejected"; - public static final String MESSAGE_RCPT_ADDRESS_REJECTED = "rcpt.address.rejected"; - public static final String MESSAGE_COMMAND_INVALID = "command.invalid"; - public static final String MESSAGE_COMMAND_NOT_IMPLEMENTED = "command.not.implemented"; - public static final String MESSAGE_COMMAND_ORDER_INVALID = "command.order.invalid"; - public static final String MESSAGE_ADDRESS_INVALID = "address.invalid"; - public static final String MESSAGE_TRANSACTION_FAILED = "transaction.failed"; - - // These have been made public due to the use - // of reflection. Otherwise, they would be private. - public static final int COMMAND_HELO = 0; - public static final int COMMAND_MAIL = 1; - public static final int COMMAND_RCPT = 2; - public static final int COMMAND_DATA = 3; - public static final int COMMAND_RSET = 4; - public static final int COMMAND_SEND = 5; - public static final int COMMAND_SOML = 6; - public static final int COMMAND_SAML = 7; - public static final int COMMAND_VRFY = 8; - public static final int COMMAND_EXPN = 9; - public static final int COMMAND_HELP = 10; - public static final int COMMAND_NOOP = 11; - public static final int COMMAND_QUIT = 12; - public static final int COMMAND_TURN = 13; - - // Valid states. - private static final int STATE_INITIAL = 0; - private static final int STATE_NEED_HELO = 1; - private static final int STATE_NEED_MAIL = 2; - private static final int STATE_NEED_RCPT = 3; - private static final int STATE_RCPT_OR_DATA = 4; - - private int state; - - private int readMode; - - private String heloDomain; - - private Queue queue; - - private SmtpMessage message; - - private String inputLine; - - private StringBuffer data; - - private Random random; - - private String domain; - - public SmtpServiceHandler() - { - } - - // ---------------------------------------------------------------------- - // API - // ---------------------------------------------------------------------- - - public void handleEvents() - throws Exception - { - } - - public void handleEvent( Socket socket ) - throws Exception - { - process( socket ); - } - - public String getHandleKey() - { - return "PROCESS"; - } - - //*************************************************************** - // LineServerProcessor Method Implementations - //*************************************************************** - - /** - * Checks the input line to determine whether we need time to process - * or not. - * - * @param line the current input line. - * @return true if it is a command or the end of the data. - */ - protected boolean setLine( String line ) - { - inputLine = line; - if ( readMode == READ_DATA ) - { - if ( line.equals( "." ) ) - { - return true; - } - else - { - // Need to keep the line feeds in the stored message. - data.append( line + "\r\n" ); - return false; - } - } - return true; - } - - //*************************************************************** - // ServerProcessor Method Implementations - //*************************************************************** - - /** - * Called when the client input needs to be processed. - */ - public void process( Socket socket ) - { - try - { - // If the connection was just established, write a welcome message. - if ( state == STATE_INITIAL ) - { - InetAddress clientAddress = socket.getInetAddress(); - - // Log the connection. - if ( getLogger().isInfoEnabled() ) - { - getLogger().info( "SMTP Connection made from client: " + clientAddress.getHostName() + - " (" + clientAddress.getHostAddress() + ")." ); - } - - state = STATE_NEED_HELO; - writeLine( socket, getMessage( MESSAGE_WELCOME ) ); - } - else - { - switch ( readMode ) - { - case READ_COMMAND: - processCommand( socket ); - break; - case READ_DATA: - processData( socket ); - break; - default: - getLogger().error( "Invalid readMode specified for SMTPServerProcessor!" ); - break; - } - } - } - catch ( IOException ioException ) - { - getLogger().error( "IOException while processing SMTP Connection: " + ioException.toString(), ioException ); - try - { - socket.close(); - } - catch ( IOException e ) - { - getLogger().warn( "Error closing channel after IOException occured." ); - } - } - catch ( Throwable throwable ) - { - getLogger().error( "Unknown exception occured while processing POP3 Connection: " + throwable.toString(), throwable ); - try - { - socket.close(); - } - catch ( IOException e ) - { - getLogger().warn( "Error closing channel after IOException occured." ); - } - } - } - - /** - * This method allows the Service to indicate that the - * client has closed the connection. This allows the implementation - * to free any resources it may have allocated. - */ - public void cleanup() - { - // Nothing to clean up. - } - - //*************************************************************** - // Private Processing Methods - //*************************************************************** - - /** - * Process a SMTP Command. - * - * @throws java.io.IOException thrown if an error occurs writing a client response. - */ - private void processCommand( Socket socket ) throws IOException - { - String command = inputLine; - - // Get the requested command. - int commandId = getCommandId( command ); - if ( commandId == -1 ) - { - String[] invalidCommandArguments = {command}; - writeLine( socket, getMessage( MESSAGE_COMMAND_INVALID, invalidCommandArguments ) ); - return; - } - - // Handle the specific command. - switch ( commandId ) - { - case COMMAND_HELO: - processHeloCommand( socket ); - break; - case COMMAND_MAIL: - processMailCommand( socket ); - break; - case COMMAND_RCPT: - processRcptCommand( socket ); - break; - case COMMAND_DATA: - readMode = READ_DATA; - writeLine( socket, getMessage( MESSAGE_DATA ) ); - break; - case COMMAND_RSET: - reset(); - writeLine( socket, getMessage( MESSAGE_OK ) ); - break; - case COMMAND_SEND: - String[] sendArguments = {command}; - writeLine( socket, getMessage( MESSAGE_COMMAND_NOT_IMPLEMENTED, sendArguments ) ); - break; - case COMMAND_SOML: - String[] somlArguments = {command}; - writeLine( socket, getMessage( MESSAGE_COMMAND_NOT_IMPLEMENTED, somlArguments ) ); - break; - case COMMAND_SAML: - String[] samlArguments = {command}; - writeLine( socket, getMessage( MESSAGE_COMMAND_NOT_IMPLEMENTED, samlArguments ) ); - break; - case COMMAND_VRFY: - String[] vrfyArguments = {command}; - writeLine( socket, getMessage( MESSAGE_COMMAND_NOT_IMPLEMENTED, vrfyArguments ) ); - break; - case COMMAND_EXPN: - String[] expnArguments = {command}; - writeLine( socket, getMessage( MESSAGE_COMMAND_NOT_IMPLEMENTED, expnArguments ) ); - break; - case COMMAND_HELP: - writeLine( socket, getMessage( MESSAGE_HELP ) ); - break; - case COMMAND_NOOP: - writeLine( socket, getMessage( MESSAGE_OK ) ); - break; - case COMMAND_QUIT: - String[] quitArguments = {domain}; - writeLine( socket, getMessage( MESSAGE_QUIT, quitArguments ) ); - socket.close(); - break; - case COMMAND_TURN: - default: - String[] defaultArguments = {command}; - writeLine( socket, getMessage( MESSAGE_COMMAND_INVALID, defaultArguments ) ); - break; - } - } - - private void processData( Socket socket ) - { - //Prepend the Header information. - StringBuffer messageData = new StringBuffer(); - messageData.append( "Received: from " ); - messageData.append( heloDomain ); - InetAddress clientAddress = socket.getInetAddress(); - messageData.append( " (" ); - messageData.append( clientAddress.getHostName() ); - messageData.append( " [" ); - messageData.append( clientAddress.getHostAddress() ); - messageData.append( "])\r\n" ); - messageData.append( " by " ); - messageData.append( "Java Email Server with SMTP ID " ); - messageData.append( message.getId() ); - messageData.append( "\r\n" ); - messageData.append( data.toString() ); - message.setData( messageData.toString() ); - - try - { - queue.addMessage( message ); - writeLine( socket, getMessage( MESSAGE_OK ) ); - } - catch ( DeliveryQueueException e ) - { - writeLine( socket, getMessage( MESSAGE_TRANSACTION_FAILED ) ); - } - finally - { - reset(); - } - } - - private void processHeloCommand( Socket socket ) - { - InetAddress address = socket.getInetAddress(); - - // Get the argument - int index = inputLine.indexOf( " " ); - String argument; - if ( index == -1 ) - { - argument = ""; - } - else - { - argument = inputLine.substring( index + 1 ); - } - - state = STATE_NEED_MAIL; - heloDomain = argument; - String[] heloArguments = {domain, ( address.getHostName() + " [" + address.getHostAddress() + "]" )}; - writeLine( socket, getMessage( MESSAGE_HELO, heloArguments ) ); - } - - private void processMailCommand( Socket socket ) - { - String command = inputLine; - - // Verify the full command. - if ( command.length() < 10 || !command.toUpperCase().startsWith( "MAIL FROM:" ) ) - { - String[] invalidCommandArguments = {command}; - writeLine( socket, getMessage( MESSAGE_COMMAND_INVALID, invalidCommandArguments ) ); - return; - } - - // Parse Address - Address address = null; - try - { - address = parseAddress( command.substring( 10 ).trim() ); - } - catch ( InvalidAddressException e ) - { - String[] invalidAddressArguments = {command.substring( 10 ).trim()}; - writeLine( socket, getMessage( MESSAGE_ADDRESS_INVALID, invalidAddressArguments ) ); - return; - } - - message.setFromAddress( address ); - state = STATE_NEED_RCPT; - writeLine( socket, getMessage( MESSAGE_OK ) ); - } - - private void processRcptCommand( Socket socket ) - { - String command = inputLine; - - // Verify the full command. - if ( command.length() < 8 || !command.toUpperCase().startsWith( "RCPT TO:" ) ) - { - String[] invalidCommandArguments = {command}; - writeLine( socket, getMessage( MESSAGE_COMMAND_INVALID, invalidCommandArguments ) ); - return; - } - - // Parse Address - Address address = null; - try - { - address = parseAddress( command.substring( 8 ).trim() ); - } - catch ( InvalidAddressException e ) - { - String[] invalidAddressArguments = {command.substring( 8 ).trim()}; - writeLine( socket, getMessage( MESSAGE_ADDRESS_INVALID, invalidAddressArguments ) ); - return; - } - - message.addToAddress( address ); - state = STATE_RCPT_OR_DATA; - writeLine( socket, getMessage( MESSAGE_OK ) ); - } - - /** - * Resets the current state. - */ - private void reset() - { - message = new SmtpMessage( generateSMTPId() ); - state = STATE_NEED_MAIL; - readMode = READ_COMMAND; - } - - //*************************************************************** - // Protected Utility Methods - //*************************************************************** - - /** - * Generates a unique String that is used to identify the - * incoming message. - *

- * This method can be overridden by a subclass to provide an alternate - * algorithm for generating IDs. - * - * @todo create a Plugin for SMTP ID Generation. - * - * @return a new unique SMTP Id. - */ - protected String generateSMTPId() - { - StringBuffer messageId = new StringBuffer(); - messageId.append( random.nextInt( 1024 ) ); - messageId.append( (char) ( random.nextInt( 26 ) + 65 ) ); - messageId.append( (char) ( random.nextInt( 26 ) + 65 ) ); - messageId.append( random.nextInt( 1024 ) ); - messageId.append( (char) ( random.nextInt( 26 ) + 65 ) ); - messageId.append( (char) ( random.nextInt( 26 ) + 65 ) ); - messageId.append( random.nextInt( 1024 ) ); - messageId.append( (char) ( random.nextInt( 26 ) + 65 ) ); - messageId.append( (char) ( random.nextInt( 26 ) + 65 ) ); - messageId.append( random.nextInt( 1024 ) ); - messageId.append( (char) ( random.nextInt( 26 ) + 65 ) ); - messageId.append( (char) ( random.nextInt( 26 ) + 65 ) ); - - return messageId.toString(); - } - - //*************************************************************** - // Private Utility Methods - //*************************************************************** - - /** - * Returns the commandId for the specified command string. - * - * @param command - * @return - */ - private int getCommandId( String command ) - { - command = command.toUpperCase(); - - // All the commands are at least 4 charecters. - if ( command.length() < 4 ) - { - return -1; - } - - String fieldName = "COMMAND_" + command.substring( 0, 4 ); - try - { - Field field = this.getClass().getField( fieldName ); - - return field.getInt( this ); - } - catch ( Exception exception ) - { - // Command does not exist. - return -1; - } - } - - /** - * Parses an address argument into a real email address. This - * method strips off any > or < symbols. - */ - private Address parseAddress( String address ) throws InvalidAddressException - { - - int index = address.indexOf( "<" ); - if ( index != -1 ) - { - address = address.substring( index + 1 ); - } - index = address.indexOf( ">" ); - if ( index != -1 ) - { - address = address.substring( 0, index ); - } - return new Address( address ); - } - - /** - * Returns the message retrieved from the ConfigurationManager. - * - * @param messageName name of the message to retrieve. - * @return the message text. - * - * @todo use the i18n component. - */ - private String getMessage( String messageName ) - { - return "We need i18n component for: " + messageName; - } - - /** - * Returns a message from the ConfigurationManager formatted using the - * MessageFormat class and the specified arguments. - * - * @param messageName name of the message to retrieve. - * @param arguments objects used to format the message. - * @return the formatted message text. - */ - private String getMessage( String messageName, String[] arguments ) - { - return MessageFormat.format( getMessage( messageName ), arguments ); - } - - public void writeLine( Socket c, String s ) - { - } - - // ---------------------------------------------------------------------- - // Lifecylce Management - // ---------------------------------------------------------------------- - - /** @see org.apache.avalon.framework.service.Serviceable#service */ - public void service( ServiceManager serviceManager ) - throws ServiceException - { - queue = (Queue) serviceManager.lookup( Queue.ROLE ); - } - - /** @see org.apache.avalon.framework.configuration.Configurable#configure */ - public void configure( Configuration configuration ) - throws ConfigurationException - { - domain = configuration.getChild( "domain" ).getValue(); - } - - /** @see org.apache.avalon.framework.activity.Initializable#initialize */ - public void initialize() - throws Exception - { - state = STATE_INITIAL; - - readMode = READ_COMMAND; - - data = new StringBuffer( DATA_BUFFER_SIZE ); - - random = new Random(); - - message = new SmtpMessage( generateSMTPId() ); - } - - public void dispose() - { - } -} diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/delivery/DefaultDeliveryManager.java b/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/delivery/DefaultDeliveryManager.java deleted file mode 100644 index 4ee432596..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/delivery/DefaultDeliveryManager.java +++ /dev/null @@ -1,105 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp.delivery; - -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.smtp.delivery.DeliveryProcessor; -import org.codehaus.plexus.smtp.delivery.FileDeliveryProcessor; -import org.codehaus.plexus.smtp.delivery.DeliveryManager; - -public class DefaultDeliveryManager - extends AbstractLogEnabled - implements Configurable, DeliveryManager -{ - private Configuration configuration; - - /** - * Gets a reference to the configurationManager. - */ - public DefaultDeliveryManager() - { - } - - /** @see org.apache.avalon.framework.configuration.Configurable#configure */ - public void configure( Configuration configuration ) - throws ConfigurationException - { - this.configuration = configuration; - } - - /** - * Returns the DeliveryProcessor that should be used to - * deliver messages to the specified domain. - * - * @param domain Internet domain name. - * @return the DeliveryProcessor implementation to use. - */ - public DeliveryProcessor getDeliveryProcessor( String domain ) - { - domain = domain.trim(); - boolean isLocal = false; - - Configuration[] domains = configuration.getChildren( "domain" ); - - for ( int index = 0; index < domains.length; index++ ) - { - if ( domains[index].getValue( "" ).equalsIgnoreCase( domain ) ) - { - isLocal = true; - break; - } - } - - // Return the local Delivery processor or the remote - // one. - if ( isLocal ) - { - return new FileDeliveryProcessor(); - } - else - { - return new SmtpDeliveryProcessor(); - } - } -} diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/delivery/DeliveryManager.java b/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/delivery/DeliveryManager.java deleted file mode 100644 index 8291677e0..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/delivery/DeliveryManager.java +++ /dev/null @@ -1,66 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp.delivery; - -import org.codehaus.plexus.smtp.delivery.DeliveryProcessor; - -/** - * Manages the delivery rules for incoming SMTP messages. When the - * delivery service is ready to send a message, it will check with - * the DeliveryManager implementation to determine which DeliveryProcessor - * to use to deliver the message. - * - * @author Eric Daugherty - */ -public interface DeliveryManager -{ - public static String ROLE = DeliveryManager.class.getName(); - - /** - * Returns the DeliveryProcessor that should be used to - * deliver messages to the specified domain. - * - * @param domain Internet domain name. - * @return the DeliveryProcessor implementation to use. - */ - DeliveryProcessor getDeliveryProcessor( String domain ); - -} diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/delivery/DeliveryProcessor.java b/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/delivery/DeliveryProcessor.java deleted file mode 100644 index b6d51af9a..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/delivery/DeliveryProcessor.java +++ /dev/null @@ -1,72 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp.delivery; - -import org.codehaus.plexus.smtp.SmtpMessage; - -import java.util.List; - -/** - * Handles the delivery of SMTPMessages. - * - * @author Eric Daugherty - */ -public interface DeliveryProcessor -{ - public static String ROLE = DeliveryProcessor.class.getName(); - - /** - * Delivers the specified message to the addresses specified. The - * addresses map contains a Map keyed by domain name, with a List of - * Address instances as values. - * - * Once a message has been successfully delivered (or a permanant error - * occurs) to an address, the address - * should be removed from the SMTPMessage. Otherwise, delivery will - * be reattempted for the addresses. - * - * @param message the message to deliver. - * @param domain the domain to deliver the message to for these addresses. - * @param addresses List of addresses that all get delivered to this domain. - */ - void deliverMessage( SmtpMessage message, String domain, List addresses ); - -} diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/delivery/FileDeliveryProcessor.java b/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/delivery/FileDeliveryProcessor.java deleted file mode 100644 index 11727bc49..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/delivery/FileDeliveryProcessor.java +++ /dev/null @@ -1,112 +0,0 @@ -package org.codehaus.plexus.smtp.delivery; - -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.smtp.Address; -import org.codehaus.plexus.smtp.SmtpMessage; -import org.codehaus.plexus.smtp.mailbox.MailboxManager; -import org.codehaus.plexus.smtp.mailbox.Mailbox; -import org.apache.avalon.framework.service.Serviceable; -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; - -import java.util.Iterator; -import java.util.List; - -public class FileDeliveryProcessor - extends AbstractLogEnabled - implements Serviceable, DeliveryProcessor -{ - private MailboxManager mailboxManager; - - public FileDeliveryProcessor() - { - } - - // ---------------------------------------------------------------------- - // Lifecylce Management - // ---------------------------------------------------------------------- - - /** @see org.apache.avalon.framework.service.Serviceable#service */ - public void service( ServiceManager serviceManager ) - throws ServiceException - { - mailboxManager = (MailboxManager) serviceManager.lookup( MailboxManager.ROLE ); - } - - /** - * Delivers the specified message to the addresses specified. - * - * Once a message has been successfully delivered (or a permanant error - * occurs) to an address, the address - * should be removed from the SMTPMessage. Otherwise, delivery will - * be reattempted for the addresses. - * - * @param message the message to deliver. - * @param domain the domain to deliver the message to for these addresses. - * @param addresses List of addresses that all get delivered to this domain. - */ - public void deliverMessage( SmtpMessage message, String domain, List addresses ) - { - if ( getLogger().isDebugEnabled() ) - { - getLogger().debug( "Attempting to deliver message: " + message.getId() + " to local file mailboxes." ); - } - - // Attempt to deliver the message to each address. - Iterator addressIterator = addresses.iterator(); - while ( addressIterator.hasNext() ) - { - Address address = (Address) addressIterator.next(); - - try - { - String mailboxId = mailboxManager.validateAddress( address ); - - // If the address is a valid local address, deliver it. - if ( mailboxId != null ) - { - - // Lock the mailbox. - Mailbox mailbox = mailboxManager.lockMailbox( mailboxId ); - - // If we locked the mailbox, deliver the message. - if ( mailbox != null ) - { - mailbox.deliverMessage( message ); - mailbox.commitUpdates(); - message.removeAddress( address ); - if ( getLogger().isDebugEnabled() ) - { - getLogger().debug( "Delivery successful for address: " + address.toString() + - " for message: " + message.getId() ); - } - } - // If we did not lock the mailbox, fail the delivery for this address. - else - { - if ( getLogger().isInfoEnabled() ) - { - getLogger().info( "Delivery failed for address: " + address.toString() + - " because the mailbox could not be locked." ); - } - } - } - // The address is invalid, so bounce the email. - else - { - if ( getLogger().isInfoEnabled() ) - { - getLogger().info( "Delivery failed for address: " + address.toString() + - " because it does not map to a known mailbox." ); - } - //TODO: Build bounce logic. - } - } - catch ( Throwable throwable ) - { - getLogger().warn( "Delivery failed for address: " + address.toString() + - " for message: " + message.getId() + " due to: " + throwable, throwable ); - } - } - } -} diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/delivery/SmtpDeliveryProcessor.java b/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/delivery/SmtpDeliveryProcessor.java deleted file mode 100644 index a179de9eb..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/delivery/SmtpDeliveryProcessor.java +++ /dev/null @@ -1,415 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp.delivery; - -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.service.Serviceable; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.smtp.Address; -import org.codehaus.plexus.smtp.SmtpMessage; -import org.codehaus.plexus.smtp.delivery.DeliveryProcessor; -import org.codehaus.plexus.dns.DNSResolver; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintWriter; -import java.net.Socket; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; - -public class SmtpDeliveryProcessor - extends AbstractLogEnabled - implements Serviceable, Configurable, DeliveryProcessor -{ - /** - * The DNSResolver Plugin Implementation - */ - private DNSResolver dnsResolver; - - /** Writer to sent data to the client */ - private PrintWriter out; - /** Reader to read data from the client */ - private BufferedReader in; - - private String domain; - - //*************************************************************** - // Constructor - //*************************************************************** - - public SmtpDeliveryProcessor() - { - } - - // ---------------------------------------------------------------------- - // Lifecylce Management - // ---------------------------------------------------------------------- - - /** @see org.apache.avalon.framework.service.Serviceable#service */ - public void service( ServiceManager serviceManager ) - throws ServiceException - { - dnsResolver = (DNSResolver) serviceManager.lookup( DNSResolver.ROLE ); - } - - /** @see org.apache.avalon.framework.configuration.Configurable#configure */ - public void configure( Configuration configuration ) - throws ConfigurationException - { - domain = configuration.getChild( "domain" ).getValue(); - } - - - //*************************************************************** - // DeliveryProcessor Interface Methods - //*************************************************************** - - /** - * Delivers the specified message to the addresses specified. - * - * Once a message has been successfully delivered (or a permanant error - * occurs) to an address, the address - * should be removed from the SMTPMessage. Otherwise, delivery will - * be reattempted for the addresses. - * - * @param message - * @param addresses Map keyed by domain name, with a List of Address instances as values. - */ - public void deliverMessage( SmtpMessage message, String domain, List addresses ) - { - Collection serverAddresses = dnsResolver.getMXEntries( domain ); - - Socket socket = null; - - Iterator serverAddressIterator = serverAddresses.iterator(); - String address; - while ( serverAddressIterator.hasNext() ) - { - address = (String) serverAddressIterator.next(); - try - { - socket = new Socket( address, 25 ); - if ( getLogger().isDebugEnabled() ) - { - getLogger().debug( "Connected to: " + address + " for delivery of message: " + - message.getId() + " to domain: " + domain ); - } - break; - } - catch ( IOException e ) - { - if ( getLogger().isDebugEnabled() ) getLogger().debug( "Unable to connect to remote SMPT Server: " - + address + " from SMPT delivery." ); - } - } - - if ( socket == null ) - { - if ( getLogger().isInfoEnabled() ) - { - getLogger().info( "Unable to make a connection any SMTP server for domain: " + domain ); - } - - return; - } - - try - { - //Get the input and output streams. - out = new PrintWriter( socket.getOutputStream(), true ); - in = new BufferedReader( new InputStreamReader( socket.getInputStream() ) ); - - //Perform initial commands - List successfulAddresses = new ArrayList(); - List rejectedAddresses = new ArrayList(); - - sendIntro( addresses, message, successfulAddresses, rejectedAddresses ); - - if ( successfulAddresses.size() > 0 ) - { - //Send message data - sendData( message ); - if ( getLogger().isInfoEnabled() ) logDelivery( message, successfulAddresses, true ); - } - - //Close the connection. - sendClose(); - - if ( rejectedAddresses.size() > 0 ) - { - // Send Rejection Emails. - // TODO: Rejection Emails. - if ( getLogger().isInfoEnabled() ) - { - logDelivery( message, rejectedAddresses, false ); - } - } - - message.removeAddresses( successfulAddresses ); - message.removeAddresses( rejectedAddresses ); - - } - catch ( IOException ioe ) - { - getLogger().warn( "IOException occured while talking to remote domain: " + domain ); - } - catch ( Exception exception ) - { - getLogger().warn( "Unexpected response from remote SMTP Server for domain: " + domain ); - } - finally - { - if ( socket != null ) - { - try - { - socket.close(); - } - catch ( IOException ioe ) - { - // Not a big deal. - getLogger().debug( "Error closing socket: " + ioe ); - } - } - } - } - - /** - * Sends all the commands neccessary to prepare the remote server - * to receive the data command. - */ - private void sendIntro( List addresses, SmtpMessage message, List successAddresses, List rejectedAddresses ) throws Exception - { - //Check to make sure remote server introduced itself with appropriate message. - validateInput( read(), "220" ); - - //Send HELO command to remote server. - write( "HELO " + domain ); - validateInput( read(), "250" ); - - //Send MAIL FROM: command - write( "MAIL FROM:<" + message.getFromAddress().toString() + ">" ); - validateInput( read(), "250" ); - - //Send RCTP TO: command - Iterator addressIterator = addresses.iterator(); - Address address; - while ( addressIterator.hasNext() ) - { - address = (Address) addressIterator.next(); - write( "RCPT TO:<" + address.toString() + ">" ); - if ( read().startsWith( "250" ) ) - { - if ( getLogger().isDebugEnabled() ) getLogger().debug( "Address " + address + " accepted." ); - successAddresses.add( address ); - } - else - { - if ( getLogger().isDebugEnabled() ) getLogger().debug( "Address " + address + " rejected." ); - rejectedAddresses.add( address ); - } - } - } - - /** - * This method sends the data command and all the message data to the - * remote server. - */ - private void sendData( SmtpMessage message ) throws Exception - { - //Send Data command - write( "DATA" ); - validateInput( read(), "354" ); - - writeData( message.getData() ); - - //Send the command end data transmission. - write( "." ); - - validateInput( read(), "250" ); - } - - private void sendClose() - { - - write( "QUIT" ); - // Who cares.. no reason to validate the input. - read(); - //validateInput( read(), "221" ); - } - - /** - * Returns the response code generated by the server. - * This method will handle multi-line responses, but will - * only log the responses, and discard the text, returning - * only the 3 digit response code. - * - * @return 3 digit response string. - */ - private String read() - { - try - { - String responseCode; - - //Read in the first line. This is the only line - //we really care about, since the response code - //must be the same on all lines. - String inputText = in.readLine(); - if ( inputText == null ) - { - inputText = ""; - } - else - { - inputText = inputText.trim(); - } - - if ( getLogger().isInfoEnabled() ) - { - getLogger().info( "SMTPDeliveryProcessor Input: " + inputText ); - } - if ( inputText.length() < 3 ) - { - getLogger().info( "SMTP Response too short. Aborting Send. Response: " + inputText ); - return null; - } - - //Strip of the response code. - responseCode = inputText.substring( 0, 3 ); - - //Handle Multi-Line Responses. - while ( ( inputText.length() >= 4 ) && inputText.substring( 3, 4 ).equals( "-" ) ) - { - inputText = in.readLine().trim(); - if ( getLogger().isInfoEnabled() ) - { - getLogger().info( "SMTPDeliveryProcessorInput: " + inputText ); - } - } - - return responseCode; - } - catch ( IOException ioe ) - { - getLogger().debug( "Error reading from socket, closing connection." ); - return null; - } - } - - /** - * Writes the specified output message to the client. - */ - private void write( String message ) - { - if ( getLogger().isInfoEnabled() ) getLogger().info( "SMTPDeliveryProcessor Output: " + message ); - out.print( message + "\r\n" ); - out.flush(); - } - - /** - * Same as write w/o the logging. - * @param data - */ - private void writeData( String data ) - { - if ( getLogger().isDebugEnabled() ) - { - getLogger().debug( "SMTPDeliveryProcessor Output:\r\n" + data ); - } - else if ( getLogger().isInfoEnabled() ) - { - getLogger().debug( "SMTPDeliveryProcessor Output: " ); - } - - out.print( data + "\r\n" ); - out.flush(); - } - - protected void logDelivery( SmtpMessage message, List addresses, boolean success ) - { - - // Log the delivered addresses. - StringBuffer logMessage = new StringBuffer(); - logMessage.append( "Message: " ); - logMessage.append( message.getId() ); - if ( success ) - { - logMessage.append( " successfully delivered to: " ); - } - else - { - logMessage.append( " rejected for delivery to: " ); - } - Iterator addressIterator = addresses.iterator(); - while ( addressIterator.hasNext() ) - { - logMessage.append( addressIterator.next() ); - logMessage.append( ", " ); - } - int length = logMessage.length(); - logMessage.delete( length - 2, length ); - getLogger().info( logMessage.toString() ); - } - - /** - * Validates the input from the remote server. - * - * @param input the entire line read. - * @param expected the expected first 3 charecters - * @throws java.lang.Exception thrown if the input does not match the expected. - */ - private void validateInput( String input, String expected ) throws Exception - { - if ( input == null || !input.startsWith( expected ) ) - { - getLogger().info( "Incorrect response read from remote server. Expected response to begin with \"220\"." ); - throw new Exception( "Incorrect response read from remote server. Expected response to begin with \"220\"." ); - } - } -} diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/mailbox/FileMailbox.java b/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/mailbox/FileMailbox.java deleted file mode 100644 index 4896281d4..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/mailbox/FileMailbox.java +++ /dev/null @@ -1,281 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp.mailbox; - -import org.codehaus.plexus.smtp.SmtpMessage; - -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.io.Reader; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -/** - * Implemenets the Mailbox interface to provide a File (directory) based - * mailbox implementation. - * - * @author Eric Daugherty - */ -public class FileMailbox implements Mailbox -{ - //*************************************************************** - // Variables - //*************************************************************** - - /** - * The MailboxManager that manages this mailbox. - */ - private FileMailboxManager fileMailboxManager; - - /** - * The mailboxId of this mailbox instance. - */ - private String mailboxId; - - /** - * The directory that represents the current mailbox. - */ - private File mailboxDirectory; - - /** - * A list of the messages marked for deletion - */ - private List deletedIds; - - //*************************************************************** - // Constructor - //*************************************************************** - - public FileMailbox( FileMailboxManager fileMailboxManager, String mailboxId, File mailboxDirectory ) - { - this.fileMailboxManager = fileMailboxManager; - this.mailboxId = mailboxId; - this.mailboxDirectory = mailboxDirectory; - deletedIds = new ArrayList(); - } - - //*************************************************************** - // Mailbox Methods - //*************************************************************** - - /** - * Returns the total number of messages currently stored in this mailbox. - * - * @return the number of messages stored. - */ - public long getMessageCount() - { - return mailboxDirectory.listFiles().length; - } - - /** - * Returns the total size of the mailbox in bytes. - * - * @return the size (in bytes) of the entire maibox. - */ - public long getMailboxSize() - { - long size = 0; - File[] files = mailboxDirectory.listFiles(); - for ( int index = 0; index < files.length; index++ ) - { - size = files[index].length(); - } - - return size; - } - - /** - * Returns the message ID for each message. - * - * @return an array of the message IDs of the messages in this mailbox. - */ - public String[] getMessageIds() - { - File[] files = mailboxDirectory.listFiles(); - String[] messageIds = new String[files.length]; - for ( int index = 0; index < files.length; index++ ) - { - messageIds[index] = files[index].getName(); - } - - return messageIds; - } - - /** - * Returns the size (in bytes) of the specified message. - * - * @param messageId the unique ID of the message. - * @return the size (in bytes) of the specified message. - */ - public long getMessageSize( String messageId ) - { - File message = new File( mailboxDirectory, messageId ); - return message.length(); - } - - /** - * Returns a java.io.Reader which is positioned to read - * the message from the storage system. - *

- * The client should close the Reader once the message has - * been retrieved. - * - * @param messageId the unique ID of the message - * @return a Reader that can access the message data. - * @throws java.io.IOException thrown if there is an error accessing the message. - */ - public Reader getMessage( String messageId ) throws IOException - { - File message = new File( mailboxDirectory, messageId ); - return new FileReader( message ); - } - - /** - * Marks a message for deletion. The message will actually be - * deleted once the commitUpdates() method is called. - * - * @param messageId - * @throws java.io.IOException thrown if there is an error accessing the mailbox - */ - public void deleteMessage( String messageId ) throws IOException - { - deletedIds.add( messageId ); - } - - /** - * Indicates whether the specified message is already marked - * for deletion. - * - * @param messageId the unique ID of the message. - * @return true if the messages is marked for deletion. - * @throws java.io.IOException thrown if there is an error accessing the mailbox - */ - public boolean isMessageDeleted( String messageId ) throws IOException - { - return deletedIds.contains( messageId ); - } - - /** - * Clears the deleted flag on all messages. - * - * @throws java.io.IOException thrown if there is an error accessing the mailbox - */ - public void resetDeleteFlags() throws IOException - { - deletedIds = new ArrayList(); - } - - /** - * Stores the specified message for retrieval. - * - * @param message the message to deliver. - * @throws java.io.IOException thrown if there is an error accessing the mailbox - */ - public void deliverMessage( SmtpMessage message ) throws IOException - { - File messageFile = new File( mailboxDirectory, message.getId() ); - - if ( messageFile.createNewFile() ) - { - String messageData = message.getData(); - FileWriter fileWriter = new FileWriter( messageFile ); - try - { - fileWriter.write( messageData ); - } - finally - { - fileWriter.close(); - } - } - else - { - throw new IOException( "Error creating message file: " + messageFile.getAbsolutePath() ); - } - } - - /** - * Commits any changes and release the mailbox lock. - * - * @throws java.io.IOException thrown if there is an error accessing the mailbox - */ - public void commitUpdates() throws IOException - { - deleteMessages(); - fileMailboxManager.unlockMailbox( mailboxId ); - } - - /** - * Clear all changes made to the mailbox and release the mailbox lock. - */ - public void rollbackUpdates() - { - fileMailboxManager.unlockMailbox( mailboxId ); - } - - //*************************************************************** - // Private Methods - //*************************************************************** - - /** - * Removes all messages marked for deletion from disk. - * - * @throws java.io.IOException thrown if any error occurs while removing a message. - */ - private void deleteMessages() throws IOException - { - Iterator messages = deletedIds.iterator(); - File messageFile; - - while ( messages.hasNext() ) - { - messageFile = new File( mailboxDirectory, (String) messages.next() ); - if ( !messageFile.delete() ) - { - throw new IOException( "Unable to delete message: " + messageFile.getAbsolutePath() ); - } - } - } -} diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/mailbox/FileMailboxManager.java b/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/mailbox/FileMailboxManager.java deleted file mode 100644 index 70813888d..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/mailbox/FileMailboxManager.java +++ /dev/null @@ -1,384 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp.mailbox; - -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.smtp.Address; -import org.codehaus.plexus.smtp.mailbox.FileMailbox; - -import java.io.File; -import java.net.InetAddress; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.util.Calendar; -import java.util.Collections; -import java.util.GregorianCalendar; -import java.util.HashMap; -import java.util.Map; - -/** - * Provides an implementation of the MailboxManager interface that uses the - * local file system to store messages. - * - * @author Eric Daugherty - */ -public class FileMailboxManager - extends AbstractLogEnabled - implements Configurable, Initializable, MailboxManager -{ - public static final String CONFIGURATION_PREFIX = "filemailbox."; - - public static final String MAILBOX_PATH_PARAMETER = CONFIGURATION_PREFIX + "root.dir"; - - private File rootDirectory; - - private Map mailboxLocks; - - private Configuration configuration; - - //*************************************************************** - // Constructor - //*************************************************************** - - /** - * Initializes the using the file path from the ConfigurationManager. - */ - public FileMailboxManager() - { - } - - // ---------------------------------------------------------------------- - // Lifecylce Management - // ---------------------------------------------------------------------- - - /** @see org.apache.avalon.framework.configuration.Configurable#configure */ - public void configure( Configuration configuration ) - throws ConfigurationException - { - this.configuration = configuration; - - rootDirectory = new File( configuration.getChild( "root-directory" ).getValue() ); - } - - public void initialize() - throws Exception - { - mailboxLocks = Collections.synchronizedMap( new HashMap() ); - - // Verify that it exists, and create it if it does not. - if ( !rootDirectory.exists() ) - { - if ( getLogger().isDebugEnabled() ) getLogger().debug( "Mailbox Root Directory does not exist ( " + rootDirectory.getAbsolutePath() + " ). Creating..." ); - - if ( !rootDirectory.mkdirs() ) - - { - getLogger().error( "Unable to create Maibox Root Directory ( " + rootDirectory.getAbsolutePath() + " ). Unable to initialize FileMaiboxValidator Plugin." ); - throw new RuntimeException( "Unable to create Maibox Root Directory ( " + rootDirectory.getAbsolutePath() + " ). Unable to initialize FileMaiboxValidator Plugin." ); - } - } - - // If the rootDirectory refers to a file or other non-directory, throw an error. - if ( !rootDirectory.isDirectory() ) - { - getLogger().error( "Mailbox Root Directory ( " + rootDirectory.getAbsolutePath() + " ) is not a directory!. Unable to initialize FileMaiboxValidator Plugin." ); - throw new RuntimeException( "Mailbox Root Directory ( " + rootDirectory.getAbsolutePath() + " ) is not a directory!. Unable to initialize FileMaiboxValidator Plugin." ); - } - } - - //*************************************************************** - // MailboxManager Methods - //*************************************************************** - - /** - * Verifies whether connections should be accepted from the - * specified client address. - * - * @param address client's Internet address - * @return true if it is acceptable. - */ - public boolean acceptClient( InetAddress address ) - { - // Do not filter clients - return true; - } - - /** - * Verifies whether the specified user is a local user. - *

- * This class is called when the processor accepts a username - * from the client. Implementations may choose to always - * return true and delay the validation until after the - * password has been specified. Performing this validation - * will provide more information to the user, but may cause - * security concerns (username harvesting). - * - * @param userName the username specified by the client. - * @return true if the username is valid, false otherwise. - */ - public boolean validateUser( String userName ) - { - // Only verify users on validateMailbox - return true; - } - - /** - * Verfies that the specified login criteria match an existing - * mailbox. If they match, the mailbox id is returned. This - * id can be used by the openMailbox method to access the mailbox. - * If they do not match, -1 is returned. - * - * @param userName the username specified by the client. - * @param password the password specified by the client. - * @return the mailbox's id, if matched, or null the mailbox does not exist. - */ - public String valiateMailbox( String userName, String password ) - { - String mailboxId = null; - - userName = userName.toLowerCase(); - String realPassword = configuration.getChild( CONFIGURATION_PREFIX + "user." + userName + ".password" ).getValue( null ); - - // If the user specified password is valid, encrypt it. - // the realPassword is already encrypted. - if ( password != null ) - { - password = encryptPassword( password ); - } - - // Verify the password. - if ( password == null || realPassword == null || !password.equals( realPassword ) ) - { - getLogger().info( "Authentication failed for user: " + userName ); - } - - // Load the mailbox ID - else - { - mailboxId = configuration.getChild( CONFIGURATION_PREFIX + "user." + userName + ".mailbox" ).getValue( null ); - if ( mailboxId == null || mailboxId.length() == 0 ) - { - mailboxId = null; - getLogger().error( "User " + userName + " has a valid password, but is not assigned a mailbox." ); - } - else - { - if ( getLogger().isInfoEnabled() ) getLogger().info( "User: " + userName + " successfully authenticated." ); - } - } - - return mailboxId; - } - - /** - * Determines which mailbox mail addressed to the the specified address - * should be delivered. If the address is invalid, null is returned. - * - * @param address email address of mailbox to deliver to. - * @return the mailboxId the mail should be delivered to, or null if the address is invalid. - */ - public String validateAddress( Address address ) - { - String userName = address.getUsername().toLowerCase(); - String realPassword = configuration.getChild( CONFIGURATION_PREFIX + "user." + userName + ".password" ).getValue( null ); - - // If the user is defined then open the mailbox. - if ( realPassword != null ) - { - return userName; - } - - return null; - } - - /** - * Opens a mailbox for exclusive access. The mailboxId should be - * retrieved using the validateMailbox method. - * - * @param mailboxId the unique id for the requested mailbox. - * @return a Mailbox opened for exclusive access. - */ - public synchronized Mailbox lockMailbox( String mailboxId ) - { - - // Get the mailbox's directory and validate it. - File mailboxDirectory = getMailboxDirectory( mailboxId ); - if ( mailboxDirectory == null ) - { - return null; - } - - // If there is a lock, verify it is still valid. - if ( mailboxLocks.containsKey( mailboxId ) ) - { - // Get the time the file was last touched. - Long lockTime = (Long) mailboxLocks.get( mailboxId ); - GregorianCalendar lastModified = new GregorianCalendar(); - lastModified.setTimeInMillis( lockTime.longValue() ); - - // Get the oldest valid lock file. - GregorianCalendar unlockTime = new GregorianCalendar(); - unlockTime.setTimeInMillis( System.currentTimeMillis() ); - unlockTime.roll( Calendar.MINUTE, -5 ); - - // If the lock file is too old, remove it. - if ( lastModified.before( unlockTime ) ) - { - if ( getLogger().isInfoEnabled() ) getLogger().info( "Lock timed out for mailbox: " + mailboxId ); - mailboxLocks.remove( mailboxId ); - } - } - - // Lock mailbox if unlocked. - if ( !mailboxLocks.containsKey( mailboxId ) ) - { - mailboxLocks.put( mailboxId, new Long( System.currentTimeMillis() ) ); - if ( getLogger().isInfoEnabled() ) getLogger().info( "Mailbox: " + mailboxId + " successfully locked." ); - if ( getLogger().isDebugEnabled() ) getLogger().debug( "Mailbox: " + mailboxId + " using directory: " + mailboxDirectory.getAbsolutePath() ); - return new FileMailbox( this, mailboxId, mailboxDirectory ); - } - else - { - if ( getLogger().isInfoEnabled() ) getLogger().info( "Unable to aquire lock for mailbox: " + mailboxId + " because it is already locked" ); - return null; - } - } - - //*************************************************************** - // Public Utility Methods - //*************************************************************** - - /** - * Unlocks a mailbox. - * - * @param mailboxId the unique ID of the mailbox. - */ - synchronized void unlockMailbox( String mailboxId ) - { - mailboxLocks.remove( mailboxId ); - if ( getLogger().isInfoEnabled() ) getLogger().info( "Mailbox: " + mailboxId + " successfully unlocked." ); - } - - /** - * Creates a one-way has of the specified password. This allows passwords to be - * safely stored without exposing the original plain text password. - * - * @param password the password to encrypt. - * @return the encrypted password, or null if encryption failed. - */ - public String encryptPassword( String password ) - { - - try - { - MessageDigest md = MessageDigest.getInstance( "SHA" ); - - // Conver the password to bytes and hash it. - md.update( password.getBytes() ); - byte[] hash = md.digest(); - - // Convert the hashed password back to a string. - int hashLength = hash.length; - StringBuffer hashStringBuf = new StringBuffer(); - String byteString; - int byteLength; - - // Convert each byte back to char in a string. - for ( int index = 0; index < hashLength; index++ ) - { - - byteString = String.valueOf( hash[index] + 128 ); - - //Pad string to 3. Otherwise hash may not be unique. - byteLength = byteString.length(); - switch ( byteLength ) - { - case 1: - byteString = "00" + byteString; - break; - case 2: - byteString = "0" + byteString; - break; - } - hashStringBuf.append( byteString ); - } - - return hashStringBuf.toString(); - } - catch ( NoSuchAlgorithmException nsae ) - { - getLogger().error( "Error getting password hash: " + nsae.getMessage() ); - return null; - } - } - - //*************************************************************** - // Private Utility Methods - //*************************************************************** - - /** - * Returns a file that references a specific mailbox's directory. - * - * @param mailboxId the unique id of the mailbox. - * @return the mailbox directory File, or null if it could not be found or created. - */ - private File getMailboxDirectory( String mailboxId ) - { - File mailboxDirectory = new File( rootDirectory, mailboxId ); - - // Verify the directory exists. If not, create it. - if ( !mailboxDirectory.exists() ) - { - if ( !mailboxDirectory.mkdirs() ) - { - getLogger().error( "Unable to create mailbox: " + mailboxId + " directory: " + mailboxDirectory.getAbsolutePath() ); - mailboxDirectory = null; - } - } - - return mailboxDirectory; - } - -} diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/mailbox/Mailbox.java b/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/mailbox/Mailbox.java deleted file mode 100644 index e7d82b904..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/mailbox/Mailbox.java +++ /dev/null @@ -1,100 +0,0 @@ -package org.codehaus.plexus.smtp.mailbox; - -import org.codehaus.plexus.smtp.SmtpMessage; - -import java.io.IOException; -import java.io.Reader; - -public interface Mailbox -{ - public static String ROLE = Mailbox.class.getName(); - - /** - * Returns the total number of messages currently stored in this mailbox. - * - * @return the number of messages stored. - */ - long getMessageCount(); - - /** - * Returns the total size of the mailbox in bytes. - * - * @return the size (in bytes) of the entire maibox. - */ - long getMailboxSize(); - - /** - * Returns the message ID for each message. - * - * @return an array of the message IDs of the messages in this mailbox. - */ - String[] getMessageIds(); - - /** - * Returns the size (in bytes) of the specified message. - * - * @param messageId the unique ID of the message. - * @return the size (in bytes) of the specified message. - */ - long getMessageSize( String messageId ); - - /** - * Returns a java.io.Reader which is positioned to read - * the message from the storage system. - *

- * The client should close the Reader once the message has - * been retrieved. - * - * @param messageId the unique ID of the message - * @return a Reader that can access the message data. - * @throws java.io.IOException thrown if there is an error accessing the message. - */ - Reader getMessage( String messageId ) throws IOException; - - /** - * Marks a message for deletion. The message will actually be - * deleted once the commitUpdates() method is called. - * - * @param messageId - * @throws java.io.IOException thrown if there is an error accessing the mailbox - */ - void deleteMessage( String messageId ) throws IOException; - - /** - * Indicates whether the specified message is already marked - * for deletion. - * - * @param messageId the unique ID of the message. - * @return true if the messages is marked for deletion. - * @throws java.io.IOException thrown if there is an error accessing the mailbox - */ - boolean isMessageDeleted( String messageId ) throws IOException; - - /** - * Clears the deleted flag on all messages. - * - * @throws java.io.IOException thrown if there is an error accessing the mailbox - */ - void resetDeleteFlags() throws IOException; - - /** - * Stores the specified message for retrieval. - * - * @param message the message to deliver. - * @throws java.io.IOException thrown if there is an error accessing the mailbox - */ - void deliverMessage( SmtpMessage message ) throws IOException; - - /** - * Commits any changes and release the mailbox lock. - * - * @throws java.io.IOException thrown if there is an error accessing the mailbox - */ - void commitUpdates() throws IOException; - - /** - * Clear all changes made to the mailbox and release the mailbox lock. - */ - void rollbackUpdates(); - -} diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/mailbox/MailboxManager.java b/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/mailbox/MailboxManager.java deleted file mode 100644 index 06dce3ea1..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/mailbox/MailboxManager.java +++ /dev/null @@ -1,66 +0,0 @@ -package org.codehaus.plexus.smtp.mailbox; - -import org.codehaus.plexus.smtp.Address; -import org.codehaus.plexus.smtp.mailbox.Mailbox; - -import java.net.InetAddress; - -public interface MailboxManager -{ - public static String ROLE = MailboxManager.class.getName(); - - /** - * Verifies whether connections should be accepted from the - * specified client address. - * - * @param address client's Internet address - * @return true if it is acceptable. - */ - boolean acceptClient( InetAddress address ); - - /** - * Verifies whether the specified user is a local user. - *

- * This class is called when the processor accepts a username - * from the client. Implementations may choose to always - * return true and delay the validation until after the - * password has been specified. Performing this validation - * will provide more information to the user, but may cause - * security concerns (username harvesting). - * - * @param userName the username specified by the client. - * @return true if the username is valid, false otherwise. - */ - boolean validateUser( String userName ); - - /** - * Verfies that the specified login criteria match an existing - * mailbox. If they match, the mailbox id is returned. This - * id can be used by the openMailbox method to access the mailbox. - * If they do not match, -1 is returned. - * - * @param userName the username specified by the client. - * @param password the password specified by the client. - * @return the mailbox's id, if matched, or null the mailbox does not exist. - */ - String valiateMailbox( String userName, String password ); - - /** - * Determines which mailbox mail addressed to the the specified address - * should be delivered. If the address is invalid, null is returned. - * - * @param address email address of mailbox to deliver to. - * @return the mailboxId the mail should be delivered to, or null if the address is invalid. - */ - String validateAddress( Address address ); - - /** - * Opens a mailbox for exclusive access. The mailboxId should be - * retrieved using the validateMailbox method. - * - * @param mailboxId the unique id for the requested mailbox. - * @return a Mailbox opened for exclusive access. - */ - Mailbox lockMailbox( String mailboxId ); - -} diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/package.html b/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/package.html deleted file mode 100644 index 25ad8e6dd..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/package.html +++ /dev/null @@ -1,12 +0,0 @@ - - -This package defines the basic implementation for each of the components. - -

- -The code defined in this package (and sub packages) should not use any additional dependencies -beyond those used by the core package. This will allow this package to be compiled and provided -with the core API. Implementations that required additional dependencies should be created -under packages that reflect the dependency, such as org.codehaus.jboss, or org.codehaus.nio, etc. - - diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/queue/DeliveryQueueException.java b/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/queue/DeliveryQueueException.java deleted file mode 100644 index 129791c4e..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/queue/DeliveryQueueException.java +++ /dev/null @@ -1,60 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp.queue; - -/** - * Indicates an error occured in the DeliveryQueue implementation and the - * requested action failed. - * - * @author Eric Daugherty - */ -public class DeliveryQueueException extends Exception -{ - - /** - * Default Constructor - */ - public DeliveryQueueException() - { - super(); - } - -} diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/queue/FileQueue.java b/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/queue/FileQueue.java deleted file mode 100644 index b84c95f31..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/queue/FileQueue.java +++ /dev/null @@ -1,418 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp.queue; - -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.smtp.Address; -import org.codehaus.plexus.smtp.SmtpMessage; -import org.codehaus.plexus.smtp.InvalidAddressException; -import org.codehaus.plexus.smtp.queue.Queue; -import org.codehaus.plexus.smtp.queue.DeliveryQueueException; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Date; -import java.util.Iterator; -import java.util.List; -import java.util.StringTokenizer; - -/** - * Provides an implementation of the DeliveryQueue interface that - * uses simple flat files to persist queued messages. - * - * @author Eric Daugherty - */ -public class FileQueue - extends AbstractLogEnabled - implements Queue -{ - private static final String DELIMITER = "\r\n"; - - //*************************************************************** - // Variables - //*************************************************************** - - private List messages = new ArrayList(); - private File queueDirectory; - - - // ---------------------------------------------------------------------- - // Lifecylce Management - // ---------------------------------------------------------------------- - - /** @see org.apache.avalon.framework.configuration.Configurable#configure */ - public void configure( Configuration configuration ) - throws ConfigurationException - { - queueDirectory = new File( configuration.getChild( "directory" ).getValue() ); - } - - - /** - * Initializes the FileDeliveryQueue using the ConfigurationManager. - *

- * A RuntimeException is thrown if the directory can not be used. - */ - public FileQueue() - { - } - - //*************************************************************** - // DeliveryQueue Interface Methods - //*************************************************************** - - /** - * Adds a message to the queue for delivery. - * - * @param message the new message to process. - */ - public void addMessage( SmtpMessage message ) - throws DeliveryQueueException - { - try - { - saveMessage( message ); - messages.add( message ); - } - catch ( IOException ioException ) - { - getLogger().error( "Unable to save SMTPMessage to a file. Message ID: " + message.getId(), ioException ); - throw new DeliveryQueueException(); - } - - } - - /** - * Returns an Collection containing all the messages - * in the queue for delivery. - *

- * The queue should only return messages that are ready for delivery. If a message - * has a delivery date in the future, it should not be included in this iterator. - *

- * This method should continue to return all the messages with current delivery dates - * for each call. The caller must insure that message delivery is not attempted more - * than once. - * - * @return SMTPMessages to deliver. - */ - public Collection getMessagesForDelivery() - { - List deliveryMessages = new ArrayList(); - Iterator allMessages = messages.iterator(); - SmtpMessage message; - long currentTime = System.currentTimeMillis(); - while ( allMessages.hasNext() ) - { - message = (SmtpMessage) allMessages.next(); - if ( message.getScheduledDelivery().getTime() <= currentTime ) - { - deliveryMessages.add( message ); - } - } - - return deliveryMessages; - } - - /** - * Updates a message in the queue. This should be called when - * a message has been partially delivered. The delivery attempts - * and delivery time should have been updated, and any addresses - * that were successful delievery should be removed from the list. - * - * @param message the updated message. - */ - public void updateMessage( SmtpMessage message ) - { - try - { - saveMessage( message ); - } - catch ( IOException ioException ) - { - getLogger().error( "Unable to save updated SMTPMessage to a file. Message ID: " + message.getId() + " Message may be delivered multiple times!", ioException ); - // No point in throwing an exception here since the message has already been delivered. - } - } - - /** - * Removes the message from the queue, indicating that it has been - * successfully delivered, or delivery has permamnantly failed. - * - * @param message the message to remove. - */ - public void removeMessage( SmtpMessage message ) - { - try - { - deleteMessage( message ); - } - catch ( IOException ioException ) - { - getLogger().error( "Unable to delete SMTPMessage after completed delivery. Message ID: " + message.getId() + " Message removed from memory queue but must be deleted manually.", ioException ); - } - finally - { - // Remove the message from the memory queue, so we don't redeliver it right away. - // Hopefully, the administrator will monitor the log and delete it manually. - messages.remove( message ); - } - } - - //*************************************************************** - // Private Methods - //*************************************************************** - - /** - * Initializes the spool directory and verifies that all the - * parameters have valid values. Loads any queued messages - * that were stored on disk. - */ - public void initialize() - throws Exception - { - if ( !queueDirectory.exists() ) - { - if ( !queueDirectory.mkdirs() ) - { - getLogger().error( "Unable to initialize FileDeliveryQueue. Directory: " + queueDirectory.getAbsolutePath() + " does not exist and could not be created." ); - throw new RuntimeException( "Unable to initialize FileDeliveryQueue. Directory: " + queueDirectory.getAbsolutePath() + " does not exist and could not be created." ); - } - } - else if ( !queueDirectory.isDirectory() ) - { - getLogger().error( "Unable to initialize FileDeliveryQueue. The specified path: " + queueDirectory.getAbsolutePath() + " is not a directory." ); - throw new RuntimeException( "Unable to initialize FileDeliveryQueue. Directory: " + queueDirectory.getAbsolutePath() + " is not a directory." ); - } - - loadMessages(); - } - - /** - * Write the message to disk so it will survive a process restart. - * - * @param message the message to persist. - * @throws java.io.IOException thrown if there is an error writing the file. - */ - private void saveMessage( SmtpMessage message ) throws IOException - { - - File messageFile = new File( queueDirectory, message.getId() ); - FileWriter writer = new FileWriter( messageFile ); - try - { - writer.write( message.getId() ); - writer.write( DELIMITER ); - writer.write( message.getFromAddress().toString() ); - writer.write( DELIMITER ); - writer.write( flattenAddresses( message.getToAddresses() ) ); - writer.write( DELIMITER ); - writer.write( String.valueOf( message.getTimeReceived().getTime() ) ); - writer.write( DELIMITER ); - writer.write( String.valueOf( message.getScheduledDelivery().getTime() ) ); - writer.write( DELIMITER ); - writer.write( String.valueOf( message.getDeliveryAttempts() ) ); - writer.write( DELIMITER ); - writer.write( message.getData() ); - } - finally - { - try - { - if ( writer != null ) - { - writer.close(); - } - } - catch ( IOException e ) - { - getLogger().warn( "Unable to close spool file for SMTPMessage " + message.getId() ); - } - } - } - - /** - * Deletes the queue file for the specified message. - * - * @param message the message to delete. - * @throws java.io.IOException thrown if the file is not deleted successfully. - */ - private void deleteMessage( SmtpMessage message ) throws IOException - { - File messageFile = new File( queueDirectory, message.getId() ); - if ( !messageFile.delete() ) - { - throw new IOException( "Unable to delete file: " + messageFile.getAbsolutePath() ); - } - } - - /** - * Loads all the messages stored in the spool directory. Any errors are logged - * but not thrown. If a message failes, processing continues to the next message. - */ - private void loadMessages() - { - File[] messageFiles = queueDirectory.listFiles(); - - File messageFile; - int numFiles = messageFiles.length; - for ( int index = 0; index < numFiles; index++ ) - { - messageFile = messageFiles[index]; - if ( messageFile.isFile() ) - { - try - { - loadMessage( messageFile ); - } - catch ( IOException ioException ) - { - getLogger().warn( "Unable to load SMTPMessage from file: " + messageFile.getAbsolutePath() + " This message will not be delivered.", ioException ); - } - } - } - } - - /** - * Loads an individual message from disk. - * - * @param messageFile the File that contains the message. - * @throws java.io.IOException thrown if there is any IO error while reading the message. - */ - private void loadMessage( File messageFile ) throws IOException - { - - FileReader fileReader = new FileReader( messageFile ); - BufferedReader reader = new BufferedReader( fileReader ); - - - try - { - SmtpMessage message = new SmtpMessage( reader.readLine() ); - message.setFromAddress( new Address( reader.readLine() ) ); - message.setToAddresses( inflateAddresses( reader.readLine() ) ); - message.setTimeReceived( new Date( Long.parseLong( reader.readLine() ) ) ); - message.setScheduledDelivery( new Date( Long.parseLong( reader.readLine() ) ) ); - message.setDeliveryAttempts( Integer.parseInt( reader.readLine() ) ); - - String inputLine = reader.readLine(); - StringBuffer data = new StringBuffer(); - while ( inputLine != null ) - { - data.append( inputLine ); - data.append( "\r\n" ); - inputLine = reader.readLine(); - } - message.setData( data.toString() ); - - messages.add( message ); - } - catch ( InvalidAddressException invalidAddressException ) - { - throw new IOException( "Unable to parse the address from the stored file." ); - } - catch ( NumberFormatException numberFormatException ) - { - throw new IOException( "Unable to parse the data from the stored file into a number. " + numberFormatException.toString() ); - } - } - - /** - * Converts a Collection of Address - * instances into a comma delimited string. - * - * @param addresses Collection of Address instances. - * @return Comma delimited String of the addresses. - */ - private String flattenAddresses( Collection addresses ) - { - StringBuffer toAddresses = new StringBuffer(); - Address address; - Iterator addressIterator = addresses.iterator(); - while ( addressIterator.hasNext() ) - { - address = (Address) addressIterator.next(); - toAddresses.append( address.toString() ); - toAddresses.append( "," ); - } - - // Remove the last comma. - toAddresses.deleteCharAt( toAddresses.length() - 1 ); - - return toAddresses.toString(); - } - - /** - * Converts a comma delimited string of addresses into a - * Collection of Address instances. - * - * @param addresses Comma delimited String of addresses. - * @return Collection of Address instances. - */ - private Collection inflateAddresses( String addresses ) - { - StringTokenizer addressTokenizer = new StringTokenizer( addresses, "," ); - List addressList = new ArrayList(); - Address address; - - try - { - while ( addressTokenizer.hasMoreTokens() ) - { - address = new Address( addressTokenizer.nextToken() ); - addressList.add( address ); - } - - return addressList; - } - catch ( InvalidAddressException invalidAddressException ) - { - getLogger().error( "Unable to parse to address read from database. Full String is: " + addresses, invalidAddressException ); - throw new RuntimeException( "Error parsing address. Message Delivery Failed." ); - } - } -} diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/queue/MemoryQueue.java b/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/queue/MemoryQueue.java deleted file mode 100644 index 8c4dd3246..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/queue/MemoryQueue.java +++ /dev/null @@ -1,134 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp.queue; - -import org.codehaus.plexus.smtp.SmtpMessage; -import org.codehaus.plexus.smtp.queue.Queue; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; - -/** - * Simple Memory based delivery queue. This delivery queue should only be - * used in cases where the loss of queued messages across process restarts - * is acceptable. - *

- * Because this version is memory only, it will be faster than the - * other alternatives. - *

- * Normal installs should use the FileDeliveryQueue or other persistance - * based DeliveryQueues. - * - * @author Eric Daugherty - */ -public class MemoryQueue - implements Queue -{ - private List messages = new ArrayList(); - - /** - * Adds a message to the queue for delivery. - * - * @param message the new message to process. - */ - public void addMessage( SmtpMessage message ) - { - messages.add( message ); - } - - /** - * Returns a Collection containing all the messages - * in the queue for delivery. - *

- * The queue should only return messages that are ready for delivery. If a message - * has a delivery date in the future, it should not be included in this iterator. - *

- * This method should continue to return all the messages with current delivery dates - * for each call. The caller must insure that message delivery is not attempted more - * than once. - * - * @return SMTPMessages to deliver. - */ - public Collection getMessagesForDelivery() - { - List deliveryMessages = new ArrayList(); - Iterator allMessages = messages.iterator(); - SmtpMessage message; - long currentTime = System.currentTimeMillis(); - while ( allMessages.hasNext() ) - { - message = (SmtpMessage) allMessages.next(); - if ( message.getScheduledDelivery().getTime() <= currentTime ) - { - deliveryMessages.add( message ); - } - } - - return deliveryMessages; - } - - /** - * Updates a message in the queue. This should be called when - * a message has been partially delivered. The delivery attempts - * and delivery time should have been updated, and any addresses - * that were successful delievery should be removed from the list. - * - * @param message the updated message. - */ - public void updateMessage( SmtpMessage message ) - { - // Do nothing, since the message is just in memory, it is already updated. - } - - /** - * Removes the message from the queue, indicating that it has been - * successfully delivered, or delivery has permamnantly failed. - * - * @param message the message to remove. - */ - public void removeMessage( SmtpMessage message ) - { - messages.remove( message ); - } - -} diff --git a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/queue/Queue.java b/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/queue/Queue.java deleted file mode 100644 index cc1e2f141..000000000 --- a/plexus-servers/popd/src/java/org/codehaus/plexus/smtp/queue/Queue.java +++ /dev/null @@ -1,99 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp.queue; - -import org.codehaus.plexus.smtp.SmtpMessage; - -import java.util.Collection; - -/** - * Defines the plugin interface for a DeliveryQueue. The queue's job is - * to persist the messages when they are received and make them - * available provide access to them for delivery. - */ -public interface Queue -{ - /** Role of this component. */ - public static String ROLE = Queue.class.getName(); - - /** - * Adds a message to the queue for delivery. - * - * @param message the new message to process. - * @exception org.codehaus.plexus.smtp.queue.DeliveryQueueException thrown when there is an error adding the message to the queue. - */ - void addMessage( SmtpMessage message ) - throws DeliveryQueueException; - - /** - * Returns an Collection containing all the messages - * in the queue for delivery. - *

- * The queue should only return messages that are ready for delivery. If a message - * has a delivery date in the future, it should not be included in this iterator. - *

- * This method should continue to return all the messages with current delivery dates - * for each call. The caller must insure that message delivery is not attempted more - * than once. - * - * @return SMTPMessages to deliver. - */ - Collection getMessagesForDelivery(); - - /** - * Updates a message in the queue. This should be called when - * a message has been partially delivered. The delivery attempts - * and delivery time should have been updated, and any addresses - * that were successful delievery should be removed from the list. - * - * @param message the updated message. - */ - void updateMessage( SmtpMessage message ); - - /** - * Removes the message from the queue, indicating that it has been - * successfully delivered, or delivery has permamnantly failed. - * - * @param message the message to remove. - */ - void removeMessage( SmtpMessage message ); - -} diff --git a/plexus-servers/popd/src/test/org/codehaus/plexus/smtp/DefaultSmtpServerTest.java b/plexus-servers/popd/src/test/org/codehaus/plexus/smtp/DefaultSmtpServerTest.java deleted file mode 100644 index b9abcf0fb..000000000 --- a/plexus-servers/popd/src/test/org/codehaus/plexus/smtp/DefaultSmtpServerTest.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.codehaus.plexus.smtp; - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.synapse.SynapseServer; - -/** - * - * - * @author Jason van Zyl - * - * @version $Id$ - */ -public class DefaultSmtpServerTest - extends PlexusTestCase -{ - public DefaultSmtpServerTest( String name ) - { - super( name ); - } - - public void testSmtpServer() - throws Exception - { - SynapseServer server = (SynapseServer) lookup( SmtpServer.ROLE ); - - assertNotNull( server ); - - while( true ) - { - } - } -} \ No newline at end of file diff --git a/plexus-servers/popd/src/test/org/codehaus/plexus/smtp/DefaultSmtpServerTest.xml b/plexus-servers/popd/src/test/org/codehaus/plexus/smtp/DefaultSmtpServerTest.xml deleted file mode 100644 index 6c01bffbc..000000000 --- a/plexus-servers/popd/src/test/org/codehaus/plexus/smtp/DefaultSmtpServerTest.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - org.codehaus.plexus.synapse.SynapseServer - org.codehaus.plexus.ircd.server.IrcServer - - - org.codehaus.plexus.synapse.acceptor.SocketAcceptor - org.codehaus.plexus.synapse.acceptor.DefaultSocketAcceptor - - 25 - - - - org.codehaus.plexus.synapse.reactor.Reactor - org.codehaus.plexus.synapse.reactor.DefaultReactor - - - org.codehaus.plexus.synapse.socket.ServerSocketFactory - org.codehaus.plexus.synapse.socket.DefaultServerSocketFactory - - - \ No newline at end of file diff --git a/plexus-servers/project.xml b/plexus-servers/project.xml deleted file mode 100644 index ceda84e9b..000000000 --- a/plexus-servers/project.xml +++ /dev/null @@ -1,175 +0,0 @@ - - - 3 - plexus-server - plexus-server - plexus - Plexus Servers - 1.0 - - Codehaus - http://www.codehaus.org/ - /images/codehaus-small.gif - - 2001 - - org.codehaus.plexus - /../components/images/plexus-servers-logo.gif - - - jakarta - - http://plexus.codehaus.org/servers/${pom.artifactId.substring(7)} - http://jira.codehaus.org/secure/BrowseProject.jspa?id=10080 - - plexus.codehaus.org - /www/plexus.codehaus.org/servers/${pom.artifactId.substring(7)} - - - scm:cvs:pserver:anonymous@cvs.codehaus.org:/scm/cvspublic:/plexus/plexus-servers/${pom.artifactId.substring(7)} - http://cvs.plexus.codehaus.org/plexus-servers/${pom.artifactId.substring(7)}/ - - - - - Plexus Developer List - plexus-dev-request@lists.codehaus.org?subject=subscribe - plexus-dev-request@lists.codehaus.org?subject=unsubscribe - http://lists.codehaus.org/pipermail/plexus-dev/ - - - - Plexus User List - plexus-user-request@lists.codehaus.org?subject=subscribe - plexus-user-request@lists.codehaus.org?subject=unsubscribe - http://lists.codehaus.org/pipermail/plexus-user - - - - Plexus Scm List - plexus-scm-request@lists.codehaus.org?subject=subscribe - plexus-scm-request@lists.codehaus.org?subject=unsubscribe - http://lists.codehaus.org/pipermail/plexus-scm - - - - - - - - - plexus - plexus - 0.14-SNAPSHOT - - - - avalon - avalon-framework - 4.1.4 - - - - plexus - plexus-synapse - 0.1 - - - - - - classworlds - classworlds - 1.1-SNAPSHOT - - - - xstream - xstream - 1.0-SNAPSHOT - - - - xpp3 - xpp3 - 1.1.3.3 - - - - plexus - plexus-utils - 1.0-beta-1 - - - - - - - plexus-dev@lists.codehaus.org - src/java - src/test - - - - **/*Test.java - - - **/Abstract*.java - - - - - src/test - - **/*.xml - **/*.xsd - **/*.vm - **/*.properties - - - - - - - - src/main - - **/*.properties - **/*.vsl - **/*.css - **/*.gif - - - - - - - - maven-changelog-plugin - maven-changes-plugin - maven-developer-activity-plugin - maven-file-activity-plugin - maven-javadoc-plugin - maven-jdepend-plugin - maven-jcoverage-plugin - maven-junit-report-plugin - maven-jxr-plugin - maven-checkstyle-plugin - maven-license-plugin - - - - diff --git a/plexus-servers/smtpd/LICENSE.txt b/plexus-servers/smtpd/LICENSE.txt deleted file mode 100644 index 62ee735f4..000000000 --- a/plexus-servers/smtpd/LICENSE.txt +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Eric Daugherty nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/plexus-servers/smtpd/mail/338ZD468YL426UF405RX b/plexus-servers/smtpd/mail/338ZD468YL426UF405RX deleted file mode 100644 index df6c9488d..000000000 --- a/plexus-servers/smtpd/mail/338ZD468YL426UF405RX +++ /dev/null @@ -1,9 +0,0 @@ -338ZD468YL426UF405RX -jvanzyl@maven.org -jvanzyl@ppo.com -1071564090963 -1071564090963 -0 -Received: from (192.168.1.103 [192.168.1.103]) - by Plexus SMTPD with SMTP ID 338ZD468YL426UF405RX -message diff --git a/plexus-servers/smtpd/maven.xml b/plexus-servers/smtpd/maven.xml deleted file mode 100644 index 53a7aeac6..000000000 --- a/plexus-servers/smtpd/maven.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/plexus-servers/smtpd/project.properties b/plexus-servers/smtpd/project.properties deleted file mode 100644 index 482a37c02..000000000 --- a/plexus-servers/smtpd/project.properties +++ /dev/null @@ -1,8 +0,0 @@ -# Display the date on the web site -maven.xdoc.date = left - -# Display the version the web site is documenting -maven.xdoc.version = ${pom.currentVersion} - -# Define the repository for dependencies -maven.repo.remote = http://www.ibiblio.org/maven,http://www.ericdaugherty.com/maven \ No newline at end of file diff --git a/plexus-servers/smtpd/project.xml b/plexus-servers/smtpd/project.xml deleted file mode 100644 index ff14a70c3..000000000 --- a/plexus-servers/smtpd/project.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - ${maven.repo.local}/plexus/poms/plexus-server-1.0.pom - plexus-smtpd - plexus-smtpd - Java Email Server Core - SMTPD - 2.0-alpha-2 - - - - - Eric Daugherty - edaugherty - java@ericdaugherty.com - - http://www.ericdaugherty.com - - - - - - - - Siegfried Goeschl - siegfried.goeschl@it20one.at - - - - - - - - dnsjava - dnsjava - 1.3.2 - - - - - - - diff --git a/plexus-servers/smtpd/src/java/org/codehaus/plexus/dns/DNSJavaResolver.java b/plexus-servers/smtpd/src/java/org/codehaus/plexus/dns/DNSJavaResolver.java deleted file mode 100644 index 7b9925dd6..000000000 --- a/plexus-servers/smtpd/src/java/org/codehaus/plexus/dns/DNSJavaResolver.java +++ /dev/null @@ -1,91 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.dns; - -import org.xbill.DNS.MXRecord; -import org.xbill.DNS.Record; -import org.xbill.DNS.Type; -import org.xbill.DNS.dns; - -import java.util.ArrayList; -import java.util.Collection; - -/** - * Uses the DnsJava Library to resolve MX entries. - * - * @author Eric Daugherty - */ -public class DNSJavaResolver - implements DNSResolver -{ - - /** - * Returns a collection of Strings that contain - * the addresses of the SMTP Servers for the specified domain. - * - * @param domain the domain to query. - * @return Collection of addresses as Strings. - */ - public Collection getMXEntries( String domain ) - { - //TODO: Sort Entries. Update DnsJava Code. Are these Old APIS? - - ArrayList addresses = new ArrayList(); - - Record[] records = dns.getRecords( domain, Type.MX ); - - //Just return an empty collection if no domains were found. - if ( records == null ) - { - return addresses; - } - - int numEntries = records.length; - MXRecord record; - for ( int index = 0; index < numEntries; index++ ) - { - record = (MXRecord) records[index]; - addresses.add( record.getTarget().toString() ); - } - - return addresses; - } -} diff --git a/plexus-servers/smtpd/src/java/org/codehaus/plexus/dns/DNSResolver.java b/plexus-servers/smtpd/src/java/org/codehaus/plexus/dns/DNSResolver.java deleted file mode 100644 index 13f5593aa..000000000 --- a/plexus-servers/smtpd/src/java/org/codehaus/plexus/dns/DNSResolver.java +++ /dev/null @@ -1,63 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.dns; - -import java.util.Collection; - -/** - * Provides access to DNS information. - * - * @author Eric Daugherty - */ -public interface DNSResolver -{ - /** Role of this component. */ - public static String ROLE = DNSResolver.class.getName(); - - /** - * Returns a collection of Strings that contain - * the addresses of the SMTP Servers for the specified domain. - * - * @param domain the domain to query. - * @return Collection of addresses as Strings. - */ - Collection getMXEntries( String domain ); -} diff --git a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/Address.java b/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/Address.java deleted file mode 100644 index c93cc51e8..000000000 --- a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/Address.java +++ /dev/null @@ -1,135 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp; - - -/** - * Represents an email address. - */ -public class Address -{ - // Attributes - - private String username = ""; - private String domain = ""; - - //*************************************************************** - // Constructor - //*************************************************************** - - public Address( String address ) throws InvalidAddressException - { - parseAddress( address ); - } - - public Address( String username, String domain ) - { - this.username = username; - this.domain = domain; - } - - //*************************************************************** - // Java Bean Methods - //*************************************************************** - - public String getUsername() - { - return username; - } - - public void setUsername( String username ) - { - this.username = username; - } - - public String getDomain() - { - return domain; - } - - public void setDomain( String domain ) - { - this.domain = domain; - } - - //*************************************************************** - // java.lang.Object Methods - //*************************************************************** - - public int hashCode() - { - return getUsername().hashCode() + ( 1000 * domain.hashCode() ); - } - - public boolean equals( Object obj ) - { - if ( obj == null || !( obj instanceof Address ) ) - { - return false; - } - - Address address = (Address) obj; - return getUsername().equals( address.getUsername() ) && - getDomain().equals( address.getDomain() ); - } - - public String toString() - { - return getUsername() + "@" + getDomain(); - } - - //*************************************************************** - // Private Methods - //*************************************************************** - - private void parseAddress( String address ) throws InvalidAddressException - { - //Parse toAddress into username and domain. - int index = address.indexOf( "@" ); - if ( index == -1 ) - { - throw new InvalidAddressException(); - } - - setUsername( address.substring( 0, index ) ); - setDomain( address.substring( index + 1 ) ); - } -} diff --git a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/DefaultSmtpServer.java b/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/DefaultSmtpServer.java deleted file mode 100644 index 56e90f48c..000000000 --- a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/DefaultSmtpServer.java +++ /dev/null @@ -1,84 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp; - -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.service.Serviceable; -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; -import org.codehaus.plexus.synapse.AbstractSynapseServer; -import org.codehaus.plexus.synapse.handler.ServiceHandler; - -/** - * Manages the interaction between the server plugins and the - * SMTP client. This class provides the implementation - * of rfc821. - * - * @author Eric Daugherty - */ -public class DefaultSmtpServer - extends AbstractSynapseServer - implements Serviceable, Initializable, SmtpServer -{ - private ServiceHandler serviceHandler; - - /** @see Serviceable#service */ - public void service( ServiceManager serviceManager ) - throws ServiceException - { - super.service( serviceManager ); - - serviceHandler = (ServiceHandler) serviceManager.lookup( ServiceHandler.class.getName() ); - } - - /** @see Initializable#initialize */ - public void initialize() - throws Exception - { - super.initialize(); - - getReactor().registerServiceHandler( serviceHandler ); - } - - public void dispose() - { - } -} diff --git a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/InvalidAddressException.java b/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/InvalidAddressException.java deleted file mode 100644 index f0fc9cada..000000000 --- a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/InvalidAddressException.java +++ /dev/null @@ -1,46 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp; - -public class InvalidAddressException extends Exception -{ - -} diff --git a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/SmtpMessage.java b/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/SmtpMessage.java deleted file mode 100644 index cddf82f01..000000000 --- a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/SmtpMessage.java +++ /dev/null @@ -1,244 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp; - -import org.codehaus.plexus.smtp.Address; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Date; - -/** - * Represents a SMTP Email message. This message is used by the SMTPServerProcessor and - * the SMTPDelivery systems to represent the current state of an incoming/outgoing - * SMTP message. - * - * @author Eric Daugherty - */ -public class SmtpMessage -{ - private String id; - private Address fromAddress; - private Collection toAddresses = new ArrayList(); - private String data; - private Date timeReceived; - private Date scheduledDelivery; - private int deliveryAttempts; - - public SmtpMessage( String messageId ) - { - id = messageId; - Date now = new Date(); - timeReceived = now; - scheduledDelivery = now; - deliveryAttempts = 0; - } - - /** - * The ID of the SMTP Message. - * - * @return The message's Id. - */ - public String getId() - { - return id; - } - - /** - * The ID of the SMTP Message. - * - * @param id The message's Id. - */ - public void setId( String id ) - { - this.id = id; - } - - /** - * Address the email is from. - * - * @return sender's address. - */ - public Address getFromAddress() - { - return fromAddress; - } - - /** - * Address the email is from. - * - * @param fromAddress sender's address. - */ - public void setFromAddress( Address fromAddress ) - { - this.fromAddress = fromAddress; - } - - /** - * A collection of addresses this email message needs to be delivered to. - * - * @return delivery addresses. - */ - public Collection getToAddresses() - { - return toAddresses; - - } - - /** - * - * @param toAddresses - */ - public void setToAddresses( Collection toAddresses ) - { - this.toAddresses = toAddresses; - } - - /** - * Adds a new address to deliver this message to. - * - * @param address delivery address. - */ - public void addToAddress( Address address ) - { - toAddresses.add( address ); - } - - /** - * Removes an address from the list, after successful delivery. - * - * @param address delivery Address. - */ - public void removeAddress( Address address ) - { - toAddresses.remove( address ); - } - - /** - * Removes all the addresses in the collection, after successful delivery (or permanent error). - * - * @param addresses collection of addresses to remove. - */ - public void removeAddresses( Collection addresses ) - { - toAddresses.removeAll( addresses ); - } - - /** - * The actual message. - * - * @return the message. - */ - public String getData() - { - return data; - } - - /** - * The actual message. - * - * @param data the message. - */ - public void setData( String data ) - { - this.data = data; - } - - /** - * The time the message was first received by the system. - * - * @return time the message was received. - */ - public Date getTimeReceived() - { - return timeReceived; - } - - /** - * The time the message was first received by the system. - * - * @param timeReceived time the message was received. - */ - public void setTimeReceived( Date timeReceived ) - { - this.timeReceived = timeReceived; - } - - /** - * The next time delivery of this message should be attempted. - * - * @return the next schedule delivery time. - */ - public Date getScheduledDelivery() - { - return scheduledDelivery; - } - - /** - * The next time delivery of this message should be attempted. - * - * @param scheduledDelivery the next schedule delivery time. - */ - public void setScheduledDelivery( Date scheduledDelivery ) - { - this.scheduledDelivery = scheduledDelivery; - } - - /** - * The number of times delivery of this message has been attempted. - * - * @return number of delivery attempts. - */ - public int getDeliveryAttempts() - { - return deliveryAttempts; - } - - /** - * The number of times delivery of this message has been attempted. - * - * @param deliveryAttempts number of delivery attempts. - */ - public void setDeliveryAttempts( int deliveryAttempts ) - { - this.deliveryAttempts = deliveryAttempts; - } -} diff --git a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/SmtpServer.java b/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/SmtpServer.java deleted file mode 100644 index ccc257f36..000000000 --- a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/SmtpServer.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.codehaus.plexus.smtp; - -import org.codehaus.plexus.synapse.SynapseServer; - -/** - * - * - * @author Jason van Zyl - * - * @version $Id$ - */ -public interface SmtpServer - extends SynapseServer -{ - public static String ROLE = SmtpServer.class.getName(); -} diff --git a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/SmtpServiceHandler.java b/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/SmtpServiceHandler.java deleted file mode 100644 index d9ab257f3..000000000 --- a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/SmtpServiceHandler.java +++ /dev/null @@ -1,548 +0,0 @@ -package org.codehaus.plexus.smtp; - -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.service.Serviceable; -import org.codehaus.plexus.smtp.queue.DeliveryQueueException; -import org.codehaus.plexus.smtp.queue.Queue; -import org.codehaus.plexus.synapse.handler.AbstractServiceHandler; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.io.PrintWriter; -import java.lang.reflect.Field; -import java.net.InetAddress; -import java.net.Socket; -import java.text.MessageFormat; -import java.util.Random; - -/** - * Manages the interaction between the server plugins and the - * SMTP client. This class provides the implementation - * of rfc821. - * - * @author Eric Daugherty - */ -public class SmtpServiceHandler - extends AbstractServiceHandler - implements Serviceable, Initializable -{ - private static final int DATA_BUFFER_SIZE = 1024; - - // Message Names. These constants are used to load messages from - // the configuration data. - public static final String MESSAGE_WELCOME = "welcome"; - public static final String MESSAGE_HELO = "helo"; - public static final String MESSAGE_DATA = "data"; - public static final String MESSAGE_HELP = "help"; - public static final String MESSAGE_QUIT = "quit"; - - public static final String MESSAGE_OK = "ok"; - public static final String MESSAGE_CLIENT_INVALID = "client.invalid"; - public static final String MESSAGE_HELO_INVALID = "helo.invalid"; - public static final String MESSAGE_MAIL_ADDRESS_REJECTED = "mail.address.rejected"; - public static final String MESSAGE_RCPT_ADDRESS_REJECTED = "rcpt.address.rejected"; - public static final String MESSAGE_COMMAND_INVALID = "command.invalid"; - public static final String MESSAGE_COMMAND_NOT_IMPLEMENTED = "command.not.implemented"; - public static final String MESSAGE_COMMAND_ORDER_INVALID = "command.order.invalid"; - public static final String MESSAGE_ADDRESS_INVALID = "address.invalid"; - public static final String MESSAGE_TRANSACTION_FAILED = "transaction.failed"; - - // These have been made public due to the use - // of reflection. Otherwise, they would be private. - public static final int COMMAND_HELO = 0; - public static final int COMMAND_MAIL = 1; - public static final int COMMAND_RCPT = 2; - public static final int COMMAND_DATA = 3; - public static final int COMMAND_RSET = 4; - public static final int COMMAND_HELP = 10; - public static final int COMMAND_NOOP = 11; - public static final int COMMAND_QUIT = 12; - public static final int COMMAND_TURN = 13; - - private String heloDomain; - - private Queue queue; - - private SmtpMessage message; - - private String inputLine; - - private StringBuffer data; - - private Random random; - - private String domain; - - private boolean running = true; - - private boolean collectingMessage; - - public SmtpServiceHandler() - { - } - - // ---------------------------------------------------------------------- - // API - // ---------------------------------------------------------------------- - - public void handleEvents() - throws Exception - { - } - - public void handleEvent( Socket socket ) - throws Exception - { - Client c = new Client( socket ); - - c.start(); - } - - class Client - extends Thread - { - private Socket socket; - - private BufferedReader reader; - - private PrintWriter writer; - - public Client( Socket socket ) - throws Exception - { - this.socket = socket; - - reader = new BufferedReader( new InputStreamReader( socket.getInputStream() ) ); - - writer = new PrintWriter( new OutputStreamWriter( socket.getOutputStream() ) ); - } - - public void run() - { - InetAddress clientAddress = socket.getInetAddress(); - - writer.write( getMessage( MESSAGE_WELCOME ) + "\r\n" ); - - writer.flush(); - - while ( running ) - { - try - { - inputLine = reader.readLine(); - - if ( collectingMessage ) - { - if ( inputLine.trim().equals(".") ) - { - processData( socket ); - } - else - { - data.append( inputLine ).append("\r\n"); - } - } - else - { - processCommand( socket ); - } - } - catch ( Exception e ) - { - e.printStackTrace(); - } - } - } - } - - public String getHandleKey() - { - return "PROCESS"; - } - - /** - * Process a SMTP Command. - * - * @throws java.io.IOException thrown if an error occurs writing a client response. - */ - private void processCommand( Socket socket ) throws IOException - { - String command = inputLine; - - // Get the requested command. - int commandId = getCommandId( command ); - - if ( commandId == -1 ) - { - String[] invalidCommandArguments = {command}; - writeLine( socket, getMessage( MESSAGE_COMMAND_INVALID, invalidCommandArguments ) ); - return; - } - - // Handle the specific command. - switch ( commandId ) - { - case COMMAND_HELO: - processHeloCommand( socket ); - break; - case COMMAND_MAIL: - processMailCommand( socket ); - break; - case COMMAND_RCPT: - processRcptCommand( socket ); - break; - case COMMAND_DATA: - collectingMessage = true; - writeLine( socket, getMessage( MESSAGE_DATA ) ); - break; - case COMMAND_RSET: - reset(); - writeLine( socket, getMessage( MESSAGE_OK ) ); - break; - case COMMAND_HELP: - writeLine( socket, getMessage( MESSAGE_HELP ) ); - break; - case COMMAND_NOOP: - writeLine( socket, getMessage( MESSAGE_OK ) ); - break; - case COMMAND_QUIT: - String[] quitArguments = {domain}; - writeLine( socket, getMessage( MESSAGE_QUIT, quitArguments ) ); - socket.close(); - running = false; - break; - case COMMAND_TURN: - default: - String[] defaultArguments = {command}; - writeLine( socket, getMessage( MESSAGE_COMMAND_INVALID, defaultArguments ) ); - break; - } - } - - private void processData( Socket socket ) - throws IOException - { - //Prepend the Header information. - StringBuffer messageData = new StringBuffer(); - messageData.append( "Received: from " ); - messageData.append( heloDomain ); - InetAddress clientAddress = socket.getInetAddress(); - messageData.append( " (" ); - messageData.append( clientAddress.getHostName() ); - messageData.append( " [" ); - messageData.append( clientAddress.getHostAddress() ); - messageData.append( "])\r\n" ); - messageData.append( " by " ); - messageData.append( "Plexus SMTPD with SMTP ID " ); - messageData.append( message.getId() ); - messageData.append( "\r\n" ); - messageData.append( data.toString() ); - message.setData( messageData.toString() ); - - try - { - queue.addMessage( message ); - - writeLine( socket, getMessage( MESSAGE_OK ) ); - } - catch ( DeliveryQueueException e ) - { - writeLine( socket, getMessage( MESSAGE_TRANSACTION_FAILED ) ); - } - finally - { - reset(); - } - } - - private void processHeloCommand( Socket socket ) - throws IOException - { - InetAddress address = socket.getInetAddress(); - - // Get the argument - int index = inputLine.indexOf( " " ); - String argument; - if ( index == -1 ) - { - argument = ""; - } - else - { - argument = inputLine.substring( index + 1 ); - } - - heloDomain = argument; - String[] heloArguments = {domain, ( address.getHostName() + " [" + address.getHostAddress() + "]" )}; - writeLine( socket, getMessage( MESSAGE_HELO, heloArguments ) ); - } - - private void processMailCommand( Socket socket ) - throws IOException - { - String command = inputLine; - - // Verify the full command. - if ( command.length() < 10 || !command.toUpperCase().startsWith( "MAIL FROM:" ) ) - { - String[] invalidCommandArguments = {command}; - writeLine( socket, getMessage( MESSAGE_COMMAND_INVALID, invalidCommandArguments ) ); - return; - } - - // Parse Address - Address address = null; - try - { - address = parseAddress( command.substring( 10 ).trim() ); - } - catch ( InvalidAddressException e ) - { - String[] invalidAddressArguments = {command.substring( 10 ).trim()}; - writeLine( socket, getMessage( MESSAGE_ADDRESS_INVALID, invalidAddressArguments ) ); - return; - } - - message.setFromAddress( address ); - writeLine( socket, getMessage( MESSAGE_OK ) ); - } - - private void processRcptCommand( Socket socket ) - throws IOException - { - String command = inputLine; - - // Verify the full command. - if ( command.length() < 8 || !command.toUpperCase().startsWith( "RCPT TO:" ) ) - { - String[] invalidCommandArguments = {command}; - writeLine( socket, getMessage( MESSAGE_COMMAND_INVALID, invalidCommandArguments ) ); - return; - } - - // Parse Address - Address address = null; - try - { - address = parseAddress( command.substring( 8 ).trim() ); - } - catch ( InvalidAddressException e ) - { - String[] invalidAddressArguments = {command.substring( 8 ).trim()}; - writeLine( socket, getMessage( MESSAGE_ADDRESS_INVALID, invalidAddressArguments ) ); - return; - } - - message.addToAddress( address ); - writeLine( socket, getMessage( MESSAGE_OK ) ); - } - - /** - * Resets the current state. - */ - private void reset() - { - message = new SmtpMessage( generateSMTPId() ); - - collectingMessage = false; - } - - /** - * Generates a unique String that is used to identify the - * incoming message. - *

- * This method can be overridden by a subclass to provide an alternate - * algorithm for generating IDs. - * - * @todo create a Plugin for SMTP ID Generation. - * - * @return a new unique SMTP Id. - */ - protected String generateSMTPId() - { - StringBuffer messageId = new StringBuffer(); - messageId.append( random.nextInt( 1024 ) ); - messageId.append( (char) ( random.nextInt( 26 ) + 65 ) ); - messageId.append( (char) ( random.nextInt( 26 ) + 65 ) ); - messageId.append( random.nextInt( 1024 ) ); - messageId.append( (char) ( random.nextInt( 26 ) + 65 ) ); - messageId.append( (char) ( random.nextInt( 26 ) + 65 ) ); - messageId.append( random.nextInt( 1024 ) ); - messageId.append( (char) ( random.nextInt( 26 ) + 65 ) ); - messageId.append( (char) ( random.nextInt( 26 ) + 65 ) ); - messageId.append( random.nextInt( 1024 ) ); - messageId.append( (char) ( random.nextInt( 26 ) + 65 ) ); - messageId.append( (char) ( random.nextInt( 26 ) + 65 ) ); - - return messageId.toString(); - } - - //*************************************************************** - // Private Utility Methods - //*************************************************************** - - /** - * Returns the commandId for the specified command string. - * - * @param command - * @return - */ - private int getCommandId( String command ) - { - command = command.toUpperCase(); - - // All the commands are at least 4 charecters. - if ( command.length() < 4 ) - { - return -1; - } - - String fieldName = "COMMAND_" + command.substring( 0, 4 ); - try - { - Field field = this.getClass().getField( fieldName ); - - return field.getInt( this ); - } - catch ( Exception exception ) - { - // Command does not exist. - return -1; - } - } - - /** - * Parses an address argument into a real email address. This - * method strips off any > or < symbols. - */ - private Address parseAddress( String address ) throws InvalidAddressException - { - - int index = address.indexOf( "<" ); - if ( index != -1 ) - { - address = address.substring( index + 1 ); - } - index = address.indexOf( ">" ); - if ( index != -1 ) - { - address = address.substring( 0, index ); - } - return new Address( address ); - } - - /** - * Returns the message retrieved from the ConfigurationManager. - * - * @param messageName name of the message to retrieve. - * @return the message text. - * - * @todo use the i18n component. - */ - private String getMessage( String messageName ) - { - return "We need i18n component for: " + messageName; - } - - /** - * Returns a message from the ConfigurationManager formatted using the - * MessageFormat class and the specified arguments. - * - * @param messageName name of the message to retrieve. - * @param arguments objects used to format the message. - * @return the formatted message text. - */ - private String getMessage( String messageName, String[] arguments ) - { - return MessageFormat.format( getMessage( messageName ), arguments ); - } - - public void writeLine( Socket c, String s ) - throws IOException - { - PrintWriter writer = new PrintWriter( c.getOutputStream() ); - - writer.write( s + "\r\n" ); - - writer.flush(); - } - - // ---------------------------------------------------------------------- - // Lifecylce Management - // ---------------------------------------------------------------------- - - /** @see org.apache.avalon.framework.service.Serviceable#service */ - public void service( ServiceManager serviceManager ) - throws ServiceException - { - queue = (Queue) serviceManager.lookup( Queue.ROLE ); - } - - /** @see org.apache.avalon.framework.configuration.Configurable#configure */ - public void configure( Configuration configuration ) - throws ConfigurationException - { - domain = configuration.getChild( "domain" ).getValue(); - } - - /** @see org.apache.avalon.framework.activity.Initializable#initialize */ - public void initialize() - throws Exception - { - data = new StringBuffer( DATA_BUFFER_SIZE ); - - random = new Random(); - - message = new SmtpMessage( generateSMTPId() ); - } - - public void dispose() - { - } -} diff --git a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/delivery/DefaultDeliveryManager.java b/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/delivery/DefaultDeliveryManager.java deleted file mode 100644 index 4ee432596..000000000 --- a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/delivery/DefaultDeliveryManager.java +++ /dev/null @@ -1,105 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp.delivery; - -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.smtp.delivery.DeliveryProcessor; -import org.codehaus.plexus.smtp.delivery.FileDeliveryProcessor; -import org.codehaus.plexus.smtp.delivery.DeliveryManager; - -public class DefaultDeliveryManager - extends AbstractLogEnabled - implements Configurable, DeliveryManager -{ - private Configuration configuration; - - /** - * Gets a reference to the configurationManager. - */ - public DefaultDeliveryManager() - { - } - - /** @see org.apache.avalon.framework.configuration.Configurable#configure */ - public void configure( Configuration configuration ) - throws ConfigurationException - { - this.configuration = configuration; - } - - /** - * Returns the DeliveryProcessor that should be used to - * deliver messages to the specified domain. - * - * @param domain Internet domain name. - * @return the DeliveryProcessor implementation to use. - */ - public DeliveryProcessor getDeliveryProcessor( String domain ) - { - domain = domain.trim(); - boolean isLocal = false; - - Configuration[] domains = configuration.getChildren( "domain" ); - - for ( int index = 0; index < domains.length; index++ ) - { - if ( domains[index].getValue( "" ).equalsIgnoreCase( domain ) ) - { - isLocal = true; - break; - } - } - - // Return the local Delivery processor or the remote - // one. - if ( isLocal ) - { - return new FileDeliveryProcessor(); - } - else - { - return new SmtpDeliveryProcessor(); - } - } -} diff --git a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/delivery/DeliveryManager.java b/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/delivery/DeliveryManager.java deleted file mode 100644 index 8291677e0..000000000 --- a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/delivery/DeliveryManager.java +++ /dev/null @@ -1,66 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp.delivery; - -import org.codehaus.plexus.smtp.delivery.DeliveryProcessor; - -/** - * Manages the delivery rules for incoming SMTP messages. When the - * delivery service is ready to send a message, it will check with - * the DeliveryManager implementation to determine which DeliveryProcessor - * to use to deliver the message. - * - * @author Eric Daugherty - */ -public interface DeliveryManager -{ - public static String ROLE = DeliveryManager.class.getName(); - - /** - * Returns the DeliveryProcessor that should be used to - * deliver messages to the specified domain. - * - * @param domain Internet domain name. - * @return the DeliveryProcessor implementation to use. - */ - DeliveryProcessor getDeliveryProcessor( String domain ); - -} diff --git a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/delivery/DeliveryProcessor.java b/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/delivery/DeliveryProcessor.java deleted file mode 100644 index b6d51af9a..000000000 --- a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/delivery/DeliveryProcessor.java +++ /dev/null @@ -1,72 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp.delivery; - -import org.codehaus.plexus.smtp.SmtpMessage; - -import java.util.List; - -/** - * Handles the delivery of SMTPMessages. - * - * @author Eric Daugherty - */ -public interface DeliveryProcessor -{ - public static String ROLE = DeliveryProcessor.class.getName(); - - /** - * Delivers the specified message to the addresses specified. The - * addresses map contains a Map keyed by domain name, with a List of - * Address instances as values. - * - * Once a message has been successfully delivered (or a permanant error - * occurs) to an address, the address - * should be removed from the SMTPMessage. Otherwise, delivery will - * be reattempted for the addresses. - * - * @param message the message to deliver. - * @param domain the domain to deliver the message to for these addresses. - * @param addresses List of addresses that all get delivered to this domain. - */ - void deliverMessage( SmtpMessage message, String domain, List addresses ); - -} diff --git a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/delivery/FileDeliveryProcessor.java b/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/delivery/FileDeliveryProcessor.java deleted file mode 100644 index 11727bc49..000000000 --- a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/delivery/FileDeliveryProcessor.java +++ /dev/null @@ -1,112 +0,0 @@ -package org.codehaus.plexus.smtp.delivery; - -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.smtp.Address; -import org.codehaus.plexus.smtp.SmtpMessage; -import org.codehaus.plexus.smtp.mailbox.MailboxManager; -import org.codehaus.plexus.smtp.mailbox.Mailbox; -import org.apache.avalon.framework.service.Serviceable; -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; - -import java.util.Iterator; -import java.util.List; - -public class FileDeliveryProcessor - extends AbstractLogEnabled - implements Serviceable, DeliveryProcessor -{ - private MailboxManager mailboxManager; - - public FileDeliveryProcessor() - { - } - - // ---------------------------------------------------------------------- - // Lifecylce Management - // ---------------------------------------------------------------------- - - /** @see org.apache.avalon.framework.service.Serviceable#service */ - public void service( ServiceManager serviceManager ) - throws ServiceException - { - mailboxManager = (MailboxManager) serviceManager.lookup( MailboxManager.ROLE ); - } - - /** - * Delivers the specified message to the addresses specified. - * - * Once a message has been successfully delivered (or a permanant error - * occurs) to an address, the address - * should be removed from the SMTPMessage. Otherwise, delivery will - * be reattempted for the addresses. - * - * @param message the message to deliver. - * @param domain the domain to deliver the message to for these addresses. - * @param addresses List of addresses that all get delivered to this domain. - */ - public void deliverMessage( SmtpMessage message, String domain, List addresses ) - { - if ( getLogger().isDebugEnabled() ) - { - getLogger().debug( "Attempting to deliver message: " + message.getId() + " to local file mailboxes." ); - } - - // Attempt to deliver the message to each address. - Iterator addressIterator = addresses.iterator(); - while ( addressIterator.hasNext() ) - { - Address address = (Address) addressIterator.next(); - - try - { - String mailboxId = mailboxManager.validateAddress( address ); - - // If the address is a valid local address, deliver it. - if ( mailboxId != null ) - { - - // Lock the mailbox. - Mailbox mailbox = mailboxManager.lockMailbox( mailboxId ); - - // If we locked the mailbox, deliver the message. - if ( mailbox != null ) - { - mailbox.deliverMessage( message ); - mailbox.commitUpdates(); - message.removeAddress( address ); - if ( getLogger().isDebugEnabled() ) - { - getLogger().debug( "Delivery successful for address: " + address.toString() + - " for message: " + message.getId() ); - } - } - // If we did not lock the mailbox, fail the delivery for this address. - else - { - if ( getLogger().isInfoEnabled() ) - { - getLogger().info( "Delivery failed for address: " + address.toString() + - " because the mailbox could not be locked." ); - } - } - } - // The address is invalid, so bounce the email. - else - { - if ( getLogger().isInfoEnabled() ) - { - getLogger().info( "Delivery failed for address: " + address.toString() + - " because it does not map to a known mailbox." ); - } - //TODO: Build bounce logic. - } - } - catch ( Throwable throwable ) - { - getLogger().warn( "Delivery failed for address: " + address.toString() + - " for message: " + message.getId() + " due to: " + throwable, throwable ); - } - } - } -} diff --git a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/delivery/SmtpDeliveryProcessor.java b/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/delivery/SmtpDeliveryProcessor.java deleted file mode 100644 index a179de9eb..000000000 --- a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/delivery/SmtpDeliveryProcessor.java +++ /dev/null @@ -1,415 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp.delivery; - -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.service.Serviceable; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.smtp.Address; -import org.codehaus.plexus.smtp.SmtpMessage; -import org.codehaus.plexus.smtp.delivery.DeliveryProcessor; -import org.codehaus.plexus.dns.DNSResolver; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintWriter; -import java.net.Socket; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; - -public class SmtpDeliveryProcessor - extends AbstractLogEnabled - implements Serviceable, Configurable, DeliveryProcessor -{ - /** - * The DNSResolver Plugin Implementation - */ - private DNSResolver dnsResolver; - - /** Writer to sent data to the client */ - private PrintWriter out; - /** Reader to read data from the client */ - private BufferedReader in; - - private String domain; - - //*************************************************************** - // Constructor - //*************************************************************** - - public SmtpDeliveryProcessor() - { - } - - // ---------------------------------------------------------------------- - // Lifecylce Management - // ---------------------------------------------------------------------- - - /** @see org.apache.avalon.framework.service.Serviceable#service */ - public void service( ServiceManager serviceManager ) - throws ServiceException - { - dnsResolver = (DNSResolver) serviceManager.lookup( DNSResolver.ROLE ); - } - - /** @see org.apache.avalon.framework.configuration.Configurable#configure */ - public void configure( Configuration configuration ) - throws ConfigurationException - { - domain = configuration.getChild( "domain" ).getValue(); - } - - - //*************************************************************** - // DeliveryProcessor Interface Methods - //*************************************************************** - - /** - * Delivers the specified message to the addresses specified. - * - * Once a message has been successfully delivered (or a permanant error - * occurs) to an address, the address - * should be removed from the SMTPMessage. Otherwise, delivery will - * be reattempted for the addresses. - * - * @param message - * @param addresses Map keyed by domain name, with a List of Address instances as values. - */ - public void deliverMessage( SmtpMessage message, String domain, List addresses ) - { - Collection serverAddresses = dnsResolver.getMXEntries( domain ); - - Socket socket = null; - - Iterator serverAddressIterator = serverAddresses.iterator(); - String address; - while ( serverAddressIterator.hasNext() ) - { - address = (String) serverAddressIterator.next(); - try - { - socket = new Socket( address, 25 ); - if ( getLogger().isDebugEnabled() ) - { - getLogger().debug( "Connected to: " + address + " for delivery of message: " + - message.getId() + " to domain: " + domain ); - } - break; - } - catch ( IOException e ) - { - if ( getLogger().isDebugEnabled() ) getLogger().debug( "Unable to connect to remote SMPT Server: " - + address + " from SMPT delivery." ); - } - } - - if ( socket == null ) - { - if ( getLogger().isInfoEnabled() ) - { - getLogger().info( "Unable to make a connection any SMTP server for domain: " + domain ); - } - - return; - } - - try - { - //Get the input and output streams. - out = new PrintWriter( socket.getOutputStream(), true ); - in = new BufferedReader( new InputStreamReader( socket.getInputStream() ) ); - - //Perform initial commands - List successfulAddresses = new ArrayList(); - List rejectedAddresses = new ArrayList(); - - sendIntro( addresses, message, successfulAddresses, rejectedAddresses ); - - if ( successfulAddresses.size() > 0 ) - { - //Send message data - sendData( message ); - if ( getLogger().isInfoEnabled() ) logDelivery( message, successfulAddresses, true ); - } - - //Close the connection. - sendClose(); - - if ( rejectedAddresses.size() > 0 ) - { - // Send Rejection Emails. - // TODO: Rejection Emails. - if ( getLogger().isInfoEnabled() ) - { - logDelivery( message, rejectedAddresses, false ); - } - } - - message.removeAddresses( successfulAddresses ); - message.removeAddresses( rejectedAddresses ); - - } - catch ( IOException ioe ) - { - getLogger().warn( "IOException occured while talking to remote domain: " + domain ); - } - catch ( Exception exception ) - { - getLogger().warn( "Unexpected response from remote SMTP Server for domain: " + domain ); - } - finally - { - if ( socket != null ) - { - try - { - socket.close(); - } - catch ( IOException ioe ) - { - // Not a big deal. - getLogger().debug( "Error closing socket: " + ioe ); - } - } - } - } - - /** - * Sends all the commands neccessary to prepare the remote server - * to receive the data command. - */ - private void sendIntro( List addresses, SmtpMessage message, List successAddresses, List rejectedAddresses ) throws Exception - { - //Check to make sure remote server introduced itself with appropriate message. - validateInput( read(), "220" ); - - //Send HELO command to remote server. - write( "HELO " + domain ); - validateInput( read(), "250" ); - - //Send MAIL FROM: command - write( "MAIL FROM:<" + message.getFromAddress().toString() + ">" ); - validateInput( read(), "250" ); - - //Send RCTP TO: command - Iterator addressIterator = addresses.iterator(); - Address address; - while ( addressIterator.hasNext() ) - { - address = (Address) addressIterator.next(); - write( "RCPT TO:<" + address.toString() + ">" ); - if ( read().startsWith( "250" ) ) - { - if ( getLogger().isDebugEnabled() ) getLogger().debug( "Address " + address + " accepted." ); - successAddresses.add( address ); - } - else - { - if ( getLogger().isDebugEnabled() ) getLogger().debug( "Address " + address + " rejected." ); - rejectedAddresses.add( address ); - } - } - } - - /** - * This method sends the data command and all the message data to the - * remote server. - */ - private void sendData( SmtpMessage message ) throws Exception - { - //Send Data command - write( "DATA" ); - validateInput( read(), "354" ); - - writeData( message.getData() ); - - //Send the command end data transmission. - write( "." ); - - validateInput( read(), "250" ); - } - - private void sendClose() - { - - write( "QUIT" ); - // Who cares.. no reason to validate the input. - read(); - //validateInput( read(), "221" ); - } - - /** - * Returns the response code generated by the server. - * This method will handle multi-line responses, but will - * only log the responses, and discard the text, returning - * only the 3 digit response code. - * - * @return 3 digit response string. - */ - private String read() - { - try - { - String responseCode; - - //Read in the first line. This is the only line - //we really care about, since the response code - //must be the same on all lines. - String inputText = in.readLine(); - if ( inputText == null ) - { - inputText = ""; - } - else - { - inputText = inputText.trim(); - } - - if ( getLogger().isInfoEnabled() ) - { - getLogger().info( "SMTPDeliveryProcessor Input: " + inputText ); - } - if ( inputText.length() < 3 ) - { - getLogger().info( "SMTP Response too short. Aborting Send. Response: " + inputText ); - return null; - } - - //Strip of the response code. - responseCode = inputText.substring( 0, 3 ); - - //Handle Multi-Line Responses. - while ( ( inputText.length() >= 4 ) && inputText.substring( 3, 4 ).equals( "-" ) ) - { - inputText = in.readLine().trim(); - if ( getLogger().isInfoEnabled() ) - { - getLogger().info( "SMTPDeliveryProcessorInput: " + inputText ); - } - } - - return responseCode; - } - catch ( IOException ioe ) - { - getLogger().debug( "Error reading from socket, closing connection." ); - return null; - } - } - - /** - * Writes the specified output message to the client. - */ - private void write( String message ) - { - if ( getLogger().isInfoEnabled() ) getLogger().info( "SMTPDeliveryProcessor Output: " + message ); - out.print( message + "\r\n" ); - out.flush(); - } - - /** - * Same as write w/o the logging. - * @param data - */ - private void writeData( String data ) - { - if ( getLogger().isDebugEnabled() ) - { - getLogger().debug( "SMTPDeliveryProcessor Output:\r\n" + data ); - } - else if ( getLogger().isInfoEnabled() ) - { - getLogger().debug( "SMTPDeliveryProcessor Output: " ); - } - - out.print( data + "\r\n" ); - out.flush(); - } - - protected void logDelivery( SmtpMessage message, List addresses, boolean success ) - { - - // Log the delivered addresses. - StringBuffer logMessage = new StringBuffer(); - logMessage.append( "Message: " ); - logMessage.append( message.getId() ); - if ( success ) - { - logMessage.append( " successfully delivered to: " ); - } - else - { - logMessage.append( " rejected for delivery to: " ); - } - Iterator addressIterator = addresses.iterator(); - while ( addressIterator.hasNext() ) - { - logMessage.append( addressIterator.next() ); - logMessage.append( ", " ); - } - int length = logMessage.length(); - logMessage.delete( length - 2, length ); - getLogger().info( logMessage.toString() ); - } - - /** - * Validates the input from the remote server. - * - * @param input the entire line read. - * @param expected the expected first 3 charecters - * @throws java.lang.Exception thrown if the input does not match the expected. - */ - private void validateInput( String input, String expected ) throws Exception - { - if ( input == null || !input.startsWith( expected ) ) - { - getLogger().info( "Incorrect response read from remote server. Expected response to begin with \"220\"." ); - throw new Exception( "Incorrect response read from remote server. Expected response to begin with \"220\"." ); - } - } -} diff --git a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/mailbox/FileMailbox.java b/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/mailbox/FileMailbox.java deleted file mode 100644 index 4896281d4..000000000 --- a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/mailbox/FileMailbox.java +++ /dev/null @@ -1,281 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp.mailbox; - -import org.codehaus.plexus.smtp.SmtpMessage; - -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.io.Reader; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -/** - * Implemenets the Mailbox interface to provide a File (directory) based - * mailbox implementation. - * - * @author Eric Daugherty - */ -public class FileMailbox implements Mailbox -{ - //*************************************************************** - // Variables - //*************************************************************** - - /** - * The MailboxManager that manages this mailbox. - */ - private FileMailboxManager fileMailboxManager; - - /** - * The mailboxId of this mailbox instance. - */ - private String mailboxId; - - /** - * The directory that represents the current mailbox. - */ - private File mailboxDirectory; - - /** - * A list of the messages marked for deletion - */ - private List deletedIds; - - //*************************************************************** - // Constructor - //*************************************************************** - - public FileMailbox( FileMailboxManager fileMailboxManager, String mailboxId, File mailboxDirectory ) - { - this.fileMailboxManager = fileMailboxManager; - this.mailboxId = mailboxId; - this.mailboxDirectory = mailboxDirectory; - deletedIds = new ArrayList(); - } - - //*************************************************************** - // Mailbox Methods - //*************************************************************** - - /** - * Returns the total number of messages currently stored in this mailbox. - * - * @return the number of messages stored. - */ - public long getMessageCount() - { - return mailboxDirectory.listFiles().length; - } - - /** - * Returns the total size of the mailbox in bytes. - * - * @return the size (in bytes) of the entire maibox. - */ - public long getMailboxSize() - { - long size = 0; - File[] files = mailboxDirectory.listFiles(); - for ( int index = 0; index < files.length; index++ ) - { - size = files[index].length(); - } - - return size; - } - - /** - * Returns the message ID for each message. - * - * @return an array of the message IDs of the messages in this mailbox. - */ - public String[] getMessageIds() - { - File[] files = mailboxDirectory.listFiles(); - String[] messageIds = new String[files.length]; - for ( int index = 0; index < files.length; index++ ) - { - messageIds[index] = files[index].getName(); - } - - return messageIds; - } - - /** - * Returns the size (in bytes) of the specified message. - * - * @param messageId the unique ID of the message. - * @return the size (in bytes) of the specified message. - */ - public long getMessageSize( String messageId ) - { - File message = new File( mailboxDirectory, messageId ); - return message.length(); - } - - /** - * Returns a java.io.Reader which is positioned to read - * the message from the storage system. - *

- * The client should close the Reader once the message has - * been retrieved. - * - * @param messageId the unique ID of the message - * @return a Reader that can access the message data. - * @throws java.io.IOException thrown if there is an error accessing the message. - */ - public Reader getMessage( String messageId ) throws IOException - { - File message = new File( mailboxDirectory, messageId ); - return new FileReader( message ); - } - - /** - * Marks a message for deletion. The message will actually be - * deleted once the commitUpdates() method is called. - * - * @param messageId - * @throws java.io.IOException thrown if there is an error accessing the mailbox - */ - public void deleteMessage( String messageId ) throws IOException - { - deletedIds.add( messageId ); - } - - /** - * Indicates whether the specified message is already marked - * for deletion. - * - * @param messageId the unique ID of the message. - * @return true if the messages is marked for deletion. - * @throws java.io.IOException thrown if there is an error accessing the mailbox - */ - public boolean isMessageDeleted( String messageId ) throws IOException - { - return deletedIds.contains( messageId ); - } - - /** - * Clears the deleted flag on all messages. - * - * @throws java.io.IOException thrown if there is an error accessing the mailbox - */ - public void resetDeleteFlags() throws IOException - { - deletedIds = new ArrayList(); - } - - /** - * Stores the specified message for retrieval. - * - * @param message the message to deliver. - * @throws java.io.IOException thrown if there is an error accessing the mailbox - */ - public void deliverMessage( SmtpMessage message ) throws IOException - { - File messageFile = new File( mailboxDirectory, message.getId() ); - - if ( messageFile.createNewFile() ) - { - String messageData = message.getData(); - FileWriter fileWriter = new FileWriter( messageFile ); - try - { - fileWriter.write( messageData ); - } - finally - { - fileWriter.close(); - } - } - else - { - throw new IOException( "Error creating message file: " + messageFile.getAbsolutePath() ); - } - } - - /** - * Commits any changes and release the mailbox lock. - * - * @throws java.io.IOException thrown if there is an error accessing the mailbox - */ - public void commitUpdates() throws IOException - { - deleteMessages(); - fileMailboxManager.unlockMailbox( mailboxId ); - } - - /** - * Clear all changes made to the mailbox and release the mailbox lock. - */ - public void rollbackUpdates() - { - fileMailboxManager.unlockMailbox( mailboxId ); - } - - //*************************************************************** - // Private Methods - //*************************************************************** - - /** - * Removes all messages marked for deletion from disk. - * - * @throws java.io.IOException thrown if any error occurs while removing a message. - */ - private void deleteMessages() throws IOException - { - Iterator messages = deletedIds.iterator(); - File messageFile; - - while ( messages.hasNext() ) - { - messageFile = new File( mailboxDirectory, (String) messages.next() ); - if ( !messageFile.delete() ) - { - throw new IOException( "Unable to delete message: " + messageFile.getAbsolutePath() ); - } - } - } -} diff --git a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/mailbox/FileMailboxManager.java b/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/mailbox/FileMailboxManager.java deleted file mode 100644 index 70813888d..000000000 --- a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/mailbox/FileMailboxManager.java +++ /dev/null @@ -1,384 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp.mailbox; - -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.smtp.Address; -import org.codehaus.plexus.smtp.mailbox.FileMailbox; - -import java.io.File; -import java.net.InetAddress; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.util.Calendar; -import java.util.Collections; -import java.util.GregorianCalendar; -import java.util.HashMap; -import java.util.Map; - -/** - * Provides an implementation of the MailboxManager interface that uses the - * local file system to store messages. - * - * @author Eric Daugherty - */ -public class FileMailboxManager - extends AbstractLogEnabled - implements Configurable, Initializable, MailboxManager -{ - public static final String CONFIGURATION_PREFIX = "filemailbox."; - - public static final String MAILBOX_PATH_PARAMETER = CONFIGURATION_PREFIX + "root.dir"; - - private File rootDirectory; - - private Map mailboxLocks; - - private Configuration configuration; - - //*************************************************************** - // Constructor - //*************************************************************** - - /** - * Initializes the using the file path from the ConfigurationManager. - */ - public FileMailboxManager() - { - } - - // ---------------------------------------------------------------------- - // Lifecylce Management - // ---------------------------------------------------------------------- - - /** @see org.apache.avalon.framework.configuration.Configurable#configure */ - public void configure( Configuration configuration ) - throws ConfigurationException - { - this.configuration = configuration; - - rootDirectory = new File( configuration.getChild( "root-directory" ).getValue() ); - } - - public void initialize() - throws Exception - { - mailboxLocks = Collections.synchronizedMap( new HashMap() ); - - // Verify that it exists, and create it if it does not. - if ( !rootDirectory.exists() ) - { - if ( getLogger().isDebugEnabled() ) getLogger().debug( "Mailbox Root Directory does not exist ( " + rootDirectory.getAbsolutePath() + " ). Creating..." ); - - if ( !rootDirectory.mkdirs() ) - - { - getLogger().error( "Unable to create Maibox Root Directory ( " + rootDirectory.getAbsolutePath() + " ). Unable to initialize FileMaiboxValidator Plugin." ); - throw new RuntimeException( "Unable to create Maibox Root Directory ( " + rootDirectory.getAbsolutePath() + " ). Unable to initialize FileMaiboxValidator Plugin." ); - } - } - - // If the rootDirectory refers to a file or other non-directory, throw an error. - if ( !rootDirectory.isDirectory() ) - { - getLogger().error( "Mailbox Root Directory ( " + rootDirectory.getAbsolutePath() + " ) is not a directory!. Unable to initialize FileMaiboxValidator Plugin." ); - throw new RuntimeException( "Mailbox Root Directory ( " + rootDirectory.getAbsolutePath() + " ) is not a directory!. Unable to initialize FileMaiboxValidator Plugin." ); - } - } - - //*************************************************************** - // MailboxManager Methods - //*************************************************************** - - /** - * Verifies whether connections should be accepted from the - * specified client address. - * - * @param address client's Internet address - * @return true if it is acceptable. - */ - public boolean acceptClient( InetAddress address ) - { - // Do not filter clients - return true; - } - - /** - * Verifies whether the specified user is a local user. - *

- * This class is called when the processor accepts a username - * from the client. Implementations may choose to always - * return true and delay the validation until after the - * password has been specified. Performing this validation - * will provide more information to the user, but may cause - * security concerns (username harvesting). - * - * @param userName the username specified by the client. - * @return true if the username is valid, false otherwise. - */ - public boolean validateUser( String userName ) - { - // Only verify users on validateMailbox - return true; - } - - /** - * Verfies that the specified login criteria match an existing - * mailbox. If they match, the mailbox id is returned. This - * id can be used by the openMailbox method to access the mailbox. - * If they do not match, -1 is returned. - * - * @param userName the username specified by the client. - * @param password the password specified by the client. - * @return the mailbox's id, if matched, or null the mailbox does not exist. - */ - public String valiateMailbox( String userName, String password ) - { - String mailboxId = null; - - userName = userName.toLowerCase(); - String realPassword = configuration.getChild( CONFIGURATION_PREFIX + "user." + userName + ".password" ).getValue( null ); - - // If the user specified password is valid, encrypt it. - // the realPassword is already encrypted. - if ( password != null ) - { - password = encryptPassword( password ); - } - - // Verify the password. - if ( password == null || realPassword == null || !password.equals( realPassword ) ) - { - getLogger().info( "Authentication failed for user: " + userName ); - } - - // Load the mailbox ID - else - { - mailboxId = configuration.getChild( CONFIGURATION_PREFIX + "user." + userName + ".mailbox" ).getValue( null ); - if ( mailboxId == null || mailboxId.length() == 0 ) - { - mailboxId = null; - getLogger().error( "User " + userName + " has a valid password, but is not assigned a mailbox." ); - } - else - { - if ( getLogger().isInfoEnabled() ) getLogger().info( "User: " + userName + " successfully authenticated." ); - } - } - - return mailboxId; - } - - /** - * Determines which mailbox mail addressed to the the specified address - * should be delivered. If the address is invalid, null is returned. - * - * @param address email address of mailbox to deliver to. - * @return the mailboxId the mail should be delivered to, or null if the address is invalid. - */ - public String validateAddress( Address address ) - { - String userName = address.getUsername().toLowerCase(); - String realPassword = configuration.getChild( CONFIGURATION_PREFIX + "user." + userName + ".password" ).getValue( null ); - - // If the user is defined then open the mailbox. - if ( realPassword != null ) - { - return userName; - } - - return null; - } - - /** - * Opens a mailbox for exclusive access. The mailboxId should be - * retrieved using the validateMailbox method. - * - * @param mailboxId the unique id for the requested mailbox. - * @return a Mailbox opened for exclusive access. - */ - public synchronized Mailbox lockMailbox( String mailboxId ) - { - - // Get the mailbox's directory and validate it. - File mailboxDirectory = getMailboxDirectory( mailboxId ); - if ( mailboxDirectory == null ) - { - return null; - } - - // If there is a lock, verify it is still valid. - if ( mailboxLocks.containsKey( mailboxId ) ) - { - // Get the time the file was last touched. - Long lockTime = (Long) mailboxLocks.get( mailboxId ); - GregorianCalendar lastModified = new GregorianCalendar(); - lastModified.setTimeInMillis( lockTime.longValue() ); - - // Get the oldest valid lock file. - GregorianCalendar unlockTime = new GregorianCalendar(); - unlockTime.setTimeInMillis( System.currentTimeMillis() ); - unlockTime.roll( Calendar.MINUTE, -5 ); - - // If the lock file is too old, remove it. - if ( lastModified.before( unlockTime ) ) - { - if ( getLogger().isInfoEnabled() ) getLogger().info( "Lock timed out for mailbox: " + mailboxId ); - mailboxLocks.remove( mailboxId ); - } - } - - // Lock mailbox if unlocked. - if ( !mailboxLocks.containsKey( mailboxId ) ) - { - mailboxLocks.put( mailboxId, new Long( System.currentTimeMillis() ) ); - if ( getLogger().isInfoEnabled() ) getLogger().info( "Mailbox: " + mailboxId + " successfully locked." ); - if ( getLogger().isDebugEnabled() ) getLogger().debug( "Mailbox: " + mailboxId + " using directory: " + mailboxDirectory.getAbsolutePath() ); - return new FileMailbox( this, mailboxId, mailboxDirectory ); - } - else - { - if ( getLogger().isInfoEnabled() ) getLogger().info( "Unable to aquire lock for mailbox: " + mailboxId + " because it is already locked" ); - return null; - } - } - - //*************************************************************** - // Public Utility Methods - //*************************************************************** - - /** - * Unlocks a mailbox. - * - * @param mailboxId the unique ID of the mailbox. - */ - synchronized void unlockMailbox( String mailboxId ) - { - mailboxLocks.remove( mailboxId ); - if ( getLogger().isInfoEnabled() ) getLogger().info( "Mailbox: " + mailboxId + " successfully unlocked." ); - } - - /** - * Creates a one-way has of the specified password. This allows passwords to be - * safely stored without exposing the original plain text password. - * - * @param password the password to encrypt. - * @return the encrypted password, or null if encryption failed. - */ - public String encryptPassword( String password ) - { - - try - { - MessageDigest md = MessageDigest.getInstance( "SHA" ); - - // Conver the password to bytes and hash it. - md.update( password.getBytes() ); - byte[] hash = md.digest(); - - // Convert the hashed password back to a string. - int hashLength = hash.length; - StringBuffer hashStringBuf = new StringBuffer(); - String byteString; - int byteLength; - - // Convert each byte back to char in a string. - for ( int index = 0; index < hashLength; index++ ) - { - - byteString = String.valueOf( hash[index] + 128 ); - - //Pad string to 3. Otherwise hash may not be unique. - byteLength = byteString.length(); - switch ( byteLength ) - { - case 1: - byteString = "00" + byteString; - break; - case 2: - byteString = "0" + byteString; - break; - } - hashStringBuf.append( byteString ); - } - - return hashStringBuf.toString(); - } - catch ( NoSuchAlgorithmException nsae ) - { - getLogger().error( "Error getting password hash: " + nsae.getMessage() ); - return null; - } - } - - //*************************************************************** - // Private Utility Methods - //*************************************************************** - - /** - * Returns a file that references a specific mailbox's directory. - * - * @param mailboxId the unique id of the mailbox. - * @return the mailbox directory File, or null if it could not be found or created. - */ - private File getMailboxDirectory( String mailboxId ) - { - File mailboxDirectory = new File( rootDirectory, mailboxId ); - - // Verify the directory exists. If not, create it. - if ( !mailboxDirectory.exists() ) - { - if ( !mailboxDirectory.mkdirs() ) - { - getLogger().error( "Unable to create mailbox: " + mailboxId + " directory: " + mailboxDirectory.getAbsolutePath() ); - mailboxDirectory = null; - } - } - - return mailboxDirectory; - } - -} diff --git a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/mailbox/Mailbox.java b/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/mailbox/Mailbox.java deleted file mode 100644 index e7d82b904..000000000 --- a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/mailbox/Mailbox.java +++ /dev/null @@ -1,100 +0,0 @@ -package org.codehaus.plexus.smtp.mailbox; - -import org.codehaus.plexus.smtp.SmtpMessage; - -import java.io.IOException; -import java.io.Reader; - -public interface Mailbox -{ - public static String ROLE = Mailbox.class.getName(); - - /** - * Returns the total number of messages currently stored in this mailbox. - * - * @return the number of messages stored. - */ - long getMessageCount(); - - /** - * Returns the total size of the mailbox in bytes. - * - * @return the size (in bytes) of the entire maibox. - */ - long getMailboxSize(); - - /** - * Returns the message ID for each message. - * - * @return an array of the message IDs of the messages in this mailbox. - */ - String[] getMessageIds(); - - /** - * Returns the size (in bytes) of the specified message. - * - * @param messageId the unique ID of the message. - * @return the size (in bytes) of the specified message. - */ - long getMessageSize( String messageId ); - - /** - * Returns a java.io.Reader which is positioned to read - * the message from the storage system. - *

- * The client should close the Reader once the message has - * been retrieved. - * - * @param messageId the unique ID of the message - * @return a Reader that can access the message data. - * @throws java.io.IOException thrown if there is an error accessing the message. - */ - Reader getMessage( String messageId ) throws IOException; - - /** - * Marks a message for deletion. The message will actually be - * deleted once the commitUpdates() method is called. - * - * @param messageId - * @throws java.io.IOException thrown if there is an error accessing the mailbox - */ - void deleteMessage( String messageId ) throws IOException; - - /** - * Indicates whether the specified message is already marked - * for deletion. - * - * @param messageId the unique ID of the message. - * @return true if the messages is marked for deletion. - * @throws java.io.IOException thrown if there is an error accessing the mailbox - */ - boolean isMessageDeleted( String messageId ) throws IOException; - - /** - * Clears the deleted flag on all messages. - * - * @throws java.io.IOException thrown if there is an error accessing the mailbox - */ - void resetDeleteFlags() throws IOException; - - /** - * Stores the specified message for retrieval. - * - * @param message the message to deliver. - * @throws java.io.IOException thrown if there is an error accessing the mailbox - */ - void deliverMessage( SmtpMessage message ) throws IOException; - - /** - * Commits any changes and release the mailbox lock. - * - * @throws java.io.IOException thrown if there is an error accessing the mailbox - */ - void commitUpdates() throws IOException; - - /** - * Clear all changes made to the mailbox and release the mailbox lock. - */ - void rollbackUpdates(); - -} diff --git a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/mailbox/MailboxManager.java b/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/mailbox/MailboxManager.java deleted file mode 100644 index 06dce3ea1..000000000 --- a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/mailbox/MailboxManager.java +++ /dev/null @@ -1,66 +0,0 @@ -package org.codehaus.plexus.smtp.mailbox; - -import org.codehaus.plexus.smtp.Address; -import org.codehaus.plexus.smtp.mailbox.Mailbox; - -import java.net.InetAddress; - -public interface MailboxManager -{ - public static String ROLE = MailboxManager.class.getName(); - - /** - * Verifies whether connections should be accepted from the - * specified client address. - * - * @param address client's Internet address - * @return true if it is acceptable. - */ - boolean acceptClient( InetAddress address ); - - /** - * Verifies whether the specified user is a local user. - *

- * This class is called when the processor accepts a username - * from the client. Implementations may choose to always - * return true and delay the validation until after the - * password has been specified. Performing this validation - * will provide more information to the user, but may cause - * security concerns (username harvesting). - * - * @param userName the username specified by the client. - * @return true if the username is valid, false otherwise. - */ - boolean validateUser( String userName ); - - /** - * Verfies that the specified login criteria match an existing - * mailbox. If they match, the mailbox id is returned. This - * id can be used by the openMailbox method to access the mailbox. - * If they do not match, -1 is returned. - * - * @param userName the username specified by the client. - * @param password the password specified by the client. - * @return the mailbox's id, if matched, or null the mailbox does not exist. - */ - String valiateMailbox( String userName, String password ); - - /** - * Determines which mailbox mail addressed to the the specified address - * should be delivered. If the address is invalid, null is returned. - * - * @param address email address of mailbox to deliver to. - * @return the mailboxId the mail should be delivered to, or null if the address is invalid. - */ - String validateAddress( Address address ); - - /** - * Opens a mailbox for exclusive access. The mailboxId should be - * retrieved using the validateMailbox method. - * - * @param mailboxId the unique id for the requested mailbox. - * @return a Mailbox opened for exclusive access. - */ - Mailbox lockMailbox( String mailboxId ); - -} diff --git a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/package.html b/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/package.html deleted file mode 100644 index 25ad8e6dd..000000000 --- a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/package.html +++ /dev/null @@ -1,12 +0,0 @@ - - -This package defines the basic implementation for each of the components. - -

- -The code defined in this package (and sub packages) should not use any additional dependencies -beyond those used by the core package. This will allow this package to be compiled and provided -with the core API. Implementations that required additional dependencies should be created -under packages that reflect the dependency, such as org.codehaus.jboss, or org.codehaus.nio, etc. - - diff --git a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/queue/DeliveryQueueException.java b/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/queue/DeliveryQueueException.java deleted file mode 100644 index 129791c4e..000000000 --- a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/queue/DeliveryQueueException.java +++ /dev/null @@ -1,60 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp.queue; - -/** - * Indicates an error occured in the DeliveryQueue implementation and the - * requested action failed. - * - * @author Eric Daugherty - */ -public class DeliveryQueueException extends Exception -{ - - /** - * Default Constructor - */ - public DeliveryQueueException() - { - super(); - } - -} diff --git a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/queue/FileQueue.java b/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/queue/FileQueue.java deleted file mode 100644 index a6a4cde46..000000000 --- a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/queue/FileQueue.java +++ /dev/null @@ -1,402 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp.queue; - -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.activity.Initializable; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.smtp.Address; -import org.codehaus.plexus.smtp.SmtpMessage; -import org.codehaus.plexus.smtp.InvalidAddressException; -import org.codehaus.plexus.smtp.queue.Queue; -import org.codehaus.plexus.smtp.queue.DeliveryQueueException; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Date; -import java.util.Iterator; -import java.util.List; -import java.util.StringTokenizer; - -/** - * Provides an implementation of the DeliveryQueue interface that - * uses simple flat files to persist queued messages. - * - * @author Eric Daugherty - */ -public class FileQueue - extends AbstractLogEnabled - implements Configurable, Initializable, Queue -{ - private static final String DELIMITER = "\r\n"; - - private List messages = new ArrayList(); - - private File queueDirectory; - - public FileQueue() - { - } - - // ---------------------------------------------------------------------- - // Lifecylce Management - // ---------------------------------------------------------------------- - - /** @see org.apache.avalon.framework.configuration.Configurable#configure */ - public void configure( Configuration configuration ) - throws ConfigurationException - { - queueDirectory = new File( configuration.getChild( "directory" ).getValue() ); - } - - public void initialize() - throws Exception - { - if ( !queueDirectory.exists() ) - { - if ( !queueDirectory.mkdirs() ) - { - getLogger().error( "Unable to initialize FileDeliveryQueue. Directory: " + queueDirectory.getAbsolutePath() + " does not exist and could not be created." ); - throw new RuntimeException( "Unable to initialize FileDeliveryQueue. Directory: " + queueDirectory.getAbsolutePath() + " does not exist and could not be created." ); - } - } - else if ( !queueDirectory.isDirectory() ) - { - getLogger().error( "Unable to initialize FileDeliveryQueue. The specified path: " + queueDirectory.getAbsolutePath() + " is not a directory." ); - throw new RuntimeException( "Unable to initialize FileDeliveryQueue. Directory: " + queueDirectory.getAbsolutePath() + " is not a directory." ); - } - - loadMessages(); - } - - //*************************************************************** - // DeliveryQueue Interface Methods - //*************************************************************** - - /** - * Adds a message to the queue for delivery. - * - * @param message the new message to process. - */ - public void addMessage( SmtpMessage message ) - throws DeliveryQueueException - { - try - { - saveMessage( message ); - messages.add( message ); - } - catch ( IOException ioException ) - { - getLogger().error( "Unable to save SMTPMessage to a file. Message ID: " + message.getId(), ioException ); - throw new DeliveryQueueException(); - } - - } - - /** - * Returns an Collection containing all the messages - * in the queue for delivery. - *

- * The queue should only return messages that are ready for delivery. If a message - * has a delivery date in the future, it should not be included in this iterator. - *

- * This method should continue to return all the messages with current delivery dates - * for each call. The caller must insure that message delivery is not attempted more - * than once. - * - * @return SMTPMessages to deliver. - */ - public Collection getMessagesForDelivery() - { - List deliveryMessages = new ArrayList(); - Iterator allMessages = messages.iterator(); - SmtpMessage message; - long currentTime = System.currentTimeMillis(); - while ( allMessages.hasNext() ) - { - message = (SmtpMessage) allMessages.next(); - if ( message.getScheduledDelivery().getTime() <= currentTime ) - { - deliveryMessages.add( message ); - } - } - - return deliveryMessages; - } - - /** - * Updates a message in the queue. This should be called when - * a message has been partially delivered. The delivery attempts - * and delivery time should have been updated, and any addresses - * that were successful delievery should be removed from the list. - * - * @param message the updated message. - */ - public void updateMessage( SmtpMessage message ) - { - try - { - saveMessage( message ); - } - catch ( IOException ioException ) - { - getLogger().error( "Unable to save updated SMTPMessage to a file. Message ID: " + message.getId() + " Message may be delivered multiple times!", ioException ); - // No point in throwing an exception here since the message has already been delivered. - } - } - - /** - * Removes the message from the queue, indicating that it has been - * successfully delivered, or delivery has permamnantly failed. - * - * @param message the message to remove. - */ - public void removeMessage( SmtpMessage message ) - { - try - { - deleteMessage( message ); - } - catch ( IOException ioException ) - { - getLogger().error( "Unable to delete SMTPMessage after completed delivery. Message ID: " + message.getId() + " Message removed from memory queue but must be deleted manually.", ioException ); - } - finally - { - // Remove the message from the memory queue, so we don't redeliver it right away. - // Hopefully, the administrator will monitor the log and delete it manually. - messages.remove( message ); - } - } - - - /** - * Write the message to disk so it will survive a process restart. - * - * @param message the message to persist. - * @throws java.io.IOException thrown if there is an error writing the file. - */ - private void saveMessage( SmtpMessage message ) throws IOException - { - - File messageFile = new File( queueDirectory, message.getId() ); - FileWriter writer = new FileWriter( messageFile ); - try - { - writer.write( message.getId() ); - writer.write( DELIMITER ); - writer.write( message.getFromAddress().toString() ); - writer.write( DELIMITER ); - writer.write( flattenAddresses( message.getToAddresses() ) ); - writer.write( DELIMITER ); - writer.write( String.valueOf( message.getTimeReceived().getTime() ) ); - writer.write( DELIMITER ); - writer.write( String.valueOf( message.getScheduledDelivery().getTime() ) ); - writer.write( DELIMITER ); - writer.write( String.valueOf( message.getDeliveryAttempts() ) ); - writer.write( DELIMITER ); - writer.write( message.getData() ); - } - finally - { - try - { - if ( writer != null ) - { - writer.close(); - } - } - catch ( IOException e ) - { - getLogger().warn( "Unable to close spool file for SMTPMessage " + message.getId() ); - } - } - } - - /** - * Deletes the queue file for the specified message. - * - * @param message the message to delete. - * @throws java.io.IOException thrown if the file is not deleted successfully. - */ - private void deleteMessage( SmtpMessage message ) throws IOException - { - File messageFile = new File( queueDirectory, message.getId() ); - if ( !messageFile.delete() ) - { - throw new IOException( "Unable to delete file: " + messageFile.getAbsolutePath() ); - } - } - - /** - * Loads all the messages stored in the spool directory. Any errors are logged - * but not thrown. If a message failes, processing continues to the next message. - */ - private void loadMessages() - { - File[] messageFiles = queueDirectory.listFiles(); - - File messageFile; - int numFiles = messageFiles.length; - for ( int index = 0; index < numFiles; index++ ) - { - messageFile = messageFiles[index]; - if ( messageFile.isFile() ) - { - try - { - loadMessage( messageFile ); - } - catch ( IOException ioException ) - { - getLogger().warn( "Unable to load SMTPMessage from file: " + messageFile.getAbsolutePath() + " This message will not be delivered.", ioException ); - } - } - } - } - - /** - * Loads an individual message from disk. - * - * @param messageFile the File that contains the message. - * @throws java.io.IOException thrown if there is any IO error while reading the message. - */ - private void loadMessage( File messageFile ) throws IOException - { - - FileReader fileReader = new FileReader( messageFile ); - BufferedReader reader = new BufferedReader( fileReader ); - - - try - { - SmtpMessage message = new SmtpMessage( reader.readLine() ); - message.setFromAddress( new Address( reader.readLine() ) ); - message.setToAddresses( inflateAddresses( reader.readLine() ) ); - message.setTimeReceived( new Date( Long.parseLong( reader.readLine() ) ) ); - message.setScheduledDelivery( new Date( Long.parseLong( reader.readLine() ) ) ); - message.setDeliveryAttempts( Integer.parseInt( reader.readLine() ) ); - - String inputLine = reader.readLine(); - StringBuffer data = new StringBuffer(); - while ( inputLine != null ) - { - data.append( inputLine ); - data.append( "\r\n" ); - inputLine = reader.readLine(); - } - message.setData( data.toString() ); - - messages.add( message ); - } - catch ( InvalidAddressException invalidAddressException ) - { - throw new IOException( "Unable to parse the address from the stored file." ); - } - catch ( NumberFormatException numberFormatException ) - { - throw new IOException( "Unable to parse the data from the stored file into a number. " + numberFormatException.toString() ); - } - } - - /** - * Converts a Collection of Address - * instances into a comma delimited string. - * - * @param addresses Collection of Address instances. - * @return Comma delimited String of the addresses. - */ - private String flattenAddresses( Collection addresses ) - { - StringBuffer toAddresses = new StringBuffer(); - Address address; - Iterator addressIterator = addresses.iterator(); - while ( addressIterator.hasNext() ) - { - address = (Address) addressIterator.next(); - toAddresses.append( address.toString() ); - toAddresses.append( "," ); - } - - // Remove the last comma. - toAddresses.deleteCharAt( toAddresses.length() - 1 ); - - return toAddresses.toString(); - } - - /** - * Converts a comma delimited string of addresses into a - * Collection of Address instances. - * - * @param addresses Comma delimited String of addresses. - * @return Collection of Address instances. - */ - private Collection inflateAddresses( String addresses ) - { - StringTokenizer addressTokenizer = new StringTokenizer( addresses, "," ); - List addressList = new ArrayList(); - Address address; - - try - { - while ( addressTokenizer.hasMoreTokens() ) - { - address = new Address( addressTokenizer.nextToken() ); - addressList.add( address ); - } - - return addressList; - } - catch ( InvalidAddressException invalidAddressException ) - { - getLogger().error( "Unable to parse to address read from database. Full String is: " + addresses, invalidAddressException ); - throw new RuntimeException( "Error parsing address. Message Delivery Failed." ); - } - } -} diff --git a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/queue/MemoryQueue.java b/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/queue/MemoryQueue.java deleted file mode 100644 index 8c4dd3246..000000000 --- a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/queue/MemoryQueue.java +++ /dev/null @@ -1,134 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp.queue; - -import org.codehaus.plexus.smtp.SmtpMessage; -import org.codehaus.plexus.smtp.queue.Queue; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; - -/** - * Simple Memory based delivery queue. This delivery queue should only be - * used in cases where the loss of queued messages across process restarts - * is acceptable. - *

- * Because this version is memory only, it will be faster than the - * other alternatives. - *

- * Normal installs should use the FileDeliveryQueue or other persistance - * based DeliveryQueues. - * - * @author Eric Daugherty - */ -public class MemoryQueue - implements Queue -{ - private List messages = new ArrayList(); - - /** - * Adds a message to the queue for delivery. - * - * @param message the new message to process. - */ - public void addMessage( SmtpMessage message ) - { - messages.add( message ); - } - - /** - * Returns a Collection containing all the messages - * in the queue for delivery. - *

- * The queue should only return messages that are ready for delivery. If a message - * has a delivery date in the future, it should not be included in this iterator. - *

- * This method should continue to return all the messages with current delivery dates - * for each call. The caller must insure that message delivery is not attempted more - * than once. - * - * @return SMTPMessages to deliver. - */ - public Collection getMessagesForDelivery() - { - List deliveryMessages = new ArrayList(); - Iterator allMessages = messages.iterator(); - SmtpMessage message; - long currentTime = System.currentTimeMillis(); - while ( allMessages.hasNext() ) - { - message = (SmtpMessage) allMessages.next(); - if ( message.getScheduledDelivery().getTime() <= currentTime ) - { - deliveryMessages.add( message ); - } - } - - return deliveryMessages; - } - - /** - * Updates a message in the queue. This should be called when - * a message has been partially delivered. The delivery attempts - * and delivery time should have been updated, and any addresses - * that were successful delievery should be removed from the list. - * - * @param message the updated message. - */ - public void updateMessage( SmtpMessage message ) - { - // Do nothing, since the message is just in memory, it is already updated. - } - - /** - * Removes the message from the queue, indicating that it has been - * successfully delivered, or delivery has permamnantly failed. - * - * @param message the message to remove. - */ - public void removeMessage( SmtpMessage message ) - { - messages.remove( message ); - } - -} diff --git a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/queue/Queue.java b/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/queue/Queue.java deleted file mode 100644 index cc1e2f141..000000000 --- a/plexus-servers/smtpd/src/java/org/codehaus/plexus/smtp/queue/Queue.java +++ /dev/null @@ -1,99 +0,0 @@ -/****************************************************************************** - * $Workfile: $ - * $Revision$ - * $Author$ - * $Date$ - ****************************************************************************** - * Copyright (c) 2003, Eric Daugherty (http://www.ericdaugherty.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Eric Daugherty nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * ***************************************************************************** - * For current versions and more information, please visit: - * http://www.ericdaugherty.com/java/mailserver - * - * or contact the author at: - * java@ericdaugherty.com - *****************************************************************************/ - -package org.codehaus.plexus.smtp.queue; - -import org.codehaus.plexus.smtp.SmtpMessage; - -import java.util.Collection; - -/** - * Defines the plugin interface for a DeliveryQueue. The queue's job is - * to persist the messages when they are received and make them - * available provide access to them for delivery. - */ -public interface Queue -{ - /** Role of this component. */ - public static String ROLE = Queue.class.getName(); - - /** - * Adds a message to the queue for delivery. - * - * @param message the new message to process. - * @exception org.codehaus.plexus.smtp.queue.DeliveryQueueException thrown when there is an error adding the message to the queue. - */ - void addMessage( SmtpMessage message ) - throws DeliveryQueueException; - - /** - * Returns an Collection containing all the messages - * in the queue for delivery. - *

- * The queue should only return messages that are ready for delivery. If a message - * has a delivery date in the future, it should not be included in this iterator. - *

- * This method should continue to return all the messages with current delivery dates - * for each call. The caller must insure that message delivery is not attempted more - * than once. - * - * @return SMTPMessages to deliver. - */ - Collection getMessagesForDelivery(); - - /** - * Updates a message in the queue. This should be called when - * a message has been partially delivered. The delivery attempts - * and delivery time should have been updated, and any addresses - * that were successful delievery should be removed from the list. - * - * @param message the updated message. - */ - void updateMessage( SmtpMessage message ); - - /** - * Removes the message from the queue, indicating that it has been - * successfully delivered, or delivery has permamnantly failed. - * - * @param message the message to remove. - */ - void removeMessage( SmtpMessage message ); - -} diff --git a/plexus-servers/smtpd/src/test/org/codehaus/plexus/smtp/DefaultSmtpServerTest.java b/plexus-servers/smtpd/src/test/org/codehaus/plexus/smtp/DefaultSmtpServerTest.java deleted file mode 100644 index 528059d38..000000000 --- a/plexus-servers/smtpd/src/test/org/codehaus/plexus/smtp/DefaultSmtpServerTest.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.codehaus.plexus.smtp; - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.synapse.SynapseServer; - -/** - * - * - * @author Jason van Zyl - * - * @version $Id$ - */ -public class DefaultSmtpServerTest - extends PlexusTestCase -{ - public DefaultSmtpServerTest( String name ) - { - super( name ); - } - - public void testSmtpServer() - throws Exception - { - SynapseServer server = (SynapseServer) lookup( SynapseServer.ROLE ); - - assertNotNull( server ); - -/* - while( true ) - { - } -*/ - } -} diff --git a/plexus-servers/smtpd/src/test/org/codehaus/plexus/smtp/DefaultSmtpServerTest.xml b/plexus-servers/smtpd/src/test/org/codehaus/plexus/smtp/DefaultSmtpServerTest.xml deleted file mode 100644 index 7a23d1315..000000000 --- a/plexus-servers/smtpd/src/test/org/codehaus/plexus/smtp/DefaultSmtpServerTest.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - org.codehaus.plexus.synapse.SynapseServer - org.codehaus.plexus.smtp.DefaultSmtpServer - - - org.codehaus.plexus.synapse.acceptor.SocketAcceptor - org.codehaus.plexus.synapse.acceptor.DefaultSocketAcceptor - - 10000 - - - - org.codehaus.plexus.synapse.reactor.Reactor - org.codehaus.plexus.synapse.reactor.DefaultReactor - - - org.codehaus.plexus.synapse.socket.ServerSocketFactory - org.codehaus.plexus.synapse.socket.DefaultServerSocketFactory - - - org.codehaus.plexus.dns.DNSResolver - org.codehaus.plexus.dns.DNSJavaResolver - - - - org.codehaus.plexus.smtp.queue.Queue - org.codehaus.plexus.smtp.queue.FileQueue - - mail - - - - org.codehaus.plexus.synapse.handler.ServiceHandler - org.codehaus.plexus.smtp.SmtpServiceHandler - - mail.codehaus.org - - - - \ No newline at end of file diff --git a/plexus-servers/synapse/maven.xml b/plexus-servers/synapse/maven.xml deleted file mode 100644 index fbb3261fb..000000000 --- a/plexus-servers/synapse/maven.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/plexus-servers/synapse/notes.txt b/plexus-servers/synapse/notes.txt deleted file mode 100644 index d0bb71da4..000000000 --- a/plexus-servers/synapse/notes.txt +++ /dev/null @@ -1,2 +0,0 @@ -o possibly adding blissed to take care of state issues like in the smtp server. -o the service handlers should be instantiated for each client request diff --git a/plexus-servers/synapse/project.properties b/plexus-servers/synapse/project.properties deleted file mode 100644 index f75396832..000000000 --- a/plexus-servers/synapse/project.properties +++ /dev/null @@ -1,8 +0,0 @@ -maven.repo.remote=http://www.ibiblio.com/maven,http://spice.sourceforge.net/maven,http://dist.codehaus.org,file:${basedir}/../../tools/lib -maven.javadoc.links = \ - http://avalon.apache.org/api/, \ - http://dna.jcontainer.org/apidocs/, \ - http://java.sun.com/j2se/1.3/docs/api/ -maven.javadoc.additionalparam=-tag phoenix.service -tag phoenix.component -tag phoenix.context -tag phoenix.entry -tag phoenix.dependency - -maven.junit.fork=true diff --git a/plexus-servers/synapse/project.xml b/plexus-servers/synapse/project.xml deleted file mode 100644 index 297f66db9..000000000 --- a/plexus-servers/synapse/project.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - 3 - plexus-synapse - plexus-synapse - plexus - Synapse - org.codehaus.plexus.synapse - 0.1 - 1999 - - Components useful for creating a Network Server. - - - Components useful for creating a Network Server. This includes an abstraction - for creating sockets, an implementation of the Acceptor/Connector pattern from - ACE for both stream based and packet based connections, etc. - - - - - plexus - plexus - 0.14-SNAPSHOT - - - mockobjects - mockobjects-core - 0.09 - - - avalon - avalon-framework - 4.1.4 - - - spice - spice-threadpool - 1.0-b1 - - runtime - - - - commons-pool - 20030623.172700 - - runtime - - - - commons-collections - 2.0 - - runtime - - - - - - - Peter Donald - donaldp - peter at realityforge.org - - Developer - - - - Mauro Talevi - maurotalevi - mauro.talevi at aquilonia.org - - Developer - - - - - - src/java - src/test - - - **/*Test.java - - - - - - maven-changelog-plugin - maven-changes-plugin - maven-developer-activity-plugin - maven-file-activity-plugin - maven-javadoc-plugin - maven-jdepend-plugin - maven-jcoverage-plugin - maven-junit-report-plugin - maven-jxr-plugin - maven-checkstyle-plugin - maven-license-plugin - - - - diff --git a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/AbstractSynapseServer.java b/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/AbstractSynapseServer.java deleted file mode 100644 index 23b0c8dc1..000000000 --- a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/AbstractSynapseServer.java +++ /dev/null @@ -1,85 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.synapse; - -import org.apache.avalon.framework.activity.Disposable; -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.activity.Startable; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.service.Serviceable; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.synapse.acceptor.SocketAcceptor; -import org.codehaus.plexus.synapse.handler.ServiceHandler; -import org.codehaus.plexus.synapse.reactor.Reactor; - -public abstract class AbstractSynapseServer - extends AbstractLogEnabled - implements Serviceable, Configurable, Initializable, Startable, Disposable, SynapseServer -{ - private Reactor reactor; - - private SocketAcceptor socketAcceptor; - - // ---------------------------------------------------------------------- - // API - // ---------------------------------------------------------------------- - - public void registerServiceHandler( ServiceHandler serviceHandler ) - { - reactor.registerServiceHandler( serviceHandler ); - } - - public Reactor getReactor() - { - return reactor; - } - - // ---------------------------------------------------------------------- - // Lifecylce Management - // ---------------------------------------------------------------------- - - /** @see Serviceable#service */ - public void service( ServiceManager serviceManager ) - throws ServiceException - { - reactor = (Reactor) serviceManager.lookup( Reactor.ROLE ); - - socketAcceptor = (SocketAcceptor) serviceManager.lookup( SocketAcceptor.ROLE ); - } - - /** @see Configurable#configure */ - public void configure( Configuration configuration ) - throws ConfigurationException - { - } - - /** @see Initializable#initialize */ - public void initialize() - throws Exception - { - reactor.registerServiceHandler( socketAcceptor ); - } - - /** @see Startable#start */ - public void start() - throws Exception - { - // Start the reactors main event handling loop. - reactor.handleEvents(); - } - - /** @see Startable#stop */ - public void stop() - throws Exception - { - } -} - - diff --git a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/SynapseServer.java b/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/SynapseServer.java deleted file mode 100644 index 9f1ff2af3..000000000 --- a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/SynapseServer.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.codehaus.plexus.synapse; - -import org.codehaus.plexus.synapse.handler.ServiceHandler; -import org.codehaus.plexus.synapse.reactor.Reactor; - -/** - * - * - * @author Jason van Zyl - * - * @version $Id$ - */ -public interface SynapseServer -{ - static String ROLE = SynapseServer.class.getName(); - - void registerServiceHandler( ServiceHandler serviceHandler ); - - Reactor getReactor(); -} diff --git a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/acceptor/DefaultSocketAcceptor.java b/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/acceptor/DefaultSocketAcceptor.java deleted file mode 100644 index cb052a6e0..000000000 --- a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/acceptor/DefaultSocketAcceptor.java +++ /dev/null @@ -1,167 +0,0 @@ -/*************************************************************************** - * Copyright 2001-2003 The eXo Platform SARL All rights reserved. * - * Please look at license.txt in info directory for more license detail. * - **************************************************************************/ - -package org.codehaus.plexus.synapse.acceptor; - -import org.apache.avalon.framework.activity.Disposable; -import org.apache.avalon.framework.activity.Initializable; -import org.apache.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.avalon.framework.service.ServiceException; -import org.apache.avalon.framework.service.ServiceManager; -import org.apache.avalon.framework.service.Serviceable; -import org.codehaus.plexus.synapse.handler.AbstractServiceHandler; -import org.codehaus.plexus.synapse.socket.ServerSocketFactory; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.ServerSocket; -import java.net.Socket; - -public class DefaultSocketAcceptor - extends AbstractServiceHandler - implements Serviceable, Configurable, Initializable, Disposable, SocketAcceptor -{ - private int port; - - private Thread serverThread; - - private boolean serverStarted; - - private ServerSocket serverSocket; - - private ServerSocketFactory serverSocketFactory; - - private InetAddress localAddress; - - private InetAddress bindAddress; - - // maximum connections - - // paranoid mode - - // list of valid address that can connect - - public boolean isServerStarted() - { - return serverStarted; - } - - /** - * to change the server's status - */ - private void setServerStarted( boolean serverStarted ) - { - this.serverStarted = serverStarted; - } - - // ---------------------------------------------------------------------- - // Service Handler API - // ---------------------------------------------------------------------- - - public void handleEvents() - { - start(); - } - - public void handleEvent( Socket socket ) - { - } - - public String getHandleKey() - { - return "ACCEPT"; - } - - // ---------------------------------------------------------------------- - // Lifecylce Management - // ---------------------------------------------------------------------- - - /** @see Serviceable#service */ - public void service( ServiceManager serviceManager ) - throws ServiceException - { - serverSocketFactory = (ServerSocketFactory) serviceManager.lookup( ServerSocketFactory.class.getName() ); - } - - /** @see org.apache.avalon.framework.configuration.Configurable#configure */ - public void configure( Configuration configuration ) - throws ConfigurationException - { - port = configuration.getChild( "port" ).getValueAsInteger(); - } - - /** @see Initializable#initialize */ - public void initialize() - throws Exception - { - InetAddress[] adds = InetAddress.getAllByName( "192.168.1.103" ); - - bindAddress = adds[0]; - - serverSocket = serverSocketFactory.createServerSocket( port, 50, bindAddress ); - - localAddress = InetAddress.getLocalHost(); - } - - public void start() - { - if ( serverThread != null ) - { - return; - } - - setServerStarted( true ); - - System.out.println( "Server is started" ); - - serverThread = new Thread( new Runnable() - { - public void run() - { - while ( isServerStarted() ) - { - try - { - Socket socket = serverSocket.accept(); - - getReactor().handleEvent( socket ); - } - catch ( Exception e ) - { - getLogger().error( "Error processing request: ", e ); - } - } - } - } ); - - serverThread.start(); - } - - public void stop() - { - setServerStarted( false ); - - serverThread = null; - - try - { - serverSocket.close(); - } - catch ( IOException e ) - { - getLogger().error( "Error shutting down server." ); - } - } - - /** @see org.apache.avalon.framework.activity.Disposable#dispose() */ - public void dispose() - { - stop(); - } -} - - diff --git a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/acceptor/SocketAcceptor.java b/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/acceptor/SocketAcceptor.java deleted file mode 100644 index b1e18f707..000000000 --- a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/acceptor/SocketAcceptor.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.codehaus.plexus.synapse.acceptor; - -import org.codehaus.plexus.synapse.handler.ServiceHandler; - -/** - * - * - * @author Jason van Zyl - * - * @version $Id$ - */ -public interface SocketAcceptor - extends ServiceHandler -{ - static String ROLE = SocketAcceptor.class.getName(); -} diff --git a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/handler/AbstractServiceHandler.java b/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/handler/AbstractServiceHandler.java deleted file mode 100644 index a524c59a1..000000000 --- a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/handler/AbstractServiceHandler.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.codehaus.plexus.synapse.handler; - -import org.codehaus.plexus.synapse.reactor.Reactor; -import org.codehaus.plexus.logging.AbstractLogEnabled; - -import java.net.Socket; - -/** - * - * - * @author Jason van Zyl - * - * @version $Id$ - */ -public abstract class AbstractServiceHandler - extends AbstractLogEnabled - implements ServiceHandler -{ - private Reactor reactor; - - public void setReactor( Reactor reactor ) - { - this.reactor = reactor; - } - - public Reactor getReactor() - { - return reactor; - } - - public abstract void handleEvents() - throws Exception; - - public abstract void handleEvent( Socket socket ) - throws Exception; - - public abstract String getHandleKey(); -} diff --git a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/handler/Handle.java b/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/handler/Handle.java deleted file mode 100644 index 57288b5fb..000000000 --- a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/handler/Handle.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.codehaus.plexus.synapse.handler; - -/** - * - * - * @author Jason van Zyl - * - * @version $Id$ - */ -public class Handle -{ -} diff --git a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/handler/ServiceHandler.java b/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/handler/ServiceHandler.java deleted file mode 100644 index 78b3f77c0..000000000 --- a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/handler/ServiceHandler.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.plexus.synapse.handler; - -import org.codehaus.plexus.synapse.reactor.Reactor; - -import java.net.Socket; - -/** - * - * - * @author Jason van Zyl - * - * @version $Id$ - */ -public interface ServiceHandler -{ - String getHandleKey(); - - void handleEvents() - throws Exception; - - void handleEvent( Socket socket ) - throws Exception; - - void setReactor( Reactor reactor ); - - Reactor getReactor(); -} diff --git a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/reactor/DefaultReactor.java b/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/reactor/DefaultReactor.java deleted file mode 100644 index db451de68..000000000 --- a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/reactor/DefaultReactor.java +++ /dev/null @@ -1,70 +0,0 @@ -package org.codehaus.plexus.synapse.reactor; - -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.synapse.handler.ServiceHandler; - -import java.net.Socket; -import java.util.HashMap; -import java.util.Map; - -/** - * Responsibilities of the Reactor: - * - * -> Register and removes event handlers and their associated handles. - * -> Manages a handle set. - * -> Run's the applications event loop. - * - * The reactor pattern 'inverts' teh flow of control within an application. it is - * the responsibility of a reactor, not the application, to wait for indication events, - * demultiplex these events to their concrete event handlers and dispatch the appropriate - * hook method on the concrete event handler. In particular, a reactor is not called by a - * concrete event handler but instead a reactor dispatches concrete event handlers, which - * react to the occurence of a specific event. This 'inversion of control', is known as - * the Hollywood principle as coined by John Vlissides in Pattern Hatching. - * - * @author Jason van Zyl - * - * @version $Id$ - */ -public class DefaultReactor - extends AbstractLogEnabled - implements Reactor -{ - private Map serviceHandlers; - - public DefaultReactor() - { - serviceHandlers = new HashMap(); - } - - /** - * This is the reactors event loop. - */ - public void handleEvents() - throws Exception - { - ServiceHandler serviceHandler = (ServiceHandler) serviceHandlers.get( "ACCEPT" ); - - serviceHandler.handleEvents(); - } - - public void handleEvent( Socket socket ) - throws Exception - { - ServiceHandler serviceHandler = (ServiceHandler) serviceHandlers.get( "PROCESS" ); - - serviceHandler.handleEvent( socket ); - } - - public void registerServiceHandler( ServiceHandler serviceHandler ) - { - serviceHandler.setReactor( this ); - - serviceHandlers.put( serviceHandler.getHandleKey(), serviceHandler ); - } - - public void removeServiceHandler( ServiceHandler serviceHandler ) - { - serviceHandlers.remove( serviceHandler.getHandleKey() ); - } -} diff --git a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/reactor/Reactor.java b/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/reactor/Reactor.java deleted file mode 100644 index 9214d35b3..000000000 --- a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/reactor/Reactor.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.codehaus.plexus.synapse.reactor; - -import org.codehaus.plexus.synapse.handler.ServiceHandler; - -import java.net.Socket; - -/** - * - * - * @author Jason van Zyl - * - * @version $Id$ - */ -public interface Reactor -{ - static String ROLE = Reactor.class.getName(); - - public void handleEvents() - throws Exception; - - public void handleEvent( Socket socket ) - throws Exception; - - public void registerServiceHandler( ServiceHandler serviceHandler ); - - public void removeServiceHandler( ServiceHandler serviceHandler ); - -} diff --git a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/socket/DefaultServerSocketFactory.java b/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/socket/DefaultServerSocketFactory.java deleted file mode 100644 index 0f5cc432c..000000000 --- a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/socket/DefaultServerSocketFactory.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) The Spice Group. All rights reserved. - * - * This software is published under the terms of the Spice - * Software License version 1.1, a copy of which has been included - * with this distribution in the LICENSE.txt file. - */ -package org.codehaus.plexus.synapse.socket; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.ServerSocket; -import org.codehaus.plexus.synapse.socket.ServerSocketFactory; - -/** - * Factory implementation for vanilla TCP socket. - * - * @author Peter Donald - * @version $Revision$ $Date$ - */ -public class DefaultServerSocketFactory - implements ServerSocketFactory -{ - /** - * Creates a socket on specified port. - * - * @param port the port (0 indicates any available port) - * @return the created ServerSocket - * @throws java.io.IOException if unable to create socket - */ - public ServerSocket createServerSocket( final int port ) - throws IOException - { - return new ServerSocket( port ); - } - - /** - * Creates a socket on specified port with a specified backlog. - * - * @param port the port (0 indicates any available port) - * @param backlog the backlog - * @return the created ServerSocket - * @throws java.io.IOException if unable to create socket - */ - public ServerSocket createServerSocket( int port, int backlog ) - throws IOException - { - return new ServerSocket( port, backlog ); - } - - /** - * Creates a socket on a particular network interface on specified port - * with a specified backlog. - * - * @param port the port (0 indicates any available port) - * @param backlog the backlog - * @param address the network interface to bind to. - * @return the created ServerSocket - * @throws java.io.IOException if unable to create socket - */ - public ServerSocket createServerSocket( int port, int backlog, InetAddress address ) - throws IOException - { - return new ServerSocket( port, backlog, address ); - } -} - diff --git a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/socket/DefaultSocketFactory.java b/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/socket/DefaultSocketFactory.java deleted file mode 100644 index 3f10adfd6..000000000 --- a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/socket/DefaultSocketFactory.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) The Spice Group. All rights reserved. - * - * This software is published under the terms of the Spice - * Software License version 1.1, a copy of which has been included - * with this distribution in the LICENSE.txt file. - */ -package org.codehaus.plexus.synapse.socket; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.Socket; -import org.codehaus.plexus.synapse.socket.SocketFactory; - -/** - * A SocketFactory that creates vanilla socket. - * - * @author Peter Donald - * @version $Revision$ $Date$ - */ -public class DefaultSocketFactory - implements SocketFactory -{ - /** - * Create a socket that connects to specified remote address. - * - * @param address the remote address - * @param port the remote port - * @return the socket connected to remote address - * @throws java.io.IOException if unable to create socket - */ - public Socket createSocket( final InetAddress address, final int port ) - throws IOException - { - return new Socket( address, port ); - } - - /** - * Create a socket that connects to specified remote address and - * originates from specified local address. - * - * @param address the remote address - * @param port the remote port - * @param localAddress the local address - * @param localPort the local port - * @return the socket connected to remote address - * @throws java.io.IOException if unable to create socket - */ - public Socket createSocket( final InetAddress address, - final int port, - final InetAddress localAddress, - final int localPort ) - throws IOException - { - return new Socket( address, port, localAddress, localPort ); - } -} diff --git a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/socket/ServerSocketFactory.java b/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/socket/ServerSocketFactory.java deleted file mode 100644 index 211bef982..000000000 --- a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/socket/ServerSocketFactory.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) The Spice Group. All rights reserved. - * - * This software is published under the terms of the Spice - * Software License version 1.1, a copy of which has been included - * with this distribution in the LICENSE.txt file. - */ -package org.codehaus.plexus.synapse.socket; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.ServerSocket; - -/** - * Service used to create server socket. The factory is used so that - * the exact socket type and underlying transport is abstracted. The - * socket created could be proxied, SSL enabled, TLS enabled etc. - * However clients just care that they return socket. - * - * @author Peter Donald - * @version $Revision$ $Date$ - */ -public interface ServerSocketFactory -{ - /** - * Creates a socket on specified port. - * - * @param port the port (0 indicates any available port) - * @return the created ServerSocket - * @throws IOException if unable to create socket - */ - ServerSocket createServerSocket( int port ) - throws IOException; - - /** - * Creates a socket on specified port with a specified backlog. - * - * @param port the port (0 indicates any available port) - * @param backlog the backlog - * @return the created ServerSocket - * @throws IOException if unable to create socket - */ - ServerSocket createServerSocket( int port, int backlog ) - throws IOException; - - /** - * Creates a socket on a particular network interface on specified port - * with a specified backlog. - * - * @param port the port (0 indicates any available port) - * @param backlog the backlog - * @param address the network interface to bind to. - * @return the created ServerSocket - * @throws IOException if unable to create socket - */ - ServerSocket createServerSocket( int port, int backlog, InetAddress address ) - throws IOException; -} - diff --git a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/socket/SocketFactory.java b/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/socket/SocketFactory.java deleted file mode 100644 index 74bfba2f9..000000000 --- a/plexus-servers/synapse/src/java/org/codehaus/plexus/synapse/socket/SocketFactory.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) The Spice Group. All rights reserved. - * - * This software is published under the terms of the Spice - * Software License version 1.1, a copy of which has been included - * with this distribution in the LICENSE.txt file. - */ -package org.codehaus.plexus.synapse.socket; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.Socket; - -/** - * Service used to create client socket. The factory is used so that - * the exact socket type and underlying transport is abstracted. The - * socket created could be proxied, SSL enabled, TLS enabled etc. - * However clients just care that they return socket. - * - * @author Peter Donald - * @version $Revision$ $Date$ - */ -public interface SocketFactory -{ - /** - * Create a socket that connects to specified remote address. - * - * @param address the remote address - * @param port the remote port - * @return the socket connected to remote address - * @throws IOException if unable to create socket - */ - Socket createSocket( InetAddress address, int port ) - throws IOException; - - /** - * Create a socket that connects to specified remote address and - * originates from specified local address. - * - * @param address the remote address - * @param port the remote port - * @param localAddress the local address - * @param localPort the local port - * @return the socket connected to remote address - * @throws IOException if unable to create socket - */ - Socket createSocket( InetAddress address, int port, - InetAddress localAddress, int localPort ) - throws IOException; -} diff --git a/plexus-servers/synapse/xdocs/index.xml b/plexus-servers/synapse/xdocs/index.xml deleted file mode 100644 index 6065e1276..000000000 --- a/plexus-servers/synapse/xdocs/index.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - Synapse - - -

-

- The Acceptor-Connector design pattern decouples the connection and initialization - of cooperating peer services in a networked system from the processing performed by - the peer services after they are connected and initialized. -

-

- A real-life implementation of the Acceptor-Connector pattern is often found in organizations - that provide secretaries for their managers. A manager wishing to make a phone call to another - manager asks her secretary to establish the call rather than doing it herself. However, the call - is not received by the called manager directly, but by his secretary. Once the connection is - established it is then passed to the managers. In terms of the Acceptor-Connector pattern, the - secretary that initiates the call is the connector, the secretary that receives the call is - the acceptor and the two managers are the peer service handlers. -

-
- - diff --git a/plexus-servlet/pom.xml b/plexus-servlet/pom.xml deleted file mode 100644 index c25ef501d..000000000 --- a/plexus-servlet/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - plexus - org.codehaus.plexus - 1.0.7 - - 4.0.0 - plexus-servlet - Plexus Servlet - 1.0-beta-6-SNAPSHOT - - - javax.servlet - servlet-api - 2.3 - provided - - - org.codehaus.plexus - plexus-container-default - 1.0-alpha-10 - - - diff --git a/plexus-servlet/src/main/java/org/codehaus/plexus/servlet/PlexusLoaderServlet.java b/plexus-servlet/src/main/java/org/codehaus/plexus/servlet/PlexusLoaderServlet.java deleted file mode 100644 index d12662ac8..000000000 --- a/plexus-servlet/src/main/java/org/codehaus/plexus/servlet/PlexusLoaderServlet.java +++ /dev/null @@ -1,109 +0,0 @@ -package org.codehaus.plexus.servlet; - -/** - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.PlexusContainerException; -import org.codehaus.plexus.embed.Embedder; -import org.codehaus.plexus.embed.EmbedderException; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import java.io.IOException; - -/** - *

PlexusLoaderServlet loads a Plexus {@link Embedder} for a web - * application. The embedder is put into the - * ServletContext so PlexusServlets can retrieve it. - * It is important to make sure that this class is loaded before the startup of - * your web application that uses the Plexus Embedder. - * Alternatively, the servlet container can be loaded as a component within a - * Plexus manager. In that case, this class is no longer needed. - *

- *

- * To configure this servlet you must specify the location of the plexus - * configuration file relative to the root of your webapplication. This must be - * passed as the "plexus-config" init-parameter to the servlet. - *

- * - * @author Dan Diephouse - * @author Mark Wilkinson - * @version $Revision$ - */ -public abstract class PlexusServlet - extends HttpServlet -{ - public final boolean hasComponent( String role ) - throws ServletException - { - return PlexusServletUtils.hasComponent( getServletContext(), role ); - } - - public final boolean hasComponent( String role, String id ) - throws ServletException - { - return PlexusServletUtils.hasComponent( getServletContext(), role, id ); - } - - public final Object lookup( String role ) - throws ServletException - { - return PlexusServletUtils.lookup( getServletContext(), role ); - } - - public final Object lookup( String role, String id ) - throws ServletException - { - return PlexusServletUtils.lookup( getServletContext(), role, id ); - } - - public final void release( Object service ) - throws ServletException - { - PlexusServletUtils.release( getServletContext(), service ); - } -} diff --git a/plexus-servlet/src/main/java/org/codehaus/plexus/servlet/PlexusServletContextListener.java b/plexus-servlet/src/main/java/org/codehaus/plexus/servlet/PlexusServletContextListener.java deleted file mode 100644 index 84287a980..000000000 --- a/plexus-servlet/src/main/java/org/codehaus/plexus/servlet/PlexusServletContextListener.java +++ /dev/null @@ -1,98 +0,0 @@ -package org.codehaus.plexus.servlet; - -/** - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.PlexusContainerException; -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.embed.Embedder; -import org.codehaus.plexus.embed.EmbedderException; - -import javax.servlet.ServletContext; -import javax.servlet.ServletContextEvent; -import javax.servlet.ServletContextListener; -import java.io.IOException; - -/** - * By adding this to the listeners for your web application, a Plexus container - * will be instantiated and added to the attributes of the ServletContext. - *

- * The interface that this class implements appeared in the Java Servlet - * API 2.3. For compatability with Java Servlet API 2.2 and before use - * {@link PlexusLoaderServlet}. - * - * @author Ben Walding - * @author Mark Wilkinson - * @version $Id$ - * @see PlexusLoaderServlet - */ -public class PlexusServletContextListener - implements ServletContextListener -{ - private Embedder embedder = null; - - public void contextInitialized( ServletContextEvent sce ) - { - ServletContext context = sce.getServletContext(); - - if ( context.getAttribute( PlexusConstants.PLEXUS_KEY ) != null ) - { - context.log( "Plexus container already in context." ); - - return; - } - - String configName = context.getInitParameter( ServletContextUtils.PLEXUS_CONFIG_PARAM ); - - context.log( "Initializing Plexus container..." ); - - try - { - embedder = ServletContextUtils.createContainer( context, configName ); - } - catch ( EmbedderException e ) - { - throw new RuntimeException( "Could not start the Plexus container.", e ); - } - catch ( IOException e ) - { - throw new RuntimeException( "Could not start the Plexus container.", e ); - } - catch ( PlexusContainerException e ) - { - throw new RuntimeException( "Could not start the Plexus container.", e ); - } - - context.log( "Plexus container initialized." ); - } - - public void contextDestroyed( ServletContextEvent sce ) - { - ServletContext context = sce.getServletContext(); - - context.log( "Disposing of Plexus container." ); - - ServletContextUtils.destroyContainer( embedder, context ); - } -} diff --git a/plexus-servlet/src/main/java/org/codehaus/plexus/servlet/PlexusServletUtils.java b/plexus-servlet/src/main/java/org/codehaus/plexus/servlet/PlexusServletUtils.java deleted file mode 100644 index d01251523..000000000 --- a/plexus-servlet/src/main/java/org/codehaus/plexus/servlet/PlexusServletUtils.java +++ /dev/null @@ -1,111 +0,0 @@ -package org.codehaus.plexus.servlet; - -/** - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; - -import javax.servlet.ServletContext; -import javax.servlet.ServletException; - -/** - * A collection of static helper methods for code running within a Servlet - * environment that needs to access an embedded Plexus container. Such code - * can either extend {@link PlexusServlet} or invoke these static methods - * directly. - * - * @author Mark Wilkinson - * @version $Revision$ - */ -public final class PlexusServletUtils -{ - // prevent instantiation - private PlexusServletUtils() - { - } - - /** - * Get a reference to the Plexus container loaded into the - * ServletContext, if one exists. - * - * @param sc The servlet context that Plexus is installed in. - * @return a PlexusContainer object, or null - * if none was registered in the servlet context. - */ - public static PlexusContainer getPlexusContainer( ServletContext sc ) - { - return (PlexusContainer) sc.getAttribute( PlexusConstants.PLEXUS_KEY ); - } - - public static boolean hasComponent( ServletContext sc, String role ) - { - return getPlexusContainer( sc ).hasComponent( role ); - } - - public static boolean hasComponent( ServletContext sc, String role, String id ) - { - return getPlexusContainer( sc ).hasComponent( role, id ); - } - - public static Object lookup( ServletContext sc, String role ) - throws ServletException - { - try - { - return getPlexusContainer( sc ).lookup( role ); - } - catch ( ComponentLookupException e ) - { - throw new ServletException( "could not lookup service " + role, e ); - } - } - - public static Object lookup( ServletContext sc, String role, String id ) - throws ServletException - { - try - { - return getPlexusContainer( sc ).lookup( role, id ); - } - catch ( ComponentLookupException e ) - { - throw new ServletException( "could not lookup service " + role, e ); - } - } - - public static void release( ServletContext sc, Object service ) - throws ServletException - { - try - { - getPlexusContainer( sc ).release( service ); - } - catch ( Exception ex ) - { - throw new ServletException( "Exception while releasing component", ex ); - } - } -} diff --git a/plexus-servlet/src/main/java/org/codehaus/plexus/servlet/ServletContextUtils.java b/plexus-servlet/src/main/java/org/codehaus/plexus/servlet/ServletContextUtils.java deleted file mode 100644 index 0a49ae425..000000000 --- a/plexus-servlet/src/main/java/org/codehaus/plexus/servlet/ServletContextUtils.java +++ /dev/null @@ -1,200 +0,0 @@ -package org.codehaus.plexus.servlet; - -/** - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.PlexusContainerException; -import org.codehaus.plexus.embed.Embedder; -import org.codehaus.plexus.embed.EmbedderException; -import org.codehaus.plexus.util.PropertyUtils; - -import javax.servlet.ServletContext; -import java.io.File; -import java.io.IOException; -import java.net.URL; -import java.util.Properties; - -/** - * ServletContextUtils provides methods to embed a Plexus - * container within a Servlet context. - * - * @author Mark Wilkinson - * @version $Id$ - */ -final class ServletContextUtils -{ - private static final String PLEXUS_HOME = "plexus.home"; - - static final String PLEXUS_CONFIG_PARAM = "plexus-config"; - - private static final String PLEXUS_PROPERTIES_PARAM = "plexus-properties"; - - private static final String DEFAULT_PLEXUS_CONFIG = "/WEB-INF/plexus.xml"; - - private static final String DEFAULT_PLEXUS_PROPERTIES = "/WEB-INF/plexus.properties"; - - // prevent instantiation - private ServletContextUtils() - { - } - - private static String resolveConfig( ServletContext context, String plexusConf ) - { - if ( plexusConf == null ) - { - plexusConf = context.getInitParameter( PLEXUS_CONFIG_PARAM ); - } - - if ( plexusConf == null ) - { - plexusConf = DEFAULT_PLEXUS_CONFIG; - } - - return plexusConf; - } - - private static Properties resolveContextProperties( ServletContext context ) - { - - Properties properties = new Properties(); - - String filename = context.getInitParameter( PLEXUS_PROPERTIES_PARAM ); - - if ( filename == null ) - { - filename = DEFAULT_PLEXUS_PROPERTIES; - } - - context.log( "Loading plexus context properties from: '" + filename + "'" ); - - try - { - URL url = context.getResource( filename ); - // bwalding: I think we'd be better off not using this exception swallower! - properties = PropertyUtils.loadProperties( url ); - } - catch ( Exception e ) - { - // michal: I don't think it is that good idea to ignore this error. - // bwalding: it's actually pretty difficult to get here as the PropertyUtils.loadProperties absorbs all Exceptions - context.log( "Could not load plexus context properties from: '" + filename + "'" ); - } - - - if ( properties == null ) - { - context.log( "Could not load plexus context properties from: '" + filename + "'" ); - properties = new Properties(); - } - - if ( !properties.containsKey( PLEXUS_HOME ) ) - { - setPlexusHome( context, properties ); - } - - return properties; - } - - /** - * Set plexus.home context variable - */ - private static void setPlexusHome( ServletContext context, Properties contexProperties ) - { - String realPath = context.getRealPath( "/WEB-INF" ); - - if ( realPath != null ) - { - File f = new File( realPath ); - - contexProperties.setProperty( PLEXUS_HOME, f.getAbsolutePath() ); - - } - else - { - context.log( "Not setting 'plexus.home' as plexus is running inside webapp with no 'real path'." ); - } - } - - /** - * Create a Plexus container using the {@link Embedder}. This method - * should be called from an environment where a - * ServletContext is available. It will create and initialize - * the Plexus container and place references to the container into the context. - * - * @param context The servlet context to place the container in. - * @param plexusConf Name of the Plexus configuration file to load, or - * null to fall back to the default behaviour. - * @return a Plexus container that has been initialized and started. - * @throws RuntimeException If the Plexus container could not be started. - */ - static Embedder createContainer( ServletContext context, String plexusConf ) - throws IOException, PlexusContainerException, EmbedderException - { - Embedder embedder = new Embedder(); - - plexusConf = resolveConfig( context, plexusConf ); - - URL resource = context.getResource( plexusConf ); - - if ( resource == null ) - { - throw new IOException( "Could not find the resource '" + plexusConf + "' in the servlet context." ); - } - - embedder.setConfiguration( resource ); - - Properties properties = resolveContextProperties( context ); - - embedder.setProperties( properties ); - - embedder.start(); - - PlexusContainer plexus = embedder.getContainer(); - - context.setAttribute( PlexusConstants.PLEXUS_KEY, plexus ); - - return embedder; - } - - static void destroyContainer( Embedder embedder, ServletContext context ) - { - try - { - if ( embedder != null ) - { - embedder.stop(); - } - } - catch ( Exception e ) - { - context.log( "Error disposing the Plexus container", e ); - } - finally - { - context.removeAttribute( PlexusConstants.PLEXUS_KEY ); - } - } -} diff --git a/plexus-servlet/src/test/java/org/codehaus/plexus/servlet/MockServletContext.java b/plexus-servlet/src/test/java/org/codehaus/plexus/servlet/MockServletContext.java deleted file mode 100644 index 5da0c1fc3..000000000 --- a/plexus-servlet/src/test/java/org/codehaus/plexus/servlet/MockServletContext.java +++ /dev/null @@ -1,224 +0,0 @@ -package org.codehaus.plexus.servlet; - -/** - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import javax.servlet.RequestDispatcher; -import javax.servlet.Servlet; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; -import java.util.Vector; - -/** - * @author Ben Walding - * @version $Id$ - */ -public class MockServletContext - implements ServletContext -{ - public ServletContext getContext( String arg0 ) - { - throw new RuntimeException( "not implemented" ); - } - - public int getMajorVersion() - { - throw new RuntimeException( "not implemented" ); - } - - public int getMinorVersion() - { - throw new RuntimeException( "not implemented" ); - } - - public String getMimeType( String arg0 ) - { - throw new RuntimeException( "not implemented" ); - } - - public Set getResourcePaths( String arg0 ) - { - throw new RuntimeException( "not implemented" ); - } - - public URL getResource( String resourceName ) - { - if ( resourceName.equals( "/WEB-INF/plexus.xml" ) ) - { - return MockServletContext.class.getResource( "plexus.xml" ); - } - if ( resourceName.equals( "/WEB-INF/plexus.properties" ) ) - { - return MockServletContext.class.getResource( "plexus.properties" ); - } - throw new RuntimeException( "not implemented" ); - } - - public InputStream getResourceAsStream( String resourceName ) - { - URL url = getResource( resourceName ); - if ( url == null ) - { - return null; - } - else - { - try - { - return url.openStream(); - } - catch ( IOException e ) - { - e.printStackTrace(); - return null; - } - } - } - - public RequestDispatcher getRequestDispatcher( String arg0 ) - { - throw new RuntimeException( "not implemented" ); - } - - /* (non-Javadoc) - * @see javax.servlet.ServletContext#getNamedDispatcher(java.lang.String) - */ - public RequestDispatcher getNamedDispatcher( String arg0 ) - { - throw new RuntimeException( "not implemented" ); - } - - /** - * @deprecated - */ - public Servlet getServlet( String arg0 ) - throws ServletException - { - throw new RuntimeException( "not implemented" ); - } - - /** - * @deprecated - */ - public Enumeration getServlets() - { - throw new RuntimeException( "not implemented" ); - } - - /** - * @deprecated - */ - public Enumeration getServletNames() - { - throw new RuntimeException( "not implemented" ); - } - - public void log( String arg0 ) - { - System.out.println( arg0 ); - } - - /** - * @deprecated - */ - public void log( Exception arg0, String arg1 ) - { - System.out.println( arg1 ); - arg0.printStackTrace(); - } - - public void log( String arg0, Throwable arg1 ) - { - System.out.println( arg0 ); - arg1.printStackTrace(); - } - - /* (non-Javadoc) - * @see javax.servlet.ServletContext#getRealPath(java.lang.String) - */ - public String getRealPath( String resourceName ) - { - if ( resourceName.equals( "/WEB-INF" ) ) - { - return resourceName; - } - if ( resourceName.equals( "/WEB-INF/plexus.xml" ) ) - { - return MockServletContext.class.getResource( "plexus.xml" ).getPath(); - } - return null; - } - - public String getServerInfo() - { - throw new RuntimeException( "not implemented" ); - } - - public String getInitParameter( String arg0 ) - { - return null; - } - - private static final Vector EMPTY_VECTOR = new Vector(); - - public Enumeration getInitParameterNames() - { - return EMPTY_VECTOR.elements(); - } - - private final Map attributes = new HashMap(); - - public Object getAttribute( String arg0 ) - { - return attributes.get( arg0 ); - } - - public Enumeration getAttributeNames() - { - Vector v = new Vector( attributes.keySet() ); - return v.elements(); - } - - public void setAttribute( String arg0, Object arg1 ) - { - attributes.put( arg0, arg1 ); - } - - public void removeAttribute( String arg0 ) - { - attributes.remove( arg0 ); - } - - public String getServletContextName() - { - throw new RuntimeException( "not implemented" ); - } -} diff --git a/plexus-servlet/src/test/java/org/codehaus/plexus/servlet/NoResourceMockServletContext.java b/plexus-servlet/src/test/java/org/codehaus/plexus/servlet/NoResourceMockServletContext.java deleted file mode 100644 index 82ec1ec42..000000000 --- a/plexus-servlet/src/test/java/org/codehaus/plexus/servlet/NoResourceMockServletContext.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.codehaus.plexus.servlet; - -/** - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.net.URL; - -/** - * Will only return null for resource requests. - * - * @author Ben Walding - * @version $Revision$ - */ -public class NoResourceMockServletContext - extends MockServletContext -{ - public URL getResource( String resourceName ) - { - return null; - } -} diff --git a/plexus-servlet/src/test/java/org/codehaus/plexus/servlet/PlexusServletContextListenerTest.java b/plexus-servlet/src/test/java/org/codehaus/plexus/servlet/PlexusServletContextListenerTest.java deleted file mode 100644 index b4e36334b..000000000 --- a/plexus-servlet/src/test/java/org/codehaus/plexus/servlet/PlexusServletContextListenerTest.java +++ /dev/null @@ -1,75 +0,0 @@ -package org.codehaus.plexus.servlet; - -/** - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import junit.framework.TestCase; -import org.codehaus.plexus.PlexusContainer; - -import javax.servlet.ServletContext; -import javax.servlet.ServletContextEvent; - -/** - * @author Ben Walding - * @version $Id$ - */ -public class PlexusServletContextListenerTest - extends TestCase -{ - public void testSimple() - { - ServletContext sc = new MockServletContext(); - - PlexusServletContextListener pacl = new PlexusServletContextListener(); - ServletContextEvent sce = new ServletContextEvent( sc ); - - pacl.contextInitialized( sce ); - { - PlexusContainer pc = PlexusServletUtils.getPlexusContainer( sc ); - assertNotNull( "pc", pc ); - } - - pacl.contextDestroyed( sce ); - { - PlexusContainer pc = PlexusServletUtils.getPlexusContainer( sc ); - assertNull( "pc", pc ); - } - } - - /** - * Test the static methods. - */ - public void testStaticMethods() - { - ServletContext sc = new MockServletContext(); - PlexusServletContextListener pacl = new PlexusServletContextListener(); - ServletContextEvent sce = new ServletContextEvent( sc ); - - pacl.contextInitialized( sce ); - assertNotNull( PlexusServletUtils.getPlexusContainer( sc ) ); - - pacl.contextDestroyed( sce ); - assertNull( PlexusServletUtils.getPlexusContainer( sc ) ); - } -} diff --git a/plexus-servlet/src/test/java/org/codehaus/plexus/servlet/ServletContextUtilsTest.java b/plexus-servlet/src/test/java/org/codehaus/plexus/servlet/ServletContextUtilsTest.java deleted file mode 100644 index db83fbacc..000000000 --- a/plexus-servlet/src/test/java/org/codehaus/plexus/servlet/ServletContextUtilsTest.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.codehaus.plexus.servlet; - -/** - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import junit.framework.TestCase; -import org.codehaus.plexus.embed.Embedder; - -import javax.servlet.ServletContext; - -/** - * @author Ben Walding - * @version $Revision$ - */ -public class ServletContextUtilsTest - extends TestCase -{ - public void testResolveConfig() - throws Exception - { - ServletContext msc = new MockServletContext(); - - Embedder embedder = ServletContextUtils.createContainer( msc, null ); - - assertNotNull( "embedder != null", embedder ); - - embedder.stop(); - } -} diff --git a/plexus-servlet/src/test/resources/org/codehaus/plexus/servlet/plexus.properties b/plexus-servlet/src/test/resources/org/codehaus/plexus/servlet/plexus.properties deleted file mode 100644 index 352fe411a..000000000 --- a/plexus-servlet/src/test/resources/org/codehaus/plexus/servlet/plexus.properties +++ /dev/null @@ -1 +0,0 @@ -foo=baa \ No newline at end of file diff --git a/plexus-servlet/src/test/resources/org/codehaus/plexus/servlet/plexus.xml b/plexus-servlet/src/test/resources/org/codehaus/plexus/servlet/plexus.xml deleted file mode 100644 index 0a9da329f..000000000 --- a/plexus-servlet/src/test/resources/org/codehaus/plexus/servlet/plexus.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - org.codehaus.plexus.logging.console.ConsoleLoggerManager - - INFO - - - - \ No newline at end of file diff --git a/plexus-tools/plexus-cdc/NOTES.txt b/plexus-tools/plexus-cdc/NOTES.txt deleted file mode 100644 index 3535fc0cc..000000000 --- a/plexus-tools/plexus-cdc/NOTES.txt +++ /dev/null @@ -1,14 +0,0 @@ -o Need to make a place for components so that I can run the reactor - over the whole set to make the lookup table for retrieving components - in the configuration. DONE. - -o The lookup table of components needs to become an artifact so that it - can always be consulted when someone is trying to assemble a container. - This can be an option anyway so that people using plexus know when - new components are available. - -o Do not store the plexus POM in the plugin. It needs to be retrieved - from the repository. Which means that I need a mechanism to get the - path of a dependency that is not a JAR, which is what is assumed - right now. I want to pull the Plexus POM into the repository and - use it from the repository. diff --git a/plexus-tools/plexus-cdc/pom.xml b/plexus-tools/plexus-cdc/pom.xml deleted file mode 100644 index d8537a151..000000000 --- a/plexus-tools/plexus-cdc/pom.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - plexus-tools - org.codehaus.plexus - 1.0.6 - - 4.0.0 - plexus-cdc - Plexus Component Descriptor Creator - 1.0-alpha-7-SNAPSHOT - - - qdox - qdox - 1.6 - - - jdom - jdom - 1.0 - - - org.codehaus.plexus - plexus-utils - 1.0.4 - - - diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/ComponentDescriptorCreator.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/ComponentDescriptorCreator.java deleted file mode 100644 index bf804af30..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/ComponentDescriptorCreator.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.codehaus.plexus.cdc; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.component.repository.ComponentDescriptor; - -import java.io.File; -import java.util.List; - -/** - * @author Jason van Zyl - * @author Trygve Laugstøl - * @version $Id$ - */ -public interface ComponentDescriptorCreator -{ - String ROLE = ComponentDescriptorCreator.class.getName(); - - void processSources( File[] sourceDirectories, File outputDirectory ) - throws ComponentDescriptorCreatorException; - - void processSources( File[] sourceDirectories, File outputDirectory, boolean containerDescriptor, ComponentDescriptor[] roleDefaults ) - throws ComponentDescriptorCreatorException; - - void mergeDescriptors( File outputDescriptor, List descriptors ) - throws ComponentDescriptorCreatorException; -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/ComponentDescriptorCreatorException.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/ComponentDescriptorCreatorException.java deleted file mode 100644 index dcb38512f..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/ComponentDescriptorCreatorException.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.codehaus.plexus.cdc; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class ComponentDescriptorCreatorException - extends Exception -{ - public ComponentDescriptorCreatorException( String message ) - { - super( message ); - } - - public ComponentDescriptorCreatorException( String message, Throwable cause ) - { - super( message, cause ); - } -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/ComponentGleaner.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/ComponentGleaner.java deleted file mode 100644 index 4fc57ceb3..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/ComponentGleaner.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.codehaus.plexus.cdc; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import com.thoughtworks.qdox.model.JavaClass; -import com.thoughtworks.qdox.model.JavaClassCache; -import org.codehaus.plexus.component.repository.ComponentDescriptor; - -/** - * @author Jason van Zyl - * @version $Id$ - */ -public interface ComponentGleaner -{ - String ROLE = ComponentGleaner.class.getName(); - - ComponentDescriptor glean( JavaClassCache classCache, JavaClass javaClass ) - throws ComponentDescriptorCreatorException; -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/DefaultComponentDescriptorCreator.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/DefaultComponentDescriptorCreator.java deleted file mode 100644 index 3d3357453..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/DefaultComponentDescriptorCreator.java +++ /dev/null @@ -1,545 +0,0 @@ -package org.codehaus.plexus.cdc; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import com.thoughtworks.qdox.JavaDocBuilder; -import com.thoughtworks.qdox.model.JavaClass; -import com.thoughtworks.qdox.model.JavaSource; -import org.codehaus.plexus.cdc.merge.Merger; -import org.codehaus.plexus.cdc.merge.MergeException; -import org.codehaus.plexus.component.repository.ComponentDependency; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.ComponentRequirement; -import org.codehaus.plexus.component.repository.ComponentSetDescriptor; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.PlexusConfigurationException; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.util.StringUtils; -import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter; -import org.codehaus.plexus.util.xml.XMLWriter; -import org.jdom.Document; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; - -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -/** - * So, in this case it is easy enough to determine the role and the implementation. - * We could also employ some secondary checks like looking for particular super classes - * or whatever. We can always use the @tags to be explicit but in most cases we can - * probably determine the correct component descriptor without requiring @tags. - * - * @author Jason van Zyl - * @author Trygve Laugstøl - * @version $Id$ - * @todo glean configuration information from types of the parameters but also - * allow OCL type constraints for validation. We'll hook in something simple like - * regex as for most cases I think some simple regex could catch most problems. I - * don't want to have to use MSV or something like that which which triple the size - * of a deployment. - *

- * This is for a single project with a single POM, multiple components - * with all deps in the POM. - */ -public class DefaultComponentDescriptorCreator - extends AbstractLogEnabled - implements ComponentDescriptorCreator -{ - private static final String LS = System.getProperty( "line.separator" ); - - // TODO: Make a list - private ComponentGleaner gleaner; - - private Merger merger; - - // ---------------------------------------------------------------------- - // ComponentDescriptorCreator Implementation - // ---------------------------------------------------------------------- - - public void processSources( File[] sourceDirectories, File outputFile ) - throws ComponentDescriptorCreatorException - { - processSources( sourceDirectories, outputFile, false, new ComponentDescriptor[0] ); - } - - public void processSources( File[] sourceDirectories, File outputFile, boolean containerDescriptor, ComponentDescriptor[] roleDefaults ) - throws ComponentDescriptorCreatorException - { - // ---------------------------------------------------------------------- - // Check and register all directories to scan - // ---------------------------------------------------------------------- - - JavaSource[] javaSources; - - JavaDocBuilder builder = new JavaDocBuilder(); - - getLogger().debug( "Source directories: " ); - - for ( int it = 0; it < sourceDirectories.length; it++ ) - { - File sourceDirectory = sourceDirectories[it]; - - if ( !sourceDirectory.isDirectory() ) - { - getLogger().warn( - "Specified source directory isn't a directory: " + "'" + sourceDirectory.getAbsolutePath() + "'." ); - } - - getLogger().debug( " - " + sourceDirectory.getAbsolutePath() ); - - builder.addSourceTree( sourceDirectory ); - } - - // ---------------------------------------------------------------------- - // Scan the sources - // ---------------------------------------------------------------------- - - javaSources = builder.getSources(); - - Map defaultsByRole = new HashMap(); - if ( roleDefaults != null ) - { - for ( int i = 0; i < roleDefaults.length; i++ ) - { - // TODO: fail if role is null - defaultsByRole.put( roleDefaults[i].getRole(), roleDefaults[i] ); - } - } - - List componentDescriptors = new ArrayList(); - - for ( int i = 0; i < javaSources.length; i++ ) - { - JavaClass javaClass = getJavaClass( javaSources[i] ); - - ComponentDescriptor componentDescriptor = gleaner.glean( builder, javaClass ); - - if ( componentDescriptor != null && !javaClass.isAbstract() ) - { - // TODO: better merge, perhaps pass it into glean as the starting point instead - if ( defaultsByRole.containsKey( componentDescriptor.getRole() ) ) - { - ComponentDescriptor desc = (ComponentDescriptor) defaultsByRole.get( componentDescriptor.getRole() ); - - if ( componentDescriptor.getInstantiationStrategy() == null ) - { - componentDescriptor.setInstantiationStrategy( desc.getInstantiationStrategy() ); - } - } - componentDescriptors.add( componentDescriptor ); - } - } - - ComponentSetDescriptor componentSetDescriptor = new ComponentSetDescriptor(); - - componentSetDescriptor.setComponents( componentDescriptors ); - - // ---------------------------------------------------------------------- - // Convert the Maven dependencies to Plexus component dependencies - // ---------------------------------------------------------------------- - -// List componentDependencies = convertDependencies( mavenProject.getDependencies() ); -// -// componentSetDescriptor.setDependencies( componentDependencies ); - - // TODO: for now - componentSetDescriptor.setDependencies( Collections.EMPTY_LIST ); - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - validateConfiguration( componentSetDescriptor ); - - // ---------------------------------------------------------------------- - // Write out the component descriptor - // ---------------------------------------------------------------------- - - if ( componentDescriptors.size() == 0 && componentSetDescriptor.getDependencies().size() == 0 ) - { - getLogger().debug( "No components or dependencies found, not writing components.xml" ); - - return; - } - - File parentFile = outputFile.getParentFile(); - if ( !parentFile.exists() ) - { - if ( !parentFile.mkdirs() ) - { - throw new ComponentDescriptorCreatorException( - "Could not make parent directory: '" + parentFile.getAbsolutePath() + "'." ); - } - } - - try - { - FileWriter writer = new FileWriter( outputFile ); - - XMLWriter w = new PrettyPrintXMLWriter( writer ); - - w.startElement( containerDescriptor ? "plexus" : "component-set" ); - - writeComponents( w, componentDescriptors ); - - writeDependencies( w, componentSetDescriptor ); - - w.endElement(); - - writer.write( LS ); - - writer.close(); - } - catch ( PlexusConfigurationException e ) - { - throw new ComponentDescriptorCreatorException( "Internal error while writing out the configuration", e ); - } - catch ( IOException e ) - { - throw new ComponentDescriptorCreatorException( - "Error while writing the component descriptor to: " + "'" + outputFile.getAbsolutePath() + "'.", e ); - } - } - - public void mergeDescriptors( File outputDescriptor, List descriptors ) - throws ComponentDescriptorCreatorException - { - SAXBuilder builder = new SAXBuilder(); - - Document finalDoc = null; - - for ( Iterator i = descriptors.iterator(); i.hasNext(); ) - { - File f = (File) i.next(); - try - { - Document doc = builder.build( f ); - - if ( finalDoc != null ) - { - // Last specified has dominance - finalDoc = merger.merge( doc, finalDoc ); - } - else - { - finalDoc = doc; - } - } - catch ( JDOMException e ) - { - throw new ComponentDescriptorCreatorException( "Invalid input descriptor for merge: " + f, e ); - } - catch ( IOException e ) - { - throw new ComponentDescriptorCreatorException( "Error reading input descriptor for merge: " + f, e ); - } - catch ( MergeException e ) - { - throw new ComponentDescriptorCreatorException( "Error merging descriptor: " + f, e ); - } - } - - if ( finalDoc != null ) - { - try - { - merger.writeMergedDocument( finalDoc, outputDescriptor ); - } - catch ( IOException e ) - { - throw new ComponentDescriptorCreatorException( "Error writing merged descriptor: " + outputDescriptor, - e ); - } - } - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - private void validateConfiguration( ComponentSetDescriptor componentSetDescriptor ) - throws ComponentDescriptorCreatorException - { - List dependencies = componentSetDescriptor.getDependencies(); - - if ( dependencies == null ) - { - return; - } - - for ( Iterator it = dependencies.iterator(); it.hasNext(); ) - { - ComponentDependency dependency = (ComponentDependency) it.next(); - - if ( StringUtils.isEmpty( dependency.getGroupId() ) ) - { - throw new ComponentDescriptorCreatorException( "Missing dependency element: 'groupId'." ); - } - - if ( StringUtils.isEmpty( dependency.getArtifactId() ) ) - { - throw new ComponentDescriptorCreatorException( "Missing dependency element: 'artifactId'." ); - } - - if ( StringUtils.isEmpty( dependency.getVersion() ) ) - { - throw new ComponentDescriptorCreatorException( "Missing dependency element: 'version'." ); - } - - if ( StringUtils.isEmpty( dependency.getType() ) ) - { - throw new ComponentDescriptorCreatorException( "Missing dependency element: 'type'." ); - } - } - } - - private void writeComponents( XMLWriter w, List componentDescriptors ) - throws ComponentDescriptorCreatorException, PlexusConfigurationException - { - w.startElement( "components" ); - - for ( Iterator i = componentDescriptors.iterator(); i.hasNext(); ) - { - w.startElement( "component" ); - - ComponentDescriptor cd = (ComponentDescriptor) i.next(); - - element( w, "alias", cd.getAlias() ); - - element( w, "role", cd.getRole() ); - - element( w, "role-hint", cd.getRoleHint() ); - - element( w, "implementation", cd.getImplementation() ); - - element( w, "version", cd.getVersion() ); - - element( w, "instantiation-strategy", cd.getInstantiationStrategy() ); - - element( w, "lifecycle-handler", cd.getLifecycleHandler() ); - - element( w, "description", cd.getDescription() ); - - writeRequirements( w, cd.getRequirements() ); - - writeConfiguration( w, cd.getConfiguration() ); - - w.endElement(); - } - - w.endElement(); - } - - private void writeRequirements( XMLWriter w, List requirements ) - { - if ( requirements == null || requirements.size() == 0 ) - { - return; - } - - w.startElement( "requirements" ); - - for ( Iterator j = requirements.iterator(); j.hasNext(); ) - { - ComponentRequirement cr = (ComponentRequirement) j.next(); - - w.startElement( "requirement" ); - - element( w, "role", cr.getRole() ); - - element( w, "role-hint", cr.getRoleHint() ); - - element( w, "field-name", cr.getFieldName() ); - - w.endElement(); - } - - w.endElement(); - } - - private void writeConfiguration( XMLWriter w, PlexusConfiguration configuration ) - throws ComponentDescriptorCreatorException, PlexusConfigurationException - { - if ( configuration == null || configuration.getChildCount() == 0 ) - { - return; - } - - if ( !configuration.getName().equals( "configuration" ) ) - { - throw new ComponentDescriptorCreatorException( - "The root node of the configuration must be " + "'configuration'." ); - } - - writePlexusConfiguration( w, configuration ); - } - - public void writeDependencies( XMLWriter w, ComponentSetDescriptor componentSetDescriptor ) - { - List deps = componentSetDescriptor.getDependencies(); - - if ( deps == null || deps.size() == 0 ) - { - return; - } - - w.startElement( "dependencies" ); - - for ( int i = 0; i < deps.size(); i++ ) - { - writeDependencyElement( (ComponentDependency) deps.get( i ), w ); - } - - w.endElement(); - } - - private void writeDependencyElement( ComponentDependency dependency, XMLWriter w ) - { - w.startElement( "dependency" ); - - String groupId = dependency.getGroupId(); - - element( w, "groupId", groupId ); - - String artifactId = dependency.getArtifactId(); - - element( w, "artifactId", artifactId ); - - String type = dependency.getType(); - - if ( type != null ) - { - element( w, "type", type ); - } - - String version = dependency.getVersion(); - - element( w, "version", version ); - - w.endElement(); - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - private void writePlexusConfiguration( XMLWriter xmlWriter, PlexusConfiguration c ) - throws PlexusConfigurationException - { - if ( c.getAttributeNames().length == 0 && c.getChildCount() == 0 && c.getValue() == null ) - { - return; - } - - xmlWriter.startElement( c.getName() ); - - // ---------------------------------------------------------------------- - // Write the attributes - // ---------------------------------------------------------------------- - - String[] attributeNames = c.getAttributeNames(); - - for ( int i = 0; i < attributeNames.length; i++ ) - { - String attributeName = attributeNames[i]; - - xmlWriter.addAttribute( attributeName, c.getAttribute( attributeName ) ); - } - - // ---------------------------------------------------------------------- - // Write the children - // ---------------------------------------------------------------------- - - PlexusConfiguration[] children = c.getChildren(); - - if ( children.length > 0 ) - { - for ( int i = 0; i < children.length; i++ ) - { - writePlexusConfiguration( xmlWriter, children[i] ); - } - } - else - { - String value = c.getValue(); - - if ( value != null ) - { - xmlWriter.writeText( value ); - } - } - - xmlWriter.endElement(); - } - - private void element( XMLWriter w, String name, String value ) - { - if ( value == null ) - { - return; - } - - w.startElement( name ); - - w.writeText( value ); - - w.endElement(); - } - -// private List convertDependencies( List dependencies ) -// { -// List componentDependencies = new ArrayList(); -// -// for ( Iterator i = dependencies.iterator(); i.hasNext(); ) -// { -// Dependency d = (Dependency) i.next(); -// -// ComponentDependency cd = new ComponentDependency(); -// -// cd.setGroupId( d.getGroupId() ); -// -// cd.setArtifactId( d.getArtifactId() ); -// -// cd.setVersion( d.getVersion() ); -// -// componentDependencies.add( cd ); -// } -// -// return componentDependencies; -// } - - private JavaClass getJavaClass( JavaSource javaSource ) - { - return javaSource.getClasses()[0]; - } -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/PlexusDefaultComponentGleaner.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/PlexusDefaultComponentGleaner.java deleted file mode 100644 index 9d3d5bb4e..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/PlexusDefaultComponentGleaner.java +++ /dev/null @@ -1,527 +0,0 @@ -package org.codehaus.plexus.cdc; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import com.thoughtworks.qdox.model.DocletTag; -import com.thoughtworks.qdox.model.JavaClass; -import com.thoughtworks.qdox.model.JavaClassCache; -import com.thoughtworks.qdox.model.JavaField; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.ComponentRequirement; -import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.logging.LogEnabled; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Configurable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Serviceable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Suspendable; -import org.codehaus.plexus.util.StringUtils; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class PlexusDefaultComponentGleaner - extends AbstractLogEnabled - implements ComponentGleaner -{ - public static final String PLEXUS_COMPONENT_TAG = "plexus.component"; - - public static final String PLEXUS_REQUIREMENT_TAG = "plexus.requirement"; - - private static final String PLEXUS_CONFIGURATION_TAG = "plexus.configuration"; - - public static final String PLEXUS_VERSION_PARAMETER = "version"; - - public static final String PLEXUS_ROLE_PARAMETER = "role"; - - public static final String PLEXUS_ROLE_HINT_PARAMETER = "role-hint"; - - public static final String PLEXUS_ALIAS_PARAMETER = "alias"; - - private static final String PLEXUS_DEFAULT_VALUE_PARAMETER = "default-value"; - - private static final String PLEXUS_LIFECYCLE_HANDLER_PARAMETER = "lifecycle-handler"; - - private static final String PLEXUS_INSTANTIATION_STARTEGY_PARAMETER = "instantiation-strategy"; - - // ---------------------------------------------------------------------- - // ComponentGleaner Implementation - // ---------------------------------------------------------------------- - - public ComponentDescriptor glean( JavaClassCache classCache, JavaClass javaClass ) - throws ComponentDescriptorCreatorException - { - DocletTag tag = javaClass.getTagByName( PLEXUS_COMPONENT_TAG ); - - if ( tag == null ) - { - return null; - } - - Map parameters = tag.getNamedParameterMap(); - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - String fqn = javaClass.getFullyQualifiedName(); - - getLogger().debug( "Creating descriptor for component: " + fqn ); - - ComponentDescriptor componentDescriptor = new ComponentDescriptor(); - - componentDescriptor.setImplementation( fqn ); - - // ---------------------------------------------------------------------- - // Role - // ---------------------------------------------------------------------- - - String role = getParameter( parameters, PLEXUS_ROLE_PARAMETER ); - - if ( role == null ) - { - role = findRole( javaClass ); - - if ( role == null ) - { - getLogger().warn( "Could not figure out a role for the component '" + fqn + "'. " + - "Please specify a role with a parameter '" + PLEXUS_ROLE_PARAMETER + "' " + "on the @" + - PLEXUS_COMPONENT_TAG + " tag." ); - - return null; - } - } - - getLogger().debug( " Role: " + role ); - - componentDescriptor.setRole( role ); - - // ---------------------------------------------------------------------- - // Role hint - // ---------------------------------------------------------------------- - - String roleHint = getParameter( parameters, PLEXUS_ROLE_HINT_PARAMETER ); - - if ( roleHint != null ) - { - getLogger().debug( " Role hint: " + roleHint ); - } - - componentDescriptor.setRoleHint( roleHint ); - - // ---------------------------------------------------------------------- - // Version - // ---------------------------------------------------------------------- - - String version = getParameter( parameters, PLEXUS_VERSION_PARAMETER ); - - componentDescriptor.setVersion( version ); - - // ---------------------------------------------------------------------- - // Lifecycle handler - // ---------------------------------------------------------------------- - - String lifecycleHandler = getParameter( parameters, PLEXUS_LIFECYCLE_HANDLER_PARAMETER ); - - componentDescriptor.setLifecycleHandler( lifecycleHandler ); - - // ---------------------------------------------------------------------- - // Lifecycle handler - // ---------------------------------------------------------------------- - - String instatiationStrategy = getParameter( parameters, PLEXUS_INSTANTIATION_STARTEGY_PARAMETER ); - - componentDescriptor.setInstantiationStrategy( instatiationStrategy ); - - // ---------------------------------------------------------------------- - // Alias - // ---------------------------------------------------------------------- - - componentDescriptor.setAlias( getParameter( parameters, PLEXUS_ALIAS_PARAMETER ) ); - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - findExtraParameters( PLEXUS_COMPONENT_TAG, parameters ); - - // ---------------------------------------------------------------------- - // Requirements - // ---------------------------------------------------------------------- - - findRequirements( classCache, componentDescriptor, javaClass ); - - // ---------------------------------------------------------------------- - // Description - // ---------------------------------------------------------------------- - - String comment = javaClass.getComment(); - - if ( comment != null ) - { - int i = comment.indexOf( '.' ); - - if ( i > 0 ) - { - comment = comment.substring( 0, i + 1 ); // include the dot - } - } - - componentDescriptor.setDescription( comment ); - - // ---------------------------------------------------------------------- - // Configuration - // ---------------------------------------------------------------------- - - XmlPlexusConfiguration configuration = new XmlPlexusConfiguration( "configuration" ); - - findConfiguration( configuration, javaClass ); - - componentDescriptor.setConfiguration( configuration ); - - return componentDescriptor; - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - private final static List IGNORED_INTERFACES = Collections.unmodifiableList( Arrays.asList( new String[]{ - LogEnabled.class.getName(), - Initializable.class.getName(), - Configurable.class.getName(), - Contextualizable.class.getName(), - Disposable.class.getName(), - Startable.class.getName(), - Suspendable.class.getName(), - Serviceable.class.getName(), - } ) ); - - private String findRole( JavaClass javaClass ) - { - // ---------------------------------------------------------------------- - // Remove any Plexus specific interfaces from the calculation - // ---------------------------------------------------------------------- - - List interfaces = new ArrayList( Arrays.asList( javaClass.getImplementedInterfaces() ) ); - - for ( Iterator it = interfaces.iterator(); it.hasNext(); ) - { - JavaClass ifc = (JavaClass) it.next(); - - if ( IGNORED_INTERFACES.contains( ifc.getFullyQualifiedName() ) ) - { - it.remove(); - } - } - - // ---------------------------------------------------------------------- - // For each implemented interface, check to see if it's a candiate - // interface - // ---------------------------------------------------------------------- - - String role = null; - - String className = javaClass.getName(); - - for ( Iterator it = interfaces.iterator(); it.hasNext(); ) - { - JavaClass ifc = (JavaClass) it.next(); - - String fqn = ifc.getFullyQualifiedName(); - - String pkg = ifc.getPackage(); - - if ( pkg == null ) - { - int index = fqn.lastIndexOf( '.' ); - - if ( index == -1 ) - { - // ----------------------------------------------------------------------- - // This is a special case which will happen in two cases: - // 1) The component is in the default/root package - // 2) The interface is in another build, typically in an -api package - // while the code beeing gleaned in in the -impl build. - // - // Since it's most likely in another package than in the default package - // prepend the gleaned class' package - // ----------------------------------------------------------------------- - - pkg = javaClass.getPackage(); - - fqn = pkg + "." + fqn; - } - else - { - pkg = fqn.substring( 0, index ); - } - } - - if ( fqn == null ) - { - fqn = ifc.getName(); - } - - String name = fqn.substring( pkg.length() + 1 ); - - if ( className.endsWith( name ) ) - { - if ( role != null ) - { - getLogger().warn( "Found several possible roles for component " + "'" + - javaClass.getFullyQualifiedName() + "', " + "will use '" + role + "', found: " + ifc.getName() + - "." ); - } - - role = fqn; - } - } - - if ( role == null ) - { - JavaClass superClass = javaClass.getSuperJavaClass(); - - if ( superClass != null ) - { - role = findRole( superClass ); - } - } - - return role; - } - - private void findRequirements( JavaClassCache classCache, ComponentDescriptor componentDescriptor, - JavaClass javaClass ) - { - JavaField[] fields = javaClass.getFields(); - - // ---------------------------------------------------------------------- - // Search the super class for requirements - // ---------------------------------------------------------------------- - - if ( javaClass.getSuperJavaClass() != null ) - { - findRequirements( classCache, componentDescriptor, javaClass.getSuperJavaClass() ); - } - - // ---------------------------------------------------------------------- - // Search the current class for requirements - // ---------------------------------------------------------------------- - - for ( int i = 0; i < fields.length; i++ ) - { - JavaField field = fields[i]; - - DocletTag tag = field.getTagByName( PLEXUS_REQUIREMENT_TAG ); - - if ( tag == null ) - { - continue; - } - - Map parameters = new HashMap( tag.getNamedParameterMap() ); - - // ---------------------------------------------------------------------- - // Role - // ---------------------------------------------------------------------- - - String requirementClass = field.getType().getJavaClass().getFullyQualifiedName(); - - ComponentRequirement cr = new ComponentRequirement(); - - String role = getParameter( parameters, PLEXUS_ROLE_PARAMETER ); - - if ( role == null ) - { - cr.setRole( requirementClass ); - } - else - { - cr.setRole( role ); - } - - cr.setRoleHint( getParameter( parameters, PLEXUS_ROLE_HINT_PARAMETER ) ); - - cr.setFieldName( field.getName() ); - - boolean isMap = requirementClass.equals( Map.class.getName() ); - - boolean isList = requirementClass.equals( List.class.getName() ); - - if ( isMap || isList ) - { - if ( cr.getRoleHint() != null ) - { - getLogger().warn( "Field: '" + field.getName() + "': A role hint cannot be specified if the " + - "field is a java.util.Map or a java.util.List" ); - - continue; - } - - if ( role == null ) - { - getLogger().warn( "Field: '" + field.getName() + "': A java.util.Map or java.util.List " + - "requirement has to specify a '" + PLEXUS_ROLE_PARAMETER + "' parameter on " + "the @" + - PLEXUS_REQUIREMENT_TAG + " tag so Plexus can know which components to " + - "put in the map or list." ); - - continue; - } - - JavaClass roleClass = classCache.getClassByName( role ); - - if ( role.indexOf( '.' ) == -1 && StringUtils.isEmpty( roleClass.getPackage() ) ) - { - role = javaClass.getPackage() + "." + roleClass.getName(); - } - - cr.setRole( role ); - - findExtraParameters( PLEXUS_REQUIREMENT_TAG, parameters ); - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - componentDescriptor.addRequirement( cr ); - } - } - - private void findConfiguration( XmlPlexusConfiguration configuration, JavaClass javaClass ) - throws ComponentDescriptorCreatorException - { - JavaField[] fields = javaClass.getFields(); - - // ---------------------------------------------------------------------- - // Search the super class for configurable fields. - // ---------------------------------------------------------------------- - - if ( javaClass.getSuperJavaClass() != null ) - { - findConfiguration( configuration, javaClass.getSuperJavaClass() ); - } - - // ---------------------------------------------------------------------- - // Search the current class for configurable fields. - // ---------------------------------------------------------------------- - - for ( int i = 0; i < fields.length; i++ ) - { - JavaField field = fields[i]; - - DocletTag tag = field.getTagByName( PLEXUS_CONFIGURATION_TAG ); - - if ( tag == null ) - { - continue; - } - - Map parameters = new HashMap( tag.getNamedParameterMap() ); - - /* don't use the getParameter helper as we like empty strings */ - String defaultValue = (String) parameters.remove( PLEXUS_DEFAULT_VALUE_PARAMETER ); - - if ( defaultValue == null ) - { - getLogger().warn( "Component: " + javaClass.getName() + ", field name: '" + field.getName() + "': " + - "Currently configurable fields will not be written to the descriptor " + - "without a default value." ); - - continue; - } - - String name = deHump( field.getName() ); - - XmlPlexusConfiguration c; - - c = new XmlPlexusConfiguration( name ); - - c.setValue( defaultValue ); - - getLogger().debug( " Configuration: " + name + "=" + defaultValue ); - - configuration.addChild( c ); - - findExtraParameters( PLEXUS_CONFIGURATION_TAG, parameters ); - } - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - private String deHump( String string ) - { - StringBuffer sb = new StringBuffer(); - - for ( int i = 0; i < string.length(); i++ ) - { - if ( i != 0 && Character.isUpperCase( string.charAt( i ) ) ) - { - sb.append( '-' ); - } - - sb.append( string.charAt( i ) ); - } - - return sb.toString().trim().toLowerCase(); - } - - private void findExtraParameters( String tagName, Map parameters ) - { - for ( Iterator it = parameters.keySet().iterator(); it.hasNext(); ) - { - String s = (String) it.next(); - - getLogger().warn( "Extra parameter on the '" + tagName + "' tag: '" + s + "'." ); - } - } - - private String getParameter( Map parameters, String parameter ) - { - String value = (String) parameters.remove( parameter ); - - if ( StringUtils.isEmpty( value ) ) - { - return null; - } - - return value; - } -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/AbstractMerger.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/AbstractMerger.java deleted file mode 100644 index a584bdf87..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/AbstractMerger.java +++ /dev/null @@ -1,66 +0,0 @@ -package org.codehaus.plexus.cdc.merge; - -/* - * The MIT License - * - * Copyright (c) 2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.jdom.Document; -import org.jdom.output.XMLOutputter; -import org.codehaus.plexus.util.IOUtil; - -import java.io.File; -import java.io.IOException; -import java.io.FileWriter; - -/** - * Base class for common mergers. - * - * @author Brett Porter - */ -public abstract class AbstractMerger - implements Merger -{ - /** - * @see org.codehaus.plexus.cdc.merge.Merger#writeMergedDocument(org.jdom.Document, java.io.File) - */ - public void writeMergedDocument( Document mergedDocument, File file ) - throws IOException - { - if ( !file.getParentFile().exists() ) - { - file.getParentFile().mkdirs(); - } - - XMLOutputter out = new XMLOutputter(); - FileWriter fw = null; - try - { - fw = new FileWriter( file ); - out.output( mergedDocument, fw ); - } - finally - { - IOUtil.close( fw ); - } - } -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/ComponentsXmlMerger.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/ComponentsXmlMerger.java deleted file mode 100644 index e4c6f726e..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/ComponentsXmlMerger.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.codehaus.plexus.cdc.merge; - -/* - * The MIT License - * - * Copyright (c) 2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.cdc.merge.support.ComponentSetElement; -import org.codehaus.plexus.util.IOUtil; -import org.jdom.Document; -import org.jdom.output.XMLOutputter; - -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; - -/** - * @author Rahul Thakur - * @version $Id$ - */ -public class ComponentsXmlMerger - extends AbstractMerger -{ - - /** - * @see Merger#merge(Document, Document) - */ - public Document merge( Document dDocument, Document rDocument ) - throws MergeException - { - // TODO: Ideally we don't want to manipulate the original - // dominant document but use its copy for merge. - //Document mDoc = (Document) dDocument.clone(); // doesn't merge properly - Document mDoc = dDocument; - ComponentSetElement dCSE = new ComponentSetElement( mDoc.getRootElement() ); - ComponentSetElement rCSE = new ComponentSetElement( rDocument.getRootElement() ); - dCSE.merge( rCSE ); - // the contents are merged into the dominant document DOM. - return mDoc; - } - -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/MergeException.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/MergeException.java deleted file mode 100644 index db30c327c..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/MergeException.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.codehaus.plexus.cdc.merge; - -/* - * The MIT License - * - * Copyright (c) 2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * @author Rahul Thakur - * @version $Id$ - */ -public class MergeException - extends Exception -{ - public MergeException( String message, Throwable cause ) - { - super( message, cause ); - } - - public MergeException( String message ) - { - super( message ); - } -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/MergeStrategy.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/MergeStrategy.java deleted file mode 100644 index a250869a5..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/MergeStrategy.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.codehaus.plexus.cdc.merge; - -/* - * The MIT License - * - * Copyright (c) 2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.cdc.merge.support.Mergeable; - -/** - * @author Rahul Thakur - * @version $Id$ - */ -public interface MergeStrategy -{ - /** - * Merges a dominant {@link Mergeable} instance with a recessive one. - * - * @param dElt Dominant {@link Mergeable} instance. - * @param rElt Recessive {@link Mergeable} instance. - * @throws MergeException TODO - */ - void apply( Mergeable dElt, Mergeable rElt ) - throws MergeException; -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/Merger.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/Merger.java deleted file mode 100644 index 7fc957156..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/Merger.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.codehaus.plexus.cdc.merge; - -/* - * The MIT License - * - * Copyright (c) 2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.jdom.Document; - -import java.io.File; -import java.io.IOException; - -/** - * @author Rahul Thakur - * @version $Id$ - */ -public interface Merger -{ - String ROLE = Merger.class.getName(); - - /** - * Merge with the recessive document. - * - * @param dDocument the dominant document. - * @param rDocument the recessive document. - * @return the merged {@link Document} instance. - * - * @throws MergeException if there was an error in merge. - */ - Document merge( Document dDocument, Document rDocument ) - throws MergeException; - - /** - * Allows writing out a merged JDom Document to the specified file. - * - * @param mergedDocument the merged {@link Document} instance. - * @param file File to write the merged contents to. - * @throws IOException if there was an error while writing merged contents to the specified file. - */ - void writeMergedDocument( Document mergedDocument, File file ) - throws IOException; -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/PlexusXmlMerger.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/PlexusXmlMerger.java deleted file mode 100644 index 17a3ced98..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/PlexusXmlMerger.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.codehaus.plexus.cdc.merge; - -/* - * The MIT License - * - * Copyright (c) 2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.jdom.Document; -import org.codehaus.plexus.cdc.merge.support.ComponentSetElement; -import org.codehaus.plexus.cdc.merge.support.PlexusRootElement; - -/** - * Plexus XML merger. This is a superset of the components xml merger so can be used in its place if necessary. - * - * @author Rahul Thakur - * @version $Id$ - */ -public class PlexusXmlMerger - extends AbstractMerger -{ - - /** - * @see org.codehaus.plexus.cdc.merge.Merger#merge(org.jdom.Document, org.jdom.Document) - */ - public Document merge( Document dDocument, Document rDocument ) - throws MergeException - { - // TODO: Ideally we don't want to manipulate the original - // dominant document but use its copy for merge. - //Document mDoc = (Document) dDocument.clone(); // doesn't merge properly - Document mDoc = dDocument; - PlexusRootElement dCSE = new PlexusRootElement( mDoc.getRootElement() ); - PlexusRootElement rCSE = new PlexusRootElement( rDocument.getRootElement() ); - dCSE.merge( rCSE ); - // the contents are merged into the dominant document DOM. - return mDoc; - } - -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/AbstractMergeableElement.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/AbstractMergeableElement.java deleted file mode 100644 index 9d8f60104..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/AbstractMergeableElement.java +++ /dev/null @@ -1,197 +0,0 @@ -package org.codehaus.plexus.cdc.merge.support; - -/* - * The MIT License - * - * Copyright (c) 2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.cdc.merge.MergeException; -import org.codehaus.plexus.cdc.merge.MergeStrategy; -import org.jdom.Element; -import org.jdom.Content; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Collections; -import java.util.Set; -import java.util.Arrays; -import java.util.HashSet; - -/** - * @author Rahul Thakur - * @version $Id$ - */ -public abstract class AbstractMergeableElement - extends AbstractMergeableSupport -{ - public AbstractMergeableElement( Element element ) - { - super( element ); - } - - /** - * Detects if there was a conflict, that is the specified element was - * present in both dominant and recessive element-sets. - *

- * This delegates to - * {@link #isRecessiveElementInConflict(AbstractMergeableElement,List)}. - * - * @param re Recessive element. - * @param eltName Element name to test for. - * @return true if there was a conflict of element. - * @deprecated use {@link #isRecessiveElementInConflict(AbstractMergeableElement,List)} instead. - */ - protected boolean isRecessiveElementInConflict( AbstractMergeableElement re, String eltName ) - { - // return (null != getChild (eltName) && null != re.getChild (eltName)); - List l = new ArrayList(); - l.add( eltName ); - return isRecessiveElementInConflict( re, l ); - } - - /** - * Detects if there was a conflict, that is the specified element was - * present in both dominant and recessive element-sets. - *

- * Use this to determine conflicts when the Dominant and Recessive element - * sets are keyed with Composite keys.
- * For instance: <component> is keyed on - * <role> and <role-hint>. - * - * @param re - * @param eltNameList List of elements that will be checked for values in both dominant and recessive sets. - * @return - */ - protected boolean isRecessiveElementInConflict( AbstractMergeableElement re, List eltNameList ) - { - // give opportunity to subclasses to provide any custom Composite keys - // for conflict checks. - eltNameList = getElementNamesForConflictResolution( eltNameList ); - - if ( null == eltNameList || eltNameList.size() == 0 ) - { - return false; - } - - // assuming the elements will conflict. - for ( Iterator it = eltNameList.iterator(); it.hasNext(); ) - { - String eltName = (String) it.next(); - String dEltValue = getChildTextTrim( eltName ); - String rEltValue = re.getChildTextTrim( eltName ); - if ( null == dEltValue || null == rEltValue || !dEltValue.equals( rEltValue ) ) - { - return false; - } - } - return true; - } - - /** - * Determines if the Element to be merged is to be sourced from Recessive - * Element set. - * - * @param re Recessive element. - * @param eltName Element name to test for. - * @return - */ - protected boolean mergeableElementComesFromRecessive( AbstractMergeableElement re, String eltName ) - { - return null == getChildText( eltName ) && null != re.getChildText( eltName ); - } - - /** - * Simply delegate to - * - * @see Mergeable#merge(Mergeable,org.codehaus.plexus.cdc.merge.MergeStrategy) - */ - public void merge( Mergeable me, MergeStrategy strategy ) - throws MergeException - { - // TODO set up a unit test for this! - strategy.apply( this, me ); - } - - public void merge( Mergeable me ) - throws MergeException - { - if ( !isExpectedElementType( me ) ) - { - // if (getLogger().isErrorEnabled) - // getLogger().error ("Cannot Merge dissimilar elements. (Expected : '" + getClass ().getName () + "', found '" + me.getClass ().getName () + "')"); - throw new MergeException( "Cannot Merge dissimilar elements. " + "(Expected : '" + getClass().getName() + - "', found '" + me.getClass().getName() + "')" ); - } - // recessive Component Element. - AbstractMergeableElement rce = (AbstractMergeableElement) me; - - Set allowedTags = new HashSet(); - - for ( int i = 0; i < getAllowedTags().length; i++ ) - { - String tagName = getAllowedTags()[i].getTagName(); - - allowedTags.add( tagName ); - - List defaultConflictChecklist = new ArrayList(); - defaultConflictChecklist.add( tagName ); - - if ( !isRecessiveElementInConflict( rce, defaultConflictChecklist ) && - mergeableElementComesFromRecessive( rce, tagName ) ) - { - this.addContent( (Element) rce.getChild( tagName ).clone() ); - // else dominant wins in anycase! - } - else - if ( getAllowedTags()[i].isMergeable() && isRecessiveElementInConflict( rce, defaultConflictChecklist ) ) - { - // this allows for merging multiple/list of elements. - try - { - getAllowedTags()[i].createMergeable( this.getChild( tagName ) ) - .merge( getAllowedTags()[i].createMergeable( rce.getChild( tagName ) ), - getDefaultMergeStrategy() ); - } - catch ( Exception e ) - { - // TODO log to error - throw new MergeException( - "Unable to create Mergeable instance for tag " + "'" + getAllowedTags()[i] + "'.", e ); - } - } - } - - for ( Iterator i = me.getElement().getChildren().iterator(); i.hasNext(); ) - { - Element child = (Element) i.next(); - - if ( !allowedTags.contains( child.getName() ) ) - { - // not yet merged, copy over - element.addContent( (Content) child.clone() ); - } - } - - } - -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/AbstractMergeableElementList.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/AbstractMergeableElementList.java deleted file mode 100644 index 8c1ea5ede..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/AbstractMergeableElementList.java +++ /dev/null @@ -1,219 +0,0 @@ -package org.codehaus.plexus.cdc.merge.support; - -/* - * The MIT License - * - * Copyright (c) 2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.cdc.merge.MergeException; -import org.jdom.Element; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - -/** - * Base class that allows for handling merging two element lists. - *

- * TODO Refactor and make this extend {@link AbstractMergeableElement} which is what - * this actually is, but with added bits for merging child element lists. - * - * @author Rahul Thakur - * @version $Id$ - */ -public abstract class AbstractMergeableElementList - extends AbstractMergeableElement -{ - public AbstractMergeableElementList( Element element ) - { - super( element ); - } - - /** - * Parses <component> elements and builds a map keyed basd on the list of composite keys specified. - * - * @param tagName Name of the tag that appears multiple times - * @param compositeKeyList List of element/tag names to be used as composite keys to register recurring - * {@link Mergeable} instances. - * @return Map of {@link Mergeable} instances keyed on the composite key obtained from - * {@link #getElementNamesForConflictResolution(java.util.List)} - * @throws Exception if there was an error parsing and registering {@link Mergeable} instances - */ - protected Map parseRecurringMergeables( String tagName, List compositeKeyList, Mergeable parentElement ) - throws Exception - { - Map mergeables = new LinkedHashMap(); - List list = this.getChildren( tagName ); - for ( Iterator it = list.iterator(); it.hasNext(); ) - { - Element ce = (Element) it.next(); - - // use the composite key specified by the passed in list - String compositeKey = ""; - for ( Iterator itr = compositeKeyList.iterator(); itr.hasNext(); ) - { - String key = (String) itr.next(); - if ( null != ce.getChildText( key ) ) - { - compositeKey = compositeKey + ce.getChildText( key ); - } - } - - // create a Mergeable instance and store it in the map. - DescriptorTag tag = lookupTagInstanceByName( tagName, parentElement.getAllowedTags() ); - Mergeable mergeable = tag.createMergeable( ce ); - // register the Mergeable instance based on composite key - mergeables.put( compositeKey, mergeable ); - } - return mergeables; - } - - /** - * Looks up and returns an {@link DescriptorTag} instance for the - * specified tag name. - * - * @param name key to look up the {@link DescriptorTag} instance on. - * @return {@link DescriptorTag} instance whose name matches the name specified. - * Returns null if no match is found. - */ - private DescriptorTag lookupTagInstanceByName( String name, DescriptorTag[] values ) - { - DescriptorTag value = null; - - for ( int i = 0; i < values.length && value == null; i++ ) - { - if ( values[i].getTagName().equals( name ) ) - { - value = values[i]; - } - } - // not found! - return value; - } - - public void merge( Mergeable me ) - throws MergeException - { - try - { - Map dRequirementsMap = parseRecurringMergeables( getTagNameForRecurringMergeable(), - getElementNamesForConflictResolution( new ArrayList() ), me ); - Map rRequirementsMap = ( (AbstractMergeableElementList) me ) - .parseRecurringMergeables( getTagNameForRecurringMergeable(), - getElementNamesForConflictResolution( new ArrayList() ), me ); - merge( getElement(), dRequirementsMap, rRequirementsMap ); - } - catch ( Exception e ) - { - // TODO: log to error - // TODO: better error message - throw new MergeException( "Unable to merge Mergeable lists for element '" + getName() + "'.", e ); - } - - } - - /** - * Identifies the conflicting elements in the dominant and recessive - * {@link Map} instance and merges as required. - * - * @param parent {@link Element} that is parent for the children in the dominant Map instance. Merged content is - * added to this element. - * @param dMap Dominant Map keyed by the composite key obtained from - * {@link #getElementNamesForConflictResolution(List)} - * @param rMap Recessive Map keyed by the composite key obtained from - * {@link #getElementNamesForConflictResolution(List)} - * @throws Exception if there was an error merging both the maps. - */ - protected void merge( Element parent, Map dMap, Map rMap ) - throws Exception - { - Set dKeySet = dMap.keySet(); - Set rKeySet = rMap.keySet(); - // check if there are any entities to merge - if ( !isMergeRequired( dKeySet, rKeySet ) ) - { - return; - } - - // iterate over components and process them - for ( Iterator it = dKeySet.iterator(); it.hasNext(); ) - { - String dKey = (String) it.next(); - if ( rMap.containsKey( dKey ) ) - { - // conflict ! merge this component - Mergeable dMeregeable = (Mergeable) dMap.get( dKey ); - Mergeable rMergeable = (Mergeable) rMap.get( dKey ); - - dMeregeable.merge( rMergeable ); - - // and remove from the recessive list to mark it as merged. - rMap.remove( dKey ); - } - } - - // check if any unmerged components are left in the recessive map. - if ( rMap.keySet().size() > 0 ) - { - // add them to results - for ( Iterator it = rKeySet.iterator(); it.hasNext(); ) - { - String rKey = (String) it.next(); - // add to parent - parent.addContent( (Element) ( (Mergeable) rMap.get( rKey ) ).getElement().clone() ); - } - } - } - - /** - * Determines if a merge operation is required for the two sets (dominant and recessive) specified. - * - * @param dKeySet the dominant set of elements. - * @param rKeySet the recessive set of elements. - * @return true if a merge operation was required. - */ - private boolean isMergeRequired( Set dKeySet, Set rKeySet ) - { - return ( dKeySet.size() > 0 || rKeySet.size() > 0 ); - } - - /** - * Allows the sub classes to provided a tag name that they expect to recurr - * within them. - *

- * For instance:
- *

    - *
  • <components> expects <component> to recurr within - * itself.
  • - *
  • <requirements> expects <requirement> to recurr within - * itself.
  • - *
- * - * @return tag name of the {@link Mergeable} element that occurs multiple times. - */ - protected abstract String getTagNameForRecurringMergeable(); - - protected abstract List getElementNamesForConflictResolution( List defaultList ); -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/AbstractMergeableSupport.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/AbstractMergeableSupport.java deleted file mode 100644 index 9f274b148..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/AbstractMergeableSupport.java +++ /dev/null @@ -1,673 +0,0 @@ -package org.codehaus.plexus.cdc.merge.support; - -/* - * The MIT License - * - * Copyright (c) 2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.cdc.merge.MergeException; -import org.codehaus.plexus.cdc.merge.MergeStrategy; -import org.jdom.Attribute; -import org.jdom.Content; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.Namespace; -import org.jdom.Parent; -import org.jdom.filter.Filter; - -import java.util.Collection; -import java.util.Iterator; -import java.util.List; - -/** - * @author Rahul Thakur - * @version $Id$ - */ -public abstract class AbstractMergeableSupport - implements Mergeable -{ - /** - * Wrapped JDOM element. - */ - protected Element element; - - /** - * The default merging strategy used. - */ - private static final MergeStrategy DEFAULT_MERGE_STRATEGY = MergeStrategies.DEEP; - - public AbstractMergeableSupport( Element element ) - { - this.element = element; - } - - public abstract void merge( Mergeable me ) - throws MergeException; - - /** - * Determines if the passed in {@link Mergeable} was of same type as this - * class. - * - * @param me {@link Mergeable} instance to test. - * @return true if the passed in Mergeable can be merged with - * the current Mergeable. - */ - protected abstract boolean isExpectedElementType( Mergeable me ); - - // ---------------------------------------------------------------------- - // Methods delegated on wrapped JDOM element. - // ---------------------------------------------------------------------- - - public Element addContent( Collection collection ) - { - return element.addContent( collection ); - } - - public Element addContent( Content child ) - { - return element.addContent( child ); - } - - public Element addContent( int index, Collection c ) - { - return element.addContent( index, c ); - } - - public Element addContent( int index, Content child ) - { - return element.addContent( index, child ); - } - - public Element addContent( String str ) - { - return element.addContent( str ); - } - - public void addNamespaceDeclaration( Namespace additional ) - { - element.addNamespaceDeclaration( additional ); - } - - public Object clone() - { - return element.clone(); - } - - public List cloneContent() - { - return element.cloneContent(); - } - - public Content detach() - { - return element.detach(); - } - - public boolean equals( Object obj ) - { - return element.equals( obj ); - } - - public List getAdditionalNamespaces() - { - return element.getAdditionalNamespaces(); - } - - public Attribute getAttribute( String name, Namespace ns ) - { - return element.getAttribute( name, ns ); - } - - public Attribute getAttribute( String name ) - { - return element.getAttribute( name ); - } - - public List getAttributes() - { - return element.getAttributes(); - } - - /** - * @see org.jdom.Element#getAttributeValue(java.lang.String,org.jdom.Namespace,java.lang.String) - */ - public String getAttributeValue( String name, Namespace ns, String def ) - { - return element.getAttributeValue( name, ns, def ); - } - - /** - * @see org.jdom.Element#getAttributeValue(java.lang.String,org.jdom.Namespace) - */ - public String getAttributeValue( String name, Namespace ns ) - { - return element.getAttributeValue( name, ns ); - } - - /** - * @see org.jdom.Element#getAttributeValue(java.lang.String,java.lang.String) - */ - public String getAttributeValue( String name, String def ) - { - return element.getAttributeValue( name, def ); - } - - /** - * @see org.jdom.Element#getAttributeValue(java.lang.String) - */ - public String getAttributeValue( String name ) - { - return element.getAttributeValue( name ); - } - - /** - * @return - * @see org.jdom.Element#getChild(java.lang.String,org.jdom.Namespace) - */ - public Element getChild( String name, Namespace ns ) - { - return element.getChild( name, ns ); - } - - /** - * @see org.jdom.Element#getChild(java.lang.String) - */ - public Element getChild( String name ) - { - return element.getChild( name ); - } - - /** - * @see org.jdom.Element#getChildren() - */ - public List getChildren() - { - return element.getChildren(); - } - - /** - * @see org.jdom.Element#getChildren(java.lang.String,org.jdom.Namespace) - */ - public List getChildren( String name, Namespace ns ) - { - return element.getChildren( name, ns ); - } - - /** - * @see org.jdom.Element#getChildren(java.lang.String) - */ - public List getChildren( String name ) - { - return element.getChildren( name ); - } - - /** - * @see org.jdom.Element#getChildText(java.lang.String,org.jdom.Namespace) - */ - public String getChildText( String name, Namespace ns ) - { - return element.getChildText( name, ns ); - } - - /** - * @see org.jdom.Element#getChildText(java.lang.String) - */ - public String getChildText( String name ) - { - return element.getChildText( name ); - } - - /** - * @see org.jdom.Element#getChildTextNormalize(java.lang.String,org.jdom.Namespace) - */ - public String getChildTextNormalize( String name, Namespace ns ) - { - return element.getChildTextNormalize( name, ns ); - } - - /** - * @see org.jdom.Element#getChildTextNormalize(java.lang.String) - */ - public String getChildTextNormalize( String name ) - { - return element.getChildTextNormalize( name ); - } - - /** - * @see org.jdom.Element#getChildTextTrim(java.lang.String,org.jdom.Namespace) - */ - public String getChildTextTrim( String name, Namespace ns ) - { - return element.getChildTextTrim( name, ns ); - } - - /** - * @see org.jdom.Element#getChildTextTrim(java.lang.String) - */ - public String getChildTextTrim( String name ) - { - return element.getChildTextTrim( name ); - } - - /** - * @see org.jdom.Element#getContent() - */ - public List getContent() - { - return element.getContent(); - } - - /** - * @see org.jdom.Element#getContent(org.jdom.filter.Filter) - */ - public List getContent( Filter filter ) - { - return element.getContent( filter ); - } - - /** - * @see org.jdom.Element#getContent(int) - */ - public Content getContent( int index ) - { - return element.getContent( index ); - } - - /** - * @return - * @see org.jdom.Element#getContentSize() - */ - public int getContentSize() - { - return element.getContentSize(); - } - - /** - * @see org.jdom.Element#getDescendants() - */ - public Iterator getDescendants() - { - return element.getDescendants(); - } - - /** - * @see org.jdom.Element#getDescendants(org.jdom.filter.Filter) - */ - public Iterator getDescendants( Filter filter ) - { - return element.getDescendants( filter ); - } - - /** - * @see org.jdom.Content#getDocument() - */ - public Document getDocument() - { - return element.getDocument(); - } - - /** - * @see org.jdom.Element#getName() - */ - public String getName() - { - return element.getName(); - } - - /** - * @see org.jdom.Element#getNamespace() - */ - public Namespace getNamespace() - { - return element.getNamespace(); - } - - /** - * @see org.jdom.Element#getNamespace(java.lang.String) - */ - public Namespace getNamespace( String prefix ) - { - return element.getNamespace( prefix ); - } - - /** - * @see org.jdom.Element#getNamespacePrefix() - */ - public String getNamespacePrefix() - { - return element.getNamespacePrefix(); - } - - /** - * @see org.jdom.Element#getNamespaceURI() - */ - public String getNamespaceURI() - { - return element.getNamespaceURI(); - } - - /** - * @see org.jdom.Content#getParent() - */ - public Parent getParent() - { - return element.getParent(); - } - - /** - * @see org.jdom.Content#getParentElement() - */ - public Element getParentElement() - { - return element.getParentElement(); - } - - /** - * @see org.jdom.Element#getQualifiedName() - */ - public String getQualifiedName() - { - return element.getQualifiedName(); - } - - /** - * @see org.jdom.Element#getText() - */ - public String getText() - { - return element.getText(); - } - - /** - * @see org.jdom.Element#getTextNormalize() - */ - public String getTextNormalize() - { - return element.getTextNormalize(); - } - - /** - * @see org.jdom.Element#getTextTrim() - */ - public String getTextTrim() - { - return element.getTextTrim(); - } - - /** - * @see org.jdom.Element#getValue() - */ - public String getValue() - { - return element.getValue(); - } - - /** - * @see java.lang.Object#hashCode() - */ - public int hashCode() - { - return element.hashCode(); - } - - /** - * @see org.jdom.Element#indexOf(org.jdom.Content) - */ - public int indexOf( Content child ) - { - return element.indexOf( child ); - } - - /** - * @see org.jdom.Element#isAncestor(org.jdom.Element) - */ - public boolean isAncestor( Element element ) - { - return element.isAncestor( element ); - } - - /** - * @see org.jdom.Element#isRootElement() - */ - public boolean isRootElement() - { - return element.isRootElement(); - } - - /** - * @see org.jdom.Element#removeAttribute(org.jdom.Attribute) - */ - public boolean removeAttribute( Attribute attribute ) - { - return element.removeAttribute( attribute ); - } - - /** - * @see org.jdom.Element#removeAttribute(java.lang.String,org.jdom.Namespace) - */ - public boolean removeAttribute( String name, Namespace ns ) - { - return element.removeAttribute( name, ns ); - } - - /** - * @see org.jdom.Element#removeAttribute(java.lang.String) - */ - public boolean removeAttribute( String name ) - { - return element.removeAttribute( name ); - } - - /** - * @see org.jdom.Element#removeChild(java.lang.String,org.jdom.Namespace) - */ - public boolean removeChild( String name, Namespace ns ) - { - return element.removeChild( name, ns ); - } - - /** - * @see org.jdom.Element#removeChild(java.lang.String) - */ - public boolean removeChild( String name ) - { - return element.removeChild( name ); - } - - /** - * @see org.jdom.Element#removeChildren(java.lang.String,org.jdom.Namespace) - */ - public boolean removeChildren( String name, Namespace ns ) - { - return element.removeChildren( name, ns ); - } - - /** - * @see org.jdom.Element#removeChildren(java.lang.String) - */ - public boolean removeChildren( String name ) - { - return element.removeChildren( name ); - } - - /** - * @see org.jdom.Element#removeContent() - */ - public List removeContent() - { - return element.removeContent(); - } - - /** - * @see org.jdom.Element#removeContent(org.jdom.Content) - */ - public boolean removeContent( Content child ) - { - return element.removeContent( child ); - } - - /** - * @see org.jdom.Element#removeContent(org.jdom.filter.Filter) - */ - public List removeContent( Filter filter ) - { - return element.removeContent( filter ); - } - - /** - * @see org.jdom.Element#removeContent(int) - */ - public Content removeContent( int index ) - { - return element.removeContent( index ); - } - - /** - * @see org.jdom.Element#removeNamespaceDeclaration(org.jdom.Namespace) - */ - public void removeNamespaceDeclaration( Namespace additionalNamespace ) - { - element.removeNamespaceDeclaration( additionalNamespace ); - } - - /** - * @see org.jdom.Element#setAttribute(org.jdom.Attribute) - */ - public Element setAttribute( Attribute attribute ) - { - return element.setAttribute( attribute ); - } - - /** - * @see org.jdom.Element#setAttribute(java.lang.String,java.lang.String,org.jdom.Namespace) - */ - public Element setAttribute( String name, String value, Namespace ns ) - { - return element.setAttribute( name, value, ns ); - } - - /** - * @see org.jdom.Element#setAttribute(java.lang.String,java.lang.String) - */ - public Element setAttribute( String name, String value ) - { - return element.setAttribute( name, value ); - } - - /** - * @see org.jdom.Element#setAttributes(java.util.List) - */ - public Element setAttributes( List newAttributes ) - { - return element.setAttributes( newAttributes ); - } - - /** - * @see org.jdom.Element#setContent(java.util.Collection) - */ - public Element setContent( Collection newContent ) - { - return element.setContent( newContent ); - } - - /** - * @see org.jdom.Element#setContent(org.jdom.Content) - */ - public Element setContent( Content child ) - { - return element.setContent( child ); - } - - /** - * @see org.jdom.Element#setContent(int,java.util.Collection) - */ - public Parent setContent( int index, Collection collection ) - { - return element.setContent( index, collection ); - } - - /** - * @see org.jdom.Element#setContent(int,org.jdom.Content) - */ - public Element setContent( int index, Content child ) - { - return element.setContent( index, child ); - } - - /** - * @see org.jdom.Element#setName(java.lang.String) - */ - public Element setName( String name ) - { - return element.setName( name ); - } - - /** - * @see org.jdom.Element#setNamespace(org.jdom.Namespace) - */ - public Element setNamespace( Namespace namespace ) - { - return element.setNamespace( namespace ); - } - - /** - * @see org.jdom.Element#setText(java.lang.String) - */ - public Element setText( String text ) - { - return element.setText( text ); - } - - /** - * @see org.jdom.Element#toString() - */ - public String toString() - { - return element.toString(); - } - - /** - * Returns the wrapped up JDom {@link Element} instance. - */ - public Element getElement() - { - return this.element; - } - - /** - * Sub classes should override if they wish to provide a different - * combination of composite keys for determining conflicts. - */ - protected List getElementNamesForConflictResolution( List defaultList ) - { - return defaultList; - } - - /** - * Returns the default {@link MergeStrategy} instance. - */ - protected MergeStrategy getDefaultMergeStrategy() - { - return DEFAULT_MERGE_STRATEGY; - } - -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/ComponentElement.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/ComponentElement.java deleted file mode 100644 index e1dacf9af..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/ComponentElement.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.codehaus.plexus.cdc.merge.support; - -/* - * The MIT License - * - * Copyright (c) 2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.jdom.Element; - -/** - * @author Rahul Thakur - * @version $Id$ - */ -public class ComponentElement - extends AbstractMergeableElement -{ - /** - * Allowed elements/tags that we can expect under this element. - */ - private final DescriptorTag[] allowedTags = - {ROLE, ROLE_HINT, IMPLEMENTATION, FIELD_NAME, LIFECYCLE_HANDLER, RequirementsElement.TAG}; - - static final DescriptorTag TAG = new DescriptorTag( "component", true, ComponentElement.class ); - - static final DescriptorTag ROLE = new DescriptorTag( "role" ); - - static final DescriptorTag ROLE_HINT = new DescriptorTag( "role-hint" ); - - static final DescriptorTag FIELD_NAME = new DescriptorTag( "field-name" ); - - private static final DescriptorTag IMPLEMENTATION = new DescriptorTag( "implementation" ); - - private static final DescriptorTag LIFECYCLE_HANDLER = new DescriptorTag( "lifecycle-handler", false, null ); - - public ComponentElement( Element element ) - { - super( element ); - } - - protected boolean isExpectedElementType( Mergeable me ) - { - return me instanceof ComponentElement; - } - - public DescriptorTag[] getAllowedTags() - { - return allowedTags; - } -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/ComponentSetElement.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/ComponentSetElement.java deleted file mode 100644 index 42fa6d011..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/ComponentSetElement.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.codehaus.plexus.cdc.merge.support; - -/* - * The MIT License - * - * Copyright (c) 2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.jdom.Element; - -/** - * @author Rahul Thakur - * @version $Id$ - */ -public class ComponentSetElement - extends AbstractMergeableElement -{ - public ComponentSetElement( Element element ) - { - super( element ); - } - - public DescriptorTag[] getAllowedTags() - { - return new DescriptorTag[]{ComponentsElement.TAG}; - } - - protected boolean isExpectedElementType( Mergeable me ) - { - return me instanceof ComponentSetElement; - } -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/ComponentsElement.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/ComponentsElement.java deleted file mode 100644 index a088d2492..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/ComponentsElement.java +++ /dev/null @@ -1,80 +0,0 @@ -package org.codehaus.plexus.cdc.merge.support; - -/* - * The MIT License - * - * Copyright (c) 2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.jdom.Element; - -import java.util.ArrayList; -import java.util.List; - -/** - * @author Rahul Thakur - * @version $Id$ - */ -public class ComponentsElement - extends AbstractMergeableElementList -{ - static final DescriptorTag TAG = new DescriptorTag( "components", true, ComponentsElement.class ); - - private List conflictVerificationkeys = new ArrayList(); - - public ComponentsElement( Element element ) - { - super( element ); - - conflictVerificationkeys.add( ComponentElement.ROLE.getTagName() ); - conflictVerificationkeys.add( ComponentElement.ROLE_HINT.getTagName() ); - } - - public DescriptorTag[] getAllowedTags() - { - return new DescriptorTag[]{ComponentElement.TAG}; - } - - protected boolean isExpectedElementType( Mergeable me ) - { - return ( me instanceof ComponentsElement ); - } - - protected List getElementNamesForConflictChecks( List defaultList ) - { - // Allow to return custom keys for conflict checks/resolution. - return this.conflictVerificationkeys; - } - - protected String getTagNameForRecurringMergeable() - { - return ComponentElement.TAG.getTagName(); - } - - protected List getElementNamesForConflictResolution( List defaultList ) - { - // TODO: how is this different from getElementNamesForConflictChecks? - List l = new ArrayList(); - l.add( ComponentElement.ROLE.getTagName() ); - l.add( ComponentElement.ROLE_HINT.getTagName() ); - return l; - } -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/ConfigurationElement.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/ConfigurationElement.java deleted file mode 100644 index 99ccad2bf..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/ConfigurationElement.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.codehaus.plexus.cdc.merge.support; - -/* - * The MIT License - * - * Copyright (c) 2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.jdom.Element; - -/** - * TODO Implement merge for this. - * - * @author Rahul Thakur - * @version $Id$ - */ -public class ConfigurationElement - extends AbstractMergeableElement -{ - public ConfigurationElement( Element element ) - { - super( element ); - } - - protected boolean isExpectedElementType( Mergeable me ) - { - return me instanceof ConfigurationElement; - } - - public DescriptorTag[] getAllowedTags() - { - // TODO Implement! - return new DescriptorTag[0]; - } -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/DescriptorTag.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/DescriptorTag.java deleted file mode 100644 index 43d2a7f0b..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/DescriptorTag.java +++ /dev/null @@ -1,168 +0,0 @@ -package org.codehaus.plexus.cdc.merge.support; - -/* - * ======================================================================== - * - * Copyright 2003 The Apache Software Foundation. Code from this file - * was originally imported from the Jakarta Cactus project. - * - * Copyright 2004-2006 Vincent Massol. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ======================================================================== - */ - -import org.jdom.Element; - -import java.lang.reflect.Constructor; - -/** - * Represents the various top-level tags in a deployment descriptor as a typesafe enumeration. - * - * @version $Id$ - */ -public class DescriptorTag -{ - /** - * The tag name. - */ - private String tagName; - - /** - * Whether multiple occurrences of the tag in the descriptor are allowed. - */ - private boolean multipleAllowed; - - /** - * Class that wraps this tag and provides for merging same tags. - */ - private Class mergeableClass; - - /** - * Constructor. - * - * @param tagName The tag name of the element - */ - public DescriptorTag( String tagName ) - { - this( tagName, false, null ); - } - - /** - * Constructor. - * - * @param tagName The tag name of the element - * @param isMultipleAllowed Whether the element may occur multiple times in the descriptor - * @deprecated Use {@link #DescriptorTag(String,boolean,Class)} instead - */ - public DescriptorTag( String tagName, boolean isMultipleAllowed ) - { - this( tagName, isMultipleAllowed, null ); - } - - /** - * Constructor. - * - * @param tagName The tag name of the element - * @param isMultipleAllowed Whether the element may occur multiple times in the descriptor - * @param mergeableClass Concrete implementation of {@link Mergeable} that is bound this tag. - */ - public DescriptorTag( String tagName, boolean isMultipleAllowed, Class mergeableClass ) - { - this.tagName = tagName; - this.multipleAllowed = isMultipleAllowed; - this.mergeableClass = mergeableClass; - } - - public boolean equals( Object other ) - { - boolean eq = false; - if ( other instanceof DescriptorTag ) - { - DescriptorTag tag = (DescriptorTag) other; - if ( tag.getTagName().equals( this.tagName ) ) - { - eq = true; - } - } - return eq; - } - - public int hashCode() - { - return this.getTagName().hashCode(); - } - - public String getTagName() - { - return this.tagName; - } - - /** - * Returns whether the tag may occur multiple times in the descriptor. - * - * @return Whether multiple occurrences are allowed - */ - public boolean isMultipleAllowed() - { - return this.multipleAllowed; - } - - /** - * Determines if a particular Tag is mergeable or not. - *

- * Basically means if we have a {@link Mergeable} class registered for a tag instance. - * - * @return true if this tag is mergeable. - */ - public boolean isMergeable() - { - return null != this.mergeableClass; - } - - public String toString() - { - return getTagName(); - } - - /** - * Creates an {@link Mergeable} instance from the registered class for this - * tag instance. - * - * @return instance of {@link Mergeable}. - * @throws Exception if there was an error creating an instance. - */ - public Mergeable createMergeable( Element element ) - throws Exception - { - Constructor cons = this.mergeableClass.getConstructor( new Class[] { Element.class } ); - // XXX Is there a better way to determine this? - if ( this.mergeableClass.getSuperclass().equals( AbstractMergeableElementList.class ) ) - { - return (AbstractMergeableElementList) cons.newInstance( new Object[] { element } ); - } - else if ( this.mergeableClass.getSuperclass().equals( AbstractMergeableElement.class ) ) - { - return (AbstractMergeableElement) cons.newInstance( new Object[] { element } ); - } - else - { - // TODO set up Logger - // if (getLogger ().isErrorEnabled ()) - // getLogger.error ( "Could not create Mergeable instance for specified class '" + this.mergeableClass + "'" ); - throw new Exception( "Could not create Mergeable instance for specified class " + "'" + this.mergeableClass - + "'" ); - } - } -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/MergeStrategies.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/MergeStrategies.java deleted file mode 100644 index 5626fd1c6..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/MergeStrategies.java +++ /dev/null @@ -1,82 +0,0 @@ -package org.codehaus.plexus.cdc.merge.support; - -/* - * The MIT License - * - * Copyright (c) 2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.cdc.merge.MergeException; -import org.codehaus.plexus.cdc.merge.MergeStrategy; - -import java.util.Collections; -import java.util.List; - -/** - * Collection of available Merge Strategies.

- * TODO: Revisit and factor {@link Mergeable#merge(Mergeable)} to use a {@link MergeStrategy}. - * - * @author Rahul Thakur - * @version $Id$ - */ -public class MergeStrategies -{ - /** - * {@link MergeStrategy} implementation wherein the elements are merged - * down to the deepest available {@link Mergeable} instance in the DOM tree. - */ - public static final MergeStrategy DEEP = new MergeStrategy() - { - public void apply( Mergeable dElt, Mergeable rElt ) - throws MergeException - { - dElt.merge( rElt ); - } - }; - - /** - * {@link MergeStrategy} implementation wherein only the element on - * which the merge operation is called is 'merged'. The merge does not - * traverse the DOM tree any further. - */ - public static final MergeStrategy SHALLOW = new MergeStrategy() - { - /** - * @throws MergeException - * @see org.codehaus.plexus.cdc.merge.MergeStrategy#apply(Mergeable,Mergeable) - */ - public void apply( Mergeable dElt, Mergeable rElt ) - throws MergeException - { - AbstractMergeableElement dame = (AbstractMergeableElement) dElt; - AbstractMergeableElement rame = (AbstractMergeableElement) rElt; - - // check if the dominant was in conflict with recessive. - List elementNames = dame.getElementNamesForConflictResolution( Collections.EMPTY_LIST ); - - if ( !dame.isRecessiveElementInConflict( rame, elementNames ) ) - { - // no conflict, simply add recessive to dominant's parent - dame.getElement().addContent( rame.getElement() ); - } - } - }; -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/Mergeable.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/Mergeable.java deleted file mode 100644 index 46a46b2fb..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/Mergeable.java +++ /dev/null @@ -1,74 +0,0 @@ -package org.codehaus.plexus.cdc.merge.support; - -/* - * The MIT License - * - * Copyright (c) 2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.cdc.merge.MergeException; -import org.codehaus.plexus.cdc.merge.MergeStrategy; -import org.jdom.Element; - -/** - * Interface that marks an implementing entity as mergeable.

- * Not all the elements/tags are expected to implement this interface.
- * It should be implemented by elements/tags that need to have a certain control on how elements of the same type are merged with them. - * - * @author Rahul Thakur - * @version $Id$ - */ -public interface Mergeable -{ - /** - * Merges an element of same type. - * - * @param me Another entity that is mergeable. - * @throws MergeException if there was an error merging the mergeables. - */ - void merge( Mergeable me ) - throws MergeException; - - /** - * Applies the passed in {@link MergeStrategy} to merge two {@link Mergeable} instance.

- * - * @param me Recessive {@link Mergeable} instance. - * @param strategy {@link MergeStrategy} to apply for merging. - * @throws MergeException if there was an error while merging. - */ - void merge( Mergeable me, MergeStrategy strategy ) - throws MergeException; - - /** - * Returns the wrapped up JDom {@link Element} instance that was used to create this Mergeable. - * - * @return the wrapped up JDom {@link Element} instance. - */ - Element getElement(); - - /** - * Returns an array of tags/elements that are allowed under the current - * element. - * - * @return the allowedTags - */ - DescriptorTag[] getAllowedTags(); -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/PlexusRootElement.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/PlexusRootElement.java deleted file mode 100644 index 0cff9ac55..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/PlexusRootElement.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.codehaus.plexus.cdc.merge.support; - -/* - * The MIT License - * - * Copyright (c) 2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.jdom.Element; - -/** - * @author Rahul Thakur - * @version $Id$ - */ -public class PlexusRootElement - extends AbstractMergeableElement -{ - public PlexusRootElement( Element element ) - { - super( element ); - } - - public DescriptorTag[] getAllowedTags() - { - // TODO: add the managers, etc - return new DescriptorTag[]{ComponentsElement.TAG}; - } - - protected boolean isExpectedElementType( Mergeable me ) - { - return me instanceof PlexusRootElement; - } -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/PlexusXmlTag.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/PlexusXmlTag.java deleted file mode 100644 index 79d5a1210..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/PlexusXmlTag.java +++ /dev/null @@ -1,62 +0,0 @@ -package org.codehaus.plexus.cdc.merge.support; - -/** - * All allowable tags in components.xml and their bindings to - * {@link org.codehaus.plexus.cdc.merge.support.Mergeable} counterparts (if required). - *

- * This implementation may change.
- * TODO Might be an idea factor and set up the list of allowed tags here itself. - * - * @author Rahul Thakur - * @version $Id$ - */ -public class PlexusXmlTag - extends DescriptorTag -{ - public static final PlexusXmlTag COMPONENT_SET = new PlexusXmlTag( "component-set", - false, ComponentSetElement.class ); - - public static final PlexusXmlTag COMPONENTS = new PlexusXmlTag( "components", - true, ComponentsElement.class ); - - public static final PlexusXmlTag COMPONENT = new PlexusXmlTag( "component", true, ComponentElement.class ); - - public static final PlexusXmlTag ROLE = new PlexusXmlTag( "role" ); - - public static final PlexusXmlTag ROLE_HINT = new PlexusXmlTag( "role-hint" ); - - public static final PlexusXmlTag FIELD_NAME = new PlexusXmlTag( "field-name" ); - - public static final PlexusXmlTag IMPLEMENTATION = new PlexusXmlTag( "implementation" ); - - public static final PlexusXmlTag LIFECYCLE_HANDLER = new PlexusXmlTag( "lifecycle-handler", false, null ); - - public static final PlexusXmlTag REQUIREMENTS = - new PlexusXmlTag( "requirements", true, RequirementsElement.class ); - - public static final PlexusXmlTag CONFIGURATION = - new PlexusXmlTag( "configuration", true, ConfigurationElement.class ); - - public static final PlexusXmlTag REQUIREMENT = - new PlexusXmlTag( "requirement", true, RequirementElement.class ); - - /** - * @param tagName - * @param isMultipleAllowed - * @param mergeableClass Class that wraps this tag (as JDom element) and provides for merging same tags. - */ - private PlexusXmlTag( String tagName, boolean isMultipleAllowed, Class mergeableClass ) - { - super( tagName, isMultipleAllowed, mergeableClass ); - } - - /** - * By default we don't allow multiples of same tag names. - * - * @param tagName - */ - private PlexusXmlTag( String tagName ) - { - super( tagName, false, null ); - } -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/RequirementElement.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/RequirementElement.java deleted file mode 100644 index c62086d2c..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/RequirementElement.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.codehaus.plexus.cdc.merge.support; - -/* - * The MIT License - * - * Copyright (c) 2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.cdc.merge.MergeException; -import org.jdom.Element; - -/** - * @author Rahul Thakur - * @version $Id$ - */ -public class RequirementElement - extends AbstractMergeableElement -{ - static final DescriptorTag TAG = new DescriptorTag( "requirement", true, RequirementElement.class ); - - public RequirementElement( Element element ) - { - super( element ); - } - - public DescriptorTag[] getAllowedTags() - { - return new DescriptorTag[]{ComponentElement.ROLE, ComponentElement.ROLE_HINT, ComponentElement.FIELD_NAME}; - } - - public void merge( Mergeable me ) - throws MergeException - { - super.merge( me ); - } - - protected boolean isExpectedElementType( Mergeable me ) - { - return me instanceof RequirementElement; - } -} diff --git a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/RequirementsElement.java b/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/RequirementsElement.java deleted file mode 100644 index b39bde396..000000000 --- a/plexus-tools/plexus-cdc/src/main/java/org/codehaus/plexus/cdc/merge/support/RequirementsElement.java +++ /dev/null @@ -1,71 +0,0 @@ -package org.codehaus.plexus.cdc.merge.support; - -/* - * The MIT License - * - * Copyright (c) 2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.jdom.Element; - -import java.util.ArrayList; -import java.util.List; - -/** - * @author Rahul Thakur - * @version $Id$ - */ -public class RequirementsElement - extends AbstractMergeableElementList -{ - public static final DescriptorTag TAG = new DescriptorTag( "requirements", true, RequirementsElement.class ); - - public RequirementsElement( Element element ) - { - super( element ); - } - - protected boolean isExpectedElementType( Mergeable me ) - { - return me instanceof RequirementsElement; - } - - public DescriptorTag[] getAllowedTags() - { - return new DescriptorTag[]{RequirementElement.TAG}; - } - - protected List getElementNamesForConflictResolution( List defaultList ) - { - // we return the keys that we know we want to lookup to identify and - // resolve conflicts. - List l = new ArrayList(); - l.add( ComponentElement.ROLE.getTagName() ); - // TODO: add this back, but a test will fail (based on a role with no hint, which shouldn't be legal) -// l.add( ComponentElement.ROLE_HINT.getTagName() ); - return l; - } - - protected String getTagNameForRecurringMergeable() - { - return RequirementElement.TAG.getTagName(); - } -} diff --git a/plexus-tools/plexus-cdc/src/main/resources/META-INF/plexus/components.xml b/plexus-tools/plexus-cdc/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index 45c8b2e85..000000000 --- a/plexus-tools/plexus-cdc/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - org.codehaus.plexus.cdc.ComponentDescriptorCreator - org.codehaus.plexus.cdc.DefaultComponentDescriptorCreator - - - org.codehaus.plexus.cdc.ComponentGleaner - - - org.codehaus.plexus.cdc.merge.Merger - plexusXml - - - - - org.codehaus.plexus.cdc.ComponentGleaner - org.codehaus.plexus.cdc.PlexusDefaultComponentGleaner - - - org.codehaus.plexus.cdc.merge.Merger - componentsXml - org.codehaus.plexus.cdc.merge.ComponentsXmlMerger - - - org.codehaus.plexus.cdc.merge.Merger - plexusXml - org.codehaus.plexus.cdc.merge.PlexusXmlMerger - - - diff --git a/plexus-tools/plexus-cdc/src/test/java/org/codehaus/plexus/cdc/ComponentDescriptorCreatorTest.java b/plexus-tools/plexus-cdc/src/test/java/org/codehaus/plexus/cdc/ComponentDescriptorCreatorTest.java deleted file mode 100644 index 00b93e492..000000000 --- a/plexus-tools/plexus-cdc/src/test/java/org/codehaus/plexus/cdc/ComponentDescriptorCreatorTest.java +++ /dev/null @@ -1,136 +0,0 @@ -package org.codehaus.plexus.cdc; - -/* - * The MIT License - * - * Copyright (c) 2004-2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.component.discovery.DefaultComponentDiscoverer; -import org.codehaus.plexus.component.repository.ComponentRequirement; -import org.codehaus.plexus.component.repository.ComponentSetDescriptor; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.util.FileUtils; - -import java.io.File; -import java.io.FileReader; -import java.util.Iterator; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class ComponentDescriptorCreatorTest - extends PlexusTestCase -{ - public void testBasic() - throws Exception - { - ComponentSetDescriptor csd = buildCsd( 1 ); - - assertEquals( 2, csd.getComponents().size() ); - - ComponentDescriptor cd = (ComponentDescriptor) csd.getComponents().get( 0 ); - - assertNull( cd.getRoleHint() ); - - assertEquals( "org.codehaus.plexus.cdc.component.Service", cd.getRole() ); - - assertEquals( "org.codehaus.plexus.cdc.component.AnotherService", cd.getImplementation() ); - - cd = (ComponentDescriptor) csd.getComponents().get( 1 ); - - assertEquals( "My super component.", cd.getDescription() ); - - assertEquals( "foo", cd.getAlias() ); - - assertEquals( "bar", cd.getRoleHint() ); - - assertEquals( "1.2", cd.getVersion() ); - } - - public void testInheritAnotations() - throws Exception - { - ComponentSetDescriptor csd = buildCsd( 2 ); - - assertEquals( 2, csd.getComponents().size() ); - - Iterator it = csd.getComponents().iterator(); - - int i = 0; - - while ( it.hasNext() ) - { - ComponentDescriptor cd = (ComponentDescriptor) it.next(); - - if ( cd.getRole().indexOf( "Child" ) >= 0 ) - { - ComponentRequirement requirement = (ComponentRequirement) cd.getRequirements().get( 0 ); - assertEquals( "Requirement " + requirement.getRole() + " in component " + cd.getRole() - + " has wrong role hint", "myHint", requirement.getRoleHint() ); - i++; - } - } - - assertEquals( "Expected 2 components with role *Child*", 2, i ); - } - - private ComponentSetDescriptor buildCsd( int testNumber ) - throws Exception - { - File[] sourceDirectories = new File[] { getTestFile( "src/test/projects/test" + testNumber ) }; - - File outputDirectory = getTestFile( "target/cdc-output/test" + testNumber + "/META-INF/plexus" ); - - ComponentDescriptorCreator cdc = (ComponentDescriptorCreator) lookup( ComponentDescriptorCreator.ROLE ); - - // ---------------------------------------------------------------------- - // Generate - // ---------------------------------------------------------------------- - - if ( outputDirectory.exists() ) - { - FileUtils.deleteDirectory( outputDirectory ); - } - - assertTrue( outputDirectory.mkdirs() ); - - File outputFile = new File( outputDirectory, "components.xml" ); - - cdc.processSources( sourceDirectories, outputFile ); - - // ---------------------------------------------------------------------- - // Check the generated components.xml - // ---------------------------------------------------------------------- - - assertTrue( "Output file is missing: " + outputFile.getAbsolutePath(), outputFile.exists() ); - -// System.err.println( FileUtils.fileRead( outputFile ) ); - - DefaultComponentDiscoverer discoverer = new DefaultComponentDiscoverer(); - - FileReader reader = new FileReader( outputFile ); - - return discoverer.createComponentDescriptors( reader, outputFile.getAbsolutePath() ); - } -} diff --git a/plexus-tools/plexus-cdc/src/test/java/org/codehaus/plexus/cdc/merge/ComponentsXmlMergerTest.java b/plexus-tools/plexus-cdc/src/test/java/org/codehaus/plexus/cdc/merge/ComponentsXmlMergerTest.java deleted file mode 100644 index 880a03711..000000000 --- a/plexus-tools/plexus-cdc/src/test/java/org/codehaus/plexus/cdc/merge/ComponentsXmlMergerTest.java +++ /dev/null @@ -1,261 +0,0 @@ -package org.codehaus.plexus.cdc.merge; - -/* - * The MIT License - * - * Copyright (c) 2006, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.cdc.merge.support.AbstractMergeableElement; -import org.codehaus.plexus.cdc.merge.support.AbstractMergeableElementList; -import org.codehaus.plexus.cdc.merge.support.ComponentElement; -import org.codehaus.plexus.cdc.merge.support.ComponentsElement; -import org.codehaus.plexus.cdc.merge.support.RequirementsElement; -import org.codehaus.plexus.util.FileUtils; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.input.SAXBuilder; - -import java.io.File; -import java.util.List; - -/** - * Tests for {@link ComponentsXmlMerger}. - * - * @author Rahul Thakur - * @version $Id$ - */ -public class ComponentsXmlMergerTest - extends PlexusTestCase -{ - public void testBasic() - throws Exception - { - ComponentsXmlMerger merger = (ComponentsXmlMerger) lookup( Merger.ROLE ); - assertNotNull( merger ); - } - - public void testComponentsXmlFileMerge() - throws Exception - { - File dominantXml = getTestFile( "src/test/merge/dominant.xml" ); - File recessiveXml = getTestFile( "src/test/merge/recessive.xml" ); - Document dDoc = new SAXBuilder().build( dominantXml ); - Document rDoc = new SAXBuilder().build( recessiveXml ); - // ComponentsXmlMerger merger = new ComponentsXmlMerger (dDoc); - Merger merger = (Merger) lookup( Merger.ROLE ); - assertNotNull( merger ); - merger.merge( dDoc, rDoc ); - - File merged_xml = getTestFile( "target/merged.xml" ); - if ( merged_xml.exists() ) - { - FileUtils.forceDelete( merged_xml ); - } - merger.writeMergedDocument( dDoc, merged_xml ); - assertTrue( merged_xml.exists() ); - // read merged xml and verify it was merged as expected - Document mDoc = new SAXBuilder().build( merged_xml ); - Element mRootElt = mDoc.getRootElement(); - assertTrue( mRootElt.getName().equals( "component-set" ) ); - assertEquals( 1, mRootElt.getChildren( "components" ).size() ); - List componentEltList = mRootElt.getChild( "components" ).getChildren( "component" ); - assertEquals( 2, componentEltList.size() ); - Element cElt = (Element) componentEltList.get( 0 ); - assertEquals( "org.codehaus.plexus.cdc.component.IComponent", cElt.getChildTextTrim( "role" ) ); - assertEquals( "org.codehaus.plexus.cdc.component.DominantComponent", - cElt.getChildTextTrim( "implementation" ) ); - // now for the second component - cElt = (Element) componentEltList.get( 1 ); - assertEquals( "org.codehaus.plexus.cdc.component.INonConflictingComponent", cElt.getChildTextTrim( "role" ) ); - assertEquals( "org.codehaus.plexus.cdc.component.RecessiveComponent", - cElt.getChildTextTrim( "implementation" ) ); - - assertEquals( 1, mRootElt.getChildren( "lifecycle-handler-manager" ).size() ); - assertEquals( "org.codehaus.plexus.lifecycle.DefaultLifecycleHandlerManager", - mRootElt.getChild( "lifecycle-handler-manager" ).getAttributeValue( "implementation" ) ); - } - - public void testInvalidMergeableElements() - throws Exception - { - // dominant Component Element - AbstractMergeableElement dCE = new ComponentElement( new Element( "component" ) ); - Element roleElt = new Element( "role" ); - roleElt.setText( "org.codehaus.plexus.ISampleRole" ); - dCE.addContent( roleElt ); - - AbstractMergeableElementList reqElt = new RequirementsElement( new Element( "requirement" ) ); - // attempt and invalid merge - try - { - dCE.merge( reqElt ); - fail( "Expected MergeException!" ); - } - catch ( MergeException e ) - { - // do nothing. - } - } - - /** - * Tests if <component> elements from two sets are being merged properly. - * - * @throws Exception if there was an unexpected error. - */ - public void testComponentsMerge() - throws Exception - { - // dominant Components Element - AbstractMergeableElement dParent = new ComponentsElement( new Element( "components" ) ); - Element dCE = new Element( "component" ); - dParent.addContent( dCE ); - Element roleElt = new Element( "role" ); - roleElt.setText( "org.codehaus.plexus.ISampleRole" ); - dCE.addContent( roleElt ); - Element roleHintElt = new Element( "role-hint" ); - roleHintElt.setText( "sample-role-hint" ); - dCE.addContent( roleHintElt ); - Element implElt = new Element( "implementation" ); - implElt.setText( "org.codehaus.plexus.DominantImplementation" ); - dCE.addContent( implElt ); - Element requirementsElt = new Element( "requirements" ); - Element reqElt = new Element( "requirement" ); - Element reqRoleElt = new Element( "role" ); - reqRoleElt.setText( "org.codehaus.plexus.IRequiredRole" ); - reqElt.addContent( reqRoleElt ); - requirementsElt.addContent( reqElt ); - dCE.addContent( requirementsElt ); - - // recessive Component Element - AbstractMergeableElement rParent = new ComponentsElement( new Element( "components" ) ); - Element rCE = new Element( "component" ); - rParent.addContent( rCE ); - roleElt = new Element( "role" ); - roleElt.setText( "org.codehaus.plexus.ISampleRole" ); - rCE.addContent( roleElt ); - roleHintElt = new Element( "role-hint" ); - roleHintElt.setText( "sample-role-hint" ); - rCE.addContent( roleHintElt ); - implElt = new Element( "implementation" ); - implElt.setText( "org.codehaus.plexus.RecessiveImplementation" ); - rCE.addContent( implElt ); - Element lifecycleHandlerElt = new Element( "lifecycle-handler" ); - rCE.addContent( lifecycleHandlerElt ); - lifecycleHandlerElt.setText( "plexus-configurable" ); - requirementsElt = new Element( "requirements" ); - reqElt = new Element( "requirement" ); - reqRoleElt = new Element( "role" ); - reqRoleElt.setText( "org.codehaus.plexus.IRequiredRole" ); - reqElt.addContent( reqRoleElt ); - requirementsElt.addContent( reqElt ); - Element reqRoleHintElt = new Element( "role-hint" ); - reqRoleHintElt.setText( "recessive-required-role-hint" ); - reqElt.addContent( reqRoleHintElt ); - rCE.addContent( requirementsElt ); - - // attempt to merge - dParent.merge( rParent ); - assertEquals( 1, dParent.getChildren( "component" ).size() ); - assertEquals( "org.codehaus.plexus.DominantImplementation", dParent.getChild( "component" ) - .getChildText( "implementation" ) ); - assertEquals( 1, - dParent.getChild( "component" ).getChild( "requirements" ).getChildren( "requirement" ).size() ); - } - - /** - * This is deprecated as we dont' want to drill to merging - * nested elements within a component.

- * Keeping this around for testing MergeStrategy implmentation. - * - * @throws Exception - */ - public void testDeepComponentsMerge() - throws Exception - { - // FIXME: Review this after MergeStrategies are in place. - if ( true ) - { - return; - } - - // dominant Component Element - AbstractMergeableElement dCE = new ComponentElement( new Element( "component" ) ); - Element roleElt = new Element( "role" ); - roleElt.setText( "org.codehaus.plexus.ISampleRole" ); - dCE.addContent( roleElt ); - Element roleHintElt; - // roleHintElt = new Element ("role-hint"); - // roleHintElt.setText ("sample-hint"); - // dCE.addContent (roleHintElt); - Element implElt = new Element( "implementation" ); - implElt.setText( "org.codehaus.plexus.DominantImplementation" ); - dCE.addContent( implElt ); - Element requirementsElt = new Element( "requirements" ); - Element reqElt = new Element( "requirement" ); - Element reqRoleElt = new Element( "role" ); - reqRoleElt.setText( "org.codehaus.plexus.IRequiredRole" ); - reqElt.addContent( reqRoleElt ); - requirementsElt.addContent( reqElt ); - dCE.addContent( requirementsElt ); - - // recessive Component Element - AbstractMergeableElement rCE = new ComponentElement( new Element( "component" ) ); - roleElt = new Element( "role" ); - roleElt.setText( "org.codehaus.plexus.ISampleRole" ); - rCE.addContent( roleElt ); - roleHintElt = new Element( "role-hint" ); - roleHintElt.setText( "recessive-hint" ); - rCE.addContent( roleHintElt ); - implElt = new Element( "implementation" ); - implElt.setText( "org.codehaus.plexus.RecessiveImplementation" ); - rCE.addContent( implElt ); - Element lifecycleHandlerElt = new Element( "lifecycle-handler" ); - rCE.addContent( lifecycleHandlerElt ); - lifecycleHandlerElt.setText( "plexus-configurable" ); - requirementsElt = new Element( "requirements" ); - reqElt = new Element( "requirement" ); - reqRoleElt = new Element( "role" ); - reqRoleElt.setText( "org.codehaus.plexus.IRequiredRole" ); - reqElt.addContent( reqRoleElt ); - requirementsElt.addContent( reqElt ); - Element reqRoleHintElt = new Element( "role-hint" ); - reqRoleHintElt.setText( "recessive-required-role-hint" ); - reqElt.addContent( reqRoleHintElt ); - rCE.addContent( requirementsElt ); - - // attempt to merge - dCE.merge( rCE ); - - // verify the merge - assertTrue( null != dCE.getChild( "role" ) ); - assertEquals( "org.codehaus.plexus.ISampleRole", dCE.getChildText( "role" ) ); - assertTrue( null != dCE.getChild( "role-hint" ) ); - assertEquals( "recessive-hint", dCE.getChildText( "role-hint" ) ); - assertTrue( null != dCE.getChild( "lifecycle-handler" ) ); - assertEquals( "plexus-configurable", dCE.getChildText( "lifecycle-handler" ) ); - assertTrue( null != dCE.getChild( "requirements" ) ); - assertEquals( 1, dCE.getChild( "requirements" ).getChildren( "requirement" ).size() ); - assertEquals( "recessive-required-role-hint", ( (Element) dCE.getChild( "requirements" ) - .getChildren( "requirement" ).get( 0 ) ).getChildText( "role-hint" ) ); - } -} diff --git a/plexus-tools/plexus-cdc/src/test/merge/dominant.xml b/plexus-tools/plexus-cdc/src/test/merge/dominant.xml deleted file mode 100644 index e565791e6..000000000 --- a/plexus-tools/plexus-cdc/src/test/merge/dominant.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - org.codehaus.plexus.cdc.component.IComponent - - org.codehaus.plexus.cdc.component.DominantComponent - - - - - org.codehaus.plexus.cdc.component.IComponentA - - - - - - \ No newline at end of file diff --git a/plexus-tools/plexus-cdc/src/test/merge/recessive.xml b/plexus-tools/plexus-cdc/src/test/merge/recessive.xml deleted file mode 100644 index 0f95d027b..000000000 --- a/plexus-tools/plexus-cdc/src/test/merge/recessive.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - org.codehaus.plexus.cdc.component.IComponent - - org.codehaus.plexus.cdc.component.RecessiveComponent - - - - - org.codehaus.plexus.cdc.component.IComponentA - - recessiveField - - - - - - org.codehaus.plexus.cdc.component.INonConflictingComponent - - org.codehaus.plexus.cdc.component.RecessiveComponent - - - - - org.codehaus.plexus.cdc.component.IComponentA - - - - - - - - webapp - - - webapp - Webapp - - - - - - - - - - diff --git a/plexus-tools/plexus-cdc/src/test/projects/test1/parent.xml b/plexus-tools/plexus-cdc/src/test/projects/test1/parent.xml deleted file mode 100644 index a14d6399a..000000000 --- a/plexus-tools/plexus-cdc/src/test/projects/test1/parent.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/plexus-tools/plexus-cdc/src/test/projects/test1/project.xml b/plexus-tools/plexus-cdc/src/test/projects/test1/project.xml deleted file mode 100644 index ee99aac67..000000000 --- a/plexus-tools/plexus-cdc/src/test/projects/test1/project.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - plexus - plexus - plexus - 0.14-SNAPSHOT - - Codehaus - http://www.codehaus.org/ - /images/codehaus-small.gif - - 2001 - org.codehaus.plexus - /images/plexus-logo.gif - - - - - - - http://plexus.codehaus.org - http://jira.codehaus.org/secure/BrowseProject.jspa?id=10080 - - plexus.codehaus.org - /www/plexus.codehaus.org - - - scm:cvs:pserver:anonymous@cvs.codehaus.org:/scm/cvspublic:plexus/plexus-container - http://cvs.codehaus.org/viewcvs.cgi/plexus/plexus-container/?root=codehaus - - - - - - - - Plexus Developer List - http://lists.codehaus.org/mailman/listinfo/plexus-dev - http://lists.codehaus.org/mailman/listinfo/plexus-dev - http://lists.codehaus.org/pipermail/plexus-dev/ - - - - - - Jason van Zyl - jvanzyl - jason@zenplex.com - Zenplex - - Developer - Release Manager - - - - - - - - - plexus-dev@plexus.codehaus.org - src/java - src/aspect - src/test - - - - **/*Test.java - - - **/ComponentDiscovererTest.java - **/*Abstract*.java - - - - src/test - - **/*.xml - **/*.properties - **/*.conf - - - - src/test-input - - **/*.txt - - - - - - - - src/conf - org/codehaus/plexus - - **/*.conf - - - - src/templates - - - - - - - maven-jdepend-plugin - maven-checkstyle-plugin - maven-changes-plugin - maven-changelog-plugin - maven-javadoc-plugin - maven-jxr-plugin - maven-junit-report-plugin - maven-tasklist-plugin - maven-pmd-plugin - maven-simian-plugin - maven-clover-plugin - - - - diff --git a/plexus-tools/plexus-cdc/src/test/projects/test1/src/java/org/codehaus/plexus/cdc/component/Action.java b/plexus-tools/plexus-cdc/src/test/projects/test1/src/java/org/codehaus/plexus/cdc/component/Action.java deleted file mode 100644 index 853828e1d..000000000 --- a/plexus-tools/plexus-cdc/src/test/projects/test1/src/java/org/codehaus/plexus/cdc/component/Action.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.codehaus.plexus.cdc.component; - -/** - * @author Jason van Zyl - * - * @version $Id$ - */ -public interface Action -{ -} diff --git a/plexus-tools/plexus-cdc/src/test/projects/test1/src/java/org/codehaus/plexus/cdc/component/AnotherService.java b/plexus-tools/plexus-cdc/src/test/projects/test1/src/java/org/codehaus/plexus/cdc/component/AnotherService.java deleted file mode 100644 index 2d21e7a60..000000000 --- a/plexus-tools/plexus-cdc/src/test/projects/test1/src/java/org/codehaus/plexus/cdc/component/AnotherService.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.codehaus.plexus.cdc.component; - -/** - * @plexus.component - * @author Trygve Laugstøl - * @version $Id: ComponentDescriptorCreatorTest.java 3740 2006-08-29 01:48:15Z carlos $ - */ -public class AnotherService - implements Service -{ -} diff --git a/plexus-tools/plexus-cdc/src/test/projects/test1/src/java/org/codehaus/plexus/cdc/component/Component.java b/plexus-tools/plexus-cdc/src/test/projects/test1/src/java/org/codehaus/plexus/cdc/component/Component.java deleted file mode 100644 index e1a87a72e..000000000 --- a/plexus-tools/plexus-cdc/src/test/projects/test1/src/java/org/codehaus/plexus/cdc/component/Component.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.codehaus.plexus.cdc.component; - -interface Component -{ -} diff --git a/plexus-tools/plexus-cdc/src/test/projects/test1/src/java/org/codehaus/plexus/cdc/component/ComponentA.java b/plexus-tools/plexus-cdc/src/test/projects/test1/src/java/org/codehaus/plexus/cdc/component/ComponentA.java deleted file mode 100644 index 37010b8be..000000000 --- a/plexus-tools/plexus-cdc/src/test/projects/test1/src/java/org/codehaus/plexus/cdc/component/ComponentA.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.codehaus.plexus.cdc.component; - -interface ComponentA -{ -} diff --git a/plexus-tools/plexus-cdc/src/test/projects/test1/src/java/org/codehaus/plexus/cdc/component/DefaultComponent.java b/plexus-tools/plexus-cdc/src/test/projects/test1/src/java/org/codehaus/plexus/cdc/component/DefaultComponent.java deleted file mode 100644 index 33862d4be..000000000 --- a/plexus-tools/plexus-cdc/src/test/projects/test1/src/java/org/codehaus/plexus/cdc/component/DefaultComponent.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.codehaus.plexus.cdc.component; - -import java.util.Map; - -/** - * My super component. - * - * @plexus.component - * alias="foo" - * role-hint="bar" - * version="1.2" - */ -public class DefaultComponent - implements Component -{ - /** - * @plexus.requirement - */ - private ComponentA componentA; - - /** - * @plexus.requirement - * role-hint="foo" - */ - private Component fooComponent; - - /** - * @plexus.requirement - * role="Component" - */ - private Map fooMap; - - /** - * @plexus.requirement - * role="Component" - */ - private Map bar; - - /** - * @plexus.configuration - * default-value="localhost" - * foo=bar - */ - private String host; - - /** - * @plexus.configuration - * default-value="8000, 8080" - */ - private List ports; -} diff --git a/plexus-tools/plexus-cdc/src/test/projects/test1/src/java/org/codehaus/plexus/cdc/component/SuperAction.java b/plexus-tools/plexus-cdc/src/test/projects/test1/src/java/org/codehaus/plexus/cdc/component/SuperAction.java deleted file mode 100644 index 28a1426fe..000000000 --- a/plexus-tools/plexus-cdc/src/test/projects/test1/src/java/org/codehaus/plexus/cdc/component/SuperAction.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.codehaus.plexus.cdc.component; - -/** - * - * - * @author Jason van Zyl - * - * @version $Id$ - */ -public class SuperAction - implements Action -{ -} diff --git a/plexus-tools/plexus-cdc/src/test/projects/test2/pom.xml b/plexus-tools/plexus-cdc/src/test/projects/test2/pom.xml deleted file mode 100644 index 2ebb7ef39..000000000 --- a/plexus-tools/plexus-cdc/src/test/projects/test2/pom.xml +++ /dev/null @@ -1,33 +0,0 @@ - - 4.0.0 - org.codehaus.plexus.cdc - test2 - 1.0-SNAPSHOT - Test for inheriting annotations - - - junit - junit - 3.8.1 - test - - - - - - - org.codehaus.plexus - plexus-maven-plugin - - - generate - - descriptor - - - - - - - - diff --git a/plexus-tools/plexus-cdc/src/test/projects/test2/src/main/java/org/codehaus/plexus/cdc/test/Child1.java b/plexus-tools/plexus-cdc/src/test/projects/test2/src/main/java/org/codehaus/plexus/cdc/test/Child1.java deleted file mode 100644 index 01d455905..000000000 --- a/plexus-tools/plexus-cdc/src/test/projects/test2/src/main/java/org/codehaus/plexus/cdc/test/Child1.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.codehaus.plexus.cdc.test; - -/* - * Copyright 2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * @plexus.component role="org.codehaus.plexus.maven.Child1" - * - * @author Carlos Sanchez - * @version $Id$ - */ -public class Child1 - extends Parent -{ - -} diff --git a/plexus-tools/plexus-cdc/src/test/projects/test2/src/main/java/org/codehaus/plexus/cdc/test/Child2.java b/plexus-tools/plexus-cdc/src/test/projects/test2/src/main/java/org/codehaus/plexus/cdc/test/Child2.java deleted file mode 100644 index 773366c7b..000000000 --- a/plexus-tools/plexus-cdc/src/test/projects/test2/src/main/java/org/codehaus/plexus/cdc/test/Child2.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.codehaus.plexus.cdc.test; - -/* - * Copyright 2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * @plexus.component role="org.codehaus.plexus.maven.Child2" - * - * @author Carlos Sanchez - * @version $Id$ - */ -public class Child2 - extends Parent -{ - -} diff --git a/plexus-tools/plexus-cdc/src/test/projects/test2/src/main/java/org/codehaus/plexus/cdc/test/Parent.java b/plexus-tools/plexus-cdc/src/test/projects/test2/src/main/java/org/codehaus/plexus/cdc/test/Parent.java deleted file mode 100644 index b1b352aba..000000000 --- a/plexus-tools/plexus-cdc/src/test/projects/test2/src/main/java/org/codehaus/plexus/cdc/test/Parent.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.plexus.cdc.test; - -/* - * Copyright 2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public class Parent -{ - - /** - * @plexus.requirement role-hint="myHint" - */ - private Object object; - -} diff --git a/plexus-tools/plexus-cling/application.mdo b/plexus-tools/plexus-cling/application.mdo deleted file mode 100644 index b531cc47c..000000000 --- a/plexus-tools/plexus-cling/application.mdo +++ /dev/null @@ -1,253 +0,0 @@ - - application - CLIng Application - - - - package - org.codehaus.plexus.cling.model - - - - - Application - 1.0.0 - Root element of an application descriptor. - - - description - 1.0.0 - String - - - repositoryCache - 1.0.0 - String - lib - - - - main - 1.0.0 - The main-class information, for launching the application. - - Main - - - - environment - 1.0.0 - Environmental properties to pass into the System properties for the application. - Properties - - - usages - 1.0.0 - Valid usage option-sets. - - Usage - * - - - - classpath - 1.0.0 - The classpath elements for this application. - - ClasspathEntry - * - - - - repositories - 1.0.0 - The list of repositories for downloading this application's dependencies - - Repository - * - - - - - - Main - 1.0.0 - Contains launch class and method for the app descriptor - - - className - 1.0.0 - The launcher class - String - - - method - 1.0.0 - The launcher method - String - - - - - Usage - 1.0.0 - Describes a valid usage pattern for this application - - - options - 1.0.0 - The CLI options available for this usage pattern - - Option - * - - - - - - Option - 1.0.0 - A single CLI option's specification - - - id - 1.0.0 - String - - - - short - 1.0.0 - char - The single-character name for this option - $ - The default of $ is used to signify that no value was given. - - - long - 1.0.0 - String - The long name for this option - - - type - 1.0.0 - String - String - The type of this option, for validation purposes. - - - required - 1.0.0 - boolean - false - Whether this option is required for the usage to be valid - - - description - 1.0.0 - String - The purpose this option serves in configuring the application - - - - - 1.0.0 - - - - - - ClasspathEntry - 1.0.0 - An element in the application's classpath - - - Directory - ClasspathEntry - 1.0.0 - A local directory to be used as a classpath entry - - - path - 1.0.0 - String - - - - - - Dependency - ClasspathEntry - 1.0.0 - An artifact from the maven repository which will be used by this application. - - - groupId - 1.0.0 - String - true - The artifact's groupId - - - artifactId - 1.0.0 - String - true - The artifact's artifactId - - - version - 1.0.0 - String - true - The artifact's version - - - type - 1.0.0 - String - jar - The artifact's type - - - - - Repository - 1.0.0 - A repository specification - - - id - 1.0.0 - String - true - The identifier for this repository, which can be used to map in authentication info - - - url - 1.0.0 - String - true - The URL used to access this repository - - - - - \ No newline at end of file diff --git a/plexus-tools/plexus-cling/pom.xml b/plexus-tools/plexus-cling/pom.xml deleted file mode 100644 index 9b0aa972d..000000000 --- a/plexus-tools/plexus-cling/pom.xml +++ /dev/null @@ -1,54 +0,0 @@ - - 4.0.0 - plexus - plexus-cling - CLIng Command-Line Framework - 1.0-alpha-1-SNAPSHOT - - - plexus - plexus - 0.17 - - - marmalade - marmalade-core - 1.0-alpha2-SNAPSHOT - - - marmalade - marmalade-el-ognl - 1.0-alpha2-SNAPSHOT - - - org.apache.maven - maven-artifact - 2.0-SNAPSHOT - - - maven - wagon-api - 1.0-alpha-1-SNAPSHOT - - - classworlds - classworlds - 1.1-SNAPSHOT - - - jmock - jmock - 1.0.1 - - - ognl - ognl - 2.5.1 - - - xpp3 - xpp3 - 1.1.3.3 - - - diff --git a/plexus-tools/plexus-cling/site/apt/design.apt b/plexus-tools/plexus-cling/site/apt/design.apt deleted file mode 100644 index 1decfd73e..000000000 --- a/plexus-tools/plexus-cling/site/apt/design.apt +++ /dev/null @@ -1,99 +0,0 @@ ---- -CLIng Overview ---- -John Casey ---- -09/13/2004 ---- - -An Overview of CLIng - -*Abstract - - CLIng is a next-generation command-line interface which utilizes maven's - artifact API to centralize and automate the management of an application's - dependencies. Command-line applications are currently too complex to - implement, especially with regard to configuration and argument parsing. CLIng - aims to remedy this. - -*Introduction - - Present-day incarnations of command-line interfaces all share one common - drawback: they must be coded. That is, each application which wants to provide - an entry point from the command line must provide some sort of Main class - which parses argument strings and sets up the environment before delegating - the <> execution to the application implementation. On the one hand, this - is a good practice compared to simply providing a main() method in the - implementation class, since is separates CLI concerns from the runtime context - of the application. On the other hand, all Main classes look remarkably - similar, which leads to an important question: Are contemporary command-line - frameworks too low-level? - -*Too Low-Level? - - Retyping of identical or even similar code often leads a good programmer to - question whether that functionality would best be provided by a piece of - common infrastructure. Each and every command-line entry point class provides - the following: - - - option parsing/handling - - environment setup - - delegation to a generic application entry point class - - Add to this the fact that the JVM itself must be setup by some external entity - (programmer or shell script), and you get a fairly complete picture of what it - takes to launch an application from the command line. - - Currently, several frameworks do exist to aid in the creation of a CLI entry - point for applications. <>, these frameworks focus almost exclusively - on only one of the aforementioned aspects of command-line launching: - - - ClassWorlds: classpath handling, some limited environment setup - - getopt: options/argument parsing - - commons-cli: options/argument parsing - - The point is that it <> possible to centralize all of this into one - application descriptor, and add to it the ability to specify runtime library - dependencies, which will be downloaded at first launch. The big advantage is - that this type of application would be very lightweight to download and - install, and that it would centralize all of the application's dependencies - with other dependency libraries on the system, thereby allowing multiple - applications to use the same .jar file. Using this system, the application - developer would deploy his application .jar file to some public repository, - then create an application descriptor. End-users would download the - application descriptor, and possibly a shell script which might specify some - application defaults and/or provide some advanced option handling. Obviously, - system-specific configurations, etc. would also have to be either installed - or created, since downloading them as dependencies doesn't really make sense. - -*CLIng Design Notes - - Here are some general design notes for CLIng, which will guide the process of - designing and implementing the app launcher itself. - - - Application descriptor contains: - - - Options: short-name, long-name, required, type, class-property, - description - - - Local classpath entries: directories, non-dependencies locally added - to the classpath - - - Library dependencies: artifact specifications for downloading runtime - dependencies - - - Environment variables: System properties to be set, with expansion of - existing sysprops at parse-time - - - Main class configuration: class-name and method to execute for the - application entry point. Options' class-property specs will be used to - set properties on this main-class using JavaBeans standard - introspection - - - CLIng uses ClassWorlds to bootstrap itself, and maybe expose some basic - envars. - - - Application descriptor should allow addition of classpath entries <>. - - \ No newline at end of file diff --git a/plexus-tools/plexus-cling/site/apt/invocation.apt b/plexus-tools/plexus-cling/site/apt/invocation.apt deleted file mode 100644 index dc4cd068d..000000000 --- a/plexus-tools/plexus-cling/site/apt/invocation.apt +++ /dev/null @@ -1,114 +0,0 @@ ---- -CLIng Invocation Handling ---- -John Casey ---- -09/14/2004 ---- - -Command-Line Parsing in CLIng - -*Abstract - - CLIng attempts to provide for maximum flexibility in the realm of command - invocation. This document describes the design of the CLIng command-line - parser, paying special attention to the concept of InvocationTemplates. - -*Introduction - - Often, an application can be invoked in different ways. It may be as simple - as specifying an input- versus output-mode, or it may be relatively complex, - such as specifying that certain sets of options are allowed (and even - ) to be specified together. Many other CLI implementations account - for this reality by simply forcing the developer to specify all possible - options in a single set, then group-and-validate subsets later in the launch - code for the application. - - Since it is CLIng's goal to remove the necessity of CLI-oriented launch code, - this approach to option sets is simply unacceptable. Instead, this project - attempts to embrace the reality of command-line invocation by providing the - ability to specify multiple runtime modes - or InvocationTemplates - and then - scoring the provided command-line options against each template to find out - which one is the best match. This is just one way in which CLIng's parsing - strategy will make development of command-line applications a snap. - -*CLI Parser Specification - - The command-line parser for CLIng follows a few simple rules, broadly - separated by category: - -**Options - - Options must have the following properties: - - - [Short name] consisting of a one-character shorthand reference for the - option - - - [Long name] consisting of a more verbose, descriptive name for the option - - - [Description] consisting of an explanation for what the option means in the - larger execution context - - - [Property] consisting of the main-class object property which will accept - the option's value, or else a boolean flag if the option doesn't require a - value - - [] - - Options may have - but are not required to have - the following properties: - - - [Required] which flags the option as required for a valid command-line - parse result - - [] - - Options may require one or more values. If this is the case, the following - properties may be set: - - - [Type] consisting of a String reference to a valid OptionFormat, to be used - in validating and extracting the option's real value from the command-line - argument - - - [Multi value] which flags this option as consisting of a list of one or - more values, each conforming to the format specified by the property - - [] - -**Option-Sets - - Options may be grouped into sets, in order to capture different runtime modes - for a particular application. Each set of options will make up an - InvocationTemplate, which can: - - - score an array of command-line arguments to determine how well it matches - the options specified for that template - - - set the values of the options contained within that template based on a - Map of option-name -> value entries, where option-name can be the short or - long name for the option - - - determine whether that template has all of its required options satisfied; - that is, whether the invocation was a valid call to the application - - - supply a usage statement based on the options and requirements of that - template, in order to provide user feedback on how to use the application - correctly - -**Invocations - - Every time CLIng proxies the invocation of an application, it instantiates - an Invocation object, which is then loaded with all of the available - InvocationTemplates. This invocation handler is then asked to parse an array - of arguments (these will be the args from the main method invocation) into a - map of option-name -> value entries, and determine which template best fits - the supplied information. Using the template with the best score, the - invocation handler will set its values and return. - - Now, the invocation is available for query by the Launcher instance, which - controls its lifecycle. Queries for option satisfaction and usage will be - delegated to the appropriate template(s). The Launcher is responsible for - using the information from the matching template to configure the application - entry point instance before running it. - - See the lifecycle document for more information about the function of the - Launcher. \ No newline at end of file diff --git a/plexus-tools/plexus-cling/site/apt/lifecycle.apt b/plexus-tools/plexus-cling/site/apt/lifecycle.apt deleted file mode 100644 index f25f89bf6..000000000 --- a/plexus-tools/plexus-cling/site/apt/lifecycle.apt +++ /dev/null @@ -1,46 +0,0 @@ ---- -CLIng Lifecycle ---- -John Casey ---- -09/13/2004 ---- - -CLIng Lifecycle - -*Abstract - - This document details the process that CLIng will execute in order to - launch an application. - -*Lifecycle Specification - - [[1]] Setup the CLIng execution environment. The CLIng basedir is - assumed to be if the JVM property - is not specified. - - [[2]] Parse the <<>> file in of the CLIng execution - directory. - - [[3]] Download the runtime dependencies of the application, as they - are encountered in the <<>> file. If any of these fails, - fail the entire application. - - [[4]] Setup the application class-realm with the downloaded dependencies - and any specified local classpath locations. - - [[5]] Setup the System environment by merging the element's body - content with pre-existing System properties. - - [[6]] Instantiate the main-class. - - [[7]] Parse the command-line arguments, and validate each. Set each - validated argument as a property on the main-class. - - [[8]] Reflectively lookup the specified execute method. Verify that it - returns an int type. If not, fail the entire application. - - [[9]] Invoke the execute method and save the result to a local variable. - - [[10]] Call System.exit(x) where is the result from [9]. - diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/CLIngConstants.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/CLIngConstants.java deleted file mode 100644 index 18eef05ac..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/CLIngConstants.java +++ /dev/null @@ -1,27 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling; - -/** - * @author jdcasey - */ -public final class CLIngConstants -{ - // - CLING SYSTEM PROPERTY KEYS - - public static final String APPDIR_SYSPROP = "app.basedir"; - - public static final String APPXML_SYSPROP = "app.xml.file"; - - public static final String DEFAULT_APPXML_VALUE = "app.xml"; - // ------------------------------ - - // - MARMALADE CONTEXT VARIABLE KEYS - - public static final String CLING_CONFIG_CONTEXT_KEY = "cling.config"; - // ----------------------------------- - - public static final String APP_RESULT_SYSPROP = "app.result"; - - private CLIngConstants() - { - } - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/CLIngErrors.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/CLIngErrors.java deleted file mode 100644 index 6dc549a89..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/CLIngErrors.java +++ /dev/null @@ -1,64 +0,0 @@ -/* Created on Sep 14, 2004 */ -package org.codehaus.plexus.cling; - -/** - * Constants class containing all CLIng-specific runtime error codes. - * - * @author jdcasey - */ -public final class CLIngErrors -{ - - public static final int ERROR_STARTING_EMBEDDER = -10000; - - public static final int ERROR_LOOKING_UP_LAUNCHER = -10001; - - public static final int ERROR_PARSING_ARGS = -1; - - public static final int ERROR_ACCESSING_MAIN_METHOD = -2; - - public static final int ERROR_MAIN_METHOD_HAD_ILLEGAL_ARGUMENT = -4; - - public static final int ERROR_MAIN_METHOD_NOT_ACCESSIBLE_FOR_INVOCATION = -5; - - public static final int ERROR_MAIN_METHOD_FAILED_TO_EXECUTE = -6; - - public static final int ERROR_SETTING_OBJECT_PROPERTY = -7; - - public static final int ERROR_REQUIRED_OPTIONS_NOT_SATISFIED = -8; - - public static final int ERROR_MAIN_CLASS_NOT_FOUND = -9; - - public static final int ERROR_MAIN_CLASS_NOT_INSTANTIABLE = -10; - - public static final int ERROR_CREATING_DUPLICATE_CLASSREALM = -11; - - public static final int ERROR_RETRIEVING_APPXML_CANONICAL_PATH = -12; - - public static final int ERROR_OPENING_APPXML = -13; - - public static final int ERROR_PARSING_APPXML = -14; - - public static final int ERROR_BUILDING_APPXML = -15; - - public static final int ERROR_VALIDATING_APPXML = -16; - - public static final int ERROR_BUILDING_APPMODEL_FROM_APPXML = -17; - - public static final int ERROR_BUILDING_DEFAULT_LOCAL_REPO_PATH = -18; - - public static final int ERROR_RESOLVING_CLASSPATH_ENTRY = -19; - - public static final int ERROR_CONSTRUCTING_LOCAL_REPO_URL = -20; - - public static final int ERROR_FINDING_MAIN_METHOD = -21; - - public static final int ERROR_CANONICALIZING_APPDIR = -22; - - public static final int UNHANDLED_EXCEPTION = -22; - - private CLIngErrors() - { - } - -} \ No newline at end of file diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/CLIngLaunchException.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/CLIngLaunchException.java deleted file mode 100644 index 5c2113720..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/CLIngLaunchException.java +++ /dev/null @@ -1,30 +0,0 @@ -/* Created on Sep 14, 2004 */ -package org.codehaus.plexus.cling; - -/** - * @author jdcasey - */ -public class CLIngLaunchException - extends Exception -{ - - private final int errorCode; - - public CLIngLaunchException( String message, int errorCode ) - { - super(message); - this.errorCode = errorCode; - } - - public CLIngLaunchException( String message, int errorCode, Throwable cause ) - { - super( message, cause ); - this.errorCode = errorCode; - } - - public int getErrorCode() - { - return errorCode; - } - -} \ No newline at end of file diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/Launcher.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/Launcher.java deleted file mode 100644 index 8959c9939..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/Launcher.java +++ /dev/null @@ -1,583 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling; - -import java.io.BufferedInputStream; -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.IOException; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.Set; - -import ognl.Ognl; -import ognl.OgnlException; - -import org.apache.maven.artifact.resolver.ArtifactResolutionException; -import org.apache.maven.artifact.resolver.ArtifactResolver; -import org.codehaus.classworlds.ClassRealm; -import org.codehaus.classworlds.ClassWorld; -import org.codehaus.classworlds.DuplicateRealmException; -import org.codehaus.marmalade.el.ognl.OgnlExpressionEvaluator; -import org.codehaus.marmalade.el.ognl.PathSafeOgnlExpressionEvaluator; -import org.codehaus.marmalade.metamodel.MarmaladeTaglibResolver; -import org.codehaus.marmalade.metamodel.ModelBuilderException; -import org.codehaus.marmalade.metamodel.ScriptBuilder; -import org.codehaus.marmalade.model.MarmaladeScript; -import org.codehaus.marmalade.model.MarmaladeTag; -import org.codehaus.marmalade.parsing.DefaultParsingContext; -import org.codehaus.marmalade.parsing.MarmaladeParsetimeException; -import org.codehaus.marmalade.parsing.MarmaladeParsingContext; -import org.codehaus.marmalade.parsing.ScriptParser; -import org.codehaus.marmalade.runtime.DefaultContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.cling.cli.Invocation; -import org.codehaus.plexus.cling.cli.InvocationException; -import org.codehaus.plexus.cling.configuration.CLIngConfiguration; -import org.codehaus.plexus.cling.configuration.DefaultCLIngConfiguration; -import org.codehaus.plexus.cling.model.AppModel; -import org.codehaus.plexus.cling.model.Classpath; -import org.codehaus.plexus.cling.model.ClasspathEntry; -import org.codehaus.plexus.cling.model.ResolvedClasspathEntry; -import org.codehaus.plexus.cling.tags.app.AppTag; -import org.codehaus.plexus.cling.tags.app.AppTagLibrary; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.context.Context; -import org.codehaus.plexus.embed.Embedder; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.logging.Logger; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable; - -/** - * @author jdcasey - */ -public class Launcher extends AbstractLogEnabled - implements Contextualizable -{ - - public static final String ROLE = Launcher.class.getName(); - - private ClassRealm containerRealm; - - private ArtifactResolver resolver; - - public int execute( String[] args ) throws CLIngLaunchException - { - Logger logger = getLogger(); - - // Setup the default cling configuration - CLIngConfiguration config = null; - try - { - config = new DefaultCLIngConfiguration(); - } - catch ( MalformedURLException e ) - { - throw new CLIngLaunchException( "Cannot build default CLIng local artifact repository path", - CLIngErrors.ERROR_BUILDING_DEFAULT_LOCAL_REPO_PATH, e ); - } - - // Execute the cling lifecycle: - // [[1]] Setup the CLIng execution environment. The CLIng basedir is - // assumed to be if the JVM property - // is not specified. - // - logger.debug( "Setting up CLIng environment." ); - - String basedir = System.getProperty( CLIngConstants.APPDIR_SYSPROP, System.getProperty( "user.dir" ) ); - File basedirFile = new File(basedir); - - try - { - basedirFile = basedirFile.getCanonicalFile(); - } - catch ( IOException e ) - { - throw new CLIngLaunchException("Cannot canonicalize application basedir", CLIngErrors.ERROR_CANONICALIZING_APPDIR, e); - } - - Properties sysProps = System.getProperties(); - sysProps.setProperty("user.dir", basedirFile.getPath()); - sysProps.setProperty(CLIngConstants.APPDIR_SYSPROP, basedirFile.getPath()); - - System.setProperties(sysProps); - - logger.debug( "Done." ); - - // [[2]] Parse the <<>> file in of the CLIng - // execution directory. - // - logger.debug( "Parsing application descriptor." ); - AppModel model = parseAppXml( basedir, config ); - logger.debug( "Done." ); - - // [[3]] Download the runtime dependencies of the application, as they - // are encountered in the <<>> file. If any of these fails, - // fail the entire application. - // [[4]] Setup the application class-realm with the downloaded - // dependencies and any specified local classpath locations. - // - logger.debug( "Building class realm and setting up context classloader." ); - - ClassRealm appRealm = resolveClasspath( model.getClasspath(), config ); - - Thread.currentThread().setContextClassLoader(appRealm.getClassLoader()); - - logger.debug( "Done." ); - - // [[5]] Setup the System environment by merging the element's - // body content with pre-existing System properties. - // - logger.debug( "Setting up environment properties." ); - System.setProperties( model.getEnvironment() ); - logger.debug( "Done." ); - - // [[6]] Instantiate the main-class. - // - logger.debug( "Instantiating main object." ); - Object main = instantiateMain( model, appRealm ); - logger.debug( "Done" ); - - // [[7]] Parse the command-line arguments, and validate each. Set each - // validated argument as a property on the main-class. - // - logger.debug( "Parsing command-line arguments, and configuring main-class instance." ); - Invocation invocation = parseCommandLine( args, model, main ); - configureMain(main, invocation); - logger.debug( "Done." ); - - // [[8]] Reflectively lookup the specified execute method. Verify that - // it returns an int type. If not, fail the entire application. - // - logger.debug( "Finding main execution method." ); - Method execute = findMethod( main, model, invocation ); - logger.debug( "Done." ); - - // [[9]] Invoke the execute method and save the result to a local - // variable. - // - logger.debug( "Invoking main execution method." ); - int result = invokeMethod( execute, main, invocation ); - logger.debug( "Done." ); - - // See the main() method for [9]. - return result; - } - - private void configureMain( Object main, Invocation invocation ) - throws CLIngLaunchException - { - Map mappings = invocation.getOptionPropertyMappings(); - - for ( Iterator it = mappings.entrySet().iterator(); it.hasNext(); ) - { - Map.Entry entry = (Map.Entry) it.next(); - String key = (String)entry.getKey(); - Object value = entry.getValue(); - - try - { - Ognl.setValue(key, main, value); - } - catch ( OgnlException e ) - { - throw new CLIngLaunchException("Cannot configure main-class instance with one or more command-line options", CLIngErrors.ERROR_SETTING_OBJECT_PROPERTY, e); - } - } - } - - private ClassRealm resolveClasspath( Classpath classpath, CLIngConfiguration config ) throws CLIngLaunchException - { - List entries = classpath.getEntries(); - - ClassRealm appRealm = null; - try - { - appRealm = containerRealm.createChildRealm( "application" ); - } - catch ( DuplicateRealmException e ) - { - throw new CLIngLaunchException( "Cannot create duplicate ClassRealm", - CLIngErrors.ERROR_CREATING_DUPLICATE_CLASSREALM, e ); - } - - URL localRepoUrl = null; - try - { - localRepoUrl = new URL( config.getLocalRepository().getUrl() ); - } - catch ( MalformedURLException e ) - { - throw new CLIngLaunchException( "Cannot construct local artifact repository URL", - CLIngErrors.ERROR_CONSTRUCTING_LOCAL_REPO_URL, e ); - } - - File localRepoDir = new File( localRepoUrl.getPath() ); - if ( !localRepoDir.exists() ) - { - localRepoDir.mkdirs(); - } - - for ( Iterator it = entries.iterator(); it.hasNext(); ) - { - ClasspathEntry entry = (ClasspathEntry) it.next(); - - // If this type of entry needs resolution, resolve it first. - if ( entry instanceof ResolvedClasspathEntry ) - { - try - { - ((ResolvedClasspathEntry) entry).resolve( resolver, config ); - } - catch ( MalformedURLException e ) - { - throw new CLIngLaunchException( "Cannot resolve classpath entry", - CLIngErrors.ERROR_RESOLVING_CLASSPATH_ENTRY, e ); - } - catch ( ArtifactResolutionException e ) - { - throw new CLIngLaunchException( "Cannot resolve classpath entry", - CLIngErrors.ERROR_RESOLVING_CLASSPATH_ENTRY, e ); - } - } - - appRealm.addConstituent( entry.getURL() ); - } - - return appRealm; - } - - private int invokeMethod( Method execute, Object main, Invocation invocation ) throws CLIngLaunchException - { - int result = 0; - - try - { - Object[] params = null; - - if ( execute.getParameterTypes().length == 1 ) - { - params = new Object[] { invocation.getArguments() }; - } - else - { - params = new Object[0]; - } - - Integer returnValue = (Integer) execute.invoke( main, params ); - result = returnValue.intValue(); - } - catch ( IllegalArgumentException e ) - { - throw new CLIngLaunchException( "invalid parameter in main-method", - CLIngErrors.ERROR_MAIN_METHOD_HAD_ILLEGAL_ARGUMENT, e ); - } - catch ( IllegalAccessException e ) - { - throw new CLIngLaunchException( "main-method cannot be accessed for invocation", - CLIngErrors.ERROR_MAIN_METHOD_NOT_ACCESSIBLE_FOR_INVOCATION, e ); - } - catch ( InvocationTargetException e ) - { - throw new CLIngLaunchException( "main-method failed to execute", - CLIngErrors.ERROR_MAIN_METHOD_FAILED_TO_EXECUTE, e ); - } - - return result; - } - - private Method findMethod( Object main, AppModel model, Invocation invocation ) throws CLIngLaunchException - { - Method execute = null; - try - { - String methodName = model.getMain().getMainMethod(); - - Method[] methods = main.getClass().getMethods(); - for ( int i = 0; i < methods.length; i++ ) - { - Method method = methods[i]; - - if ( method.getName().equals( methodName ) && method.getReturnType().equals( Integer.TYPE ) ) - { - Class[] paramTypes = method.getParameterTypes(); - if ( paramTypes.length == 1 && paramTypes[0].isAssignableFrom( List.class ) ) - { - - execute = method; - break; - } - else if(paramTypes.length == 0) { - execute = method; - break; - } - } - } - - if ( execute == null ) - { - throw new CLIngLaunchException( "Cannot find suitable main-class launch method of specified name", - CLIngErrors.ERROR_FINDING_MAIN_METHOD ); - } - - } - catch ( SecurityException e ) - { - throw new CLIngLaunchException( "Cannot gain access to main-method to execute", - CLIngErrors.ERROR_ACCESSING_MAIN_METHOD, e ); - } - - return execute; - } - - private Invocation parseCommandLine( String[] args, AppModel model, Object main ) throws CLIngLaunchException - { - Invocation cliInvocation = new Invocation( model.getApplicationDescription(), model.getArgumentDescription() ); - Set invocationTemplates = model.getLegalUsage().getInvocationTemplates(); - cliInvocation.setInvocationTemplates( invocationTemplates ); - try - { - cliInvocation.parseArgs( args ); - } - catch ( InvocationException e ) - { - throw new CLIngLaunchException( "Cannot parse command-line arguments", CLIngErrors.ERROR_PARSING_ARGS, e ); - } - - if ( !cliInvocation.isSatisfied() ) - { - String appName = System.getProperty( "$0" ); - if ( appName == null || appName.length() < 1 ) - { - appName = main.getClass().getName(); - } - - String usage = cliInvocation.getAllUsages( appName ); - - Logger logger = getLogger(); - logger.warn( usage ); - - throw new CLIngLaunchException( "Required options not satisfied", - CLIngErrors.ERROR_REQUIRED_OPTIONS_NOT_SATISFIED ); - } - - return cliInvocation; - } - - private Object instantiateMain( AppModel model, ClassRealm realm ) throws CLIngLaunchException - { - Class mainClass = null; - Logger logger = getLogger(); - - try - { - logger.debug( "Attempting to instantiate: " + model.getMain().getMainClass() ); - mainClass = realm.loadClass( model.getMain().getMainClass() ); - } - catch ( Throwable t ) - { - throw new CLIngLaunchException( "Cannot find main-class", CLIngErrors.ERROR_MAIN_CLASS_NOT_FOUND, t ); - } - - Object main = null; - try - { - main = mainClass.newInstance(); - } - catch ( Throwable t ) - { - throw new CLIngLaunchException( "Cannot instantiate main-class", - CLIngErrors.ERROR_MAIN_CLASS_NOT_INSTANTIABLE, t ); - } - - return main; - } - - private AppModel parseAppXml( String basedir, CLIngConfiguration config ) throws CLIngLaunchException - { - MarmaladeParsingContext parsingContext = initParsingContext( basedir ); - - MarmaladeScript script = buildScript( parsingContext ); - - AppModel model = executeScript( script, config ); - - return model; - } - - private AppModel executeScript( MarmaladeScript script, CLIngConfiguration config ) throws CLIngLaunchException - { - MarmaladeTag root = script.getRoot(); - - if ( !(root instanceof AppTag) ) - { - throw new CLIngLaunchException( "Invalid application descriptor (must begin with application tag)", - CLIngErrors.ERROR_VALIDATING_APPXML ); - } - - MarmaladeExecutionContext context = new DefaultContext(); - context.setVariable( CLIngConstants.CLING_CONFIG_CONTEXT_KEY, config ); - - try - { - script.execute( context ); - } - catch ( MarmaladeExecutionException e ) - { - throw new CLIngLaunchException( "Cannot build application model from descriptor", - CLIngErrors.ERROR_BUILDING_APPMODEL_FROM_APPXML, e ); - } - - AppModel model = ((AppTag) root).getAppModel(); - - return model; - } - - private MarmaladeScript buildScript( MarmaladeParsingContext parsingContext ) throws CLIngLaunchException - { - ScriptParser parser = new ScriptParser(); - - ScriptBuilder builder = null; - try - { - builder = parser.parse( parsingContext ); - } - catch ( MarmaladeParsetimeException e ) - { - throw new CLIngLaunchException( "Cannot parse application descriptor", CLIngErrors.ERROR_PARSING_APPXML, e ); - } - - MarmaladeScript script = null; - try - { - script = builder.build(); - } - catch ( ModelBuilderException e ) - { - throw new CLIngLaunchException( "Cannot build application descriptor script from metamodel", - CLIngErrors.ERROR_BUILDING_APPXML, e ); - } - - return script; - } - - private MarmaladeParsingContext initParsingContext( String basedir ) throws CLIngLaunchException - { - File base = new File( basedir ); - - String appXmlName = System.getProperty( CLIngConstants.APPXML_SYSPROP, CLIngConstants.DEFAULT_APPXML_VALUE ); - File appXml = new File( base, appXmlName ); - - BufferedReader reader; - try - { - reader = new BufferedReader( new FileReader( appXml ) ); - } - catch ( FileNotFoundException e ) - { - throw new CLIngLaunchException( "Cannot open application descriptor", CLIngErrors.ERROR_OPENING_APPXML, e ); - } - - MarmaladeParsingContext parsingContext = new DefaultParsingContext(); - parsingContext.setDefaultExpressionEvaluator( new PathSafeOgnlExpressionEvaluator() ); - parsingContext.setInput( reader ); - parsingContext.setDefaultTagLibrary( new AppTagLibrary() ); - - try - { - parsingContext.setInputLocation( appXml.getCanonicalPath() ); - } - catch ( IOException e ) - { - throw new CLIngLaunchException( "Cannot retrieve application descriptor's canonical path", - CLIngErrors.ERROR_RETRIEVING_APPXML_CANONICAL_PATH, e ); - } - - return parsingContext; - } - - public static void main( String[] args, ClassWorld world ) - { - String resultProp = System.getProperty( CLIngConstants.APP_RESULT_SYSPROP ); - - Embedder embedder = new Embedder(); - try - { - embedder.start( world ); - } - catch ( Exception e ) - { - System.out.println( "Cannot start embedded plexus container" ); - e.printStackTrace( System.err ); - - System.exit( CLIngErrors.ERROR_STARTING_EMBEDDER ); - } - - Launcher launcher = null; - try - { - launcher = (Launcher) embedder.lookup( ROLE ); - } - catch ( ComponentLookupException e ) - { - System.out.println( "Cannot lookup container-managed launcher" ); - e.printStackTrace( System.err ); - - System.exit( CLIngErrors.ERROR_LOOKING_UP_LAUNCHER ); - } - - int result; - try - { - result = launcher.execute( args ); - } - catch ( CLIngLaunchException e ) - { - System.out.println( e.getLocalizedMessage() ); - e.printStackTrace( System.err ); - - result = e.getErrorCode(); - } - catch ( Throwable t ) - { - System.out.println( t.getLocalizedMessage() ); - t.printStackTrace( System.err ); - - if ( t instanceof RuntimeException ) - { - throw (RuntimeException) t; - } - else - { - result = CLIngErrors.UNHANDLED_EXCEPTION; - } - } - - if ( resultProp == null || resultProp.length() < 1 ) - { - // [[10]] Call System.exit(x) where is the result from [9]. - // - System.exit( result ); - } - else - { - System.setProperty( resultProp, Integer.toString( result ) ); - } - } - - public void contextualize( Context context ) throws Exception - { - this.containerRealm = (ClassRealm) context.get( PlexusConstants.PLEXUS_CORE_REALM ); - } - -} \ No newline at end of file diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/AbstractArgOption.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/AbstractArgOption.java deleted file mode 100644 index 170d11f1d..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/AbstractArgOption.java +++ /dev/null @@ -1,81 +0,0 @@ -package org.codehaus.plexus.cling.cli; - -/** Represents a command line non-argument option that (a) accepts exactly one - * argument to itself, and (b) is required for a valid command line. - * - * @author John Casey - */ -public abstract class AbstractArgOption extends AbstractOption { - - private OptionFormat format; - private Object value; - - /** Creates new AbstractArgOption - * @param shortName The single-character short name for this option. - * @param longNmae The verbose, long name for this option. - * @param format The OptionFormat used in validating and translating the option's value. - * @param description The description of what purpose this option serves to the command line. - */ - protected AbstractArgOption(boolean required, Character shortName, String longName, OptionFormat format, String description, String objectProperty) { - super(required, shortName, longName, description, objectProperty); - this.format = format; - } - - /** Return whether this option has had a value set on it. - * - * @return true if this option contains a value, else false. - */ - public boolean hasValue() { - return value != null; - } - - /** Return the value of this option. - * - * @return the value. - */ - public Object getValue() { - return value; - } - - /** retrieve the option format used in this option. - * - * @return the format for a single value of this option. NOTE: If this - * option allows multiple values, then each single item in the list will - * be validated/formatted by this format. - */ - protected final OptionFormat getFormat(){ - return format; - } - - /** Sets (after validating) the value specified on this option. - * - * @param the value to validate and then set on this option. - */ - public void setValue(String value) { - if(format.isValid(value)){ - this.value = format.getValue(value); - } - } - - public boolean isValueValid(String value){ - return format.isValid(value); - } - - /** Return a whether or not this option is satisfied. In order to be satisfied, - * a valid value has to have been set on it. - * - * @return true if value != null, else false. - */ - public boolean isSatisfied() { - return !isRequired() || value != null; - } - - /** Return true: all Arg implementations should... - * - * @return true. - */ - public boolean requiresValue(){ - return true; - } - -} \ No newline at end of file diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/AbstractOption.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/AbstractOption.java deleted file mode 100644 index 92d1f31a1..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/AbstractOption.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - - Copyright (c) 2002 John Casey. All rights reserved. - - SEE licenses/cj-license.txt FOR MORE INFORMATION. - - */ - -/* - * AbstractOption.java - * - * Created on November 19, 2001, 4:38 PM - */ - -package org.codehaus.plexus.cling.cli; - -import java.util.StringTokenizer; - -/** - * @author John Casey - * @version - */ -public abstract class AbstractOption - implements Option -{ - - private static final int FIRST_COL_WIDTH = 35; - - private static final int SECOND_COL_WIDTH = 45; - - private String description; - - private String longName; - - private Character shortName; - - private final boolean required; - - private final String objectProperty; - - /** Creates new AbstractOption */ - public AbstractOption( boolean required, Character shortName, String longName, String description, String objectProperty ) - { - this.required = required; - this.shortName = shortName; - this.longName = longName; - this.description = description; - this.objectProperty = objectProperty; - } - - public Character getShortName() - { - return shortName; - } - - public String getObjectProperty() { - return objectProperty; - } - - public String getLongName() - { - return longName; - } - - public boolean isRequired() - { - return required; - } - - public abstract boolean isSatisfied(); - - public abstract boolean requiresValue(); - - public String getUsage() - { - StringBuffer sb = new StringBuffer( 30 ); - sb.append( " " ); - - int lineLen = 0; - if ( longName != null ) - { - sb.append( "--" ); - sb.append( longName ); - if ( requiresValue() ) - { - sb.append( "=" ); - } - - if ( !isRequired() ) - { - sb.append( " [OPT]" ); - } - - lineLen = sb.length(); - } - - if ( shortName.charValue() != '\00' ) - { - StringBuffer buf = new StringBuffer(); - if ( longName != null ) - { - sb.append( "\n" ); - buf.append( " " ); - } - - buf.append( "-" ); - buf.append( shortName ); - if ( requiresValue() ) - { - buf.append( " " ); - } - lineLen = buf.length(); - - sb.append( buf.toString() ); - } - - int padding = FIRST_COL_WIDTH - lineLen; - if ( padding > 0 ) - { - for ( int i = 0; i < padding; i++ ) - { - sb.append( ' ' ); - } - } - - if ( description.length() + 5 > SECOND_COL_WIDTH ) - { - StringBuffer tmp = new StringBuffer( FIRST_COL_WIDTH + 2 ); - tmp.append( " " ); - for ( int i = 0; i < FIRST_COL_WIDTH; i++ ) - { - tmp.append( " " ); - } - String offset = tmp.toString(); - - StringBuffer descBuf = new StringBuffer( description.length() ); - StringTokenizer tokens = new StringTokenizer( description, " \n", true ); - - int currentLineLen = 0; - while ( tokens.hasMoreTokens() ) - { - String token = tokens.nextToken(); - if ( token.startsWith( "\n" ) - || ((descBuf.length() + token.length() - currentLineLen) > SECOND_COL_WIDTH) ) - { - descBuf.append( "\n" ); - descBuf.append( offset ); - currentLineLen = descBuf.length(); - descBuf.append( token.trim() ); - } - else - { - descBuf.append( token ); - } - - } - - sb.append( descBuf.toString() ); - } - else - { - sb.append( description ); - } - - return sb.toString(); - } - - public boolean equals( Object obj ) - { - if ( !(obj instanceof AbstractOption) ) - { - return false; - } - - AbstractOption opt = (AbstractOption) obj; - boolean result = ((shortName == opt.shortName) && (longName.equals( opt.longName ))); - - return result; - } - - public int hashCode() - { - int result = 19; - - result += shortName.hashCode(); - result *= longName.hashCode(); - - return result; - } - -} \ No newline at end of file diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/Invocation.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/Invocation.java deleted file mode 100644 index c0a8a3368..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/Invocation.java +++ /dev/null @@ -1,294 +0,0 @@ -package org.codehaus.plexus.cling.cli; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.TreeMap; - -/** - * @author John Casey - * @version - */ -public class Invocation -{ - - private Set templates = new HashSet(); - - private List arguments; - - private String description; - - private String argDescription; - - private InvocationTemplate bestMatch; - - private int bestScore = -1; - - /** Creates new Invocation */ - public Invocation( String description, String argDescription ) - { - this.description = description; - this.argDescription = argDescription; - } - - public Invocation( String description ) - { - this.description = description; - } - - public Map getOptionPropertyMappings() { - return bestMatch.getOptionPropertyMappings(); - } - - public boolean matchesTemplate( InvocationTemplate template ) - { - return bestMatch.equals( template ); - } - - public void addInvocationTemplate( InvocationTemplate template ) - { - templates.add( template ); - } - - public void removeInvocationTemplate( InvocationTemplate template ) - { - templates.remove( template ); - } - - public void parseArgs( String[] args ) throws InvocationException - { - if(templates.isEmpty()) { - throw new IllegalStateException("at least one invocation template is required for parseArgs"); - } - else { - bestMatch = null; - - LinkedList argsList = new LinkedList(Arrays.asList(args)); - ArrayList nonOptions = new ArrayList(); - Map vals = new HashMap(); - while(!argsList.isEmpty()) - { - String arg = (String)argsList.getFirst(); - if ( arg.startsWith( "--" ) ) - { - processAsLongName(vals, argsList); - } - else if ( arg.charAt( 0 ) == '-' ) - { - processAsShortNameCollection(vals, argsList); - } - else - { - nonOptions.add( arg ); - argsList.removeFirst(); - } - } - - this.arguments = Collections.unmodifiableList(nonOptions); - - bestScore = Integer.MAX_VALUE; - for ( Iterator it = templates.iterator(); it.hasNext(); ) - { - InvocationTemplate templ = (InvocationTemplate) it.next(); - int score = templ.scoreRequirements( vals ); - if ( score < bestScore ) - { - bestScore = score; - bestMatch = templ; - } - } - - bestMatch.setValues( vals ); - } - } - - private void processAsShortNameCollection( Map vals, LinkedList argsList ) - { - String arg = (String)argsList.removeFirst(); - - char[] args = arg.toCharArray(); - int argLen = args.length; - - String nextArg = (String)argsList.getFirst(); - boolean usedNextArg = false; - - if(argLen == 1) { - throw new IllegalArgumentException("\'-\' is not a valid argument."); - } - else if(argLen == 2) { - Character argC = new Character(args[1]); - String value = null; - - if(!nextArg.startsWith("-")) { - value = nextArg; - usedNextArg = true; - } - - vals.put(argC, value); - } - else { - for ( int i = 1; i < args.length; i++ ) - { - char c = args[i]; - Character argC = new Character(c); - - String value = null; - if(i+2 > args.length) { - if(!nextArg.startsWith("-")) { - value = nextArg; - usedNextArg = true; - } - } - - vals.put(argC, value); - } - } - - if(usedNextArg) { - argsList.removeFirst(); - } - } - - private void processAsLongName( Map vals, LinkedList argsList ) - { - String arg = (String)argsList.removeFirst(); - - String key = arg.substring(2); - - int eqPos = arg.indexOf( '=' ); - - Object value = null; - if(eqPos > 0) { - key = arg.substring(2, eqPos); - - value = arg.substring(eqPos+1); - } - - if(value == null) { - value = Boolean.TRUE; - } - - vals.put( key, value ); - } - - public List getArguments() - { - return arguments; - } - - public int getArgumentCount() - { - return arguments.size(); - } - - public Option getOption( String longName ) - { - return bestMatch.getOption( longName ); - } - - public Option getOption( Character shortName ) - { - return bestMatch.getOption( shortName ); - } - - public boolean isSatisfied() - { - return bestScore == 0; - } - - public Set getUnsatisfiedOptions() - { - return bestMatch.getUnsatisfiedOptions(); - } - - public String getDescription( String zeroArg ) - { - return _getDescription( bestMatch, zeroArg, new StringBuffer() ).toString(); - } - - public String getAllDescriptions( String zeroArg ) - { - StringBuffer buffer = new StringBuffer(); - for ( Iterator it = templates.iterator(); it.hasNext(); ) - { - InvocationTemplate template = (InvocationTemplate) it.next(); - buffer = _getDescription( template, zeroArg, buffer ); - buffer.append( "\n\n" ); - } - - return buffer.toString(); - } - - private StringBuffer _getDescription( InvocationTemplate template, String zeroArg, StringBuffer buffer ) - { - if ( zeroArg != null ) - { - if ( description != null ) - { - buffer.append( "\n" ); - buffer.append( zeroArg ); - buffer.append( " -\t" ); - buffer.append( description ); - buffer.append( "\n\n" ); - } - } - - return buffer; - } - - public String getUsage( String zeroArg ) - { - return _getUsage( bestMatch, zeroArg, new StringBuffer() ).toString(); - } - - public String getAllUsages( String zeroArg ) - { - StringBuffer buffer = new StringBuffer(); - for ( Iterator it = templates.iterator(); it.hasNext(); ) - { - InvocationTemplate template = (InvocationTemplate) it.next(); - buffer = _getUsage( template, zeroArg, buffer ); - if ( it.hasNext() ) - { - buffer.append( "**************************************\n" ); - } - } - - return buffer.toString(); - } - - private StringBuffer _getUsage( InvocationTemplate template, String zeroArg, StringBuffer buffer ) - { - if ( zeroArg != null ) - { - buffer = _getDescription( template, zeroArg, buffer ); - buffer.append( "Usage:\n\t" ); - buffer.append( zeroArg ); - buffer.append( template.getShortTemplateUsage() ); - - if ( argDescription != null ) - { - buffer.append( " " ); - buffer.append( argDescription ); - } - - buffer.append( "\n" ); - } - - buffer.append( template.getTemplateUsage() ); - - return buffer; - } - - public void setInvocationTemplates( Set invocationTemplates ) - { - this.templates = invocationTemplates; - } -} \ No newline at end of file diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/InvocationException.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/InvocationException.java deleted file mode 100644 index 667899048..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/InvocationException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Created on Sep 14, 2004 */ -package org.codehaus.plexus.cling.cli; - -/** - * @author jdcasey - */ -public class InvocationException - extends Exception -{ - - public InvocationException( String message ) - { - super( message ); - } - - public InvocationException( String message, Throwable cause ) - { - super( message, cause ); - } - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/InvocationTemplate.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/InvocationTemplate.java deleted file mode 100644 index 5587b94e6..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/InvocationTemplate.java +++ /dev/null @@ -1,320 +0,0 @@ -package org.codehaus.plexus.cling.cli; - -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.TreeMap; - -/** - * Map of command line options, keyed both by short name and long name. - * - * @author John Casey - */ -public class InvocationTemplate -{ - - private HashMap options; - - private Set optionsList; - - private boolean hasRequiredOptions; - - /** - * Creates new InvocationTemplate - * - * @param optionsList - * The array of Option objects to map here. - */ - public InvocationTemplate( Set optionsList ) - { - this.optionsList = optionsList; - - options = new HashMap(); - for ( Iterator it = optionsList.iterator(); it.hasNext(); ) - { - Option option = (Option) it.next(); - - if ( option.isRequired() ) - { - hasRequiredOptions = true; - } - - Character ch = option.getShortName(); - if ( ch != null ) - { - options.put( ch, option ); - } - - String str = option.getLongName(); - if ( str != null ) - { - options.put( str, option ); - } - } - } - - /** - * Return whether this map contains any Option objects that are required. - * - * @return true if one or more of the contained Option's are required, else - * false. - */ - public boolean hasRequiredOptions() - { - return hasRequiredOptions; - } - - /** - * Return whether this map's required Option's are all satisfied, if there - * are any. - * - * @return true if the map either has no required Option's, or those - * required Option's are satisfied, else false. - */ - public boolean isSatisfied() - { - for ( Iterator it = options.values().iterator(); it.hasNext(); ) - { - if ( !((Option) it.next()).isSatisfied() ) - { - return false; - } - } - return true; - } - - /** - * Return the number of Option instances included in this map. - * - * @return the size. - */ - public int size() - { - return optionsList.size(); - } - - /** - * Return the Option object keyed by the specified single-character option - * name. - * - * @param ch - * The single-character short name of the option to lookup. - * @return the corresponding Option object, or null if none match. - */ - public Option getOption( Character ch ) - { - return (Option) options.get( ch ); - } - - /** - * Return the Option object keyed by the specified verbose option name. - * - * @param str - * The verbose, long name of the option to lookup. - * @return the corresponding Option object, or null if none match. - */ - public Option getOption( String str ) - { - return (Option) options.get( str ); - } - -// /** -// * Return an array of all Option objects contained within this map. NOTE: -// * Each option is only represented once within the array, even though it is -// * keyed twice within the actual map. -// * -// * @return the array of options. -// */ -// public Option[] getOptions() -// { -// HashSet set = new HashSet(); -// set.addAll( options.values() ); -// -// return (Option[]) set.toArray( new Option[set.size()] ); -// } - - /** - * Return the array of Option objects that are required and still unset. - * - * @return The array of unsatisfied options. - */ - public Set getUnsatisfiedOptions() - { - Set unsat = new HashSet(); - for ( Iterator it = options.values().iterator(); it.hasNext(); ) - { - Option opt = (Option) it.next(); - - if ( unsat.contains( opt ) ) - { - continue; - } - else if ( !opt.isSatisfied() ) - { - unsat.add( opt ); - } - } - - return Collections.unmodifiableSet(unsat); - } - - public void setValues( Map vals ) - { - for ( Iterator it = vals.entrySet().iterator(); it.hasNext(); ) - { - Map.Entry entry = (Map.Entry) it.next(); - Object key = entry.getKey(); - - Option option = (Option) options.get( entry.getKey() ); - - if ( option == null ) - { - throw new IllegalStateException( "illegal invocation option detected in template" ); - } - - if ( option instanceof AbstractArgOption ) - { - ((AbstractArgOption) option).setValue( (String) entry.getValue() ); - } - else - { - ((NoArgOption) option).set(); - } - } - } - - public int scoreRequirements( Map vals ) - { - int score = 0; - for ( Iterator it = optionsList.iterator(); it.hasNext(); ) - { - Option option = (Option) it.next(); - String optionName = option.getLongName(); - Character optionChar = option.getShortName(); - - if ( option.isRequired() && !vals.containsKey( optionName ) && !vals.containsKey( optionChar ) ) - { - score++; - } - } - - return score; - } - - /** - * Return a string describing the proper usage clause for the options - * specified in this template. - * - * @return the usage phrase for this template's options - */ - public String getShortTemplateUsage() - { - StringBuffer sb = new StringBuffer( 200 ); - - if ( !optionsList.isEmpty() ) - { - sb.append( " " ); - sb.append( "" ); - } - - return sb.toString(); - } - - /** - * Return a string describing the proper usage clause for the options - * specified in this template. - * - * @return the usage phrase for this template's options - */ - public String getTemplateUsage() - { - StringBuffer sb = new StringBuffer( 200 ); - - sb.append( "Parameters:\n---------------\n\n" ); - - for ( Iterator it = optionsList.iterator(); it.hasNext(); ) - { - Option option = (Option) it.next(); - sb.append( option.getUsage() ); - sb.append( "\n\n" ); - } - - return sb.toString(); - } - - public boolean equals( Object obj ) - { - if ( obj instanceof InvocationTemplate ) - { - Set others = ((InvocationTemplate) obj).optionsList; - - if ( optionsList.isEmpty() && others.isEmpty() ) - { - return true; - } - else - { - for ( Iterator it = optionsList.iterator(); it.hasNext(); ) - { - Option option = (Option) it.next(); - if ( !others.contains( option ) ) - { - return false; - } - } - - return true; - } - } - else - { - return false; - } - } - - public int hashCode() - { - int result = 17; - - if ( options != null ) - { - for ( Iterator it = optionsList.iterator(); it.hasNext(); ) - { - Option option = (Option) it.next(); - result *= option.hashCode(); - } - } - - return result; - } - - public Map getOptionPropertyMappings() - { - Map mappings = new TreeMap(); - - for ( Iterator it = optionsList.iterator(); it.hasNext(); ) - { - Option option = (Option) it.next(); - - Object value = null; - if(option instanceof NoArgOption) { - value = Boolean.valueOf(((NoArgOption)option).isSet()); - } - else { - value = ((AbstractArgOption)option).getValue(); - } - - if(value != null) { - mappings.put(option.getObjectProperty(), value); - } - } - - return mappings; - } - -} \ No newline at end of file diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/ListOptionFormat.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/ListOptionFormat.java deleted file mode 100644 index 1ffcaa7d7..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/ListOptionFormat.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Created on Apr 28, 2003 - */ -package org.codehaus.plexus.cling.cli; - -/** - * @author jdcasey - */ -public class ListOptionFormat - extends OptionFormat -{ - - private String splitPattern; - - private OptionFormat subFormat; - - /** - * @param description - * @param ordinal - */ - public ListOptionFormat( String splitPattern, OptionFormat subFormat ) - { - super( "List Format" ); - this.splitPattern = splitPattern; - this.subFormat = subFormat; - } - - /** - * Override of - * - * @see org.codehaus.plexus.cling.cli.OptionFormat#isValid(java.lang.String) - * @param value - * @return @see org.codehaus.plexus.cling.cli.OptionFormat#isValid(java.lang.String) - */ - public boolean isValid( String value ) - { - String[] values = value.split( splitPattern ); - for ( int i = 0; i < values.length; i++ ) - { - if ( !subFormat.isValid( values[i] ) ) - { - return false; - } - } - return true; - } - - /** - * Override of - * - * @see org.codehaus.plexus.cling.cli.OptionFormat#getValue(java.lang.String) - * @param value - * @return @see org.codehaus.plexus.cling.cli.OptionFormat#getValue(java.lang.String) - */ - public Object getValue( String value ) - { - String[] temp = value.split( splitPattern ); - Object[] values = new Object[temp.length]; - - for ( int i = 0; i < values.length; i++ ) - { - values[i] = subFormat.getValue( temp[i] ); - } - - return values; - } - -} \ No newline at end of file diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/MultiArgOption.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/MultiArgOption.java deleted file mode 100644 index 472da9e61..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/MultiArgOption.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.codehaus.plexus.cling.cli; - -/** - * @author John Casey - */ -public class MultiArgOption - extends AbstractArgOption -{ - - public MultiArgOption( boolean required, Character shortName, String longName, OptionFormat format, String splitPattern, - String description, String objectProperty ) - { - super( required, shortName, longName, new ListOptionFormat( splitPattern, format ), description, objectProperty ); - } - - public Object[] getValues() - { - return (Object[]) getValue(); - } - -} \ No newline at end of file diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/NoArgOption.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/NoArgOption.java deleted file mode 100644 index 5de42e037..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/NoArgOption.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.codehaus.plexus.cling.cli; - -/** - * @author John Casey - */ -public class NoArgOption - extends AbstractOption -{ - - private boolean set = false; - - /** Creates new NoArgOption */ - public NoArgOption( boolean required, Character shortName, String longName, String description, String objectProperty ) - { - super(required, shortName, longName, description, objectProperty); - } - - public boolean isSet() - { - return set; - } - - public void set() - { - set = true; - } - - public boolean isSatisfied() - { - return set || !isRequired(); - } - - public boolean requiresValue() - { - return false; - } - -} \ No newline at end of file diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/Option.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/Option.java deleted file mode 100644 index 6d44cde02..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/Option.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.codehaus.plexus.cling.cli; - -/** - * @author John Casey - * @version - */ -public interface Option -{ - - public static final char EMPTY_SHORT_NAME = '\00'; - - public static final String EMPTY_LONG_NAME = null; - - public boolean isRequired(); - - public Character getShortName(); - - public String getLongName(); - - public String getObjectProperty(); - - public boolean requiresValue(); - - public String getUsage(); - - public boolean isSatisfied(); - -} \ No newline at end of file diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/OptionFormat.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/OptionFormat.java deleted file mode 100644 index 316dc1f24..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/OptionFormat.java +++ /dev/null @@ -1,409 +0,0 @@ -package org.codehaus.plexus.cling.cli; - -import java.io.File; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.List; - -/** - * typesafe enumeration class that contains several implementations of itself, - * which each represent a different validation rule for a command line option, - * and each translate the supplied string value into the appropriate object type - * for this option type. - * - * @author John Casey - */ -public abstract class OptionFormat -{ - - private static int indexCounter = 0; - - private String description; - - private int ordinal; - - /** - * Create a new OptionFormat. - * - * @param description - * The description for this option type. - * @param ordinal - * The internal index of the option type. - */ - protected OptionFormat( String description ) - { - this.ordinal = indexCounter++; - this.description = description; - } - - /* - * override these methods to produce a valid, functioning formatter. - * -------- - */ - - /** - * Returns whether the supplied command line value is valid in accordance - * with this option type. - * - * @param value - * The value to validate. - * @return true if the value obeys this type's validation rules, else false. - */ - public abstract boolean isValid( String value ); - - /** - * Return the value from the command line, translated by this option type - * formatter. - * - * @param value - * The command line value to translate. - * @return the translated object derived from the command line value string. - */ - public abstract Object getValue( String value ); - - /** - * Return the description of this option format. - * - * @return the description. - */ - public String getDescription() - { - return description; - } - - /** - * Return the internal index of this option format. - * - * @return the internal index. - */ - public int getOrdinal() - { - return ordinal; - } - - /** - * Lookup the OptionFormat instance corresponding to the specified internal - * index. - * - * @param ordinal - * The internal index to lookup. - * @return the corresponding OptionFormat instance, or null if no match - * found. - */ - public static OptionFormat valueOf( int ordinal ) - { - if ( ordinal < 0 || ordinal >= FORMATS.length ) - { - return null; - } - else - { - return FORMATS[ordinal]; - } - } - - /** - * Lookup the OptionFormat instance corresponding to the specified - * description. - * - * @param description - * The description to lookup. - * @return the corresponding OptionFormat instance, or null if no match - * found. - */ - public static OptionFormat valueOf( String description ) - { - for ( int i = 0, len = FORMATS.length; i < len; i++ ) - { - if ( FORMATS[i].description.equals( description ) ) - { - return FORMATS[i]; - } - } - return null; - } - - /** - * Return a debug-appropriate string representation of this OptionFormat - * instance. - * - * @return the representation. - */ - public String toString() - { - return "OptionFormat: " + description + "[ordinal=" + ordinal + "]"; - } - - /** - * Perform an inline replacement of one OptionFormat instance for another in - * the case of a deserialization event from java.io.ObjectInputStream. This - * allows us to keep only one instance of a particular OptionFormat type, - * even when the OptionFormat instance is read from a stream. - * - * @return The replacement OptionFormat for the object "this" - */ - private Object readResolve() - { - return valueOf( ordinal ); - } - - /** - * Validation format for command line parameters of type String. This is - * really pretty trivial, but provided for completeness. - */ - public static final OptionFormat STRING_FORMAT = new OptionFormat( "String Format" ) { - public boolean isValid( String value ) - { - return true; - } - - public Object getValue( String value ) - { - return value; - } - }; - - /** - * Validation format for command line parameters of a numeric type. - * Translations here are to java.lang.Long. - */ - public static final OptionFormat NUMBER_FORMAT = new OptionFormat( "Number Format" ) { - public boolean isValid( String value ) - { - for ( int i = 0, len = value.length(); i < len; i++ ) - { - if ( !Character.isDigit( value.charAt( i ) ) ) - { - return false; - } - } - return true; - } - - public Object getValue( String value ) - { - return new Long( value ); - } - }; - - /** - * Validation format for command line parameters of a numeric type with the - * possibility of having fractional values (digits after the decimal point). - * Translations here are to java.lang.Double. - */ - public static final OptionFormat FRACTIONAL_NUMBER_FORMAT = new OptionFormat( "Fractional Number Format" ) { - public boolean isValid( String value ) - { - for ( int i = 0, len = value.length(); i < len; i++ ) - { - char val = value.charAt( i ); - if ( !Character.isDigit( val ) && val != '.' ) - { - return false; - } - } - return true; - } - - public Object getValue( String value ) - { - return new Double( value ); - } - }; - - /** - * Validation format for command line parameters of a boolean type. This - * implementation uses string comparison to resolve whether or not the - * parameter is valid.
- * Valid true values are:
- *

    - *
  • true
  • - *
  • on
  • - *
  • yes
  • - *
  • +
  • - *
- *
- * Valid false values are:
- *
    - *
  • false
  • - *
  • off
  • - *
  • no
  • - *
  • -
  • - *
- *
- * NOTE: comparisons are NOT case-sensitive. - */ - public static final OptionFormat BOOLEAN_FORMAT = new OptionFormat( "Boolean Format" ) { - public boolean isValid( String value ) - { - return Boolean.valueOf( value ) != null; - } - - public Object getValue( String value ) - { - return Boolean.valueOf( value ); - } - }; - - private static final SimpleDateFormat dateFormatMMDDYYYY = new SimpleDateFormat( "MM/dd/yyyy" ); - - /** Validation format for date strings of the form MM/dd/yyyy */ - public static final OptionFormat DATE_FORMAT_MM_dd_yyyy = new OptionFormat( "Date Format (MM/dd/yyyy)" ) { - public boolean isValid( String value ) - { - try - { - dateFormatMMDDYYYY.parse( value ); - return true; - } - catch ( ParseException e ) - { - return false; - } - } - - public Object getValue( String value ) - { - try - { - return dateFormatMMDDYYYY.parse( value ); - } - catch ( ParseException e ) - { - throw new IllegalArgumentException( "invalid date for format: MM/dd/yyyy" ); - } - } - }; - - private static final SimpleDateFormat dateFormatYYYYMMDDKKMMSS = new SimpleDateFormat( "yyyy-MM-dd kk:mm:ss" ); - - /** - * Validation format for date/time strings of the form yyyy-MM-dd kk:mm:ss - * (Standard SQL format). - */ - public static final OptionFormat DATE_FORMAT_yyyy_MM_dd_kk_mm_ss = new OptionFormat( - "Date Format (yyyy-MM-dd kk:mm:ss)" ) { - public boolean isValid( String value ) - { - try - { - dateFormatYYYYMMDDKKMMSS.parse( value ); - return true; - } - catch ( ParseException e ) - { - return false; - } - } - - public Object getValue( String value ) - { - try - { - return dateFormatYYYYMMDDKKMMSS.parse( value ); - } - catch ( ParseException e ) - { - e.printStackTrace(); - throw new IllegalArgumentException( "invalid date for format: yyyy-MM-dd hh:mm:ss" ); - } - } - }; - - /** - * Validation format for command line parameters representing a file. The - * isValid() method returns a trivial true value, without really checking - * anything. This is because the file may not yet exist, and yet may be a - * valid name. The current java.io package doesn't allow for checks against - * the validity of a filename without opening a stream and catching the - * IOException. The return type for the getValue() method is actually - * java.io.File. - */ - public static final OptionFormat FILE_FORMAT = new OptionFormat( "File Format" ) { - public boolean isValid( String value ) - { - return true; - } - - public Object getValue( String value ) - { - return new java.io.File( value ); - } - }; - - /** - * Validation format for command line parameters representing a directory. - * The isValid() method returns true if the dir doesn't yet exist, or if it - * does, if the dir is actually a directory, not a regular file. The return - * type for the getValue() method is actually java.io.File. - */ - public static final OptionFormat DIR_FORMAT = new OptionFormat( "Directory Format" ) { - public boolean isValid( String value ) - { - File f = new File( value ); - return !f.exists() || f.isDirectory(); - } - - public Object getValue( String value ) - { - return new java.io.File( value ); - } - }; - - /** - * Validation format for command line parameters representing a java - * package. The isValid() method checks the input against a regular - * expression for validity. - */ - public static final OptionFormat JAVA_PACKAGE_FORMAT = new OptionFormat( "Java Package Format" ) { - private static final String PATTERN = "([a-z]+\\.?)+"; - - public boolean isValid( String value ) - { - return value.matches( PATTERN ); - } - - public Object getValue( String value ) - { - return value; - } - }; - - /** - * Validation format for command line parameters representing a java - * package. The isValid() method checks the input against a regular - * expression for validity. - */ - public static final OptionFormat JAVA_CLASS_FORMAT = new OptionFormat( "Java Class Format" ) { - public boolean isValid( String value ) - { - try - { - Class.forName( value ); - return true; - } - catch ( ClassNotFoundException ex ) - { - return false; - } - } - - public Object getValue( String value ) - { - try - { - return Class.forName( value ); - } - catch ( ClassNotFoundException e ) - { - return null; - } - } - }; - - private static final OptionFormat[] FORMATS = { STRING_FORMAT, NUMBER_FORMAT, FRACTIONAL_NUMBER_FORMAT, - BOOLEAN_FORMAT, DATE_FORMAT_MM_dd_yyyy, DATE_FORMAT_yyyy_MM_dd_kk_mm_ss, FILE_FORMAT, DIR_FORMAT, - JAVA_PACKAGE_FORMAT, JAVA_CLASS_FORMAT }; - -} \ No newline at end of file diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/SingleArgOption.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/SingleArgOption.java deleted file mode 100644 index b654279b1..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/cli/SingleArgOption.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.codehaus.plexus.cling.cli; - -/** Represents a command line non-argument option that (a) accepts exactly one - * argument to itself, and (b) is not required for a valid command line. - * - * @author John Casey - */ -public class SingleArgOption extends AbstractArgOption{ - - /** Creates new SingleArgOption - * @param shortName The single-character short name for this option. - * @param longNmae The verbose, long name for this option. - * @param format The OptionFormat used in validating and translating the option's value. - * @param description The description of what purpose this option serves to the command line. - */ - public SingleArgOption(boolean required, Character shortName, String longName, OptionFormat format, String description, String objectProperty) { - super(required, shortName, longName, format, description, objectProperty); - } - -} \ No newline at end of file diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/configuration/AbstractCLIngConfiguration.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/configuration/AbstractCLIngConfiguration.java deleted file mode 100644 index c6be36a30..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/configuration/AbstractCLIngConfiguration.java +++ /dev/null @@ -1,51 +0,0 @@ -/* Created on Sep 15, 2004 */ -package org.codehaus.plexus.cling.configuration; - -import java.util.Set; - -import org.apache.maven.artifact.repository.ArtifactRepository; - -/** - * @author jdcasey - */ -public abstract class AbstractCLIngConfiguration - implements CLIngConfiguration -{ - - private ArtifactRepository localRepository; - private Set remoteRepositories; - - protected void setLocalRepository(ArtifactRepository localRepository) - { - this.localRepository = localRepository; - } - - public ArtifactRepository getLocalRepository() - { - return localRepository; - } - - protected void setRemoteRepositories(Set remoteRepositories) - { - this.remoteRepositories = remoteRepositories; - } - - public Set getRemoteRepositories() - { - return remoteRepositories; - } - - public void overrideWith( CLIngConfiguration otherConfig ) - { - ArtifactRepository otherLocal = otherConfig.getLocalRepository(); - if(otherLocal != null) { - this.localRepository = otherLocal; - } - - Set otherRemoteRepos = otherConfig.getRemoteRepositories(); - if(otherRemoteRepos != null && !otherRemoteRepos.isEmpty()) { - this.remoteRepositories = otherRemoteRepos; - } - } - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/configuration/CLIngConfiguration.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/configuration/CLIngConfiguration.java deleted file mode 100644 index 577a98e35..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/configuration/CLIngConfiguration.java +++ /dev/null @@ -1,20 +0,0 @@ -/* Created on Sep 15, 2004 */ -package org.codehaus.plexus.cling.configuration; - -import java.util.Set; - -import org.apache.maven.artifact.repository.ArtifactRepository; - -/** - * @author jdcasey - */ -public interface CLIngConfiguration -{ - - public ArtifactRepository getLocalRepository(); - - public Set getRemoteRepositories(); - - public void overrideWith(CLIngConfiguration otherConfig); - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/configuration/DefaultCLIngConfiguration.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/configuration/DefaultCLIngConfiguration.java deleted file mode 100644 index edb3647ec..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/configuration/DefaultCLIngConfiguration.java +++ /dev/null @@ -1,35 +0,0 @@ -/* Created on Sep 15, 2004 */ -package org.codehaus.plexus.cling.configuration; - -import java.io.File; -import java.net.MalformedURLException; -import java.util.HashSet; -import java.util.Set; - -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.logging.Logger; - -/** - * @author jdcasey - */ -public class DefaultCLIngConfiguration extends AbstractCLIngConfiguration - implements CLIngConfiguration -{ - - public DefaultCLIngConfiguration() throws MalformedURLException - { - String userHome = System.getProperty("user.home"); - File homeDir = new File(userHome); - File repoLocation = new File(homeDir, ".CLIng/repository"); - - setLocalRepository(new ArtifactRepository("local", "file://" + repoLocation.getAbsolutePath())); - - Set remoteRepositories = new HashSet(); - - remoteRepositories.add(new ArtifactRepository("remote-0", "http://repository.codehaus.org")); - - setRemoteRepositories(remoteRepositories); - } - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/configuration/SupplementaryCLIngConfiguration.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/configuration/SupplementaryCLIngConfiguration.java deleted file mode 100644 index 77d9222a7..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/configuration/SupplementaryCLIngConfiguration.java +++ /dev/null @@ -1,25 +0,0 @@ -/* Created on Sep 15, 2004 */ -package org.codehaus.plexus.cling.configuration; - -import java.util.Set; - -import org.apache.maven.artifact.repository.ArtifactRepository; - -/** - * @author jdcasey - */ -public class SupplementaryCLIngConfiguration extends AbstractCLIngConfiguration - implements CLIngConfiguration -{ - - public void setLocalRepository(ArtifactRepository localRepository) - { - super.setLocalRepository(localRepository); - } - - public void setRemoteRepositories(Set remoteRepositories) - { - super.setRemoteRepositories(remoteRepositories); - } - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/AppModel.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/AppModel.java deleted file mode 100644 index a61800c74..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/AppModel.java +++ /dev/null @@ -1,35 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.model; - -import java.util.Properties; - -/** - * @author jdcasey - */ -public interface AppModel -{ - - public Main getMain(); - - public void setMain( Main main ); - - public Properties getEnvironment(); - - public void setEnvironment( Properties environment ); - - public Classpath getClasspath(); - - public void setClasspath( Classpath classpath ); - - public LegalUsage getLegalUsage(); - - public void setLegalUsage(LegalUsage legalUsage); - - public void setApplicationDescription(String appDescription); - - public String getApplicationDescription(); - - public void setArgumentDescription(String argDescription); - - public String getArgumentDescription(); -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/Classpath.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/Classpath.java deleted file mode 100644 index f4c68253d..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/Classpath.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.model; - -import java.net.URL; -import java.util.List; - -/** - * @author jdcasey - */ -public interface Classpath -{ - - public List getEntries(); - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/ClasspathEntry.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/ClasspathEntry.java deleted file mode 100644 index b8185a986..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/ClasspathEntry.java +++ /dev/null @@ -1,14 +0,0 @@ -/* Created on Sep 15, 2004 */ -package org.codehaus.plexus.cling.model; - -import java.net.URL; - -/** - * @author jdcasey - */ -public interface ClasspathEntry -{ - - public URL getURL(); - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/DefaultApplication.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/DefaultApplication.java deleted file mode 100644 index 9cab2ea66..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/DefaultApplication.java +++ /dev/null @@ -1,88 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.model; - -import java.util.Properties; - - -/** - * @author jdcasey - */ -public class DefaultApplication - implements AppModel -{ - - private Main main; - private Properties environment; - private Classpath classpath; - private LegalUsage legalUsage; - private String argDescription; - private String appDescription; - - public DefaultApplication() - { - } - - public Main getMain() - { - return main; - } - - public void setMain( Main main ) - { - this.main = main; - } - - public Properties getEnvironment() - { - return environment; - } - - public void setEnvironment( Properties environment ) - { - Properties env = new Properties(); - env.putAll(environment); - - this.environment = env; - } - - public Classpath getClasspath() - { - return classpath; - } - - public void setClasspath( Classpath classpath ) - { - this.classpath = classpath; - } - - public LegalUsage getLegalUsage() - { - return legalUsage; - } - - public void setLegalUsage( LegalUsage legalUsage ) - { - this.legalUsage = legalUsage; - } - - public void setApplicationDescription( String appDescription ) - { - this.appDescription = appDescription; - } - - public String getApplicationDescription() - { - return appDescription; - } - - public void setArgumentDescription( String argDescription ) - { - this.argDescription = argDescription; - } - - public String getArgumentDescription() - { - return argDescription; - } - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/DefaultClasspath.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/DefaultClasspath.java deleted file mode 100644 index ae7d19a18..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/DefaultClasspath.java +++ /dev/null @@ -1,27 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.model; - -import java.net.URL; -import java.util.Collections; -import java.util.LinkedList; -import java.util.List; - -/** - * @author jdcasey - */ -public class DefaultClasspath - implements Classpath -{ - - private List entries = new LinkedList(); - - public void addEntry( ClasspathEntry entry ) - { - entries.add(entry); - } - - public List getEntries() { - return Collections.unmodifiableList(entries); - } - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/DefaultLegalUsage.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/DefaultLegalUsage.java deleted file mode 100644 index bad1bffed..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/DefaultLegalUsage.java +++ /dev/null @@ -1,28 +0,0 @@ -/* Created on Sep 14, 2004 */ -package org.codehaus.plexus.cling.model; - -import java.util.Collections; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Set; - -import org.codehaus.plexus.cling.cli.InvocationTemplate; - -/** - * @author jdcasey - */ -public class DefaultLegalUsage implements LegalUsage -{ - private Set invocationTemplates = new HashSet(); - - public Set getInvocationTemplates() - { - return Collections.unmodifiableSet(invocationTemplates); - } - - public void addInvocationTemplate(InvocationTemplate template) { - invocationTemplates.add(template); - } - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/DefaultMain.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/DefaultMain.java deleted file mode 100644 index d58999322..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/DefaultMain.java +++ /dev/null @@ -1,38 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.model; - -/** - * @author jdcasey - */ -public class DefaultMain - implements Main -{ - - private String mainMethod; - private String mainClass; - - public DefaultMain() - { - } - - public void setMainMethod(String mainMethod) - { - this.mainMethod = mainMethod; - } - - public void setMainClass(String mainClass) - { - this.mainClass = mainClass; - } - - public String getMainClass() - { - return mainClass; - } - - public String getMainMethod() - { - return mainMethod; - } - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/DependencyClasspathEntry.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/DependencyClasspathEntry.java deleted file mode 100644 index 2d765a7b2..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/DependencyClasspathEntry.java +++ /dev/null @@ -1,50 +0,0 @@ -/* Created on Sep 15, 2004 */ -package org.codehaus.plexus.cling.model; - -import java.net.MalformedURLException; -import java.net.URL; - -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.DefaultArtifact; -import org.apache.maven.artifact.resolver.ArtifactResolutionException; -import org.apache.maven.artifact.resolver.ArtifactResolver; -import org.codehaus.plexus.cling.configuration.CLIngConfiguration; - -/** - * @author jdcasey - */ -public class DependencyClasspathEntry - implements ClasspathEntry, ResolvedClasspathEntry -{ - private transient URL artifactUrl; - private final String version; - private final String artifactId; - private final String groupId; - - public DependencyClasspathEntry(String groupId, String artifactId, String version) - { - this.groupId = groupId; - this.artifactId = artifactId; - this.version = version; - } - - public void resolve(ArtifactResolver resolver, CLIngConfiguration config) - throws ArtifactResolutionException, MalformedURLException - { - Artifact dep = new DefaultArtifact(groupId, artifactId, version, "jar"); - dep = resolver.resolve(dep, config.getRemoteRepositories(), config.getLocalRepository()); - - this.artifactUrl = dep.getFile().toURL(); - } - - public URL getURL() - { - if(artifactUrl == null) { - throw new IllegalStateException("dependency has not yet been resolved"); - } - else { - return artifactUrl; - } - } - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/LegalUsage.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/LegalUsage.java deleted file mode 100644 index 1c42842b4..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/LegalUsage.java +++ /dev/null @@ -1,17 +0,0 @@ -/* Created on Sep 14, 2004 */ -package org.codehaus.plexus.cling.model; - -import java.util.List; -import java.util.Set; - -import org.codehaus.plexus.cling.cli.InvocationTemplate; - -/** - * @author jdcasey - */ -public interface LegalUsage -{ - - public Set getInvocationTemplates(); - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/LocalClasspathEntry.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/LocalClasspathEntry.java deleted file mode 100644 index 1b6a79f88..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/LocalClasspathEntry.java +++ /dev/null @@ -1,25 +0,0 @@ -/* Created on Sep 15, 2004 */ -package org.codehaus.plexus.cling.model; - -import java.net.URL; - -/** - * @author jdcasey - */ -public class LocalClasspathEntry - implements ClasspathEntry -{ - - private final URL url; - - public LocalClasspathEntry(URL url) - { - this.url = url; - } - - public URL getURL() - { - return url; - } - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/Main.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/Main.java deleted file mode 100644 index 54d3fb75b..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/Main.java +++ /dev/null @@ -1,13 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.model; - -/** - * @author jdcasey - */ -public interface Main -{ - - public String getMainClass(); - - public String getMainMethod(); -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/ResolvedClasspathEntry.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/ResolvedClasspathEntry.java deleted file mode 100644 index 3d361af87..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/model/ResolvedClasspathEntry.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Created on Sep 15, 2004 */ -package org.codehaus.plexus.cling.model; - -import java.net.MalformedURLException; - -import org.apache.maven.artifact.resolver.ArtifactResolutionException; -import org.apache.maven.artifact.resolver.ArtifactResolver; -import org.codehaus.plexus.cling.configuration.CLIngConfiguration; - -/** - * @author jdcasey - */ -public interface ResolvedClasspathEntry -{ - - public void resolve(ArtifactResolver resolver, CLIngConfiguration config) - throws ArtifactResolutionException, MalformedURLException; - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/AbstractBodyValueTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/AbstractBodyValueTag.java deleted file mode 100644 index 3f2a5501a..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/AbstractBodyValueTag.java +++ /dev/null @@ -1,24 +0,0 @@ -/* Created on Sep 16, 2004 */ -package org.codehaus.plexus.cling.tags; - -import org.codehaus.marmalade.el.ExpressionEvaluationException; -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; - -/** - * @author jdcasey - */ -public abstract class AbstractBodyValueTag - extends AbstractMarmaladeTag -{ - - protected boolean alwaysProcessChildren() - { - return false; - } - - protected boolean preserveBodyWhitespace( MarmaladeExecutionContext arg0 ) throws ExpressionEvaluationException - { - return false; - } -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/AppDescriptionTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/AppDescriptionTag.java deleted file mode 100644 index aacd2bac2..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/AppDescriptionTag.java +++ /dev/null @@ -1,26 +0,0 @@ -/* Created on Sep 16, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.tags.AbstractBodyValueTag; - -/** - * @author jdcasey - */ -public class AppDescriptionTag - extends AbstractBodyValueTag -{ - - protected void doExecute( MarmaladeExecutionContext context ) throws MarmaladeExecutionException - { - String description = (String)getBody(context, String.class); - if(description == null || description.length() < 1) { - throw new MarmaladeExecutionException("App description requires a value"); - } - - AppTag parent = (AppTag)requireParent(AppTag.class); - parent.setApplicationDescription(description); - } -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/AppTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/AppTag.java deleted file mode 100644 index 9a5874398..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/AppTag.java +++ /dev/null @@ -1,65 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import java.util.Properties; - -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.model.AppModel; -import org.codehaus.plexus.cling.model.Classpath; -import org.codehaus.plexus.cling.model.DefaultApplication; -import org.codehaus.plexus.cling.model.DefaultLegalUsage; -import org.codehaus.plexus.cling.model.LegalUsage; -import org.codehaus.plexus.cling.model.Main; - -/** - * @author jdcasey - */ -public class AppTag - extends AbstractMarmaladeTag -{ - - private AppModel app = new DefaultApplication(); - - protected void doExecute( MarmaladeExecutionContext context ) - throws MarmaladeExecutionException - { - } - - public AppModel getAppModel() - { - return app; - } - - public void setApplicationMain( Main main ) - { - app.setMain(main); - } - - public void setApplicationEnvironment( Properties environment ) - { - app.setEnvironment(environment); - } - - public void setClasspath( Classpath classpath ) - { - app.setClasspath(classpath); - } - - public void setApplicationLegalUsage( LegalUsage usage ) - { - app.setLegalUsage(usage); - } - - public void setApplicationDescription( String description ) - { - app.setApplicationDescription(description); - } - - public void setArgumentDescription( String description ) - { - app.setArgumentDescription(description); - } - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/AppTagLibrary.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/AppTagLibrary.java deleted file mode 100644 index 8ce650ac2..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/AppTagLibrary.java +++ /dev/null @@ -1,39 +0,0 @@ -/* Created on Sep 14, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import org.codehaus.marmalade.metamodel.AbstractMarmaladeTagLibrary; - -/** - * @author jdcasey - */ -public class AppTagLibrary extends AbstractMarmaladeTagLibrary -{ - - public AppTagLibrary() - { - registerTag("application", AppTag.class); - registerTag("applicationDescription", AppDescriptionTag.class); - registerTag("argumentDescription", ArgDescriptionTag.class); - registerTag("classpath", ClasspathTag.class); - registerTag("artifactId", DependencyArtifactTag.class); - registerTag("groupId", DependencyGroupTag.class); - registerTag("version", DependencyVersionTag.class); - registerTag("dependency", DependencyTag.class); - registerTag("environment", EnvironmentTag.class); - registerTag("legalUsage", LegalUsageTag.class); - registerTag("local", LocalClasspathEntryTag.class); - registerTag("mainClass", MainClassTag.class); - registerTag("mainMethod", MainMethodTag.class); - registerTag("main", MainTag.class); - registerTag("optionDescription", OptionDescriptionTag.class); - registerTag("optionLongName", OptionLongNameTag.class); - registerTag("optionMultiArg", OptionMultiArgTag.class); - registerTag("optionProperty", OptionPropertyTag.class); - registerTag("optionRequired", OptionRequiredTag.class); - registerTag("optionSet", OptionSetTag.class); - registerTag("optionShortName", OptionShortNameTag.class); - registerTag("option", OptionTag.class); - registerTag("optionType", OptionTypeTag.class); - } - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/ArgDescriptionTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/ArgDescriptionTag.java deleted file mode 100644 index 5c81bc0ee..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/ArgDescriptionTag.java +++ /dev/null @@ -1,26 +0,0 @@ -/* Created on Sep 16, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.tags.AbstractBodyValueTag; - -/** - * @author jdcasey - */ -public class ArgDescriptionTag - extends AbstractBodyValueTag -{ - - protected void doExecute( MarmaladeExecutionContext context ) throws MarmaladeExecutionException - { - String description = (String)getBody(context, String.class); - if(description == null || description.length() < 1) { - throw new MarmaladeExecutionException("App description requires a value"); - } - - AppTag parent = (AppTag)requireParent(AppTag.class); - parent.setArgumentDescription(description); - } -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/ClasspathTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/ClasspathTag.java deleted file mode 100644 index b9eeb4bd3..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/ClasspathTag.java +++ /dev/null @@ -1,37 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import java.net.URL; -import java.util.LinkedList; -import java.util.List; - -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.model.Classpath; -import org.codehaus.plexus.cling.model.ClasspathEntry; -import org.codehaus.plexus.cling.model.DefaultClasspath; - -/** - * @author jdcasey - */ -public class ClasspathTag - extends AbstractMarmaladeTag -{ - - private DefaultClasspath classpath = new DefaultClasspath(); - - protected void doExecute( MarmaladeExecutionContext context ) - throws MarmaladeExecutionException - { - processChildren(context); - - AppTag parent = (AppTag)requireParent(AppTag.class); - parent.setClasspath(classpath); - } - - public void addClasspathEntry(ClasspathEntry entry) { - classpath.addEntry(entry); - } - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/DependencyArtifactTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/DependencyArtifactTag.java deleted file mode 100644 index 77a5f71b6..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/DependencyArtifactTag.java +++ /dev/null @@ -1,28 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.tags.AbstractBodyValueTag; - -/** - * @author jdcasey - */ -public class DependencyArtifactTag - extends AbstractBodyValueTag -{ - - protected void doExecute( MarmaladeExecutionContext context ) - throws MarmaladeExecutionException - { - String artifactId = (String)getBody(context, String.class); - - if(artifactId == null || artifactId.length() < 1) { - throw new MarmaladeExecutionException("dependency artifactId cannot be empty"); - } - - DependencyTag parent = (DependencyTag)requireParent(DependencyTag.class); - parent.setArtifactId(artifactId); - } -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/DependencyGroupTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/DependencyGroupTag.java deleted file mode 100644 index cede2c92f..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/DependencyGroupTag.java +++ /dev/null @@ -1,28 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.tags.AbstractBodyValueTag; - -/** - * @author jdcasey - */ -public class DependencyGroupTag - extends AbstractBodyValueTag -{ - - protected void doExecute( MarmaladeExecutionContext context ) - throws MarmaladeExecutionException - { - String groupId = (String)getBody(context, String.class); - - if(groupId == null || groupId.length() < 1) { - throw new MarmaladeExecutionException("dependency groupId cannot be empty"); - } - - DependencyTag parent = (DependencyTag)requireParent(DependencyTag.class); - parent.setGroupId(groupId); - } -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/DependencyTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/DependencyTag.java deleted file mode 100644 index 29af10403..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/DependencyTag.java +++ /dev/null @@ -1,57 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import java.net.MalformedURLException; -import java.util.Set; -import java.util.prefs.Preferences; - -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.DefaultArtifact; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.resolver.ArtifactResolutionException; -import org.apache.maven.artifact.resolver.ArtifactResolver; -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.cling.CLIngConstants; -import org.codehaus.plexus.cling.model.AppModel; -import org.codehaus.plexus.cling.model.DependencyClasspathEntry; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; - -/** - * @author jdcasey - */ -public class DependencyTag - extends AbstractMarmaladeTag -{ - - private String groupId; - private String artifactId; - private String version; - - protected void doExecute( MarmaladeExecutionContext context ) throws MarmaladeExecutionException - { - processChildren( context ); - - - ClasspathTag parent = (ClasspathTag)requireParent(ClasspathTag.class); - parent.addClasspathEntry(new DependencyClasspathEntry(groupId, artifactId, version)); - } - - public void setGroupId( String groupId ) - { - this.groupId = groupId; - } - - public void setArtifactId( String artifactId ) - { - this.artifactId = artifactId; - } - - public void setVersion( String version ) - { - this.version = version; - } - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/DependencyVersionTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/DependencyVersionTag.java deleted file mode 100644 index 7fc46f535..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/DependencyVersionTag.java +++ /dev/null @@ -1,28 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.tags.AbstractBodyValueTag; - -/** - * @author jdcasey - */ -public class DependencyVersionTag - extends AbstractBodyValueTag -{ - - protected void doExecute( MarmaladeExecutionContext context ) - throws MarmaladeExecutionException - { - String version = (String)getBody(context, String.class); - - if(version == null || version.length() < 1) { - throw new MarmaladeExecutionException("dependency version cannot be empty"); - } - - DependencyTag parent = (DependencyTag)requireParent(DependencyTag.class); - parent.setVersion(version); - } -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/EnvironmentTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/EnvironmentTag.java deleted file mode 100644 index f3ebbc9e9..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/EnvironmentTag.java +++ /dev/null @@ -1,50 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.util.Properties; - -import org.codehaus.marmalade.el.ExpressionEvaluationException; -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.tags.AbstractBodyValueTag; - -/** - * @author jdcasey - */ -public class EnvironmentTag - extends AbstractBodyValueTag -{ - - protected boolean preserveBodyWhitespace( MarmaladeExecutionContext arg0 ) throws ExpressionEvaluationException - { - return true; - } - - protected void doExecute( MarmaladeExecutionContext context ) - throws MarmaladeExecutionException - { - String propertiesSpec = (String)getBody(context, String.class); - - if(propertiesSpec != null && propertiesSpec.length() > 0) { - ByteArrayInputStream bin = new ByteArrayInputStream(propertiesSpec.getBytes()); - Properties envars = new Properties(); - try - { - envars.load(bin); - } - catch ( IOException e ) - { - throw new MarmaladeExecutionException("cannot read envars from inline properties", e); - } - - Properties finalEnvars = new Properties(System.getProperties()); - finalEnvars.putAll(envars); - - AppTag parent = (AppTag)requireParent(AppTag.class); - parent.setApplicationEnvironment(finalEnvars); - } - } -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/LegalUsageTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/LegalUsageTag.java deleted file mode 100644 index 0208c268a..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/LegalUsageTag.java +++ /dev/null @@ -1,32 +0,0 @@ -/* Created on Sep 14, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.cli.InvocationTemplate; -import org.codehaus.plexus.cling.model.DefaultLegalUsage; - -/** - * @author jdcasey - */ -public class LegalUsageTag - extends AbstractMarmaladeTag -{ - - private DefaultLegalUsage usage = new DefaultLegalUsage(); - - protected void doExecute( MarmaladeExecutionContext context ) - throws MarmaladeExecutionException - { - processChildren(context); - - AppTag parent = (AppTag)requireParent(AppTag.class); - parent.setApplicationLegalUsage(usage); - } - - public void addOptionSet(InvocationTemplate template) { - usage.addInvocationTemplate(template); - } - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/LocalClasspathEntryTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/LocalClasspathEntryTag.java deleted file mode 100644 index 928a05174..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/LocalClasspathEntryTag.java +++ /dev/null @@ -1,67 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import java.io.File; -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; - -import org.codehaus.marmalade.el.ExpressionEvaluationException; -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.CLIngConstants; -import org.codehaus.plexus.cling.model.LocalClasspathEntry; -import org.codehaus.plexus.cling.tags.AbstractBodyValueTag; - -/** - * @author jdcasey - */ -public class LocalClasspathEntryTag - extends AbstractBodyValueTag -{ - - private static final String FILE_SEPARATOR = System.getProperty("file.separator"); - - protected void doExecute( MarmaladeExecutionContext context ) - throws MarmaladeExecutionException - { - String location = (String)getBody(context, String.class); - if(location == null || location.length() < 1) { - throw new MarmaladeExecutionException("local classpath entry location not specified"); - } - - if(!location.endsWith(FILE_SEPARATOR)) { - location += FILE_SEPARATOR; - } - - File locationFile = new File(location); - - try - { - locationFile = locationFile.getCanonicalFile(); - } - catch ( IOException e ) - { - throw new MarmaladeExecutionException("local classpath entry cannot be canonicalized"); - } - - String basedir = System.getProperty(CLIngConstants.APPDIR_SYSPROP); - - if(!locationFile.getAbsolutePath().startsWith(basedir)) { - throw new MarmaladeExecutionException("local classpath entry must be within application basedir"); - } - - ClasspathTag parent = (ClasspathTag)requireParent(ClasspathTag.class); - try - { - URL localUrl = locationFile.toURL(); - parent.addClasspathEntry(new LocalClasspathEntry(localUrl)); - } - catch ( MalformedURLException e ) - { - throw new MarmaladeExecutionException("cannot create local location URL", e); - } - } - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/MainClassTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/MainClassTag.java deleted file mode 100644 index fbfd63bd1..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/MainClassTag.java +++ /dev/null @@ -1,28 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.tags.AbstractBodyValueTag; - -/** - * @author jdcasey - */ -public class MainClassTag - extends AbstractBodyValueTag -{ - - protected void doExecute( MarmaladeExecutionContext context ) - throws MarmaladeExecutionException - { - String mainClass = (String)getBody(context, String.class); - - if(mainClass == null || mainClass.length() < 1) { - throw new MarmaladeExecutionException("main class cannot be empty"); - } - - MainTag parent = (MainTag)requireParent(MainTag.class); - parent.setMainClass(mainClass); - } -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/MainMethodTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/MainMethodTag.java deleted file mode 100644 index b193d9bb6..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/MainMethodTag.java +++ /dev/null @@ -1,28 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.tags.AbstractBodyValueTag; - -/** - * @author jdcasey - */ -public class MainMethodTag - extends AbstractBodyValueTag -{ - - protected void doExecute( MarmaladeExecutionContext context ) - throws MarmaladeExecutionException - { - String mainMethod = (String)getBody(context, String.class); - - if(mainMethod == null || mainMethod.length() < 1) { - throw new MarmaladeExecutionException("main method cannot be empty"); - } - - MainTag parent = (MainTag)requireParent(MainTag.class); - parent.setMainMethod(mainMethod); - } -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/MainTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/MainTag.java deleted file mode 100644 index a648b9296..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/MainTag.java +++ /dev/null @@ -1,37 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.model.DefaultMain; -import org.codehaus.plexus.cling.model.Main; - -/** - * @author jdcasey - */ -public class MainTag - extends AbstractMarmaladeTag -{ - - private DefaultMain main = new DefaultMain(); - - protected void doExecute( MarmaladeExecutionContext context ) - throws MarmaladeExecutionException - { - processChildren(context); - - AppTag parent = (AppTag)requireParent(AppTag.class); - parent.setApplicationMain(main); - } - - public void setMainClass(String mainClass) - { - main.setMainClass(mainClass); - } - - public void setMainMethod(String mainMethod) - { - main.setMainMethod(mainMethod); - } -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionDescriptionTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionDescriptionTag.java deleted file mode 100644 index 7fdd6d052..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionDescriptionTag.java +++ /dev/null @@ -1,28 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.tags.AbstractBodyValueTag; - -/** - * @author jdcasey - */ -public class OptionDescriptionTag - extends AbstractBodyValueTag -{ - - protected void doExecute( MarmaladeExecutionContext context ) - throws MarmaladeExecutionException - { - String description = (String)getBody(context, String.class); - - if(description == null || description.length() < 1) { - throw new MarmaladeExecutionException("option description cannot be empty"); - } - - OptionTag parent = (OptionTag)requireParent(OptionTag.class); - parent.setDescription(description); - } -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionLongNameTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionLongNameTag.java deleted file mode 100644 index db311f8c3..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionLongNameTag.java +++ /dev/null @@ -1,28 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.tags.AbstractBodyValueTag; - -/** - * @author jdcasey - */ -public class OptionLongNameTag - extends AbstractBodyValueTag -{ - - protected void doExecute( MarmaladeExecutionContext context ) - throws MarmaladeExecutionException - { - String longName = (String)getBody(context, String.class); - - if(longName == null || longName.length() < 1) { - throw new MarmaladeExecutionException("option long name cannot be empty"); - } - - OptionTag parent = (OptionTag)requireParent(OptionTag.class); - parent.setLongName(longName); - } -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionMultiArgTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionMultiArgTag.java deleted file mode 100644 index 2cab9a486..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionMultiArgTag.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; - -/** - * @author jdcasey - */ -public class OptionMultiArgTag - extends AbstractMarmaladeTag -{ - - protected void doExecute( MarmaladeExecutionContext context ) - throws MarmaladeExecutionException - { - OptionTag parent = (OptionTag)requireParent(OptionTag.class); - parent.setArgumentMultiple(true); - } -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionPropertyTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionPropertyTag.java deleted file mode 100644 index 75f87f1cf..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionPropertyTag.java +++ /dev/null @@ -1,28 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.tags.AbstractBodyValueTag; - -/** - * @author jdcasey - */ -public class OptionPropertyTag - extends AbstractBodyValueTag -{ - - protected void doExecute( MarmaladeExecutionContext context ) - throws MarmaladeExecutionException - { - String property = (String)getBody(context, String.class); - - if(property == null || property.length() < 1) { - throw new MarmaladeExecutionException("option property cannot be empty"); - } - - OptionTag parent = (OptionTag)requireParent(OptionTag.class); - parent.setObjectProperty(property); - } -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionRequiredTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionRequiredTag.java deleted file mode 100644 index 0282c5707..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionRequiredTag.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; - -/** - * @author jdcasey - */ -public class OptionRequiredTag - extends AbstractMarmaladeTag -{ - - protected void doExecute( MarmaladeExecutionContext context ) - throws MarmaladeExecutionException - { - OptionTag parent = (OptionTag)requireParent(OptionTag.class); - parent.setRequired(true); - } -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionSetTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionSetTag.java deleted file mode 100644 index 55152711e..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionSetTag.java +++ /dev/null @@ -1,37 +0,0 @@ -/* Created on Sep 14, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Set; - -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.cli.InvocationTemplate; -import org.codehaus.plexus.cling.cli.Option; - -/** - * @author jdcasey - */ -public class OptionSetTag - extends AbstractMarmaladeTag -{ - - private Set options = new HashSet(); - - protected void doExecute( MarmaladeExecutionContext context ) - throws MarmaladeExecutionException - { - processChildren(context); - - InvocationTemplate template = new InvocationTemplate(options); - LegalUsageTag parent = (LegalUsageTag)requireParent(LegalUsageTag.class); - parent.addOptionSet(template); - } - - public void addOption(Option option) { - options.add(option); - } -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionShortNameTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionShortNameTag.java deleted file mode 100644 index 23d46d3aa..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionShortNameTag.java +++ /dev/null @@ -1,28 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.tags.AbstractBodyValueTag; - -/** - * @author jdcasey - */ -public class OptionShortNameTag - extends AbstractBodyValueTag -{ - - protected void doExecute( MarmaladeExecutionContext context ) - throws MarmaladeExecutionException - { - String shortNameStr = (String)getBody(context, String.class); - - if(shortNameStr == null || shortNameStr.length() < 1) { - throw new MarmaladeExecutionException("option short name cannot be empty"); - } - - OptionTag parent = (OptionTag)requireParent(OptionTag.class); - parent.setShortName(new Character(shortNameStr.charAt(0))); - } -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionTag.java deleted file mode 100644 index 9d72a6133..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionTag.java +++ /dev/null @@ -1,101 +0,0 @@ -/* Created on Sep 14, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.cli.MultiArgOption; -import org.codehaus.plexus.cling.cli.NoArgOption; -import org.codehaus.plexus.cling.cli.Option; -import org.codehaus.plexus.cling.cli.OptionFormat; -import org.codehaus.plexus.cling.cli.SingleArgOption; - -/** - * @author jdcasey - */ -public class OptionTag - extends AbstractMarmaladeTag -{ - - private Character shortName; - - private String longName; - - private String objectProperty; - - private boolean required = false; - - private String type; - - private boolean isArgumentMultiple = false; - - private String description; - - protected void doExecute( MarmaladeExecutionContext context ) throws MarmaladeExecutionException - { - processChildren( context ); - - Option option = null; - if ( type != null ) - { - OptionFormat format = OptionFormat.valueOf(type); - if ( isArgumentMultiple ) - { - option = new MultiArgOption(required, shortName, longName, format, ",", description, objectProperty); - } - else - { - option = new SingleArgOption(required, shortName, longName, format, description, objectProperty); - } - } - else - { - if ( isArgumentMultiple ) - { - throw new MarmaladeExecutionException( "option cannot have empty type and accept multiple args" ); - } - else - { - option = new NoArgOption( required, shortName, longName, description, objectProperty ); - } - } - - OptionSetTag parent = (OptionSetTag)requireParent(OptionSetTag.class); - parent.addOption(option); - } - - public void setLongName( String longName ) - { - this.longName = longName; - } - - public void setObjectProperty( String objectProperty ) - { - this.objectProperty = objectProperty; - } - - public void setRequired( boolean required ) - { - this.required = required; - } - - public void setShortName( Character shortName ) - { - this.shortName = shortName; - } - - public void setType( String type ) - { - this.type = type; - } - - public void setDescription( String description ) - { - this.description = description; - } - - public void setArgumentMultiple( boolean isArgumentMultiple ) - { - this.isArgumentMultiple = isArgumentMultiple; - } -} \ No newline at end of file diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionTypeTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionTypeTag.java deleted file mode 100644 index 2db7d3039..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/app/OptionTypeTag.java +++ /dev/null @@ -1,28 +0,0 @@ -/* Created on Sep 13, 2004 */ -package org.codehaus.plexus.cling.tags.app; - -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.tags.AbstractBodyValueTag; - -/** - * @author jdcasey - */ -public class OptionTypeTag - extends AbstractBodyValueTag -{ - - protected void doExecute( MarmaladeExecutionContext context ) - throws MarmaladeExecutionException - { - String type = (String)getBody(context, String.class); - - if(type == null || type.length() < 1) { - throw new MarmaladeExecutionException("option type cannot be empty"); - } - - OptionTag parent = (OptionTag)requireParent(OptionTag.class); - parent.setType(type); - } -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/config/ConfigTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/config/ConfigTag.java deleted file mode 100644 index e2afa1478..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/config/ConfigTag.java +++ /dev/null @@ -1,35 +0,0 @@ -/* Created on Sep 15, 2004 */ -package org.codehaus.plexus.cling.tags.config; - -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.CLIngConstants; -import org.codehaus.plexus.cling.configuration.CLIngConfiguration; -import org.codehaus.plexus.cling.configuration.SupplementaryCLIngConfiguration; - -/** - * @author jdcasey - */ -public class ConfigTag - extends AbstractMarmaladeTag -{ - - private SupplementaryCLIngConfiguration config = new SupplementaryCLIngConfiguration(); - - protected void doExecute( MarmaladeExecutionContext context ) throws MarmaladeExecutionException - { - processChildren( context ); - - CLIngConfiguration appConfig = (CLIngConfiguration) context.getVariable( - CLIngConstants.CLING_CONFIG_CONTEXT_KEY, getExpressionEvaluator() ); - - appConfig.overrideWith( config ); - } - - public SupplementaryCLIngConfiguration getConfiguration() - { - return config; - } - -} \ No newline at end of file diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/config/ConfigTagLibrary.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/config/ConfigTagLibrary.java deleted file mode 100644 index 2d5eef107..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/config/ConfigTagLibrary.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Created on Sep 15, 2004 */ -package org.codehaus.plexus.cling.tags.config; - -import org.codehaus.marmalade.metamodel.AbstractMarmaladeTagLibrary; - -/** - * @author jdcasey - */ -public class ConfigTagLibrary - extends AbstractMarmaladeTagLibrary -{ - - public ConfigTagLibrary() - { - registerTag("config", ConfigTag.class); - registerTag("localRepository", LocalRepositoryTag.class); - registerTag("remoteRepositories", RemoteRepositorySetTag.class); - registerTag("remoteRepository", RemoteRepositoryTag.class); - } - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/config/LocalRepositoryTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/config/LocalRepositoryTag.java deleted file mode 100644 index 7caefbbc6..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/config/LocalRepositoryTag.java +++ /dev/null @@ -1,31 +0,0 @@ -/* Created on Sep 15, 2004 */ -package org.codehaus.plexus.cling.tags.config; - -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.tags.AbstractBodyValueTag; - -/** - * @author jdcasey - */ -public class LocalRepositoryTag - extends AbstractBodyValueTag -{ - - protected void doExecute( MarmaladeExecutionContext context ) - throws MarmaladeExecutionException - { - String location = (String)getBody(context, String.class); - - if(location == null || location.length() < 1) { - throw new MarmaladeExecutionException("Invalid local artifact repository"); - } - - ArtifactRepository localRepo = new ArtifactRepository("local", location); - - ConfigTag parent = (ConfigTag)requireParent(ConfigTag.class); - parent.getConfiguration().setLocalRepository(localRepo); - } -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/config/RemoteRepositorySetTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/config/RemoteRepositorySetTag.java deleted file mode 100644 index a4b9b3b77..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/config/RemoteRepositorySetTag.java +++ /dev/null @@ -1,39 +0,0 @@ -/* Created on Sep 15, 2004 */ -package org.codehaus.plexus.cling.tags.config; - -import java.util.HashSet; -import java.util.Set; - -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; - -/** - * @author jdcasey - */ -public class RemoteRepositorySetTag - extends AbstractMarmaladeTag -{ - - private Set remoteRepositories = new HashSet(); - - protected void doExecute( MarmaladeExecutionContext context ) throws MarmaladeExecutionException - { - processChildren(context); - - ConfigTag parent = (ConfigTag)requireParent(ConfigTag.class); - parent.getConfiguration().setRemoteRepositories(remoteRepositories); - } - - public Set getRemoteRepositories() - { - return remoteRepositories; - } - - public void addRemoteRepository(ArtifactRepository repository) - { - remoteRepositories.add(repository); - } - -} diff --git a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/config/RemoteRepositoryTag.java b/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/config/RemoteRepositoryTag.java deleted file mode 100644 index 41d391d26..000000000 --- a/plexus-tools/plexus-cling/src/main/java/org/codehaus/plexus/cling/tags/config/RemoteRepositoryTag.java +++ /dev/null @@ -1,31 +0,0 @@ -/* Created on Sep 15, 2004 */ -package org.codehaus.plexus.cling.tags.config; - -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.codehaus.marmalade.model.AbstractMarmaladeTag; -import org.codehaus.marmalade.runtime.MarmaladeExecutionContext; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; -import org.codehaus.plexus.cling.tags.AbstractBodyValueTag; - -/** - * @author jdcasey - */ -public class RemoteRepositoryTag - extends AbstractBodyValueTag -{ - private static int repoIdCounter = 0; - - protected void doExecute( MarmaladeExecutionContext context ) throws MarmaladeExecutionException - { - String location = (String)getBody(context, String.class); - - if(location == null || location.length() < 1) { - throw new MarmaladeExecutionException("Invalid remote artifact repository"); - } - - ArtifactRepository remoteRepository = new ArtifactRepository("remote-" + repoIdCounter++, location); - - RemoteRepositorySetTag parent = (RemoteRepositorySetTag)requireParent(RemoteRepositorySetTag.class); - parent.addRemoteRepository(remoteRepository); - } -} diff --git a/plexus-tools/plexus-cling/src/main/resources/META-INF/marmalade/cling-app.def b/plexus-tools/plexus-cling/src/main/resources/META-INF/marmalade/cling-app.def deleted file mode 100644 index a0ff2600d..000000000 --- a/plexus-tools/plexus-cling/src/main/resources/META-INF/marmalade/cling-app.def +++ /dev/null @@ -1 +0,0 @@ -org.codehaus.plexus.cling.tags.app.AppTagLibrary \ No newline at end of file diff --git a/plexus-tools/plexus-cling/src/main/resources/META-INF/marmalade/cling-config.def b/plexus-tools/plexus-cling/src/main/resources/META-INF/marmalade/cling-config.def deleted file mode 100644 index d84505183..000000000 --- a/plexus-tools/plexus-cling/src/main/resources/META-INF/marmalade/cling-config.def +++ /dev/null @@ -1 +0,0 @@ -org.codehaus.plexus.cling.tags.config.ConfigTagLibrary \ No newline at end of file diff --git a/plexus-tools/plexus-cling/src/main/resources/META-INF/plexus/components.xml b/plexus-tools/plexus-cling/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index 1f5cc7d93..000000000 --- a/plexus-tools/plexus-cling/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - org.codehaus.plexus.cling.Launcher - org.codehaus.plexus.cling.Launcher - - - org.apache.maven.artifact.resolver.ArtifactResolver - - - - - diff --git a/plexus-tools/plexus-cling/src/test-app/app.xml b/plexus-tools/plexus-cling/src/test-app/app.xml deleted file mode 100644 index f5acf6715..000000000 --- a/plexus-tools/plexus-cling/src/test-app/app.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - Test Application - -
- org.codehaus.plexus.cling.integrationTest.IntegrationTestMain - execute -
- - - test=value - test2=value2 - - - - - - - - - - - - - - - - - - - conf - - commons-lang - commons-lang - 1.0.1 - - - -
diff --git a/plexus-tools/plexus-cling/src/test-app/conf/testResource.txt b/plexus-tools/plexus-cling/src/test-app/conf/testResource.txt deleted file mode 100644 index 484ba93ef..000000000 --- a/plexus-tools/plexus-cling/src/test-app/conf/testResource.txt +++ /dev/null @@ -1 +0,0 @@ -This is a test. diff --git a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/cli/InvocationTemplateTest.java b/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/cli/InvocationTemplateTest.java deleted file mode 100644 index 0d647592d..000000000 --- a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/cli/InvocationTemplateTest.java +++ /dev/null @@ -1,221 +0,0 @@ -/* Created on Sep 15, 2004 */ -package org.codehaus.plexus.cling.cli; - -import java.util.Collections; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.TreeMap; - -import org.jmock.Mock; -import org.jmock.MockObjectTestCase; - -import junit.framework.TestCase; - -/** - * @author jdcasey - */ -public class InvocationTemplateTest - extends MockObjectTestCase -{ - - public void testShouldConstructWithListOfOptions() { - Set options = new HashSet(); - - InvocationTemplate template = new InvocationTemplate(options); - } - - public void testShouldReturnFalseForRequiredOptionsWhenNoneAreRequired() { - Set options = new HashSet(); - - InvocationTemplate template = new InvocationTemplate(options); - - assertFalse(template.hasRequiredOptions()); - } - - public void testShouldReturnTrueForRequiredOptionsWhenAnyAreRequired() { - Set options = new HashSet(); - - Mock optionMock = mock(Option.class); - optionMock.expects(atLeastOnce()).method("getShortName").withNoArguments().will(returnValue(new Character('t'))); - optionMock.expects(atLeastOnce()).method("getLongName").withNoArguments().will(returnValue("test")); - optionMock.expects(once()).method("isRequired").withNoArguments().will(returnValue(true)); - - options.add(optionMock.proxy()); - - InvocationTemplate template = new InvocationTemplate(options); - - assertTrue(template.hasRequiredOptions()); - } - - public void testShouldReturnTrueForIsSatisfiedWhenNoneAreRequired() { - Set options = new HashSet(); - - InvocationTemplate template = new InvocationTemplate(options); - - assertTrue(template.isSatisfied()); - } - - public void testShouldReturnFalseForIsSatisfiedWhenAnyAreRequiredAndNoneAreSet() { - Set options = new HashSet(); - - Mock optionMock = mock(Option.class); - optionMock.expects(atLeastOnce()).method("getShortName").withNoArguments().will(returnValue(new Character('t'))); - optionMock.expects(atLeastOnce()).method("getLongName").withNoArguments().will(returnValue("test")); - optionMock.expects(once()).method("isRequired").withNoArguments().will(returnValue(true)); - optionMock.expects(once()).method("isSatisfied").withNoArguments().will(returnValue(false)); - - options.add(optionMock.proxy()); - - InvocationTemplate template = new InvocationTemplate(options); - - assertFalse(template.isSatisfied()); - } - - public void testShouldReturnIntOneForScoreRequirementsWhenOneIsRequiredAndNoneAreSet() { - Set options = new HashSet(); - - Mock optionMock = mock(Option.class); - optionMock.expects(atLeastOnce()).method("getShortName").withNoArguments().will(returnValue(new Character('t'))); - optionMock.expects(atLeastOnce()).method("getLongName").withNoArguments().will(returnValue("test")); - optionMock.expects(atLeastOnce()).method("isRequired").withNoArguments().will(returnValue(true)); - - options.add(optionMock.proxy()); - - InvocationTemplate template = new InvocationTemplate(options); - - assertEquals(1, template.scoreRequirements(Collections.EMPTY_MAP)); - } - - public void testShouldReturnIntZeroForScoreRequirementsWhenNoneAreRequired() { - Set options = new HashSet(); - - InvocationTemplate template = new InvocationTemplate(options); - - assertEquals(0, template.scoreRequirements(Collections.EMPTY_MAP)); - } - - public void testShouldReturnUnsatisfiedSizeOneWhenOneIsRequiredAndNoneAreSet() { - Set options = new HashSet(); - - Mock optionMock = mock(Option.class); - optionMock.expects(atLeastOnce()).method("getShortName").withNoArguments().will(returnValue(new Character('t'))); - optionMock.expects(atLeastOnce()).method("getLongName").withNoArguments().will(returnValue("test")); - optionMock.expects(atLeastOnce()).method("isRequired").withNoArguments().will(returnValue(true)); - optionMock.expects(once()).method("isSatisfied").withNoArguments().will(returnValue(false)); - - options.add(optionMock.proxy()); - - InvocationTemplate template = new InvocationTemplate(options); - - Set unsat = template.getUnsatisfiedOptions(); - assertEquals(1, unsat.size()); - assertTrue(unsat.contains(optionMock.proxy())); - } - - public void testShouldReturnUnsatisfiedSizeZeroWhenAllRequiredAreSet() { - Set options = new HashSet(); - - Mock optionMock = mock(Option.class); - optionMock.expects(atLeastOnce()).method("getShortName").withNoArguments().will(returnValue(new Character('t'))); - optionMock.expects(atLeastOnce()).method("getLongName").withNoArguments().will(returnValue("test")); - optionMock.expects(atLeastOnce()).method("isRequired").withNoArguments().will(returnValue(true)); - optionMock.expects(atLeastOnce()).method("isSatisfied").withNoArguments().will(returnValue(true)); - - options.add(optionMock.proxy()); - - InvocationTemplate template = new InvocationTemplate(options); - - Set unsat = template.getUnsatisfiedOptions(); - assertEquals(0, unsat.size()); - assertFalse(unsat.contains(optionMock.proxy())); - } - - public void testShouldReturnOptionByShortName() { - Set options = new HashSet(); - - Mock optionMock = mock(Option.class); - optionMock.expects(atLeastOnce()).method("getShortName").withNoArguments().will(returnValue(new Character('t'))); - optionMock.expects(atLeastOnce()).method("getLongName").withNoArguments().will(returnValue("test")); - optionMock.expects(atLeastOnce()).method("isRequired").withNoArguments().will(returnValue(true)); - - options.add(optionMock.proxy()); - - InvocationTemplate template = new InvocationTemplate(options); - - Option option = template.getOption(new Character('t')); - - assertEquals(optionMock.proxy(), option); - } - - public void testShouldReturnOptionByLongName() { - Set options = new HashSet(); - - Mock optionMock = mock(Option.class); - optionMock.expects(atLeastOnce()).method("getShortName").withNoArguments().will(returnValue(new Character('t'))); - optionMock.expects(atLeastOnce()).method("getLongName").withNoArguments().will(returnValue("test")); - optionMock.expects(atLeastOnce()).method("isRequired").withNoArguments().will(returnValue(true)); - - options.add(optionMock.proxy()); - - InvocationTemplate template = new InvocationTemplate(options); - - Option option = template.getOption("test"); - - assertEquals(optionMock.proxy(), option); - } - - public void testShouldReturnSizeOfOneWhenOneOptionSupplied() { - Set options = new HashSet(); - - Mock optionMock = mock(Option.class); - optionMock.expects(atLeastOnce()).method("getShortName").withNoArguments().will(returnValue(new Character('t'))); - optionMock.expects(atLeastOnce()).method("getLongName").withNoArguments().will(returnValue("test")); - optionMock.expects(atLeastOnce()).method("isRequired").withNoArguments().will(returnValue(true)); - - options.add(optionMock.proxy()); - - InvocationTemplate template = new InvocationTemplate(options); - - assertEquals(1, template.size()); - } - - public void testShouldSetSuppliedOptionWhenSetValuesCalled() { - Set options = new HashSet(); - - NoArgOption option = new NoArgOption(true, new Character('t'), "test", "description", "property"); - - options.add(option); - - InvocationTemplate template = new InvocationTemplate(options); - - Map values = new TreeMap(); - values.put("test", Boolean.TRUE); - - template.setValues(values); - - assertTrue(option.isSet()); - } - - public void testShouldReturnMappingWithOptionPropertiesToValues() { - Set options = new HashSet(); - - NoArgOption option = new NoArgOption(true, new Character('t'), "test", "description", "property"); - - options.add(option); - - InvocationTemplate template = new InvocationTemplate(options); - - Map values = new TreeMap(); - values.put("test", Boolean.TRUE); - - template.setValues(values); - - Map propMappings = template.getOptionPropertyMappings(); - - assertTrue(Boolean.TRUE == propMappings.get("property")); - } - -} diff --git a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/cli/InvocationTest.java b/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/cli/InvocationTest.java deleted file mode 100644 index 4c667384d..000000000 --- a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/cli/InvocationTest.java +++ /dev/null @@ -1,151 +0,0 @@ -/* Created on Sep 16, 2004 */ -package org.codehaus.plexus.cling.cli; - -import java.util.Collections; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Set; - -import junit.framework.TestCase; - -/** - * @author jdcasey - */ -public class InvocationTest - extends TestCase -{ - - public void testShouldConstructWithDescriptionOnly() { - Invocation inv = new Invocation("description"); - } - - public void testShouldConstructWithDescriptionAndArgumentDescription() { - Invocation inv = new Invocation("description", ""); - } - - public void testShouldParseSingleLongOptionAndHaveNoArgsAndOneOptionSet() - throws InvocationException - { - SingleArgOption option = new SingleArgOption(true, new Character('t'), "test", OptionFormat.BOOLEAN_FORMAT, "description", "property"); - - Set options = new HashSet(); - options.add(option); - - InvocationTemplate template = new InvocationTemplate(options); - - Invocation inv = new Invocation("description"); - inv.addInvocationTemplate(template); - - String[] args = { - "--test=true" - }; - - inv.parseArgs(args); - - assertEquals(0, inv.getArgumentCount()); - assertTrue(option.isSatisfied()); - assertEquals(Boolean.TRUE, option.getValue()); - } - - public void testShouldParseSingleShortOptionAndHaveNoArgsAndOneOptionSet() - throws InvocationException - { - SingleArgOption option = new SingleArgOption(true, new Character('t'), "test", OptionFormat.BOOLEAN_FORMAT, "description", "property"); - - Set options = new HashSet(); - options.add(option); - - InvocationTemplate template = new InvocationTemplate(options); - - Invocation inv = new Invocation("description"); - inv.addInvocationTemplate(template); - - String[] args = { - "-t", "true" - }; - - inv.parseArgs(args); - - assertEquals(0, inv.getArgumentCount()); - assertTrue(option.isSatisfied()); - assertEquals(Boolean.TRUE, option.getValue()); - } - - public void testShouldParseSingleShortOptionAndOneArgumentAndHaveOneArgsAndOneOptionSet() - throws InvocationException - { - SingleArgOption option = new SingleArgOption(true, new Character('t'), "test", OptionFormat.BOOLEAN_FORMAT, "description", "property"); - - Set options = new HashSet(); - options.add(option); - - InvocationTemplate template = new InvocationTemplate(options); - - Invocation inv = new Invocation("description"); - inv.addInvocationTemplate(template); - - String[] args = { - "-t", "true", "argument" - }; - - inv.parseArgs(args); - - assertEquals(1, inv.getArgumentCount()); - assertTrue(inv.getArguments().contains("argument")); - assertTrue(option.isSatisfied()); - assertEquals(Boolean.TRUE, option.getValue()); - } - - public void testShouldFailWhenNoTemplatesWereAdded() - throws InvocationException - { - Invocation inv = new Invocation("description"); - - try { - inv.parseArgs(new String[0]); - fail("should fail because of empty invocation templates list"); - } - catch(IllegalStateException e) { - // should fail - } - } - - public void testShouldFailWhenOneTemplateWasAddedThenRemoved() - throws InvocationException - { - InvocationTemplate template = new InvocationTemplate(Collections.EMPTY_SET); - - Invocation inv = new Invocation("description"); - inv.addInvocationTemplate(template); - inv.removeInvocationTemplate(template); - - try { - inv.parseArgs(new String[0]); - fail("should fail because of empty invocation templates list"); - } - catch(IllegalStateException e) { - // should fail - } - } - - public void testShouldParseEmptyArgsAndHaveNoArgsAndNoOptionsSet() - throws InvocationException - { - SingleArgOption option = new SingleArgOption(false, new Character('t'), "test", OptionFormat.BOOLEAN_FORMAT, "description", "property"); - - Set options = new HashSet(); - options.add(option); - - InvocationTemplate template = new InvocationTemplate(options); - - Invocation inv = new Invocation("description"); - inv.addInvocationTemplate(template); - - inv.parseArgs(new String[0]); - - assertEquals(0, inv.getArgumentCount()); - assertFalse(option.hasValue()); - } - -} diff --git a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/cli/ListOptionFormatTest.java b/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/cli/ListOptionFormatTest.java deleted file mode 100644 index 45f8eb92e..000000000 --- a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/cli/ListOptionFormatTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* Created on Sep 15, 2004 */ -package org.codehaus.plexus.cling.cli; - -import junit.framework.TestCase; - -/** - * @author jdcasey - */ -public class ListOptionFormatTest - extends TestCase -{ - - public void testShouldConstructWithSplitPatternAndOptionFormatForSubs() { - ListOptionFormat fmt = new ListOptionFormat(",", OptionFormat.BOOLEAN_FORMAT); - } - - public void testShouldReturnTrueForIsValidWhenInvalidValueComponentExists_AssumeBooleanFalse() { - ListOptionFormat fmt = new ListOptionFormat(",", OptionFormat.BOOLEAN_FORMAT); - - assertTrue(fmt.isValid("true,xxx")); - } - - public void testShouldReturnTrueForIsValidWhenAllValueComponentsAreValid() { - ListOptionFormat fmt = new ListOptionFormat(",", OptionFormat.BOOLEAN_FORMAT); - - assertTrue(fmt.isValid("true,false")); - } - - public void testShouldRetrieveComponentArrayWhenAllValueComponentsAreValid() { - ListOptionFormat fmt = new ListOptionFormat(",", OptionFormat.BOOLEAN_FORMAT); - - Object[] result = (Object[])fmt.getValue("true,false"); - assertNotNull(result); - for ( int i = 0; i < result.length; i++ ) - { - Object r = result[i]; - assertTrue(r instanceof Boolean); - } - } - -} diff --git a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/cli/MultiArgOptionTest.java b/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/cli/MultiArgOptionTest.java deleted file mode 100644 index 9b5b90df3..000000000 --- a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/cli/MultiArgOptionTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* Created on Sep 15, 2004 */ -package org.codehaus.plexus.cling.cli; - -import junit.framework.TestCase; - -public class MultiArgOptionTest - extends TestCase -{ - - public void testShouldConstructWithRequiredShortNameLongNameValueFormatObjectPropertyAndDescription() - { - MultiArgOption option = new MultiArgOption( true, new Character( 't' ), "test", OptionFormat.BOOLEAN_FORMAT, ",", - "test description", "testProperty" ); - - assertEquals("test", option.getLongName()); - assertEquals(new Character('t'), option.getShortName()); - assertEquals("testProperty", option.getObjectProperty()); - assertTrue(option.isRequired()); - } - - public void testShouldSetValidValueAndReturnIsValidEqualTrue() { - MultiArgOption option = new MultiArgOption( true, new Character( 't' ), "test", OptionFormat.BOOLEAN_FORMAT, ",", - "test description", "testProperty" ); - - assertTrue(option.isValueValid("true")); - } - - public void testShouldReturnTrueForSatisfiedWhenNotRequiredWithNoValue() { - MultiArgOption option = new MultiArgOption( false, new Character( 't' ), "test", OptionFormat.BOOLEAN_FORMAT, ",", - "test description", "testProperty" ); - - assertTrue(option.isSatisfied()); - } - - public void testShouldReturnFalseForSatisfiedWhenRequiredWithNoValue() { - MultiArgOption option = new MultiArgOption( true, new Character( 't' ), "test", OptionFormat.BOOLEAN_FORMAT, ",", - "test description", "testProperty" ); - - assertFalse(option.isSatisfied()); - } - - public void testShouldReturnObjectBooleanListWhenBooleanFormatSpecified() { - MultiArgOption option = new MultiArgOption( true, new Character( 't' ), "test", OptionFormat.BOOLEAN_FORMAT, ",", - "test description", "testProperty" ); - - option.setValue("true,false"); - - Object[] result = option.getValues(); - System.out.println("Results: " + result); - - assertNotNull(result); - for ( int i = 0; i < result.length; i++ ) - { - Object r = result[i]; - System.out.println("Result[" + i + "]: " + r.getClass().getName()); - assertTrue(r instanceof Boolean); - } - } - -} \ No newline at end of file diff --git a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/cli/NoArgOptionTest.java b/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/cli/NoArgOptionTest.java deleted file mode 100644 index 32c4d4340..000000000 --- a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/cli/NoArgOptionTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* Created on Sep 15, 2004 */ -package org.codehaus.plexus.cling.cli; - -import junit.framework.TestCase; - -/** - * @author jdcasey - */ -public class NoArgOptionTest - extends TestCase -{ - - public void testShouldConstructWithRequiredShortNameLongNameDescriptionAndObjectProperty() { - NoArgOption option = new NoArgOption(true, new Character('t'), "test", "testDescription", "testProperty"); - - assertTrue(option.isRequired()); - assertEquals(new Character('t'), option.getShortName()); - assertEquals("test", option.getLongName()); - assertEquals("testProperty", option.getObjectProperty()); - } - - public void testShouldReturnFalseForIsSatisfiedWhenRequiredAndNotSet() { - NoArgOption option = new NoArgOption(true, new Character('t'), "test", "testDescription", "testProperty"); - - assertFalse(option.isSatisfied()); - } - - public void testShouldReturnTrueForIsSatisfiedWhenRequiredAndSet() { - NoArgOption option = new NoArgOption(true, new Character('t'), "test", "testDescription", "testProperty"); - - option.set(); - - assertTrue(option.isSatisfied()); - } - -} diff --git a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/cli/OptionFormatTest.java b/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/cli/OptionFormatTest.java deleted file mode 100644 index a5e4e28e0..000000000 --- a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/cli/OptionFormatTest.java +++ /dev/null @@ -1,108 +0,0 @@ -/* Created on Sep 15, 2004 */ -package org.codehaus.plexus.cling.cli; - -import java.io.File; -import java.util.Calendar; -import java.util.Date; - -import junit.framework.TestCase; - -/** - * @author jdcasey - */ -public class OptionFormatTest - extends TestCase -{ - - public void testShouldReturnObjectBooleanWithValidBooleanStringInput() { - Object result = OptionFormat.BOOLEAN_FORMAT.getValue("true"); - - assertTrue(Boolean.TRUE == result); - } - - public void testShouldReturnDateWithValidDateStringInput_MMddyyyy() { - Object result = OptionFormat.DATE_FORMAT_MM_dd_yyyy.getValue("01/02/3333"); - - assertTrue(result instanceof Date); - - Calendar cal = Calendar.getInstance(); - cal.setTime((Date)result); - - assertEquals("bad month", Calendar.JANUARY, cal.get(Calendar.MONTH)); - assertEquals("bad day", 2, cal.get(Calendar.DATE)); - assertEquals("bad year", 3333, cal.get(Calendar.YEAR)); - } - - public void testShouldReturnDateWithValidDateStringInput_yyyyddMMhhmmss() { - Object result = OptionFormat.DATE_FORMAT_yyyy_MM_dd_kk_mm_ss.getValue("2004-09-15 15:45:30"); - - assertTrue(result instanceof Date); - - Calendar cal = Calendar.getInstance(); - cal.setTime((Date)result); - - assertEquals("bad month", Calendar.SEPTEMBER, cal.get(Calendar.MONTH)); - assertEquals("bad day", 15, cal.get(Calendar.DATE)); - assertEquals("bad year", 2004, cal.get(Calendar.YEAR)); - assertEquals("bad hour", 15, cal.get(Calendar.HOUR_OF_DAY)); - assertEquals("bad minute", 45, cal.get(Calendar.MINUTE)); - assertEquals("bad second", 30, cal.get(Calendar.SECOND)); - } - - public void testShouldReturnStringWithStringInput() { - Object result = OptionFormat.STRING_FORMAT.getValue("This is a test"); - - assertTrue(result instanceof String); - - assertEquals("This is a test", result); - } - - public void testShouldReturnObjectLongWithValidNumberStringInput() { - Object result = OptionFormat.NUMBER_FORMAT.getValue("123456789123456789"); - - assertTrue(result instanceof Long); - - assertEquals(new Long(123456789123456789L), result); - } - - public void testShouldReturnObjectDoubleWithValidFractionalNumberStringInput() { - Object result = OptionFormat.FRACTIONAL_NUMBER_FORMAT.getValue("123456789123456789.123456789123456789"); - - assertTrue(result instanceof Double); - - assertEquals(new Double(123456789123456789.123456789123456789D), result); - } - - public void testShouldReturnFileWithValidFilePathStringInput() { - Object result = OptionFormat.FILE_FORMAT.getValue("/tmp/somefile.txt"); - - assertTrue(result instanceof File); - - assertEquals(new File("/tmp/somefile.txt"), result); - } - - public void testShouldReturnFileWithValidDirPathStringInput() { - Object result = OptionFormat.DIR_FORMAT.getValue("/tmp"); - - assertTrue(result instanceof File); - - assertEquals(new File("/tmp"), result); - } - - public void testShouldReturnStringWithValidJavaPackageStringInput() { - Object result = OptionFormat.JAVA_PACKAGE_FORMAT.getValue("org.codehaus.plexus.cling"); - - assertTrue(result instanceof String); - - assertEquals("org.codehaus.plexus.cling", result); - } - - public void testShouldReturnClassWithValidJavaClassStringInput() { - Object result = OptionFormat.JAVA_CLASS_FORMAT.getValue(OptionFormat.class.getName()); - - assertTrue(result instanceof Class); - - assertEquals(OptionFormat.class, result); - } - -} diff --git a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/cli/SingleArgOptionTest.java b/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/cli/SingleArgOptionTest.java deleted file mode 100644 index e178ce06e..000000000 --- a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/cli/SingleArgOptionTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/* Created on Sep 15, 2004 */ -package org.codehaus.plexus.cling.cli; - -import junit.framework.TestCase; - -public class SingleArgOptionTest - extends TestCase -{ - - public void testShouldConstructWithRequiredShortNameLongNameValueFormatObjectPropertyAndDescription() - { - SingleArgOption option = new SingleArgOption( true, new Character( 't' ), "test", OptionFormat.BOOLEAN_FORMAT, - "test description", "testProperty" ); - - assertEquals("test", option.getLongName()); - assertEquals(new Character('t'), option.getShortName()); - assertEquals("testProperty", option.getObjectProperty()); - assertTrue(option.isRequired()); - } - - public void testShouldSetValidValueAndReturnIsValidEqualTrue() { - SingleArgOption option = new SingleArgOption( true, new Character( 't' ), "test", OptionFormat.BOOLEAN_FORMAT, - "test description", "testProperty" ); - - assertTrue(option.isValueValid("true")); - } - - public void testShouldReturnTrueForSatisfiedWhenNotRequiredWithNoValue() { - SingleArgOption option = new SingleArgOption( false, new Character( 't' ), "test", OptionFormat.BOOLEAN_FORMAT, - "test description", "testProperty" ); - - assertTrue(option.isSatisfied()); - } - - public void testShouldReturnFalseForSatisfiedWhenRequiredWithNoValue() { - SingleArgOption option = new SingleArgOption( true, new Character( 't' ), "test", OptionFormat.BOOLEAN_FORMAT, - "test description", "testProperty" ); - - assertFalse(option.isSatisfied()); - } - - public void testShouldReturnObjectBooleanWhenBooleanFormatSpecified() { - SingleArgOption option = new SingleArgOption( true, new Character( 't' ), "test", OptionFormat.BOOLEAN_FORMAT, - "test description", "testProperty" ); - - option.setValue("true"); - - Object result = option.getValue(); - assertTrue(result instanceof Boolean); - } - -} \ No newline at end of file diff --git a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/configuration/AbstractCLIngConfigurationTest.java b/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/configuration/AbstractCLIngConfigurationTest.java deleted file mode 100644 index 00fdefcb9..000000000 --- a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/configuration/AbstractCLIngConfigurationTest.java +++ /dev/null @@ -1,76 +0,0 @@ -/* Created on Sep 16, 2004 */ -package org.codehaus.plexus.cling.configuration; - -import java.net.MalformedURLException; -import java.util.HashSet; -import java.util.Set; - -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.jmock.Mock; -import org.jmock.MockObjectTestCase; - -import junit.framework.TestCase; - -/** - * @author jdcasey - */ -public class AbstractCLIngConfigurationTest - extends MockObjectTestCase -{ - - public void testShouldOverrideWithRemoteRepoOfSizeTwo() throws MalformedURLException{ - TestCLIngConfiguration config = new TestCLIngConfiguration(); - - Mock configMock = mock(CLIngConfiguration.class); - - Set repoSet = new HashSet(); - repoSet.add(new ArtifactRepository("1", "file:/tmp")); - repoSet.add(new ArtifactRepository("2", "file:/tmp")); - - configMock.expects(once()).method("getLocalRepository").withNoArguments().will(returnValue(null)); - configMock.expects(once()).method("getRemoteRepositories").withNoArguments().will(returnValue(repoSet)); - - config.overrideWith((CLIngConfiguration)configMock.proxy()); - - assertEquals(2, config.getRemoteRepositories().size()); - } - - public void testShouldNotOverrideWithRemoteRepoOfSizeZero() throws MalformedURLException{ - TestCLIngConfiguration config = new TestCLIngConfiguration(); - - Mock configMock = mock(CLIngConfiguration.class); - - Set repoSet = new HashSet(); - - configMock.expects(once()).method("getLocalRepository").withNoArguments().will(returnValue(null)); - configMock.expects(once()).method("getRemoteRepositories").withNoArguments().will(returnValue(repoSet)); - - config.overrideWith((CLIngConfiguration)configMock.proxy()); - - assertEquals(1, config.getRemoteRepositories().size()); - } - - public void testShouldOverrideWithNewLocalRepo() throws MalformedURLException{ - TestCLIngConfiguration config = new TestCLIngConfiguration(); - - Mock configMock = mock(CLIngConfiguration.class); - - ArtifactRepository repo = new ArtifactRepository("new", "file:/tmp"); - configMock.expects(once()).method("getLocalRepository").withNoArguments().will(returnValue(repo)); - configMock.expects(once()).method("getRemoteRepositories").withNoArguments().will(returnValue(null)); - - config.overrideWith((CLIngConfiguration)configMock.proxy()); - - assertEquals(repo.getId(), config.getLocalRepository().getId()); - } - - private static final class TestCLIngConfiguration extends AbstractCLIngConfiguration - { - TestCLIngConfiguration(){ - Set remotes = new HashSet(); - remotes.add(new ArtifactRepository("test-remote", "file:/tmp")); - - setRemoteRepositories(remotes); - } - } -} diff --git a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/configuration/DefaultCLIngConfigurationTest.java b/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/configuration/DefaultCLIngConfigurationTest.java deleted file mode 100644 index d91a2cdda..000000000 --- a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/configuration/DefaultCLIngConfigurationTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/* Created on Sep 16, 2004 */ -package org.codehaus.plexus.cling.configuration; - -import java.net.MalformedURLException; -import java.util.HashSet; -import java.util.Set; - -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.jmock.Mock; -import org.jmock.MockObjectTestCase; - -import junit.framework.TestCase; - -/** - * @author jdcasey - */ -public class DefaultCLIngConfigurationTest - extends MockObjectTestCase -{ - - public void testShouldConstructWithNoArgs() throws MalformedURLException { - DefaultCLIngConfiguration config = new DefaultCLIngConfiguration(); - } - - public void testShouldHaveNonNullLocalRepo() throws MalformedURLException { - DefaultCLIngConfiguration config = new DefaultCLIngConfiguration(); - assertNotNull(config.getLocalRepository()); - } - - public void testShouldHaveRemoteRepoSetOfSizeOne() throws MalformedURLException { - DefaultCLIngConfiguration config = new DefaultCLIngConfiguration(); - assertEquals(1, config.getRemoteRepositories().size()); - } - -} diff --git a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/configuration/SupplementaryCLIngConfigurationTest.java b/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/configuration/SupplementaryCLIngConfigurationTest.java deleted file mode 100644 index 563e783ac..000000000 --- a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/configuration/SupplementaryCLIngConfigurationTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* Created on Sep 16, 2004 */ -package org.codehaus.plexus.cling.configuration; - -import java.util.HashSet; -import java.util.Set; - -import org.apache.maven.artifact.repository.ArtifactRepository; - -import junit.framework.TestCase; - -/** - * @author jdcasey - */ -public class SupplementaryCLIngConfigurationTest - extends TestCase -{ - - public void testShouldConstructWithNoArgs() { - SupplementaryCLIngConfiguration config = new SupplementaryCLIngConfiguration(); - } - - public void testShouldSetAndRetrieveNewLocalRepo() { - SupplementaryCLIngConfiguration config = new SupplementaryCLIngConfiguration(); - - ArtifactRepository newLocal = new ArtifactRepository("local-new", "file:/tmp"); - config.setLocalRepository(newLocal); - - assertEquals(newLocal.getId(), config.getLocalRepository().getId()); - } - - public void testShouldSetAndRetrieveNewRemoteRepoSet() { - SupplementaryCLIngConfiguration config = new SupplementaryCLIngConfiguration(); - - Set newRemotes = new HashSet(); - newRemotes.add(new ArtifactRepository("remote1", "file:/tmp")); - newRemotes.add(new ArtifactRepository("remote2", "file:/tmp")); - - config.setRemoteRepositories(newRemotes); - - assertEquals(2, config.getRemoteRepositories().size()); - } - -} diff --git a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/integrationTest/IntegrationTestLauncher.java b/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/integrationTest/IntegrationTestLauncher.java deleted file mode 100644 index 0a9d2eaeb..000000000 --- a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/integrationTest/IntegrationTestLauncher.java +++ /dev/null @@ -1,38 +0,0 @@ -/* Created on Sep 16, 2004 */ -package org.codehaus.plexus.cling.integrationTest; - -import java.beans.IntrospectionException; -import java.beans.Introspector; -import java.beans.PropertyDescriptor; -import java.io.File; -import java.net.URL; - -import org.codehaus.classworlds.ClassWorld; -import org.codehaus.plexus.cling.CLIngConstants; -import org.codehaus.plexus.cling.Launcher; - -import junit.framework.TestCase; - -/** - * @author jdcasey - */ -public class IntegrationTestLauncher - extends TestCase -{ - - public void testShouldExecuteWithSpecifiedAppDirectory() { - // next, set the appdir sysprop equal to the app.xml File's parent path - System.setProperty(CLIngConstants.APPDIR_SYSPROP, "src/test-app"); - System.setProperty(CLIngConstants.APP_RESULT_SYSPROP, "result"); - - String[] args = { - "--output" - }; - - ClassWorld cw = new ClassWorld("cling.root", getClass().getClassLoader()); - Launcher.main(args, cw); - - assertEquals("Execution result was not success.", "0", System.getProperty("result")); - } - -} diff --git a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/integrationTest/IntegrationTestMain.java b/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/integrationTest/IntegrationTestMain.java deleted file mode 100644 index f78c351c6..000000000 --- a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/integrationTest/IntegrationTestMain.java +++ /dev/null @@ -1,94 +0,0 @@ -/* Created on Sep 16, 2004 */ -package org.codehaus.plexus.cling.integrationTest; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.URL; -import java.util.List; -import java.util.Map; - -/** - * @author jdcasey - */ -public class IntegrationTestMain -{ - - private boolean bool; - private boolean input; - private String file; - private boolean output; - - public IntegrationTestMain() - { - } - - public int execute(List arguments) { - - int result = -1; - - ClassLoader cloader = Thread.currentThread().getContextClassLoader(); - - try - { - cloader.loadClass("org.apache.commons.lang.enum.Enum"); - } - catch ( ClassNotFoundException e ) - { - e.printStackTrace(); - result = -2; - } - - InputStream stream = cloader.getResourceAsStream("testResource.txt"); - if(stream != null) { - BufferedReader reader = new BufferedReader(new InputStreamReader(stream)); - String line = null; - try - { - line = reader.readLine(); - - if("This is a test.".equals(line)) { - if(output) { - result = 0; - } - else { - result = -5; - } - } - else { - result = -3; - } - - } - catch ( IOException e ) - { - e.printStackTrace(); - result = -4; - } - } - - return result; - } - - public void setBool(boolean bool) { - this.bool = bool; - } - - public void setInput(boolean input) { - this.input = input; - } - - public void setFile(String file) { - this.file = file; - } - - public boolean getOutput() { - return output; - } - - public void setOutput(boolean output) { - this.output = output; - } - -} diff --git a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/model/DefaultApplicationTest.java b/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/model/DefaultApplicationTest.java deleted file mode 100644 index 229453171..000000000 --- a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/model/DefaultApplicationTest.java +++ /dev/null @@ -1,96 +0,0 @@ -/* Created on Sep 16, 2004 */ -package org.codehaus.plexus.cling.model; - -import java.util.Properties; - -import org.jmock.Mock; -import org.jmock.MockObjectTestCase; - -import junit.framework.TestCase; - -/** - * @author jdcasey - */ -public class DefaultApplicationTest - extends MockObjectTestCase -{ - - public void testShouldConstructWithNoArgs() { - DefaultApplication app = new DefaultApplication(); - } - - public void testShouldSetAndRetrieveMainObject() { - DefaultApplication app = new DefaultApplication(); - - Mock mainMock = mock(Main.class); - Main main = (Main)mainMock.proxy(); - - app.setMain(main); - - assertEquals(main, app.getMain()); - } - - public void testShouldSetAndRetrieveEnvironment() { - DefaultApplication app = new DefaultApplication(); - - Properties env = new Properties(); - env.setProperty("test", "value"); - - app.setEnvironment(env); - - assertEquals("value", app.getEnvironment().getProperty("test")); - } - - public void testShouldDefensivelyCopyEnvironment() { - DefaultApplication app = new DefaultApplication(); - - Properties env = new Properties(); - - app.setEnvironment(env); - - env.setProperty("test", "value"); - - assertNull(app.getEnvironment().getProperty("test")); - } - - public void testShouldSetAndRetrieveClasspath() { - DefaultApplication app = new DefaultApplication(); - - Mock cpMock = mock(Classpath.class); - Classpath cp = (Classpath)cpMock.proxy(); - - app.setClasspath(cp); - - assertEquals(cp, app.getClasspath()); - } - - public void testShouldSetAndRetrieveLegalUsage() { - DefaultApplication app = new DefaultApplication(); - - Mock luMock = mock(LegalUsage.class); - LegalUsage lu = (LegalUsage)luMock.proxy(); - - app.setLegalUsage(lu); - - assertEquals(lu, app.getLegalUsage()); - } - - public void testShouldSetAndRetrieveApplicationDescription() { - DefaultApplication app = new DefaultApplication(); - - String appDesc = "Application description"; - app.setApplicationDescription(appDesc); - - assertEquals(appDesc, app.getApplicationDescription()); - } - - public void testShouldSetAndRetrieveArgumentDescription() { - DefaultApplication app = new DefaultApplication(); - - String argDesc = "Argument description"; - app.setArgumentDescription(argDesc); - - assertEquals(argDesc, app.getArgumentDescription()); - } - -} diff --git a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/model/DefaultClasspathTest.java b/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/model/DefaultClasspathTest.java deleted file mode 100644 index 08613ebba..000000000 --- a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/model/DefaultClasspathTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* Created on Sep 16, 2004 */ -package org.codehaus.plexus.cling.model; - -import java.util.List; - -import org.jmock.Mock; -import org.jmock.MockObjectTestCase; - -import junit.framework.TestCase; - -/** - * @author jdcasey - */ -public class DefaultClasspathTest - extends MockObjectTestCase -{ - - public void testShouldConstructWithNoArgs() { - DefaultClasspath cp = new DefaultClasspath(); - } - - public void testShouldAddOneEntryAndRetrieveEntryListOfSizeOne() { - DefaultClasspath cp = new DefaultClasspath(); - - Mock cpeMock = mock(ClasspathEntry.class); - ClasspathEntry cpe = (ClasspathEntry)cpeMock.proxy(); - - cp.addEntry(cpe); - - List entries = cp.getEntries(); - assertNotNull("entries is null", entries); - assertEquals("entries size is not 1", 1, entries.size()); - assertTrue("entries doesn't contain added entry", entries.contains(cpe)); - } - -} diff --git a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/model/DefaultLegalUsageTest.java b/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/model/DefaultLegalUsageTest.java deleted file mode 100644 index 85be429d1..000000000 --- a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/model/DefaultLegalUsageTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* Created on Sep 16, 2004 */ -package org.codehaus.plexus.cling.model; - -import java.util.Collections; -import java.util.List; -import java.util.Set; - -import org.codehaus.plexus.cling.cli.InvocationTemplate; - -import junit.framework.TestCase; - -/** - * @author jdcasey - */ -public class DefaultLegalUsageTest - extends TestCase -{ - - public void testShouldConstructWithNoArgs() { - DefaultLegalUsage usage = new DefaultLegalUsage(); - } - - public void testShouldAddOneTemplateAndRetrieveCollectionOfSizeOne() { - DefaultLegalUsage usage = new DefaultLegalUsage(); - - InvocationTemplate template = new InvocationTemplate(Collections.EMPTY_SET); - - usage.addInvocationTemplate(template); - - Set templates = usage.getInvocationTemplates(); - - assertNotNull("usage templates collection is null", templates); - assertEquals("usage templates collection has wrong size", 1, templates.size()); - assertTrue("usage templates collection doesn't contain added template", templates.contains(template)); - } - -} diff --git a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/model/DefaultMainTest.java b/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/model/DefaultMainTest.java deleted file mode 100644 index 426eef42d..000000000 --- a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/model/DefaultMainTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* Created on Sep 16, 2004 */ -package org.codehaus.plexus.cling.model; - -import junit.framework.TestCase; - -/** - * @author jdcasey - */ -public class DefaultMainTest - extends TestCase -{ - - public void testShouldConstructWithMainClassAndMainMethodStrings() - { - DefaultMain main = new DefaultMain(); - } - - public void testShouldSetAndRetrieveMainClass() - { - DefaultMain main = new DefaultMain( ); - - main.setMainClass(DefaultMain.class.getName()); - - assertEquals( DefaultMain.class.getName(), main.getMainClass() ); - } - - public void testShouldSetAndRetrieveMainMethod() - { - DefaultMain main = new DefaultMain(); - - main.setMainMethod("getMainMethod"); - - assertEquals( "getMainMethod", main.getMainMethod() ); - } - -} \ No newline at end of file diff --git a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/model/DependencyClasspathEntryTest.java b/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/model/DependencyClasspathEntryTest.java deleted file mode 100644 index dd9ea8fe5..000000000 --- a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/model/DependencyClasspathEntryTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* Created on Sep 16, 2004 */ -package org.codehaus.plexus.cling.model; - -import java.io.File; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Collections; -import java.util.Set; - -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.DefaultArtifact; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.resolver.ArtifactResolutionException; -import org.apache.maven.artifact.resolver.ArtifactResolver; -import org.codehaus.plexus.cling.configuration.CLIngConfiguration; -import org.jmock.Mock; -import org.jmock.MockObjectTestCase; - -import junit.framework.TestCase; - -/** - * @author jdcasey - */ -public class DependencyClasspathEntryTest - extends MockObjectTestCase -{ - - public void testShouldConstructWithGroupIdArtifactIdAndVersion() { - DependencyClasspathEntry entry = new DependencyClasspathEntry("group", "artifact", "version"); - } - - public void testShouldFailToReturnURLBeforeResolved() { - DependencyClasspathEntry entry = new DependencyClasspathEntry("group", "artifact", "version"); - - try - { - entry.getURL(); - fail("Should fail because entry has not been resolved"); - } - catch ( IllegalStateException e ) - { - // should fail because the entry is not resolved. - } - } - - public void testShouldReturnURLAfterResolved() throws MalformedURLException, ArtifactResolutionException { - DependencyClasspathEntry entry = new DependencyClasspathEntry("group", "artifact", "version"); - - File artifactFile = new File("/tmp/artifact.jar"); - URL url = artifactFile.toURL(); - - DefaultArtifact artifact = new DefaultArtifact("group", "artifact", "version", "jar"); - artifact.setPath(artifactFile.getPath()); - - Mock resolverMock = mock(ArtifactResolver.class); - resolverMock.expects(once()).method("resolve").with(isA(Artifact.class), isA(Set.class), isA(ArtifactRepository.class)).will(returnValue(artifact)); - - ArtifactResolver resolver = (ArtifactResolver)resolverMock.proxy(); - - Mock configMock = mock(CLIngConfiguration.class); - configMock.expects(once()).method("getRemoteRepositories").withNoArguments().will(returnValue(Collections.EMPTY_SET)); - configMock.expects(once()).method("getLocalRepository").withNoArguments().will(returnValue(new ArtifactRepository("local", "file:/tmp"))); - - CLIngConfiguration config = (CLIngConfiguration)configMock.proxy(); - - entry.resolve(resolver, config); - - assertEquals(url, entry.getURL()); - } - -} diff --git a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/model/LocalClasspathEntryTest.java b/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/model/LocalClasspathEntryTest.java deleted file mode 100644 index 6d9d68aa2..000000000 --- a/plexus-tools/plexus-cling/src/test/java/org/codehaus/plexus/cling/model/LocalClasspathEntryTest.java +++ /dev/null @@ -1,28 +0,0 @@ -/* Created on Sep 16, 2004 */ -package org.codehaus.plexus.cling.model; - -import java.net.MalformedURLException; -import java.net.URL; - -import junit.framework.TestCase; - -/** - * @author jdcasey - */ -public class LocalClasspathEntryTest - extends TestCase -{ - - public void testShouldConstructWithURL() throws MalformedURLException { - LocalClasspathEntry entry = new LocalClasspathEntry(new URL("http://www.google.com")); - } - - public void testShouldRetrieveURLFromConstructor() throws MalformedURLException { - URL url = new URL("http://www.google.com"); - - LocalClasspathEntry entry = new LocalClasspathEntry(url); - - assertEquals(url, entry.getURL()); - } - -} diff --git a/plexus-tools/pom.xml b/plexus-tools/pom.xml deleted file mode 100644 index b077d4784..000000000 --- a/plexus-tools/pom.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - plexus - org.codehaus.plexus - 1.0.8 - - 4.0.0 - plexus-tools - pom - Plexus Tools Parent Project - 1.0.6 - - - org.codehaus.plexus - plexus-container-default - 1.0-alpha-9 - - - - plexus-cdc - - diff --git a/plexus-utils/NOTICE.txt b/plexus-utils/NOTICE.txt deleted file mode 100644 index 3f59805ce..000000000 --- a/plexus-utils/NOTICE.txt +++ /dev/null @@ -1,2 +0,0 @@ -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). diff --git a/plexus-utils/pom.xml b/plexus-utils/pom.xml deleted file mode 100644 index da02c4442..000000000 --- a/plexus-utils/pom.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - plexus - org.codehaus.plexus - 1.0.8 - - 4.0.0 - plexus-utils - Plexus Common Utilities - 1.4-SNAPSHOT - - - - maven-surefire-plugin - - - true - - org/codehaus/plexus/util/FileBasedTestCase.java - **/Test*.java - - - - - - diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/Base64.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/Base64.java deleted file mode 100644 index b21b7eccf..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/Base64.java +++ /dev/null @@ -1,509 +0,0 @@ -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.codehaus.plexus.util; - -/** - * Provides Base64 encoding and decoding as defined by RFC 2045. - * - *

This class implements section 6.8. Base64 Content-Transfer-Encoding - * from RFC 2045 Multipurpose Internet Mail Extensions (MIME) Part One: - * Format of Internet Message Bodies by Freed and Borenstein.

- * - * @see RFC 2045 - * @author Apache Software Foundation - * @since 1.0-dev - * @version $Id$ - */ -public class Base64 { - - // - // Source Id: Base64.java 161350 2005-04-14 20:39:46Z ggregory - // - - /** - * Chunk size per RFC 2045 section 6.8. - * - *

The {@value} character limit does not count the trailing CRLF, but counts - * all other characters, including any equal signs.

- * - * @see RFC 2045 section 6.8 - */ - static final int CHUNK_SIZE = 76; - - /** - * Chunk separator per RFC 2045 section 2.1. - * - * @see RFC 2045 section 2.1 - */ - static final byte[] CHUNK_SEPARATOR = "\r\n".getBytes(); - - /** - * The base length. - */ - static final int BASELENGTH = 255; - - /** - * Lookup length. - */ - static final int LOOKUPLENGTH = 64; - - /** - * Used to calculate the number of bits in a byte. - */ - static final int EIGHTBIT = 8; - - /** - * Used when encoding something which has fewer than 24 bits. - */ - static final int SIXTEENBIT = 16; - - /** - * Used to determine how many bits data contains. - */ - static final int TWENTYFOURBITGROUP = 24; - - /** - * Used to get the number of Quadruples. - */ - static final int FOURBYTE = 4; - - /** - * Used to test the sign of a byte. - */ - static final int SIGN = -128; - - /** - * Byte used to pad output. - */ - static final byte PAD = (byte) '='; - - /** - * Contains the Base64 values 0 through 63 accessed by using character encodings as - * indices. - *

- * For example, base64Alphabet['+'] returns 62. - *

- *

- * The value of undefined encodings is -1. - *

- */ - private static byte[] base64Alphabet = new byte[BASELENGTH]; - - /** - *

- * Contains the Base64 encodings A through Z, followed by a through - * z, followed by 0 through 9, followed by +, and - * /. - *

- *

- * This array is accessed by using character values as indices. - *

- *

- * For example, lookUpBase64Alphabet[62] returns '+'. - *

- */ - private static byte[] lookUpBase64Alphabet = new byte[LOOKUPLENGTH]; - - // Populating the lookup and character arrays - static { - for (int i = 0; i < BASELENGTH; i++) { - base64Alphabet[i] = (byte) -1; - } - for (int i = 'Z'; i >= 'A'; i--) { - base64Alphabet[i] = (byte) (i - 'A'); - } - for (int i = 'z'; i >= 'a'; i--) { - base64Alphabet[i] = (byte) (i - 'a' + 26); - } - for (int i = '9'; i >= '0'; i--) { - base64Alphabet[i] = (byte) (i - '0' + 52); - } - - base64Alphabet['+'] = 62; - base64Alphabet['/'] = 63; - - for (int i = 0; i <= 25; i++) { - lookUpBase64Alphabet[i] = (byte) ('A' + i); - } - - for (int i = 26, j = 0; i <= 51; i++, j++) { - lookUpBase64Alphabet[i] = (byte) ('a' + j); - } - - for (int i = 52, j = 0; i <= 61; i++, j++) { - lookUpBase64Alphabet[i] = (byte) ('0' + j); - } - - lookUpBase64Alphabet[62] = (byte) '+'; - lookUpBase64Alphabet[63] = (byte) '/'; - } - - /** - * Returns whether or not the octect is in the base 64 alphabet. - * - * @param octect The value to test - * @return true if the value is defined in the the base 64 alphabet, false otherwise. - */ - private static boolean isBase64(byte octect) { - if (octect == PAD) { - return true; - } else if (octect < 0 || base64Alphabet[octect] == -1) { - return false; - } else { - return true; - } - } - - /** - * Tests a given byte array to see if it contains - * only valid characters within the Base64 alphabet. - * - * @param arrayOctect byte array to test - * @return true if all bytes are valid characters in the Base64 - * alphabet or if the byte array is empty; false, otherwise - */ - public static boolean isArrayByteBase64(byte[] arrayOctect) { - - arrayOctect = discardWhitespace(arrayOctect); - - int length = arrayOctect.length; - if (length == 0) { - // shouldn't a 0 length array be valid base64 data? - // return false; - return true; - } - for (int i = 0; i < length; i++) { - if (!isBase64(arrayOctect[i])) { - return false; - } - } - return true; - } - - /** - * Encodes binary data using the base64 algorithm but - * does not chunk the output. - * - * @param binaryData binary data to encode - * @return Base64 characters - */ - public static byte[] encodeBase64(byte[] binaryData) { - return encodeBase64(binaryData, false); - } - - /** - * Encodes binary data using the base64 algorithm and chunks - * the encoded output into 76 character blocks - * - * @param binaryData binary data to encode - * @return Base64 characters chunked in 76 character blocks - */ - public static byte[] encodeBase64Chunked(byte[] binaryData) { - return encodeBase64(binaryData, true); - } - - - /** - * Decodes a byte[] containing containing - * characters in the Base64 alphabet. - * - * @param pArray A byte array containing Base64 character data - * @return a byte array containing binary data - */ - public byte[] decode(byte[] pArray) { - return decodeBase64(pArray); - } - - /** - * Encodes binary data using the base64 algorithm, optionally - * chunking the output into 76 character blocks. - * - * @param binaryData Array containing binary data to encode. - * @param isChunked if true this encoder will chunk - * the base64 output into 76 character blocks - * @return Base64-encoded data. - */ - public static byte[] encodeBase64(byte[] binaryData, boolean isChunked) { - int lengthDataBits = binaryData.length * EIGHTBIT; - int fewerThan24bits = lengthDataBits % TWENTYFOURBITGROUP; - int numberTriplets = lengthDataBits / TWENTYFOURBITGROUP; - byte encodedData[] = null; - int encodedDataLength = 0; - int nbrChunks = 0; - - if (fewerThan24bits != 0) { - //data not divisible by 24 bit - encodedDataLength = (numberTriplets + 1) * 4; - } else { - // 16 or 8 bit - encodedDataLength = numberTriplets * 4; - } - - // If the output is to be "chunked" into 76 character sections, - // for compliance with RFC 2045 MIME, then it is important to - // allow for extra length to account for the separator(s) - if (isChunked) { - - nbrChunks = - (CHUNK_SEPARATOR.length == 0 ? 0 : (int) Math.ceil((float) encodedDataLength / CHUNK_SIZE)); - encodedDataLength += nbrChunks * CHUNK_SEPARATOR.length; - } - - encodedData = new byte[encodedDataLength]; - - byte k = 0, l = 0, b1 = 0, b2 = 0, b3 = 0; - - int encodedIndex = 0; - int dataIndex = 0; - int i = 0; - int nextSeparatorIndex = CHUNK_SIZE; - int chunksSoFar = 0; - - //log.debug("number of triplets = " + numberTriplets); - for (i = 0; i < numberTriplets; i++) { - dataIndex = i * 3; - b1 = binaryData[dataIndex]; - b2 = binaryData[dataIndex + 1]; - b3 = binaryData[dataIndex + 2]; - - //log.debug("b1= " + b1 +", b2= " + b2 + ", b3= " + b3); - - l = (byte) (b2 & 0x0f); - k = (byte) (b1 & 0x03); - - byte val1 = - ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0); - byte val2 = - ((b2 & SIGN) == 0) ? (byte) (b2 >> 4) : (byte) ((b2) >> 4 ^ 0xf0); - byte val3 = - ((b3 & SIGN) == 0) ? (byte) (b3 >> 6) : (byte) ((b3) >> 6 ^ 0xfc); - - encodedData[encodedIndex] = lookUpBase64Alphabet[val1]; - //log.debug( "val2 = " + val2 ); - //log.debug( "k4 = " + (k<<4) ); - //log.debug( "vak = " + (val2 | (k<<4)) ); - encodedData[encodedIndex + 1] = - lookUpBase64Alphabet[val2 | (k << 4)]; - encodedData[encodedIndex + 2] = - lookUpBase64Alphabet[(l << 2) | val3]; - encodedData[encodedIndex + 3] = lookUpBase64Alphabet[b3 & 0x3f]; - - encodedIndex += 4; - - // If we are chunking, let's put a chunk separator down. - if (isChunked) { - // this assumes that CHUNK_SIZE % 4 == 0 - if (encodedIndex == nextSeparatorIndex) { - System.arraycopy( - CHUNK_SEPARATOR, - 0, - encodedData, - encodedIndex, - CHUNK_SEPARATOR.length); - chunksSoFar++; - nextSeparatorIndex = - (CHUNK_SIZE * (chunksSoFar + 1)) + - (chunksSoFar * CHUNK_SEPARATOR.length); - encodedIndex += CHUNK_SEPARATOR.length; - } - } - } - - // form integral number of 6-bit groups - dataIndex = i * 3; - - if (fewerThan24bits == EIGHTBIT) { - b1 = binaryData[dataIndex]; - k = (byte) (b1 & 0x03); - //log.debug("b1=" + b1); - //log.debug("b1<<2 = " + (b1>>2) ); - byte val1 = - ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0); - encodedData[encodedIndex] = lookUpBase64Alphabet[val1]; - encodedData[encodedIndex + 1] = lookUpBase64Alphabet[k << 4]; - encodedData[encodedIndex + 2] = PAD; - encodedData[encodedIndex + 3] = PAD; - } else if (fewerThan24bits == SIXTEENBIT) { - - b1 = binaryData[dataIndex]; - b2 = binaryData[dataIndex + 1]; - l = (byte) (b2 & 0x0f); - k = (byte) (b1 & 0x03); - - byte val1 = - ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0); - byte val2 = - ((b2 & SIGN) == 0) ? (byte) (b2 >> 4) : (byte) ((b2) >> 4 ^ 0xf0); - - encodedData[encodedIndex] = lookUpBase64Alphabet[val1]; - encodedData[encodedIndex + 1] = - lookUpBase64Alphabet[val2 | (k << 4)]; - encodedData[encodedIndex + 2] = lookUpBase64Alphabet[l << 2]; - encodedData[encodedIndex + 3] = PAD; - } - - if (isChunked) { - // we also add a separator to the end of the final chunk. - if (chunksSoFar < nbrChunks) { - System.arraycopy( - CHUNK_SEPARATOR, - 0, - encodedData, - encodedDataLength - CHUNK_SEPARATOR.length, - CHUNK_SEPARATOR.length); - } - } - - return encodedData; - } - - /** - * Decodes Base64 data into octects - * - * @param base64Data Byte array containing Base64 data - * @return Array containing decoded data. - */ - public static byte[] decodeBase64(byte[] base64Data) { - // RFC 2045 requires that we discard ALL non-Base64 characters - base64Data = discardNonBase64(base64Data); - - // handle the edge case, so we don't have to worry about it later - if (base64Data.length == 0) { - return new byte[0]; - } - - int numberQuadruple = base64Data.length / FOURBYTE; - byte decodedData[] = null; - byte b1 = 0, b2 = 0, b3 = 0, b4 = 0, marker0 = 0, marker1 = 0; - - // Throw away anything not in base64Data - - int encodedIndex = 0; - int dataIndex = 0; - { - // this sizes the output array properly - rlw - int lastData = base64Data.length; - // ignore the '=' padding - while (base64Data[lastData - 1] == PAD) { - if (--lastData == 0) { - return new byte[0]; - } - } - decodedData = new byte[lastData - numberQuadruple]; - } - - for (int i = 0; i < numberQuadruple; i++) { - dataIndex = i * 4; - marker0 = base64Data[dataIndex + 2]; - marker1 = base64Data[dataIndex + 3]; - - b1 = base64Alphabet[base64Data[dataIndex]]; - b2 = base64Alphabet[base64Data[dataIndex + 1]]; - - if (marker0 != PAD && marker1 != PAD) { - //No PAD e.g 3cQl - b3 = base64Alphabet[marker0]; - b4 = base64Alphabet[marker1]; - - decodedData[encodedIndex] = (byte) (b1 << 2 | b2 >> 4); - decodedData[encodedIndex + 1] = - (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf)); - decodedData[encodedIndex + 2] = (byte) (b3 << 6 | b4); - } else if (marker0 == PAD) { - //Two PAD e.g. 3c[Pad][Pad] - decodedData[encodedIndex] = (byte) (b1 << 2 | b2 >> 4); - } else if (marker1 == PAD) { - //One PAD e.g. 3cQ[Pad] - b3 = base64Alphabet[marker0]; - - decodedData[encodedIndex] = (byte) (b1 << 2 | b2 >> 4); - decodedData[encodedIndex + 1] = - (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf)); - } - encodedIndex += 3; - } - return decodedData; - } - - /** - * Discards any whitespace from a base-64 encoded block. - * - * @param data The base-64 encoded data to discard the whitespace - * from. - * @return The data, less whitespace (see RFC 2045). - */ - static byte[] discardWhitespace(byte[] data) { - byte groomedData[] = new byte[data.length]; - int bytesCopied = 0; - - for (int i = 0; i < data.length; i++) { - switch (data[i]) { - case (byte) ' ' : - case (byte) '\n' : - case (byte) '\r' : - case (byte) '\t' : - break; - default: - groomedData[bytesCopied++] = data[i]; - } - } - - byte packedData[] = new byte[bytesCopied]; - - System.arraycopy(groomedData, 0, packedData, 0, bytesCopied); - - return packedData; - } - - /** - * Discards any characters outside of the base64 alphabet, per - * the requirements on page 25 of RFC 2045 - "Any characters - * outside of the base64 alphabet are to be ignored in base64 - * encoded data." - * - * @param data The base-64 encoded data to groom - * @return The data, less non-base64 characters (see RFC 2045). - */ - static byte[] discardNonBase64(byte[] data) { - byte groomedData[] = new byte[data.length]; - int bytesCopied = 0; - - for (int i = 0; i < data.length; i++) { - if (isBase64(data[i])) { - groomedData[bytesCopied++] = data[i]; - } - } - - byte packedData[] = new byte[bytesCopied]; - - System.arraycopy(groomedData, 0, packedData, 0, bytesCopied); - - return packedData; - } - - /** - * Encodes a byte[] containing binary data, into a byte[] containing - * characters in the Base64 alphabet. - * - * @param pArray a byte array containing binary data - * @return A byte array containing only Base64 character data - */ - public byte[] encode(byte[] pArray) { - return encodeBase64(pArray, false); - } - -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/CachedMap.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/CachedMap.java deleted file mode 100644 index 6a8386c8d..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/CachedMap.java +++ /dev/null @@ -1,407 +0,0 @@ -/* - * J.A.D.E. Java(TM) Addition to Default Environment. - * Latest release available at http://jade.dautelle.com/ - * This class is public domain (not copyrighted). - */ -package org.codehaus.plexus.util; -import java.util.Collection; -import java.util.Collections; -import java.util.Iterator; -import java.util.Map; -import java.util.Set; - -/** - *

This class provides cache access to Map collections.

- * - *

Instance of this class can be used as "proxy" for any collection - * implementing the java.util.Map interface.

- * - *

Typically, {@link CachedMap} are used to accelerate access to - * large collections when the access to the collection is not evenly - * distributed (associative cache). The performance gain is about - * 50% for the fastest hash map collections (e.g. {@link FastMap}). - * For slower collections such as java.util.TreeMap, - * non-resizable {@link FastMap} (real-time) or database access, - * performance can be of several orders of magnitude.

- * - *

Note: The keys used to access elements of a {@link CachedMap} do - * not need to be immutable as they are not stored in the cache - * (only keys specified by the {@link #put} method are). - * In other words, access can be performed using mutable keys as long - * as these keys can be compared for equality with the real map's keys - * (e.g. same hashCode values).

- * - *

This implementation is not synchronized. Multiple threads accessing - * or modifying the collection must be synchronized externally.

- * - *

This class is public domain (not copyrighted).

- * - * @author Jean-Marie Dautelle - * @version 5.3, October 30, 2003 - */ -public final class CachedMap implements Map { - - /** - * Holds the FastMap backing this collection - * (null if generic backing map). - */ - private final FastMap _backingFastMap; - - /** - * Holds the generic map backing this collection. - */ - private final Map _backingMap; - - /** - * Holds the keys of the backing map (key-to-key mapping). - * (null if FastMap backing map). - */ - private final FastMap _keysMap; - - /** - * Holds the cache's mask (capacity - 1). - */ - private final int _mask; - - /** - * Holds the keys being cached. - */ - private final Object[] _keys; - - /** - * Holds the values being cached. - */ - private final Object[] _values; - - /** - * Creates a cached map backed by a {@link FastMap}. - * The default cache size and map capacity is set to 256 - * entries. - */ - public CachedMap() { - this(256, new FastMap()); - } - - /** - * Creates a cached map backed by a {@link FastMap} and having the - * specified cache size. - * - * @param cacheSize the cache size, the actual cache size is the - * first power of 2 greater or equal to cacheSize. - * This is also the initial capacity of the backing map. - */ - public CachedMap(int cacheSize) { - this(cacheSize, new FastMap(cacheSize)); - } - - /** - * Creates a cached map backed by the specified map and having the specified - * cache size. In order to maitain cache veracity, it is critical - * that all update to the backing map is accomplished through the - * {@link CachedMap} instance; otherwise {@link #flush} has to be called. - * - * @param cacheSize the cache size, the actual cache size is the - * first power of 2 greater or equal to cacheSize. - * @param backingMap the backing map to be "wrapped" in a cached map. - */ - public CachedMap(int cacheSize, Map backingMap) { - - // Find a power of 2 >= minimalCache - int actualCacheSize = 1; - while (actualCacheSize < cacheSize) { - actualCacheSize <<= 1; - } - - // Sets up cache. - _keys = new Object[actualCacheSize]; - _values = new Object[actualCacheSize]; - _mask = actualCacheSize - 1; - - // Sets backing map references. - if (backingMap instanceof FastMap) { - _backingFastMap = (FastMap)backingMap; - _backingMap = _backingFastMap; - _keysMap = null; - } else { - _backingFastMap = null; - _backingMap = backingMap; - _keysMap = new FastMap(backingMap.size()); - for (Iterator i= backingMap.keySet().iterator(); i.hasNext();) { - Object key = i.next(); - _keysMap.put(key, key); - } - } - } - - /** - * Returns the actual cache size. - * - * @return the cache size (power of 2). - */ - public int getCacheSize() { - return _keys.length; - } - - /** - * Returns the backing map. If the backing map is modified directly, - * this {@link CachedMap} has to be flushed. - * - * @return the backing map. - * @see #flush - */ - public Map getBackingMap() { - return (_backingFastMap != null) ? _backingFastMap : _backingMap; - } - - /** - * Flushes the key/value pairs being cached. This method should be called - * if the backing map is externally modified. - */ - public void flush() { - for (int i=0; i < _keys.length; i++) { - _keys[i] = null; - _values[i] = null; - } - - if (_keysMap != null) { - // Re-populates keys from backing map. - for (Iterator i= _backingMap.keySet().iterator(); i.hasNext();) { - Object key = i.next(); - _keysMap.put(key, key); - } - } - } - - /** - * Returns the value to which this map maps the specified key. - * First, the cache is being checked, then if the cache does not contains - * the specified key, the backing map is accessed and the key/value - * pair is stored in the cache. - * - * @param key the key whose associated value is to be returned. - * @return the value to which this map maps the specified key, or - * null if the map contains no mapping for this key. - * @throws ClassCastException if the key is of an inappropriate type for - * the backing map (optional). - * @throws NullPointerException if the key is null. - */ - public Object get(Object key) { - int index = key.hashCode() & _mask; - return key.equals(_keys[index]) ? - _values[index] : getCacheMissed(key, index); - } - private Object getCacheMissed(Object key, int index) { - if (_backingFastMap != null) { - Map.Entry entry = _backingFastMap.getEntry(key); - if (entry != null) { - _keys[index] = entry.getKey(); - Object value = entry.getValue(); - _values[index] = value; - return value; - } else { - return null; - } - } else { // Generic backing map. - Object mapKey = _keysMap.get(key); - if (mapKey != null) { - _keys[index] = mapKey; - Object value = _backingMap.get(key); - _values[index] = value; - return value; - } else { - return null; - } - } - } - - /** - * Associates the specified value with the specified key in this map. - * - * @param key the key with which the specified value is to be associated. - * @param value the value to be associated with the specified key. - * @return the previous value associated with specified key, or - * null if there was no mapping for the key. - * @throws UnsupportedOperationException if the put operation - * is not supported by the backing map. - * @throws ClassCastException if the class of the specified key or value - * prevents it from being stored in this map. - * @throws IllegalArgumentException if some aspect of this key or value - * prevents it from being stored in this map. - * @throws NullPointerException if the key is null. - */ - public Object put(Object key, Object value) { - // Updates the cache. - int index = key.hashCode() & _mask; - if (key.equals(_keys[index]) ) { - _values[index] = value; - } else if (_keysMap != null) { // Possibly a new key. - _keysMap.put(key, key); - } - - // Updates the backing map. - return _backingMap.put(key, value); - } - - /** - * Removes the mapping for this key from this map if it is present. - * - * @param key key whose mapping is to be removed from the map. - * @return previous value associated with specified key, - * or null if there was no mapping for key. - * @throws ClassCastException if the key is of an inappropriate type for - * the backing map (optional). - * @throws NullPointerException if the key is null. - * @throws UnsupportedOperationException if the remove method - * is not supported by the backing map. - */ - public Object remove(Object key) { - // Removes from cache. - int index = key.hashCode() & _mask; - if (key.equals(_keys[index]) ) { - _keys[index] = null; - } - // Removes from key map. - if (_keysMap != null) { - _keysMap.remove(key); - } - // Removes from backing map. - return _backingMap.remove(key); - } - - /** - * Indicates if this map contains a mapping for the specified key. - * - * @param key the key whose presence in this map is to be tested. - * @return true if this map contains a mapping for the - * specified key; false otherwise. - */ - public boolean containsKey(Object key) { - // Checks the cache. - int index = key.hashCode() & _mask; - if (key.equals(_keys[index]) ) { - return true; - } else { // Checks the backing map. - return _backingMap.containsKey(key); - } - } - - /** - * Returns the number of key-value mappings in this map. If the - * map contains more than Integer.MAX_VALUE elements, - * returns Integer.MAX_VALUE. - * - * @return the number of key-value mappings in this map. - */ - public int size() { - return _backingMap.size(); - } - - /** - * Returns true if this map contains no key-value mappings. - * - * @return true if this map contains no key-value mappings. - */ - public boolean isEmpty() { - return _backingMap.isEmpty(); - } - - /** - * Returns true if this map maps one or more keys to the - * specified value. - * - * @param value value whose presence in this map is to be tested. - * @return true if this map maps one or more keys to the - * specified value. - * @throws ClassCastException if the value is of an inappropriate type for - * the backing map (optional). - * @throws NullPointerException if the value is null and the - * backing map does not not permit null values. - */ - public boolean containsValue(Object value) { - return _backingMap.containsValue(value); - } - - /** - * Copies all of the mappings from the specified map to this map - * (optional operation). This method automatically flushes the cache. - * - * @param map the mappings to be stored in this map. - * @throws UnsupportedOperationException if the putAll method - * is not supported by the backing map. - * @throws ClassCastException if the class of a key or value in the - * specified map prevents it from being stored in this map. - * @throws IllegalArgumentException some aspect of a key or value in the - * specified map prevents it from being stored in this map. - * @throws NullPointerException the specified map is null, or - * if the backing map does not permit null keys or - * values, and the specified map contains null keys or - * values. - */ - public void putAll(Map map) { - _backingMap.putAll(map); - flush(); - } - - /** - * Removes all mappings from this map (optional operation). This method - * automatically flushes the cache. - * - * @throws UnsupportedOperationException if clear is not supported by the - * backing map. - */ - public void clear() { - _backingMap.clear(); - flush(); - } - - /** - * Returns an unmodifiable view of the keys contained in this - * map. - * - * @return an unmodifiable view of the keys contained in this map. - */ - public Set keySet() { - return Collections.unmodifiableSet(_backingMap.keySet()); - } - - /** - * Returns an unmodifiable view of the values contained in this map. - * - * @return an unmodifiable view of the values contained in this map. - */ - public Collection values() { - return Collections.unmodifiableCollection(_backingMap.values()); - } - - /** - * Returns an unmodifiable view of the mappings contained in this - * map. Each element in the returned set is a Map.Entry. - * - * @return an unmodifiable view of the mappings contained in this map. - */ - public Set entrySet() { - return Collections.unmodifiableSet(_backingMap.entrySet()); - } - - - /** - * Compares the specified object with this map for equality. Returns - * true if the given object is also a map and the two Maps - * represent the same mappings. - * - * @param o object to be compared for equality with this map. - * @return true if the specified object is equal to this map. - */ - public boolean equals(Object o) { - return _backingMap.equals(o); - } - - /** - * Returns the hash code value for this map. - * - * @return the hash code value for this map. - */ - public int hashCode() { - return _backingMap.hashCode(); - } -} \ No newline at end of file diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/CollectionUtils.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/CollectionUtils.java deleted file mode 100644 index 86f22f4d2..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/CollectionUtils.java +++ /dev/null @@ -1,232 +0,0 @@ -package org.codehaus.plexus.util; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.NoSuchElementException; -import java.util.Set; - -public class CollectionUtils -{ - // ---------------------------------------------------------------------- - // Static methods that can probably be moved to a real util class. - // ---------------------------------------------------------------------- - - /** - * Take a dominant and recessive Map and merge the key:value - * pairs where the recessive Map may add key:value pairs to the dominant - * Map but may not override any existing key:value pairs. - * - * If we have two Maps, a dominant and recessive, and - * their respective keys are as follows: - * - * dominantMapKeys = { a, b, c, d, e, f } - * recessiveMapKeys = { a, b, c, x, y, z } - * - * Then the result should be the following: - * - * resultantKeys = { a, b, c, d, e, f, x, y, z } - * - * @param dominantMap Dominant Map. - * @param recessiveMap Recessive Map. - * @return The result map with combined dominant and recessive values. - */ - public static Map mergeMaps( Map dominantMap, Map recessiveMap ) - { - - if ( dominantMap == null && recessiveMap == null ) - { - return null; - } - - if ( dominantMap != null && recessiveMap == null ) - { - return dominantMap; - } - - if ( dominantMap == null && recessiveMap != null ) - { - return recessiveMap; - } - - Map result = new HashMap(); - - // Grab the keys from the dominant and recessive maps. - Set dominantMapKeys = dominantMap.keySet(); - Set recessiveMapKeys = recessiveMap.keySet(); - - // Create the set of keys that will be contributed by the - // recessive Map by subtracting the intersection of keys - // from the recessive Map's keys. - Collection contributingRecessiveKeys = - CollectionUtils.subtract( recessiveMapKeys, - CollectionUtils.intersection( dominantMapKeys, recessiveMapKeys ) ); - - result.putAll( dominantMap ); - - // Now take the keys we just found and extract the values from - // the recessiveMap and put the key:value pairs into the dominantMap. - for ( Iterator i = contributingRecessiveKeys.iterator(); i.hasNext(); ) - { - Object key = i.next(); - result.put( key, recessiveMap.get( key ) ); - } - - return result; - } - - /** - * Take a series of Maps and merge - * them where the ordering of the array from 0..n - * is the dominant order. - * - * @param maps An array of Maps to merge. - * @return Map The result Map produced after the merging process. - */ - public static Map mergeMaps( Map[] maps ) - { - Map result = null; - - if ( maps.length == 0 ) - { - result = null; - } - else if ( maps.length == 1 ) - { - result = maps[0]; - } - else - { - result = mergeMaps( maps[0], maps[1] ); - - for ( int i = 2; i < maps.length; i++ ) - { - result = mergeMaps( result, maps[i] ); - } - } - - return result; - } - - /** - * Returns a {@link Collection} containing the intersection - * of the given {@link Collection}s. - *

- * The cardinality of each element in the returned {@link Collection} - * will be equal to the minimum of the cardinality of that element - * in the two given {@link Collection}s. - * - * @see Collection#retainAll - */ - public static Collection intersection( final Collection a, final Collection b ) - { - ArrayList list = new ArrayList(); - Map mapa = getCardinalityMap( a ); - Map mapb = getCardinalityMap( b ); - Set elts = new HashSet( a ); - elts.addAll( b ); - Iterator it = elts.iterator(); - while ( it.hasNext() ) - { - Object obj = it.next(); - for ( int i = 0,m = Math.min( getFreq( obj, mapa ), getFreq( obj, mapb ) ); i < m; i++ ) - { - list.add( obj ); - } - } - return list; - } - - /** - * Returns a {@link Collection} containing a - b. - * The cardinality of each element e in the returned {@link Collection} - * will be the cardinality of e in a minus the cardinality - * of e in b, or zero, whichever is greater. - * - * @see Collection#removeAll - */ - public static Collection subtract( final Collection a, final Collection b ) - { - ArrayList list = new ArrayList( a ); - Iterator it = b.iterator(); - while ( it.hasNext() ) - { - list.remove( it.next() ); - } - return list; - } - - /** - * Returns a {@link Map} mapping each unique element in - * the given {@link Collection} to an {@link Integer} - * representing the number of occurances of that element - * in the {@link Collection}. - * An entry that maps to null indicates that the - * element does not appear in the given {@link Collection}. - */ - public static Map getCardinalityMap( final Collection col ) - { - HashMap count = new HashMap(); - Iterator it = col.iterator(); - while ( it.hasNext() ) - { - Object obj = it.next(); - Integer c = (Integer) ( count.get( obj ) ); - if ( null == c ) - { - count.put( obj, new Integer( 1 ) ); - } - else - { - count.put( obj, new Integer( c.intValue() + 1 ) ); - } - } - return count; - } - - public static List iteratorToList( Iterator it ) - { - if ( it == null ) - { - throw new NullPointerException( "it cannot be null." ); - } - - List list = new ArrayList(); - - while ( it.hasNext() ) - { - list.add( it.next() ); - } - - return list; - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - private static final int getFreq( final Object obj, final Map freqMap ) - { - try - { - Object o = freqMap.get( obj ); - if ( o != null ) // minimize NullPointerExceptions - { - return ( (Integer) o ).intValue(); - } - } - catch ( NullPointerException e ) - { - // ignored - } - catch ( NoSuchElementException e ) - { - // ignored - } - return 0; - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/DirectoryScanner.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/DirectoryScanner.java deleted file mode 100644 index a480f11f8..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/DirectoryScanner.java +++ /dev/null @@ -1,1072 +0,0 @@ -/* - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2000-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.codehaus.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. - * - * 4. The names "Ant" and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact codehaus@codehaus.org. - * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ - -package org.codehaus.plexus.util; - -import java.io.File; -import java.io.IOException; -import java.util.Vector; - -/** - * Class for scanning a directory for files/directories which match certain - * criteria. - *

- * These criteria consist of selectors and patterns which have been specified. - * With the selectors you can select which files you want to have included. - * Files which are not selected are excluded. With patterns you can include - * or exclude files based on their filename. - *

- * The idea is simple. A given directory is recursively scanned for all files - * and directories. Each file/directory is matched against a set of selectors, - * including special support for matching against filenames with include and - * and exclude patterns. Only files/directories which match at least one - * pattern of the include pattern list or other file selector, and don't match - * any pattern of the exclude pattern list or fail to match against a required - * selector will be placed in the list of files/directories found. - *

- * When no list of include patterns is supplied, "**" will be used, which - * means that everything will be matched. When no list of exclude patterns is - * supplied, an empty list is used, such that nothing will be excluded. When - * no selectors are supplied, none are applied. - *

- * The filename pattern matching is done as follows: - * The name to be matched is split up in path segments. A path segment is the - * name of a directory or file, which is bounded by - * File.separator ('/' under UNIX, '\' under Windows). - * For example, "abc/def/ghi/xyz.java" is split up in the segments "abc", - * "def","ghi" and "xyz.java". - * The same is done for the pattern against which should be matched. - *

- * The segments of the name and the pattern are then matched against each - * other. When '**' is used for a path segment in the pattern, it matches - * zero or more path segments of the name. - *

- * There is a special case regarding the use of File.separators - * at the beginning of the pattern and the string to match:
- * When a pattern starts with a File.separator, the string - * to match must also start with a File.separator. - * When a pattern does not start with a File.separator, the - * string to match may not start with a File.separator. - * When one of these rules is not obeyed, the string will not - * match. - *

- * When a name path segment is matched against a pattern path segment, the - * following special characters can be used:
- * '*' matches zero or more characters
- * '?' matches one character. - *

- * Examples: - *

- * "**\*.class" matches all .class files/dirs in a directory tree. - *

- * "test\a??.java" matches all files/dirs which start with an 'a', then two - * more characters and then ".java", in a directory called test. - *

- * "**" matches everything in a directory tree. - *

- * "**\test\**\XYZ*" matches all files/dirs which start with "XYZ" and where - * there is a parent directory called test (e.g. "abc\test\def\ghi\XYZ123"). - *

- * Case sensitivity may be turned off if necessary. By default, it is - * turned on. - *

- * Example of usage: - *

- *   String[] includes = {"**\\*.class"};
- *   String[] excludes = {"modules\\*\\**"};
- *   ds.setIncludes(includes);
- *   ds.setExcludes(excludes);
- *   ds.setBasedir(new File("test"));
- *   ds.setCaseSensitive(true);
- *   ds.scan();
- *
- *   System.out.println("FILES:");
- *   String[] files = ds.getIncludedFiles();
- *   for (int i = 0; i < files.length; i++) {
- *     System.out.println(files[i]);
- *   }
- * 
- * This will scan a directory called test for .class files, but excludes all - * files in all proper subdirectories of a directory called "modules" - * - * @author Arnout J. Kuiper - * ajkuiper@wxs.nl - * @author Magesh Umasankar - * @author Bruce Atherton - * @author Antoine Levy-Lambert - */ -public class DirectoryScanner -{ - /** - * Patterns which should be excluded by default. - * - * @see #addDefaultExcludes() - */ - public static final String[] DEFAULTEXCLUDES = { - // Miscellaneous typical temporary files - "**/*~", - "**/#*#", - "**/.#*", - "**/%*%", - "**/._*", - - // CVS - "**/CVS", - "**/CVS/**", - "**/.cvsignore", - - // SCCS - "**/SCCS", - "**/SCCS/**", - - // Visual SourceSafe - "**/vssver.scc", - - // Subversion - "**/.svn", - "**/.svn/**", - - // Arch - "**/.arch-ids", - "**/.arch-ids/**", - - //Bazaar - "**/.bzr", - "**/.bzr/**", - - //SurroundSCM - "**/.MySCMServerInfo", - - // Mac - "**/.DS_Store" - }; - - /** The base directory to be scanned. */ - protected File basedir; - - /** The patterns for the files to be included. */ - protected String[] includes; - - /** The patterns for the files to be excluded. */ - protected String[] excludes; - - /** The files which matched at least one include and no excludes - * and were selected. - */ - protected Vector filesIncluded; - - /** The files which did not match any includes or selectors. */ - protected Vector filesNotIncluded; - - /** - * The files which matched at least one include and at least - * one exclude. - */ - protected Vector filesExcluded; - - /** The directories which matched at least one include and no excludes - * and were selected. - */ - protected Vector dirsIncluded; - - /** The directories which were found and did not match any includes. */ - protected Vector dirsNotIncluded; - - /** - * The directories which matched at least one include and at least one - * exclude. - */ - protected Vector dirsExcluded; - - /** The files which matched at least one include and no excludes and - * which a selector discarded. - */ - protected Vector filesDeselected; - - /** The directories which matched at least one include and no excludes - * but which a selector discarded. - */ - protected Vector dirsDeselected; - - /** Whether or not our results were built by a slow scan. */ - protected boolean haveSlowResults = false; - - /** - * Whether or not the file system should be treated as a case sensitive - * one. - */ - protected boolean isCaseSensitive = true; - - /** - * Whether or not symbolic links should be followed. - * - * @since Ant 1.5 - */ - private boolean followSymlinks = true; - - /** Whether or not everything tested so far has been included. */ - protected boolean everythingIncluded = true; - - /** - * Sole constructor. - */ - public DirectoryScanner() - { - } - - /** - * Tests whether or not a given path matches the start of a given - * pattern up to the first "**". - *

- * This is not a general purpose test and should only be used if you - * can live with false positives. For example, pattern=**\a - * and str=b will yield true. - * - * @param pattern The pattern to match against. Must not be - * null. - * @param str The path to match, as a String. Must not be - * null. - * - * @return whether or not a given path matches the start of a given - * pattern up to the first "**". - */ - protected static boolean matchPatternStart( String pattern, String str ) - { - return SelectorUtils.matchPatternStart( pattern, str ); - } - - /** - * Tests whether or not a given path matches the start of a given - * pattern up to the first "**". - *

- * This is not a general purpose test and should only be used if you - * can live with false positives. For example, pattern=**\a - * and str=b will yield true. - * - * @param pattern The pattern to match against. Must not be - * null. - * @param str The path to match, as a String. Must not be - * null. - * @param isCaseSensitive Whether or not matching should be performed - * case sensitively. - * - * @return whether or not a given path matches the start of a given - * pattern up to the first "**". - */ - protected static boolean matchPatternStart( String pattern, String str, - boolean isCaseSensitive ) - { - return SelectorUtils.matchPatternStart( pattern, str, isCaseSensitive ); - } - - /** - * Tests whether or not a given path matches a given pattern. - * - * @param pattern The pattern to match against. Must not be - * null. - * @param str The path to match, as a String. Must not be - * null. - * - * @return true if the pattern matches against the string, - * or false otherwise. - */ - protected static boolean matchPath( String pattern, String str ) - { - return SelectorUtils.matchPath( pattern, str ); - } - - /** - * Tests whether or not a given path matches a given pattern. - * - * @param pattern The pattern to match against. Must not be - * null. - * @param str The path to match, as a String. Must not be - * null. - * @param isCaseSensitive Whether or not matching should be performed - * case sensitively. - * - * @return true if the pattern matches against the string, - * or false otherwise. - */ - protected static boolean matchPath( String pattern, String str, - boolean isCaseSensitive ) - { - return SelectorUtils.matchPath( pattern, str, isCaseSensitive ); - } - - /** - * Tests whether or not a string matches against a pattern. - * The pattern may contain two special characters:
- * '*' means zero or more characters
- * '?' means one and only one character - * - * @param pattern The pattern to match against. - * Must not be null. - * @param str The string which must be matched against the pattern. - * Must not be null. - * - * @return true if the string matches against the pattern, - * or false otherwise. - */ - public static boolean match( String pattern, String str ) - { - return SelectorUtils.match( pattern, str ); - } - - /** - * Tests whether or not a string matches against a pattern. - * The pattern may contain two special characters:
- * '*' means zero or more characters
- * '?' means one and only one character - * - * @param pattern The pattern to match against. - * Must not be null. - * @param str The string which must be matched against the pattern. - * Must not be null. - * @param isCaseSensitive Whether or not matching should be performed - * case sensitively. - * - * - * @return true if the string matches against the pattern, - * or false otherwise. - */ - protected static boolean match( String pattern, String str, - boolean isCaseSensitive ) - { - return SelectorUtils.match( pattern, str, isCaseSensitive ); - } - - /** - * Sets the base directory to be scanned. This is the directory which is - * scanned recursively. All '/' and '\' characters are replaced by - * File.separatorChar, so the separator used need not match - * File.separatorChar. - * - * @param basedir The base directory to scan. - * Must not be null. - */ - public void setBasedir( String basedir ) - { - setBasedir( new File( basedir.replace( '/', File.separatorChar ).replace( - '\\', File.separatorChar ) ) ); - } - - /** - * Sets the base directory to be scanned. This is the directory which is - * scanned recursively. - * - * @param basedir The base directory for scanning. - * Should not be null. - */ - public void setBasedir( File basedir ) - { - this.basedir = basedir; - } - - /** - * Returns the base directory to be scanned. - * This is the directory which is scanned recursively. - * - * @return the base directory to be scanned - */ - public File getBasedir() - { - return basedir; - } - - /** - * Sets whether or not the file system should be regarded as case sensitive. - * - * @param isCaseSensitive whether or not the file system should be - * regarded as a case sensitive one - */ - public void setCaseSensitive( boolean isCaseSensitive ) - { - this.isCaseSensitive = isCaseSensitive; - } - - /** - * Sets whether or not symbolic links should be followed. - * - * @param followSymlinks whether or not symbolic links should be followed - */ - public void setFollowSymlinks( boolean followSymlinks ) - { - this.followSymlinks = followSymlinks; - } - - /** - * Sets the list of include patterns to use. All '/' and '\' characters - * are replaced by File.separatorChar, so the separator used - * need not match File.separatorChar. - *

- * When a pattern ends with a '/' or '\', "**" is appended. - * - * @param includes A list of include patterns. - * May be null, indicating that all files - * should be included. If a non-null - * list is given, all elements must be - * non-null. - */ - public void setIncludes( String[] includes ) - { - if ( includes == null ) - { - this.includes = null; - } - else - { - this.includes = new String[includes.length]; - for ( int i = 0; i < includes.length; i++ ) - { - String pattern; - pattern = includes[i].trim().replace( '/', File.separatorChar ).replace( - '\\', File.separatorChar ); - if ( pattern.endsWith( File.separator ) ) - { - pattern += "**"; - } - this.includes[i] = pattern; - } - } - } - - - /** - * Sets the list of exclude patterns to use. All '/' and '\' characters - * are replaced by File.separatorChar, so the separator used - * need not match File.separatorChar. - *

- * When a pattern ends with a '/' or '\', "**" is appended. - * - * @param excludes A list of exclude patterns. - * May be null, indicating that no files - * should be excluded. If a non-null list is - * given, all elements must be non-null. - */ - public void setExcludes( String[] excludes ) - { - if ( excludes == null ) - { - this.excludes = null; - } - else - { - this.excludes = new String[excludes.length]; - for ( int i = 0; i < excludes.length; i++ ) - { - String pattern; - pattern = excludes[i].trim().replace( '/', File.separatorChar ).replace( - '\\', File.separatorChar ); - if ( pattern.endsWith( File.separator ) ) - { - pattern += "**"; - } - this.excludes[i] = pattern; - } - } - } - - /** - * Returns whether or not the scanner has included all the files or - * directories it has come across so far. - * - * @return true if all files and directories which have - * been found so far have been included. - */ - public boolean isEverythingIncluded() - { - return everythingIncluded; - } - - /** - * Scans the base directory for files which match at least one include - * pattern and don't match any exclude patterns. If there are selectors - * then the files must pass muster there, as well. - * - * @exception IllegalStateException if the base directory was set - * incorrectly (i.e. if it is null, doesn't exist, - * or isn't a directory). - */ - public void scan() throws IllegalStateException - { - if ( basedir == null ) - { - throw new IllegalStateException( "No basedir set" ); - } - if ( !basedir.exists() ) - { - throw new IllegalStateException( "basedir " + basedir - + " does not exist" ); - } - if ( !basedir.isDirectory() ) - { - throw new IllegalStateException( "basedir " + basedir - + " is not a directory" ); - } - - if ( includes == null ) - { - // No includes supplied, so set it to 'matches all' - includes = new String[1]; - includes[0] = "**"; - } - if ( excludes == null ) - { - excludes = new String[0]; - } - - filesIncluded = new Vector(); - filesNotIncluded = new Vector(); - filesExcluded = new Vector(); - filesDeselected = new Vector(); - dirsIncluded = new Vector(); - dirsNotIncluded = new Vector(); - dirsExcluded = new Vector(); - dirsDeselected = new Vector(); - - if ( isIncluded( "" ) ) - { - if ( !isExcluded( "" ) ) - { - if ( isSelected( "", basedir ) ) - { - dirsIncluded.addElement( "" ); - } - else - { - dirsDeselected.addElement( "" ); - } - } - else - { - dirsExcluded.addElement( "" ); - } - } - else - { - dirsNotIncluded.addElement( "" ); - } - scandir( basedir, "", true ); - } - - /** - * Top level invocation for a slow scan. A slow scan builds up a full - * list of excluded/included files/directories, whereas a fast scan - * will only have full results for included files, as it ignores - * directories which can't possibly hold any included files/directories. - *

- * Returns immediately if a slow scan has already been completed. - */ - protected void slowScan() - { - if ( haveSlowResults ) - { - return; - } - - String[] excl = new String[dirsExcluded.size()]; - dirsExcluded.copyInto( excl ); - - String[] notIncl = new String[dirsNotIncluded.size()]; - dirsNotIncluded.copyInto( notIncl ); - - for ( int i = 0; i < excl.length; i++ ) - { - if ( !couldHoldIncluded( excl[i] ) ) - { - scandir( new File( basedir, excl[i] ), - excl[i] + File.separator, false ); - } - } - - for ( int i = 0; i < notIncl.length; i++ ) - { - if ( !couldHoldIncluded( notIncl[i] ) ) - { - scandir( new File( basedir, notIncl[i] ), - notIncl[i] + File.separator, false ); - } - } - - haveSlowResults = true; - } - - /** - * Scans the given directory for files and directories. Found files and - * directories are placed in their respective collections, based on the - * matching of includes, excludes, and the selectors. When a directory - * is found, it is scanned recursively. - * - * @param dir The directory to scan. Must not be null. - * @param vpath The path relative to the base directory (needed to - * prevent problems with an absolute path when using - * dir). Must not be null. - * @param fast Whether or not this call is part of a fast scan. - * @throws IOException - * - * @see #filesIncluded - * @see #filesNotIncluded - * @see #filesExcluded - * @see #dirsIncluded - * @see #dirsNotIncluded - * @see #dirsExcluded - * @see #slowScan - */ - protected void scandir( File dir, String vpath, boolean fast ) - { - String[] newfiles = dir.list(); - - if ( newfiles == null ) - { - /* - * two reasons are mentioned in the API docs for File.list - * (1) dir is not a directory. This is impossible as - * we wouldn't get here in this case. - * (2) an IO error occurred (why doesn't it throw an exception - * then???) - */ - - - /* - * [jdcasey] (2) is apparently happening to me, as this is killing one of my tests... - * this is affecting the assembly plugin, fwiw. I will initialize the newfiles array as - * zero-length for now. - * - * NOTE: I can't find the problematic code, as it appears to come from a native method - * in UnixFileSystem... - */ - newfiles = new String[0]; - - // throw new IOException( "IO error scanning directory " + dir.getAbsolutePath() ); - } - - if ( !followSymlinks ) - { - Vector noLinks = new Vector(); - for ( int i = 0; i < newfiles.length; i++ ) - { - try - { - if ( isSymbolicLink( dir, newfiles[i] ) ) - { - String name = vpath + newfiles[i]; - File file = new File( dir, newfiles[i] ); - if ( file.isDirectory() ) - { - dirsExcluded.addElement( name ); - } - else - { - filesExcluded.addElement( name ); - } - } - else - { - noLinks.addElement( newfiles[i] ); - } - } - catch ( IOException ioe ) - { - String msg = "IOException caught while checking " - + "for links, couldn't get cannonical path!"; - // will be caught and redirected to Ant's logging system - System.err.println( msg ); - noLinks.addElement( newfiles[i] ); - } - } - newfiles = new String[noLinks.size()]; - noLinks.copyInto( newfiles ); - } - - for ( int i = 0; i < newfiles.length; i++ ) - { - String name = vpath + newfiles[i]; - File file = new File( dir, newfiles[i] ); - if ( file.isDirectory() ) - { - if ( isIncluded( name ) ) - { - if ( !isExcluded( name ) ) - { - if ( isSelected( name, file ) ) - { - dirsIncluded.addElement( name ); - if ( fast ) - { - scandir( file, name + File.separator, fast ); - } - } - else - { - everythingIncluded = false; - dirsDeselected.addElement( name ); - if ( fast && couldHoldIncluded( name ) ) - { - scandir( file, name + File.separator, fast ); - } - } - - } - else - { - everythingIncluded = false; - dirsExcluded.addElement( name ); - if ( fast && couldHoldIncluded( name ) ) - { - scandir( file, name + File.separator, fast ); - } - } - } - else - { - everythingIncluded = false; - dirsNotIncluded.addElement( name ); - if ( fast && couldHoldIncluded( name ) ) - { - scandir( file, name + File.separator, fast ); - } - } - if ( !fast ) - { - scandir( file, name + File.separator, fast ); - } - } - else if ( file.isFile() ) - { - if ( isIncluded( name ) ) - { - if ( !isExcluded( name ) ) - { - if ( isSelected( name, file ) ) - { - filesIncluded.addElement( name ); - } - else - { - everythingIncluded = false; - filesDeselected.addElement( name ); - } - } - else - { - everythingIncluded = false; - filesExcluded.addElement( name ); - } - } - else - { - everythingIncluded = false; - filesNotIncluded.addElement( name ); - } - } - } - } - - /** - * Tests whether or not a name matches against at least one include - * pattern. - * - * @param name The name to match. Must not be null. - * @return true when the name matches against at least one - * include pattern, or false otherwise. - */ - protected boolean isIncluded( String name ) - { - for ( int i = 0; i < includes.length; i++ ) - { - if ( matchPath( includes[i], name, isCaseSensitive ) ) - { - return true; - } - } - return false; - } - - /** - * Tests whether or not a name matches the start of at least one include - * pattern. - * - * @param name The name to match. Must not be null. - * @return true when the name matches against the start of at - * least one include pattern, or false otherwise. - */ - protected boolean couldHoldIncluded( String name ) - { - for ( int i = 0; i < includes.length; i++ ) - { - if ( matchPatternStart( includes[i], name, isCaseSensitive ) ) - { - return true; - } - } - return false; - } - - /** - * Tests whether or not a name matches against at least one exclude - * pattern. - * - * @param name The name to match. Must not be null. - * @return true when the name matches against at least one - * exclude pattern, or false otherwise. - */ - protected boolean isExcluded( String name ) - { - for ( int i = 0; i < excludes.length; i++ ) - { - if ( matchPath( excludes[i], name, isCaseSensitive ) ) - { - return true; - } - } - return false; - } - - /** - * Tests whether a name should be selected. - * - * @param name the filename to check for selecting - * @param file the java.io.File object for this filename - * @return false when the selectors says that the file - * should not be selected, true otherwise. - */ - protected boolean isSelected( String name, File file ) - { - return true; - } - - /** - * Returns the names of the files which matched at least one of the - * include patterns and none of the exclude patterns. - * The names are relative to the base directory. - * - * @return the names of the files which matched at least one of the - * include patterns and none of the exclude patterns. - */ - public String[] getIncludedFiles() - { - String[] files = new String[filesIncluded.size()]; - filesIncluded.copyInto( files ); - return files; - } - - /** - * Returns the names of the files which matched none of the include - * patterns. The names are relative to the base directory. This involves - * performing a slow scan if one has not already been completed. - * - * @return the names of the files which matched none of the include - * patterns. - * - * @see #slowScan - */ - public String[] getNotIncludedFiles() - { - slowScan(); - String[] files = new String[filesNotIncluded.size()]; - filesNotIncluded.copyInto( files ); - return files; - } - - /** - * Returns the names of the files which matched at least one of the - * include patterns and at least one of the exclude patterns. - * The names are relative to the base directory. This involves - * performing a slow scan if one has not already been completed. - * - * @return the names of the files which matched at least one of the - * include patterns and at at least one of the exclude patterns. - * - * @see #slowScan - */ - public String[] getExcludedFiles() - { - slowScan(); - String[] files = new String[filesExcluded.size()]; - filesExcluded.copyInto( files ); - return files; - } - - /** - *

Returns the names of the files which were selected out and - * therefore not ultimately included.

- * - *

The names are relative to the base directory. This involves - * performing a slow scan if one has not already been completed.

- * - * @return the names of the files which were deselected. - * - * @see #slowScan - */ - public String[] getDeselectedFiles() - { - slowScan(); - String[] files = new String[filesDeselected.size()]; - filesDeselected.copyInto( files ); - return files; - } - - /** - * Returns the names of the directories which matched at least one of the - * include patterns and none of the exclude patterns. - * The names are relative to the base directory. - * - * @return the names of the directories which matched at least one of the - * include patterns and none of the exclude patterns. - */ - public String[] getIncludedDirectories() - { - String[] directories = new String[dirsIncluded.size()]; - dirsIncluded.copyInto( directories ); - return directories; - } - - /** - * Returns the names of the directories which matched none of the include - * patterns. The names are relative to the base directory. This involves - * performing a slow scan if one has not already been completed. - * - * @return the names of the directories which matched none of the include - * patterns. - * - * @see #slowScan - */ - public String[] getNotIncludedDirectories() - { - slowScan(); - String[] directories = new String[dirsNotIncluded.size()]; - dirsNotIncluded.copyInto( directories ); - return directories; - } - - /** - * Returns the names of the directories which matched at least one of the - * include patterns and at least one of the exclude patterns. - * The names are relative to the base directory. This involves - * performing a slow scan if one has not already been completed. - * - * @return the names of the directories which matched at least one of the - * include patterns and at least one of the exclude patterns. - * - * @see #slowScan - */ - public String[] getExcludedDirectories() - { - slowScan(); - String[] directories = new String[dirsExcluded.size()]; - dirsExcluded.copyInto( directories ); - return directories; - } - - /** - *

Returns the names of the directories which were selected out and - * therefore not ultimately included.

- * - *

The names are relative to the base directory. This involves - * performing a slow scan if one has not already been completed.

- * - * @return the names of the directories which were deselected. - * - * @see #slowScan - */ - public String[] getDeselectedDirectories() - { - slowScan(); - String[] directories = new String[dirsDeselected.size()]; - dirsDeselected.copyInto( directories ); - return directories; - } - - /** - * Adds default exclusions to the current exclusions set. - */ - public void addDefaultExcludes() - { - int excludesLength = excludes == null ? 0 : excludes.length; - String[] newExcludes; - newExcludes = new String[excludesLength + DEFAULTEXCLUDES.length]; - if ( excludesLength > 0 ) - { - System.arraycopy( excludes, 0, newExcludes, 0, excludesLength ); - } - for ( int i = 0; i < DEFAULTEXCLUDES.length; i++ ) - { - newExcludes[i + excludesLength] = DEFAULTEXCLUDES[i].replace( '/', - File.separatorChar ).replace( '\\', File.separatorChar ); - } - excludes = newExcludes; - } - - /** - * Checks whether a given file is a symbolic link. - * - *

It doesn't really test for symbolic links but whether the - * canonical and absolute paths of the file are identical - this - * may lead to false positives on some platforms.

- * - * @param parent the parent directory of the file to test - * @param name the name of the file to test. - * - * @since Ant 1.5 - */ - public boolean isSymbolicLink( File parent, String name ) - throws IOException - { - File resolvedParent = new File( parent.getCanonicalPath() ); - File toTest = new File( resolvedParent, name ); - return !toTest.getAbsolutePath().equals( toTest.getCanonicalPath() ); - } - -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/DirectoryWalkListener.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/DirectoryWalkListener.java deleted file mode 100644 index 66c0eb8aa..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/DirectoryWalkListener.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.codehaus.plexus.util; - -/* - * Copyright 2001-2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.File; - -/** - * DirectoryWalkListener - */ -public interface DirectoryWalkListener -{ - /** - * The directory walking has begun. - * - * @param basedir the basedir that walk started in. - */ - void directoryWalkStarting( File basedir ); - - /** - * The included entry that was encountered. - * - * @param percentage rough percentage of the walk completed. (inaccurate) - * @param file the file that was included. - */ - void directoryWalkStep( int percentage, File file ); - - /** - * The directory walking has finished. - */ - void directoryWalkFinished(); - - void debug( String message ); -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/DirectoryWalker.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/DirectoryWalker.java deleted file mode 100644 index 92c1b9e08..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/DirectoryWalker.java +++ /dev/null @@ -1,442 +0,0 @@ -package org.codehaus.plexus.util; - -/* - * Copyright 2001-2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.File; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Stack; - -/** - * DirectoryWalker - */ -public class DirectoryWalker -{ - /** - * DirStackEntry is an Item on the {@link DirectoryWalker#dirStack} - */ - class DirStackEntry - { - /** - * Count of files in the directory. - */ - public int count; - - /** - * Current Directory. - */ - public File dir; - - /** - * Index (or offset) within the directory count. - */ - public int index; - - /** - * Offset for percentage calculations. Based on parent DirStackEntry. - */ - public double percentageOffset; - - /** - * Size of percentage space to work with. - */ - public double percentageSize; - - /** - * Create a DirStackEntry. - * - * @param d the directory to track - * @param length the length of entries in the directory. - */ - public DirStackEntry( File d, int length ) - { - dir = d; - count = length; - } - - /** - * Calculate the next percentage offset. - * Used by the next DirStackEntry. - * - * @return the value for the next percentage offset. - */ - public double getNextPercentageOffset() - { - return percentageOffset + ( index * ( percentageSize / count ) ); - } - - /** - * Calculate the next percentage size. - * Used by the next DirStackEntry. - * - * @return the value for the next percentage size. - */ - public double getNextPercentageSize() - { - return ( percentageSize / count ); - } - - /** - * The percentage of the DirStackEntry right now. - * Based on count, index, percentageOffset, and percentageSize. - * - * @return the percentage right now. - */ - public int getPercentage() - { - double percentageWithinDir = (double) index / (double) count; - return (int) Math.floor( percentageOffset + ( percentageWithinDir * percentageSize ) ); - } - - public String toString() - { - return "DirStackEntry[" + "dir=" + dir.getAbsolutePath() + ",count=" + count + ",index=" + index - + ",percentageOffset=" + percentageOffset + ",percentageSize=" + percentageSize + ",percentage()=" - + getPercentage() + ",getNextPercentageOffset()=" + getNextPercentageOffset() - + ",getNextPercentageSize()=" + getNextPercentageSize() + "]"; - } - } - - private File baseDir; - - private int baseDirOffset; - - private Stack dirStack; - - private List excludes; - - private List includes; - - private boolean isCaseSensitive = true; - - private List listeners; - - private boolean debugEnabled = false; - - public DirectoryWalker() - { - this.includes = new ArrayList(); - this.excludes = new ArrayList(); - this.listeners = new ArrayList(); - } - - public void addDirectoryWalkListener( DirectoryWalkListener listener ) - { - this.listeners.add( listener ); - } - - public void addExclude( String exclude ) - { - this.excludes.add( fixPattern( exclude ) ); - } - - public void addInclude( String include ) - { - this.includes.add( fixPattern( include ) ); - } - - /** - * Add's to the Exclude List the default list of SCM excludes. - */ - public void addSCMExcludes() - { - String scmexcludes[] = DirectoryScanner.DEFAULTEXCLUDES; - for ( int i = 0; i < scmexcludes.length; i++ ) - { - addExclude( scmexcludes[i] ); - } - } - - private void fireStep( File file ) - { - DirStackEntry dsEntry = (DirStackEntry) dirStack.peek(); - int percentage = dsEntry.getPercentage(); - Iterator it = this.listeners.iterator(); - while ( it.hasNext() ) - { - DirectoryWalkListener listener = (DirectoryWalkListener) it.next(); - listener.directoryWalkStep( percentage, file ); - } - } - - private void fireWalkFinished() - { - Iterator it = this.listeners.iterator(); - while ( it.hasNext() ) - { - DirectoryWalkListener listener = (DirectoryWalkListener) it.next(); - listener.directoryWalkFinished(); - } - } - - private void fireWalkStarting() - { - Iterator it = this.listeners.iterator(); - while ( it.hasNext() ) - { - DirectoryWalkListener listener = (DirectoryWalkListener) it.next(); - listener.directoryWalkStarting( this.baseDir ); - } - } - - private void fireDebugMessage( String message ) - { - Iterator it = this.listeners.iterator(); - while ( it.hasNext() ) - { - DirectoryWalkListener listener = (DirectoryWalkListener) it.next(); - listener.debug( message ); - } - } - - private String fixPattern( String pattern ) - { - String cleanPattern = pattern; - - if ( File.separatorChar != '/' ) - { - cleanPattern = cleanPattern.replace( '/', File.separatorChar ); - } - - if ( File.separatorChar != '\\' ) - { - cleanPattern = cleanPattern.replace( '\\', File.separatorChar ); - } - - return cleanPattern; - } - - public void setDebugMode( boolean debugEnabled ) - { - this.debugEnabled = debugEnabled; - } - - /** - * @return Returns the baseDir. - */ - public File getBaseDir() - { - return baseDir; - } - - /** - * @return Returns the excludes. - */ - public List getExcludes() - { - return excludes; - } - - /** - * @return Returns the includes. - */ - public List getIncludes() - { - return includes; - } - - private boolean isExcluded( String name ) - { - return isMatch( this.excludes, name ); - } - - private boolean isIncluded( String name ) - { - return isMatch( this.includes, name ); - } - - private boolean isMatch( List patterns, String name ) - { - Iterator it = patterns.iterator(); - while ( it.hasNext() ) - { - String pattern = (String) it.next(); - if ( SelectorUtils.matchPath( pattern, name, isCaseSensitive ) ) - { - return true; - } - } - - return false; - } - - private String relativeToBaseDir( File file ) - { - return file.getAbsolutePath().substring( baseDirOffset + 1 ); - } - - /** - * Removes a DirectoryWalkListener. - * - * @param listener the listener to remove. - */ - public void removeDirectoryWalkListener( DirectoryWalkListener listener ) - { - this.listeners.remove( listener ); - } - - /** - * Performs a Scan against the provided {@link #setBaseDir(File)} - */ - public void scan() - { - if ( baseDir == null ) - { - throw new IllegalStateException( "Scan Failure. BaseDir not specified." ); - } - - if ( !baseDir.exists() ) - { - throw new IllegalStateException( "Scan Failure. BaseDir does not exist." ); - } - - if ( !baseDir.isDirectory() ) - { - throw new IllegalStateException( "Scan Failure. BaseDir is not a directory." ); - } - - if ( this.includes.isEmpty() ) - { - // default to include all. - addInclude( "**" ); - } - - if ( debugEnabled ) - { - Iterator it; - StringBuffer dbg = new StringBuffer(); - dbg.append( "DirectoryWalker Scan" ); - dbg.append( "\n Base Dir: " ).append( this.baseDir.getAbsolutePath() ); - dbg.append( "\n Includes: " ); - it = this.includes.iterator(); - while ( it.hasNext() ) - { - String include = (String) it.next(); - dbg.append( "\n - \"" ).append( include ).append( "\"" ); - } - dbg.append( "\n Excludes: " ); - it = this.excludes.iterator(); - while ( it.hasNext() ) - { - String exclude = (String) it.next(); - dbg.append( "\n - \"" ).append( exclude ).append( "\"" ); - } - fireDebugMessage( dbg.toString() ); - } - - fireWalkStarting(); - dirStack = new Stack(); - scanDir( this.baseDir ); - fireWalkFinished(); - } - - private void scanDir( File dir ) - { - File files[] = dir.listFiles(); - - if ( files == null ) - { - return; - } - - DirStackEntry curStackEntry = new DirStackEntry( dir, files.length ); - if ( dirStack.isEmpty() ) - { - curStackEntry.percentageOffset = 0; - curStackEntry.percentageSize = 100; - } - else - { - DirStackEntry previousStackEntry = (DirStackEntry) dirStack.peek(); - curStackEntry.percentageOffset = previousStackEntry.getNextPercentageOffset(); - curStackEntry.percentageSize = previousStackEntry.getNextPercentageSize(); - } - - dirStack.push( curStackEntry ); - - for ( int idx = 0; idx < files.length; idx++ ) - { - curStackEntry.index = idx; - String name = relativeToBaseDir( files[idx] ); - - if ( isExcluded( name ) ) - { - fireDebugMessage( name + " is excluded." ); - continue; - } - - if ( files[idx].isDirectory() ) - { - scanDir( files[idx] ); - } - else - { - if ( isIncluded( name ) ) - { - fireStep( files[idx] ); - } - } - } - - dirStack.pop(); - } - - /** - * @param baseDir The baseDir to set. - */ - public void setBaseDir( File baseDir ) - { - this.baseDir = baseDir; - this.baseDirOffset = baseDir.getAbsolutePath().length(); - } - - /** - * @param entries The excludes to set. - */ - public void setExcludes( List entries ) - { - this.excludes.clear(); - if ( entries != null ) - { - Iterator it = entries.iterator(); - while ( it.hasNext() ) - { - String pattern = (String) it.next(); - this.excludes.add( fixPattern( pattern ) ); - } - } - } - - /** - * @param entries The includes to set. - */ - public void setIncludes( List entries ) - { - this.includes.clear(); - if ( entries != null ) - { - Iterator it = entries.iterator(); - while ( it.hasNext() ) - { - String pattern = (String) it.next(); - this.includes.add( fixPattern( pattern ) ); - } - } - } - -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/ExceptionUtils.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/ExceptionUtils.java deleted file mode 100644 index d86c88449..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/ExceptionUtils.java +++ /dev/null @@ -1,666 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2002-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.codehaus.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. - * - * 4. The names "The Jakarta Project", "Commons", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact codehaus@codehaus.org. - * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ -package org.codehaus.plexus.util; - -import java.io.PrintStream; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.LinkedList; -import java.util.List; -import java.util.StringTokenizer; - -/** - *

ExceptionUtils provides utilities for manipulating - * Throwable objects.

- * - * @author Daniel Rall - * @author Dmitri Plotnikov - * @author Stephen Colebourne - * @since 1.0 - * @version $Id$ - */ -public class ExceptionUtils -{ - /** - * Used when printing stack frames to denote the start of a - * wrapped exception. Package private for accessibility by test - * suite. - */ - static final String WRAPPED_MARKER = " [wrapped] "; - - /** - * The names of methods commonly used to access a wrapped - * exception. - */ - protected static String[] CAUSE_METHOD_NAMES = { - "getCause", - "getNextException", - "getTargetException", - "getException", - "getSourceException", - "getRootCause", - "getCausedByException", - "getNested" - }; - - /** - * Constructs a new ExceptionUtils. Protected to - * discourage instantiation. - */ - protected ExceptionUtils() - { - } - - /** - *

Adds to the list of method names used in the search for Throwable - * objects.

- * - * @param methodName the methodName to add to the list, null and empty strings are ignored - */ - public static void addCauseMethodName( String methodName ) - { - if ( methodName != null && methodName.length() > 0 ) - { - List list = new ArrayList( Arrays.asList( CAUSE_METHOD_NAMES ) ); - list.add( methodName ); - CAUSE_METHOD_NAMES = (String[]) list.toArray( new String[list.size()] ); - } - } - - /** - *

Introspects the specified Throwable to obtain the cause.

- * - *

The method searches for methods with specific names that return a - * Throwable object. This will pick up most wrapping exceptions, - * including those from JDK 1.4, and - * The method names can be added to using {@link #addCauseMethodName(String)}. - * The default list searched for are:

- *
    - *
  • getCause() - *
  • getNextException() - *
  • getTargetException() - *
  • getException() - *
  • getSourceException() - *
  • getRootCause() - *
  • getCausedByException() - *
  • getNested() - *
- * - *

In the absence of any such method, the object is inspected for a - * detail field assignable to a Throwable.

- * - *

If none of the above is found, returns null.

- * - * @param throwable The exception to introspect for a cause. - * @return The cause of the Throwable. - * @throws NullPointerException if the throwable is null - */ - public static Throwable getCause( Throwable throwable ) - { - return getCause( throwable, CAUSE_METHOD_NAMES ); - } - - /** - *

Introspects the specified Throwable to obtain the cause - * using a supplied array of method names.

- * - * @param throwable The exception to introspect for a cause. - * @return The cause of the Throwable. - * @throws NullPointerException if the method names array is null or contains null - * @throws NullPointerException if the throwable is null - */ - public static Throwable getCause( Throwable throwable, String[] methodNames ) - { - Throwable cause = getCauseUsingWellKnownTypes( throwable ); - if ( cause == null ) - { - for ( int i = 0; i < methodNames.length; i++ ) - { - cause = getCauseUsingMethodName( throwable, methodNames[i] ); - if ( cause != null ) - { - break; - } - } - - if ( cause == null ) - { - cause = getCauseUsingFieldName( throwable, "detail" ); - } - } - return cause; - } - - /** - *

Walks through the exception chain to the last element -- the - * "root" of the tree -- using {@link #getCause(Throwable)}, and - * returns that exception.

- * - * @param throwable the throwable to get the root cause for - * @return The root cause of the Throwable. - */ - public static Throwable getRootCause( Throwable throwable ) - { - Throwable cause = getCause( throwable ); - if ( cause != null ) - { - throwable = cause; - while ( ( throwable = getCause( throwable ) ) != null ) - { - cause = throwable; - } - } - return cause; - } - - /** - *

Uses instanceof checks to examine the exception, - * looking for well known types which could contain chained or - * wrapped exceptions.

- * - * @param throwable the exception to examine - * @return The wrapped exception, or null if not - * found. - */ - private static Throwable getCauseUsingWellKnownTypes( Throwable throwable ) - { - if ( throwable instanceof SQLException ) - { - return ( (SQLException) throwable ).getNextException(); - } - else if ( throwable instanceof InvocationTargetException ) - { - return ( (InvocationTargetException) throwable ).getTargetException(); - } - else - { - return null; - } - } - - /** - *

Find a throwable by method name.

- * - * @param throwable the exception to examine - * @param methodName the name of the method to find and invoke - * @return The wrapped exception, or null if not - * found. - */ - private static Throwable getCauseUsingMethodName( Throwable throwable, String methodName ) - { - Method method = null; - try - { - method = throwable.getClass().getMethod( methodName, null ); - } - catch ( NoSuchMethodException ignored ) - { - } - catch ( SecurityException ignored ) - { - } - - if ( method != null && Throwable.class.isAssignableFrom( method.getReturnType() ) ) - { - try - { - return (Throwable) method.invoke( throwable, new Object[0] ); - } - catch ( IllegalAccessException ignored ) - { - } - catch ( IllegalArgumentException ignored ) - { - } - catch ( InvocationTargetException ignored ) - { - } - } - return null; - } - - /** - *

Find a throwable by field name.

- * - * @param throwable the exception to examine - * @param fieldName the name of the attribute to examine - * @return The wrapped exception, or null if not - * found. - */ - private static Throwable getCauseUsingFieldName( Throwable throwable, String fieldName ) - { - Field field = null; - try - { - field = throwable.getClass().getField( fieldName ); - } - catch ( NoSuchFieldException ignored ) - { - } - catch ( SecurityException ignored ) - { - } - - if ( field != null && Throwable.class.isAssignableFrom( field.getType() ) ) - { - try - { - return (Throwable) field.get( throwable ); - } - catch ( IllegalAccessException ignored ) - { - } - catch ( IllegalArgumentException ignored ) - { - } - } - return null; - } - - /** - *

Returns the number of Throwable objects in the - * exception chain.

- * - * @param throwable the exception to inspect - * @return The throwable count. - */ - public static int getThrowableCount( Throwable throwable ) - { - // Count the number of throwables - int count = 0; - while ( throwable != null ) - { - count++; - throwable = ExceptionUtils.getCause( throwable ); - } - return count; - } - - /** - *

Returns the list of Throwable objects in the - * exception chain.

- * - * @param throwable the exception to inspect - * @return The list of Throwable objects. - */ - public static Throwable[] getThrowables( Throwable throwable ) - { - List list = new ArrayList(); - while ( throwable != null ) - { - list.add( throwable ); - throwable = ExceptionUtils.getCause( throwable ); - } - return (Throwable[]) list.toArray( new Throwable[list.size()] ); - } - - /** - *

Delegates to {@link #indexOfThrowable(Throwable, Class, int)}, - * starting the search at the beginning of the exception chain.

- * - * @see #indexOfThrowable(Throwable, Class, int) - */ - public static int indexOfThrowable( Throwable throwable, Class type ) - { - return indexOfThrowable( throwable, type, 0 ); - } - - /** - *

Returns the (zero based) index, of the first - * Throwable that matches the specified type in the - * exception chain of Throwable objects with an index - * greater than or equal to the specified index, or - * -1 if the type is not found.

- * - * @param throwable the exception to inspect - * @param type Class to look for - * @param fromIndex the (zero based) index of the starting - * position in the chain to be searched - * @return the first occurrence of the type in the chain, or - * -1 if the type is not found - * @throws IndexOutOfBoundsException If the fromIndex - * argument is negative or not less than the count of - * Throwables in the chain. - */ - public static int indexOfThrowable( Throwable throwable, Class type, int fromIndex ) - { - if ( fromIndex < 0 ) - { - throw new IndexOutOfBoundsException( "Throwable index out of range: " + fromIndex ); - } - Throwable[] throwables = ExceptionUtils.getThrowables( throwable ); - if ( fromIndex >= throwables.length ) - { - throw new IndexOutOfBoundsException( "Throwable index out of range: " + fromIndex ); - } - for ( int i = fromIndex; i < throwables.length; i++ ) - { - if ( throwables[i].getClass().equals( type ) ) - { - return i; - } - } - return -1; - } - - /** - * Prints a compact stack trace for the root cause of a throwable. - * The compact stack trace starts with the root cause and prints - * stack frames up to the place where it was caught and wrapped. - * Then it prints the wrapped exception and continues with stack frames - * until the wrapper exception is caught and wrapped again, etc. - *

- * The method is equivalent to t.printStackTrace() for throwables - * that don't have nested causes. - */ - public static void printRootCauseStackTrace( Throwable t, PrintStream stream ) - { - String trace[] = getRootCauseStackTrace( t ); - for ( int i = 0; i < trace.length; i++ ) - { - stream.println( trace[i] ); - } - stream.flush(); - } - - /** - * Equivalent to printRootCauseStackTrace(t, System.err) - */ - public static void printRootCauseStackTrace( Throwable t ) - { - printRootCauseStackTrace( t, System.err ); - } - - /** - * Same as printRootCauseStackTrace(t, stream), except it takes - * a PrintWriter as an argument. - */ - public static void printRootCauseStackTrace( Throwable t, PrintWriter writer ) - { - String trace[] = getRootCauseStackTrace( t ); - for ( int i = 0; i < trace.length; i++ ) - { - writer.println( trace[i] ); - } - writer.flush(); - } - - /** - * Creates a compact stack trace for the root cause of the supplied - * throwable. - * - * See printRootCauseStackTrace(Throwable t, PrintStream s) - */ - public static String[] getRootCauseStackTrace( Throwable t ) - { - Throwable throwables[] = getThrowables( t ); - int count = throwables.length; - ArrayList frames = new ArrayList(); - List nextTrace = getStackFrameList( throwables[count - 1] ); - for ( int i = count; --i >= 0; ) - { - List trace = nextTrace; - if ( i != 0 ) - { - nextTrace = getStackFrameList( throwables[i - 1] ); - removeCommonFrames( trace, nextTrace ); - } - if ( i == count - 1 ) - { - frames.add( throwables[i].toString() ); - } - else - { - frames.add( WRAPPED_MARKER + throwables[i].toString() ); - } - for ( int j = 0; j < trace.size(); j++ ) - { - frames.add( trace.get( j ) ); - } - } - return (String[]) frames.toArray( new String[0] ); - } - - /** - * Given two stack traces, removes common frames from the cause trace. - * - * @param causeFrames stack trace of a cause throwable - * @param wrapperFrames stack trace of a wrapper throwable - */ - private static void removeCommonFrames( List causeFrames, List wrapperFrames ) - { - int causeFrameIndex = causeFrames.size() - 1; - int wrapperFrameIndex = wrapperFrames.size() - 1; - while ( causeFrameIndex >= 0 && wrapperFrameIndex >= 0 ) - { - // Remove the frame from the cause trace if it is the same - // as in the wrapper trace - String causeFrame = (String) causeFrames.get( causeFrameIndex ); - String wrapperFrame = (String) wrapperFrames.get( wrapperFrameIndex ); - if ( causeFrame.equals( wrapperFrame ) ) - { - causeFrames.remove( causeFrameIndex ); - } - causeFrameIndex--; - wrapperFrameIndex--; - } - } - - /** - * A convenient way of extracting the stack trace from an - * exception. - * - * @param t The Throwable. - * @return The stack trace as generated by the exception's - * printStackTrace(PrintWriter) method. - */ - public static String getStackTrace( Throwable t ) - { - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter( sw, true ); - t.printStackTrace( pw ); - return sw.getBuffer().toString(); - } - - /** - * A way to get the entire nested stack-trace of an throwable. - * - * @param t The Throwable. - * @return The nested stack trace, with the root cause first. - */ - public static String getFullStackTrace( Throwable t ) - { - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter( sw, true ); - Throwable[] ts = getThrowables( t ); - for ( int i = 0; i < ts.length; i++ ) - { - ts[i].printStackTrace( pw ); - if ( isNestedThrowable( ts[i] ) ) - { - break; - } - } - return sw.getBuffer().toString(); - } - - /** - * Whether an Throwable is considered nested or not. - * - * @param throwable The Throwable. - * @return boolean true/false - */ - public static boolean isNestedThrowable( Throwable throwable ) - { - if ( throwable == null ) - { - return false; - } - - if ( throwable instanceof SQLException ) - { - return true; - } - else if ( throwable instanceof InvocationTargetException ) - { - return true; - } - - int sz = CAUSE_METHOD_NAMES.length; - for ( int i = 0; i < sz; i++ ) - { - try - { - Method method = throwable.getClass().getMethod( CAUSE_METHOD_NAMES[i], null ); - if ( method != null ) - { - return true; - } - } - catch ( NoSuchMethodException ignored ) - { - } - catch ( SecurityException ignored ) - { - } - } - - try - { - Field field = throwable.getClass().getField( "detail" ); - if ( field != null ) - { - return true; - } - } - catch ( NoSuchFieldException ignored ) - { - } - catch ( SecurityException ignored ) - { - } - - return false; - } - - /** - * Captures the stack trace associated with the specified - * Throwable object, decomposing it into a list of - * stack frames. - * - * @param t The Throwable. - * @return An array of strings describing each stack frame. - */ - public static String[] getStackFrames( Throwable t ) - { - return getStackFrames( getStackTrace( t ) ); - } - - /** - * Functionality shared between the - * getStackFrames(Throwable) methods of this and the - * classes. - */ - static String[] getStackFrames( String stackTrace ) - { - String linebreak = System.getProperty( "line.separator" ); - StringTokenizer frames = new StringTokenizer( stackTrace, linebreak ); - List list = new LinkedList(); - while ( frames.hasMoreTokens() ) - { - list.add( frames.nextToken() ); - } - return (String[]) list.toArray( new String[]{ - } ); - } - - /** - * Produces a List of stack frames - the message is not included. - * This works in most cases - it will only fail if the exception message - * contains a line that starts with: " at". - * - * @param t is any throwable - * @return List of stack frames - */ - static List getStackFrameList( Throwable t ) - { - String stackTrace = getStackTrace( t ); - String linebreak = System.getProperty( "line.separator" ); - StringTokenizer frames = new StringTokenizer( stackTrace, linebreak ); - List list = new LinkedList(); - boolean traceStarted = false; - while ( frames.hasMoreTokens() ) - { - String token = frames.nextToken(); - // Determine if the line starts with at - int at = token.indexOf( "at" ); - if ( at != -1 && token.substring( 0, at ).trim().length() == 0 ) - { - traceStarted = true; - list.add( token ); - } - else if ( traceStarted ) - { - break; - } - } - return list; - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/Expand.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/Expand.java deleted file mode 100644 index 7180748e3..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/Expand.java +++ /dev/null @@ -1,241 +0,0 @@ -package org.codehaus.plexus.util; - -/* - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.codehaus.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. - * - * 4. The names "The Jakarta Project", "Ant", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact codehaus@codehaus.org. - * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.Date; -import java.util.Stack; -import java.util.StringTokenizer; -import java.util.zip.ZipEntry; -import java.util.zip.ZipInputStream; - -/** - * Unzip a file. - * - * @author costin@dnt.ro - * @author Stefan Bodewig - * @author Magesh Umasankar - * @since Ant 1.1 @ant.task category="packaging" name="unzip" name="unjar" - * name="unwar" - */ -public class Expand -{ - private File dest;//req - private File source;// req - private boolean overwrite = true; - - /** - * Do the work. - * - * @exception Exception Thrown in unrecoverable error. - */ - public void execute() - throws Exception - { - expandFile( source, dest ); - } - - /* - * This method is to be overridden by extending unarchival tasks. - */ - /** - * Description of the Method - */ - protected void expandFile( File srcF, File dir ) - throws Exception - { - ZipInputStream zis = null; - try - { - // code from WarExpand - zis = new ZipInputStream( new FileInputStream( srcF ) ); - ZipEntry ze = null; - - while ( ( ze = zis.getNextEntry() ) != null ) - { - extractFile( srcF, - dir, zis, - ze.getName(), - new Date( ze.getTime() ), - ze.isDirectory() ); - } - - //log("expand complete", Project.MSG_VERBOSE); - } - catch ( IOException ioe ) - { - throw new Exception("Error while expanding " + srcF.getPath(), ioe); - } - finally - { - if ( zis != null ) - { - try - { - zis.close(); - } - catch ( IOException e ) - { - } - } - } - } - - /** - * Description of the Method - */ - protected void extractFile( File srcF, - File dir, - InputStream compressedInputStream, - String entryName, - Date entryDate, - boolean isDirectory ) - throws Exception - { - File f = FileUtils.resolveFile( dir, entryName ); - try - { - if ( !overwrite && f.exists() - && - f.lastModified() >= entryDate.getTime() ) - { - return; - } - - // create intermediary directories - sometimes zip don't add them - File dirF = f.getParentFile(); - dirF.mkdirs(); - - if ( isDirectory ) - { - f.mkdirs(); - } - else - { - byte[] buffer = new byte[1024]; - int length = 0; - FileOutputStream fos = null; - try - { - fos = new FileOutputStream( f ); - - while ( ( length = - compressedInputStream.read( buffer ) ) >= 0 ) - { - fos.write( buffer, 0, length ); - } - - fos.close(); - fos = null; - } - finally - { - if ( fos != null ) - { - try - { - fos.close(); - } - catch ( IOException e ) - { - } - } - } - } - - f.setLastModified( entryDate.getTime() ); - } - catch ( FileNotFoundException ex ) - { - throw new Exception( "Can't extract file " + srcF.getPath(), ex ); - } - - } - - /** - * Set the destination directory. File will be unzipped into the destination - * directory. - * - * @param d Path to the directory. - */ - public void setDest( File d ) - { - this.dest = d; - } - - /** - * Set the path to zip-file. - * - * @param s Path to zip-file. - */ - public void setSrc( File s ) - { - this.source = s; - } - - /** - * Should we overwrite files in dest, even if they are newer than the - * corresponding entries in the archive? - */ - public void setOverwrite( boolean b ) - { - overwrite = b; - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/FastMap.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/FastMap.java deleted file mode 100644 index 1a9326099..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/FastMap.java +++ /dev/null @@ -1,928 +0,0 @@ -/* - * J.A.D.E. Java(TM) Addition to Default Environment. - * Latest release available at http://jade.dautelle.com/ - * This class is public domain (not copyrighted). - */ -package org.codehaus.plexus.util; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.Serializable; -import java.util.AbstractCollection; -import java.util.AbstractSet; -import java.util.Collection; -import java.util.Iterator; -import java.util.Map; -import java.util.Set; - -/** - *

This class represents a Map collection with real-time - * behavior. Unless the map's size exceeds its current capacity, - * no dynamic memory allocation is ever performed and response time is - * extremely fast and consistent.

- * - *

Our benchmark - * indicates that {@link FastMap#put FastMap.put(key, value)} is up to - * 5x faster than java.util.HashMap.put(key, value). - * This difference is mostly due to the cost of the Map.Entry - * allocations that {@link FastMap} avoids by recycling its entries - * (see note below).

- * - *

{@link FastMap} has a predictable iteration order, which is the order - * in which keys were inserted into the map (similar to - * java.util.LinkedHashMap collection class).

- * - *

Applications may change the resizing policy of {@link FastMap} - * by overriding the {@link #sizeChanged} method. For example, to improve - * predictability, automatic resizing can be disabled.

- * - *

This implementation is not synchronized. Multiple threads accessing - * or modifying the collection must be synchronized externally.

- * - *

Note: To avoid dynamic memory allocations, {@link FastMap} - * maintains an internal pool of Map.Entry objects. The size - * of the pool is determined by the map's capacity. When an entry is - * removed from the map, it is automatically restored to the pool.

- * - *

This class is public domain (not copyrighted).

- * - * @author Jean-Marie Dautelle - * @version 5.3, October 31 2003 - */ -public class FastMap implements Map, Cloneable, Serializable { - - /** - * Holds the map's hash table. - */ - private transient EntryImpl[] _entries; - - /** - * Holds the map's current capacity. - */ - private transient int _capacity; - - /** - * Holds the hash code mask. - */ - private transient int _mask; - - /** - * Holds the first pool entry (linked list). - */ - private transient EntryImpl _poolFirst; - - /** - * Holds the first map entry (linked list). - */ - private transient EntryImpl _mapFirst; - - /** - * Holds the last map entry (linked list). - */ - private transient EntryImpl _mapLast; - - /** - * Holds the current size. - */ - private transient int _size; - - /** - * Creates a {@link FastMap} with a capacity of 256 entries. - */ - public FastMap() { - initialize(256); - } - - /** - * Creates a {@link FastMap}, copy of the specified Map. - * If the specified map is not an instance of {@link FastMap}, the - * newly created map has a capacity set to the specified map's size. - * The copy has the same order as the original, regardless of the original - * map's implementation:
-     *     TreeMap dictionary = ...;
-     *     FastMap dictionaryLookup = new FastMap(dictionary);
-     * 
- * - * @param map the map whose mappings are to be placed in this map. - */ - public FastMap(Map map) { - int capacity = (map instanceof FastMap) ? - ((FastMap)map).capacity() : map.size(); - initialize(capacity); - putAll(map); - } - - /** - * Creates a {@link FastMap} with the specified capacity. Unless the - * capacity is exceeded, operations on this map do not allocate entries. - * For optimum performance, the capacity should be of the same order - * of magnitude or larger than the expected map's size. - * - * @param capacity the number of buckets in the hash table; it also - * defines the number of pre-allocated entries. - */ - public FastMap(int capacity) { - initialize(capacity); - } - - /** - * Returns the number of key-value mappings in this {@link FastMap}. - * - * @return this map's size. - */ - public int size() { - return _size; - } - - /** - * Returns the capacity of this {@link FastMap}. The capacity defines - * the number of buckets in the hash table, as well as the maximum number - * of entries the map may contain without allocating memory. - * - * @return this map's capacity. - */ - public int capacity() { - return _capacity; - } - - /** - * Indicates if this {@link FastMap} contains no key-value mappings. - * - * @return true if this map contains no key-value mappings; - * false otherwise. - */ - public boolean isEmpty() { - return _size == 0; - } - - /** - * Indicates if this {@link FastMap} contains a mapping for the specified - * key. - * - * @param key the key whose presence in this map is to be tested. - * @return true if this map contains a mapping for the - * specified key; false otherwise. - * @throws NullPointerException if the key is null. - */ - public boolean containsKey(Object key) { - EntryImpl entry = _entries[keyHash(key) & _mask]; - while (entry != null) { - if (key.equals(entry._key) ) { - return true; - } - entry = entry._next; - } - return false; - } - - /** - * Indicates if this {@link FastMap} maps one or more keys to the - * specified value. - * - * @param value the value whose presence in this map is to be tested. - * @return true if this map maps one or more keys to the - * specified value. - * @throws NullPointerException if the key is null. - */ - public boolean containsValue(Object value) { - EntryImpl entry = _mapFirst; - while (entry != null) { - if (value.equals(entry._value) ) { - return true; - } - entry = entry._after; - } - return false; - } - - /** - * Returns the value to which this {@link FastMap} maps the specified key. - * - * @param key the key whose associated value is to be returned. - * @return the value to which this map maps the specified key, - * or null if there is no mapping for the key. - * @throws NullPointerException if key is null. - */ - public Object get(Object key) { - EntryImpl entry = _entries[keyHash(key) & _mask]; - while (entry != null) { - if (key.equals(entry._key) ) { - return entry._value; - } - entry = entry._next; - } - return null; - } - - /** - * Returns the entry with the specified key. - * - * @param key the key whose associated entry is to be returned. - * @return the entry for the specified key or null if none. - */ - public Map.Entry getEntry(Object key) { - EntryImpl entry = _entries[keyHash(key) & _mask]; - while (entry != null) { - if (key.equals(entry._key)) { - return entry; - } - entry = entry._next; - } - return null; - } - - /** - * Associates the specified value with the specified key in this - * {@link FastMap}. If the {@link FastMap} previously contained a mapping - * for this key, the old value is replaced. - * - * @param key the key with which the specified value is to be associated. - * @param value the value to be associated with the specified key. - * @return the previous value associated with specified key, - * or null if there was no mapping for key. - * A null return can also indicate that the map - * previously associated null with the specified key. - * @throws NullPointerException if the key is null. - */ - public Object put(Object key, Object value) { - EntryImpl entry = _entries[keyHash(key) & _mask]; - while (entry != null) { - if (key.equals(entry._key) ) { - Object prevValue = entry._value; - entry._value = value; - return prevValue; - } - entry = entry._next; - } - // No previous mapping. - addEntry(key, value); - return null; - } - - /** - * Copies all of the mappings from the specified map to this - * {@link FastMap}. - * - * @param map the mappings to be stored in this map. - * @throws NullPointerException the specified map is null, or - * the specified map contains null keys. - */ - public void putAll(Map map) { - for (Iterator i = map.entrySet().iterator(); i.hasNext(); ) { - Map.Entry e = (Map.Entry) i.next(); - addEntry(e.getKey(), e.getValue()); - } - } - - /** - * Removes the mapping for this key from this {@link FastMap} if present. - * - * @param key the key whose mapping is to be removed from the map. - * @return previous value associated with specified key, - * or null if there was no mapping for key. - * A null return can also indicate that the map - * previously associated null with the specified key. - * @throws NullPointerException if the key is null. - */ - public Object remove(Object key) { - EntryImpl entry = _entries[keyHash(key) & _mask]; - while (entry != null) { - if (key.equals(entry._key) ) { - Object prevValue = entry._value; - removeEntry(entry); - return prevValue; - } - entry = entry._next; - } - return null; - } - - /** - * Removes all mappings from this {@link FastMap}. - */ - public void clear() { - // Clears all keys, values and buckets linked lists. - for (EntryImpl entry = _mapFirst; entry != null; entry = entry._after) { - entry._key = null; - entry._value = null; - entry._before = null; - entry._next = null; - if (entry._previous == null) { // First in bucket. - _entries[entry._index] = null; - } else { - entry._previous = null; - } - } - - // Recycles all entries. - if (_mapLast != null) { - _mapLast._after = _poolFirst; // Connects to pool. - _poolFirst = _mapFirst; - _mapFirst = null; - _mapLast = null; - _size = 0; - sizeChanged(); - } - } - - /** - * Changes the current capacity of this {@link FastMap}. If the capacity - * is increased, new entries are allocated and added to the pool. - * If the capacity is decreased, entries from the pool are deallocated - * (and are eventually garbage collected). The capacity also determined - * the number of buckets for the hash table. - * - * @param newCapacity the new capacity of this map. - */ - public void setCapacity(int newCapacity) { - if (newCapacity > _capacity) { // Capacity increases. - for (int i = _capacity; i < newCapacity; i++) { - EntryImpl entry = new EntryImpl(); - entry._after = _poolFirst; - _poolFirst = entry; - } - } else if (newCapacity < _capacity) { // Capacity decreases. - for ( int i = newCapacity; - (i < _capacity) && (_poolFirst != null); i++) { - // Disconnects the entry for gc to do its work. - EntryImpl entry = _poolFirst; - _poolFirst = entry._after; - entry._after = null; // All pointers are now null! - } - } - // Find a power of 2 >= capacity - int tableLength = 16; - while (tableLength < newCapacity) { - tableLength <<= 1; - } - // Checks if the hash table has to be re-sized. - if (_entries.length != tableLength) { - _entries = new EntryImpl[tableLength]; - _mask = tableLength - 1; - - // Repopulates the hash table. - EntryImpl entry = _mapFirst; - while (entry != null) { - int index = keyHash(entry._key) & _mask; - entry._index = index; - - // Connects to bucket. - entry._previous = null; // Resets previous. - EntryImpl next = _entries[index]; - entry._next = next; - if (next != null) { - next._previous = entry; - } - _entries[index] = entry; - - entry = entry._after; - } - } - _capacity = newCapacity; - } - - /** - * Returns a shallow copy of this {@link FastMap}. The keys and - * the values themselves are not cloned. - * - * @return a shallow copy of this map. - */ - public Object clone() { - try { - FastMap clone = (FastMap) super.clone(); - clone.initialize(_capacity); - clone.putAll(this); - return clone; - } catch (CloneNotSupportedException e) { - // Should not happen, since we are Cloneable. - throw new InternalError(); - } - } - - /** - * Compares the specified object with this {@link FastMap} for equality. - * Returns true if the given object is also a map and the two - * maps represent the same mappings (regardless of collection iteration - * order). - * - * @param obj the object to be compared for equality with this map. - * @return true if the specified object is equal to this map; - * false otherwise. - */ - public boolean equals(Object obj) { - if (obj == this) { - return true; - } else if (obj instanceof Map) { - Map that = (Map) obj; - if (this.size() == that.size()) { - EntryImpl entry = _mapFirst; - while (entry != null) { - if (!that.entrySet().contains(entry)) { - return false; - } - entry = entry._after; - } - return true; - } else { - return false; - } - } else { - return false; - } - } - - /** - * Returns the hash code value for this {@link FastMap}. - * - * @return the hash code value for this map. - */ - public int hashCode() { - int code = 0; - EntryImpl entry = _mapFirst; - while (entry != null) { - code += entry.hashCode(); - entry = entry._after; - } - return code; - } - - /** - * Returns a String representation of this {@link FastMap}. - * - * @return this.entrySet().toString(); - */ - public String toString() { - return entrySet().toString(); - } - - /** - * Returns a collection view of the values contained in this - * {@link FastMap}. The collection is backed by the map, so changes to - * the map are reflected in the collection, and vice-versa. - * The collection supports element removal, which removes the corresponding - * mapping from this map, via the - * Iterator.remove, Collection.remove, - * removeAll, retainAll, - * and clear operations. It does not support the - * add or addAll operations. - * - * @return a collection view of the values contained in this map. - */ - public Collection values() { - return _values; - } - private transient Values _values; - private class Values extends AbstractCollection { - public Iterator iterator() { - return new Iterator() { - EntryImpl after = _mapFirst; - EntryImpl before; - public void remove() { - removeEntry(before); - } - public boolean hasNext() { - return after != null; - } - public Object next() { - before = after; - after = after._after; - return before._value; - } - }; - } - public int size() { - return _size; - } - public boolean contains(Object o) { - return containsValue(o); - } - public void clear() { - FastMap.this.clear(); - } - } - - /** - * Returns a collection view of the mappings contained in this - * {@link FastMap}. Each element in the returned collection is a - * Map.Entry. The collection is backed by the map, - * so changes to the map are reflected in the collection, and vice-versa. - * The collection supports element removal, which removes the corresponding - * mapping from this map, via the - * Iterator.remove, Collection.remove, - * removeAll, retainAll, - * and clear operations. It does not support the - * add or addAll operations. - * - * @return a collection view of the mappings contained in this map. - */ - public Set entrySet() { - return _entrySet; - } - private transient EntrySet _entrySet; - private class EntrySet extends AbstractSet { - public Iterator iterator() { - return new Iterator() { - EntryImpl after = _mapFirst; - EntryImpl before; - public void remove() { - removeEntry(before); - } - public boolean hasNext() { - return after != null; - } - public Object next() { - before = after; - after = after._after; - return before; - } - }; - } - public int size() { - return _size; - } - public boolean contains(Object obj) { // Optimization. - if (obj instanceof Map.Entry) { - Map.Entry entry = (Map.Entry) obj; - Map.Entry mapEntry = getEntry(entry.getKey()); - return entry.equals(mapEntry); - } else { - return false; - } - } - public boolean remove(Object obj) { // Optimization. - if (obj instanceof Map.Entry) { - Map.Entry entry = (Map.Entry)obj; - EntryImpl mapEntry = (EntryImpl) getEntry(entry.getKey()); - if ((mapEntry != null) && - (entry.getValue()).equals(mapEntry._value)) { - removeEntry(mapEntry); - return true; - } - } - return false; - } - } - - /** - * Returns a set view of the keys contained in this {@link FastMap}. - * The set is backed by the map, so changes to the map are reflected - * in the set, and vice-versa. The set supports element removal, - * which removes the corresponding mapping from this map, via the - * Iterator.remove, Collection.remove, - * removeAll, retainAll, - * and clear operations. It does not support the - * add or addAll operations. - * - * @return a set view of the keys contained in this map. - */ - public Set keySet() { - return _keySet; - } - private transient KeySet _keySet; - private class KeySet extends AbstractSet { - public Iterator iterator() { - return new Iterator() { - EntryImpl after = _mapFirst; - EntryImpl before; - public void remove() { - removeEntry(before); - } - public boolean hasNext() { - return after != null; - } - public Object next() { - before = after; - after = after._after; - return before._key; - } - }; - } - public int size() { - return _size; - } - public boolean contains(Object obj) { // Optimization. - return FastMap.this.containsKey(obj); - } - public boolean remove(Object obj) { // Optimization. - return FastMap.this.remove(obj) != null; - } - public void clear() { // Optimization. - FastMap.this.clear(); - } - } - - /** - * This methods is being called when the size of this {@link FastMap} - * has changed. The default behavior is to double the map's capacity - * when the map's size reaches the current map's capacity. - * Sub-class may override this method to implement custom resizing - * policies or to disable automatic resizing. For example:
-     *     Map fixedCapacityMap = new FastMap(256) { 
-     *           protected sizeChanged() {
-     *               // Do nothing, automatic resizing disabled.
-     *           }
-     *     };
- * @see #setCapacity - */ - protected void sizeChanged() { - if (size() > capacity()) { - setCapacity(capacity() * 2); - } - } - - /** - * Returns the hash code for the specified key. The formula being used - * is identical to the formula used by java.util.HashMap - * (ensures similar behavior for ill-conditioned hashcode keys). - * - * @param key the key to calculate the hashcode for. - * @return the hash code for the specified key. - */ - private static int keyHash(Object key) { - // From HashMap.hash(Object) function. - int hashCode = key.hashCode(); - hashCode += ~(hashCode << 9); - hashCode ^= (hashCode >>> 14); - hashCode += (hashCode << 4); - hashCode ^= (hashCode >>> 10); - return hashCode; - } - - /** - * Adds a new entry for the specified key and value. - * @param key the entry's key. - * @param value the entry's value. - */ - private void addEntry(Object key, Object value) { - EntryImpl entry = _poolFirst; - if (entry != null) { - _poolFirst = entry._after; - entry._after = null; - } else { // Pool empty. - entry = new EntryImpl(); - } - - // Setup entry paramters. - entry._key = key; - entry._value = value; - int index = keyHash(key) & _mask; - entry._index = index; - - // Connects to bucket. - EntryImpl next = _entries[index]; - entry._next = next; - if (next != null) { - next._previous = entry; - } - _entries[index] = entry; - - // Connects to collection. - if (_mapLast != null) { - entry._before = _mapLast; - _mapLast._after = entry; - } else { - _mapFirst = entry; - } - _mapLast = entry; - - // Updates size. - _size++; - sizeChanged(); - } - - /** - * Removes the specified entry from the map. - * - * @param entry the entry to be removed. - */ - private void removeEntry(EntryImpl entry) { - - // Removes from bucket. - EntryImpl previous = entry._previous; - EntryImpl next = entry._next; - if (previous != null) { - previous._next = next; - entry._previous = null; - } else { // First in bucket. - _entries[entry._index] = next; - } - if (next != null) { - next._previous = previous; - entry._next = null; - } // Else do nothing, no last pointer. - - // Removes from collection. - EntryImpl before = entry._before; - EntryImpl after = entry._after; - if (before != null) { - before._after = after; - entry._before = null; - } else { // First in collection. - _mapFirst = after; - } - if (after != null) { - after._before = before; - } else { // Last in collection. - _mapLast = before; - } - - // Clears value and key. - entry._key = null; - entry._value = null; - - // Recycles. - entry._after = _poolFirst; - _poolFirst = entry; - - // Updates size. - _size--; - sizeChanged(); - } - - /** - * Initializes this instance for the specified capacity. - * Once initialized, operations on this map should not create new objects - * (unless the map's size exceeds the specified capacity). - * - * @param capacity the initial capacity. - */ - private void initialize(int capacity) { - // Find a power of 2 >= capacity - int tableLength = 16; - while (tableLength < capacity) { - tableLength <<= 1; - } - // Allocates hash table. - _entries = new EntryImpl[tableLength]; - _mask = tableLength - 1; - _capacity = capacity; - _size = 0; - // Allocates views. - _values = new Values(); - _entrySet = new EntrySet(); - _keySet = new KeySet(); - // Resets pointers. - _poolFirst = null; - _mapFirst = null; - _mapLast = null; - // Allocates entries. - for (int i=0; i < capacity; i++) { - EntryImpl entry = new EntryImpl(); - entry._after = _poolFirst; - _poolFirst = entry; - } - } - - /** - * Requires special handling during de-serialization process. - * - * @param stream the object input stream. - * @throws IOException if an I/O error occurs. - * @throws ClassNotFoundException if the class for the object de-serialized - * is not found. - */ - private void readObject(ObjectInputStream stream) - throws IOException, ClassNotFoundException { - int capacity = stream.readInt(); - initialize(capacity); - int size = stream.readInt(); - for (int i=0; i < size; i++) { - Object key = stream.readObject(); - Object value = stream.readObject(); - addEntry(key, value); - } - } - - /** - * Requires special handling during serialization process. - * - * @param stream the object output stream. - * @throws IOException if an I/O error occurs. - */ - private void writeObject(ObjectOutputStream stream) throws IOException { - stream.writeInt(_capacity); - stream.writeInt(_size); - int count = 0; - EntryImpl entry = _mapFirst; - while (entry != null) { - stream.writeObject(entry._key); - stream.writeObject(entry._value); - count++; - entry = entry._after; - } - if (count != _size) { - throw new IOException("FastMap Corrupted"); - } - } - - /** - * This class represents a {@link FastMap} entry. - */ - private static final class EntryImpl implements Map.Entry { - - /** - * Holds the entry key (null when in pool). - */ - private Object _key; - - /** - * Holds the entry value (null when in pool). - */ - private Object _value; - - /** - * Holds the bucket index (undefined when in pool). - */ - private int _index; - - /** - * Holds the previous entry in the same bucket (null when in pool). - */ - private EntryImpl _previous; - - /** - * Holds the next entry in the same bucket (null when in pool). - */ - private EntryImpl _next; - - /** - * Holds the entry added before this entry (null when in pool). - */ - private EntryImpl _before; - - /** - * Holds the entry added after this entry - * or the next available entry when in pool. - */ - private EntryImpl _after; - - /** - * Returns the key for this entry. - * - * @return the entry's key. - */ - public Object getKey() { - return _key; - } - - /** - * Returns the value for this entry. - * - * @return the entry's value. - */ - public Object getValue() { - return _value; - } - - /** - * Sets the value for this entry. - * - * @param value the new value. - * @return the previous value. - */ - public Object setValue(Object value) { - Object old = _value; - _value = value; - return old; - } - - /** - * Indicates if this entry is considered equals to the specified - * entry. - * - * @param that the object to test for equality. - * @return true if both entry are considered equal; - * false otherwise. - */ - public boolean equals(Object that) { - if (that instanceof Map.Entry) { - Map.Entry entry = (Map.Entry) that; - return (_key.equals(entry.getKey())) && - ((_value != null) ? - _value.equals(entry.getValue()) : - (entry.getValue() == null)); - } else { - return false; - } - } - - /** - * Returns the hash code for this entry. - * - * @return this entry's hash code. - */ - public int hashCode() { - return _key.hashCode() ^ ((_value != null) ? _value.hashCode() : 0); - } - - /** - * Returns the text representation of this entry. - * - * @return this entry's textual representation. - */ - public String toString() { - return _key + "=" + _value; - } - } -} \ No newline at end of file diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/FileUtils.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/FileUtils.java deleted file mode 100644 index 400a4654a..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/FileUtils.java +++ /dev/null @@ -1,1921 +0,0 @@ -package org.codehaus.plexus.util; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.codehaus.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Turbine" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact codehaus@codehaus.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Turbine", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - */ - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.io.Reader; -import java.io.Writer; -import java.net.URL; -import java.text.DecimalFormat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; -import java.util.Random; -import java.util.Vector; - -/** - * This class provides basic facilities for manipulating files and file paths. - *

- *

Path-related methods

- *

- *

Methods exist to retrieve the components of a typical file path. For example - * /www/hosted/mysite/index.html, can be broken into: - *

    - *
  • /www/hosted/mysite/ -- retrievable through {@link #getPath}
  • - *
  • index.html -- retrievable through {@link #removePath}
  • - *
  • /www/hosted/mysite/index -- retrievable through {@link #removeExtension}
  • - *
  • html -- retrievable through {@link #getExtension}
  • - *
- * There are also methods to {@link #catPath concatenate two paths}, {@link #resolveFile resolve a - * path relative to a File} and {@link #normalize} a path. - *

- *

- *

File-related methods

- *

- * There are methods to create a {@link #toFile File from a URL}, copy a - * {@link #copyFileToDirectory File to a directory}, - * copy a {@link #copyFile File to another File}, - * copy a {@link #copyURLToFile URL's contents to a File}, - * as well as methods to {@link #deleteDirectory(File) delete} and {@link #cleanDirectory(File) - * clean} a directory. - *

- *

- * Common {@link java.io.File} manipulation routines. - *

- * Taken from the commons-utils repo. - * Also code from Alexandria's FileUtils. - * And from Avalon Excalibur's IO. - * And from Ant. - * - * @author Kevin A. Burton - * @author Scott Sanders - * @author Daniel Rall - * @author Christoph.Reck - * @author Peter Donald - * @author Jeff Turner - * @version $Id$ - */ -public class FileUtils -{ - /** - * The number of bytes in a kilobyte. - */ - public static final int ONE_KB = 1024; - - /** - * The number of bytes in a megabyte. - */ - public static final int ONE_MB = ONE_KB * ONE_KB; - - /** - * The number of bytes in a gigabyte. - */ - public static final int ONE_GB = ONE_KB * ONE_MB; - - public static String FS = System.getProperty( "file.separator" ); - - public static String[] getDefaultExcludes() - { - return DirectoryScanner.DEFAULTEXCLUDES; - } - - public static List getDefaultExcludesAsList() - { - return Arrays.asList( getDefaultExcludes() ); - } - - /** - * Returns a human-readable version of the file size (original is in - * bytes). - * - * @param size The number of bytes. - * @return A human-readable display value (includes units). - */ - public static String byteCountToDisplaySize( int size ) - { - String displaySize; - - if ( size / ONE_GB > 0 ) - { - displaySize = String.valueOf( size / ONE_GB ) + " GB"; - } - else if ( size / ONE_MB > 0 ) - { - displaySize = String.valueOf( size / ONE_MB ) + " MB"; - } - else if ( size / ONE_KB > 0 ) - { - displaySize = String.valueOf( size / ONE_KB ) + " KB"; - } - else - { - displaySize = String.valueOf( size ) + " bytes"; - } - - return displaySize; - } - - /** - * Returns the directory path portion of a file specification string. - * Matches the equally named unix command. - * - * @return The directory portion excluding the ending file separator. - */ - public static String dirname( String filename ) - { - int i = filename.lastIndexOf( File.separator ); - return ( i >= 0 ? filename.substring( 0, i ) : "" ); - } - - /** - * Returns the filename portion of a file specification string. - * - * @return The filename string with extension. - */ - public static String filename( String filename ) - { - int i = filename.lastIndexOf( File.separator ); - return ( i >= 0 ? filename.substring( i + 1 ) : filename ); - } - - /** - * Returns the filename portion of a file specification string. - * Matches the equally named unix command. - * - * @return The filename string without extension. - */ - public static String basename( String filename ) - { - return basename( filename, extension( filename ) ); - } - - /** - * Returns the filename portion of a file specification string. - * Matches the equally named unix command. - */ - public static String basename( String filename, String suffix ) - { - int i = filename.lastIndexOf( File.separator ) + 1; - int lastDot = ( ( suffix != null ) && ( suffix.length() > 0 ) ) ? filename.lastIndexOf( suffix ) : -1; - - if ( lastDot >= 0 ) - { - return filename.substring( i, lastDot ); - } - else if ( i > 0 ) - { - return filename.substring( i ); - } - else - { - return filename; // else returns all (no path and no extension) - } - } - - /** - * Returns the extension portion of a file specification string. - * This everything after the last dot '.' in the filename (NOT including - * the dot). - */ - public static String extension( String filename ) - { - int lastDot = filename.lastIndexOf( '.' ); - - if ( lastDot >= 0 ) - { - return filename.substring( lastDot + 1 ); - } - else - { - return ""; - } - } - - /** - * Check if a file exits. - * - * @param fileName The name of the file to check. - * @return true if file exists. - */ - public static boolean fileExists( String fileName ) - { - File file = new File( fileName ); - return file.exists(); - } - - public static String fileRead( String file ) - throws IOException - { - return fileRead( new File( file ) ); - } - - public static String fileRead( File file ) - throws IOException - { - StringBuffer buf = new StringBuffer(); - - FileInputStream in = null; - - try - { - in = new FileInputStream( file ); - int count; - byte[] b = new byte[512]; - while ( ( count = in.read( b ) ) > 0 ) // blocking read - { - buf.append( new String( b, 0, count ) ); - } - } - finally - { - IOUtil.close( in ); - } - - return buf.toString(); - } - - /** - * Appends data to a file. The file will be created if it does not exist. - * - * @param fileName The name of the file to write. - * @param data The content to write to the file. - */ - public static void fileAppend( String fileName, String data ) - throws IOException - { - FileOutputStream out = null; - try - { - out = new FileOutputStream( fileName, true ); - out.write( data.getBytes() ); - } - finally - { - IOUtil.close( out ); - } - } - - /** - * Writes data to a file. The file will be created if it does not exist. - * - * @param fileName The name of the file to write. - * @param data The content to write to the file. - */ - public static void fileWrite( String fileName, String data ) - throws IOException - { - FileOutputStream out = null; - try - { - out = new FileOutputStream( fileName ); - out.write( data.getBytes() ); - } - finally - { - IOUtil.close( out ); - } - } - - /** - * Deletes a file. - * - * @param fileName The name of the file to delete. - */ - public static void fileDelete( String fileName ) - { - File file = new File( fileName ); - file.delete(); - } - - /** - * Waits for NFS to propagate a file creation, imposing a timeout. - * - * @param fileName The name of the file. - * @param seconds The maximum time in seconds to wait. - * @return True if file exists. - */ - public static boolean waitFor( String fileName, int seconds ) - { - return waitFor( new File( fileName ), seconds ); - } - - public static boolean waitFor( File file, int seconds ) - { - int timeout = 0; - int tick = 0; - while ( !file.exists() ) - { - if ( tick++ >= 10 ) - { - tick = 0; - if ( timeout++ > seconds ) - { - return false; - } - } - try - { - Thread.sleep( 100 ); - } - catch ( InterruptedException ignore ) - { - } - } - return true; - } - - /** - * Creates a file handle. - * - * @param fileName The name of the file. - * @return A File manager. - */ - public static File getFile( String fileName ) - { - return new File( fileName ); - } - - /** - * Given a directory and an array of extensions return an array of compliant files. - *

- * TODO Should an ignore list be passed in? - * TODO Should a recurse flag be passed in? - *

- * The given extensions should be like "java" and not like ".java" - */ - public static String[] getFilesFromExtension( String directory, String[] extensions ) - { - - Vector files = new Vector(); - - java.io.File currentDir = new java.io.File( directory ); - - String[] unknownFiles = currentDir.list(); - - if ( unknownFiles == null ) - { - return new String[0]; - } - - for ( int i = 0; i < unknownFiles.length; ++i ) - { - String currentFileName = directory + System.getProperty( "file.separator" ) + unknownFiles[i]; - java.io.File currentFile = new java.io.File( currentFileName ); - - if ( currentFile.isDirectory() ) - { - - //ignore all CVS directories... - if ( currentFile.getName().equals( "CVS" ) ) - { - continue; - } - - //ok... transverse into this directory and get all the files... then combine - //them with the current list. - - String[] fetchFiles = getFilesFromExtension( currentFileName, extensions ); - files = blendFilesToVector( files, fetchFiles ); - - } - else - { - //ok... add the file - - String add = currentFile.getAbsolutePath(); - if ( isValidFile( add, extensions ) ) - { - files.addElement( add ); - - } - - } - } - - //ok... move the Vector into the files list... - - String[] foundFiles = new String[files.size()]; - files.copyInto( foundFiles ); - - return foundFiles; - - } - - - /** - * Private hepler method for getFilesFromExtension() - */ - private static Vector blendFilesToVector( Vector v, String[] files ) - { - - for ( int i = 0; i < files.length; ++i ) - { - v.addElement( files[i] ); - } - - return v; - } - - /** - * Checks to see if a file is of a particular type(s). - * Note that if the file does not have an extension, an empty string - * ("") is matched for. - */ - private static boolean isValidFile( String file, String[] extensions ) - { - - String extension = extension( file ); - if ( extension == null ) - { - extension = ""; - } - - //ok.. now that we have the "extension" go through the current know - //excepted extensions and determine if this one is OK. - - for ( int i = 0; i < extensions.length; ++i ) - { - if ( extensions[i].equals( extension ) ) - { - return true; - } - } - - return false; - - } - - /** - * Simple way to make a directory - */ - public static void mkdir( String dir ) - { - File file = new File( dir ); - if ( !file.exists() ) - { - file.mkdirs(); - } - } - - /** - * Compare the contents of two files to determine if they are equal or not. - * - * @param file1 the first file - * @param file2 the second file - * @return true if the content of the files are equal or they both don't exist, false otherwise - */ - public static boolean contentEquals( final File file1, final File file2 ) - throws IOException - { - final boolean file1Exists = file1.exists(); - if ( file1Exists != file2.exists() ) - { - return false; - } - - if ( !file1Exists ) - { - // two not existing files are equal - return true; - } - - if ( file1.isDirectory() || file2.isDirectory() ) - { - // don't want to compare directory contents - return false; - } - - InputStream input1 = null; - InputStream input2 = null; - try - { - input1 = new FileInputStream( file1 ); - input2 = new FileInputStream( file2 ); - return IOUtil.contentEquals( input1, input2 ); - - } - finally - { - IOUtil.close( input1 ); - IOUtil.close( input2 ); - } - } - - /** - * Convert from a URL to a File. - * - * @param url File URL. - * @return The equivalent File object, or null if the URL's protocol - * is not file - */ - public static File toFile( final URL url ) - { - if ( url.getProtocol().equals( "file" ) == false ) - { - return null; - } - else - { - final String filename = url.getFile().replace( '/', File.separatorChar ); - return new File( filename ); - } - } - - /** - * Convert the array of Files into a list of URLs. - * - * @param files the array of files - * @return the array of URLs - * @throws IOException if an error occurs - */ - public static URL[] toURLs( final File[] files ) - throws IOException - { - final URL[] urls = new URL[files.length]; - - for ( int i = 0; i < urls.length; i++ ) - { - urls[i] = files[i].toURL(); - } - - return urls; - } - - /** - * Remove extension from filename. - * ie - *

-     * foo.txt    --> foo
-     * a\b\c.jpg --> a\b\c
-     * a\b\c     --> a\b\c
-     * 
- * - * @param filename the filename - * @return the filename minus extension - */ - public static String removeExtension( final String filename ) - { - final int index = filename.lastIndexOf( '.' ); - - if ( -1 == index ) - { - return filename; - } - else - { - return filename.substring( 0, index ); - } - } - - /** - * Get extension from filename. - * ie - *
-     * foo.txt    --> "txt"
-     * a\b\c.jpg --> "jpg"
-     * a\b\c     --> ""
-     * 
- * - * @param filename the filename - * @return the extension of filename or "" if none - */ - public static String getExtension( final String filename ) - { - final int index = filename.lastIndexOf( '.' ); - - if ( -1 == index ) - { - return ""; - } - else - { - return filename.substring( index + 1 ); - } - } - - /** - * Remove path from filename. Equivalent to the unix command basename - * ie. - *
-     * a/b/c.txt --> c.txt
-     * a.txt     --> a.txt
-     * 
- * - * @param filepath the filepath - * @return the filename minus path - */ - public static String removePath( final String filepath ) - { - return removePath( filepath, File.separatorChar ); - } - - /** - * Remove path from filename. - * ie. - *
-     * a/b/c.txt --> c.txt
-     * a.txt     --> a.txt
-     * 
- * - * @param filepath the filepath - * @return the filename minus path - */ - public static String removePath( final String filepath, final char fileSeparatorChar ) - { - final int index = filepath.lastIndexOf( fileSeparatorChar ); - - if ( -1 == index ) - { - return filepath; - } - else - { - return filepath.substring( index + 1 ); - } - } - - /** - * Get path from filename. Roughly equivalent to the unix command dirname. - * ie. - *
-     * a/b/c.txt --> a/b
-     * a.txt     --> ""
-     * 
- * - * @param filepath the filepath - * @return the filename minus path - */ - public static String getPath( final String filepath ) - { - return getPath( filepath, File.separatorChar ); - } - - /** - * Get path from filename. - * ie. - *
-     * a/b/c.txt --> a/b
-     * a.txt     --> ""
-     * 
- * - * @param filepath the filepath - * @return the filename minus path - */ - public static String getPath( final String filepath, final char fileSeparatorChar ) - { - final int index = filepath.lastIndexOf( fileSeparatorChar ); - if ( -1 == index ) - { - return ""; - } - else - { - return filepath.substring( 0, index ); - } - } - - /** - * Copy file from source to destination. If destinationDirectory does not exist, it - * (and any parent directories) will be created. If a file source in - * destinationDirectory exists, it will be overwritten. - * - * @param source An existing File to copy. - * @param destinationDirectory A directory to copy source into. - * @throws java.io.FileNotFoundException if source isn't a normal file. - * @throws IllegalArgumentException if destinationDirectory isn't a directory. - * @throws IOException if source does not exist, the file in - * destinationDirectory cannot be written to, or an IO error occurs during copying. - */ - public static void copyFileToDirectory( final String source, final String destinationDirectory ) - throws IOException - { - copyFileToDirectory( new File( source ), new File( destinationDirectory ) ); - } - - /** - * Copy file from source to destination only if source is newer than the target file. - * If destinationDirectory does not exist, it - * (and any parent directories) will be created. If a file source in - * destinationDirectory exists, it will be overwritten. - * - * @param source An existing File to copy. - * @param destinationDirectory A directory to copy source into. - * @throws java.io.FileNotFoundException if source isn't a normal file. - * @throws IllegalArgumentException if destinationDirectory isn't a directory. - * @throws IOException if source does not exist, the file in - * destinationDirectory cannot be written to, or an IO error occurs during copying. - */ - public static void copyFileToDirectoryIfModified( final String source, final String destinationDirectory ) - throws IOException - { - copyFileToDirectoryIfModified( new File( source ), new File( destinationDirectory ) ); - } - - /** - * Copy file from source to destination. If destinationDirectory does not exist, it - * (and any parent directories) will be created. If a file source in - * destinationDirectory exists, it will be overwritten. - * - * @param source An existing File to copy. - * @param destinationDirectory A directory to copy source into. - * @throws java.io.FileNotFoundException if source isn't a normal file. - * @throws IllegalArgumentException if destinationDirectory isn't a directory. - * @throws IOException if source does not exist, the file in - * destinationDirectory cannot be written to, or an IO error occurs during copying. - */ - public static void copyFileToDirectory( final File source, final File destinationDirectory ) - throws IOException - { - if ( destinationDirectory.exists() && !destinationDirectory.isDirectory() ) - { - throw new IllegalArgumentException( "Destination is not a directory" ); - } - - copyFile( source, new File( destinationDirectory, source.getName() ) ); - } - - /** - * Copy file from source to destination only if source is newer than the target file. - * If destinationDirectory does not exist, it - * (and any parent directories) will be created. If a file source in - * destinationDirectory exists, it will be overwritten. - * - * @param source An existing File to copy. - * @param destinationDirectory A directory to copy source into. - * @throws java.io.FileNotFoundException if source isn't a normal file. - * @throws IllegalArgumentException if destinationDirectory isn't a directory. - * @throws IOException if source does not exist, the file in - * destinationDirectory cannot be written to, or an IO error occurs during copying. - */ - public static void copyFileToDirectoryIfModified( final File source, final File destinationDirectory ) - throws IOException - { - if ( destinationDirectory.exists() && !destinationDirectory.isDirectory() ) - { - throw new IllegalArgumentException( "Destination is not a directory" ); - } - - copyFileIfModified( source, new File( destinationDirectory, source.getName() ) ); - } - - - /** - * Copy file from source to destination. The directories up to destination will be - * created if they don't already exist. destination will be overwritten if it - * already exists. - * - * @param source An existing non-directory File to copy bytes from. - * @param destination A non-directory File to write bytes to (possibly - * overwriting). - * @throws IOException if source does not exist, destination cannot be - * written to, or an IO error occurs during copying. - * @throws java.io.FileNotFoundException if destination is a directory - * (use {@link #copyFileToDirectory}). - */ - public static void copyFile( final File source, final File destination ) - throws IOException - { - //check source exists - if ( !source.exists() ) - { - final String message = "File " + source + " does not exist"; - throw new IOException( message ); - } - - //does destinations directory exist ? - if ( destination.getParentFile() != null && !destination.getParentFile().exists() ) - { - destination.getParentFile().mkdirs(); - } - - //make sure we can write to destination - if ( destination.exists() && !destination.canWrite() ) - { - final String message = "Unable to open file " + destination + " for writing."; - throw new IOException( message ); - } - - FileInputStream input = null; - FileOutputStream output = null; - try - { - input = new FileInputStream( source ); - output = new FileOutputStream( destination ); - IOUtil.copy( input, output ); - } - finally - { - IOUtil.close( input ); - IOUtil.close( output ); - } - - if ( source.length() != destination.length() ) - { - final String message = "Failed to copy full contents from " + source + " to " + destination; - throw new IOException( message ); - } - } - - /** - * Copy file from source to destination only if source timestamp is later than the destination timestamp. - * The directories up to destination will be created if they don't already exist. - * destination will be overwritten if it already exists. - * - * @param source An existing non-directory File to copy bytes from. - * @param destination A non-directory File to write bytes to (possibly - * overwriting). - * @throws IOException if source does not exist, destination cannot be - * written to, or an IO error occurs during copying. - * @throws java.io.FileNotFoundException if destination is a directory - * (use {@link #copyFileToDirectory}). - */ - public static boolean copyFileIfModified( final File source, final File destination ) - throws IOException - { - if ( destination.lastModified() < source.lastModified() ) - { - copyFile( source, destination ); - - return true; - } - - return false; - } - - /** - * Copies bytes from the URL source to a file destination. - * The directories up to destination will be created if they don't already exist. - * destination will be overwritten if it already exists. - * - * @param source A URL to copy bytes from. - * @param destination A non-directory File to write bytes to (possibly - * overwriting). - * @throws IOException if - *
    - *
  • source URL cannot be opened
  • - *
  • destination cannot be written to
  • - *
  • an IO error occurs during copying
  • - *
- */ - public static void copyURLToFile( final URL source, final File destination ) - throws IOException - { - //does destination directory exist ? - if ( destination.getParentFile() != null && !destination.getParentFile().exists() ) - { - destination.getParentFile().mkdirs(); - } - - //make sure we can write to destination - if ( destination.exists() && !destination.canWrite() ) - { - final String message = "Unable to open file " + destination + " for writing."; - throw new IOException( message ); - } - - InputStream input = null; - FileOutputStream output = null; - try - { - input = source.openStream(); - output = new FileOutputStream( destination ); - IOUtil.copy( input, output ); - } - finally - { - IOUtil.close( input ); - IOUtil.close( output ); - } - } - - /** - * Normalize a path. - * Eliminates "/../" and "/./" in a string. Returns null if the ..'s went past the - * root. - * Eg: - *
-     * /foo//               -->     /foo/
-     * /foo/./              -->     /foo/
-     * /foo/../bar          -->     /bar
-     * /foo/../bar/         -->     /bar/
-     * /foo/../bar/../baz   -->     /baz
-     * //foo//./bar         -->     /foo/bar
-     * /../                 -->     null
-     * 
- * - * @param path the path to normalize - * @return the normalized String, or null if too many ..'s. - */ - public static String normalize( final String path ) - { - String normalized = path; - // Resolve occurrences of "//" in the normalized path - while ( true ) - { - int index = normalized.indexOf( "//" ); - if ( index < 0 ) - { - break; - } - normalized = normalized.substring( 0, index ) + normalized.substring( index + 1 ); - } - - // Resolve occurrences of "/./" in the normalized path - while ( true ) - { - int index = normalized.indexOf( "/./" ); - if ( index < 0 ) - { - break; - } - normalized = normalized.substring( 0, index ) + normalized.substring( index + 2 ); - } - - // Resolve occurrences of "/../" in the normalized path - while ( true ) - { - int index = normalized.indexOf( "/../" ); - if ( index < 0 ) - { - break; - } - if ( index == 0 ) - { - return null; // Trying to go outside our context - } - int index2 = normalized.lastIndexOf( '/', index - 1 ); - normalized = normalized.substring( 0, index2 ) + normalized.substring( index + 3 ); - } - - // Return the normalized path that we have completed - return normalized; - } - - /** - * Will concatenate 2 paths. Paths with .. will be - * properly handled. - *

Eg.,
- * /a/b/c + d = /a/b/d
- * /a/b/c + ../d = /a/d
- *

- *

- * Thieved from Tomcat sources... - * - * @return The concatenated paths, or null if error occurs - */ - public static String catPath( final String lookupPath, final String path ) - { - // Cut off the last slash and everything beyond - int index = lookupPath.lastIndexOf( "/" ); - String lookup = lookupPath.substring( 0, index ); - String pth = path; - - // Deal with .. by chopping dirs off the lookup path - while ( pth.startsWith( "../" ) ) - { - if ( lookup.length() > 0 ) - { - index = lookup.lastIndexOf( "/" ); - lookup = lookup.substring( 0, index ); - } - else - { - // More ..'s than dirs, return null - return null; - } - - index = pth.indexOf( "../" ) + 3; - pth = pth.substring( index ); - } - - return new StringBuffer( lookup ).append( "/" ).append( pth ).toString(); - } - - /** - * Resolve a file filename to it's canonical form. If filename is - * relative (doesn't start with /), it will be resolved relative to - * baseFile, otherwise it is treated as a normal root-relative path. - * - * @param baseFile Where to resolve filename from, if filename is - * relative. - * @param filename Absolute or relative file path to resolve. - * @return The canonical File of filename. - */ - public static File resolveFile( final File baseFile, String filename ) - { - String filenm = filename; - if ( '/' != File.separatorChar ) - { - filenm = filename.replace( '/', File.separatorChar ); - } - - if ( '\\' != File.separatorChar ) - { - filenm = filename.replace( '\\', File.separatorChar ); - } - - // deal with absolute files - if ( filenm.startsWith( File.separator ) || ( Os.isFamily( "windows" ) && filenm.indexOf( ":" ) > 0 ) ) - { - File file = new File( filenm ); - - try - { - file = file.getCanonicalFile(); - } - catch ( final IOException ioe ) - { - } - - return file; - } - // FIXME: I'm almost certain this // removal is unnecessary, as getAbsoluteFile() strips - // them. However, I'm not sure about this UNC stuff. (JT) - final char[] chars = filename.toCharArray(); - final StringBuffer sb = new StringBuffer(); - - //remove duplicate file separators in succession - except - //on win32 at start of filename as UNC filenames can - //be \\AComputer\AShare\myfile.txt - int start = 0; - if ( '\\' == File.separatorChar ) - { - sb.append( filenm.charAt( 0 ) ); - start++; - } - - for ( int i = start; i < chars.length; i++ ) - { - final boolean doubleSeparator = File.separatorChar == chars[i] && File.separatorChar == chars[i - 1]; - - if ( !doubleSeparator ) - { - sb.append( chars[i] ); - } - } - - filenm = sb.toString(); - - //must be relative - File file = ( new File( baseFile, filenm ) ).getAbsoluteFile(); - - try - { - file = file.getCanonicalFile(); - } - catch ( final IOException ioe ) - { - } - - return file; - } - - /** - * Delete a file. If file is directory delete it and all sub-directories. - */ - public static void forceDelete( final String file ) - throws IOException - { - forceDelete( new File( file ) ); - } - - /** - * Delete a file. If file is directory delete it and all sub-directories. - */ - public static void forceDelete( final File file ) - throws IOException - { - if ( !file.exists() ) - { - return; - } - - if ( file.isDirectory() ) - { - deleteDirectory( file ); - } - else - { - if ( !deleteFile( file ) ) - { - final String message = "File " + file + " unable to be deleted."; - throw new IOException( message ); - } - } - } - - /** - * Accommodate Windows bug encountered in both Sun and IBM JDKs. - * Others possible. If the delete does not work, call System.gc(), - * wait a little and try again. - */ - private static boolean deleteFile( File file ) - throws IOException - { - if ( file.isDirectory() ) - { - throw new IOException( "File " + file + " isn't a file." ); - } - - if ( !file.delete() ) - { - if ( System.getProperty( "os.name" ).toLowerCase().indexOf( "windows" ) > -1 ) - { - System.gc(); - } - - try - { - Thread.sleep( 10 ); - return file.delete(); - } - catch ( InterruptedException ex ) - { - return file.delete(); - } - } - - return true; - } - - /** - * Schedule a file to be deleted when JVM exits. - * If file is directory delete it and all sub-directories. - */ - public static void forceDeleteOnExit( final File file ) - throws IOException - { - if ( !file.exists() ) - { - return; - } - - if ( file.isDirectory() ) - { - deleteDirectoryOnExit( file ); - } - else - { - file.deleteOnExit(); - } - } - - /** - * Recursively schedule directory for deletion on JVM exit. - */ - private static void deleteDirectoryOnExit( final File directory ) - throws IOException - { - if ( !directory.exists() ) - { - return; - } - - cleanDirectoryOnExit( directory ); - directory.deleteOnExit(); - } - - /** - * Clean a directory without deleting it. - */ - private static void cleanDirectoryOnExit( final File directory ) - throws IOException - { - if ( !directory.exists() ) - { - final String message = directory + " does not exist"; - throw new IllegalArgumentException( message ); - } - - if ( !directory.isDirectory() ) - { - final String message = directory + " is not a directory"; - throw new IllegalArgumentException( message ); - } - - IOException exception = null; - - final File[] files = directory.listFiles(); - for ( int i = 0; i < files.length; i++ ) - { - final File file = files[i]; - try - { - forceDeleteOnExit( file ); - } - catch ( final IOException ioe ) - { - exception = ioe; - } - } - - if ( null != exception ) - { - throw exception; - } - } - - - /** - * Make a directory. If there already exists a file with specified name or - * the directory is unable to be created then an exception is thrown. - */ - public static void forceMkdir( final File file ) - throws IOException - { - if ( file.exists() ) - { - if ( file.isFile() ) - { - final String message = - "File " + file + " exists and is " + "not a directory. Unable to create directory."; - throw new IOException( message ); - } - } - else - { - if ( false == file.mkdirs() ) - { - final String message = "Unable to create directory " + file; - throw new IOException( message ); - } - } - } - - /** - * Recursively delete a directory. - */ - public static void deleteDirectory( final String directory ) - throws IOException - { - deleteDirectory( new File( directory ) ); - } - - /** - * Recursively delete a directory. - */ - public static void deleteDirectory( final File directory ) - throws IOException - { - if ( !directory.exists() ) - { - return; - } - - cleanDirectory( directory ); - if ( !directory.delete() ) - { - final String message = "Directory " + directory + " unable to be deleted."; - throw new IOException( message ); - } - } - - /** - * Clean a directory without deleting it. - */ - public static void cleanDirectory( final String directory ) - throws IOException - { - cleanDirectory( new File( directory ) ); - } - - /** - * Clean a directory without deleting it. - */ - public static void cleanDirectory( final File directory ) - throws IOException - { - if ( !directory.exists() ) - { - final String message = directory + " does not exist"; - throw new IllegalArgumentException( message ); - } - - if ( !directory.isDirectory() ) - { - final String message = directory + " is not a directory"; - throw new IllegalArgumentException( message ); - } - - IOException exception = null; - - final File[] files = directory.listFiles(); - for ( int i = 0; i < files.length; i++ ) - { - final File file = files[i]; - try - { - forceDelete( file ); - } - catch ( final IOException ioe ) - { - exception = ioe; - } - } - - if ( null != exception ) - { - throw exception; - } - } - - /** - * Recursively count size of a directory. - * - * @return size of directory in bytes. - */ - public static long sizeOfDirectory( final String directory ) - { - return sizeOfDirectory( new File( directory ) ); - } - - /** - * Recursively count size of a directory. - * - * @return size of directory in bytes. - */ - public static long sizeOfDirectory( final File directory ) - { - if ( !directory.exists() ) - { - final String message = directory + " does not exist"; - throw new IllegalArgumentException( message ); - } - - if ( !directory.isDirectory() ) - { - final String message = directory + " is not a directory"; - throw new IllegalArgumentException( message ); - } - - long size = 0; - - final File[] files = directory.listFiles(); - for ( int i = 0; i < files.length; i++ ) - { - final File file = files[i]; - - if ( file.isDirectory() ) - { - size += sizeOfDirectory( file ); - } - else - { - size += file.length(); - } - } - - return size; - } - - /** - * Return the files contained in the directory, using inclusion and exclusion Ant patterns, - * including the directory name in each of the files - * - * @param directory the directory to scan - * @param includes the includes pattern, comma separated - * @param excludes the excludes pattern, comma separated - * @return a list of File objects - * @throws IOException - * @see getFileNames( File, String, String, boolean ) - */ - public static List getFiles( File directory, String includes, String excludes ) - throws IOException - { - return getFiles( directory, includes, excludes, true ); - } - - /** - * Return the files contained in the directory, using inclusion and exclusion Ant patterns - * - * @param directory the directory to scan - * @param includes the includes pattern, comma separated - * @param excludes the excludes pattern, comma separated - * @param includeBasedir true to include the base dir in each file - * @return a list of File objects - * @throws IOException - * @see getFileNames( File, String, String, boolean ) - */ - public static List getFiles( File directory, String includes, String excludes, boolean includeBasedir ) - throws IOException - { - List fileNames = getFileNames( directory, includes, excludes, includeBasedir ); - - List files = new ArrayList(); - - for ( Iterator i = fileNames.iterator(); i.hasNext(); ) - { - files.add( new File( (String) i.next() ) ); - } - - return files; - } - - /** - * Return a list of files as String depending options. - * This method use case sensitive file name. - * - * @param directory the directory to scan - * @param includes the includes pattern, comma separated - * @param excludes the excludes pattern, comma separated - * @param includeBasedir true to include the base dir in each String of file - * @return a list of files as String - * @throws IOException - */ - public static List getFileNames( File directory, String includes, String excludes, boolean includeBasedir ) - throws IOException - { - return getFileNames( directory, includes, excludes, includeBasedir, true ); - } - - /** - * Return a list of files as String depending options. - * - * @param directory the directory to scan - * @param includes the includes pattern, comma separated - * @param excludes the excludes pattern, comma separated - * @param includeBasedir true to include the base dir in each String of file - * @param isCaseSensitive true if case sensitive - * @return a list of files as String - * @throws IOException - */ - public static List getFileNames( File directory, String includes, String excludes, boolean includeBasedir, - boolean isCaseSensitive ) - throws IOException - { - return getFileAndDirectoryNames( directory, includes, excludes, includeBasedir, isCaseSensitive, true, false ); - } - - /** - * Return a list of directories as String depending options. - * This method use case sensitive file name. - * - * @param directory the directory to scan - * @param includes the includes pattern, comma separated - * @param excludes the excludes pattern, comma separated - * @param includeBasedir true to include the base dir in each String of file - * @return a list of directories as String - * @throws IOException - */ - public static List getDirectoryNames( File directory, String includes, String excludes, boolean includeBasedir ) - throws IOException - { - return getDirectoryNames( directory, includes, excludes, includeBasedir, true ); - } - - /** - * Return a list of directories as String depending options. - * - * @param directory the directory to scan - * @param includes the includes pattern, comma separated - * @param excludes the excludes pattern, comma separated - * @param includeBasedir true to include the base dir in each String of file - * @param isCaseSensitive true if case sensitive - * @return a list of directories as String - * @throws IOException - */ - public static List getDirectoryNames( File directory, String includes, String excludes, boolean includeBasedir, - boolean isCaseSensitive ) - throws IOException - { - return getFileAndDirectoryNames( directory, includes, excludes, includeBasedir, isCaseSensitive, false, true ); - } - - /** - * Return a list of files as String depending options. - * - * @param directory the directory to scan - * @param includes the includes pattern, comma separated - * @param excludes the excludes pattern, comma separated - * @param includeBasedir true to include the base dir in each String of file - * @param isCaseSensitive true if case sensitive - * @param getFiles true if get files - * @param getDirectories true if get directories - * @return a list of files as String - * @throws IOException - */ - public static List getFileAndDirectoryNames( File directory, String includes, String excludes, - boolean includeBasedir, boolean isCaseSensitive, boolean getFiles, - boolean getDirectories ) - throws IOException - { - DirectoryScanner scanner = new DirectoryScanner(); - - scanner.setBasedir( directory ); - - if ( includes != null ) - { - scanner.setIncludes( StringUtils.split( includes, "," ) ); - } - - if ( excludes != null ) - { - scanner.setExcludes( StringUtils.split( excludes, "," ) ); - } - - scanner.setCaseSensitive( isCaseSensitive ); - - scanner.scan(); - - List list = new ArrayList(); - - if ( getFiles ) - { - String[] files = scanner.getIncludedFiles(); - - for ( int i = 0; i < files.length; i++ ) - { - if ( includeBasedir ) - { - list.add( directory + FileUtils.FS + files[i] ); - } - else - { - list.add( files[i] ); - } - } - } - - if ( getDirectories ) - { - String[] directories = scanner.getIncludedDirectories(); - - for ( int i = 0; i < directories.length; i++ ) - { - if ( includeBasedir ) - { - list.add( directory + FileUtils.FS + directories[i] ); - } - else - { - list.add( directories[i] ); - } - } - } - - return list; - } - - public static void copyDirectory( File sourceDirectory, File destinationDirectory ) - throws IOException - { - copyDirectory( sourceDirectory, destinationDirectory, "**", null ); - } - - public static void copyDirectory( File sourceDirectory, File destinationDirectory, String includes, - String excludes ) - throws IOException - { - if ( !sourceDirectory.exists() ) - { - return; - } - - List files = getFiles( sourceDirectory, includes, excludes ); - - for ( Iterator i = files.iterator(); i.hasNext(); ) - { - File file = (File) i.next(); - - copyFileToDirectory( file, destinationDirectory ); - } - } - - /** - * Copies a entire directory structure. - *

- * Note: - *

    - *
  • It will include empty directories. - *
  • The sourceDirectory must exists. - *
- * - * @param sourceDirectory - * @param destinationDirectory - * @throws IOException - */ - public static void copyDirectoryStructure( File sourceDirectory, File destinationDirectory ) - throws IOException - { - copyDirectoryStructure( sourceDirectory, destinationDirectory, destinationDirectory, false ); - } - - /** - * Copies an entire directory structure but only source files with timestamp later than the destinations'. - *

- * Note: - *

    - *
  • It will include empty directories. - *
  • The sourceDirectory must exists. - *
- * - * @param sourceDirectory - * @param destinationDirectory - * @throws IOException - */ - public static void copyDirectoryStructureIfModified( File sourceDirectory, File destinationDirectory ) - throws IOException - { - copyDirectoryStructure( sourceDirectory, destinationDirectory, destinationDirectory, true ); - } - - private static void copyDirectoryStructure( File sourceDirectory, File destinationDirectory, - File rootDestinationDirectory, boolean onlyModifiedFiles ) - throws IOException - { - if ( sourceDirectory == null ) - { - throw new IOException( "source directory can't be null." ); - } - - if ( destinationDirectory == null ) - { - throw new IOException( "destination directory can't be null." ); - } - - if ( sourceDirectory.equals( destinationDirectory ) ) - { - throw new IOException( "source and destination are the same directory." ); - } - - if ( !sourceDirectory.exists() ) - { - throw new IOException( "Source directory doesn't exists (" + sourceDirectory.getAbsolutePath() + ")." ); - } - - File[] files = sourceDirectory.listFiles(); - - String sourcePath = sourceDirectory.getAbsolutePath(); - - for ( int i = 0; i < files.length; i++ ) - { - File file = files[i]; - - if ( file.equals( rootDestinationDirectory ) ) - { - // We don't copy the destination directory in itself - continue; - } - - String dest = file.getAbsolutePath(); - - dest = dest.substring( sourcePath.length() + 1 ); - - File destination = new File( destinationDirectory, dest ); - - if ( file.isFile() ) - { - destination = destination.getParentFile(); - - if ( onlyModifiedFiles ) - { - copyFileToDirectoryIfModified( file, destination ); - } - else - { - copyFileToDirectory( file, destination ); - } - } - else if ( file.isDirectory() ) - { - if ( !destination.exists() && !destination.mkdirs() ) - { - throw new IOException( - "Could not create destination directory '" + destination.getAbsolutePath() + "'." ); - } - - copyDirectoryStructure( file, destination, rootDestinationDirectory, onlyModifiedFiles ); - } - else - { - throw new IOException( "Unknown file type: " + file.getAbsolutePath() ); - } - } - } - - /** - * Renames a file, even if that involves crossing file system boundaries. - *

- *

This will remove to (if it exists), ensure that - * to's parent directory exists and move - * from, which involves deleting from as - * well.

- * - * @param from the file to move - * @param to the new file name - * @throws IOException if anything bad happens during this - * process. Note that to may have been deleted - * already when this happens. - */ - public static void rename( File from, File to ) - throws IOException - { - if ( to.exists() && !to.delete() ) - { - throw new IOException( "Failed to delete " + to + " while trying to rename " + from ); - } - - File parent = to.getParentFile(); - if ( parent != null && !parent.exists() && !parent.mkdirs() ) - { - throw new IOException( "Failed to create directory " + parent + " while trying to rename " + from ); - } - - if ( !from.renameTo( to ) ) - { - copyFile( from, to ); - if ( !from.delete() ) - { - throw new IOException( "Failed to delete " + from + " while trying to rename it." ); - } - } - } - - /** - * Create a temporary file in a given directory. - *

- *

The file denoted by the returned abstract pathname did not - * exist before this method was invoked, any subsequent invocation - * of this method will yield a different file name.

- *

- * The filename is prefixNNNNNsuffix where NNNN is a random number - *

- *

This method is different to File.createTempFile of JDK 1.2 - * as it doesn't create the file itself. - * It uses the location pointed to by java.io.tmpdir - * when the parentDir attribute is - * null.

- * - * @param prefix prefix before the random number - * @param suffix file extension; include the '.' - * @param parentDir Directory to create the temporary file in - - * java.io.tmpdir used if not specificed - * @return a File reference to the new temporary file. - */ - public static File createTempFile( String prefix, String suffix, File parentDir ) - { - - File result = null; - String parent = System.getProperty( "java.io.tmpdir" ); - if ( parentDir != null ) - { - parent = parentDir.getPath(); - } - DecimalFormat fmt = new DecimalFormat( "#####" ); - Random rand = new Random( System.currentTimeMillis() + Runtime.getRuntime().freeMemory() ); - synchronized ( rand ) - { - do - { - result = new File( parent, prefix + fmt.format( Math.abs( rand.nextInt() ) ) + suffix ); - } - while ( result.exists() ); - } - return result; - } - - public static void copyFile( File from, File to, String encoding, FilterWrapper[] wrappers ) - throws IOException - { - if ( wrappers != null && wrappers.length > 0 ) - { - // buffer so it isn't reading a byte at a time! - Reader fileReader = null; - Writer fileWriter = null; - try - { - if ( encoding == null || encoding.length() < 1 ) - { - fileReader = new BufferedReader( new FileReader( from ) ); - fileWriter = new FileWriter( to ); - } - else - { - FileInputStream instream = new FileInputStream( from ); - - FileOutputStream outstream = new FileOutputStream( to ); - - fileReader = new BufferedReader( new InputStreamReader( instream, encoding ) ); - - fileWriter = new OutputStreamWriter( outstream, encoding ); - } - - Reader reader = fileReader; - for ( int i = 0; i < wrappers.length; i++ ) - { - FilterWrapper wrapper = wrappers[i]; - reader = wrapper.getReader( reader ); - } - - IOUtil.copy( reader, fileWriter ); - } - finally - { - IOUtil.close( fileReader ); - IOUtil.close( fileWriter ); - } - } - else - { - if ( to.lastModified() < from.lastModified() ) - { - copyFile( from, to ); - } - } - } - - public static abstract class FilterWrapper - { - public abstract Reader getReader( Reader fileReader ); - } - - public static List loadFile( File file ) throws IOException - { - List lines = new ArrayList(); - - if ( file.exists() ) - { - BufferedReader reader = new BufferedReader( new FileReader( file ) ); - - String line = reader.readLine(); - - while ( line != null ) - { - line = line.trim(); - - if ( !line.startsWith( "#" ) && line.length() != 0 ) - { - lines.add ( line ); - } - line = reader.readLine(); - } - - reader.close(); - } - - return lines; - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/IOUtil.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/IOUtil.java deleted file mode 100644 index cfd4dd656..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/IOUtil.java +++ /dev/null @@ -1,813 +0,0 @@ -package org.codehaus.plexus.util; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.codehaus.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Turbine" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact codehaus@codehaus.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Turbine", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ - -import java.io.BufferedInputStream; -import java.io.BufferedOutputStream; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import java.io.Writer; - -/** - * General IO Stream manipulation. - *

- * This class provides static utility methods for input/output operations, particularly buffered - * copying between sources (InputStream, Reader, String and - * byte[]) and destinations (OutputStream, Writer, - * String and byte[]). - *

- * - *

Unless otherwise noted, these copy methods do not flush or close the - * streams. Often, doing so would require making non-portable assumptions about the streams' origin - * and further use. This means that both streams' close() methods must be called after - * copying. if one omits this step, then the stream resources (sockets, file descriptors) are - * released when the associated Stream is garbage-collected. It is not a good idea to rely on this - * mechanism. For a good overview of the distinction between "memory management" and "resource - * management", see this - * UnixReview article

- * - *

For each copy method, a variant is provided that allows the caller to specify the - * buffer size (the default is 4k). As the buffer size can have a fairly large impact on speed, this - * may be worth tweaking. Often "large buffer -> faster" does not hold, even for large data - * transfers.

- * - *

For byte-to-char methods, a copy variant allows the encoding to be selected - * (otherwise the platform default is used).

- * - *

The copy methods use an internal buffer when copying. It is therefore advisable - * not to deliberately wrap the stream arguments to the copy methods in - * Buffered* streams. For example, don't do the - * following:

- * - * copy( new BufferedInputStream( in ), new BufferedOutputStream( out ) ); - * - *

The rationale is as follows:

- * - *

Imagine that an InputStream's read() is a very expensive operation, which would usually suggest - * wrapping in a BufferedInputStream. The BufferedInputStream works by issuing infrequent - * {@link java.io.InputStream#read(byte[] b, int off, int len)} requests on the underlying InputStream, to - * fill an internal buffer, from which further read requests can inexpensively get - * their data (until the buffer runs out).

- *

However, the copy methods do the same thing, keeping an internal buffer, - * populated by {@link InputStream#read(byte[] b, int off, int len)} requests. Having two buffers - * (or three if the destination stream is also buffered) is pointless, and the unnecessary buffer - * management hurts performance slightly (about 3%, according to some simple experiments).

- * - * @author Peter Donald - * @author Jeff Turner - * @version CVS $Revision$ $Date$ - * @since 4.0 - */ - -/* - * Behold, intrepid explorers; a map of this class: - * - * Method Input Output Dependency - * ------ ----- ------ ------- - * 1 copy InputStream OutputStream (primitive) - * 2 copy Reader Writer (primitive) - * - * 3 copy InputStream Writer 2 - * 4 toString InputStream String 3 - * 5 toByteArray InputStream byte[] 1 - * - * 6 copy Reader OutputStream 2 - * 7 toString Reader String 2 - * 8 toByteArray Reader byte[] 6 - * - * 9 copy String OutputStream 2 - * 10 copy String Writer (trivial) - * 11 toByteArray String byte[] 9 - * - * 12 copy byte[] Writer 3 - * 13 toString byte[] String 12 - * 14 copy byte[] OutputStream (trivial) - * - * - * Note that only the first two methods shuffle bytes; the rest use these two, or (if possible) copy - * using native Java copy methods. As there are method variants to specify buffer size and encoding, - * each row may correspond to up to 4 methods. - * - */ - -public final class IOUtil -{ - private static final int DEFAULT_BUFFER_SIZE = 1024 * 4; - - /** - * Private constructor to prevent instantiation. - */ - private IOUtil() - { - } - - /////////////////////////////////////////////////////////////// - // Core copy methods - /////////////////////////////////////////////////////////////// - - /** - * Copy bytes from an InputStream to an OutputStream. - */ - public static void copy( final InputStream input, final OutputStream output ) - throws IOException - { - copy( input, output, DEFAULT_BUFFER_SIZE ); - } - - /** - * Copy bytes from an InputStream to an OutputStream. - * @param bufferSize Size of internal buffer to use. - */ - public static void copy( final InputStream input, - final OutputStream output, - final int bufferSize ) - throws IOException - { - final byte[] buffer = new byte[bufferSize]; - int n = 0; - while ( -1 != ( n = input.read( buffer ) ) ) - { - output.write( buffer, 0, n ); - } - } - - /** - * Copy chars from a Reader to a Writer. - */ - public static void copy( final Reader input, final Writer output ) - throws IOException - { - copy( input, output, DEFAULT_BUFFER_SIZE ); - } - - /** - * Copy chars from a Reader to a Writer. - * @param bufferSize Size of internal buffer to use. - */ - public static void copy( final Reader input, final Writer output, final int bufferSize ) - throws IOException - { - final char[] buffer = new char[bufferSize]; - int n = 0; - while ( -1 != ( n = input.read( buffer ) ) ) - { - output.write( buffer, 0, n ); - } - output.flush(); - } - - /////////////////////////////////////////////////////////////// - // Derived copy methods - // InputStream -> * - /////////////////////////////////////////////////////////////// - - - /////////////////////////////////////////////////////////////// - // InputStream -> Writer - - /** - * Copy and convert bytes from an InputStream to chars on a - * Writer. - * The platform's default encoding is used for the byte-to-char conversion. - */ - public static void copy( final InputStream input, final Writer output ) - throws IOException - { - copy( input, output, DEFAULT_BUFFER_SIZE ); - } - - /** - * Copy and convert bytes from an InputStream to chars on a - * Writer. - * The platform's default encoding is used for the byte-to-char conversion. - * @param bufferSize Size of internal buffer to use. - */ - public static void copy( final InputStream input, final Writer output, final int bufferSize ) - throws IOException - { - final InputStreamReader in = new InputStreamReader( input ); - copy( in, output, bufferSize ); - } - - /** - * Copy and convert bytes from an InputStream to chars on a - * Writer, using the specified encoding. - * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. - */ - public static void copy( final InputStream input, final Writer output, final String encoding ) - throws IOException - { - final InputStreamReader in = new InputStreamReader( input, encoding ); - copy( in, output ); - } - - /** - * Copy and convert bytes from an InputStream to chars on a - * Writer, using the specified encoding. - * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. - * @param bufferSize Size of internal buffer to use. - */ - public static void copy( final InputStream input, - final Writer output, - final String encoding, - final int bufferSize ) - throws IOException - { - final InputStreamReader in = new InputStreamReader( input, encoding ); - copy( in, output, bufferSize ); - } - - - /////////////////////////////////////////////////////////////// - // InputStream -> String - - /** - * Get the contents of an InputStream as a String. - * The platform's default encoding is used for the byte-to-char conversion. - */ - public static String toString( final InputStream input ) - throws IOException - { - return toString( input, DEFAULT_BUFFER_SIZE ); - } - - /** - * Get the contents of an InputStream as a String. - * The platform's default encoding is used for the byte-to-char conversion. - * @param bufferSize Size of internal buffer to use. - */ - public static String toString( final InputStream input, final int bufferSize ) - throws IOException - { - final StringWriter sw = new StringWriter(); - copy( input, sw, bufferSize ); - return sw.toString(); - } - - /** - * Get the contents of an InputStream as a String. - * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. - */ - public static String toString( final InputStream input, final String encoding ) - throws IOException - { - return toString( input, encoding, DEFAULT_BUFFER_SIZE ); - } - - /** - * Get the contents of an InputStream as a String. - * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. - * @param bufferSize Size of internal buffer to use. - */ - public static String toString( final InputStream input, - final String encoding, - final int bufferSize ) - throws IOException - { - final StringWriter sw = new StringWriter(); - copy( input, sw, encoding, bufferSize ); - return sw.toString(); - } - - /////////////////////////////////////////////////////////////// - // InputStream -> byte[] - - /** - * Get the contents of an InputStream as a byte[]. - */ - public static byte[] toByteArray( final InputStream input ) - throws IOException - { - return toByteArray( input, DEFAULT_BUFFER_SIZE ); - } - - /** - * Get the contents of an InputStream as a byte[]. - * @param bufferSize Size of internal buffer to use. - */ - public static byte[] toByteArray( final InputStream input, final int bufferSize ) - throws IOException - { - final ByteArrayOutputStream output = new ByteArrayOutputStream(); - copy( input, output, bufferSize ); - return output.toByteArray(); - } - - - /////////////////////////////////////////////////////////////// - // Derived copy methods - // Reader -> * - /////////////////////////////////////////////////////////////// - - /////////////////////////////////////////////////////////////// - // Reader -> OutputStream - /** - * Serialize chars from a Reader to bytes on an OutputStream, and - * flush the OutputStream. - */ - public static void copy( final Reader input, final OutputStream output ) - throws IOException - { - copy( input, output, DEFAULT_BUFFER_SIZE ); - } - - /** - * Serialize chars from a Reader to bytes on an OutputStream, and - * flush the OutputStream. - * @param bufferSize Size of internal buffer to use. - */ - public static void copy( final Reader input, final OutputStream output, final int bufferSize ) - throws IOException - { - final OutputStreamWriter out = new OutputStreamWriter( output ); - copy( input, out, bufferSize ); - // NOTE: Unless anyone is planning on rewriting OutputStreamWriter, we have to flush - // here. - out.flush(); - } - - /////////////////////////////////////////////////////////////// - // Reader -> String - /** - * Get the contents of a Reader as a String. - */ - public static String toString( final Reader input ) - throws IOException - { - return toString( input, DEFAULT_BUFFER_SIZE ); - } - - /** - * Get the contents of a Reader as a String. - * @param bufferSize Size of internal buffer to use. - */ - public static String toString( final Reader input, final int bufferSize ) - throws IOException - { - final StringWriter sw = new StringWriter(); - copy( input, sw, bufferSize ); - return sw.toString(); - } - - - /////////////////////////////////////////////////////////////// - // Reader -> byte[] - /** - * Get the contents of a Reader as a byte[]. - */ - public static byte[] toByteArray( final Reader input ) - throws IOException - { - return toByteArray( input, DEFAULT_BUFFER_SIZE ); - } - - /** - * Get the contents of a Reader as a byte[]. - * @param bufferSize Size of internal buffer to use. - */ - public static byte[] toByteArray( final Reader input, final int bufferSize ) - throws IOException - { - ByteArrayOutputStream output = new ByteArrayOutputStream(); - copy( input, output, bufferSize ); - return output.toByteArray(); - } - - - /////////////////////////////////////////////////////////////// - // Derived copy methods - // String -> * - /////////////////////////////////////////////////////////////// - - - /////////////////////////////////////////////////////////////// - // String -> OutputStream - - /** - * Serialize chars from a String to bytes on an OutputStream, and - * flush the OutputStream. - */ - public static void copy( final String input, final OutputStream output ) - throws IOException - { - copy( input, output, DEFAULT_BUFFER_SIZE ); - } - - /** - * Serialize chars from a String to bytes on an OutputStream, and - * flush the OutputStream. - * @param bufferSize Size of internal buffer to use. - */ - public static void copy( final String input, final OutputStream output, final int bufferSize ) - throws IOException - { - final StringReader in = new StringReader( input ); - final OutputStreamWriter out = new OutputStreamWriter( output ); - copy( in, out, bufferSize ); - // NOTE: Unless anyone is planning on rewriting OutputStreamWriter, we have to flush - // here. - out.flush(); - } - - - - /////////////////////////////////////////////////////////////// - // String -> Writer - - /** - * Copy chars from a String to a Writer. - */ - public static void copy( final String input, final Writer output ) - throws IOException - { - output.write( input ); - } - - /** - * Copy bytes from an InputStream to an - * OutputStream, with buffering. - * This is equivalent to passing a - * {@link java.io.BufferedInputStream} and - * {@link java.io.BufferedOutputStream} to {@link #copy(InputStream, OutputStream)}, - * and flushing the output stream afterwards. The streams are not closed - * after the copy. - * @deprecated Buffering streams is actively harmful! See the class description as to why. Use - * {@link #copy(InputStream, OutputStream)} instead. - */ - public static void bufferedCopy( final InputStream input, final OutputStream output ) - throws IOException - { - final BufferedInputStream in = new BufferedInputStream( input ); - final BufferedOutputStream out = new BufferedOutputStream( output ); - copy( in, out ); - out.flush(); - } - - - /////////////////////////////////////////////////////////////// - // String -> byte[] - /** - * Get the contents of a String as a byte[]. - */ - public static byte[] toByteArray( final String input ) - throws IOException - { - return toByteArray( input, DEFAULT_BUFFER_SIZE ); - } - - /** - * Get the contents of a String as a byte[]. - * @param bufferSize Size of internal buffer to use. - */ - public static byte[] toByteArray( final String input, final int bufferSize ) - throws IOException - { - ByteArrayOutputStream output = new ByteArrayOutputStream(); - copy( input, output, bufferSize ); - return output.toByteArray(); - } - - - - /////////////////////////////////////////////////////////////// - // Derived copy methods - // byte[] -> * - /////////////////////////////////////////////////////////////// - - - /////////////////////////////////////////////////////////////// - // byte[] -> Writer - - /** - * Copy and convert bytes from a byte[] to chars on a - * Writer. - * The platform's default encoding is used for the byte-to-char conversion. - */ - public static void copy( final byte[] input, final Writer output ) - throws IOException - { - copy( input, output, DEFAULT_BUFFER_SIZE ); - } - - /** - * Copy and convert bytes from a byte[] to chars on a - * Writer. - * The platform's default encoding is used for the byte-to-char conversion. - * @param bufferSize Size of internal buffer to use. - */ - public static void copy( final byte[] input, final Writer output, final int bufferSize ) - throws IOException - { - final ByteArrayInputStream in = new ByteArrayInputStream( input ); - copy( in, output, bufferSize ); - } - - /** - * Copy and convert bytes from a byte[] to chars on a - * Writer, using the specified encoding. - * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. - */ - public static void copy( final byte[] input, final Writer output, final String encoding ) - throws IOException - { - final ByteArrayInputStream in = new ByteArrayInputStream( input ); - copy( in, output, encoding ); - } - - /** - * Copy and convert bytes from a byte[] to chars on a - * Writer, using the specified encoding. - * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. - * @param bufferSize Size of internal buffer to use. - */ - public static void copy( final byte[] input, - final Writer output, - final String encoding, - final int bufferSize ) - throws IOException - { - final ByteArrayInputStream in = new ByteArrayInputStream( input ); - copy( in, output, encoding, bufferSize ); - } - - - /////////////////////////////////////////////////////////////// - // byte[] -> String - - /** - * Get the contents of a byte[] as a String. - * The platform's default encoding is used for the byte-to-char conversion. - */ - public static String toString( final byte[] input ) - throws IOException - { - return toString( input, DEFAULT_BUFFER_SIZE ); - } - - /** - * Get the contents of a byte[] as a String. - * The platform's default encoding is used for the byte-to-char conversion. - * @param bufferSize Size of internal buffer to use. - */ - public static String toString( final byte[] input, final int bufferSize ) - throws IOException - { - final StringWriter sw = new StringWriter(); - copy( input, sw, bufferSize ); - return sw.toString(); - } - - /** - * Get the contents of a byte[] as a String. - * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. - */ - public static String toString( final byte[] input, final String encoding ) - throws IOException - { - return toString( input, encoding, DEFAULT_BUFFER_SIZE ); - } - - /** - * Get the contents of a byte[] as a String. - * @param encoding The name of a supported character encoding. See the - * IANA - * Charset Registry for a list of valid encoding types. - * @param bufferSize Size of internal buffer to use. - */ - public static String toString( final byte[] input, - final String encoding, - final int bufferSize ) - throws IOException - { - final StringWriter sw = new StringWriter(); - copy( input, sw, encoding, bufferSize ); - return sw.toString(); - } - - - /////////////////////////////////////////////////////////////// - // byte[] -> OutputStream - - /** - * Copy bytes from a byte[] to an OutputStream. - */ - public static void copy( final byte[] input, final OutputStream output ) - throws IOException - { - copy( input, output, DEFAULT_BUFFER_SIZE ); - } - - /** - * Copy bytes from a byte[] to an OutputStream. - * @param bufferSize Size of internal buffer to use. - */ - public static void copy( final byte[] input, - final OutputStream output, - final int bufferSize ) - throws IOException - { - output.write( input ); - } - - /** - * Compare the contents of two Streams to determine if they are equal or not. - * - * @param input1 the first stream - * @param input2 the second stream - * @return true if the content of the streams are equal or they both don't exist, false otherwise - */ - public static boolean contentEquals( final InputStream input1, - final InputStream input2 ) - throws IOException - { - final InputStream bufferedInput1 = new BufferedInputStream( input1 ); - final InputStream bufferedInput2 = new BufferedInputStream( input2 ); - - int ch = bufferedInput1.read(); - while ( -1 != ch ) - { - final int ch2 = bufferedInput2.read(); - if ( ch != ch2 ) - { - return false; - } - ch = bufferedInput1.read(); - } - - final int ch2 = bufferedInput2.read(); - if ( -1 != ch2 ) - { - return false; - } - else - { - return true; - } - } - - // ---------------------------------------------------------------------- - // closeXXX() - // ---------------------------------------------------------------------- - - /** - * Closes the input stream. The input stream can be null and any IOException's will be swallowed. - * - * @param inputStream The stream to close. - */ - public static void close( InputStream inputStream ) - { - if ( inputStream == null ) - { - return; - } - - try - { - inputStream.close(); - } - catch( IOException ex ) - { - // ignore - } - } - - /** - * Closes the output stream. The output stream can be null and any IOException's will be swallowed. - * - * @param outputStream The stream to close. - */ - public static void close( OutputStream outputStream ) - { - if ( outputStream == null ) - { - return; - } - - try - { - outputStream.close(); - } - catch( IOException ex ) - { - // ignore - } - } - - /** - * Closes the reader. The reader can be null and any IOException's will be swallowed. - * - * @param reader The reader to close. - */ - public static void close( Reader reader ) - { - if ( reader == null ) - { - return; - } - - try - { - reader.close(); - } - catch( IOException ex ) - { - // ignore - } - } - - /** - * Closes the writer. The writer can be null and any IOException's will be swallowed. - * - * @param wrtier The writer to close. - */ - public static void close( Writer writer ) - { - if ( writer == null ) - { - return; - } - - try - { - writer.close(); - } - catch( IOException ex ) - { - // ignore - } - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/InterpolationFilterReader.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/InterpolationFilterReader.java deleted file mode 100644 index 248beebca..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/InterpolationFilterReader.java +++ /dev/null @@ -1,291 +0,0 @@ -/* - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2002-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.codehaus.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. - * - * 4. The names "Ant" and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact codehaus@codehaus.org. - * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ - -package org.codehaus.plexus.util; - -import java.io.FilterReader; -import java.io.IOException; -import java.io.Reader; -import java.util.HashMap; -import java.util.Map; - -/** - */ -public class InterpolationFilterReader - extends FilterReader -{ - /** replacement text from a token */ - private String replaceData = null; - - /** Index into replacement data */ - private int replaceIndex = -1; - - /** Hashtable to hold the replacee-replacer pairs (String to String). */ - private Map variables = new HashMap(); - - /** Character marking the beginning of a token. */ - private String beginToken; - - /** Character marking the end of a token. */ - private String endToken; - - /** Length of begin token. */ - private int beginTokenLength; - - /** Length of end token. */ - private int endTokenLength; - - /** Default begin token. */ - private static String DEFAULT_BEGIN_TOKEN = "${"; - - /** Default end token. */ - private static String DEFAULT_END_TOKEN = "}"; - - public InterpolationFilterReader( Reader in, Map variables, String beginToken, String endToken ) - { - super( in ); - - this.variables = variables; - this.beginToken = beginToken; - this.endToken = endToken; - - beginTokenLength = beginToken.length(); - endTokenLength = endToken.length(); - } - - public InterpolationFilterReader( Reader in, Map variables ) - { - this( in, variables, DEFAULT_BEGIN_TOKEN, DEFAULT_END_TOKEN ); - } - - /** - * Skips characters. This method will block until some characters are - * available, an I/O error occurs, or the end of the stream is reached. - * - * @param n The number of characters to skip - * - * @return the number of characters actually skipped - * - * @exception IllegalArgumentException If n is negative. - * @exception IOException If an I/O error occurs - */ - public long skip( long n ) throws IOException - { - if ( n < 0L ) - { - throw new IllegalArgumentException( "skip value is negative" ); - } - - for ( long i = 0; i < n; i++ ) - { - if ( read() == -1 ) - { - return i; - } - } - return n; - } - - /** - * Reads characters into a portion of an array. This method will block - * until some input is available, an I/O error occurs, or the end of the - * stream is reached. - * - * @param cbuf Destination buffer to write characters to. - * Must not be null. - * @param off Offset at which to start storing characters. - * @param len Maximum number of characters to read. - * - * @return the number of characters read, or -1 if the end of the - * stream has been reached - * - * @exception IOException If an I/O error occurs - */ - public int read( char cbuf[], - int off, - int len ) - throws IOException - { - for ( int i = 0; i < len; i++ ) - { - int ch = read(); - if ( ch == -1 ) - { - if ( i == 0 ) - { - return -1; - } - else - { - return i; - } - } - cbuf[off + i] = (char) ch; - } - return len; - } - - /** - * Returns the next character in the filtered stream, replacing tokens - * from the original stream. - * - * @return the next character in the resulting stream, or -1 - * if the end of the resulting stream has been reached - * - * @exception IOException if the underlying stream throws an IOException - * during reading - */ - public int read() throws IOException - { - if ( replaceIndex != -1 ) - { - int ch = replaceData.charAt( replaceIndex++ ); - if ( replaceIndex >= replaceData.length() ) - { - replaceIndex = -1; - } - return ch; - } - - int ch = in.read(); - - if ( ch == beginToken.charAt( 0 ) ) - { - StringBuffer key = new StringBuffer(); - - int beginTokenMatchPos = 1; - - do - { - ch = in.read(); - if ( ch != -1 ) - { - key.append( (char) ch ); - - if ( ( beginTokenMatchPos < beginTokenLength ) && - ( ch != beginToken.charAt( beginTokenMatchPos++ ) ) ) - { - ch = -1; // not really EOF but to trigger code below - break; - } - } - else - { - break; - } - } - while ( ch != endToken.charAt( 0 ) ); - - // now test endToken - if ( ch != -1 && endTokenLength > 1 ) - { - int endTokenMatchPos = 1; - - do - { - ch = in.read(); - - if ( ch != -1 ) - { - key.append( (char) ch ); - - if ( ch != endToken.charAt( endTokenMatchPos++ ) ) - { - ch = -1; // not really EOF but to trigger code below - break; - } - - } - else - { - break; - } - } - while ( endTokenMatchPos < endTokenLength ); - } - - // There is nothing left to read so we have the situation where the begin/end token - // are in fact the same and as there is nothing left to read we have got ourselves - // end of a token boundary so let it pass through. - if ( ch == -1 ) - { - replaceData = key.toString(); - replaceIndex = 0; - return beginToken.charAt( 0 ); - } - - String variableKey = key.substring( beginTokenLength - 1, key.length() - endTokenLength ); - - Object o = variables.get(variableKey); - if ( o != null ) - { - String value = o.toString(); - if ( value.length() != 0 ) - { - replaceData = value; - replaceIndex = 0; - } - return read(); - } - else - { - replaceData = key.toString(); - replaceIndex = 0; - return beginToken.charAt(0); - } - } - - return ch; - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/LineOrientedInterpolatingReader.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/LineOrientedInterpolatingReader.java deleted file mode 100644 index 1426f39fa..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/LineOrientedInterpolatingReader.java +++ /dev/null @@ -1,419 +0,0 @@ -package org.codehaus.plexus.util; - -/* ==================================================================== - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ==================================================================== - */ - -import org.codehaus.plexus.util.reflection.Reflector; -import org.codehaus.plexus.util.reflection.ReflectorException; - -import java.io.FilterReader; -import java.io.IOException; -import java.io.PushbackReader; -import java.io.Reader; -import java.util.Collections; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Map; -import java.util.Set; -import java.util.TreeMap; - -/** - * @author jdcasey Created on Feb 3, 2005 - */ -public class LineOrientedInterpolatingReader - extends FilterReader -{ - public static final String DEFAULT_START_DELIM = "${"; - - public static final String DEFAULT_END_DELIM = "}"; - - public static final String DEFAULT_ESCAPE_SEQ = "\\"; - - private static final char CARRIAGE_RETURN_CHAR = '\r'; - - private static final char NEWLINE_CHAR = '\n'; - - private final PushbackReader pushbackReader; - - private final Map context; - - private final String startDelim; - - private final String endDelim; - - private final String escapeSeq; - - private final int minExpressionSize; - - private final Reflector reflector; - - private int lineIdx = -1; - - private String line; - - public LineOrientedInterpolatingReader( Reader reader, Map context, String startDelim, String endDelim, - String escapeSeq ) - { - super( reader ); - - this.startDelim = startDelim; - - this.endDelim = endDelim; - - this.escapeSeq = escapeSeq; - - // Expressions have to be at least this size... - this.minExpressionSize = startDelim.length() + endDelim.length() + 1; - - this.context = Collections.unmodifiableMap( context ); - - this.reflector = new Reflector(); - - if ( reader instanceof PushbackReader ) - { - this.pushbackReader = (PushbackReader) reader; - } - else - { - this.pushbackReader = new PushbackReader( reader, 1 ); - } - } - - public LineOrientedInterpolatingReader( Reader reader, Map context, String startDelim, String endDelim ) - { - this( reader, context, startDelim, endDelim, DEFAULT_ESCAPE_SEQ ); - } - - public LineOrientedInterpolatingReader( Reader reader, Map context ) - { - this( reader, context, DEFAULT_START_DELIM, DEFAULT_END_DELIM, DEFAULT_ESCAPE_SEQ ); - } - - public int read() throws IOException - { - if ( line == null || lineIdx >= line.length() ) - { - readAndInterpolateLine(); - } - - int next = -1; - - if ( line != null && lineIdx < line.length() ) - { - next = line.charAt( lineIdx++ ); - } - - return next; - } - - public int read( char[] cbuf, int off, int len ) throws IOException - { - int fillCount = 0; - - for ( int i = off; i < off + len; i++ ) - { - int next = read(); - if ( next > -1 ) - { - cbuf[i] = (char) next; - } - else - { - break; - } - - fillCount++; - } - - if ( fillCount == 0 ) - { - fillCount = -1; - } - - return fillCount; - } - - public long skip( long n ) throws IOException - { - long skipCount = 0; - - for ( long i = 0; i < n; i++ ) - { - int next = read(); - - if ( next < 0 ) - { - break; - } - - skipCount++; - } - - return skipCount; - } - - private void readAndInterpolateLine() throws IOException - { - String rawLine = readLine(); - - if(rawLine != null) - { - Set expressions = parseForExpressions( rawLine ); - - Map evaluatedExpressions = evaluateExpressions( expressions ); - - String interpolated = replaceWithInterpolatedValues( rawLine, evaluatedExpressions ); - - if ( interpolated != null && interpolated.length() > 0 ) - { - line = interpolated; - lineIdx = 0; - } - } - else - { - line = null; - lineIdx = -1; - } - } - - private String readLine() throws IOException - { - StringBuffer lineBuffer = new StringBuffer( 40 ); // half of the "normal" line maxsize - int next = -1; - - boolean lastWasCR = false; - while ( ( next = pushbackReader.read() ) > -1 ) - { - char c = (char) next; - - if ( c == CARRIAGE_RETURN_CHAR ) - { - lastWasCR = true; - lineBuffer.append( c ); - } - else if ( c == NEWLINE_CHAR ) - { - lineBuffer.append( c ); - break; // end of line. - } - else if ( lastWasCR ) - { - pushbackReader.unread( c ); - break; - } - else - { - lineBuffer.append( c ); - } - } - - if ( lineBuffer.length() < 1 ) - { - return null; - } - else - { - return lineBuffer.toString(); - } - } - - private String replaceWithInterpolatedValues( String rawLine, Map evaluatedExpressions ) - { - String result = rawLine; - - for ( Iterator it = evaluatedExpressions.entrySet().iterator(); it.hasNext(); ) - { - Map.Entry entry = (Map.Entry) it.next(); - - String expression = (String) entry.getKey(); - - String value = String.valueOf( entry.getValue() ); - - result = findAndReplaceUnlessEscaped( result, expression, value ); - } - - return result; - } - - private Map evaluateExpressions( Set expressions ) - { - Map evaluated = new TreeMap(); - - for ( Iterator it = expressions.iterator(); it.hasNext(); ) - { - String rawExpression = (String) it.next(); - - String realExpression = rawExpression.substring( startDelim.length(), rawExpression.length() - - endDelim.length() ); - - String[] parts = realExpression.split( "\\." ); - if ( parts.length > 0 ) - { - Object value = context.get( parts[0] ); - - if ( value != null ) - { - for ( int i = 1; i < parts.length; i++ ) - { - try - { - value = reflector.getObjectProperty( value, parts[i] ); - - if ( value == null ) - { - break; - } - } - catch ( ReflectorException e ) - { - // TODO: Fix this! It should report, but not interrupt. - e.printStackTrace(); - - break; - } - } - - evaluated.put( rawExpression, value ); - } - } - } - - return evaluated; - } - - private Set parseForExpressions( String rawLine ) - { - Set expressions = new HashSet(); - - if ( rawLine != null ) - { - int placeholder = -1; - - do - { - // find the beginning of the next expression. - int start = findDelimiter( rawLine, startDelim, placeholder ); - - // if we can't find a start-delimiter, then there is no valid expression. Ignore everything else. - if ( start < 0 ) - { - // no expression found. - break; - } - - // find the end of the next expression. - int end = findDelimiter( rawLine, endDelim, start + 1 ); - - // if we can't find an end-delimiter, then this is not a valid expression. Ignore it. - if ( end < 0 ) - { - // no VALID expression found. - break; - } - - // if we reach this point, we have a valid start and end position, which - // means we have a valid expression. So, we add it to the set of - // expressions in need of evaluation. - expressions.add( rawLine.substring( start, end + endDelim.length() ) ); - - // increment the placeholder so we can look beyond this expression. - placeholder = end + 1; - } while ( placeholder < rawLine.length() - minExpressionSize ); - } - - return expressions; - } - - private int findDelimiter( String rawLine, String delimiter, int lastPos ) - { - int placeholder = lastPos; - - int position = -1; - do - { - position = rawLine.indexOf( delimiter, placeholder ); - - if ( position < 0 ) - { - break; - } - else - { - int escEndIdx = rawLine.indexOf( escapeSeq, placeholder ) + escapeSeq.length(); - - if ( escEndIdx > escapeSeq.length() - 1 && escEndIdx == position ) - { - placeholder = position + 1; - position = -1; - } - } - - } while ( position < 0 && placeholder < rawLine.length() - endDelim.length() ); - // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - // use length() - endDelim.length() b/c otherwise there is nothing left to search. - - return position; - } - - private String findAndReplaceUnlessEscaped(String rawLine, String search, String replace) - { - StringBuffer lineBuffer = new StringBuffer( (int)(rawLine.length() * 1.5) ); - - int lastReplacement = -1; - - do - { - int nextReplacement = rawLine.indexOf( search, lastReplacement + 1 ); - if(nextReplacement > -1) - { - if(lastReplacement < 0) - { - lastReplacement = 0; - } - - lineBuffer.append( rawLine.substring( lastReplacement, nextReplacement ) ); - - int escIdx = rawLine.indexOf( escapeSeq, lastReplacement + 1 ); - if(escIdx > -1 && escIdx + escapeSeq.length() == nextReplacement) - { - lineBuffer.setLength( lineBuffer.length() - escapeSeq.length() ); - lineBuffer.append( search ); - } - else - { - lineBuffer.append( replace ); - } - - lastReplacement = nextReplacement + search.length(); - } - else - { - break; - } - } - while(lastReplacement > -1); - - if( lastReplacement < rawLine.length() ) - { - lineBuffer.append( rawLine.substring( lastReplacement ) ); - } - - return lineBuffer.toString(); - } - -} \ No newline at end of file diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/Os.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/Os.java deleted file mode 100644 index aff4309cf..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/Os.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. - * - * 4. The names "Ant" and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ - -package org.codehaus.plexus.util; - -import java.util.Locale; - -/** - * Condition that tests the OS type. - * - * @author Stefan Bodewig - * @author Magesh Umasankar - * @since Ant 1.4 - * @version $Revision$ - */ -public class Os -{ - private static final String OS_NAME = System.getProperty( "os.name" ).toLowerCase( Locale.US ); - - private static final String OS_ARCH = System.getProperty( "os.arch" ).toLowerCase( Locale.US ); - - private static final String OS_VERSION = System.getProperty( "os.version" ).toLowerCase( Locale.US ); - - private static final String PATH_SEP = System.getProperty( "path.separator" ); - - private String family; - private String name; - private String version; - private String arch; - - /** - * Default constructor - * - */ - public Os() - { - } - - /** - * Constructor that sets the family attribute - * - * @param family a String value - */ - public Os( String family ) - { - setFamily( family ); - } - - /** - * Sets the desired OS family type - * - * @param f The OS family type desired
- * Possible values:
- *
    - *
  • dos
  • - *
  • mac
  • - *
  • netware
  • - *
  • os/2
  • - *
  • tandem
  • - *
  • unix
  • - *
  • windows
  • - *
  • win9x
  • - *
  • z/os
  • - *
  • os/400
  • - *
- */ - public void setFamily( String f ) - { - family = f.toLowerCase( Locale.US ); - } - - /** - * Sets the desired OS name - * - * @param name The OS name - */ - public void setName( String name ) - { - this.name = name.toLowerCase( Locale.US ); - } - - /** - * Sets the desired OS architecture - * - * @param arch The OS architecture - */ - public void setArch( String arch ) - { - this.arch = arch.toLowerCase( Locale.US ); - } - - /** - * Sets the desired OS version - * - * @param version The OS version - */ - public void setVersion( String version ) - { - this.version = version.toLowerCase( Locale.US ); - } - - /** - * Determines if the OS on which Ant is executing matches the type of - * that set in setFamily. - * @see Os#setFamily(String) - */ - public boolean eval() throws Exception - { - return isOs( family, name, arch, version ); - } - - /** - * Determines if the OS on which Ant is executing matches the - * given OS family. - * @param family the family to check for - * @return true if the OS matches - * @since 1.5 - */ - public static boolean isFamily( String family ) - { - return isOs( family, null, null, null ); - } - - /** - * Determines if the OS on which Ant is executing matches the - * given OS name. - * - * @param name the OS name to check for - * @return true if the OS matches - * @since 1.7 - */ - public static boolean isName( String name ) - { - return isOs( null, name, null, null ); - } - - /** - * Determines if the OS on which Ant is executing matches the - * given OS architecture. - * - * @param arch the OS architecture to check for - * @return true if the OS matches - * @since 1.7 - */ - public static boolean isArch( String arch ) - { - return isOs( null, null, arch, null ); - } - - /** - * Determines if the OS on which Ant is executing matches the - * given OS version. - * - * @param version the OS version to check for - * @return true if the OS matches - * @since 1.7 - */ - public static boolean isVersion( String version ) - { - return isOs( null, null, null, version ); - } - - /** - * Determines if the OS on which Ant is executing matches the - * given OS family, name, architecture and version. - * - * The name, archictecture and version are compared to the System - * properties os.name, os.version and os.arch in a case-independent way. - * - * @param family The OS family - * @param name The OS name - * @param arch The OS architecture - * @param version The OS version - * @return true if the OS matches - * @since 1.7 - */ - public static boolean isOs( String family, String name, String arch, - String version ) - { - boolean retValue = false; - - if ( family != null || name != null || arch != null - || version != null ) - { - - boolean isFamily = true; - boolean isName = true; - boolean isArch = true; - boolean isVersion = true; - - if ( family != null ) - { - if ( family.equalsIgnoreCase( "windows" ) ) - { - isFamily = OS_NAME.indexOf( "windows" ) > -1; - } - else if ( family.equalsIgnoreCase( "os/2" ) ) - { - isFamily = OS_NAME.indexOf( "os/2" ) > -1; - } - else if ( family.equalsIgnoreCase( "netware" ) ) - { - isFamily = OS_NAME.indexOf( "netware" ) > -1; - } - else if ( family.equalsIgnoreCase( "dos" ) ) - { - isFamily = PATH_SEP.equals( ";" ) && !isFamily( "netware" ); - } - else if ( family.equalsIgnoreCase( "mac" ) ) - { - isFamily = OS_NAME.indexOf( "mac" ) > -1; - } - else if ( family.equalsIgnoreCase( "tandem" ) ) - { - isFamily = OS_NAME.indexOf( "nonstop_kernel" ) > -1; - } - else if ( family.equalsIgnoreCase( "unix" ) ) - { - isFamily = PATH_SEP.equals( ":" ) - && !isFamily( "openvms" ) - && ( !isFamily( "mac" ) || OS_NAME.endsWith( "x" ) ); - } - else if ( family.equalsIgnoreCase( "win9x" ) ) - { - isFamily = isFamily( "windows" ) - && ( OS_NAME.indexOf( "95" ) >= 0 - || OS_NAME.indexOf( "98" ) >= 0 - || OS_NAME.indexOf( "me" ) >= 0 - || OS_NAME.indexOf( "ce" ) >= 0 ); - } - else if ( family.equalsIgnoreCase( "z/os" ) ) - { - isFamily = OS_NAME.indexOf( "z/os" ) > -1 - || OS_NAME.indexOf( "os/390" ) > -1; - } - else if ( family.equalsIgnoreCase( "os/400" ) ) - { - isFamily = OS_NAME.indexOf( "os/400" ) > -1; - } - else if ( family.equalsIgnoreCase( "openvms" ) ) - { - isFamily = OS_NAME.indexOf( "openvms" ) > -1; - } - } - if ( name != null ) - { - isName = name.toLowerCase( Locale.US ).equals( OS_NAME ); - } - if ( arch != null ) - { - isArch = arch.toLowerCase( Locale.US ).equals( OS_ARCH ); - } - if ( version != null ) - { - isVersion = version.toLowerCase( Locale.US ).equals( OS_VERSION ); - } - retValue = isFamily && isName && isArch && isVersion; - } - return retValue; - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/PathTool.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/PathTool.java deleted file mode 100644 index 38562ba1f..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/PathTool.java +++ /dev/null @@ -1,299 +0,0 @@ -package org.codehaus.plexus.util; - -/* ==================================================================== - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ==================================================================== - */ - -/** - * Path tool contains static methods to assist in determining path-related - * information such as relative paths. - * - * @author Pete Kazmier - * @author Vincent Massol - * @version $Id$ - */ -public class PathTool -{ - /** - * Determines the relative path of a filename from a base directory. - * This method is useful in building relative links within pages of - * a web site. It provides similar functionality to Anakia's - * $relativePath context variable. The arguments to - * this method may contain either forward or backward slashes as - * file separators. The relative path returned is formed using - * forward slashes as it is expected this path is to be used as a - * link in a web page (again mimicking Anakia's behavior). - *

- * This method is thread-safe. - * - * @param basedir The base directory. - * @param filename The filename that is relative to the base - * directory. - * @return The relative path of the filename from the base - * directory. This value is not terminated with a forward slash. - * A zero-length string is returned if: the filename is not relative to - * the base directory, basedir is null or zero-length, - * or filename is null or zero-length. - */ - public static final String getRelativePath( String basedir, String filename ) - { - basedir = uppercaseDrive(basedir); - filename = uppercaseDrive(filename); - - /* - * Verify the arguments and make sure the filename is relative - * to the base directory. - */ - if ( basedir == null || basedir.length() == 0 || filename == null - || filename.length() == 0 || !filename.startsWith( basedir ) ) - { - return ""; - } - - /* - * Normalize the arguments. First, determine the file separator - * that is being used, then strip that off the end of both the - * base directory and filename. - */ - String separator = determineSeparator( filename ); - basedir = StringUtils.chompLast( basedir, separator ); - filename = StringUtils.chompLast( filename, separator ); - - /* - * Remove the base directory from the filename to end up with a - * relative filename (relative to the base directory). This - * filename is then used to determine the relative path. - */ - String relativeFilename = filename.substring( basedir.length() ); - - return determineRelativePath( relativeFilename, separator ); - } - - /** - * Determines the relative path of a filename. This method is - * useful in building relative links within pages of a web site. It - * provides similar functionality to Anakia's - * $relativePath context variable. The argument to - * this method may contain either forward or backward slashes as - * file separators. The relative path returned is formed using - * forward slashes as it is expected this path is to be used as a - * link in a web page (again mimicking Anakia's behavior). - *

- * This method is thread-safe. - * - * @param filename The filename to be parsed. - * @return The relative path of the filename. This value is not - * terminated with a forward slash. A zero-length string is - * returned if: filename is null or zero-length. - */ - public static final String getRelativePath( String filename ) - { - filename = uppercaseDrive(filename); - - if ( filename == null || filename.length() == 0 ) - { - return ""; - } - - /* - * Normalize the argument. First, determine the file separator - * that is being used, then strip that off the end of the - * filename. Then, if the filename doesn't begin with a - * separator, add one. - */ - - String separator = determineSeparator( filename ); - filename = StringUtils.chompLast( filename, separator ); - if ( !filename.startsWith( separator ) ) - { - filename = separator + filename; - } - - return determineRelativePath( filename, separator ); - } - - /** - * Determines the directory component of a filename. This is useful - * within DVSL templates when used in conjunction with the DVSL's - * $context.getAppValue("infilename") to get the - * current directory that is currently being processed. - *

- * This method is thread-safe. - * - * @param filename The filename to be parsed. - * @return The directory portion of the filename. If - * the filename does not contain a directory component, "." is - * returned. - */ - public static final String getDirectoryComponent( String filename ) - { - if ( filename == null || filename.length() == 0 ) - { - return ""; - } - - String separator = determineSeparator( filename ); - String directory = StringUtils.chomp( filename, separator ); - - if ( filename.equals( directory ) ) - { - return "."; - } - else - { - return directory; - } - } - - /** - * Determines the relative path of a filename. For each separator - * within the filename (except the leading if present), append the - * "../" string to the return value. - * - * @param filename The filename to parse. - * @param separator The separator used within the filename. - * @return The relative path of the filename. This value is not - * terminated with a forward slash. A zero-length string is - * returned if: the filename is zero-length. - */ - private static final String determineRelativePath( String filename, - String separator ) - { - if ( filename.length() == 0 ) - { - return ""; - } - - - /* - * Count the slashes in the relative filename, but exclude the - * leading slash. If the path has no slashes, then the filename - * is relative to the current directory. - */ - int slashCount = StringUtils.countMatches( filename, separator ) - 1; - if ( slashCount <= 0 ) - { - return "."; - } - - /* - * The relative filename contains one or more slashes indicating - * that the file is within one or more directories. Thus, each - * slash represents a "../" in the relative path. - */ - StringBuffer sb = new StringBuffer(); - for ( int i = 0; i < slashCount; i++ ) - { - sb.append( "../" ); - } - - /* - * Finally, return the relative path but strip the trailing - * slash to mimic Anakia's behavior. - */ - return StringUtils.chop( sb.toString() ); - } - - /** - * Helper method to determine the file separator (forward or - * backward slash) used in a filename. The slash that occurs more - * often is returned as the separator. - * - * @param filename The filename parsed to determine the file - * separator. - * @return The file separator used within filename. - * This value is either a forward or backward slash. - */ - private static final String determineSeparator( String filename ) - { - int forwardCount = StringUtils.countMatches( filename, "/" ); - int backwardCount = StringUtils.countMatches( filename, "\\" ); - - return forwardCount >= backwardCount ? "/" : "\\"; - } - - /** - * Cygwin prefers lowercase drive letters, but other parts of maven use uppercase - * @param path - * @return String - */ - static final String uppercaseDrive(String path) - { - if (path == null) - { - return null; - } - if (path.length() >= 2 && path.charAt(1) == ':') - { - path = path.substring(0, 1).toUpperCase() + path.substring(1); - } - return path; - } - - /** - * Calculates the appropriate link given the preferred link and the relativePath of the document - * @param link - * @param relativePath - * @return String - */ - public static final String calculateLink(String link, String relativePath) - { - //This must be some historical feature - if (link.startsWith("/site/")) - { - return link.substring(5); - } - - //Allows absolute links in nav-bars etc - if (link.startsWith("/absolute/")) - { - return link.substring(10); - } - - // This traps urls like http:// - if (link.indexOf(":") >= 0) - { - return link; - } - - //If relativepath is current directory, just pass the link through - if (relativePath.equals(".")) - { - if (link.startsWith("/")) - { - return link.substring(1); - } - else - { - return link; - } - } - - //If we don't do this, you can end up with ..//bob.html rather than ../bob.html - if (relativePath.endsWith("/") && link.startsWith("/")) - { - return relativePath + "." + link.substring(1); - } - - if (relativePath.endsWith("/") || link.startsWith("/")) - { - return relativePath + link; - } - - return relativePath + "/" + link; - } - -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/PropertyUtils.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/PropertyUtils.java deleted file mode 100644 index 9281639e0..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/PropertyUtils.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.codehaus.plexus.util; - -import java.util.Properties; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStream; -import java.io.IOException; -import java.net.URL; - -/** - * - * - * @author Jason van Zyl - * @author Michal Maczka - * - * @version $Id$ - */ -public class PropertyUtils -{ - - public static Properties loadProperties( URL url ) - { - try - { - return loadProperties( url.openStream() ); - } - catch ( Exception e ) - { - // ignore - } - - return null; - } - - public static Properties loadProperties( File file ) - { - try - { - return loadProperties( new FileInputStream( file ) ); - } - catch ( Exception e ) - { - // ignore - } - - return null; - } - - public static Properties loadProperties( InputStream is ) - { - try - { - Properties properties = new Properties(); - - // Make sure the properties stream is valid - if ( is != null ) - { - properties.load( is ); - } - - return properties; - } - catch ( IOException e ) - { - // ignore - } - finally - { - try - { - if ( is != null ) - { - is.close(); - } - } - catch ( IOException e ) - { - // ignore - } - } - - return null; - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/ReflectionUtils.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/ReflectionUtils.java deleted file mode 100644 index 1e70e78c2..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/ReflectionUtils.java +++ /dev/null @@ -1,228 +0,0 @@ -package org.codehaus.plexus.util; - -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.lang.reflect.AccessibleObject; -import java.util.Map; -import java.util.HashMap; -import java.util.List; -import java.util.ArrayList; -import java.util.Arrays; - -/** - * @author Michal Maczka - * @author Jesse McConnell - * @author Trygve Laugstøl - * @version $Id$ - */ -public final class ReflectionUtils -{ - // ---------------------------------------------------------------------- - // Field utils - // ---------------------------------------------------------------------- - - public static Field getFieldByNameIncludingSuperclasses( String fieldName, Class clazz ) - { - Field retValue = null; - - try - { - retValue = clazz.getDeclaredField( fieldName ); - } - catch ( NoSuchFieldException e ) - { - Class superclass = clazz.getSuperclass(); - - if ( superclass != null ) - { - retValue = getFieldByNameIncludingSuperclasses( fieldName, superclass ); - } - } - - return retValue; - } - - public static List getFieldsIncludingSuperclasses( Class clazz ) - { - List fields = new ArrayList( Arrays.asList( clazz.getDeclaredFields() ) ); - - Class superclass = clazz.getSuperclass(); - - if ( superclass != null ) - { - fields.addAll( getFieldsIncludingSuperclasses( superclass ) ); - } - - return fields; - } - - // ---------------------------------------------------------------------- - // Setter utils - // ---------------------------------------------------------------------- - - /** - * Finds a setter in the given class for the given field. It searches - * interfaces and superclasses too. - * - * @param fieldName the name of the field (i.e. 'fooBar'); it will search for a method named 'setFooBar'. - * @param clazz The class to find the method in. - * @return null or the method found. - */ - public static Method getSetter( String fieldName, Class clazz ) - { - Method [] methods = clazz.getMethods(); - - fieldName = "set" + StringUtils.capitalizeFirstLetter( fieldName ); - - for ( int i = 0; i < methods.length; i++ ) - { - Method method = methods[i]; - - if ( method.getName().equals( fieldName ) && isSetter( method ) ) - { - return method; - } - } - - return null; - } - - /** - * Finds all setters in the given class and super classes. - */ - public static List getSetters( Class clazz ) - { - Method[] methods = clazz.getMethods(); - - List list = new ArrayList(); - - for ( int i = 0; i < methods.length; i++ ) - { - Method method = methods[i]; - - if ( isSetter( method ) ) - { - list.add( method ); - } - } - - return list; - } - - /** - * Returns the class of the argument to the setter. - * - * Will throw an RuntimeException if the method isn't a setter. - */ - public static Class getSetterType( Method method ) - { - if ( !isSetter( method ) ) - { - throw new RuntimeException( "The method " + method.getDeclaringClass().getName() + "." + method.getName() + " is not a setter." ); - } - - return method.getParameterTypes()[0]; - } - - // ---------------------------------------------------------------------- - // Value accesstors - // ---------------------------------------------------------------------- - - /** - * attempts to set the value to the variable in the object passed in - * - * @param object - * @param variable - * @param value - * @throws IllegalAccessException - */ - public static void setVariableValueInObject( Object object, String variable, Object value ) - throws IllegalAccessException - { - Field field = getFieldByNameIncludingSuperclasses( variable, object.getClass() ); - - field.setAccessible( true ); - - field.set(object, value ); - } - - /** - * Generates a map of the fields and values on a given object, - * also pulls from superclasses - * - * @param object the object to generate the list of fields from - * @return map containing the fields and their values - */ - public static Object getValueIncludingSuperclasses( String variable, Object object ) - throws IllegalAccessException - { - - Field field = getFieldByNameIncludingSuperclasses( variable, object.getClass() ); - - field.setAccessible( true ); - - return field.get( object ); - } - - /** - * Generates a map of the fields and values on a given object, - * also pulls from superclasses - * - * @param object the object to generate the list of fields from - * @return map containing the fields and their values - */ - public static Map getVariablesAndValuesIncludingSuperclasses( Object object ) - throws IllegalAccessException - { - HashMap map = new HashMap (); - - gatherVariablesAndValuesIncludingSuperclasses(object, map); - - return map; - } - - // ---------------------------------------------------------------------- - // Private - // ---------------------------------------------------------------------- - - public static boolean isSetter( Method method ) - { - return method.getReturnType().equals( Void.TYPE ) && // FIXME: needed /required? - !Modifier.isStatic( method.getModifiers() ) && - method.getParameterTypes().length == 1; - } - - /** - * populates a map of the fields and values on a given object, - * also pulls from superclasses - * - * @param object the object to generate the list of fields from - * @param map to populate - */ - private static void gatherVariablesAndValuesIncludingSuperclasses( Object object, Map map ) - throws IllegalAccessException - { - - Class clazz = object.getClass(); - - Field[] fields = clazz.getDeclaredFields(); - - AccessibleObject.setAccessible( fields, true); - - for (int i = 0; i < fields.length; ++i) - { - Field field = fields[i]; - - map.put( field.getName(), field.get( object ) ); - - } - - Class superclass = clazz.getSuperclass(); - - if ( !Object.class.equals( superclass ) ) - { - gatherVariablesAndValuesIncludingSuperclasses( superclass, map ); - } - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/SelectorUtils.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/SelectorUtils.java deleted file mode 100644 index 22e15709a..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/SelectorUtils.java +++ /dev/null @@ -1,672 +0,0 @@ -/* - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2002-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.codehaus.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. - * - * 4. The names "Ant" and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact codehaus@codehaus.org. - * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ - -package org.codehaus.plexus.util; - -import java.io.File; -import java.util.StringTokenizer; -import java.util.Vector; - -/** - *

This is a utility class used by selectors and DirectoryScanner. The - * functionality more properly belongs just to selectors, but unfortunately - * DirectoryScanner exposed these as protected methods. Thus we have to - * support any subclasses of DirectoryScanner that may access these methods. - *

- *

This is a Singleton.

- * - * @author Arnout J. Kuiper - * ajkuiper@wxs.nl - * @author Magesh Umasankar - * @author Bruce Atherton - * @since 1.5 - */ -public final class SelectorUtils -{ - - private static SelectorUtils instance = new SelectorUtils(); - - /** - * Private Constructor - */ - private SelectorUtils() - { - } - - /** - * Retrieves the manager of the Singleton. - */ - public static SelectorUtils getInstance() - { - return instance; - } - - /** - * Tests whether or not a given path matches the start of a given - * pattern up to the first "**". - *

- * This is not a general purpose test and should only be used if you - * can live with false positives. For example, pattern=**\a - * and str=b will yield true. - * - * @param pattern The pattern to match against. Must not be - * null. - * @param str The path to match, as a String. Must not be - * null. - * - * @return whether or not a given path matches the start of a given - * pattern up to the first "**". - */ - public static boolean matchPatternStart( String pattern, String str ) - { - return matchPatternStart( pattern, str, true ); - } - - /** - * Tests whether or not a given path matches the start of a given - * pattern up to the first "**". - *

- * This is not a general purpose test and should only be used if you - * can live with false positives. For example, pattern=**\a - * and str=b will yield true. - * - * @param pattern The pattern to match against. Must not be - * null. - * @param str The path to match, as a String. Must not be - * null. - * @param isCaseSensitive Whether or not matching should be performed - * case sensitively. - * - * @return whether or not a given path matches the start of a given - * pattern up to the first "**". - */ - public static boolean matchPatternStart( String pattern, String str, - boolean isCaseSensitive ) - { - // When str starts with a File.separator, pattern has to start with a - // File.separator. - // When pattern starts with a File.separator, str has to start with a - // File.separator. - if ( str.startsWith( File.separator ) != - pattern.startsWith( File.separator ) ) - { - return false; - } - - Vector patDirs = tokenizePath( pattern ); - Vector strDirs = tokenizePath( str ); - - int patIdxStart = 0; - int patIdxEnd = patDirs.size() - 1; - int strIdxStart = 0; - int strIdxEnd = strDirs.size() - 1; - - // up to first '**' - while ( patIdxStart <= patIdxEnd && strIdxStart <= strIdxEnd ) - { - String patDir = (String) patDirs.elementAt( patIdxStart ); - if ( patDir.equals( "**" ) ) - { - break; - } - if ( !match( patDir, (String) strDirs.elementAt( strIdxStart ), - isCaseSensitive ) ) - { - return false; - } - patIdxStart++; - strIdxStart++; - } - - if ( strIdxStart > strIdxEnd ) - { - // String is exhausted - return true; - } - else if ( patIdxStart > patIdxEnd ) - { - // String not exhausted, but pattern is. Failure. - return false; - } - else - { - // pattern now holds ** while string is not exhausted - // this will generate false positives but we can live with that. - return true; - } - } - - /** - * Tests whether or not a given path matches a given pattern. - * - * @param pattern The pattern to match against. Must not be - * null. - * @param str The path to match, as a String. Must not be - * null. - * - * @return true if the pattern matches against the string, - * or false otherwise. - */ - public static boolean matchPath( String pattern, String str ) - { - return matchPath( pattern, str, true ); - } - - /** - * Tests whether or not a given path matches a given pattern. - * - * @param pattern The pattern to match against. Must not be - * null. - * @param str The path to match, as a String. Must not be - * null. - * @param isCaseSensitive Whether or not matching should be performed - * case sensitively. - * - * @return true if the pattern matches against the string, - * or false otherwise. - */ - public static boolean matchPath( String pattern, String str, - boolean isCaseSensitive ) - { - // When str starts with a File.separator, pattern has to start with a - // File.separator. - // When pattern starts with a File.separator, str has to start with a - // File.separator. - if ( str.startsWith( File.separator ) != - pattern.startsWith( File.separator ) ) - { - return false; - } - - Vector patDirs = tokenizePath( pattern ); - Vector strDirs = tokenizePath( str ); - - int patIdxStart = 0; - int patIdxEnd = patDirs.size() - 1; - int strIdxStart = 0; - int strIdxEnd = strDirs.size() - 1; - - // up to first '**' - while ( patIdxStart <= patIdxEnd && strIdxStart <= strIdxEnd ) - { - String patDir = (String) patDirs.elementAt( patIdxStart ); - if ( patDir.equals( "**" ) ) - { - break; - } - if ( !match( patDir, (String) strDirs.elementAt( strIdxStart ), - isCaseSensitive ) ) - { - patDirs = null; - strDirs = null; - return false; - } - patIdxStart++; - strIdxStart++; - } - if ( strIdxStart > strIdxEnd ) - { - // String is exhausted - for ( int i = patIdxStart; i <= patIdxEnd; i++ ) - { - if ( !patDirs.elementAt( i ).equals( "**" ) ) - { - patDirs = null; - strDirs = null; - return false; - } - } - return true; - } - else - { - if ( patIdxStart > patIdxEnd ) - { - // String not exhausted, but pattern is. Failure. - patDirs = null; - strDirs = null; - return false; - } - } - - // up to last '**' - while ( patIdxStart <= patIdxEnd && strIdxStart <= strIdxEnd ) - { - String patDir = (String) patDirs.elementAt( patIdxEnd ); - if ( patDir.equals( "**" ) ) - { - break; - } - if ( !match( patDir, (String) strDirs.elementAt( strIdxEnd ), - isCaseSensitive ) ) - { - patDirs = null; - strDirs = null; - return false; - } - patIdxEnd--; - strIdxEnd--; - } - if ( strIdxStart > strIdxEnd ) - { - // String is exhausted - for ( int i = patIdxStart; i <= patIdxEnd; i++ ) - { - if ( !patDirs.elementAt( i ).equals( "**" ) ) - { - patDirs = null; - strDirs = null; - return false; - } - } - return true; - } - - while ( patIdxStart != patIdxEnd && strIdxStart <= strIdxEnd ) - { - int patIdxTmp = -1; - for ( int i = patIdxStart + 1; i <= patIdxEnd; i++ ) - { - if ( patDirs.elementAt( i ).equals( "**" ) ) - { - patIdxTmp = i; - break; - } - } - if ( patIdxTmp == patIdxStart + 1 ) - { - // '**/**' situation, so skip one - patIdxStart++; - continue; - } - // Find the pattern between padIdxStart & padIdxTmp in str between - // strIdxStart & strIdxEnd - int patLength = ( patIdxTmp - patIdxStart - 1 ); - int strLength = ( strIdxEnd - strIdxStart + 1 ); - int foundIdx = -1; - strLoop: - for ( int i = 0; i <= strLength - patLength; i++ ) - { - for ( int j = 0; j < patLength; j++ ) - { - String subPat = (String) patDirs.elementAt( patIdxStart + j + 1 ); - String subStr = (String) strDirs.elementAt( strIdxStart + i + j ); - if ( !match( subPat, subStr, isCaseSensitive ) ) - { - continue strLoop; - } - } - - foundIdx = strIdxStart + i; - break; - } - - if ( foundIdx == -1 ) - { - patDirs = null; - strDirs = null; - return false; - } - - patIdxStart = patIdxTmp; - strIdxStart = foundIdx + patLength; - } - - for ( int i = patIdxStart; i <= patIdxEnd; i++ ) - { - if ( !patDirs.elementAt( i ).equals( "**" ) ) - { - patDirs = null; - strDirs = null; - return false; - } - } - - return true; - } - - /** - * Tests whether or not a string matches against a pattern. - * The pattern may contain two special characters:
- * '*' means zero or more characters
- * '?' means one and only one character - * - * @param pattern The pattern to match against. - * Must not be null. - * @param str The string which must be matched against the pattern. - * Must not be null. - * - * @return true if the string matches against the pattern, - * or false otherwise. - */ - public static boolean match( String pattern, String str ) - { - return match( pattern, str, true ); - } - - /** - * Tests whether or not a string matches against a pattern. - * The pattern may contain two special characters:
- * '*' means zero or more characters
- * '?' means one and only one character - * - * @param pattern The pattern to match against. - * Must not be null. - * @param str The string which must be matched against the pattern. - * Must not be null. - * @param isCaseSensitive Whether or not matching should be performed - * case sensitively. - * - * - * @return true if the string matches against the pattern, - * or false otherwise. - */ - public static boolean match( String pattern, String str, - boolean isCaseSensitive ) - { - char[] patArr = pattern.toCharArray(); - char[] strArr = str.toCharArray(); - int patIdxStart = 0; - int patIdxEnd = patArr.length - 1; - int strIdxStart = 0; - int strIdxEnd = strArr.length - 1; - char ch; - - boolean containsStar = false; - for ( int i = 0; i < patArr.length; i++ ) - { - if ( patArr[i] == '*' ) - { - containsStar = true; - break; - } - } - - if ( !containsStar ) - { - // No '*'s, so we make a shortcut - if ( patIdxEnd != strIdxEnd ) - { - return false; // Pattern and string do not have the same size - } - for ( int i = 0; i <= patIdxEnd; i++ ) - { - ch = patArr[i]; - if ( ch != '?' ) - { - if ( isCaseSensitive && ch != strArr[i] ) - { - return false;// Character mismatch - } - if ( !isCaseSensitive && Character.toUpperCase( ch ) != - Character.toUpperCase( strArr[i] ) ) - { - return false; // Character mismatch - } - } - } - return true; // String matches against pattern - } - - if ( patIdxEnd == 0 ) - { - return true; // Pattern contains only '*', which matches anything - } - - // Process characters before first star - while ( ( ch = patArr[patIdxStart] ) != '*' && strIdxStart <= strIdxEnd ) - { - if ( ch != '?' ) - { - if ( isCaseSensitive && ch != strArr[strIdxStart] ) - { - return false;// Character mismatch - } - if ( !isCaseSensitive && Character.toUpperCase( ch ) != - Character.toUpperCase( strArr[strIdxStart] ) ) - { - return false;// Character mismatch - } - } - patIdxStart++; - strIdxStart++; - } - if ( strIdxStart > strIdxEnd ) - { - // All characters in the string are used. Check if only '*'s are - // left in the pattern. If so, we succeeded. Otherwise failure. - for ( int i = patIdxStart; i <= patIdxEnd; i++ ) - { - if ( patArr[i] != '*' ) - { - return false; - } - } - return true; - } - - // Process characters after last star - while ( ( ch = patArr[patIdxEnd] ) != '*' && strIdxStart <= strIdxEnd ) - { - if ( ch != '?' ) - { - if ( isCaseSensitive && ch != strArr[strIdxEnd] ) - { - return false;// Character mismatch - } - if ( !isCaseSensitive && Character.toUpperCase( ch ) != - Character.toUpperCase( strArr[strIdxEnd] ) ) - { - return false;// Character mismatch - } - } - patIdxEnd--; - strIdxEnd--; - } - if ( strIdxStart > strIdxEnd ) - { - // All characters in the string are used. Check if only '*'s are - // left in the pattern. If so, we succeeded. Otherwise failure. - for ( int i = patIdxStart; i <= patIdxEnd; i++ ) - { - if ( patArr[i] != '*' ) - { - return false; - } - } - return true; - } - - // process pattern between stars. padIdxStart and patIdxEnd point - // always to a '*'. - while ( patIdxStart != patIdxEnd && strIdxStart <= strIdxEnd ) - { - int patIdxTmp = -1; - for ( int i = patIdxStart + 1; i <= patIdxEnd; i++ ) - { - if ( patArr[i] == '*' ) - { - patIdxTmp = i; - break; - } - } - if ( patIdxTmp == patIdxStart + 1 ) - { - // Two stars next to each other, skip the first one. - patIdxStart++; - continue; - } - // Find the pattern between padIdxStart & padIdxTmp in str between - // strIdxStart & strIdxEnd - int patLength = ( patIdxTmp - patIdxStart - 1 ); - int strLength = ( strIdxEnd - strIdxStart + 1 ); - int foundIdx = -1; - strLoop: - for ( int i = 0; i <= strLength - patLength; i++ ) - { - for ( int j = 0; j < patLength; j++ ) - { - ch = patArr[patIdxStart + j + 1]; - if ( ch != '?' ) - { - if ( isCaseSensitive && ch != strArr[strIdxStart + i + j] ) - { - continue strLoop; - } - if ( !isCaseSensitive && Character.toUpperCase( ch ) != - Character.toUpperCase( strArr[strIdxStart + i + j] ) ) - { - continue strLoop; - } - } - } - - foundIdx = strIdxStart + i; - break; - } - - if ( foundIdx == -1 ) - { - return false; - } - - patIdxStart = patIdxTmp; - strIdxStart = foundIdx + patLength; - } - - // All characters in the string are used. Check if only '*'s are left - // in the pattern. If so, we succeeded. Otherwise failure. - for ( int i = patIdxStart; i <= patIdxEnd; i++ ) - { - if ( patArr[i] != '*' ) - { - return false; - } - } - return true; - } - - /** - * Breaks a path up into a Vector of path elements, tokenizing on - * File.separator. - * - * @param path Path to tokenize. Must not be null. - * - * @return a Vector of path elements from the tokenized path - */ - public static Vector tokenizePath( String path ) - { - Vector ret = new Vector(); - StringTokenizer st = new StringTokenizer( path, File.separator ); - while ( st.hasMoreTokens() ) - { - ret.addElement( st.nextToken() ); - } - return ret; - } - - - /** - * Returns dependency information on these two files. If src has been - * modified later than target, it returns true. If target doesn't exist, - * it likewise returns true. Otherwise, target is newer than src and - * is not out of date, thus the method returns false. It also returns - * false if the src file doesn't even exist, since how could the - * target then be out of date. - * - * @param src the original file - * @param target the file being compared against - * @param granularity the amount in seconds of slack we will give in - * determining out of dateness - * @return whether the target is out of date - */ - public static boolean isOutOfDate( File src, File target, int granularity ) - { - if ( !src.exists() ) - { - return false; - } - if ( !target.exists() ) - { - return true; - } - if ( ( src.lastModified() - granularity ) > target.lastModified() ) - { - return true; - } - return false; - } - - /** - * "Flattens" a string by removing all whitespace (space, tab, linefeed, - * carriage return, and formfeed). This uses StringTokenizer and the - * default set of tokens as documented in the single arguement constructor. - * - * @param input a String to remove all whitespace. - * @return a String that has had all whitespace removed. - */ - public static String removeWhitespace( String input ) - { - StringBuffer result = new StringBuffer(); - if ( input != null ) - { - StringTokenizer st = new StringTokenizer( input ); - while ( st.hasMoreTokens() ) - { - result.append( st.nextToken() ); - } - } - return result.toString(); - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/StringInputStream.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/StringInputStream.java deleted file mode 100644 index c4e6bdc9a..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/StringInputStream.java +++ /dev/null @@ -1,146 +0,0 @@ -package org.codehaus.plexus.util; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.codehaus.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache MavenSession" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact codehaus@codehaus.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache MavenSession", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * ==================================================================== - */ - -import java.io.IOException; -import java.io.InputStream; -import java.io.StringReader; - -/** - * Wraps a String as an InputStream. Note that data will be lost for - * characters not in ISO Latin 1, as a simple char->byte mapping is assumed. - * - * @author Magesh Umasankar - */ -public class StringInputStream - extends InputStream -{ - /** Source string, stored as a StringReader */ - private StringReader in; - - /** - * Composes a stream from a String - * - * @param source The string to read from. Must not be null. - */ - public StringInputStream( String source ) - { - in = new StringReader( source ); - } - - /** - * Reads from the Stringreader, returning the same value. Note that - * data will be lost for characters not in ISO Latin 1. Clients - * assuming a return value in the range -1 to 255 may even fail on - * such input. - * - * @return the value of the next character in the StringReader - * - * @exception IOException if the original StringReader fails to be read - */ - public int read() throws IOException - { - return in.read(); - } - - /** - * Closes the Stringreader. - * - * @exception IOException if the original StringReader fails to be closed - */ - public void close() throws IOException - { - in.close(); - } - - /** - * Marks the read limit of the StringReader. - * - * @param limit the maximum limit of bytes that can be read before the - * mark position becomes invalid - */ - public synchronized void mark( final int limit ) - { - try - { - in.mark( limit ); - } - catch ( IOException ioe ) - { - throw new RuntimeException( ioe.getMessage() ); - } - } - - /** - * Resets the StringReader. - * - * @exception IOException if the StringReader fails to be reset - */ - public synchronized void reset() throws IOException - { - in.reset(); - } - - /** - * @see InputStream#markSupported - */ - public boolean markSupported() - { - return in.markSupported(); - } -} - diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/StringOutputStream.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/StringOutputStream.java deleted file mode 100644 index 06193f803..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/StringOutputStream.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.codehaus.plexus.util; - -import java.io.IOException; -import java.io.OutputStream; - -/** - * Wraps a String as an OutputStream. - * - * @author Emmanuel Venisse - */ -public class StringOutputStream - extends OutputStream -{ - private StringBuffer buf = new StringBuffer(); - - public void write( byte[] b ) throws IOException - { - buf.append( new String( b ) ); - } - - public void write( byte[] b, int off, int len ) throws IOException - { - buf.append( new String( b, off, len ) ); - } - - public void write( int b ) throws IOException - { - byte[] bytes = new byte[1]; - bytes[0] = (byte)b; - buf.append( new String( bytes ) ); - } - - public String toString() - { - return buf.toString(); - } -} \ No newline at end of file diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/StringUtils.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/StringUtils.java deleted file mode 100644 index 579af4f07..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/StringUtils.java +++ /dev/null @@ -1,2136 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.codehaus.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. - * - * 4. The names "The Jakarta Project", "Commons", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact codehaus@codehaus.org. - * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ -package org.codehaus.plexus.util; - -import java.util.Iterator; -import java.util.Map; -import java.util.StringTokenizer; - -/** - *

Common String manipulation routines.

- * - *

Originally from - * Turbine and the - * GenerationJavaCore library.

- * - * @author Jon S. Stevens - * @author Daniel Rall - * @author Greg Coladonato - * @author Henri Yandell - * @author Ed Korthof - * @author Rand McNeely - * @author Stephen Colebourne - * @author Fredrik Westermarck - * @author Holger Krauth - * @author Alexander Day Chaffee - * @since 1.0 - * @version $Id$ - */ -public class StringUtils -{ - - /** - *

StringUtils instances should NOT be constructed in - * standard programming. Instead, the class should be used as - * StringUtils.trim(" foo ");.

- * - *

This constructor is public to permit tools that require a JavaBean - * manager to operate.

- */ - public StringUtils() - { - } - - // Empty - //-------------------------------------------------------------------------- - - /** - *

Removes control characters, including whitespace, from both - * ends of this String, handling null by returning - * an empty String.

- * - * @see java.lang.String#trim() - * @param str the String to check - * @return the trimmed text (never null) - */ - public static String clean( String str ) - { - return ( str == null ? "" : str.trim() ); - } - - /** - *

Removes control characters, including whitespace, from both - * ends of this String, handling null by returning - * null.

- * - * @see java.lang.String#trim() - * @param str the String to check - * @return the trimmed text (or null) - */ - public static String trim( String str ) - { - return ( str == null ? null : str.trim() ); - } - - /** - *

Deletes all whitespaces from a String.

- * - *

Whitespace is defined by - * {@link Character#isWhitespace(char)}.

- * - * @param str String target to delete whitespace from - * @return the String without whitespaces - * @throws NullPointerException - */ - public static String deleteWhitespace( String str ) - { - StringBuffer buffer = new StringBuffer(); - int sz = str.length(); - for ( int i = 0; i < sz; i++ ) - { - if ( !Character.isWhitespace( str.charAt( i ) ) ) - { - buffer.append( str.charAt( i ) ); - } - } - return buffer.toString(); - } - - /** - *

Checks if a String is non null and is - * not empty (length > 0).

- * - * @param str the String to check - * @return true if the String is non-null, and not length zero - */ - public static boolean isNotEmpty( String str ) - { - return ( str != null && str.length() > 0 ); - } - - /** - *

Checks if a (trimmed) String is null or empty.

- * - * @param str the String to check - * @return true if the String is null, or - * length zero once trimmed - */ - public static boolean isEmpty( String str ) - { - return ( str == null || str.trim().length() == 0 ); - } - - // Equals and IndexOf - //-------------------------------------------------------------------------- - - /** - *

Compares two Strings, returning true if they are equal.

- * - *

nulls are handled without exceptions. Two null - * references are considered to be equal. The comparison is case sensitive.

- * - * @see java.lang.String#equals(Object) - * @param str1 the first string - * @param str2 the second string - * @return true if the Strings are equal, case sensitive, or - * both null - */ - public static boolean equals( String str1, String str2 ) - { - return ( str1 == null ? str2 == null : str1.equals( str2 ) ); - } - - /** - *

Compares two Strings, returning true if they are equal ignoring - * the case.

- * - *

Nulls are handled without exceptions. Two null - * references are considered equal. Comparison is case insensitive.

- * - * @see java.lang.String#equalsIgnoreCase(String) - * @param str1 the first string - * @param str2 the second string - * @return true if the Strings are equal, case insensitive, or - * both null - */ - public static boolean equalsIgnoreCase( String str1, String str2 ) - { - return ( str1 == null ? str2 == null : str1.equalsIgnoreCase( str2 ) ); - } - - /** - *

Find the first index of any of a set of potential substrings.

- * - *

null String will return -1.

- * - * @param str the String to check - * @param searchStrs the Strings to search for - * @return the first index of any of the searchStrs in str - * @throws NullPointerException if any of searchStrs[i] is null - */ - public static int indexOfAny( String str, String[] searchStrs ) - { - if ( ( str == null ) || ( searchStrs == null ) ) - { - return -1; - } - int sz = searchStrs.length; - - // String's can't have a MAX_VALUEth index. - int ret = Integer.MAX_VALUE; - - int tmp = 0; - for ( int i = 0; i < sz; i++ ) - { - tmp = str.indexOf( searchStrs[i] ); - if ( tmp == -1 ) - { - continue; - } - - if ( tmp < ret ) - { - ret = tmp; - } - } - - return ( ret == Integer.MAX_VALUE ) ? -1 : ret; - } - - /** - *

Find the latest index of any of a set of potential substrings.

- * - *

null string will return -1.

- * - * @param str the String to check - * @param searchStrs the Strings to search for - * @return the last index of any of the Strings - * @throws NullPointerException if any of searchStrs[i] is null - */ - public static int lastIndexOfAny( String str, String[] searchStrs ) - { - if ( ( str == null ) || ( searchStrs == null ) ) - { - return -1; - } - int sz = searchStrs.length; - int ret = -1; - int tmp = 0; - for ( int i = 0; i < sz; i++ ) - { - tmp = str.lastIndexOf( searchStrs[i] ); - if ( tmp > ret ) - { - ret = tmp; - } - } - return ret; - } - - // Substring - //-------------------------------------------------------------------------- - - /** - *

Gets a substring from the specified string avoiding exceptions.

- * - *

A negative start position can be used to start n - * characters from the end of the String.

- * - * @param str the String to get the substring from - * @param start the position to start from, negative means - * count back from the end of the String by this many characters - * @return substring from start position - */ - public static String substring( String str, int start ) - { - if ( str == null ) - { - return null; - } - - // handle negatives, which means last n characters - if ( start < 0 ) - { - start = str.length() + start; // remember start is negative - } - - if ( start < 0 ) - { - start = 0; - } - if ( start > str.length() ) - { - return ""; - } - - return str.substring( start ); - } - - /** - *

Gets a substring from the specified String avoiding exceptions.

- * - *

A negative start position can be used to start/end n - * characters from the end of the String.

- * - * @param str the String to get the substring from - * @param start the position to start from, negative means - * count back from the end of the string by this many characters - * @param end the position to end at (exclusive), negative means - * count back from the end of the String by this many characters - * @return substring from start position to end positon - */ - public static String substring( String str, int start, int end ) - { - if ( str == null ) - { - return null; - } - - // handle negatives - if ( end < 0 ) - { - end = str.length() + end; // remember end is negative - } - if ( start < 0 ) - { - start = str.length() + start; // remember start is negative - } - - // check length next - if ( end > str.length() ) - { - // check this works. - end = str.length(); - } - - // if start is greater than end, return "" - if ( start > end ) - { - return ""; - } - - if ( start < 0 ) - { - start = 0; - } - if ( end < 0 ) - { - end = 0; - } - - return str.substring( start, end ); - } - - /** - *

Gets the leftmost n characters of a String.

- * - *

If n characters are not available, or the - * String is null, the String will be returned without - * an exception.

- * - * @param str the String to get the leftmost characters from - * @param len the length of the required String - * @return the leftmost characters - * @throws IllegalArgumentException if len is less than zero - */ - public static String left( String str, int len ) - { - if ( len < 0 ) - { - throw new IllegalArgumentException( "Requested String length " + len + " is less than zero" ); - } - if ( ( str == null ) || ( str.length() <= len ) ) - { - return str; - } - else - { - return str.substring( 0, len ); - } - } - - /** - *

Gets the rightmost n characters of a String.

- * - *

If n characters are not available, or the String - * is null, the String will be returned without an - * exception.

- * - * @param str the String to get the rightmost characters from - * @param len the length of the required String - * @return the leftmost characters - * @throws IllegalArgumentException if len is less than zero - */ - public static String right( String str, int len ) - { - if ( len < 0 ) - { - throw new IllegalArgumentException( "Requested String length " + len + " is less than zero" ); - } - if ( ( str == null ) || ( str.length() <= len ) ) - { - return str; - } - else - { - return str.substring( str.length() - len ); - } - } - - /** - *

Gets n characters from the middle of a String.

- * - *

If n characters are not available, the remainder - * of the String will be returned without an exception. If the - * String is null, null will be returned.

- * - * @param str the String to get the characters from - * @param pos the position to start from - * @param len the length of the required String - * @return the leftmost characters - * @throws IndexOutOfBoundsException if pos is out of bounds - * @throws IllegalArgumentException if len is less than zero - */ - public static String mid( String str, int pos, int len ) - { - if ( ( pos < 0 ) || - ( str != null && pos > str.length() ) ) - { - throw new StringIndexOutOfBoundsException( "String index " + pos + " is out of bounds" ); - } - if ( len < 0 ) - { - throw new IllegalArgumentException( "Requested String length " + len + " is less than zero" ); - } - if ( str == null ) - { - return null; - } - if ( str.length() <= ( pos + len ) ) - { - return str.substring( pos ); - } - else - { - return str.substring( pos, pos + len ); - } - } - - // Splitting - //-------------------------------------------------------------------------- - - /** - *

Splits the provided text into a array, using whitespace as the - * separator.

- * - *

The separator is not included in the returned String array.

- * - * @param str the String to parse - * @return an array of parsed Strings - */ - public static String[] split( String str ) - { - return split( str, null, -1 ); - } - - /** - * @see #split(String, String, int) - */ - public static String[] split( String text, String separator ) - { - return split( text, separator, -1 ); - } - - /** - *

Splits the provided text into a array, based on a given separator.

- * - *

The separator is not included in the returned String array. The - * maximum number of splits to perfom can be controlled. A null - * separator will cause parsing to be on whitespace.

- * - *

This is useful for quickly splitting a String directly into - * an array of tokens, instead of an enumeration of tokens (as - * StringTokenizer does).

- * - * @param str The string to parse. - * @param separator Characters used as the delimiters. If - * null, splits on whitespace. - * @param max The maximum number of elements to include in the - * array. A zero or negative value implies no limit. - * @return an array of parsed Strings - */ - public static String[] split( String str, String separator, int max ) - { - StringTokenizer tok = null; - if ( separator == null ) - { - // Null separator means we're using StringTokenizer's default - // delimiter, which comprises all whitespace characters. - tok = new StringTokenizer( str ); - } - else - { - tok = new StringTokenizer( str, separator ); - } - - int listSize = tok.countTokens(); - if ( max > 0 && listSize > max ) - { - listSize = max; - } - - String[] list = new String[listSize]; - int i = 0; - int lastTokenBegin = 0; - int lastTokenEnd = 0; - while ( tok.hasMoreTokens() ) - { - if ( max > 0 && i == listSize - 1 ) - { - // In the situation where we hit the max yet have - // tokens left over in our input, the last list - // element gets all remaining text. - String endToken = tok.nextToken(); - lastTokenBegin = str.indexOf( endToken, lastTokenEnd ); - list[i] = str.substring( lastTokenBegin ); - break; - } - else - { - list[i] = tok.nextToken(); - lastTokenBegin = str.indexOf( list[i], lastTokenEnd ); - lastTokenEnd = lastTokenBegin + list[i].length(); - } - i++; - } - return list; - } - - // Joining - //-------------------------------------------------------------------------- - /** - *

Concatenates elements of an array into a single String.

- * - *

The difference from join is that concatenate has no delimiter.

- * - * @param array the array of values to concatenate. - * @return the concatenated string. - */ - public static String concatenate( Object[] array ) - { - return join( array, "" ); - } - - /** - *

Joins the elements of the provided array into a single String - * containing the provided list of elements.

- * - *

No delimiter is added before or after the list. A - * null separator is the same as a blank String.

- * - * @param array the array of values to join together - * @param separator the separator character to use - * @return the joined String - */ - public static String join( Object[] array, String separator ) - { - if ( separator == null ) - { - separator = ""; - } - int arraySize = array.length; - int bufSize = ( arraySize == 0 ? 0 : ( array[0].toString().length() + - separator.length() ) * arraySize ); - StringBuffer buf = new StringBuffer( bufSize ); - - for ( int i = 0; i < arraySize; i++ ) - { - if ( i > 0 ) - { - buf.append( separator ); - } - buf.append( array[i] ); - } - return buf.toString(); - } - - /** - *

Joins the elements of the provided Iterator into - * a single String containing the provided elements.

- * - *

No delimiter is added before or after the list. A - * null separator is the same as a blank String.

- * - * @param iterator the Iterator of values to join together - * @param separator the separator character to use - * @return the joined String - */ - public static String join( Iterator iterator, String separator ) - { - if ( separator == null ) - { - separator = ""; - } - StringBuffer buf = new StringBuffer( 256 ); // Java default is 16, probably too small - while ( iterator.hasNext() ) - { - buf.append( iterator.next() ); - if ( iterator.hasNext() ) - { - buf.append( separator ); - } - } - return buf.toString(); - } - - - - // Replacing - //-------------------------------------------------------------------------- - - /** - *

Replace a char with another char inside a larger String, once.

- * - *

A null reference passed to this method is a no-op.

- * - * @see #replace(String text, char repl, char with, int max) - * @param text text to search and replace in - * @param repl char to search for - * @param with char to replace with - * @return the text with any replacements processed - */ - public static String replaceOnce( String text, char repl, char with ) - { - return replace( text, repl, with, 1 ); - } - - /** - *

Replace all occurances of a char within another char.

- * - *

A null reference passed to this method is a no-op.

- * - * @see #replace(String text, char repl, char with, int max) - * @param text text to search and replace in - * @param repl char to search for - * @param with char to replace with - * @return the text with any replacements processed - */ - public static String replace( String text, char repl, char with ) - { - return replace( text, repl, with, -1 ); - } - - /** - *

Replace a char with another char inside a larger String, - * for the first max values of the search char.

- * - *

A null reference passed to this method is a no-op.

- * - * @param text text to search and replace in - * @param repl char to search for - * @param with char to replace with - * @param max maximum number of values to replace, or -1 if no maximum - * @return the text with any replacements processed - */ - public static String replace( String text, char repl, char with, int max ) - { - return replace( text, String.valueOf( repl ), String.valueOf( with ), max ); - } - - /** - *

Replace a String with another String inside a larger String, once.

- * - *

A null reference passed to this method is a no-op.

- * - * @see #replace(String text, String repl, String with, int max) - * @param text text to search and replace in - * @param repl String to search for - * @param with String to replace with - * @return the text with any replacements processed - */ - public static String replaceOnce( String text, String repl, String with ) - { - return replace( text, repl, with, 1 ); - } - - /** - *

Replace all occurances of a String within another String.

- * - *

A null reference passed to this method is a no-op.

- * - * @see #replace(String text, String repl, String with, int max) - * @param text text to search and replace in - * @param repl String to search for - * @param with String to replace with - * @return the text with any replacements processed - */ - public static String replace( String text, String repl, String with ) - { - return replace( text, repl, with, -1 ); - } - - /** - *

Replace a String with another String inside a larger String, - * for the first max values of the search String.

- * - *

A null reference passed to this method is a no-op.

- * - * @param text text to search and replace in - * @param repl String to search for - * @param with String to replace with - * @param max maximum number of values to replace, or -1 if no maximum - * @return the text with any replacements processed - */ - public static String replace( String text, String repl, String with, int max ) - { - if ( text == null || repl == null || with == null || repl.length() == 0 ) - { - return text; - } - - StringBuffer buf = new StringBuffer( text.length() ); - int start = 0, end = 0; - while ( ( end = text.indexOf( repl, start ) ) != -1 ) - { - buf.append( text.substring( start, end ) ).append( with ); - start = end + repl.length(); - - if ( --max == 0 ) - { - break; - } - } - buf.append( text.substring( start ) ); - return buf.toString(); - } - - /** - *

Overlay a part of a String with another String.

- * - * @param text String to do overlaying in - * @param overlay String to overlay - * @param start int to start overlaying at - * @param end int to stop overlaying before - * @return String with overlayed text - * @throws NullPointerException if text or overlay is null - */ - public static String overlayString( String text, String overlay, int start, int end ) - { - return new StringBuffer( start + overlay.length() + text.length() - end + 1 ) - .append( text.substring( 0, start ) ) - .append( overlay ) - .append( text.substring( end ) ) - .toString(); - } - - // Centering - //-------------------------------------------------------------------------- - - /** - *

Center a String in a larger String of size n.

- * - *

Uses spaces as the value to buffer the String with. - * Equivalent to center(str, size, " ").

- * - * @param str String to center - * @param size int size of new String - * @return String containing centered String - * @throws NullPointerException if str is null - */ - public static String center( String str, int size ) - { - return center( str, size, " " ); - } - - /** - *

Center a String in a larger String of size n.

- * - *

Uses a supplied String as the value to buffer the String with.

- * - * @param str String to center - * @param size int size of new String - * @param delim String to buffer the new String with - * @return String containing centered String - * @throws NullPointerException if str or delim is null - * @throws ArithmeticException if delim is the empty String - */ - public static String center( String str, int size, String delim ) - { - int sz = str.length(); - int p = size - sz; - if ( p < 1 ) - { - return str; - } - str = leftPad( str, sz + p / 2, delim ); - str = rightPad( str, size, delim ); - return str; - } - - // Chomping - //-------------------------------------------------------------------------- - - /** - *

Remove the last newline, and everything after it from a String.

- * - * @param str String to chomp the newline from - * @return String without chomped newline - * @throws NullPointerException if str is null - */ - public static String chomp( String str ) - { - return chomp( str, "\n" ); - } - - /** - *

Remove the last value of a supplied String, and everything after - * it from a String.

- * - * @param str String to chomp from - * @param sep String to chomp - * @return String without chomped ending - * @throws NullPointerException if str or sep is null - */ - public static String chomp( String str, String sep ) - { - int idx = str.lastIndexOf( sep ); - if ( idx != -1 ) - { - return str.substring( 0, idx ); - } - else - { - return str; - } - } - - /** - *

Remove a newline if and only if it is at the end - * of the supplied String.

- * - * @param str String to chomp from - * @return String without chomped ending - * @throws NullPointerException if str is null - */ - public static String chompLast( String str ) - { - return chompLast( str, "\n" ); - } - - /** - *

Remove a value if and only if the String ends with that value.

- * - * @param str String to chomp from - * @param sep String to chomp - * @return String without chomped ending - * @throws NullPointerException if str or sep is null - */ - public static String chompLast( String str, String sep ) - { - if ( str.length() == 0 ) - { - return str; - } - String sub = str.substring( str.length() - sep.length() ); - if ( sep.equals( sub ) ) - { - return str.substring( 0, str.length() - sep.length() ); - } - else - { - return str; - } - } - - /** - *

Remove everything and return the last value of a supplied String, and - * everything after it from a String.

- * - * @param str String to chomp from - * @param sep String to chomp - * @return String chomped - * @throws NullPointerException if str or sep is null - */ - public static String getChomp( String str, String sep ) - { - int idx = str.lastIndexOf( sep ); - if ( idx == str.length() - sep.length() ) - { - return sep; - } - else if ( idx != -1 ) - { - return str.substring( idx ); - } - else - { - return ""; - } - } - - /** - *

Remove the first value of a supplied String, and everything before it - * from a String.

- * - * @param str String to chomp from - * @param sep String to chomp - * @return String without chomped beginning - * @throws NullPointerException if str or sep is null - */ - public static String prechomp( String str, String sep ) - { - int idx = str.indexOf( sep ); - if ( idx != -1 ) - { - return str.substring( idx + sep.length() ); - } - else - { - return str; - } - } - - /** - *

Remove and return everything before the first value of a - * supplied String from another String.

- * - * @param str String to chomp from - * @param sep String to chomp - * @return String prechomped - * @throws NullPointerException if str or sep is null - */ - public static String getPrechomp( String str, String sep ) - { - int idx = str.indexOf( sep ); - if ( idx != -1 ) - { - return str.substring( 0, idx + sep.length() ); - } - else - { - return ""; - } - } - - // Chopping - //-------------------------------------------------------------------------- - - /** - *

Remove the last character from a String.

- * - *

If the String ends in \r\n, then remove both - * of them.

- * - * @param str String to chop last character from - * @return String without last character - * @throws NullPointerException if str is null - */ - public static String chop( String str ) - { - if ( "".equals( str ) ) - { - return ""; - } - if ( str.length() == 1 ) - { - return ""; - } - int lastIdx = str.length() - 1; - String ret = str.substring( 0, lastIdx ); - char last = str.charAt( lastIdx ); - if ( last == '\n' ) - { - if ( ret.charAt( lastIdx - 1 ) == '\r' ) - { - return ret.substring( 0, lastIdx - 1 ); - } - } - return ret; - } - - /** - *

Remove \n from end of a String if it's there. - * If a \r precedes it, then remove that too.

- * - * @param str String to chop a newline from - * @return String without newline - * @throws NullPointerException if str is null - */ - public static String chopNewline( String str ) - { - int lastIdx = str.length() - 1; - char last = str.charAt( lastIdx ); - if ( last == '\n' ) - { - if ( str.charAt( lastIdx - 1 ) == '\r' ) - { - lastIdx--; - } - } - else - { - lastIdx++; - } - return str.substring( 0, lastIdx ); - } - - - // Conversion - //-------------------------------------------------------------------------- - - // spec 3.10.6 - /** - *

Escapes any values it finds into their String form.

- * - *

So a tab becomes the characters '\\' and - * 't'.

- * - * @param str String to escape values in - * @return String with escaped values - * @throws NullPointerException if str is null - */ - public static String escape( String str ) - { - // improved with code from cybertiger@cyberiantiger.org - // unicode from him, and defaul for < 32's. - int sz = str.length(); - StringBuffer buffer = new StringBuffer( 2 * sz ); - for ( int i = 0; i < sz; i++ ) - { - char ch = str.charAt( i ); - - // handle unicode - if ( ch > 0xfff ) - { - buffer.append( "\\u" + Integer.toHexString( ch ) ); - } - else if ( ch > 0xff ) - { - buffer.append( "\\u0" + Integer.toHexString( ch ) ); - } - else if ( ch > 0x7f ) - { - buffer.append( "\\u00" + Integer.toHexString( ch ) ); - } - else if ( ch < 32 ) - { - switch ( ch ) - { - case '\b': - buffer.append( '\\' ); - buffer.append( 'b' ); - break; - case '\n': - buffer.append( '\\' ); - buffer.append( 'n' ); - break; - case '\t': - buffer.append( '\\' ); - buffer.append( 't' ); - break; - case '\f': - buffer.append( '\\' ); - buffer.append( 'f' ); - break; - case '\r': - buffer.append( '\\' ); - buffer.append( 'r' ); - break; - default : - if ( ch > 0xf ) - { - buffer.append( "\\u00" + Integer.toHexString( ch ) ); - } - else - { - buffer.append( "\\u000" + Integer.toHexString( ch ) ); - } - break; - } - } - else - { - switch ( ch ) - { - case '\'': - buffer.append( '\\' ); - buffer.append( '\'' ); - break; - case '"': - buffer.append( '\\' ); - buffer.append( '"' ); - break; - case '\\': - buffer.append( '\\' ); - buffer.append( '\\' ); - break; - default : - buffer.append( ch ); - break; - } - } - } - return buffer.toString(); - } - - // Padding - //-------------------------------------------------------------------------- - - /** - *

Repeat a String n times to form a - * new string.

- * - * @param str String to repeat - * @param repeat number of times to repeat str - * @return String with repeated String - * @throws NegativeArraySizeException if repeat < 0 - * @throws NullPointerException if str is null - */ - public static String repeat( String str, int repeat ) - { - StringBuffer buffer = new StringBuffer( repeat * str.length() ); - for ( int i = 0; i < repeat; i++ ) - { - buffer.append( str ); - } - return buffer.toString(); - } - - /** - *

Right pad a String with spaces.

- * - *

The String is padded to the size of n.

- * - * @param str String to repeat - * @param size number of times to repeat str - * @return right padded String - * @throws NullPointerException if str is null - */ - public static String rightPad( String str, int size ) - { - return rightPad( str, size, " " ); - } - - /** - *

Right pad a String with a specified string.

- * - *

The String is padded to the size of n.

- * - * @param str String to pad out - * @param size size to pad to - * @param delim String to pad with - * @return right padded String - * @throws NullPointerException if str or delim is null - * @throws ArithmeticException if delim is the empty String - */ - public static String rightPad( String str, int size, String delim ) - { - size = ( size - str.length() ) / delim.length(); - if ( size > 0 ) - { - str += repeat( delim, size ); - } - return str; - } - - /** - *

Left pad a String with spaces.

- * - *

The String is padded to the size of n.

- * - * @param str String to pad out - * @param size size to pad to - * @return left padded String - * @throws NullPointerException if str or delim is null - */ - public static String leftPad( String str, int size ) - { - return leftPad( str, size, " " ); - } - - /** - * Left pad a String with a specified string. Pad to a size of n. - * - * @param str String to pad out - * @param size size to pad to - * @param delim String to pad with - * @return left padded String - * @throws NullPointerException if str or delim is null - * @throws ArithmeticException if delim is the empty string - */ - public static String leftPad( String str, int size, String delim ) - { - size = ( size - str.length() ) / delim.length(); - if ( size > 0 ) - { - str = repeat( delim, size ) + str; - } - return str; - } - - // Stripping - //-------------------------------------------------------------------------- - - /** - *

Remove whitespace from the front and back of a String.

- * - * @param str the String to remove whitespace from - * @return the stripped String - */ - public static String strip( String str ) - { - return strip( str, null ); - } - - /** - *

Remove a specified String from the front and back of a - * String.

- * - *

If whitespace is wanted to be removed, used the - * {@link #strip(java.lang.String)} method.

- * - * @param str the String to remove a string from - * @param delim the String to remove at start and end - * @return the stripped String - */ - public static String strip( String str, String delim ) - { - str = stripStart( str, delim ); - return stripEnd( str, delim ); - } - - /** - *

Strip whitespace from the front and back of every String - * in the array.

- * - * @param strs the Strings to remove whitespace from - * @return the stripped Strings - */ - public static String[] stripAll( String[] strs ) - { - return stripAll( strs, null ); - } - - /** - *

Strip the specified delimiter from the front and back of - * every String in the array.

- * - * @param strs the Strings to remove a String from - * @param delimiter the String to remove at start and end - * @return the stripped Strings - */ - public static String[] stripAll( String[] strs, String delimiter ) - { - if ( ( strs == null ) || ( strs.length == 0 ) ) - { - return strs; - } - int sz = strs.length; - String[] newArr = new String[sz]; - for ( int i = 0; i < sz; i++ ) - { - newArr[i] = strip( strs[i], delimiter ); - } - return newArr; - } - - /** - *

Strip any of a supplied String from the end of a String.

- * - *

If the strip String is null, whitespace is - * stripped.

- * - * @param str the String to remove characters from - * @param strip the String to remove - * @return the stripped String - */ - public static String stripEnd( String str, String strip ) - { - if ( str == null ) - { - return null; - } - int end = str.length(); - - if ( strip == null ) - { - while ( ( end != 0 ) && Character.isWhitespace( str.charAt( end - 1 ) ) ) - { - end--; - } - } - else - { - while ( ( end != 0 ) && ( strip.indexOf( str.charAt( end - 1 ) ) != -1 ) ) - { - end--; - } - } - return str.substring( 0, end ); - } - - /** - *

Strip any of a supplied String from the start of a String.

- * - *

If the strip String is null, whitespace is - * stripped.

- * - * @param str the String to remove characters from - * @param strip the String to remove - * @return the stripped String - */ - public static String stripStart( String str, String strip ) - { - if ( str == null ) - { - return null; - } - - int start = 0; - - int sz = str.length(); - - if ( strip == null ) - { - while ( ( start != sz ) && Character.isWhitespace( str.charAt( start ) ) ) - { - start++; - } - } - else - { - while ( ( start != sz ) && ( strip.indexOf( str.charAt( start ) ) != -1 ) ) - { - start++; - } - } - return str.substring( start ); - } - - // Case conversion - //-------------------------------------------------------------------------- - - /** - *

Convert a String to upper case, null String - * returns null.

- * - * @param str the String to uppercase - * @return the upper cased String - */ - public static String upperCase( String str ) - { - if ( str == null ) - { - return null; - } - return str.toUpperCase(); - } - - /** - *

Convert a String to lower case, null String - * returns null.

- * - * @param str the string to lowercase - * @return the lower cased String - */ - public static String lowerCase( String str ) - { - if ( str == null ) - { - return null; - } - return str.toLowerCase(); - } - - /** - *

Uncapitalise a String.

- * - *

That is, convert the first character into lower-case. - * null is returned as null.

- * - * @param str the String to uncapitalise - * @return uncapitalised String - */ - public static String uncapitalise( String str ) - { - if ( str == null ) - { - return null; - } - else if ( str.length() == 0 ) - { - return ""; - } - else - { - return new StringBuffer( str.length() ) - .append( Character.toLowerCase( str.charAt( 0 ) ) ) - .append( str.substring( 1 ) ) - .toString(); - } - } - - /** - *

Capitalise a String.

- * - *

That is, convert the first character into title-case. - * null is returned as null.

- * - * @param str the String to capitalise - * @return capitalised String - */ - public static String capitalise( String str ) - { - if ( str == null ) - { - return null; - } - else if ( str.length() == 0 ) - { - return ""; - } - else - { - return new StringBuffer( str.length() ) - .append( Character.toTitleCase( str.charAt( 0 ) ) ) - .append( str.substring( 1 ) ) - .toString(); - } - } - - /** - *

Swaps the case of String.

- * - *

Properly looks after making sure the start of words - * are Titlecase and not Uppercase.

- * - *

null is returned as null.

- * - * @param str the String to swap the case of - * @return the modified String - */ - public static String swapCase( String str ) - { - if ( str == null ) - { - return null; - } - int sz = str.length(); - StringBuffer buffer = new StringBuffer( sz ); - - boolean whitespace = false; - char ch = 0; - char tmp = 0; - - for ( int i = 0; i < sz; i++ ) - { - ch = str.charAt( i ); - if ( Character.isUpperCase( ch ) ) - { - tmp = Character.toLowerCase( ch ); - } - else if ( Character.isTitleCase( ch ) ) - { - tmp = Character.toLowerCase( ch ); - } - else if ( Character.isLowerCase( ch ) ) - { - if ( whitespace ) - { - tmp = Character.toTitleCase( ch ); - } - else - { - tmp = Character.toUpperCase( ch ); - } - } - else - { - tmp = ch; - } - buffer.append( tmp ); - whitespace = Character.isWhitespace( ch ); - } - return buffer.toString(); - } - - - /** - *

Capitalise all the words in a String.

- * - *

Uses {@link Character#isWhitespace(char)} as a - * separator between words.

- * - *

null will return null.

- * - * @param str the String to capitalise - * @return capitalised String - */ - public static String capitaliseAllWords( String str ) - { - if ( str == null ) - { - return null; - } - int sz = str.length(); - StringBuffer buffer = new StringBuffer( sz ); - boolean space = true; - for ( int i = 0; i < sz; i++ ) - { - char ch = str.charAt( i ); - if ( Character.isWhitespace( ch ) ) - { - buffer.append( ch ); - space = true; - } - else if ( space ) - { - buffer.append( Character.toTitleCase( ch ) ); - space = false; - } - else - { - buffer.append( ch ); - } - } - return buffer.toString(); - } - - /** - *

Uncapitalise all the words in a string.

- * - *

Uses {@link Character#isWhitespace(char)} as a - * separator between words.

- * - *

null will return null.

- * - * @param str the string to uncapitalise - * @return uncapitalised string - */ - public static String uncapitaliseAllWords( String str ) - { - if ( str == null ) - { - return null; - } - int sz = str.length(); - StringBuffer buffer = new StringBuffer( sz ); - boolean space = true; - for ( int i = 0; i < sz; i++ ) - { - char ch = str.charAt( i ); - if ( Character.isWhitespace( ch ) ) - { - buffer.append( ch ); - space = true; - } - else if ( space ) - { - buffer.append( Character.toLowerCase( ch ) ); - space = false; - } - else - { - buffer.append( ch ); - } - } - return buffer.toString(); - } - - // Nested extraction - //-------------------------------------------------------------------------- - - /** - *

Get the String that is nested in between two instances of the - * same String.

- * - *

If str is null, will - * return null.

- * - * @param str the String containing nested-string - * @param tag the String before and after nested-string - * @return the String that was nested, or null - * @throws NullPointerException if tag is null - */ - public static String getNestedString( String str, String tag ) - { - return getNestedString( str, tag, tag ); - } - - /** - *

Get the String that is nested in between two Strings.

- * - * @param str the String containing nested-string - * @param open the String before nested-string - * @param close the String after nested-string - * @return the String that was nested, or null - * @throws NullPointerException if open or close is null - */ - public static String getNestedString( String str, String open, String close ) - { - if ( str == null ) - { - return null; - } - int start = str.indexOf( open ); - if ( start != -1 ) - { - int end = str.indexOf( close, start + open.length() ); - if ( end != -1 ) - { - return str.substring( start + open.length(), end ); - } - } - return null; - } - - /** - *

How many times is the substring in the larger String.

- * - *

null returns 0.

- * - * @param str the String to check - * @param sub the substring to count - * @return the number of occurances, 0 if the String is null - * @throws NullPointerException if sub is null - */ - public static int countMatches( String str, String sub ) - { - if ( sub.equals( "" ) ) - { - return 0; - } - if ( str == null ) - { - return 0; - } - int count = 0; - int idx = 0; - while ( ( idx = str.indexOf( sub, idx ) ) != -1 ) - { - count++; - idx += sub.length(); - } - return count; - } - - // Character Tests - //-------------------------------------------------------------------------- - - /** - *

Checks if the String contains only unicode letters.

- * - *

null will return false. - * An empty String will return true.

- * - * @param str the String to check - * @return true if only contains letters, and is non-null - */ - public static boolean isAlpha( String str ) - { - if ( str == null ) - { - return false; - } - int sz = str.length(); - for ( int i = 0; i < sz; i++ ) - { - if ( Character.isLetter( str.charAt( i ) ) == false ) - { - return false; - } - } - return true; - } - - /** - *

Checks if the String contains only whitespace.

- * - *

null will return false. An - * empty String will return true.

- * - * @param str the String to check - * @return true if only contains whitespace, and is non-null - */ - public static boolean isWhitespace( String str ) - { - if ( str == null ) - { - return false; - } - int sz = str.length(); - for ( int i = 0; i < sz; i++ ) - { - if ( ( Character.isWhitespace( str.charAt( i ) ) == false ) ) - { - return false; - } - } - return true; - } - - /** - *

Checks if the String contains only unicode letters and - * space (' ').

- * - *

null will return false. An - * empty String will return true.

- * - * @param str the String to check - * @return true if only contains letters and space, - * and is non-null - */ - public static boolean isAlphaSpace( String str ) - { - if ( str == null ) - { - return false; - } - int sz = str.length(); - for ( int i = 0; i < sz; i++ ) - { - if ( ( Character.isLetter( str.charAt( i ) ) == false ) && - ( str.charAt( i ) != ' ' ) ) - { - return false; - } - } - return true; - } - - /** - *

Checks if the String contains only unicode letters or digits.

- * - *

null will return false. An empty - * String will return true.

- * - * @param str the String to check - * @return true if only contains letters or digits, - * and is non-null - */ - public static boolean isAlphanumeric( String str ) - { - if ( str == null ) - { - return false; - } - int sz = str.length(); - for ( int i = 0; i < sz; i++ ) - { - if ( Character.isLetterOrDigit( str.charAt( i ) ) == false ) - { - return false; - } - } - return true; - } - - /** - *

Checks if the String contains only unicode letters, digits - * or space (' ').

- * - *

null will return false. An empty - * String will return true.

- * - * @param str the String to check - * @return true if only contains letters, digits or space, - * and is non-null - */ - public static boolean isAlphanumericSpace( String str ) - { - if ( str == null ) - { - return false; - } - int sz = str.length(); - for ( int i = 0; i < sz; i++ ) - { - if ( ( Character.isLetterOrDigit( str.charAt( i ) ) == false ) && - ( str.charAt( i ) != ' ' ) ) - { - return false; - } - } - return true; - } - - /** - *

Checks if the String contains only unicode digits.

- * - *

null will return false. - * An empty String will return true.

- * - * @param str the String to check - * @return true if only contains digits, and is non-null - */ - public static boolean isNumeric( String str ) - { - if ( str == null ) - { - return false; - } - int sz = str.length(); - for ( int i = 0; i < sz; i++ ) - { - if ( Character.isDigit( str.charAt( i ) ) == false ) - { - return false; - } - } - return true; - } - - /** - *

Checks if the String contains only unicode digits or space - * (' ').

- * - *

null will return false. An empty - * String will return true.

- * - * @param str the String to check - * @return true if only contains digits or space, - * and is non-null - */ - public static boolean isNumericSpace( String str ) - { - if ( str == null ) - { - return false; - } - int sz = str.length(); - for ( int i = 0; i < sz; i++ ) - { - if ( ( Character.isDigit( str.charAt( i ) ) == false ) && - ( str.charAt( i ) != ' ' ) ) - { - return false; - } - } - return true; - } - - // Defaults - //-------------------------------------------------------------------------- - - /** - *

Returns either the passed in Object as a String, - * or, if the Object is null, an empty - * String.

- * - * @param obj the Object to check - * @return the passed in Object's toString, or blank if it was - * null - */ - public static String defaultString( Object obj ) - { - return defaultString( obj, "" ); - } - - /** - *

Returns either the passed in Object as a String, - * or, if the Object is null, a passed - * in default String.

- * - * @param obj the Object to check - * @param defaultString the default String to return if str is - * null - * @return the passed in string, or the default if it was - * null - */ - public static String defaultString( Object obj, String defaultString ) - { - return ( obj == null ) ? defaultString : obj.toString(); - } - - // Reversing - //-------------------------------------------------------------------------- - - /** - *

Reverse a String.

- * - *

null String returns null.

- * - * @param str the String to reverse - * @return the reversed String - */ - public static String reverse( String str ) - { - if ( str == null ) - { - return null; - } - return new StringBuffer( str ).reverse().toString(); - } - - /** - *

Reverses a String that is delimited by a specific character.

- * - *

The Strings between the delimiters are not reversed. - * Thus java.lang.String becomes String.lang.java (if the delimiter - * is '.').

- * - * @param str the String to reverse - * @param delimiter the delimiter to use - * @return the reversed String - */ - public static String reverseDelimitedString( String str, String delimiter ) - { - // could implement manually, but simple way is to reuse other, - // probably slower, methods. - String[] strs = split( str, delimiter ); - reverseArray( strs ); - return join( strs, delimiter ); - } - - /** - *

Reverses an array.

- * - *

TAKEN FROM CollectionsUtils.

- * - * @param array the array to reverse - */ - private static void reverseArray( Object[] array ) - { - int i = 0; - int j = array.length - 1; - Object tmp; - - while ( j > i ) - { - tmp = array[j]; - array[j] = array[i]; - array[i] = tmp; - j--; - i++; - } - } - - // Abbreviating - //-------------------------------------------------------------------------- - - /** - * Turn "Now is the time for all good men" into "Now is the time for..." - *

- * Specifically: - *

- * If str is less than max characters long, return it. - * Else abbreviate it to (substring(str, 0, max-3) + "..."). - * If maxWidth is less than 3, throw an IllegalArgumentException. - * In no case will it return a string of length greater than maxWidth. - * - * @param maxWidth maximum length of result string - **/ - public static String abbreviate( String s, int maxWidth ) - { - return abbreviate( s, 0, maxWidth ); - } - - /** - * Turn "Now is the time for all good men" into "...is the time for..." - *

- * Works like abbreviate(String, int), but allows you to specify a "left edge" - * offset. Note that this left edge is not necessarily going to be the leftmost - * character in the result, or the first - * character following the ellipses, but it will appear somewhere in the result. - * In no case will it return a string of length greater than maxWidth. - * - * @param offset left edge of source string - * @param maxWidth maximum length of result string - **/ - public static String abbreviate( String s, int offset, int maxWidth ) - { - if ( maxWidth < 4 ) - throw new IllegalArgumentException( "Minimum abbreviation width is 4" ); - if ( s.length() <= maxWidth ) - return s; - if ( offset > s.length() ) - offset = s.length(); - if ( ( s.length() - offset ) < ( maxWidth - 3 ) ) - offset = s.length() - ( maxWidth - 3 ); - if ( offset <= 4 ) - return s.substring( 0, maxWidth - 3 ) + "..."; - if ( maxWidth < 7 ) - throw new IllegalArgumentException( "Minimum abbreviation width with offset is 7" ); - if ( ( offset + ( maxWidth - 3 ) ) < s.length() ) - return "..." + abbreviate( s.substring( offset ), maxWidth - 3 ); - return "..." + s.substring( s.length() - ( maxWidth - 3 ) ); - } - - // Difference - //-------------------------------------------------------------------------- - - /** - * Compare two strings, and return the portion where they differ. - * (More precisely, return the remainder of the second string, - * starting from where it's different from the first.) - *

- * E.g. strdiff("i am a machine", "i am a robot") -> "robot" - * - * @return the portion of s2 where it differs from s1; returns the empty string ("") if they are equal - **/ - public static String difference( String s1, String s2 ) - { - int at = differenceAt( s1, s2 ); - if ( at == -1 ) - return ""; - return s2.substring( at ); - } - - /** - * Compare two strings, and return the index at which the strings begin to differ. - *

- * E.g. strdiff("i am a machine", "i am a robot") -> 7 - *

- * - * @return the index where s2 and s1 begin to differ; -1 if they are equal - **/ - public static int differenceAt( String s1, String s2 ) - { - int i; - for ( i = 0; i < s1.length() && i < s2.length(); ++i ) - { - if ( s1.charAt( i ) != s2.charAt( i ) ) - { - break; - } - } - if ( i < s2.length() || i < s1.length() ) - { - return i; - } - return -1; - } - - public static String interpolate( String text, Map namespace ) - { - Iterator keys = namespace.keySet().iterator(); - - while ( keys.hasNext() ) - { - String key = keys.next().toString(); - - Object obj = namespace.get( key ); - - if ( obj == null ) - { - throw new NullPointerException( "The value of the key '" + key + "' is null." ); - } - - String value = obj.toString(); - - text = StringUtils.replace( text, "${" + key + "}", value ); - - if ( key.indexOf( " " ) == -1 ) - { - text = StringUtils.replace( text, "$" + key, value ); - } - } - return text; - } - - public static String removeAndHump( String data, String replaceThis ) - { - String temp; - - StringBuffer out = new StringBuffer(); - - temp = data; - - StringTokenizer st = new StringTokenizer( temp, replaceThis ); - - while ( st.hasMoreTokens() ) - { - String element = (String) st.nextElement(); - - out.append( capitalizeFirstLetter( element ) ); - } - - return out.toString(); - } - - public static String capitalizeFirstLetter( String data ) - { - char firstLetter = Character.toTitleCase( data.substring( 0, 1 ).charAt( 0 ) ); - - String restLetters = data.substring( 1 ); - - return firstLetter + restLetters; - } - - public static String lowercaseFirstLetter( String data ) - { - char firstLetter = Character.toLowerCase( data.substring( 0, 1 ).charAt( 0 ) ); - - String restLetters = data.substring( 1 ); - - return firstLetter + restLetters; - } - - public static String addAndDeHump( String view ) - { - StringBuffer sb = new StringBuffer(); - - for ( int i = 0; i < view.length(); i++ ) - { - if ( i != 0 && Character.isUpperCase( view.charAt( i ) ) ) - { - sb.append( '-' ); - } - - sb.append( view.charAt( i ) ); - } - - return sb.toString().trim().toLowerCase(); - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/SweeperPool.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/SweeperPool.java deleted file mode 100644 index a71ae9bd8..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/SweeperPool.java +++ /dev/null @@ -1,305 +0,0 @@ -package org.codehaus.plexus.util; - -import java.util.ArrayList; - - -/** - * Pools a bunch of objects . Runs a sweeper periodically to - * keep it down to size. The objects in the pool first get disposed first. - * - * - * @author Bert van Brakel - */ -public class SweeperPool -{ - /***/ - private static final boolean DEBUG = false; - - /** Sweeps the pool periodically to trim it's size */ - private transient Sweeper sweeper; - - /** Absolute maxiumuim size of the pool.*/ - private transient int maxSize; - - /** The size the pool gets trimmed down to */ - private transient int minSize; - - /** When the sweeper runs - * and the pool is over this size, then the pool is trimmed */ - private int triggerSize; - - /** Holds the pooled objects */ - private ArrayList pooledObjects; - - /** Flag indicating this pool is shuting down */ - private boolean shuttingDown = false; - - //private Vector used; - - /** - * - *

There are a number of settings to control how the pool operates. - *

    - *
  • minSize - this is the size the pool is trimmed to
  • - *
  • triggerSize - this determines if the pool is trimmed when - * the sweeper runs. If the pool size is greater or equal than this value then - * the pool is trimmed to minSize. - *
  • maxSize - if the pool has reached this size, any objects added - * are immediatley disposed. If the pool is this size when the sweeper runs, then - * the pool is also trimmed to minSize irrespective of the triggerSize. - *
  • - *
  • sweepInterval - how often the sweeper runs. Is actually the - * time since the sweeper last finished a pass. 0 if the sweeper should not run. - *
  • - *
- *

- * - *

Any value less than 0 is automatically converted to 0

- */ - public SweeperPool( int maxSize, int minSize, int intialCapacity, - int sweepInterval, int triggerSize ) - { - super(); - this.maxSize = saneConvert( maxSize ); - this.minSize = saneConvert( minSize ); - this.triggerSize = saneConvert( triggerSize ); - pooledObjects = new ArrayList( intialCapacity ); - - //only run a sweeper if sweep interval is positive - if ( sweepInterval > 0 ) - { - sweeper = new Sweeper( this, sweepInterval ); - sweeper.start(); - } - } - - private int saneConvert( int value ) - { - if ( value < 0 ) - { - return 0; - } - else - { - return value; - } - } - - /** - * Return the pooled object - */ - public synchronized Object get() - { - if ( ( pooledObjects.size() == 0 ) || shuttingDown ) - { - return null; - } - else - { - Object obj = pooledObjects.remove( 0 ); - objectRetrieved( obj ); - - //used.add(obj); - return obj; - } - } - - /** - * Add an object to the pool - * - * @param obj the object to pool. Can be null. - * - * @return true if the object was added to the pool, false if it was disposed or null - * - */ - public synchronized boolean put( Object obj ) - { - objectAdded( obj ); - - if ( ( obj != null ) && ( pooledObjects.size() < maxSize ) - && ( shuttingDown == false ) ) - { - pooledObjects.add( obj ); - - return true; - } - else if ( obj != null ) - { - //no longer need the object, so dispose it - objectDisposed( obj ); - } - - return false; - } - - /** - * Return the number of pooled objects. This is never - * greater than t maximuim size of the pool - * - * @return the number of pooled objects - */ - public synchronized int getSize() - { - return pooledObjects.size(); - } - - /** - * Dispose of this pool. Stops the sweeper and disposes each object in the pool - * - */ - public synchronized void dispose() - { - shuttingDown = true; - - if ( sweeper != null ) - { - sweeper.stop(); - } - - //use an array here as objects may still be being put back in the pool - //and we don't want to throw a ConcurrentModificationException - Object[] objects = pooledObjects.toArray(); - - for ( int i = 0; i < objects.length; i++ ) - { - objectDisposed( objects[i] ); - } - - pooledObjects.clear(); - } - - /** - * Trim the pool down to min size - * - */ - public synchronized void trim() - { - if ( ( ( triggerSize > 0 ) && ( pooledObjects.size() >= triggerSize ) ) - || ( ( maxSize > 0 ) && ( pooledObjects.size() >= maxSize ) ) ) - { - while ( pooledObjects.size() > minSize ) - { - objectDisposed( pooledObjects.remove( 0 ) ); - } - } - } - - /** - * Override this to be notified of object disposal. Called - * after the object has been removed. Occurs when the pool - * is trimmed. - * - * @param obj - */ - public void objectDisposed( Object obj ) - { - } - - /** - * Override this to be notified of object addition. - * Called before object is to be added. - * - * @param obj - */ - public void objectAdded( Object obj ) - { - } - - /** - * Override this to be notified of object retrieval. - * Called after object removed from the pool, but - * before returned to the client. - * - * @param obj - */ - public void objectRetrieved( Object obj ) - { - } - - /** - * Periodically at sweepInterval goes through - * and tests if the pool should be trimmed. - * - * @author bert - * - */ - private static class Sweeper implements Runnable - { - private final transient SweeperPool pool; - private transient boolean service = false; - private final transient int sweepInterval; - - /** - * - */ - public Sweeper( SweeperPool pool, int sweepInterval ) - { - super(); - this.sweepInterval = sweepInterval; - this.pool = pool; - } - - /** - * Run the seeper. - * - * @see java.lang.Runnable#run() - */ - public void run() - { - debug( "started" ); - - if ( sweepInterval > 0 ) - { - synchronized ( this ) - { - while ( service ) - { - try - { - //wait specified number of seconds - //before running next sweep - wait( sweepInterval * 1000 ); - } - catch ( InterruptedException e ) - { - } - runSweep(); - } - } - } - - debug( "stopped" ); - } - - public synchronized void start() - { - if ( !service ) - { - service = true; - Thread t = new Thread( this ); - t.start(); - - } - } - - public synchronized void stop() - { - service = false; - notifyAll(); - } - - private final void debug( String msg ) - { - if ( DEBUG ) - { - System.err.println( this + ":" + msg ); - } - } - - private void runSweep() - { - debug( "runningSweep. time=" + System.currentTimeMillis() ); - pool.trim(); - } - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/TypeFormat.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/TypeFormat.java deleted file mode 100644 index 8f1ef8547..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/TypeFormat.java +++ /dev/null @@ -1,866 +0,0 @@ -/* - * J.A.D.E. Java(TM) Addition to Default Environment. - * Latest release available at http://jade.dautelle.com/ - * This class is public domain (not copyrighted). - */ -package org.codehaus.plexus.util; - -/** - *

This class provides utility methods to parse CharSequence - * into primitive types and to format primitive types into - * StringBuffer.

- * - *

Methods from this utility class do not create temporary objects - * and are typically faster than standard library methods (e.g {@link - * #parseDouble} is up to 15x faster than Double.parseDouble). - *

- * - *

For class instances, formatting is typically performed using specialized - * java.text.Format (Locale sensitive) - * and/or using conventional methods (class sensitive). For example:

- *     public class Foo {
- *         public static Foo valueOf(CharSequence chars) {...} // Parses.
- *         public StringBuffer appendTo(StringBuffer sb) {...} // Formats.
- *         public String toString() {
- *             return appendTo(new StringBuffer()).toString();
- *         }
- *     }

- * - *

This class is public domain (not copyrighted).

- * - * @author Jean-Marie Dautelle - * @version 4.6, June 22, 2003 - */ -public final class TypeFormat { - - /** - * Holds the characters used to represent numbers. - */ - private final static char[] DIGITS = { - '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , - 'a' , 'b' , 'c' , 'd' , 'e' , 'f' , 'g' , 'h' , 'i' , 'j' , - 'k' , 'l' , 'm' , 'n' , 'o' , 'p' , 'q' , 'r' , 's' , 't' , - 'u' , 'v' , 'w' , 'x' , 'y' , 'z' }; - - /** - * Default constructor (forbids derivation). - */ - private TypeFormat() {} - - /** - * Searches for a particular sequence within a character sequence - * (general purpose parsing function). - * - * @param pattern the character sequence to search for. - * @param chars the character sequence being searched. - * @param fromIndex the index in chars to start the search - * from. - * @return the index in the range - * [fromIndex, chars.length()-pattern.length()] - * or -1 if the character sequence is not found. - */ - public static int indexOf(CharSequence pattern, CharSequence chars, - int fromIndex) { - int patternLength = pattern.length(); - fromIndex = Math.max(0, fromIndex); - if (patternLength != 0) { // At least one character to search for. - char firstChar = pattern.charAt(0); - int last = chars.length() - patternLength; - for (int i=fromIndex; i <= last; i++) { - if (chars.charAt(i) == firstChar) { - boolean match = true; - for (int j=1; j < patternLength; j++) { - if (chars.charAt(i+j) != pattern.charAt(j)) { - match = false; - break; - } - } - if (match) { - return i; - } - } - } - return -1; - } else { - return Math.min(0, fromIndex); - } - } - - /** - * Parses the specified CharSequence as a boolean. - * - * @param chars the character sequence to parse. - * @return the corresponding boolean. - */ - public static boolean parseBoolean(CharSequence chars) { - return (chars.length() == 4) && - (chars.charAt(0) == 't' || chars.charAt(0) == 'T') && - (chars.charAt(1) == 'r' || chars.charAt(1) == 'R') && - (chars.charAt(2) == 'u' || chars.charAt(2) == 'U') && - (chars.charAt(3) == 'e' || chars.charAt(3) == 'E'); - } - - /** - * Parses the specified CharSequence as a signed decimal - * short. - * - * @param chars the character sequence to parse. - * @return parseShort(chars, 10) - * @throws NumberFormatException if the specified character sequence - * does not contain a parsable short. - * @see #parseShort(CharSequence, int) - */ - public static short parseShort(CharSequence chars) { - return parseShort(chars, 10); - } - - /** - * Parses the specified CharSequence as a signed - * short in the specified radix. The characters in the string - * must all be digits of the specified radix, except the first character - * which may be a plus sign '+' or a minus sign - * '-'. - * - * @param chars the character sequence to parse. - * @param radix the radix to be used while parsing. - * @return the corresponding short. - * @throws NumberFormatException if the specified character sequence - * does not contain a parsable short. - */ - public static short parseShort(CharSequence chars, int radix) { - try { - boolean isNegative = (chars.charAt(0) == '-') ? true : false; - int result = 0; - int limit = (isNegative) ? Short.MIN_VALUE : -Short.MAX_VALUE; - int multmin = limit / radix; - int length = chars.length(); - int i = (isNegative || (chars.charAt(0) == '+')) ? 1 : 0; - while (true) { - int digit = Character.digit(chars.charAt(i), radix); - int tmp = result * radix; - if ((digit < 0) || (result < multmin) || - (tmp < limit + digit)) { // Overflow. - throw new NumberFormatException( - "For input characters: \"" + chars.toString() + "\""); - } - // Accumulates negatively. - result = tmp - digit; - if (++i >= length) { - break; - } - } - return (short) (isNegative ? result : -result); - } catch (IndexOutOfBoundsException e) { - throw new NumberFormatException( - "For input characters: \"" + chars.toString() + "\""); - } - } - - /** - * Parses the specified CharSequence as a signed decimal - * int. - * - * @param chars the character sequence to parse. - * @return parseInt(chars, 10) - * @throws NumberFormatException if the specified character sequence - * does not contain a parsable int. - * @see #parseInt(CharSequence, int) - */ - public static int parseInt(CharSequence chars) { - return parseInt(chars, 10); - } - - /** - * Parses the specified CharSequence as a signed - * int in the specified radix. The characters in the string - * must all be digits of the specified radix, except the first character - * which may be a plus sign '+' or a minus sign - * '-'. - * - * @param chars the character sequence to parse. - * @param radix the radix to be used while parsing. - * @return the corresponding int. - * @throws NumberFormatException if the specified character sequence - * does not contain a parsable int. - */ - public static int parseInt(CharSequence chars, int radix) { - try { - boolean isNegative = (chars.charAt(0) == '-') ? true : false; - int result = 0; - int limit = (isNegative) ? Integer.MIN_VALUE : -Integer.MAX_VALUE; - int multmin = limit / radix; - int length = chars.length(); - int i = (isNegative || (chars.charAt(0) == '+')) ? 1 : 0; - while (true) { - int digit = Character.digit(chars.charAt(i), radix); - int tmp = result * radix; - if ((digit < 0) || (result < multmin) || - (tmp < limit + digit)) { // Overflow. - throw new NumberFormatException( - "For input characters: \"" + chars.toString() + "\""); - } - // Accumulates negatively to avoid surprises near MAX_VALUE - result = tmp - digit; - if (++i >= length) { - break; - } - } - return isNegative ? result : -result; - } catch (IndexOutOfBoundsException e) { - throw new NumberFormatException( - "For input characters: \"" + chars.toString() + "\""); - } - } - - /** - * Parses the specified CharSequence as a signed decimal - * long. - * - * @param chars the character sequence to parse. - * @return parseLong(chars, 10) - * @throws NumberFormatException if the specified character sequence - * does not contain a parsable long. - * @see #parseLong(CharSequence, int) - */ - public static long parseLong(CharSequence chars) { - return parseLong(chars, 10); - } - - /** - * Parses the specified CharSequence as a signed - * long in the specified radix. The characters in the string - * must all be digits of the specified radix, except the first character - * which may be a plus sign '+' or a minus sign - * '-'. - * - * @param chars the character sequence to parse. - * @param radix the radix to be used while parsing. - * @return the corresponding long. - * @throws NumberFormatException if the specified character sequence - * does not contain a parsable long. - */ - public static long parseLong(CharSequence chars, int radix) { - try { - boolean isNegative = (chars.charAt(0) == '-') ? true : false; - long result = 0; - long limit = (isNegative) ? Long.MIN_VALUE : -Long.MAX_VALUE; - long multmin = limit / radix; - int length = chars.length(); - int i = (isNegative || (chars.charAt(0) == '+')) ? 1 : 0; - while (true) { - int digit = Character.digit(chars.charAt(i), radix); - long tmp = result * radix; - if ((digit < 0) || (result < multmin) || - (tmp < limit + digit)) { // Overflow. - throw new NumberFormatException( - "For input characters: \"" + chars.toString() + "\""); - } - // Accumulates negatively to avoid surprises near MAX_VALUE - result = tmp - digit; - if (++i >= length) { - break; - } - } - return isNegative ? result : -result; - } catch (IndexOutOfBoundsException e) { - throw new NumberFormatException( - "For input characters: \"" + chars.toString() + "\""); - } - } - - /** - * Parses this CharSequence as a float. - * - * @param chars the character sequence to parse. - * @return the float number represented by the specified character sequence. - * @throws NumberFormatException if the character sequence does not contain - * a parsable float. - */ - public static float parseFloat(CharSequence chars) { - double d = parseDouble(chars); - if ( (d >= Float.MIN_VALUE) && (d <= Float.MAX_VALUE)) { - return (float) d; - } else { - throw new NumberFormatException( - "Float overflow for input characters: \"" + - chars.toString() + "\""); - } - } - - /** - * Parses this CharSequence as a double. - * - * @param chars the character sequence to parse. - * @return the double number represented by this character sequence. - * @throws NumberFormatException if the character sequence does not contain - * a parsable double. - */ - public static double parseDouble(CharSequence chars) - throws NumberFormatException { - try { - int length = chars.length(); - double result = 0.0; - int exp = 0; - - boolean isNegative = (chars.charAt(0) == '-') ? true : false; - int i = (isNegative || (chars.charAt(0) == '+')) ? 1 : 0; - - // Checks special cases NaN or Infinity. - if ((chars.charAt(i) == 'N') || (chars.charAt(i) == 'I')) { - if (chars.toString().equals("NaN")) { - return Double.NaN; - } else if (chars.subSequence(i, length).toString(). - equals("Infinity")) { - return isNegative ? Double.NEGATIVE_INFINITY : - Double.POSITIVE_INFINITY; - } - } - - // Reads decimal number. - boolean fraction = false; - while (true) { - char c = chars.charAt(i); - if ( (c == '.') && (!fraction)) { - fraction = true; - } else if ((c == 'e') || (c == 'E')) { - break; - } else if ((c >= '0') && (c <= '9')) { - result = result * 10 + (c - '0'); - if (fraction) { - exp--; - } - } else { - throw new NumberFormatException( - "For input characters: \"" + chars.toString() + "\""); - } - if (++i >= length) { - break; - } - } - result = isNegative ? - result : result; - - // Reads exponent (if any). - if (i < length) { - i++; - boolean negE = (chars.charAt(i) == '-') ? true : false; - i = (negE || (chars.charAt(i) == '+')) ? i+1 : i; - int valE = 0; - while (true) { - char c = chars.charAt(i); - if ((c >= '0') && (c <= '9')) { - valE = valE * 10 + (c - '0'); - if (valE > 10000000) { // Hard-limit to avoid overflow. - valE = 10000000; - } - } else { - throw new NumberFormatException( - "For input characters: \"" + chars.toString() + - "\""); - } - if (++i >= length) { - break; - } - } - exp += negE ? -valE : valE; - } - - // Returns product decimal number with exponent. - return multE(result, exp); - - } catch (IndexOutOfBoundsException e) { - throw new NumberFormatException( - "For input characters: \"" + chars.toString() + "\""); - } - } - /** - * Formats the specified boolean and appends the resulting - * text to the StringBuffer argument. - * - * @param b a boolean. - * @param sb the StrinBuffer to append. - * @return the specified StringBuffer object. - * @see #parseBoolean - */ - public static StringBuffer format(boolean b, StringBuffer sb) { - return b ? sb.append("true") : sb.append("false"); - } - - /** - * Formats the specified short and appends the resulting - * text (decimal representation) to the StringBuffer argument. - * - *

Note: This method is preferred to StringBuffer.append(short) - * as it does not create temporary String - * objects (several times faster for small numbers).

- * - * @param s the short number. - * @param sb the StrinBuffer to append. - * @return the specified StringBuffer object. - * @see #parseShort - */ - public static StringBuffer format(short s, StringBuffer sb) { - return format((int)s, sb); // Forwards to int formatting (fast). - } - - /** - * Formats the specified short in the specified radix and - * appends the resulting text to the StringBuffer argument. - * - * @param s the short number. - * @param radix the radix. - * @param sb the StrinBuffer to append. - * @return the specified StringBuffer object. - * @see #parseShort(CharSequence, int) - * throws IllegalArgumentException if radix is not in [2 .. 36] range. - */ - public static StringBuffer format(short s, int radix, StringBuffer sb) { - return format((int)s, radix, sb); // Forwards to int formatting (fast). - } - - /** - * Formats the specified int and appends the resulting - * text (decimal representation) to the StringBuffer argument. - * - *

Note: This method is preferred to StringBuffer.append(int) - * as it does not create temporary String - * objects (several times faster for small numbers).

- * - * @param i the int number. - * @param sb the StrinBuffer to append. - * @return the specified StringBuffer object. - * @see #parseInt - */ - public static StringBuffer format(int i, StringBuffer sb) { - if (i <= 0) { - if (i == Integer.MIN_VALUE) { // Negation would overflow. - return sb.append("-2147483648"); // 11 char max. - } else if (i == 0) { - return sb.append('0'); - } - i = -i; - sb.append('-'); - } - int j = 1; - for (; (j < 10) && (i >= INT_POW_10[j]); j++) {} - // POW_10[j] > i >= POW_10[j-1] - for (j--; j >= 0; j--) { - int pow10 = INT_POW_10[j]; - int digit = i / pow10; - i -= digit * pow10; - sb.append(DIGITS[digit]); - } - return sb; - } - private static final int[] INT_POW_10 = new int[10]; - static { - int pow = 1; - for (int i=0; i < 10; i++) { - INT_POW_10[i] = pow; - pow *= 10; - } - } - - /** - * Formats the specified int in the specified radix and appends - * the resulting text to the StringBuffer argument. - * - * @param i the int number. - * @param radix the radix. - * @param sb the StrinBuffer to append. - * @return the specified StringBuffer object. - * @see #parseInt(CharSequence, int) - * throws IllegalArgumentException if radix is not in [2 .. 36] range. - */ - public static StringBuffer format(int i, int radix, StringBuffer sb) { - if (radix == 10) { - return format(i, sb); // Faster version. - } else if (radix < 2 || radix > 36) { - throw new IllegalArgumentException("radix: " + radix); - } - if (i < 0) { - sb.append('-'); - } else { - i = -i; - } - format2(i, radix, sb); - return sb; - } - private static void format2(int i, int radix, StringBuffer sb) { - if (i <= -radix) { - format2(i / radix, radix, sb); - sb.append(DIGITS[-(i % radix)]); - } else { - sb.append(DIGITS[-i]); - } - } - - /** - * Formats the specified long and appends the resulting - * text (decimal representation) to the StringBuffer argument. - * - *

Note: This method is preferred to StringBuffer.append(long) - * as it does not create temporary String - * objects (several times faster for small numbers).

- * - * @param l the long number. - * @param sb the StrinBuffer to append. - * @return the specified StringBuffer object. - * @see #parseLong - */ - public static StringBuffer format(long l, StringBuffer sb) { - if (l <= 0) { - if (l == Long.MIN_VALUE) { // Negation would overflow. - return sb.append("-9223372036854775808"); // 20 characters max. - } else if (l == 0) { - return sb.append('0'); - } - l = -l; - sb.append('-'); - } - int j = 1; - for (; (j < 19) && (l >= LONG_POW_10[j]); j++) {} - // POW_10[j] > l >= POW_10[j-1] - for (j--; j >= 0; j--) { - long pow10 = LONG_POW_10[j]; - int digit = (int) (l / pow10); - l -= digit * pow10; - sb.append(DIGITS[digit]); - } - return sb; - } - private static final long[] LONG_POW_10 = new long[19]; - static { - long pow = 1; - for (int i=0; i < 19; i++) { - LONG_POW_10[i] = pow; - pow *= 10; - } - } - - /** - * Formats the specified long in the specified radix and - * appends the resulting text to the StringBuffer argument. - * - * @param l the long number. - * @param radix the radix. - * @param sb the StrinBuffer to append. - * @return the specified StringBuffer object. - * @see #parseLong(CharSequence, int) - * throws IllegalArgumentException if radix is not in [2 .. 36] range. - */ - public static StringBuffer format(long l, int radix, StringBuffer sb) { - if (radix == 10) { - return format(l, sb); // Faster version. - } else if (radix < 2 || radix > 36) { - throw new IllegalArgumentException("radix: " + radix); - } - if (l < 0) { - sb.append('-'); - } else { - l = -l; - } - format2(l, radix, sb); - return sb; - } - private static void format2(long l, int radix, StringBuffer sb) { - if (l <= -radix) { - format2(l / radix, radix, sb); - sb.append(DIGITS[(int)-(l % radix)]); - } else { - sb.append(DIGITS[(int)-l]); - } - } - - /** - * Formats the specified float and appends the resulting - * text to the StringBuffer argument. - * - * @param f the float number. - * @param sb the StrinBuffer to append. - * @return format(f, 0.0f, sb) - * @see #format(float, float, StringBuffer) - */ - public static StringBuffer format(float f, StringBuffer sb) { - return format(f, 0.0f, sb); - } - - /** - * Formats the specified float and appends the resulting text - * to the StringBuffer argument; the number of significative - * digits is deduced from the specifed precision. All digits at least as - * significant as the specified precision are represented. For example: - *
    - *
  • format(5.6f, 0.01f, sb) appends "5.60"
  • - *
  • format(5.6f, 0.1f, sb) appends "5.6"
  • - *
  • format(5.6f, 1f, sb) appends "6"
  • - *
- * If the precision is 0.0f, the precision is assumed to be - * the intrinsic float precision (64 bits IEEE 754 format); - * no formatting is performed, all significant digits are displayed and - * trailing zeros are removed. - * - * @param f the float number. - * @param precision the maximum weight of the last digit represented. - * @param sb the StrinBuffer to append. - * @return the specified StringBuffer object. - * @throws IllegalArgumentException if the specified precision is negative - * or would result in too many digits (19+). - */ - public static StringBuffer format(float f, float precision, - StringBuffer sb) { - // Adjusts precision. - boolean precisionOnLastDigit; - if (precision > 0.0f) { - precisionOnLastDigit = true; - } else if (precision == 0.0f) { - if (f != 0.0f) { - precisionOnLastDigit = false; - precision = Math.max(Math.abs(f * FLOAT_RELATIVE_ERROR), - Float.MIN_VALUE); - } else { - return sb.append("0.0"); // Exact zero. - } - } else { - throw new IllegalArgumentException( - "precision: Negative values not allowed"); - } - return format(f, precision, precisionOnLastDigit, sb); - } - - /** - * Formats the specified double and appends the resulting - * text to the StringBuffer argument. - * - *

Note : This method is preferred to StringBuffer.append(double) - * or even String.valueOf(double) as it - * does not create temporary String or - * FloatingDecimal objects (several times faster, - * e.g. 15x faster for Double.MAX_VALUE).

- * - * @param d the double number. - * @param sb the StrinBuffer to append. - * @return format(d, 0.0, sb) - * @see #format(double, double, StringBuffer) - */ - public static StringBuffer format(double d, StringBuffer sb) { - return format(d, 0.0, sb); - } - - /** - * Formats the specified double and appends the resulting text - * to the StringBuffer argument; the number of significand - * digits is specified as integer argument. - * - * @param d the double number. - * @param digits the number of significand digits (excludes exponent). - * @param sb the StrinBuffer to append. - * @return the specified StringBuffer object. - * @throws IllegalArgumentException if the number of digits is not in - * range [1..19]. - */ - public static StringBuffer format(double d, int digits, - StringBuffer sb) { - if ((digits >= 1) && (digits <= 19)) { - double precision = Math.abs(d / DOUBLE_POW_10[digits-1]); - return format(d, precision, sb); - } else { - throw new java.lang.IllegalArgumentException( - "digits: " + digits + " is not in range [1 .. 19]"); - } - } - - /** - * Formats the specified double and appends the resulting text - * to the StringBuffer argument; the number of significative - * digits is deduced from the specifed precision. All digits at least as - * significant as the specified precision are represented. For example: - *
    - *
  • format(5.6, 0.01, sb) appends "5.60"
  • - *
  • format(5.6, 0.1, sb) appends "5.6"
  • - *
  • format(5.6, 1, sb) appends "6"
  • - *
- * If the precision is 0.0, the precision is assumed to be - * the intrinsic double precision (64 bits IEEE 754 format); - * no formatting is performed, all significant digits are displayed and - * trailing zeros are removed. - * - * @param d the double number. - * @param precision the maximum weight of the last digit represented. - * @param sb the StrinBuffer to append. - * @return the specified StringBuffer object. - * @throws IllegalArgumentException if the specified precision is negative - * or would result in too many digits (19+). - */ - public static StringBuffer format(double d, double precision, - StringBuffer sb) { - // Adjusts precision. - boolean precisionOnLastDigit = false; - if (precision > 0.0) { - precisionOnLastDigit = true; - } else if (precision == 0.0) { - if (d != 0.0) { - precision = Math.max(Math.abs(d * DOUBLE_RELATIVE_ERROR), - Double.MIN_VALUE); - } else { - return sb.append("0.0"); // Exact zero. - } - } else if (precision < 0.0) { // Not NaN - throw new IllegalArgumentException( - "precision: Negative values not allowed"); - } - return format(d, precision, precisionOnLastDigit, sb); - } - - /** - * Formats the specified double and appends the resulting text - * to the StringBuffer argument; the number of significative - * digits is deduced from the specifed precision. - * - * @param d the double number. - * @param precision the maximum weight of the last digit represented. - * @param precisionOnLastDigit indicates if the number of digits is - * deduced from the specified precision. - * @param sb the StrinBuffer to append. - * @return the specified StringBuffer object. - */ - private static StringBuffer format(double d, double precision, - boolean precisionOnLastDigit, - StringBuffer sb) { - // Special cases. - if (Double.isNaN(d)) { - return sb.append("NaN"); - } else if (Double.isInfinite(d)) { - return (d >= 0) ? sb.append("Infinity") : sb.append("-Infinity"); - } - if (d < 0) { - d = -d; - sb.append('-'); - } - - // Formats decimal part. - int rank = (int) Math.floor(Math.log(precision) / LOG_10); - double digitValue = multE(d, -rank); - if (digitValue >= Long.MAX_VALUE) { - throw new IllegalArgumentException( - "Specified precision would result in too many digits"); - } - int digitStart = sb.length(); - format(Math.round(digitValue), sb); - int digitLength = sb.length() - digitStart; - int dotPos = digitLength + rank; - boolean useScientificNotation = false; - - // Inserts dot ('.') - if ((dotPos <= -LEADING_ZEROS.length) || (dotPos > digitLength)) { - // Scientific notation has to be used ("x.xxxEyy"). - sb.insert(digitStart + 1, '.'); - useScientificNotation = true; - } else if (dotPos > 0) { - // Dot within the string ("xxxx.xxxxx"). - sb.insert(digitStart + dotPos, '.'); - } else { - // Leading zeros ("0.xxxxx"). - sb.insert(digitStart, LEADING_ZEROS[-dotPos]); - } - - // Removes trailing zeros. - if (!precisionOnLastDigit) { - int newLength = sb.length(); - do { - newLength--; - } while (sb.charAt(newLength) == '0'); - sb.setLength(newLength+1); - } - - // Avoids trailing '.' - if (sb.charAt(sb.length()-1) == '.') { - if (precisionOnLastDigit) { - sb.setLength(sb.length()-1); // Prefers "xxx" to "xxx." - } else { - sb.append('0'); // Prefer "xxx.0" to "xxx." - } - } - - // Writes exponent. - if (useScientificNotation) { - sb.append('E'); - format(dotPos - 1, sb); - } - - return sb; - } - private static final double LOG_10 = Math.log(10); - private static final float FLOAT_RELATIVE_ERROR = (float) Math.pow(2, -24); - private static final double DOUBLE_RELATIVE_ERROR = Math.pow(2, -53); - private static String[] LEADING_ZEROS = {"0.", "0.0", "0.00"}; - - - /** - * Returns the product of the specified value with 10 raised - * at the specified power exponent. - * - * @param value the value. - * @param E the exponent. - * @return value * 10^E - */ - private static final double multE(double value, int E) { - if (E >= 0) { - if (E <= 308) { - // Max: 1.7976931348623157E+308 - return value * DOUBLE_POW_10[E]; - } else { - value *= 1E21; // Exact multiplicand. - E = Math.min(308, E-21); - return value * DOUBLE_POW_10[E]; - } - } else { - if (E >= -308) { - return value / DOUBLE_POW_10[-E]; - } else { - // Min: 4.9E-324 - value /= 1E21; // Exact divisor. - E = Math.max(-308, E+21); - return value / DOUBLE_POW_10[-E]; - } - } - } - - // Note: Approximation for exponents > 21. This may introduce round-off - // errors (e.g. 1E23 represented as "9.999999999999999E22"). - private static final double[] DOUBLE_POW_10 = new double[] { - - 1E000, 1E001, 1E002, 1E003, 1E004, 1E005, 1E006, 1E007, 1E008, 1E009, - 1E010, 1E011, 1E012, 1E013, 1E014, 1E015, 1E016, 1E017, 1E018, 1E019, - 1E020, 1E021, 1E022, 1E023, 1E024, 1E025, 1E026, 1E027, 1E028, 1E029, - 1E030, 1E031, 1E032, 1E033, 1E034, 1E035, 1E036, 1E037, 1E038, 1E039, - 1E040, 1E041, 1E042, 1E043, 1E044, 1E045, 1E046, 1E047, 1E048, 1E049, - 1E050, 1E051, 1E052, 1E053, 1E054, 1E055, 1E056, 1E057, 1E058, 1E059, - 1E060, 1E061, 1E062, 1E063, 1E064, 1E065, 1E066, 1E067, 1E068, 1E069, - 1E070, 1E071, 1E072, 1E073, 1E074, 1E075, 1E076, 1E077, 1E078, 1E079, - 1E080, 1E081, 1E082, 1E083, 1E084, 1E085, 1E086, 1E087, 1E088, 1E089, - 1E090, 1E091, 1E092, 1E093, 1E094, 1E095, 1E096, 1E097, 1E098, 1E099, - - 1E100, 1E101, 1E102, 1E103, 1E104, 1E105, 1E106, 1E107, 1E108, 1E109, - 1E110, 1E111, 1E112, 1E113, 1E114, 1E115, 1E116, 1E117, 1E118, 1E119, - 1E120, 1E121, 1E122, 1E123, 1E124, 1E125, 1E126, 1E127, 1E128, 1E129, - 1E130, 1E131, 1E132, 1E133, 1E134, 1E135, 1E136, 1E137, 1E138, 1E139, - 1E140, 1E141, 1E142, 1E143, 1E144, 1E145, 1E146, 1E147, 1E148, 1E149, - 1E150, 1E151, 1E152, 1E153, 1E154, 1E155, 1E156, 1E157, 1E158, 1E159, - 1E160, 1E161, 1E162, 1E163, 1E164, 1E165, 1E166, 1E167, 1E168, 1E169, - 1E170, 1E171, 1E172, 1E173, 1E174, 1E175, 1E176, 1E177, 1E178, 1E179, - 1E180, 1E181, 1E182, 1E183, 1E184, 1E185, 1E186, 1E187, 1E188, 1E189, - 1E190, 1E191, 1E192, 1E193, 1E194, 1E195, 1E196, 1E197, 1E198, 1E199, - - 1E200, 1E201, 1E202, 1E203, 1E204, 1E205, 1E206, 1E207, 1E208, 1E209, - 1E210, 1E211, 1E212, 1E213, 1E214, 1E215, 1E216, 1E217, 1E218, 1E219, - 1E220, 1E221, 1E222, 1E223, 1E224, 1E225, 1E226, 1E227, 1E228, 1E229, - 1E230, 1E231, 1E232, 1E233, 1E234, 1E235, 1E236, 1E237, 1E238, 1E239, - 1E240, 1E241, 1E242, 1E243, 1E244, 1E245, 1E246, 1E247, 1E248, 1E249, - 1E250, 1E251, 1E252, 1E253, 1E254, 1E255, 1E256, 1E257, 1E258, 1E259, - 1E260, 1E261, 1E262, 1E263, 1E264, 1E265, 1E266, 1E267, 1E268, 1E269, - 1E270, 1E271, 1E272, 1E273, 1E274, 1E275, 1E276, 1E277, 1E278, 1E279, - 1E280, 1E281, 1E282, 1E283, 1E284, 1E285, 1E286, 1E287, 1E288, 1E289, - 1E290, 1E291, 1E292, 1E293, 1E294, 1E295, 1E296, 1E297, 1E298, 1E299, - - 1E300, 1E301, 1E302, 1E303, 1E304, 1E305, 1E306, 1E307, 1E308 }; -} \ No newline at end of file diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/CommandLineException.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/CommandLineException.java deleted file mode 100644 index 17f2757b4..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/CommandLineException.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.codehaus.plexus.util.cli; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class CommandLineException - extends Exception -{ - public CommandLineException( String message ) - { - super( message ); - } - - public CommandLineException( String message, Throwable cause ) - { - super( message, cause ); - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/CommandLineUtils.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/CommandLineUtils.java deleted file mode 100644 index 99798ce5b..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/CommandLineUtils.java +++ /dev/null @@ -1,282 +0,0 @@ -package org.codehaus.plexus.util.cli; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Properties; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public abstract class CommandLineUtils -{ - private static Map processes = Collections.synchronizedMap( new HashMap() ); - - static - { - Runtime.getRuntime().addShutdownHook( new Thread( "CommandlineUtil shutdown" ) - { - public void run() - { - if ( ( processes != null ) && ( processes.size() > 0 ) ) - { - System.err.println( "Destroying " + processes.size() + " processes" ); - for ( Iterator it = processes.values().iterator(); it.hasNext(); ) - { - System.err.println( "Destroying process.." ); - ( (Process) it.next() ).destroy(); - - } - System.err.println( "Destroyed " + processes.size() + " processes" ); - } - } - } ); - } - - public static class StringStreamConsumer - implements StreamConsumer - { - private StringBuffer string = new StringBuffer(); - - private String ls = System.getProperty( "line.separator" ); - - public void consumeLine( String line ) - { - string.append( line + ls ); - } - - public String getOutput() - { - return string.toString(); - } - } - - public static int executeCommandLine( Commandline cl, StreamConsumer systemOut, StreamConsumer systemErr ) - throws CommandLineException - { - return executeCommandLine( cl, null, systemOut, systemErr ); - } - - public static int executeCommandLine( Commandline cl, InputStream systemIn, StreamConsumer systemOut, - StreamConsumer systemErr ) - throws CommandLineException - { - if ( cl == null ) - { - throw new IllegalArgumentException( "cl cannot be null." ); - } - - Process p; - - p = cl.execute(); - - processes.put( new Long( cl.getPid() ), p ); - - StreamFeeder inputFeeder = null; - - if ( systemIn != null ) - { - inputFeeder = new StreamFeeder( systemIn, p.getOutputStream() ); - } - - StreamPumper outputPumper = new StreamPumper( p.getInputStream(), systemOut ); - - StreamPumper errorPumper = new StreamPumper( p.getErrorStream(), systemErr ); - - if ( inputFeeder != null ) - { - inputFeeder.start(); - } - - outputPumper.start(); - - errorPumper.start(); - - try - { - int returnValue = p.waitFor(); - - if ( inputFeeder != null ) - { - synchronized ( inputFeeder ) - { - if ( !inputFeeder.isDone() ) - { - inputFeeder.wait(); - } - } - } - - synchronized ( outputPumper ) - { - if ( !outputPumper.isDone() ) - { - outputPumper.wait(); - } - } - - synchronized ( errorPumper ) - { - if ( !errorPumper.isDone() ) - { - errorPumper.wait(); - } - } - - processes.remove( new Long( cl.getPid() ) ); - - return returnValue; - } - catch ( InterruptedException ex ) - { - killProcess( cl.getPid() ); - throw new CommandLineException( "Error while executing external command, process killed.", ex ); - } - finally - { - if ( inputFeeder != null ) - { - inputFeeder.close(); - } - - outputPumper.close(); - - errorPumper.close(); - } - } - - public static Properties getSystemEnvVars() - throws IOException - { - return getSystemEnvVars( true ); - } - - /** - * Return the shell environment variables. If caseSensitive == true, then envar - * keys will all be upper-case. - * - * @param caseSensitive Whether environment variable keys should be treated case-sensitively. - * @return Properties object of (possibly modified) envar keys mapped to their values. - * @throws IOException - */ - public static Properties getSystemEnvVars( boolean caseSensitive ) - throws IOException - { - Process p = null; - - Properties envVars = new Properties(); - - Runtime r = Runtime.getRuntime(); - - String os = System.getProperty( "os.name" ).toLowerCase(); - - //If this is windows set the shell to command.com or cmd.exe with correct arguments. - if ( os.indexOf( "windows" ) != -1 ) - { - if ( os.indexOf( "95" ) != -1 || os.indexOf( "98" ) != -1 || os.indexOf( "Me" ) != -1 ) - { - p = r.exec( "command.com /c set" ); - } - else - { - p = r.exec( "cmd.exe /c set" ); - } - } - else - { - p = r.exec( "env" ); - } - - BufferedReader br = new BufferedReader( new InputStreamReader( p.getInputStream() ) ); - - String line; - - String lastKey = null; - String lastVal = null; - - while ( ( line = br.readLine() ) != null ) - { - int idx = line.indexOf( '=' ); - - if ( idx > 1 ) - { - lastKey = line.substring( 0, idx ); - - if ( !caseSensitive ) - { - lastKey = lastKey.toUpperCase(); - } - - lastVal = line.substring( idx + 1 ); - - envVars.setProperty( lastKey, lastVal ); - } - else if ( lastKey != null ) - { - lastVal += "\n" + line; - - envVars.setProperty( lastKey, lastVal ); - } - } - - return envVars; - } - - /** - * Kill a process launched by executeCommandLine methods - * Doesn't work correctly on windows, only the cmd process will be destroy but not the sub process (Bug ID 4770092) - * - * @param pid The pid of command return by Commandline.getPid() - */ - public static void killProcess( long pid ) - { - Process p = (Process) processes.get( new Long( pid ) ); - - if ( p != null ) - { - p.destroy(); - System.out.println( "killed." ); - processes.remove( new Long( pid ) ); - } - else - { - System.out.println( "don't exist." ); - } - } - - public static boolean isAlive( long pid ) - { - return ( processes.get( new Long( pid ) ) != null ); - } - -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/Commandline.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/Commandline.java deleted file mode 100644 index 3591c1acd..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/Commandline.java +++ /dev/null @@ -1,769 +0,0 @@ -package org.codehaus.plexus.util.cli; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/******************************************************************************** - * CruiseControl, a Continuous Integration Toolkit - * Copyright (c) 2001-2003, ThoughtWorks, Inc. - * 651 W Washington Ave. Suite 500 - * Chicago, IL 60661 USA - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * + Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * + Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * - * + Neither the name of ThoughtWorks, Inc., CruiseControl, nor the - * names of its contributors may be used to endorse or promote - * products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ********************************************************************************/ - -/* ==================================================================== - * Copyright 2003-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ==================================================================== - */ - -import org.codehaus.plexus.util.cli.shell.Shell; -import org.codehaus.plexus.util.cli.shell.CmdShell; -import org.codehaus.plexus.util.cli.shell.CommandShell; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; -import java.util.Properties; -import java.util.StringTokenizer; -import java.util.Vector; - -/** - *

- * Commandline objects help handling command lines specifying processes to - * execute. - *

- *

- * The class can be used to define a command line as nested elements or as a - * helper to define a command line by an application. - *

- *

- * - * <someelement>
- *   <acommandline executable="/executable/to/run">
- *     <argument value="argument 1" />
- *     <argument line="argument_1 argument_2 argument_3" />
- *     <argument value="argument 4" />
- *   </acommandline>
- * </someelement>
- *
- *

- *

- * The element someelement must provide a method - * createAcommandline which returns an instance of this class. - *

- * - * @author thomas.haas@softwired-inc.com - * @author Stefan Bodewig - */ -public class Commandline - implements Cloneable -{ - protected static final String OS_NAME = "os.name"; - - protected static final String WINDOWS = "Windows"; - - protected String executable = null; - - protected Vector arguments = new Vector(); - - protected Vector envVars = new Vector(); - - private File workingDir = null; - - private long pid = -1; - - private Shell shell; - - /** - * Create a new command line object. - * Shell is autodetected from operating system - * - * @param toProcess - */ - public Commandline( String toProcess ) - { - super(); - setDefaultShell(); - String[] tmp = new String[0]; - try - { - tmp = translateCommandline( toProcess ); - } - catch ( Exception e ) - { - System.err.println( "Error translating Commandline." ); - } - if ( tmp != null && tmp.length > 0 ) - { - setExecutable( tmp[0] ); - for ( int i = 1; i < tmp.length; i++ ) - { - createArgument().setValue( tmp[i] ); - } - } - } - - /** - * Create a new command line object. - * Shell is autodetected from operating system - */ - public Commandline() - { - super(); - setDefaultShell(); - } - - public long getPid() - { - if ( pid == -1 ) - { - pid = Long.parseLong( String.valueOf( System.currentTimeMillis() ) ); - } - - return pid; - } - - public void setPid( long pid ) - { - this.pid = pid; - } - - /** - * Used for nested xml command line definitions. - */ - public static class Argument - { - - private String[] parts; - - /** - * Sets a single commandline argument. - * - * @param value a single commandline argument. - */ - public void setValue( String value ) - { - if ( value != null ) - { - parts = new String[]{value}; - } - } - - /** - * Line to split into several commandline arguments. - * - * @param line line to split into several commandline arguments - */ - public void setLine( String line ) - { - if ( line == null ) - { - return; - } - try - { - parts = translateCommandline( line ); - } - catch ( Exception e ) - { - System.err.println( "Error translating Commandline." ); - } - } - - /** - * Sets a single commandline argument to the absolute filename - * of the given file. - * - * @param value a single commandline argument. - */ - public void setFile( File value ) - { - parts = new String[]{value.getAbsolutePath()}; - } - - /** - * Returns the parts this Argument consists of. - */ - public String[] getParts() - { - return parts; - } - } - - /** - * Class to keep track of the position of an Argument. - */ - //

This class is there to support the srcfile and targetfile - // elements of <execon> and <transform> - don't know - // whether there might be additional use cases.

--SB - public class Marker - { - - private int position; - - private int realPos = -1; - - Marker( int position ) - { - this.position = position; - } - - /** - * Return the number of arguments that preceeded this marker. - *

- *

The name of the executable - if set - is counted as the - * very first argument.

- */ - public int getPosition() - { - if ( realPos == -1 ) - { - realPos = ( executable == null ? 0 : 1 ); - for ( int i = 0; i < position; i++ ) - { - Argument arg = (Argument) arguments.elementAt( i ); - realPos += arg.getParts().length; - } - } - return realPos; - } - } - - - /** - *

Sets the shell or command-line interpretor for the detected operating system, - * and the shell arguments.

- */ - private void setDefaultShell() - { - String os = System.getProperty( OS_NAME ); - - //If this is windows set the shell to command.com or cmd.exe with correct arguments. - if ( os.indexOf( WINDOWS ) > -1 ) - { - if ( os.indexOf( "95" ) > -1 || os.indexOf( "98" ) > -1 || os.indexOf( "Me" ) > -1 ) - { - setShell( new CommandShell() ); - } - else - { - setShell( new CmdShell() ); - } - } - } - - /** - * Creates an argument object. - *

- *

Each commandline object has at most one instance of the - * argument class. This method calls - * this.createArgument(false).

- * - * @return the argument object. - * @see #createArgument(boolean) - */ - public Argument createArgument() - { - return this.createArgument( false ); - } - - /** - * Creates an argument object and adds it to our list of args. - *

- *

Each commandline object has at most one instance of the - * argument class.

- * - * @param insertAtStart if true, the argument is inserted at the - * beginning of the list of args, otherwise it is appended. - */ - public Argument createArgument( boolean insertAtStart ) - { - Argument argument = new Argument(); - if ( insertAtStart ) - { - arguments.insertElementAt( argument, 0 ); - } - else - { - arguments.addElement( argument ); - } - return argument; - } - - /** - * Sets the executable to run. - */ - public void setExecutable( String executable ) - { - if ( executable == null || executable.length() == 0 ) - { - return; - } - this.executable = executable.replace( '/', File.separatorChar ).replace( '\\', File.separatorChar ); - } - - public String getExecutable() - { - return executable; - } - - public void addArguments( String[] line ) - { - for ( int i = 0; i < line.length; i++ ) - { - createArgument().setValue( line[i] ); - } - } - - /** - * Add an environment variable - */ - public void addEnvironment( String name, - String value ) - { - envVars.add( name + "=" + value ); - } - - /** - * Add system environment variables - */ - public void addSystemEnvironment() - throws Exception - { - Properties envVars = CommandLineUtils.getSystemEnvVars(); - - for ( Iterator i = envVars.keySet().iterator(); i.hasNext(); ) - { - String key = (String) i.next(); - - addEnvironment( key, envVars.getProperty( key ) ); - } - } - - /** - * Return the list of environment variables - */ - public String[] getEnvironmentVariables() - throws CommandLineException - { - try - { - addSystemEnvironment(); - } - catch ( Exception e ) - { - throw new CommandLineException( "Error setting up environmental variables", e ); - } - - return (String[]) envVars.toArray( new String[envVars.size()] ); - } - - /** - * Returns the executable and all defined arguments. - */ - public String[] getCommandline() - { - final String[] args = getArguments(); - if ( executable == null ) - { - return args; - } - final String[] result = new String[args.length + 1]; - result[0] = executable; - System.arraycopy( args, 0, result, 1, args.length ); - return result; - } - - /** - * Returns the shell, executable and all defined arguments. - */ - public String[] getShellCommandline() - { - - if ( getShell() == null ) - { - if ( executable != null ) - { - List commandLine = new ArrayList(); - commandLine.add( executable ); - commandLine.addAll( Arrays.asList( getArguments() ) ); - return (String[]) commandLine.toArray( new String[0] ); - } - else - { - return getArguments(); - } - - } - else - { - return (String[]) getShell().getShellCommandLine( executable, getArguments() ).toArray( new String[0] ); - } - } - - /** - * Returns all arguments defined by addLine, - * addValue or the argument object. - */ - public String[] getArguments() - { - Vector result = new Vector( arguments.size() * 2 ); - for ( int i = 0; i < arguments.size(); i++ ) - { - Argument arg = (Argument) arguments.elementAt( i ); - String[] s = arg.getParts(); - if ( s != null ) - { - for ( int j = 0; j < s.length; j++ ) - { - result.addElement( s[j] ); - } - } - } - - String[] res = new String[result.size()]; - result.copyInto( res ); - return res; - } - - public String toString() - { - return toString( getCommandline() ); - } - - /** - *

Put quotes around the given String if necessary.

- *

If the argument doesn't include spaces or quotes, return it - * as is. If it contains double quotes, use single quotes - else - * surround the argument by double quotes.

- * - * @throws CommandLineException if the argument contains both, single - * and double quotes. - */ - public static String quoteArgument( String argument ) - throws CommandLineException - { - if ( argument.indexOf( "\"" ) > -1 ) - { - if ( argument.indexOf( "\'" ) > -1 ) - { - throw new CommandLineException( "Can't handle single and double quotes in same argument" ); - } - else - { - return '\'' + argument + '\''; - } - } - else if ( argument.indexOf( "\'" ) > -1 || argument.indexOf( " " ) > -1 ) - { - return '\"' + argument + '\"'; - } - else - { - return argument; - } - } - - public static String toString( String[] line ) - { - // empty path return empty string - if ( line == null || line.length == 0 ) - { - return ""; - } - - // path containing one or more elements - final StringBuffer result = new StringBuffer(); - for ( int i = 0; i < line.length; i++ ) - { - if ( i > 0 ) - { - result.append( ' ' ); - } - try - { - result.append( quoteArgument( line[i] ) ); - } - catch ( Exception e ) - { - System.err.println( "Error quoting argument." ); - } - } - return result.toString(); - } - - public static String[] translateCommandline( String toProcess ) - throws Exception - { - if ( toProcess == null || toProcess.length() == 0 ) - { - return new String[0]; - } - - // parse with a simple finite state machine - - final int normal = 0; - final int inQuote = 1; - final int inDoubleQuote = 2; - int state = normal; - StringTokenizer tok = new StringTokenizer( toProcess, "\"\' ", true ); - Vector v = new Vector(); - StringBuffer current = new StringBuffer(); - - while ( tok.hasMoreTokens() ) - { - String nextTok = tok.nextToken(); - switch ( state ) - { - case inQuote: - if ( "\'".equals( nextTok ) ) - { - state = normal; - } - else - { - current.append( nextTok ); - } - break; - case inDoubleQuote: - if ( "\"".equals( nextTok ) ) - { - state = normal; - } - else - { - current.append( nextTok ); - } - break; - default: - if ( "\'".equals( nextTok ) ) - { - state = inQuote; - } - else if ( "\"".equals( nextTok ) ) - { - state = inDoubleQuote; - } - else if ( " ".equals( nextTok ) ) - { - if ( current.length() != 0 ) - { - v.addElement( current.toString() ); - current.setLength( 0 ); - } - } - else - { - current.append( nextTok ); - } - break; - } - } - - if ( current.length() != 0 ) - { - v.addElement( current.toString() ); - } - - if ( state == inQuote || state == inDoubleQuote ) - { - throw new CommandLineException( "unbalanced quotes in " + toProcess ); - } - - String[] args = new String[v.size()]; - v.copyInto( args ); - return args; - } - - public int size() - { - return getCommandline().length; - } - - public Object clone() - { - Commandline c = new Commandline(); - c.setExecutable( executable ); - c.addArguments( getArguments() ); - return c; - } - - /** - * Clear out the whole command line. - */ - public void clear() - { - executable = null; - arguments.removeAllElements(); - } - - /** - * Clear out the arguments but leave the executable in place for another operation. - */ - public void clearArgs() - { - arguments.removeAllElements(); - } - - /** - * Return a marker. - *

- *

This marker can be used to locate a position on the - * commandline - to insert something for example - when all - * parameters have been set.

- */ - public Marker createMarker() - { - return new Marker( arguments.size() ); - } - - /** - * Sets execution directory. - */ - public void setWorkingDirectory( String path ) - { - if ( path != null ) - { - workingDir = new File( path ); - } - } - - public File getWorkingDirectory() - { - return workingDir; - } - - /** - * Executes the command. - */ - public Process execute() - throws CommandLineException - { - Process process; - - //addEnvironment( "MAVEN_TEST_ENVAR", "MAVEN_TEST_ENVAR_VALUE" ); - - String[] environment = getEnvironmentVariables(); - - try - { - if ( workingDir == null ) - { - process = Runtime.getRuntime().exec( getShellCommandline(), environment ); - } - else - { - if ( !workingDir.exists() ) - { - throw new CommandLineException( - "Working directory \"" + workingDir.getPath() + "\" does not exist!" ); - } - else if ( !workingDir.isDirectory() ) - { - throw new CommandLineException( - "Path \"" + workingDir.getPath() + "\" does not specify a directory." ); - } - - process = Runtime.getRuntime().exec( getShellCommandline(), environment, workingDir ); - } - } - catch ( IOException ex ) - { - throw new CommandLineException( "Error while executing process.", ex ); - } - - return process; - } - - public Properties getSystemEnvVars() - throws Exception - { - return CommandLineUtils.getSystemEnvVars(); - } - - /** - * Allows to set the shell to be used in this command line. - * - * @param shell - * @since 1.2 - */ - public void setShell( Shell shell ) - { - this.shell = shell; - } - - /** - * Get the shell to be used in this command line. - * - * @since 1.2 - */ - public Shell getShell() - { - return shell; - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/DefaultConsumer.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/DefaultConsumer.java deleted file mode 100644 index 28cf63be8..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/DefaultConsumer.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.codehaus.plexus.util.cli; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* ==================================================================== - * Copyright 2003-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ==================================================================== - */ - -/** - * @author Emmanuel Venisse - * @version $Id$ - */ -public class DefaultConsumer - implements StreamConsumer -{ - public void consumeLine( String line ) - { - System.out.println( line ); - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/EnhancedStringTokenizer.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/EnhancedStringTokenizer.java deleted file mode 100644 index 0f747fe3d..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/EnhancedStringTokenizer.java +++ /dev/null @@ -1,162 +0,0 @@ -package org.codehaus.plexus.util.cli; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* ==================================================================== - * Copyright 2003-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ==================================================================== - */ - -import java.util.StringTokenizer; - -/** - * The java.util.StringTokenizer is horribly broken. - * Given the string 1,,,3,,4 (, delim) - * It will return 1,3,4 - * Which is clearly wrong - 1,EMPTY,EMPTY,3,EMPTY,4 is what it should return - */ -public final class EnhancedStringTokenizer -{ - private StringTokenizer cst = null; - - String cdelim; - - final boolean cdelimSingleChar; - - final char cdelimChar; - - boolean creturnDelims; - - String lastToken = null; - - boolean delimLast = true; - - public EnhancedStringTokenizer( String str ) - { - this( str, " \t\n\r\f", false ); - } - - public EnhancedStringTokenizer( String str, String delim ) - { - this( str, delim, false ); - } - - public EnhancedStringTokenizer( String str, String delim, boolean returnDelims ) - { - cst = new StringTokenizer( str, delim, true ); - cdelim = delim; - creturnDelims = returnDelims; - cdelimSingleChar = ( delim.length() == 1 ); - cdelimChar = delim.charAt( 0 ); - } - - public boolean hasMoreTokens() - { - return cst.hasMoreTokens(); - } - - private String internalNextToken() - { - if ( lastToken != null ) - { - String last = lastToken; - lastToken = null; - return last; - } - - String token = cst.nextToken(); - if ( isDelim( token ) ) - { - if ( delimLast ) - { - lastToken = token; - return ""; - } - else - { - delimLast = true; - return token; - } - } - else - { - delimLast = false; - return token; - } - } - - public String nextToken() - { - String token = internalNextToken(); - if ( creturnDelims ) - { - return token; - } - if ( isDelim( token ) ) - { - return hasMoreTokens() ? internalNextToken() : ""; - } - else - { - return token; - } - } - - private boolean isDelim( String str ) - { - if ( str.length() == 1 ) - { - char ch = str.charAt( 0 ); - if ( cdelimSingleChar ) - { - if ( cdelimChar == ch ) - { - return true; - } - } - else - { - if ( cdelim.indexOf( ch ) >= 0 ) - { - return true; - } - } - } - return false; - - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/StreamConsumer.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/StreamConsumer.java deleted file mode 100644 index 9e15847e1..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/StreamConsumer.java +++ /dev/null @@ -1,78 +0,0 @@ -package org.codehaus.plexus.util.cli; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/******************************************************************************** - * CruiseControl, a Continuous Integration Toolkit - * Copyright (c) 2003, ThoughtWorks, Inc. - * 651 W Washington Ave. Suite 500 - * Chicago, IL 60661 USA - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * + Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * + Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * - * + Neither the name of ThoughtWorks, Inc., CruiseControl, nor the - * names of its contributors may be used to endorse or promote - * products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ********************************************************************************/ - -/** - * Works in concert with the StreamPumper class to - * allow implementations to gain access to the lines being - * "Pumped". - * - * @author Florin Vancea - * @author Paul Julius - */ -public interface StreamConsumer -{ - /** - * Called when the StreamPumper pumps a line from the Stream. - */ - public void consumeLine( String line ); -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/StreamFeeder.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/StreamFeeder.java deleted file mode 100644 index cf5629505..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/StreamFeeder.java +++ /dev/null @@ -1,151 +0,0 @@ -package org.codehaus.plexus.util.cli; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; - -/** - * Read from an InputStream and write the output to an OutputStream. - * - * @author Trygve Laugstøl - * @version $Id$ - */ -public class StreamFeeder - extends Thread -{ - private InputStream input; - - private OutputStream output; - - private boolean done; - - /** - * Create a new StreamFeeder - * - * @param input Stream to read from - * @param output Stream to write to - */ - public StreamFeeder( InputStream input, OutputStream output ) - { - this.input = input; - - this.output = output; - } - - // ---------------------------------------------------------------------- - // Runnable implementation - // ---------------------------------------------------------------------- - - public void run() - { - try - { - feed(); - } - catch ( Throwable ex ) - { - // Catched everything so the streams will be closed and flagged as done. - } - finally - { - close(); - - done = true; - - synchronized ( this ) - { - this.notifyAll(); - } - } - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - public void close() - { - if ( input != null ) - { - synchronized ( input ) - { - try - { - input.close(); - } - catch ( IOException ex ) - { - // ignore - } - - input = null; - } - } - - if ( output != null ) - { - synchronized ( output ) - { - try - { - output.close(); - } - catch ( IOException ex ) - { - // ignore - } - - output = null; - } - } - } - - public boolean isDone() - { - return done; - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - private void feed() - throws IOException - { - int data = input.read(); - - while ( !done && data != -1 ) - { - synchronized ( output ) - { - output.write( data ); - - data = input.read(); - } - } - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/StreamPumper.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/StreamPumper.java deleted file mode 100644 index c9feded6d..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/StreamPumper.java +++ /dev/null @@ -1,197 +0,0 @@ -package org.codehaus.plexus.util.cli; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/******************************************************************************** - * CruiseControl, a Continuous Integration Toolkit - * Copyright (c) 2001-2003, ThoughtWorks, Inc. - * 651 W Washington Ave. Suite 500 - * Chicago, IL 60661 USA - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * + Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * + Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * - * + Neither the name of ThoughtWorks, Inc., CruiseControl, nor the - * names of its contributors may be used to endorse or promote - * products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ********************************************************************************/ - -/* ==================================================================== - * Copyright 2003-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ==================================================================== - */ - -import org.codehaus.plexus.util.IOUtil; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.PrintWriter; - -/** - * Class to pump the error stream during Process's runtime. Copied from the Ant - * built-in task. - * - * @author Florin Vancea - * @author Paul Julius - * @since June 11, 2001 - */ -public class StreamPumper - extends Thread -{ - private BufferedReader in; - - private StreamConsumer consumer = null; - - private PrintWriter out = null; - - private static final int SIZE = 1024; - - boolean done; - - public StreamPumper( InputStream in ) - { - this.in = new BufferedReader( new InputStreamReader( in ), SIZE ); - } - - public StreamPumper( InputStream in, StreamConsumer consumer ) - { - this( in ); - - this.consumer = consumer; - } - - public StreamPumper( InputStream in, PrintWriter writer ) - { - this( in ); - - out = writer; - } - - public StreamPumper( InputStream in, PrintWriter writer, StreamConsumer consumer ) - { - this( in ); - this.out = writer; - this.consumer = consumer; - } - - public void run() - { - try - { - String s = in.readLine(); - - while ( s != null ) - { - consumeLine( s ); - - if ( out != null ) - { - out.println( s ); - - out.flush(); - } - - s = in.readLine(); - } - } - catch ( Throwable e ) - { - // Catched everything so the streams will be closed and flagged as done. - } - finally - { - IOUtil.close( in ); - - done = true; - - synchronized ( this ) - { - this.notifyAll(); - } - } - } - - public void flush() - { - if ( out != null ) - { - out.flush(); - } - } - - public void close() - { - IOUtil.close( out ); - } - - public boolean isDone() - { - return done; - } - - private void consumeLine( String line ) - { - if ( consumer != null ) - { - consumer.consumeLine( line ); - } - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/WriterStreamConsumer.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/WriterStreamConsumer.java deleted file mode 100644 index 6b03c96bc..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/WriterStreamConsumer.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -package org.codehaus.plexus.util.cli; - -import java.io.PrintWriter; -import java.io.Writer; - -/** - * @author Jason van Zyl - * @version $Id:$ - */ -public class WriterStreamConsumer - implements StreamConsumer -{ - private PrintWriter writer; - - public WriterStreamConsumer( Writer writer ) - { - this.writer = new PrintWriter( writer ); - } - - public void consumeLine( String line ) - { - writer.println( line ); - - writer.flush(); - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/shell/BourneShell.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/shell/BourneShell.java deleted file mode 100644 index a7fc4e025..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/shell/BourneShell.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.codehaus.plexus.util.cli.shell; - -/** - * @author Jason van Zyl - */ -public class BourneShell - extends Shell -{ - public BourneShell() - { - setShellCommand( "/bin/sh" ); - setShellArgs( new String[]{"-c"} ); - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/shell/CmdShell.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/shell/CmdShell.java deleted file mode 100644 index bf3cc1d2f..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/shell/CmdShell.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.codehaus.plexus.util.cli.shell; - -import java.util.Arrays; -import java.util.List; - -/* - * Copyright 2001-2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - *

- * Implementation to call the CMD Shell present on Windows NT, 2000 and XP - *

- * - * @author Carlos Sanchez - * @since 1.2 - */ -public class CmdShell - extends Shell -{ - public CmdShell() - { - setShellCommand( "cmd.exe" ); - setShellArgs( new String[]{"/X", "/C"} ); - } - - /** - * Specific implementation that quotes the all the command line - */ - public List getCommandLine( String executable, String[] arguments ) - { - StringBuffer sb = new StringBuffer(); - sb.append( "\"" ); - sb.append( super.getCommandLine( executable, arguments ).get( 0 ) ); - sb.append( "\"" ); - - return Arrays.asList( new String[]{sb.toString()} ); - } - -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/shell/CommandShell.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/shell/CommandShell.java deleted file mode 100644 index 42411f352..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/shell/CommandShell.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.plexus.util.cli.shell; - -/* - * Copyright 2001-2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - *

- * Implementation to call the Command.com Shell present on Windows 95, 98 and Me - *

- * - * @author Carlos Sanchez - * @since 1.2 - */ -public class CommandShell - extends Shell -{ - public CommandShell() - { - setShellCommand( "command.com" ); - setShellArgs( new String[]{"/C"} ); - } - -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java deleted file mode 100644 index 4d46a01e9..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java +++ /dev/null @@ -1,151 +0,0 @@ -package org.codehaus.plexus.util.cli.shell; - -/* - * Copyright 2001-2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.util.cli.CommandLineException; -import org.codehaus.plexus.util.cli.Commandline; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -/** - *

- * Class that abstracts the Shell functionality, - * with subclases for shells that behave particularly, like - *

    - *
  • command.com
  • - *
  • cmd.exe
  • - *
- *

- * - * @author Carlos Sanchez - * @since 1.2 - */ -public class Shell -{ - private String shellCommand; - - private String[] shellArgs; - - /** - * Set the command to execute the shell (eg. COMMAND.COM, /bin/bash,...) - * - * @param shellCommand - */ - public void setShellCommand( String shellCommand ) - { - this.shellCommand = shellCommand; - } - - /** - * Get the command to execute the shell - * - * @return - */ - public String getShellCommand() - { - return shellCommand; - } - - /** - * Set the shell arguments when calling a command line (not the executable arguments) - * (eg. /X /C for CMD.EXE) - * - * @param shellArgs - */ - public void setShellArgs( String[] shellArgs ) - { - this.shellArgs = shellArgs; - } - - /** - * Get the shell arguments - * - * @return - */ - public String[] getShellArgs() - { - return shellArgs; - } - - /** - * Get the command line for the provided executable and arguments in this shell - * - * @param executable executable that the shell has to call - * @param arguments arguments for the executable, not the shell - * @return List with one String object with executable and arguments quoted as needed - */ - public List getCommandLine( String executable, String[] arguments ) - { - - List commandLine = new ArrayList(); - try - { - StringBuffer sb = new StringBuffer(); - - if ( executable != null ) - { - sb.append( Commandline.quoteArgument( executable ) ); - } - for ( int i = 0; i < arguments.length; i++ ) - { - sb.append( " " ); - sb.append( Commandline.quoteArgument( arguments[i] ) ); - } - - commandLine.add( sb.toString() ); - } - catch ( CommandLineException e ) - { - throw new RuntimeException( e ); - } - - return commandLine; - } - - /** - * Get the full command line to execute, including shell command, shell arguments, - * executable and executable arguments - * - * @param executable executable that the shell has to call - * @param arguments arguments for the executable, not the shell - * @return List of String objects, whose array version is suitable to be used as argument - * of Runtime.getRuntime().exec() - */ - public List getShellCommandLine( String executable, String[] arguments ) - { - - List commandLine = new ArrayList(); - - if ( getShellCommand() != null ) - { - commandLine.add( getShellCommand() ); - } - - if ( getShellArgs() != null ) - { - commandLine.addAll( Arrays.asList( getShellArgs() ) ); - } - - commandLine.addAll( getCommandLine( executable, arguments ) ); - - return commandLine; - - } - -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/dag/CycleDetectedException.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/dag/CycleDetectedException.java deleted file mode 100644 index f98a42543..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/dag/CycleDetectedException.java +++ /dev/null @@ -1,102 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1997-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software - * itself, if and wherever such third-party acknowledgments - * normally appear. - * - * 4. The names "Jakarta", "Avalon", and "Apache Software Foundation" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ -package org.codehaus.plexus.util.dag; - -import java.util.Iterator; -import java.util.List; - -public class CycleDetectedException - extends Exception -{ - private List cycle; - - public CycleDetectedException( final String message, final List cycle ) - { - super( message ); - - this.cycle = cycle; - - } - - - public List getCycle() - { - return cycle; - } - - /** - * @return - */ - public String cycleToString() - { - final StringBuffer buffer = new StringBuffer(); - - for ( Iterator iterator = cycle.iterator(); iterator.hasNext(); ) - { - buffer.append( iterator.next() ); - - if ( iterator.hasNext() ) - { - buffer.append( " --> " ); - } - } - return buffer.toString(); - } - - public String getMessage() - { - return super.getMessage() + " " + cycleToString(); - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/dag/CycleDetector.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/dag/CycleDetector.java deleted file mode 100644 index c6f95c36e..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/dag/CycleDetector.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Created on 2003-09-21 - * - * To change the template for this generated file go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -package org.codehaus.plexus.util.dag; - -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -/** - * @author Michal Maczka - * @version $Id$ - */ -public class CycleDetector -{ - - private final static Integer NOT_VISTITED = new Integer( 0 ); - - private final static Integer VISITING = new Integer( 1 ); - - private final static Integer VISITED = new Integer( 2 ); - - - public static List hasCycle( final DAG graph ) - { - final List verticies = graph.getVerticies(); - - final Map vertexStateMap = new HashMap(); - - List retValue = null; - - for ( final Iterator iter = verticies.iterator(); iter.hasNext(); ) - { - final Vertex vertex = ( Vertex ) iter.next(); - - if ( isNotVisited( vertex, vertexStateMap ) ) - { - retValue = introducesCycle( vertex, vertexStateMap ); - - if ( retValue != null ) - { - break; - } - } - } - - return retValue; - - } - - - /** - * This method will be called when an egde leading to given vertex was added - * and we want to check if introduction of this edge has not resulted - * in apparition of cycle in the graph - * - * @param vertex - * @param vertexStateMap - * @return - */ - public static List introducesCycle( final Vertex vertex, final Map vertexStateMap ) - { - final LinkedList cycleStack = new LinkedList(); - - final boolean hasCycle = dfsVisit( vertex, cycleStack, vertexStateMap ); - - if ( hasCycle ) - { - // we have a situation like: [b, a, c, d, b, f, g, h]. - // Label of Vertex which introduced the cycle is at the first position in the list - // We have to find second occurence of this label and use its position in the list - // for getting the sublist of vertex labels of cycle paricipants - // - // So in our case we are seraching for [b, a, c, d, b] - final String label = ( String ) cycleStack.getFirst(); - - final int pos = cycleStack.lastIndexOf( label ); - - final List cycle = cycleStack.subList( 0, pos + 1 ); - - Collections.reverse( cycle ); - - return cycle; - } - - return null; - } - - - public static List introducesCycle( final Vertex vertex ) - { - - final Map vertexStateMap = new HashMap(); - - return introducesCycle( vertex, vertexStateMap ); - - } - - /** - * @param vertex - * @param vertexStateMap - * @return - */ - private static boolean isNotVisited( final Vertex vertex, final Map vertexStateMap ) - { - if ( !vertexStateMap.containsKey( vertex ) ) - { - return true; - } - - final Integer state = ( Integer ) vertexStateMap.get( vertex ); - - return NOT_VISTITED.equals( state ); - } - - /** - * @param vertex - * @param vertexStateMap - * @return - */ - private static boolean isVisiting( final Vertex vertex, final Map vertexStateMap ) - { - final Integer state = ( Integer ) vertexStateMap.get( vertex ); - - return VISITING.equals( state ); - } - - private static boolean dfsVisit( final Vertex vertex, final LinkedList cycle, final Map vertexStateMap ) - { - cycle.addFirst( vertex.getLabel() ); - - vertexStateMap.put( vertex, VISITING ); - - final List verticies = vertex.getChildren(); - - for ( final Iterator iter = verticies.iterator(); iter.hasNext(); ) - { - final Vertex v = ( Vertex ) iter.next(); - - if ( isNotVisited( v, vertexStateMap ) ) - { - final boolean hasCycle = dfsVisit( v, cycle, vertexStateMap ); - - if ( hasCycle ) - { - return true; - } - } - else if ( isVisiting( v, vertexStateMap ) ) - { - cycle.addFirst( v.getLabel() ); - - return true; - } - } - vertexStateMap.put( vertex, VISITED ); - - cycle.removeFirst(); - - return false; - - } - - - -} \ No newline at end of file diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/dag/DAG.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/dag/DAG.java deleted file mode 100644 index 02dfa8e6f..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/dag/DAG.java +++ /dev/null @@ -1,250 +0,0 @@ -package org.codehaus.plexus.util.dag; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - -/** - * DAG = Directed Acyclic Graph - * - * @author Michal Maczka - * @version $Id$ - * @todo this class should be reanmed from DAG to Dag - */ -public class DAG implements Cloneable, Serializable -{ - //------------------------------------------------------------ - //Fields - //------------------------------------------------------------ - /** - * Nodes will be kept in two data strucures at the same time - * for faster processing - */ - /** - * Maps vertex's label to vertex - */ - private Map vertexMap = new HashMap(); - - /** - * Conatin list of all verticies - */ - private List vertexList = new ArrayList(); - - // ------------------------------------------------------------ - // Constructors - // ------------------------------------------------------------ - - /** - * - */ - public DAG() - { - super(); - } - - // ------------------------------------------------------------ - // Accessors - // ------------------------------------------------------------ - - /** - * @return - */ - public List getVerticies() - { - return vertexList; - } - - - public Set getLabels() - { - final Set retValue = vertexMap.keySet(); - - return retValue; - } - - // ------------------------------------------------------------ - // Implementation - // ------------------------------------------------------------ - - /** - * Adds vertex to DAG. If vertex of given label alredy exist in DAG - * no vertex is added - * - * @param label The lable of the Vertex - * @return New vertex if vertext of given label was not presenst in the DAG - * or exising vertex if vertex of given labale was alredy added to DAG - */ - public Vertex addVertex( final String label ) - { - Vertex retValue = null; - - // check if vertex is alredy in DAG - if ( vertexMap.containsKey( label ) ) - { - retValue = ( Vertex ) vertexMap.get( label ); - } - else - { - retValue = new Vertex( label ); - - vertexMap.put( label, retValue ); - - vertexList.add( retValue ); - } - - return retValue; - } - - public void addEdge( final String from, final String to ) throws CycleDetectedException - { - final Vertex v1 = addVertex( from ); - - final Vertex v2 = addVertex( to ); - - addEdge( v1, v2 ); - } - - public void addEdge( final Vertex from, final Vertex to ) throws CycleDetectedException - { - - from.addEdgeTo( to ); - - to.addEdgeFrom( from ); - - final List cycle = CycleDetector.introducesCycle( to ); - - if ( cycle != null ) - { - // remove edge which introduced cycle - - removeEdge( from, to ); - - final String msg = "Edge between '" + from + "' and '" + to + "' introduces to cycle in the graph"; - - throw new CycleDetectedException( msg, cycle ); - } - } - - - public void removeEdge( final String from, final String to ) - { - final Vertex v1 = addVertex( from ); - - final Vertex v2 = addVertex( to ); - - removeEdge( v1, v2 ); - } - - public void removeEdge( final Vertex from, final Vertex to ) - { - from.removeEdgeTo( to ); - - to.removeEdgeFrom( from ); - } - - - public Vertex getVertex( final String label ) - { - final Vertex retValue = ( Vertex ) vertexMap.get( label ); - - return retValue; - } - - public boolean hasEdge( final String label1, final String label2 ) - { - final Vertex v1 = getVertex( label1 ); - - final Vertex v2 = getVertex( label2 ); - - final boolean retValue = v1.getChildren().contains( v2 ); - - return retValue; - - } - - /** - * @param label - * @return - */ - public List getChildLabels( final String label ) - { - final Vertex vertex = getVertex( label ); - - return vertex.getChildLabels(); - } - - /** - * @param label - * @return - */ - public List getParentLabels( final String label ) - { - final Vertex vertex = getVertex( label ); - - return vertex.getParentLabels(); - } - - - /** - * @see java.lang.Object#clone() - */ - public Object clone() throws CloneNotSupportedException - { - // this is what's failing.. - final Object retValue = super.clone(); - - return retValue; - } - - - /** - * Indicates if there is at least one edge leading to or from vertex of given label - * - * @return true if this vertex is connected with other vertex,false otherwise - */ - public boolean isConnected( final String label ) - { - final Vertex vertex = getVertex( label ); - - final boolean retValue = vertex.isConnected(); - - return retValue; - - } - - - /** - * Return the list of labels of successor in order decided by topological sort - * - * @param label The label of the vertex whose predessors are serched - * - * @return The list of labels. Returned list contains also - * the label passed as parameter to this method. This label should - * always be the last item in the list. - */ - public List getSuccessorLabels( final String label ) - { - final Vertex vertex = getVertex( label ); - - final List retValue; - - //optimization. - if ( vertex.isLeaf() ) - { - retValue = new ArrayList( 1 ); - - retValue.add( label ); - } - else - { - retValue = TopologicalSorter.sort( vertex ); - } - - return retValue; - } - - -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/dag/TopologicalSorter.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/dag/TopologicalSorter.java deleted file mode 100644 index 116968bf5..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/dag/TopologicalSorter.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Created on 2003-09-21 - * - * To change the template for this generated file go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -package org.codehaus.plexus.util.dag; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -/** - * @author Michal Maczka - * @version $Id$ - */ -public class TopologicalSorter -{ - - private final static Integer NOT_VISTITED = new Integer( 0 ); - - private final static Integer VISITING = new Integer( 1 ); - - private final static Integer VISITED = new Integer( 2 ); - - /** - * @param graph - * @return List of String (vertex labels) - */ - - public static List sort( final DAG graph ) - { - return dfs( graph ); - } - - public static List sort( final Vertex vertex ) - { - // we need to use addFirst method so we will use LinkedList explicitly - final LinkedList retValue = new LinkedList(); - - final Map vertexStateMap = new HashMap(); - - dfsVisit( vertex, vertexStateMap, retValue ); - - return retValue; - } - - - private static List dfs( final DAG graph ) - { - final List verticies = graph.getVerticies(); - - // we need to use addFirst method so we will use LinkedList explicitly - final LinkedList retValue = new LinkedList(); - - final Map vertexStateMap = new HashMap(); - - for ( final Iterator iter = verticies.iterator(); iter.hasNext(); ) - { - final Vertex vertex = ( Vertex ) iter.next(); - - if ( isNotVisited( vertex, vertexStateMap ) ) - { - dfsVisit( vertex, vertexStateMap, retValue ); - } - } - - return retValue; - } - - /** - * @param vertex - * @param vertexStateMap - * @return - */ - private static boolean isNotVisited( final Vertex vertex, final Map vertexStateMap ) - { - if ( !vertexStateMap.containsKey( vertex ) ) - { - return true; - } - final Integer state = ( Integer ) vertexStateMap.get( vertex ); - - return NOT_VISTITED.equals( state ); - } - - - private static void dfsVisit( final Vertex vertex, final Map vertexStateMap, final LinkedList list ) - { - vertexStateMap.put( vertex, VISITING ); - - final List verticies = vertex.getChildren(); - - for ( final Iterator iter = verticies.iterator(); iter.hasNext(); ) - { - final Vertex v = ( Vertex ) iter.next(); - - if ( isNotVisited( v, vertexStateMap ) ) - { - dfsVisit( v, vertexStateMap, list ); - } - } - - vertexStateMap.put( vertex, VISITED ); - - list.add( vertex.getLabel() ); - } - -} - diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/dag/Vertex.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/dag/Vertex.java deleted file mode 100644 index 6c7f067e7..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/dag/Vertex.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Created on 2003-09-21 - * - * To change the template for this generated file go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -package org.codehaus.plexus.util.dag; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -/** - * @author Michal Maczka - * @version $Id$ - */ -public class Vertex implements Cloneable, Serializable -{ - //------------------------------------------------------------ - //Fields - //------------------------------------------------------------ - private String label = null; - - List children = new ArrayList(); - - List parents = new ArrayList(); - - - // ------------------------------------------------------------ - // Constructors - // ------------------------------------------------------------ - - /** - * - */ - public Vertex( final String label ) - { - this.label = label; - } - - // ------------------------------------------------------------ - // Accessors - // ------------------------------------------------------------ - - - /** - * @return - */ - public String getLabel() - { - return label; - } - - /** - * @param vertex - */ - public void addEdgeTo( final Vertex vertex ) - { - children.add( vertex ); - } - - - /** - * @param vertex - */ - public void removeEdgeTo( final Vertex vertex ) - { - children.remove( vertex ); - } - - - /** - * @param vertex - */ - public void addEdgeFrom( final Vertex vertex ) - { - parents.add( vertex ); - } - - public void removeEdgeFrom( final Vertex vertex ) - { - - parents.remove( vertex ); - - } - - - public List getChildren() - { - return children; - } - - - /** - * Get the labels used by the most direct children. - * - * @return the labels used by the most direct children. - */ - public List getChildLabels() - { - final List retValue = new ArrayList( children.size() ); - - for ( final Iterator iter = children.iterator(); iter.hasNext(); ) - { - final Vertex vertex = ( Vertex ) iter.next(); - - retValue.add( vertex.getLabel() ); - } - return retValue; - } - - - /** - * Get the list the most direct ancestors (parents). - * - * @return list of parents - */ - public List getParents() - { - return parents; - } - - - /** - * Get the labels used by the most direct ancestors (parents). - * - * @return the labels used parents - */ - public List getParentLabels() - { - final List retValue = new ArrayList( parents.size() ); - - for ( final Iterator iter = parents.iterator(); iter.hasNext(); ) - { - final Vertex vertex = ( Vertex ) iter.next(); - - retValue.add( vertex.getLabel() ); - } - return retValue; - } - - - /** - * Indicates if given vertex has no child - * - * @return true if this vertex has no child, false otherwise - */ - public boolean isLeaf() - { - return children.size() == 0; - } - - - /** - * Indicates if given vertex has no parent - * - * @return true if this vertex has no parent, false otherwise - */ - public boolean isRoot() - { - return parents.size() == 0; - } - - - /** - * Indicates if there is at least one edee leading to or from given vertex - * - * @return true if this vertex is connected with other vertex,false otherwise - */ - public boolean isConnected() - { - return isRoot() || isLeaf(); - } - - - public Object clone() throws CloneNotSupportedException - { - // this is what's failing.. - final Object retValue = super.clone(); - - return retValue; - } - - public String toString() - { - return "Vertex{" + - "label='" + label + "'" + - "}"; - } - - -} - diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/interpolation/EnvarBasedValueSource.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/interpolation/EnvarBasedValueSource.java deleted file mode 100644 index 33aab8839..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/interpolation/EnvarBasedValueSource.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.codehaus.plexus.util.interpolation; - -import org.codehaus.plexus.util.cli.CommandLineUtils; - -import java.io.IOException; -import java.util.Properties; - -public class EnvarBasedValueSource - implements ValueSource -{ - - private Properties envars; - private final boolean caseSensitive; - - /** - * Create a new value source for interpolation based on shell environment variables. In this - * case, envar keys ARE CASE SENSITIVE. - * - * @throws IOException - */ - public EnvarBasedValueSource() throws IOException - { - this( true ); - } - - /** - * Create a new value source for interpolation based on shell environment variables. - * - * @param caseSensitive Whether the environment variable key should be treated in a - * case-sensitive manner for lookups - * @throws IOException - */ - public EnvarBasedValueSource( boolean caseSensitive ) throws IOException - { - this.caseSensitive = caseSensitive; - - envars = CommandLineUtils.getSystemEnvVars( caseSensitive ); - } - - public Object getValue( String expression ) - { - String expr = expression; - - if ( expr.startsWith( "env." ) ) - { - expr = expr.substring( "env.".length() ); - } - - if ( !caseSensitive ) - { - expr = expr.toUpperCase(); - } - - return envars.getProperty( expr ); - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/interpolation/MapBasedValueSource.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/interpolation/MapBasedValueSource.java deleted file mode 100644 index 097cbc174..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/interpolation/MapBasedValueSource.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.codehaus.plexus.util.interpolation; - -import java.util.Map; - - -public class MapBasedValueSource - implements ValueSource -{ - - private final Map values; - - public MapBasedValueSource( Map values ) - { - this.values = values; - } - - public Object getValue( String expression ) - { - return values.get( expression ); - } - -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/interpolation/ObjectBasedValueSource.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/interpolation/ObjectBasedValueSource.java deleted file mode 100644 index cefd0fe7b..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/interpolation/ObjectBasedValueSource.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.codehaus.plexus.util.interpolation; - -import org.codehaus.plexus.util.introspection.ReflectionValueExtractor; - - -public class ObjectBasedValueSource - implements ValueSource -{ - - private final Object root; - - public ObjectBasedValueSource( Object root ) - { - this.root = root; - } - - public Object getValue( String expression ) - { - try - { - return ReflectionValueExtractor.evaluate( expression, root, false ); - } - catch ( Exception e ) - { - return null; - } - } - -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/interpolation/RegexBasedInterpolator.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/interpolation/RegexBasedInterpolator.java deleted file mode 100644 index 4f14c82a8..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/interpolation/RegexBasedInterpolator.java +++ /dev/null @@ -1,81 +0,0 @@ -package org.codehaus.plexus.util.interpolation; - -import org.codehaus.plexus.util.StringUtils; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - - -public class RegexBasedInterpolator -{ - - private List valueSources; - - public RegexBasedInterpolator() - { - valueSources = new ArrayList(); - } - - public RegexBasedInterpolator( List valueSources ) - { - this.valueSources = new ArrayList( valueSources ); - } - - public void addValueSource( ValueSource valueSource ) - { - this.valueSources.add( valueSource ); - } - - public void removeValuesSource( ValueSource valueSource ) - { - this.valueSources.remove( valueSource ); - } - - public String interpolate( String input, String thisPrefixPattern ) - { - String result = input; - - Pattern expressionPattern = Pattern.compile( "\\$\\{(" + thisPrefixPattern + ")?([^}]+)\\}" ); - Matcher matcher = expressionPattern.matcher( result ); - - while ( matcher.find() ) - { - String wholeExpr = matcher.group( 0 ); - String realExpr = matcher.group( 2 ); - - if ( realExpr.startsWith( "." ) ) - { - realExpr = realExpr.substring( 1 ); - } - - Object value = null; - for ( Iterator it = valueSources.iterator(); it.hasNext() && value == null; ) - { - ValueSource vs = (ValueSource) it.next(); - - value = vs.getValue( realExpr ); - } - - // if the expression refers to itself, die. - if ( wholeExpr.equals( value ) ) - { - throw new IllegalArgumentException( "Expression: \'" + wholeExpr + "\' references itself." ); - } - - if ( value != null ) - { - result = StringUtils.replace( result, wholeExpr, String.valueOf( value ) ); - // could use: - // result = matcher.replaceFirst( stringValue ); - // but this could result in multiple lookups of stringValue, and replaceAll is not correct behaviour - matcher.reset( result ); - } - } - - return result; - } - -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/interpolation/ValueSource.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/interpolation/ValueSource.java deleted file mode 100644 index b2efc4944..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/interpolation/ValueSource.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.codehaus.plexus.util.interpolation; - - -public interface ValueSource -{ - - /** - * @return the value related to the expression, or null if not found. - */ - public Object getValue( String expression ); - -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/introspection/ClassMap.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/introspection/ClassMap.java deleted file mode 100644 index 558f9e85f..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/introspection/ClassMap.java +++ /dev/null @@ -1,520 +0,0 @@ -package org.codehaus.plexus.util.introspection; - -/* ==================================================================== - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ==================================================================== - */ - -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.util.Hashtable; -import java.util.Map; - -/** - * A cache of introspection information for a specific class instance. - * Keys {@link java.lang.Method} objects by a concatenation of the - * method name and the names of classes that make up the parameters. - * - * @author Jason van Zyl - * @author Bob McWhirter - * @author Attila Szegedi - * @author Geir Magnusson Jr. - * @version $Id$ - */ -public class ClassMap -{ - private static final class CacheMiss - { - } - - private static final CacheMiss CACHE_MISS = new CacheMiss(); - private static final Object OBJECT = new Object(); - - /** - * Class passed into the constructor used to as - * the basis for the Method map. - */ - - private Class clazz; - - /** - * Cache of Methods, or CACHE_MISS, keyed by method - * name and actual arguments used to find it. - */ - private Map methodCache = new Hashtable(); - - private MethodMap methodMap = new MethodMap(); - - /** - * Standard constructor - */ - public ClassMap( Class clazz ) - { - this.clazz = clazz; - populateMethodCache(); - } - - /** - * @return the class object whose methods are cached by this map. - */ - Class getCachedClass() - { - return clazz; - } - - /** - * Find a Method using the methodKey - * provided. - *

- * Look in the methodMap for an entry. If found, - * it'll either be a CACHE_MISS, in which case we - * simply give up, or it'll be a Method, in which - * case, we return it. - *

- * If nothing is found, then we must actually go - * and introspect the method from the MethodMap. - */ - public Method findMethod( String name, Object[] params ) - throws MethodMap.AmbiguousException - { - String methodKey = makeMethodKey( name, params ); - Object cacheEntry = methodCache.get( methodKey ); - - if ( cacheEntry == CACHE_MISS ) - { - return null; - } - - if ( cacheEntry == null ) - { - try - { - cacheEntry = methodMap.find( name, - params ); - } - catch ( MethodMap.AmbiguousException ae ) - { - /* - * that's a miss :) - */ - - methodCache.put( methodKey, - CACHE_MISS ); - - throw ae; - } - - if ( cacheEntry == null ) - { - methodCache.put( methodKey, - CACHE_MISS ); - } - else - { - methodCache.put( methodKey, - cacheEntry ); - } - } - - // Yes, this might just be null. - - return (Method) cacheEntry; - } - - /** - * Populate the Map of direct hits. These - * are taken from all the public methods - * that our class provides. - */ - private void populateMethodCache() - { - StringBuffer methodKey; - - /* - * get all publicly accessible methods - */ - - Method[] methods = getAccessibleMethods( clazz ); - - /* - * map and cache them - */ - - for ( int i = 0; i < methods.length; i++ ) - { - Method method = methods[i]; - - /* - * now get the 'public method', the method declared by a - * public interface or class. (because the actual implementing - * class may be a facade... - */ - - Method publicMethod = getPublicMethod( method ); - - /* - * it is entirely possible that there is no public method for - * the methods of this class (i.e. in the facade, a method - * that isn't on any of the interfaces or superclass - * in which case, ignore it. Otherwise, map and cache - */ - - if ( publicMethod != null ) - { - methodMap.add( publicMethod ); - methodCache.put( makeMethodKey( publicMethod ), publicMethod ); - } - } - } - - /** - * Make a methodKey for the given method using - * the concatenation of the name and the - * types of the method parameters. - */ - private String makeMethodKey( Method method ) - { - Class[] parameterTypes = method.getParameterTypes(); - - StringBuffer methodKey = new StringBuffer( method.getName() ); - - for ( int j = 0; j < parameterTypes.length; j++ ) - { - /* - * If the argument type is primitive then we want - * to convert our primitive type signature to the - * corresponding Object type so introspection for - * methods with primitive types will work correctly. - */ - if ( parameterTypes[j].isPrimitive() ) - { - if ( parameterTypes[j].equals( Boolean.TYPE ) ) - methodKey.append( "java.lang.Boolean" ); - else if ( parameterTypes[j].equals( Byte.TYPE ) ) - methodKey.append( "java.lang.Byte" ); - else if ( parameterTypes[j].equals( Character.TYPE ) ) - methodKey.append( "java.lang.Character" ); - else if ( parameterTypes[j].equals( Double.TYPE ) ) - methodKey.append( "java.lang.Double" ); - else if ( parameterTypes[j].equals( Float.TYPE ) ) - methodKey.append( "java.lang.Float" ); - else if ( parameterTypes[j].equals( Integer.TYPE ) ) - methodKey.append( "java.lang.Integer" ); - else if ( parameterTypes[j].equals( Long.TYPE ) ) - methodKey.append( "java.lang.Long" ); - else if ( parameterTypes[j].equals( Short.TYPE ) ) - methodKey.append( "java.lang.Short" ); - } - else - { - methodKey.append( parameterTypes[j].getName() ); - } - } - - return methodKey.toString(); - } - - private static String makeMethodKey( String method, Object[] params ) - { - StringBuffer methodKey = new StringBuffer().append( method ); - - for ( int j = 0; j < params.length; j++ ) - { - Object arg = params[j]; - - if ( arg == null ) - { - arg = OBJECT; - } - - methodKey.append( arg.getClass().getName() ); - } - - return methodKey.toString(); - } - - /** - * Retrieves public methods for a class. In case the class is not - * public, retrieves methods with same signature as its public methods - * from public superclasses and interfaces (if they exist). Basically - * upcasts every method to the nearest acccessible method. - */ - private static Method[] getAccessibleMethods( Class clazz ) - { - Method[] methods = clazz.getMethods(); - - /* - * Short circuit for the (hopefully) majority of cases where the - * clazz is public - */ - - if ( Modifier.isPublic( clazz.getModifiers() ) ) - { - return methods; - } - - /* - * No luck - the class is not public, so we're going the longer way. - */ - - MethodInfo[] methodInfos = new MethodInfo[methods.length]; - - for ( int i = methods.length; i-- > 0; ) - { - methodInfos[i] = new MethodInfo( methods[i] ); - } - - int upcastCount = getAccessibleMethods( clazz, methodInfos, 0 ); - - /* - * Reallocate array in case some method had no accessible counterpart. - */ - - if ( upcastCount < methods.length ) - { - methods = new Method[upcastCount]; - } - - int j = 0; - for ( int i = 0; i < methodInfos.length; ++i ) - { - MethodInfo methodInfo = methodInfos[i]; - if ( methodInfo.upcast ) - { - methods[j++] = methodInfo.method; - } - } - return methods; - } - - /** - * Recursively finds a match for each method, starting with the class, and then - * searching the superclass and interfaces. - * - * @param clazz Class to check - * @param methodInfos array of methods we are searching to match - * @param upcastCount current number of methods we have matched - * @return count of matched methods - */ - private static int getAccessibleMethods( Class clazz, MethodInfo[] methodInfos, int upcastCount ) - { - int l = methodInfos.length; - - /* - * if this class is public, then check each of the currently - * 'non-upcasted' methods to see if we have a match - */ - - if ( Modifier.isPublic( clazz.getModifiers() ) ) - { - for ( int i = 0; i < l && upcastCount < l; ++i ) - { - try - { - MethodInfo methodInfo = methodInfos[i]; - - if ( !methodInfo.upcast ) - { - methodInfo.tryUpcasting( clazz ); - upcastCount++; - } - } - catch ( NoSuchMethodException e ) - { - /* - * Intentionally ignored - it means - * it wasn't found in the current class - */ - } - } - - /* - * Short circuit if all methods were upcast - */ - - if ( upcastCount == l ) - { - return upcastCount; - } - } - - /* - * Examine superclass - */ - - Class superclazz = clazz.getSuperclass(); - - if ( superclazz != null ) - { - upcastCount = getAccessibleMethods( superclazz, methodInfos, upcastCount ); - - /* - * Short circuit if all methods were upcast - */ - - if ( upcastCount == l ) - { - return upcastCount; - } - } - - /* - * Examine interfaces. Note we do it even if superclazz == null. - * This is redundant as currently java.lang.Object does not implement - * any interfaces, however nothing guarantees it will not in future. - */ - - Class[] interfaces = clazz.getInterfaces(); - - for ( int i = interfaces.length; i-- > 0; ) - { - upcastCount = getAccessibleMethods( interfaces[i], methodInfos, upcastCount ); - - /* - * Short circuit if all methods were upcast - */ - - if ( upcastCount == l ) - { - return upcastCount; - } - } - - return upcastCount; - } - - /** - * For a given method, retrieves its publicly accessible counterpart. - * This method will look for a method with same name - * and signature declared in a public superclass or implemented interface of this - * method's declaring class. This counterpart method is publicly callable. - * - * @param method a method whose publicly callable counterpart is requested. - * @return the publicly callable counterpart method. Note that if the parameter - * method is itself declared by a public class, this method is an identity - * function. - */ - public static Method getPublicMethod( Method method ) - { - Class clazz = method.getDeclaringClass(); - - /* - * Short circuit for (hopefully the majority of) cases where the declaring - * class is public. - */ - - if ( ( clazz.getModifiers() & Modifier.PUBLIC ) != 0 ) - { - return method; - } - - return getPublicMethod( clazz, method.getName(), method.getParameterTypes() ); - } - - /** - * Looks up the method with specified name and signature in the first public - * superclass or implemented interface of the class. - * - * @param class the class whose method is sought - * @param name the name of the method - * @param paramTypes the classes of method parameters - */ - private static Method getPublicMethod( Class clazz, String name, Class[] paramTypes ) - { - /* - * if this class is public, then try to get it - */ - - if ( ( clazz.getModifiers() & Modifier.PUBLIC ) != 0 ) - { - try - { - return clazz.getMethod( name, paramTypes ); - } - catch ( NoSuchMethodException e ) - { - /* - * If the class does not have the method, then neither its - * superclass nor any of its interfaces has it so quickly return - * null. - */ - return null; - } - } - - /* - * try the superclass - */ - - - Class superclazz = clazz.getSuperclass(); - - if ( superclazz != null ) - { - Method superclazzMethod = getPublicMethod( superclazz, name, paramTypes ); - - if ( superclazzMethod != null ) - { - return superclazzMethod; - } - } - - /* - * and interfaces - */ - - Class[] interfaces = clazz.getInterfaces(); - - for ( int i = 0; i < interfaces.length; ++i ) - { - Method interfaceMethod = getPublicMethod( interfaces[i], name, paramTypes ); - - if ( interfaceMethod != null ) - { - return interfaceMethod; - } - } - - return null; - } - - /** - * Used for the iterative discovery process for public methods. - */ - private static final class MethodInfo - { - Method method; - String name; - Class[] parameterTypes; - boolean upcast; - - MethodInfo( Method method ) - { - this.method = null; - name = method.getName(); - parameterTypes = method.getParameterTypes(); - upcast = false; - } - - void tryUpcasting( Class clazz ) - throws NoSuchMethodException - { - method = clazz.getMethod( name, parameterTypes ); - name = null; - parameterTypes = null; - upcast = true; - } - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/introspection/MethodMap.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/introspection/MethodMap.java deleted file mode 100644 index 3b45d9b98..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/introspection/MethodMap.java +++ /dev/null @@ -1,465 +0,0 @@ -package org.codehaus.plexus.util.introspection; - -/* ==================================================================== - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ==================================================================== - */ - -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Hashtable; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -/** - * - * @author Jason van Zyl - * @author Bob McWhirter - * @author Christoph Reck - * @author Geir Magnusson Jr. - * @author Attila Szegedi - * @version $Id$ - */ -public class MethodMap -{ - private static final int MORE_SPECIFIC = 0; - private static final int LESS_SPECIFIC = 1; - private static final int INCOMPARABLE = 2; - - /** - * Keep track of all methods with the same name. - */ - Map methodByNameMap = new Hashtable(); - - /** - * Add a method to a list of methods by name. - * For a particular class we are keeping track - * of all the methods with the same name. - */ - public void add(Method method) - { - String methodName = method.getName(); - - List l = get( methodName ); - - if ( l == null) - { - l = new ArrayList(); - methodByNameMap.put(methodName, l); - } - - l.add(method); - - return; - } - - /** - * Return a list of methods with the same name. - * - * @param String key - * @return List list of methods - */ - public List get(String key) - { - return (List) methodByNameMap.get(key); - } - - /** - *

- * Find a method. Attempts to find the - * most specific applicable method using the - * algorithm described in the JLS section - * 15.12.2 (with the exception that it can't - * distinguish a primitive type argument from - * an object type argument, since in reflection - * primitive type arguments are represented by - * their object counterparts, so for an argument of - * type (say) java.lang.Integer, it will not be able - * to decide between a method that takes int and a - * method that takes java.lang.Integer as a parameter. - *

- * - *

- * This turns out to be a relatively rare case - * where this is needed - however, functionality - * like this is needed. - *

- * - * @param methodName name of method - * @param args the actual arguments with which the method is called - * @return the most specific applicable method, or null if no - * method is applicable. - * @throws AmbiguousException if there is more than one maximally - * specific applicable method - */ - public Method find(String methodName, Object[] args) - throws AmbiguousException - { - List methodList = get(methodName); - - if (methodList == null) - { - return null; - } - - int l = args.length; - Class[] classes = new Class[l]; - - for(int i = 0; i < l; ++i) - { - Object arg = args[i]; - - /* - * if we are careful down below, a null argument goes in there - * so we can know that the null was passed to the method - */ - classes[i] = - arg == null ? null : arg.getClass(); - } - - return getMostSpecific(methodList, classes); - } - - /** - * simple distinguishable exception, used when - * we run across ambiguous overloading - */ - public static class AmbiguousException extends Exception - { - } - - - private static Method getMostSpecific(List methods, Class[] classes) - throws AmbiguousException - { - LinkedList applicables = getApplicables(methods, classes); - - if(applicables.isEmpty()) - { - return null; - } - - if(applicables.size() == 1) - { - return (Method)applicables.getFirst(); - } - - /* - * This list will contain the maximally specific methods. Hopefully at - * the end of the below loop, the list will contain exactly one method, - * (the most specific method) otherwise we have ambiguity. - */ - - LinkedList maximals = new LinkedList(); - - for (Iterator applicable = applicables.iterator(); - applicable.hasNext();) - { - Method app = (Method) applicable.next(); - Class[] appArgs = app.getParameterTypes(); - boolean lessSpecific = false; - - for (Iterator maximal = maximals.iterator(); - !lessSpecific && maximal.hasNext();) - { - Method max = (Method) maximal.next(); - - switch(moreSpecific(appArgs, max.getParameterTypes())) - { - case MORE_SPECIFIC: - { - /* - * This method is more specific than the previously - * known maximally specific, so remove the old maximum. - */ - - maximal.remove(); - break; - } - - case LESS_SPECIFIC: - { - /* - * This method is less specific than some of the - * currently known maximally specific methods, so we - * won't add it into the set of maximally specific - * methods - */ - - lessSpecific = true; - break; - } - } - } - - if(!lessSpecific) - { - maximals.addLast(app); - } - } - - if(maximals.size() > 1) - { - // We have more than one maximally specific method - throw new AmbiguousException(); - } - - return (Method)maximals.getFirst(); - } - - /** - * Determines which method signature (represented by a class array) is more - * specific. This defines a partial ordering on the method signatures. - * @param c1 first signature to compare - * @param c2 second signature to compare - * @return MORE_SPECIFIC if c1 is more specific than c2, LESS_SPECIFIC if - * c1 is less specific than c2, INCOMPARABLE if they are incomparable. - */ - private static int moreSpecific(Class[] c1, Class[] c2) - { - boolean c1MoreSpecific = false; - boolean c2MoreSpecific = false; - - for(int i = 0; i < c1.length; ++i) - { - if(c1[i] != c2[i]) - { - c1MoreSpecific = - c1MoreSpecific || - isStrictMethodInvocationConvertible(c2[i], c1[i]); - c2MoreSpecific = - c2MoreSpecific || - isStrictMethodInvocationConvertible(c1[i], c2[i]); - } - } - - if(c1MoreSpecific) - { - if(c2MoreSpecific) - { - /* - * Incomparable due to cross-assignable arguments (i.e. - * foo(String, Object) vs. foo(Object, String)) - */ - - return INCOMPARABLE; - } - - return MORE_SPECIFIC; - } - - if(c2MoreSpecific) - { - return LESS_SPECIFIC; - } - - /* - * Incomparable due to non-related arguments (i.e. - * foo(Runnable) vs. foo(Serializable)) - */ - - return INCOMPARABLE; - } - - /** - * Returns all methods that are applicable to actual argument types. - * @param methods list of all candidate methods - * @param classes the actual types of the arguments - * @return a list that contains only applicable methods (number of - * formal and actual arguments matches, and argument types are assignable - * to formal types through a method invocation conversion). - */ - private static LinkedList getApplicables(List methods, Class[] classes) - { - LinkedList list = new LinkedList(); - - for (Iterator imethod = methods.iterator(); imethod.hasNext();) - { - Method method = (Method) imethod.next(); - - if(isApplicable(method, classes)) - { - list.add(method); - } - - } - return list; - } - - /** - * Returns true if the supplied method is applicable to actual - * argument types. - */ - private static boolean isApplicable(Method method, Class[] classes) - { - Class[] methodArgs = method.getParameterTypes(); - - if(methodArgs.length != classes.length) - { - return false; - } - - for(int i = 0; i < classes.length; ++i) - { - if(!isMethodInvocationConvertible(methodArgs[i], classes[i])) - { - return false; - } - } - - return true; - } - - /** - * Determines whether a type represented by a class object is - * convertible to another type represented by a class object using a - * method invocation conversion, treating object types of primitive - * types as if they were primitive types (that is, a Boolean actual - * parameter type matches boolean primitive formal type). This behavior - * is because this method is used to determine applicable methods for - * an actual parameter list, and primitive types are represented by - * their object duals in reflective method calls. - * - * @param formal the formal parameter type to which the actual - * parameter type should be convertible - * @param actual the actual parameter type. - * @return true if either formal type is assignable from actual type, - * or formal is a primitive type and actual is its corresponding object - * type or an object type of a primitive type that can be converted to - * the formal type. - */ - private static boolean isMethodInvocationConvertible(Class formal, - Class actual) - { - /* - * if it's a null, it means the arg was null - */ - if (actual == null && !formal.isPrimitive()) - { - return true; - } - - /* - * Check for identity or widening reference conversion - */ - - if (actual != null && formal.isAssignableFrom(actual)) - { - return true; - } - - /* - * Check for boxing with widening primitive conversion. Note that - * actual parameters are never primitives. - */ - - if (formal.isPrimitive()) - { - if(formal == Boolean.TYPE && actual == Boolean.class) - return true; - if(formal == Character.TYPE && actual == Character.class) - return true; - if(formal == Byte.TYPE && actual == Byte.class) - return true; - if(formal == Short.TYPE && - (actual == Short.class || actual == Byte.class)) - return true; - if(formal == Integer.TYPE && - (actual == Integer.class || actual == Short.class || - actual == Byte.class)) - return true; - if(formal == Long.TYPE && - (actual == Long.class || actual == Integer.class || - actual == Short.class || actual == Byte.class)) - return true; - if(formal == Float.TYPE && - (actual == Float.class || actual == Long.class || - actual == Integer.class || actual == Short.class || - actual == Byte.class)) - return true; - if(formal == Double.TYPE && - (actual == Double.class || actual == Float.class || - actual == Long.class || actual == Integer.class || - actual == Short.class || actual == Byte.class)) - return true; - } - - return false; - } - - /** - * Determines whether a type represented by a class object is - * convertible to another type represented by a class object using a - * method invocation conversion, without matching object and primitive - * types. This method is used to determine the more specific type when - * comparing signatures of methods. - * - * @param formal the formal parameter type to which the actual - * parameter type should be convertible - * @param actual the actual parameter type. - * @return true if either formal type is assignable from actual type, - * or formal and actual are both primitive types and actual can be - * subject to widening conversion to formal. - */ - private static boolean isStrictMethodInvocationConvertible(Class formal, - Class actual) - { - /* - * we shouldn't get a null into, but if so - */ - if (actual == null && !formal.isPrimitive()) - { - return true; - } - - /* - * Check for identity or widening reference conversion - */ - - if(formal.isAssignableFrom(actual)) - { - return true; - } - - /* - * Check for widening primitive conversion. - */ - - if(formal.isPrimitive()) - { - if(formal == Short.TYPE && (actual == Byte.TYPE)) - return true; - if(formal == Integer.TYPE && - (actual == Short.TYPE || actual == Byte.TYPE)) - return true; - if(formal == Long.TYPE && - (actual == Integer.TYPE || actual == Short.TYPE || - actual == Byte.TYPE)) - return true; - if(formal == Float.TYPE && - (actual == Long.TYPE || actual == Integer.TYPE || - actual == Short.TYPE || actual == Byte.TYPE)) - return true; - if(formal == Double.TYPE && - (actual == Float.TYPE || actual == Long.TYPE || - actual == Integer.TYPE || actual == Short.TYPE || - actual == Byte.TYPE)) - return true; - } - return false; - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractor.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractor.java deleted file mode 100644 index a235629e4..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractor.java +++ /dev/null @@ -1,122 +0,0 @@ -package org.codehaus.plexus.util.introspection; - -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.Map; -import java.util.StringTokenizer; - -import org.codehaus.plexus.util.StringUtils; - -/** - * Using simple dotted expressions extract the values from a MavenProject - * instance, For example we might want to extract a value like: - * project.build.sourceDirectory - * - * @author Jason van Zyl - * @version $Id$ - */ -public class ReflectionValueExtractor -{ - private static Class[] args = new Class[ 0 ]; - - private static Object[] params = new Object[ 0 ]; - - private static ClassMap classMap; - - private static Map classMaps = new HashMap(); - - private ReflectionValueExtractor() - { - } - - public static Object evaluate( String expression, Object root ) - throws Exception - { - return evaluate( expression, root, true ); - } - - // TODO: don't throw Exception - public static Object evaluate( String expression, Object root, boolean trimRootToken ) - throws Exception - { - // if the root token refers to the supplied root object parameter, remove it. - if ( trimRootToken ) - { - expression = expression.substring( expression.indexOf( '.' ) + 1 ); - } - - Object value = root; - - // ---------------------------------------------------------------------- - // Walk the dots and retrieve the ultimate value desired from the - // MavenProject instance. - // ---------------------------------------------------------------------- - - StringTokenizer parser = new StringTokenizer( expression, "." ); - - while ( parser.hasMoreTokens() ) - { - String token = parser.nextToken(); - - if ( value == null ) - { - return null; - } - - classMap = getClassMap( value.getClass() ); - - String methodBase = StringUtils.capitalizeFirstLetter( token ); - - String methodName = "get" + methodBase; - - Method method = classMap.findMethod( methodName, args ); - - if ( method == null ) - { - // perhaps this is a boolean property?? - methodName = "is" + methodBase; - - method = classMap.findMethod( methodName, args ); - } - - if ( method == null ) - { - return null; - } - - value = method.invoke( value, params ); - } - - return value; - } - - private static ClassMap getClassMap( Class clazz ) - { - classMap = (ClassMap) classMaps.get( clazz ); - - if ( classMap == null ) - { - classMap = new ClassMap( clazz ); - - classMaps.put( clazz, classMap ); - } - - return classMap; - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/reflection/Reflector.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/reflection/Reflector.java deleted file mode 100644 index 77a8f5cc9..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/reflection/Reflector.java +++ /dev/null @@ -1,638 +0,0 @@ -package org.codehaus.plexus.util.reflection; - -/* - * - * Copyright (c) 2004 John Dennis Casey - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ -/* - - Copyright (c) 2002 John Casey. All rights reserved. - - SEE licenses/cj-license.txt FOR MORE INFORMATION. - - */ - -import java.lang.reflect.Constructor; -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import java.util.HashMap; -import java.util.Map; - -/** - * Utility class used to instantiate an object using reflection. This utility - * hides many of the gory details needed to do this. - * - * @author John Casey - */ -public final class Reflector -{ - private static final String CONSTRUCTOR_METHOD_NAME = "$$CONSTRUCTOR$$"; - - private static final String GET_INSTANCE_METHOD_NAME = "getInstance"; - - private HashMap classMaps = new HashMap(); - - /** Ensure no instances of Reflector are created...this is a utility. */ - public Reflector() - { - } - - /** - * Create a new instance of a class, given the array of parameters... Uses - * constructor caching to find a constructor that matches the parameter - * types, either specifically (first choice) or abstractly... - * - * @param theClass - * The class to instantiate - * @param params - * The parameters to pass to the constructor - * @return The instantiated object - * @throws ReflectorException - * In case anything goes wrong here... - */ - public Object newInstance( Class theClass, Object[] params ) throws ReflectorException - { - if ( params == null ) - { - params = new Object[0]; - } - - Class[] paramTypes = new Class[params.length]; - - for ( int i = 0, len = params.length; i < len; i++ ) - { - paramTypes[i] = params[i].getClass(); - } - - try - { - Constructor con = getConstructor( theClass, paramTypes ); - - if ( con == null ) - { - StringBuffer buffer = new StringBuffer(); - - buffer.append( "Constructor not found for class: " ); - buffer.append( theClass.getName() ); - buffer.append( " with specified or ancestor parameter classes: " ); - - for ( int i = 0; i < paramTypes.length; i++ ) - { - buffer.append( paramTypes[i].getName() ); - buffer.append( ',' ); - } - - buffer.setLength( buffer.length() - 1 ); - - throw new ReflectorException( buffer.toString() ); - } - - return con.newInstance( params ); - } - catch ( InstantiationException ex ) - { - throw new ReflectorException( ex ); - } - catch ( InvocationTargetException ex ) - { - throw new ReflectorException( ex ); - } - catch ( IllegalAccessException ex ) - { - throw new ReflectorException( ex ); - } - } - - /** - * Retrieve the singleton instance of a class, given the array of - * parameters... Uses constructor caching to find a constructor that matches - * the parameter types, either specifically (first choice) or abstractly... - * - * @param theClass - * The class to retrieve the singleton of - * @param initParams - * The parameters to pass to the constructor - * @return The singleton object - * @throws ReflectorException - * In case anything goes wrong here... - */ - public Object getSingleton( Class theClass, Object[] initParams ) throws ReflectorException - { - Class[] paramTypes = new Class[initParams.length]; - - for ( int i = 0, len = initParams.length; i < len; i++ ) - { - paramTypes[i] = initParams[i].getClass(); - } - - try - { - Method method = getMethod( theClass, GET_INSTANCE_METHOD_NAME, paramTypes ); - - return method.invoke( null, initParams ); - } - catch ( InvocationTargetException ex ) - { - throw new ReflectorException( ex ); - } - catch ( IllegalAccessException ex ) - { - throw new ReflectorException( ex ); - } - } - - /** - * Invoke the specified method on the specified target with the specified - * params... - * - * @param target - * The target of the invocation - * @param methodName - * The method name to invoke - * @param params - * The parameters to pass to the method invocation - * @return The result of the method call - * @throws ReflectorException - * In case of an error looking up or invoking the method. - */ - public Object invoke( Object target, String methodName, Object[] params ) throws ReflectorException - { - if ( params == null ) - { - params = new Object[0]; - } - - Class[] paramTypes = new Class[params.length]; - - for ( int i = 0, len = params.length; i < len; i++ ) - { - paramTypes[i] = params[i].getClass(); - } - - try - { - Method method = getMethod( target.getClass(), methodName, paramTypes ); - - if ( method == null ) - { - StringBuffer buffer = new StringBuffer(); - - buffer.append( "Singleton-producing method named '" ).append( methodName ).append( "' not found with specified parameter classes: " ); - - for ( int i = 0; i < paramTypes.length; i++ ) - { - buffer.append( paramTypes[i].getName() ); - buffer.append( ',' ); - } - - buffer.setLength( buffer.length() - 1 ); - - throw new ReflectorException( buffer.toString() ); - } - - return method.invoke( target, params ); - } - catch ( InvocationTargetException ex ) - { - throw new ReflectorException( ex ); - } - catch ( IllegalAccessException ex ) - { - throw new ReflectorException( ex ); - } - } - - public Object getStaticField( Class targetClass, String fieldName ) throws ReflectorException - { - try - { - Field field = targetClass.getField( fieldName ); - - return field.get( null ); - } - catch ( SecurityException e ) - { - throw new ReflectorException( e ); - } - catch ( NoSuchFieldException e ) - { - throw new ReflectorException( e ); - } - catch ( IllegalArgumentException e ) - { - throw new ReflectorException( e ); - } - catch ( IllegalAccessException e ) - { - throw new ReflectorException( e ); - } - } - - public Object getField( Object target, String fieldName ) throws ReflectorException - { - return getField( target, fieldName, false ); - } - - public Object getField( Object target, String fieldName, boolean breakAccessibility ) throws ReflectorException - { - try - { - Class targetClass = target.getClass(); - Field field = targetClass.getField( fieldName ); - - boolean accessibilityBroken = false; - if(!field.isAccessible() && breakAccessibility) - { - field.setAccessible(true); - accessibilityBroken = true; - } - - Object result = field.get( target ); - - if(accessibilityBroken) - { - field.setAccessible(false); - } - - return result; - } - catch ( SecurityException e ) - { - throw new ReflectorException( e ); - } - catch ( NoSuchFieldException e ) - { - throw new ReflectorException( e ); - } - catch ( IllegalAccessException e ) - { - throw new ReflectorException( e ); - } - } - - /** - * Invoke the specified static method with the specified params... - * - * @param targetClass - * The target class of the invocation - * @param methodName - * The method name to invoke - * @param params - * The parameters to pass to the method invocation - * @return The result of the method call - * @throws ReflectorException - * In case of an error looking up or invoking the method. - */ - public Object invokeStatic( Class targetClass, String methodName, Object[] params ) throws ReflectorException - { - if ( params == null ) - { - params = new Object[0]; - } - - Class[] paramTypes = new Class[params.length]; - - for ( int i = 0, len = params.length; i < len; i++ ) - { - paramTypes[i] = params[i].getClass(); - } - - try - { - Method method = getMethod( targetClass, methodName, paramTypes ); - - if ( method == null ) - { - StringBuffer buffer = new StringBuffer(); - - buffer.append( "Singleton-producing method named \'" + methodName - + "\' not found with specified parameter classes: " ); - - for ( int i = 0; i < paramTypes.length; i++ ) - { - buffer.append( paramTypes[i].getName() ); - buffer.append( ',' ); - } - - buffer.setLength( buffer.length() - 1 ); - - throw new ReflectorException( buffer.toString() ); - } - - return method.invoke( null, params ); - } - catch ( InvocationTargetException ex ) - { - throw new ReflectorException( ex ); - } - catch ( IllegalAccessException ex ) - { - throw new ReflectorException( ex ); - } - } - - /** - * Return the constructor, checking the cache first and storing in cache if - * not already there.. - * - * @param targetClass - * The class to get the constructor from - * @param params - * The classes of the parameters which the constructor should - * match. - * @return the Constructor object that matches. - * @throws ReflectorException - * In case we can't retrieve the proper constructor. - */ - public Constructor getConstructor( Class targetClass, Class[] params ) throws ReflectorException - { - Map constructorMap = getConstructorMap( targetClass ); - - StringBuffer key = new StringBuffer( 200 ); - - key.append( "(" ); - - for ( int i = 0, len = params.length; i < len; i++ ) - { - key.append( params[i].getName() ); - key.append( "," ); - } - - if ( params.length > 0 ) - { - key.setLength( key.length() - 1 ); - } - - key.append( ")" ); - - Constructor constructor = null; - - String paramKey = key.toString(); - - synchronized ( paramKey.intern() ) - { - constructor = (Constructor) constructorMap.get( paramKey ); - - if ( constructor == null ) - { - Constructor[] cands = targetClass.getConstructors(); - - for ( int i = 0, len = cands.length; i < len; i++ ) - { - Class[] types = cands[i].getParameterTypes(); - - if ( params.length != types.length ) - { - continue; - } - - for ( int j = 0, len2 = params.length; j < len2; j++ ) - { - if ( !types[j].isAssignableFrom( params[j] ) ) - { - continue; - } - } - - // we got it, so store it! - constructor = cands[i]; - constructorMap.put( paramKey, constructor ); - } - } - } - - if ( constructor == null ) - { - throw new ReflectorException( "Error retrieving constructor object for: " + targetClass.getName() - + paramKey ); - } - - return constructor; - } - - public Object getObjectProperty( Object target, String propertyName ) - throws ReflectorException - { - if(propertyName == null || propertyName.trim().length() < 1) - { - throw new ReflectorException( "Cannot retrieve value for empty property." ); - } - - String beanAccessor = "get" + Character.toUpperCase(propertyName.charAt(0)); - if(propertyName.trim().length() > 1) - { - beanAccessor += propertyName.substring(1).trim(); - } - - Class targetClass = target.getClass(); - Class[] emptyParams = {}; - - Method method = _getMethod( targetClass, beanAccessor, emptyParams ); - - if(method == null) - { - method = _getMethod( targetClass, propertyName, emptyParams ); - } - - Object returnValue = getField( targetClass, propertyName, true ); - - if( method == null && returnValue == null ) - { - throw new ReflectorException( "Neither method: \'" + propertyName + "\' nor bean accessor: \'" + beanAccessor + "\' can be found for class: \'" + targetClass + "\', and retrieval of field: \'" + propertyName + "\' returned null." ); - } - - if(method != null) - { - try - { - returnValue = method.invoke( target, new Object[]{} ); - } - catch ( IllegalAccessException e ) - { - throw new ReflectorException( "Error retrieving property \'" + propertyName + "\' from \'" + targetClass + "\'", e ); - } - catch ( InvocationTargetException e ) - { - throw new ReflectorException( "Error retrieving property \'" + propertyName + "\' from \'" + targetClass + "\'", e ); - } - } - - return returnValue; - } - - /** - * Return the method, checking the cache first and storing in cache if not - * already there.. - * - * @param targetClass - * The class to get the method from - * @param params - * The classes of the parameters which the method should match. - * @return the Method object that matches. - * @throws ReflectorException - * In case we can't retrieve the proper method. - */ - public Method getMethod( Class targetClass, String methodName, Class[] params ) throws ReflectorException - { - Method method = _getMethod( targetClass, methodName, params ); - - if ( method == null ) - { - throw new ReflectorException( "Method: \'" + methodName + "\' not found in class: \'" + targetClass + "\'" ); - } - - return method; - } - - private Method _getMethod( Class targetClass, String methodName, Class[] params ) - throws ReflectorException - { - Map methodMap = getMethodMap( targetClass, methodName ); - - StringBuffer key = new StringBuffer( 200 ); - - key.append( "(" ); - - for ( int i = 0, len = params.length; i < len; i++ ) - { - key.append( params[i].getName() ); - key.append( "," ); - } - - key.append( ")" ); - - Method method = null; - - String paramKey = key.toString(); - - synchronized ( paramKey.intern() ) - { - method = (Method) methodMap.get( paramKey ); - - if ( method == null ) - { - Method[] cands = targetClass.getMethods(); - - for ( int i = 0, len = cands.length; i < len; i++ ) - { - String name = cands[i].getName(); - - if ( !methodName.equals( name ) ) - { - continue; - } - - Class[] types = cands[i].getParameterTypes(); - - if ( params.length != types.length ) - { - continue; - } - - for ( int j = 0, len2 = params.length; j < len2; j++ ) - { - if ( !types[j].isAssignableFrom( params[j] ) ) - { - continue; - } - } - - // we got it, so store it! - method = cands[i]; - methodMap.put( paramKey, method ); - } - } - } - - return method; - } - - /** - * Retrieve the cache of constructors for the specified class. - * - * @param theClass - * the class to lookup. - * @return The cache of constructors. - * @throws ReflectorException - * in case of a lookup error. - */ - private Map getConstructorMap( Class theClass ) throws ReflectorException - { - return getMethodMap( theClass, CONSTRUCTOR_METHOD_NAME ); - } - - /** - * Retrieve the cache of methods for the specified class and method name. - * - * @param theClass - * the class to lookup. - * @param methodName - * The name of the method to lookup. - * @return The cache of constructors. - * @throws ReflectorException - * in case of a lookup error. - */ - private Map getMethodMap( Class theClass, String methodName ) throws ReflectorException - { - Map methodMap = null; - - if ( theClass == null ) - { - return null; - } - - String className = theClass.getName(); - - synchronized ( className.intern() ) - { - Map classMethods = (Map) classMaps.get( className ); - - if ( classMethods == null ) - { - classMethods = new HashMap(); - methodMap = new HashMap(); - classMethods.put( methodName, methodMap ); - - classMaps.put( className, classMethods ); - } - else - { - String key = className + "::" + methodName; - - synchronized ( key.intern() ) - { - methodMap = (Map) classMethods.get( methodName ); - - if ( methodMap == null ) - { - methodMap = new HashMap(); - classMethods.put( methodName, methodMap ); - } - } - } - } - - return methodMap; - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/reflection/ReflectorException.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/reflection/ReflectorException.java deleted file mode 100644 index 1ca4728ac..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/reflection/ReflectorException.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * - * Copyright (c) 2004 John Dennis Casey - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ -/* - - Copyright (c) 2002 John Casey. All rights reserved. - - SEE licenses/cj-license.txt FOR MORE INFORMATION. - - */ -/* - * ReflectorException.java - * - * Created on November 1, 2002, 7:33 AM - */ -package org.codehaus.plexus.util.reflection; - -/** - * Exception indicating that an error has occurred while instantiating a class - * with the Reflector class. This exception is meant to put a more user-friendly - * face on the myriad other exceptions throws during reflective object creation. - * - * @author John Casey - */ -public class ReflectorException - extends Exception -{ - /** - * Create a new ReflectorException. - */ - public ReflectorException() - { - } - - /** - * Create a new ReflectorException with the specified message. - * - * @param msg - * The message. - */ - public ReflectorException( String msg ) - { - super( msg ); - } - - /** - * Create a new ReflectorException with the specified root cause. - * - * @param root - * The root cause. - */ - public ReflectorException( Throwable root ) - { - super( root ); - } - - /** - * Create a new ReflectorException with the specified message and root - * cause. - * - * @param msg - * The message. - * @param root - * The root cause. - */ - public ReflectorException( String msg, Throwable root ) - { - super( msg, root ); - } -} \ No newline at end of file diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/CompactXMLWriter.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/CompactXMLWriter.java deleted file mode 100644 index 543ebbf33..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/CompactXMLWriter.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.codehaus.plexus.util.xml; - -import java.io.PrintWriter; -import java.io.Writer; - -public class CompactXMLWriter extends PrettyPrintXMLWriter -{ - - public CompactXMLWriter( PrintWriter writer ) - { - super( writer ); - } - - public CompactXMLWriter( Writer writer ) - { - super( writer ); - } - - protected void endOfLine() - { - // override parent: don't write anything at end of line - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/PrettyPrintXMLWriter.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/PrettyPrintXMLWriter.java deleted file mode 100644 index fcd660544..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/PrettyPrintXMLWriter.java +++ /dev/null @@ -1,339 +0,0 @@ -package org.codehaus.plexus.util.xml; - -import java.io.PrintWriter; -import java.io.Writer; -import java.util.LinkedList; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public class PrettyPrintXMLWriter - implements XMLWriter -{ - - private static final String LS = System.getProperty("line.separator"); - - private PrintWriter writer; - - private LinkedList elementStack = new LinkedList(); - - private boolean tagInProgress; - - private int depth; - - private String lineIndenter; - - private String encoding; - - private String docType; - - private boolean readyForNewLine; - - private boolean tagIsEmpty; - - public PrettyPrintXMLWriter( PrintWriter writer, String lineIndenter ) - { - this( writer, lineIndenter, null, null ); - } - - public PrettyPrintXMLWriter( Writer writer, String lineIndenter ) - { - this( new PrintWriter( writer ), lineIndenter ); - } - - public PrettyPrintXMLWriter( PrintWriter writer ) - { - this( writer, null, null ); - } - - public PrettyPrintXMLWriter( Writer writer ) - { - this( new PrintWriter( writer ) ); - } - - public PrettyPrintXMLWriter( PrintWriter writer, String lineIndenter, String encoding, String doctype ) - { - setWriter( writer ); - - setLineIndenter( lineIndenter ); - - setEncoding( encoding ); - - setDocType( doctype ); - - if ( doctype != null || encoding != null ) - { - writeDocumentHeaders(); - } - } - - public PrettyPrintXMLWriter( Writer writer, String lineIndenter, String encoding, String doctype ) - { - this( new PrintWriter( writer ), lineIndenter, encoding, doctype ); - } - - public PrettyPrintXMLWriter( PrintWriter writer, String encoding, String doctype ) - { - this( writer, " ", encoding, doctype ); - } - - public PrettyPrintXMLWriter( Writer writer, String encoding, String doctype ) - { - this( new PrintWriter( writer ), encoding, doctype ); - } - - public void startElement( String name ) - { - tagIsEmpty = false; - - finishTag(); - - write( "<" ); - - write( name ); - - elementStack.addLast( name ); - - tagInProgress = true; - - setDepth( getDepth() + 1 ); - - readyForNewLine = true; - - tagIsEmpty = true; - } - - public void writeText( String text ) - { - writeText( text, true ); - } - - public void writeMarkup( String text ) - { - writeText( text, false ); - } - - private void writeText( String text, boolean escapeXml ) - { - readyForNewLine = false; - - tagIsEmpty = false; - - finishTag(); - - if ( escapeXml ) - { - text = escapeXml( text ); - } - - write( text ); - } - - private static String escapeXml( String text ) - { - text = text.replaceAll( "&", "&" ); - - text = text.replaceAll( "<", "<" ); - - text = text.replaceAll( ">", ">" ); - - text = text.replaceAll( "\"", """ ); - - text = text.replaceAll( "\'", "'" ); - - return text; - } - - private static String escapeXmlAttribute( String text ) - { - text = escapeXml( text ); - - text = text.replaceAll( "\n\r", " " ); - - Pattern pattern = Pattern.compile( "([\000-\037])" ); - Matcher m = pattern.matcher( text ); - StringBuffer b = new StringBuffer(); - while ( m.find() ) - { - m = m.appendReplacement( b, "&#" + Integer.toString( m.group( 1 ).charAt( 0 ) ) + ";" ); - } - m.appendTail( b ); - - return b.toString(); - } - - public void addAttribute( String key, String value ) - { - write( " " ); - - write( key ); - - write( "=\"" ); - - write( escapeXmlAttribute( value ) ); - - write( "\"" ); - } - - public void endElement() - { - setDepth( getDepth() - 1 ); - - if ( tagIsEmpty ) - { - write( "/" ); - - readyForNewLine = false; - - finishTag(); - - elementStack.removeLast(); - } - else - { - finishTag(); - - write( "" ); - } - - readyForNewLine = true; - } - - /** - * Write a string to the underlying writer - * @param str - */ - private void write( String str ) - { - getWriter().write( str ); - } - - private void finishTag() - { - if ( tagInProgress ) - { - write( ">" ); - } - - tagInProgress = false; - - if ( readyForNewLine ) - { - endOfLine(); - } - readyForNewLine = false; - - tagIsEmpty = false; - } - - /** - * Get the string used as line indenter - * @return the line indenter - */ - protected String getLineIndenter(){ - return lineIndenter; - } - - /** - * Set the string used as line indenter - * @param lineIndenter - */ - protected void setLineIndenter( String lineIndenter ){ - this.lineIndenter = lineIndenter; - } - - /** - * Write the end of line character (using system line separator) - * and start new line with indentation - */ - protected void endOfLine() - { - write( LS ); - - for ( int i = 0; i < getDepth(); i++ ) - { - write( getLineIndenter() ); - } - } - - private void writeDocumentHeaders() - { - write( "" ); - - endOfLine(); - - if ( getDocType() != null ) - { - write( "" ); - - endOfLine(); - } - } - - /** - * Set the underlying writer - * @param writer - */ - protected void setWriter( PrintWriter writer ) - { - this.writer = writer; - } - - /** - * Get the underlying writer - * @return the underlying writer - */ - protected PrintWriter getWriter() - { - return writer; - } - - /** - * Set the current depth in the xml indentation - * @param depth - */ - protected void setDepth( int depth ) - { - this.depth = depth; - } - - /** - * Get the current depth in the xml indentation - * @return - */ - protected int getDepth() - { - return depth; - } - - protected void setEncoding( String encoding ) - { - this.encoding = encoding; - } - - protected String getEncoding() - { - return encoding; - } - - protected void setDocType( String docType ) - { - this.docType = docType; - } - - protected String getDocType() - { - return docType; - } - -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/SerializerXMLWriter.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/SerializerXMLWriter.java deleted file mode 100644 index baab0fec4..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/SerializerXMLWriter.java +++ /dev/null @@ -1,112 +0,0 @@ -package org.codehaus.plexus.util.xml; - -import org.codehaus.plexus.util.xml.pull.XmlSerializer; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Stack; - -/** - * Write to an MXSerializer. - * - * @author Brett Porter - * @version $Id$ - */ -public class SerializerXMLWriter - implements XMLWriter -{ - private final XmlSerializer serializer; - - private final String namespace; - - private final Stack elements = new Stack(); - - private List exceptions; - - public SerializerXMLWriter( String namespace, XmlSerializer serializer ) - { - this.serializer = serializer; - this.namespace = namespace; - } - - public void startElement( String name ) - { - try - { - serializer.startTag( namespace, name ); - elements.push( name ); - } - catch ( IOException e ) - { - storeException( e ); - } - } - - public void addAttribute( String key, String value ) - { - try - { - serializer.attribute( namespace, key, value ); - } - catch ( IOException e ) - { - storeException( e ); - } - } - - public void writeText( String text ) - { - try - { - serializer.text( text ); - } - catch ( IOException e ) - { - storeException( e ); - } - } - - public void writeMarkup( String text ) - { - try - { - serializer.cdsect( text ); - } - catch ( IOException e ) - { - storeException( e ); - } - } - - public void endElement() - { - try - { - serializer.endTag( namespace, (String) elements.pop() ); - } - catch ( IOException e ) - { - storeException( e ); - } - } - - /** - * @todo Maybe the interface should allow IOExceptions on each? - */ - private void storeException( IOException e ) - { - if ( exceptions == null ) - { - exceptions = new ArrayList(); - } - exceptions.add( e ); - } - - public List getExceptions() - { - return exceptions == null ? Collections.EMPTY_LIST : exceptions; - } - -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/XMLWriter.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/XMLWriter.java deleted file mode 100644 index 20d9c7434..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/XMLWriter.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.codehaus.plexus.util.xml; - -public interface XMLWriter -{ - void startElement( String name ); - - void addAttribute( String key, String value ); - - void writeText( String text ); - - void writeMarkup( String text ); - - void endElement(); - -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/Xpp3Dom.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/Xpp3Dom.java deleted file mode 100644 index 3fd8660f4..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/Xpp3Dom.java +++ /dev/null @@ -1,472 +0,0 @@ -package org.codehaus.plexus.util.xml; - -import org.codehaus.plexus.util.StringUtils; -import org.codehaus.plexus.util.xml.pull.XmlSerializer; - -import java.io.IOException; -import java.io.StringWriter; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class Xpp3Dom -{ - protected String name; - - protected String value; - - protected Map attributes; - - protected List childList; - - protected Map childMap; - - protected Xpp3Dom parent; - - private static final Xpp3Dom[] EMPTY_DOM_ARRAY = new Xpp3Dom[0]; - - public static final String CHILDREN_COMBINATION_MODE_ATTRIBUTE = "combine.children"; - - public static final String CHILDREN_COMBINATION_MERGE = "merge"; - - public static final String CHILDREN_COMBINATION_APPEND = "append"; - - /** - * This default mode for combining children DOMs during merge means that where element names - * match, the process will try to merge the element data, rather than putting the dominant - * and recessive elements (which share the same element name) as siblings in the resulting - * DOM. - */ - public static final String DEFAULT_CHILDREN_COMBINATION_MODE = CHILDREN_COMBINATION_MERGE; - - public static final String SELF_COMBINATION_MODE_ATTRIBUTE = "combine.self"; - - public static final String SELF_COMBINATION_OVERRIDE = "override"; - - public static final String SELF_COMBINATION_MERGE = "merge"; - - /** - * This default mode for combining a DOM node during merge means that where element names - * match, the process will try to merge the element attributes and values, rather than - * overriding the recessive element completely with the dominant one. This means that - * wherever the dominant element doesn't provide the value or a particular attribute, that - * value or attribute will be set from the recessive DOM node. - */ - public static final String DEFAULT_SELF_COMBINATION_MODE = SELF_COMBINATION_MERGE; - - public Xpp3Dom( String name ) - { - this.name = name; - childList = new ArrayList(); - childMap = new HashMap(); - } - - public Xpp3Dom( Xpp3Dom src ) - { - this( src.getName() ); - setValue( src.getValue() ); - - String[] attributeNames = src.getAttributeNames(); - for ( int i = 0; i < attributeNames.length; i++ ) - { - String attributeName = attributeNames[i]; - setAttribute( attributeName, src.getAttribute( attributeName ) ); - } - - Xpp3Dom[] children = src.getChildren(); - for ( int i = 0; i < children.length; i++ ) - { - addChild( new Xpp3Dom( children[i] ) ); - } - } - - // ---------------------------------------------------------------------- - // Name handling - // ---------------------------------------------------------------------- - - public String getName() - { - return name; - } - - // ---------------------------------------------------------------------- - // Value handling - // ---------------------------------------------------------------------- - - public String getValue() - { - return value; - } - - public void setValue( String value ) - { - this.value = value; - } - - // ---------------------------------------------------------------------- - // Attribute handling - // ---------------------------------------------------------------------- - - public String[] getAttributeNames() - { - if ( null == attributes ) - { - return new String[0]; - } - else - { - return (String[]) attributes.keySet().toArray( new String[0] ); - } - } - - public String getAttribute( String name ) - { - return ( null != attributes ) ? (String) attributes.get( name ) : null; - } - - /** - * Set the attribute value - * @param name String not null - * @param value String not null - */ - public void setAttribute( String name, String value ) - { - if ( null == value ) { - throw new NullPointerException( "Attribute value can not be null" ); - } - if ( null == name ) { - throw new NullPointerException( "Attribute name can not be null" ); - } - if ( null == attributes ) - { - attributes = new HashMap(); - } - - attributes.put( name, value ); - } - - // ---------------------------------------------------------------------- - // Child handling - // ---------------------------------------------------------------------- - - public Xpp3Dom getChild( int i ) - { - return (Xpp3Dom) childList.get( i ); - } - - public Xpp3Dom getChild( String name ) - { - return (Xpp3Dom) childMap.get( name ); - } - - public void addChild( Xpp3Dom xpp3Dom ) - { - xpp3Dom.setParent( this ); - childList.add( xpp3Dom ); - childMap.put( xpp3Dom.getName(), xpp3Dom ); - } - - public Xpp3Dom[] getChildren() - { - if ( null == childList ) - { - return EMPTY_DOM_ARRAY; - } - else - { - return (Xpp3Dom[]) childList.toArray( EMPTY_DOM_ARRAY ); - } - } - - public Xpp3Dom[] getChildren( String name ) - { - if ( null == childList ) - { - return EMPTY_DOM_ARRAY; - } - else - { - ArrayList children = new ArrayList(); - int size = this.childList.size(); - - for ( int i = 0; i < size; i++ ) - { - Xpp3Dom configuration = (Xpp3Dom) this.childList.get( i ); - if ( name.equals( configuration.getName() ) ) - { - children.add( configuration ); - } - } - - return (Xpp3Dom[]) children.toArray( EMPTY_DOM_ARRAY ); - } - } - - public int getChildCount() - { - if ( null == childList ) - { - return 0; - } - - return childList.size(); - } - - public void removeChild( int i ) - { - Xpp3Dom child = getChild( i ); - childMap.values().remove( child ); - childList.remove( i ); - // In case of any dangling references - child.setParent( null ); - } - - // ---------------------------------------------------------------------- - // Parent handling - // ---------------------------------------------------------------------- - - public Xpp3Dom getParent() - { - return parent; - } - - public void setParent( Xpp3Dom parent ) - { - this.parent = parent; - } - - // ---------------------------------------------------------------------- - // Helpers - // ---------------------------------------------------------------------- - - public void writeToSerializer( String namespace, XmlSerializer serializer ) - throws IOException - { - // TODO: WARNING! Later versions of plexus-utils psit out an header due to thinking this is a new document - not the desired behaviour! - SerializerXMLWriter xmlWriter = new SerializerXMLWriter( namespace, serializer ); - Xpp3DomWriter.write( xmlWriter, this ); - if ( xmlWriter.getExceptions().size() > 0 ) - { - throw (IOException) xmlWriter.getExceptions().get( 0 ); - } - } - - /** - * Merges one DOM into another, given a specific algorithm and possible override points for that algorithm. - * The algorithm is as follows: - * - * 1. if the recessive DOM is null, there is nothing to do...return. - * - * 2. Determine whether the dominant node will suppress the recessive one (flag=mergeSelf). - * - * A. retrieve the 'combine.self' attribute on the dominant node, and try to match against 'override'... - * if it matches 'override', then set mergeSelf == false...the dominant node suppresses the recessive - * one completely. - * - * B. otherwise, use the default value for mergeSelf, which is true...this is the same as specifying - * 'combine.self' == 'merge' as an attribute of the dominant root node. - * - * 3. If mergeSelf == true - * - * A. if the dominant root node's value is empty, set it to the recessive root node's value - * - * B. For each attribute in the recessive root node which is not set in the dominant root node, set it. - * - * C. Determine whether children from the recessive DOM will be merged or appended to the dominant - * DOM as siblings (flag=mergeChildren). - * - * i. if childMergeOverride is set (non-null), use that value (true/false) - * - * ii. retrieve the 'combine.children' attribute on the dominant node, and try to match against - * 'append'...if it matches 'append', then set mergeChildren == false...the recessive children - * will be appended as siblings of the dominant children. - * - * iii. otherwise, use the default value for mergeChildren, which is true...this is the same as - * specifying 'combine.children' == 'merge' as an attribute on the dominant root node. - * - * D. Iterate through the recessive children, and: - * - * i. if mergeChildren == true and there is a corresponding dominant child (matched by element name), - * merge the two. - * - * ii. otherwise, add the recessive child as a new child on the dominant root node. - */ - private static void mergeIntoXpp3Dom( Xpp3Dom dominant, Xpp3Dom recessive, Boolean childMergeOverride ) - { - // TODO: share this as some sort of assembler, implement a walk interface? - if ( recessive == null ) - { - return; - } - - boolean mergeSelf = true; - - String selfMergeMode = dominant.getAttribute( SELF_COMBINATION_MODE_ATTRIBUTE ); - - if ( StringUtils.isNotEmpty( selfMergeMode ) && SELF_COMBINATION_OVERRIDE.equals( selfMergeMode ) ) - { - mergeSelf = false; - } - - if ( mergeSelf ) - { - if ( StringUtils.isEmpty( dominant.getValue() ) ) - { - dominant.setValue( recessive.getValue() ); - } - - String[] recessiveAttrs = recessive.getAttributeNames(); - for ( int i = 0; i < recessiveAttrs.length; i++ ) - { - String attr = recessiveAttrs[i]; - - if ( StringUtils.isEmpty( dominant.getAttribute( attr ) ) ) - { - dominant.setAttribute( attr, recessive.getAttribute( attr ) ); - } - } - - boolean mergeChildren = true; - - if ( childMergeOverride != null ) - { - mergeChildren = childMergeOverride.booleanValue(); - } - else - { - String childMergeMode = dominant.getAttribute( CHILDREN_COMBINATION_MODE_ATTRIBUTE ); - - if ( StringUtils.isNotEmpty( childMergeMode ) && CHILDREN_COMBINATION_APPEND.equals( childMergeMode ) ) - { - mergeChildren = false; - } - } - - Xpp3Dom[] children = recessive.getChildren(); - for ( int i = 0; i < children.length; i++ ) - { - Xpp3Dom child = children[i]; - Xpp3Dom childDom = dominant.getChild( child.getName() ); - if ( mergeChildren && childDom != null ) - { - mergeIntoXpp3Dom( childDom, child, childMergeOverride ); - } - else - { - dominant.addChild( new Xpp3Dom( child ) ); - } - } - } - } - - /** - * Merge two DOMs, with one having dominance in the case of collision. - * - * @see #CHILDREN_COMBINATION_MODE_ATTRIBUTE - * @see #SELF_COMBINATION_MODE_ATTRIBUTE - * - * @param dominant The dominant DOM into which the recessive value/attributes/children will be merged - * @param recessive The recessive DOM, which will be merged into the dominant DOM - * @param childMergeOverride Overrides attribute flags to force merging or appending of child elements - * into the dominant DOM - */ - public static Xpp3Dom mergeXpp3Dom( Xpp3Dom dominant, Xpp3Dom recessive, Boolean childMergeOverride ) - { - if ( dominant != null ) - { - mergeIntoXpp3Dom( dominant, recessive, childMergeOverride ); - return dominant; - } - return recessive; - } - - /** - * Merge two DOMs, with one having dominance in the case of collision. - * Merge mechanisms (vs. override for nodes, or vs. append for children) is determined by - * attributes of the dominant root node. - * - * @see #CHILDREN_COMBINATION_MODE_ATTRIBUTE - * @see #SELF_COMBINATION_MODE_ATTRIBUTE - * - * @param dominant The dominant DOM into which the recessive value/attributes/children will be merged - * @param recessive The recessive DOM, which will be merged into the dominant DOM - */ - public static Xpp3Dom mergeXpp3Dom( Xpp3Dom dominant, Xpp3Dom recessive ) - { - if ( dominant != null ) - { - mergeIntoXpp3Dom( dominant, recessive, null ); - return dominant; - } - return recessive; - } - - // ---------------------------------------------------------------------- - // Standard object handling - // ---------------------------------------------------------------------- - - public boolean equals( Object obj ) - { - if ( obj == this ) - { - return true; - } - - if ( !( obj instanceof Xpp3Dom ) ) - { - return false; - } - - Xpp3Dom dom = (Xpp3Dom) obj; - - if ( name == null ? dom.name != null : !name.equals( dom.name ) ) - { - return false; - } - else if ( value == null ? dom.value != null : !value.equals( dom.value ) ) - { - return false; - } - else if ( attributes == null ? dom.attributes != null : !dom.attributes.equals( attributes ) ) - { - return false; - } - else if ( childList == null ? dom.childList != null : !dom.childList.equals( childList ) ) - { - return false; - } - else - { - return true; - } - } - - public int hashCode() - { - int result = 17; - result = 37 * result + ( name != null ? name.hashCode() : 0 ); - result = 37 * result + ( value != null ? value.hashCode() : 0 ); - result = 37 * result + ( attributes != null ? attributes.hashCode() : 0 ); - result = 37 * result + ( childList != null ? childList.hashCode() : 0 ); - return result; - } - - public String toString() - { - // TODO: WARNING! Later versions of plexus-utils psit out an header due to thinking this is a new document - not the desired behaviour! - StringWriter writer = new StringWriter(); - XMLWriter xmlWriter = new PrettyPrintXMLWriter( writer, "UTF-8", null ); - Xpp3DomWriter.write( xmlWriter, this ); - return writer.toString(); - } - - public String toUnescapedString() - { - // TODO: WARNING! Later versions of plexus-utils psit out an header due to thinking this is a new document - not the desired behaviour! - StringWriter writer = new StringWriter(); - XMLWriter xmlWriter = new PrettyPrintXMLWriter( writer, "UTF-8", null ); - Xpp3DomWriter.write( xmlWriter, this, false ); - return writer.toString(); - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomBuilder.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomBuilder.java deleted file mode 100644 index 4ad5debfb..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomBuilder.java +++ /dev/null @@ -1,192 +0,0 @@ -package org.codehaus.plexus.util.xml; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import org.codehaus.plexus.util.IOUtil; -import org.codehaus.plexus.util.xml.pull.MXParser; -import org.codehaus.plexus.util.xml.pull.XmlPullParser; -import org.codehaus.plexus.util.xml.pull.XmlPullParserException; - -import java.io.IOException; -import java.io.InputStream; -import java.io.Reader; -import java.util.ArrayList; -import java.util.List; - -/** - * @version $Id$ - */ -public class Xpp3DomBuilder -{ - private static final boolean DEFAULT_TRIM = true; - - public static Xpp3Dom build( Reader reader ) - throws XmlPullParserException, IOException - { - return build( reader, DEFAULT_TRIM ); - } - - public static Xpp3Dom build( InputStream is, String encoding ) - throws XmlPullParserException, IOException - { - return build( is, encoding, DEFAULT_TRIM ); - } - - public static Xpp3Dom build( InputStream is, String encoding, boolean trim ) - throws XmlPullParserException, IOException - { - XmlPullParser parser = new MXParser(); - - parser.setInput( is, encoding ); - - try - { - return build( parser, trim ); - } - finally - { - IOUtil.close( is ); - } - } - - public static Xpp3Dom build( Reader reader, boolean trim ) - throws XmlPullParserException, IOException - { - XmlPullParser parser = new MXParser(); - - parser.setInput( reader ); - - try - { - return build( parser, trim ); - } - finally - { - IOUtil.close( reader ); - } - } - - public static Xpp3Dom build( XmlPullParser parser ) - throws XmlPullParserException, IOException - { - return build( parser, DEFAULT_TRIM ); - } - - public static Xpp3Dom build( XmlPullParser parser, boolean trim ) - throws XmlPullParserException, IOException - { - List elements = new ArrayList(); - - List values = new ArrayList(); - - int eventType = parser.getEventType(); - - while ( eventType != XmlPullParser.END_DOCUMENT ) - { - if ( eventType == XmlPullParser.START_TAG ) - { - String rawName = parser.getName(); - - Xpp3Dom childConfiguration = new Xpp3Dom( rawName ); - - int depth = elements.size(); - - if ( depth > 0 ) - { - Xpp3Dom parent = (Xpp3Dom) elements.get( depth - 1 ); - - parent.addChild( childConfiguration ); - } - - elements.add( childConfiguration ); - - if ( parser.isEmptyElementTag() ) - { - values.add( null ); - } - else - { - values.add( new StringBuffer() ); - } - - int attributesSize = parser.getAttributeCount(); - - for ( int i = 0; i < attributesSize; i++ ) - { - String name = parser.getAttributeName( i ); - - String value = parser.getAttributeValue( i ); - - childConfiguration.setAttribute( name, value ); - } - } - else if ( eventType == XmlPullParser.TEXT ) - { - int depth = values.size() - 1; - - StringBuffer valueBuffer = (StringBuffer) values.get( depth ); - - String text = parser.getText(); - - if ( trim ) - { - text = text.trim(); - } - - valueBuffer.append( text ); - } - else if ( eventType == XmlPullParser.END_TAG ) - { - int depth = elements.size() - 1; - - Xpp3Dom finishedConfiguration = (Xpp3Dom) elements.remove( depth ); - - /* this Object could be null if it is a singleton tag */ - Object accumulatedValue = values.remove( depth ); - - if ( finishedConfiguration.getChildCount() == 0 ) - { - if ( accumulatedValue == null ) - { - finishedConfiguration.setValue( null ); - } - else - { - finishedConfiguration.setValue( accumulatedValue.toString() ); - } - } - - if ( depth == 0 ) - { - return finishedConfiguration; - } - } - - eventType = parser.next(); - } - - throw new IllegalStateException( "End of document found before returning to 0 depth" ); - } -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomWriter.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomWriter.java deleted file mode 100755 index 1bd410459..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/Xpp3DomWriter.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.codehaus.plexus.util.xml; - -import java.io.PrintWriter; -import java.io.Writer; - -public class Xpp3DomWriter -{ - public static void write( Writer writer, Xpp3Dom dom ) - { - write( new PrettyPrintXMLWriter( writer ), dom ); - } - - public static void write( PrintWriter writer, Xpp3Dom dom ) - { - write( new PrettyPrintXMLWriter( writer ), dom ); - } - - public static void write( XMLWriter xmlWriter, Xpp3Dom dom ) - { - write( xmlWriter, dom, true ); - } - - public static void write( XMLWriter xmlWriter, Xpp3Dom dom, boolean escape ) - { - // TODO: move to XMLWriter? - xmlWriter.startElement( dom.getName() ); - String[] attributeNames = dom.getAttributeNames(); - for ( int i = 0; i < attributeNames.length; i++ ) - { - String attributeName = attributeNames[i]; - xmlWriter.addAttribute( attributeName, dom.getAttribute( attributeName ) ); - } - Xpp3Dom[] children = dom.getChildren(); - for ( int i = 0; i < children.length; i++ ) - { - write( xmlWriter, children[i] ); - } - - String value = dom.getValue(); - if ( value != null ) - { - if ( escape ) - { - xmlWriter.writeText( value ); - } - else - { - xmlWriter.writeMarkup( value ); - } - } - - xmlWriter.endElement(); - } - - -} diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/pull/MXParser.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/pull/MXParser.java deleted file mode 100644 index f511f770f..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/pull/MXParser.java +++ /dev/null @@ -1,3289 +0,0 @@ -/* -*- c-basic-offset: 4; indent-tabs-mode: nil; -*- //------100-columns-wide------>|*/ -/* - * Copyright (c) 2003 Extreme! Lab, Indiana University. All rights reserved. - * - * This software is open source. See the bottom of this file for the licence. - * - * $Id$ - */ - -package org.codehaus.plexus.util.xml.pull; - -import java.io.EOFException; -import java.io.IOException; -import java.io.Reader; -import java.io.InputStreamReader; -import java.io.UnsupportedEncodingException; - -//import java.util.Hashtable; - -//TODO best handling of interning issues -// have isAllNewStringInterned ??? - -//TODO handling surrogate pairs: http://www.unicode.org/unicode/faq/utf_bom.html#6 - -//TODO review code for use of bufAbsoluteStart when keeping pos between next()/fillBuf() - -/** - * Absolutely minimal implementaion of XMLPULL V1 API - * - * @author Aleksander Slominski - */ - -public class MXParser - implements XmlPullParser -{ - //NOTE: no interning of those strings --> by Java leng spec they MUST be already interned - protected final static String XML_URI = "http://www.w3.org/XML/1998/namespace"; - protected final static String XMLNS_URI = "http://www.w3.org/2000/xmlns/"; - protected final static String FEATURE_XML_ROUNDTRIP= - //"http://xmlpull.org/v1/doc/features.html#xml-roundtrip"; - "http://xmlpull.org/v1/doc/features.html#xml-roundtrip"; - protected final static String FEATURE_NAMES_INTERNED = - "http://xmlpull.org/v1/doc/features.html#names-interned"; - protected final static String PROPERTY_XMLDECL_VERSION = - "http://xmlpull.org/v1/doc/properties.html#xmldecl-version"; - protected final static String PROPERTY_XMLDECL_STANDALONE = - "http://xmlpull.org/v1/doc/properties.html#xmldecl-standalone"; - protected final static String PROPERTY_XMLDECL_CONTENT = - "http://xmlpull.org/v1/doc/properties.html#xmldecl-content"; - protected final static String PROPERTY_LOCATION = - "http://xmlpull.org/v1/doc/properties.html#location"; - - /** - * Implementation notice: - * the is instance variable that controls if newString() is interning. - *

NOTE: newStringIntern always returns interned strings - * and newString MAY return interned String depending on this variable. - *

NOTE: by default in this minimal implementation it is false! - */ - protected boolean allStringsInterned; - - protected void resetStringCache() { - //System.out.println("resetStringCache() minimum called"); - } - - protected String newString(char[] cbuf, int off, int len) { - return new String(cbuf, off, len); - } - - protected String newStringIntern(char[] cbuf, int off, int len) { - return (new String(cbuf, off, len)).intern(); - } - - private static final boolean TRACE_SIZING = false; - - // NOTE: features are not resetable and typicaly defaults to false ... - protected boolean processNamespaces; - protected boolean roundtripSupported; - - // global parser state - protected String location; - protected int lineNumber; - protected int columnNumber; - protected boolean seenRoot; - protected boolean reachedEnd; - protected int eventType; - protected boolean emptyElementTag; - // element stack - protected int depth; - protected char[] elRawName[]; - protected int elRawNameEnd[]; - protected int elRawNameLine[]; - - protected String elName[]; - protected String elPrefix[]; - protected String elUri[]; - //protected String elValue[]; - protected int elNamespaceCount[]; - - - - /** - * Make sure that we have enough space to keep element stack if passed size. - * It will always create one additional slot then current depth - */ - protected void ensureElementsCapacity() { - final int elStackSize = elName != null ? elName.length : 0; - if( (depth + 1) >= elStackSize) { - // we add at least one extra slot ... - final int newSize = (depth >= 7 ? 2 * depth : 8) + 2; // = lucky 7 + 1 //25 - if(TRACE_SIZING) { - System.err.println("TRACE_SIZING elStackSize "+elStackSize+" ==> "+newSize); - } - final boolean needsCopying = elStackSize > 0; - String[] arr = null; - // resue arr local variable slot - arr = new String[newSize]; - if(needsCopying) System.arraycopy(elName, 0, arr, 0, elStackSize); - elName = arr; - arr = new String[newSize]; - if(needsCopying) System.arraycopy(elPrefix, 0, arr, 0, elStackSize); - elPrefix = arr; - arr = new String[newSize]; - if(needsCopying) System.arraycopy(elUri, 0, arr, 0, elStackSize); - elUri = arr; - - int[] iarr = new int[newSize]; - if(needsCopying) { - System.arraycopy(elNamespaceCount, 0, iarr, 0, elStackSize); - } else { - // special initialization - iarr[0] = 0; - } - elNamespaceCount = iarr; - - //TODO: avoid using element raw name ... - iarr = new int[newSize]; - if(needsCopying) { - System.arraycopy(elRawNameEnd, 0, iarr, 0, elStackSize); - } - elRawNameEnd = iarr; - - iarr = new int[newSize]; - if(needsCopying) { - System.arraycopy(elRawNameLine, 0, iarr, 0, elStackSize); - } - elRawNameLine = iarr; - - final char[][] carr = new char[newSize][]; - if(needsCopying) { - System.arraycopy(elRawName, 0, carr, 0, elStackSize); - } - elRawName = carr; - // arr = new String[newSize]; - // if(needsCopying) System.arraycopy(elLocalName, 0, arr, 0, elStackSize); - // elLocalName = arr; - // arr = new String[newSize]; - // if(needsCopying) System.arraycopy(elDefaultNs, 0, arr, 0, elStackSize); - // elDefaultNs = arr; - // int[] iarr = new int[newSize]; - // if(needsCopying) System.arraycopy(elNsStackPos, 0, iarr, 0, elStackSize); - // for (int i = elStackSize; i < iarr.length; i++) - // { - // iarr[i] = (i > 0) ? -1 : 0; - // } - // elNsStackPos = iarr; - //assert depth < elName.length; - } - } - - - - // attribute stack - protected int attributeCount; - protected String attributeName[]; - protected int attributeNameHash[]; - //protected int attributeNameStart[]; - //protected int attributeNameEnd[]; - protected String attributePrefix[]; - protected String attributeUri[]; - protected String attributeValue[]; - //protected int attributeValueStart[]; - //protected int attributeValueEnd[]; - - - /** - * Make sure that in attributes temporary array is enough space. - */ - protected void ensureAttributesCapacity(int size) { - final int attrPosSize = attributeName != null ? attributeName.length : 0; - if(size >= attrPosSize) { - final int newSize = size > 7 ? 2 * size : 8; // = lucky 7 + 1 //25 - if(TRACE_SIZING) { - System.err.println("TRACE_SIZING attrPosSize "+attrPosSize+" ==> "+newSize); - } - final boolean needsCopying = attrPosSize > 0; - String[] arr = null; - - arr = new String[newSize]; - if(needsCopying) System.arraycopy(attributeName, 0, arr, 0, attrPosSize); - attributeName = arr; - - arr = new String[newSize]; - if(needsCopying) System.arraycopy(attributePrefix, 0, arr, 0, attrPosSize); - attributePrefix = arr; - - arr = new String[newSize]; - if(needsCopying) System.arraycopy(attributeUri, 0, arr, 0, attrPosSize); - attributeUri = arr; - - arr = new String[newSize]; - if(needsCopying) System.arraycopy(attributeValue, 0, arr, 0, attrPosSize); - attributeValue = arr; - - if( ! allStringsInterned ) { - final int[] iarr = new int[newSize]; - if(needsCopying) System.arraycopy(attributeNameHash, 0, iarr, 0, attrPosSize); - attributeNameHash = iarr; - } - - arr = null; - // //assert attrUri.length > size - } - } - - // namespace stack - protected int namespaceEnd; - protected String namespacePrefix[]; - protected int namespacePrefixHash[]; - protected String namespaceUri[]; - - protected void ensureNamespacesCapacity(int size) { - final int namespaceSize = namespacePrefix != null ? namespacePrefix.length : 0; - if(size >= namespaceSize) { - final int newSize = size > 7 ? 2 * size : 8; // = lucky 7 + 1 //25 - if(TRACE_SIZING) { - System.err.println("TRACE_SIZING namespaceSize "+namespaceSize+" ==> "+newSize); - } - final String[] newNamespacePrefix = new String[newSize]; - final String[] newNamespaceUri = new String[newSize]; - if(namespacePrefix != null) { - System.arraycopy( - namespacePrefix, 0, newNamespacePrefix, 0, namespaceEnd); - System.arraycopy( - namespaceUri, 0, newNamespaceUri, 0, namespaceEnd); - } - namespacePrefix = newNamespacePrefix; - namespaceUri = newNamespaceUri; - - - if( ! allStringsInterned ) { - final int[] newNamespacePrefixHash = new int[newSize]; - if(namespacePrefixHash != null) { - System.arraycopy( - namespacePrefixHash, 0, newNamespacePrefixHash, 0, namespaceEnd); - } - namespacePrefixHash = newNamespacePrefixHash; - } - //prefixesSize = newSize; - // //assert nsPrefixes.length > size && nsPrefixes.length == newSize - } - } - - /** - * simplistic implementation of hash function that has constant - * time to compute - so it also means diminishing hash quality for long strings - * but for XML parsing it should be good enough ... - */ - protected static final int fastHash( char ch[], int off, int len ) { - if(len == 0) return 0; - //assert len >0 - int hash = ch[off]; // hash at beginnig - //try { - hash = (hash << 7) + ch[ off + len - 1 ]; // hash at the end - //} catch(ArrayIndexOutOfBoundsException aie) { - // aie.printStackTrace(); //should never happen ... - // throw new RuntimeException("this is violation of pre-condition"); - //} - if(len > 16) hash = (hash << 7) + ch[ off + (len / 4)]; // 1/4 from beginning - if(len > 8) hash = (hash << 7) + ch[ off + (len / 2)]; // 1/2 of string size ... - // notice that hash is at most done 3 times <<7 so shifted by 21 bits 8 bit value - // so max result == 29 bits so it is quite just below 31 bits for long (2^32) ... - //assert hash >= 0; - return hash; - } - - // entity replacement stack - protected int entityEnd; - - protected String entityName[]; - protected char[] entityNameBuf[]; - protected String entityReplacement[]; - protected char[] entityReplacementBuf[]; - - protected int entityNameHash[]; - - protected void ensureEntityCapacity() { - final int entitySize = entityReplacementBuf != null ? entityReplacementBuf.length : 0; - if(entityEnd >= entitySize) { - final int newSize = entityEnd > 7 ? 2 * entityEnd : 8; // = lucky 7 + 1 //25 - if(TRACE_SIZING) { - System.err.println("TRACE_SIZING entitySize "+entitySize+" ==> "+newSize); - } - final String[] newEntityName = new String[newSize]; - final char[] newEntityNameBuf[] = new char[newSize][]; - final String[] newEntityReplacement = new String[newSize]; - final char[] newEntityReplacementBuf[] = new char[newSize][]; - if(entityName != null) { - System.arraycopy(entityName, 0, newEntityName, 0, entityEnd); - System.arraycopy(entityNameBuf, 0, newEntityNameBuf, 0, entityEnd); - System.arraycopy(entityReplacement, 0, newEntityReplacement, 0, entityEnd); - System.arraycopy(entityReplacementBuf, 0, newEntityReplacementBuf, 0, entityEnd); - } - entityName = newEntityName; - entityNameBuf = newEntityNameBuf; - entityReplacement = newEntityReplacement; - entityReplacementBuf = newEntityReplacementBuf; - - if( ! allStringsInterned ) { - final int[] newEntityNameHash = new int[newSize]; - if(entityNameHash != null) { - System.arraycopy(entityNameHash, 0, newEntityNameHash, 0, entityEnd); - } - entityNameHash = newEntityNameHash; - } - } - } - - // input buffer management - protected static final int READ_CHUNK_SIZE = 8*1024; //max data chars in one read() call - protected Reader reader; - protected String inputEncoding; - - - protected int bufLoadFactor = 95; // 99% - //protected int bufHardLimit; // only matters when expanding - - protected char buf[] = new char[ - Runtime.getRuntime().freeMemory() > 1000000L ? READ_CHUNK_SIZE : 256 ]; - protected int bufSoftLimit = ( bufLoadFactor * buf.length ) /100; // desirable size of buffer - protected boolean preventBufferCompaction; - - protected int bufAbsoluteStart; // this is buf - protected int bufStart; - protected int bufEnd; - protected int pos; - protected int posStart; - protected int posEnd; - - protected char pc[] = new char[ - Runtime.getRuntime().freeMemory() > 1000000L ? READ_CHUNK_SIZE : 64 ]; - protected int pcStart; - protected int pcEnd; - - - // parsing state - //protected boolean needsMore; - //protected boolean seenMarkup; - protected boolean usePC; - - - protected boolean seenStartTag; - protected boolean seenEndTag; - protected boolean pastEndTag; - protected boolean seenAmpersand; - protected boolean seenMarkup; - protected boolean seenDocdecl; - - // transient variable set during each call to next/Token() - protected boolean tokenize; - protected String text; - protected String entityRefName; - - protected String xmlDeclVersion; - protected Boolean xmlDeclStandalone; - protected String xmlDeclContent; - - protected void reset() { - //System.out.println("reset() called"); - location = null; - lineNumber = 1; - columnNumber = 0; - seenRoot = false; - reachedEnd = false; - eventType = START_DOCUMENT; - emptyElementTag = false; - - depth = 0; - - attributeCount = 0; - - namespaceEnd = 0; - - entityEnd = 0; - - reader = null; - inputEncoding = null; - - preventBufferCompaction = false; - bufAbsoluteStart = 0; - bufEnd = bufStart = 0; - pos = posStart = posEnd = 0; - - pcEnd = pcStart = 0; - - usePC = false; - - seenStartTag = false; - seenEndTag = false; - pastEndTag = false; - seenAmpersand = false; - seenMarkup = false; - seenDocdecl = false; - - xmlDeclVersion = null; - xmlDeclStandalone = null; - xmlDeclContent = null; - - resetStringCache(); - } - - public MXParser() { - } - - - /** - * Method setFeature - * - * @param name a String - * @param state a boolean - * - * @throws XmlPullParserException - * - */ - public void setFeature(String name, - boolean state) throws XmlPullParserException - { - if(name == null) throw new IllegalArgumentException("feature name should not be null"); - if(FEATURE_PROCESS_NAMESPACES.equals(name)) { - if(eventType != START_DOCUMENT) throw new XmlPullParserException( - "namespace processing feature can only be changed before parsing", this, null); - processNamespaces = state; - // } else if(FEATURE_REPORT_NAMESPACE_ATTRIBUTES.equals(name)) { - // if(type != START_DOCUMENT) throw new XmlPullParserException( - // "namespace reporting feature can only be changed before parsing", this, null); - // reportNsAttribs = state; - } else if(FEATURE_NAMES_INTERNED.equals(name)) { - if(state != false) { - throw new XmlPullParserException( - "interning names in this implementation is not supported"); - } - } else if(FEATURE_PROCESS_DOCDECL.equals(name)) { - if(state != false) { - throw new XmlPullParserException( - "processing DOCDECL is not supported"); - } - //} else if(REPORT_DOCDECL.equals(name)) { - // paramNotifyDoctype = state; - } else if(FEATURE_XML_ROUNDTRIP.equals(name)) { - //if(state == false) { - // throw new XmlPullParserException( - // "roundtrip feature can not be switched off"); - //} - roundtripSupported = state; - } else { - throw new XmlPullParserException("unsupporte feature "+name); - } - } - - /** Unknown properties are always returned as false */ - public boolean getFeature(String name) - { - if(name == null) throw new IllegalArgumentException("feature name should not be nulll"); - if(FEATURE_PROCESS_NAMESPACES.equals(name)) { - return processNamespaces; - // } else if(FEATURE_REPORT_NAMESPACE_ATTRIBUTES.equals(name)) { - // return reportNsAttribs; - } else if(FEATURE_NAMES_INTERNED.equals(name)) { - return false; - } else if(FEATURE_PROCESS_DOCDECL.equals(name)) { - return false; - //} else if(REPORT_DOCDECL.equals(name)) { - // return paramNotifyDoctype; - } else if(FEATURE_XML_ROUNDTRIP.equals(name)) { - //return true; - return roundtripSupported; - } - return false; - } - - public void setProperty(String name, - Object value) - throws XmlPullParserException - { - if(PROPERTY_LOCATION.equals(name)) { - location = (String) value; - } else { - throw new XmlPullParserException("unsupported property: '"+name+"'"); - } - } - - - public Object getProperty(String name) - { - if(name == null) throw new IllegalArgumentException("property name should not be nulll"); - if(PROPERTY_XMLDECL_VERSION.equals(name)) { - return xmlDeclVersion; - } else if(PROPERTY_XMLDECL_STANDALONE.equals(name)) { - return xmlDeclStandalone; - } else if(PROPERTY_XMLDECL_CONTENT.equals(name)) { - return xmlDeclContent; - } else if(PROPERTY_LOCATION.equals(name)) { - return location; - } - return null; - } - - - public void setInput(Reader in) throws XmlPullParserException - { - reset(); - reader = in; - } - - - public void setInput(java.io.InputStream inputStream, String inputEncoding) - throws XmlPullParserException - { - if(inputStream == null) { - throw new IllegalArgumentException("input stream can not be null"); - } - Reader reader; - if(inputEncoding != null) { - try { - if(inputEncoding != null) { - reader = new InputStreamReader(inputStream, inputEncoding); - } else { - reader = new InputStreamReader(inputStream); - } - } catch (UnsupportedEncodingException une) { - throw new XmlPullParserException( - "could not create reader for encoding "+inputEncoding+" : "+une, this, une); - } - } else { - reader = new InputStreamReader(inputStream); - } - setInput(reader); - //must be here as reest() was called in setInput() and has set this.inputEncoding to null ... - this.inputEncoding = inputEncoding; - } - - public String getInputEncoding() { - return inputEncoding; - } - - public void defineEntityReplacementText(String entityName, - String replacementText) - throws XmlPullParserException - { - // throw new XmlPullParserException("not allowed"); - - //protected char[] entityReplacement[]; - ensureEntityCapacity(); - - // this is to make sure that if interning works we wil take advatage of it ... - this.entityName[entityEnd] = newString(entityName.toCharArray(), 0, entityName.length()); - entityNameBuf[entityEnd] = entityName.toCharArray(); - - entityReplacement[entityEnd] = replacementText; - entityReplacementBuf[entityEnd] = replacementText.toCharArray(); - if(!allStringsInterned) { - entityNameHash[ entityEnd ] = - fastHash(entityNameBuf[entityEnd], 0, entityNameBuf[entityEnd].length); - } - ++entityEnd; - //TODO disallow < or & in entity replacement text (or ]]>???) - // TOOD keepEntityNormalizedForAttributeValue cached as well ... - } - - public int getNamespaceCount(int depth) - throws XmlPullParserException - { - if(processNamespaces == false || depth == 0) { - return 0; - } - //int maxDepth = eventType == END_TAG ? this.depth + 1 : this.depth; - //if(depth < 0 || depth > maxDepth) throw new IllegalArgumentException( - if(depth < 0 || depth > this.depth) throw new IllegalArgumentException( - "napespace count mayt be for depth 0.."+this.depth+" not "+depth); - return elNamespaceCount[ depth ]; - } - - public String getNamespacePrefix(int pos) - throws XmlPullParserException - { - - //int end = eventType == END_TAG ? elNamespaceCount[ depth + 1 ] : namespaceEnd; - //if(pos < end) { - if(pos < namespaceEnd) { - return namespacePrefix[ pos ]; - } else { - throw new XmlPullParserException( - "position "+pos+" exceeded number of available namespaces "+namespaceEnd); - } - } - - public String getNamespaceUri(int pos) throws XmlPullParserException - { - //int end = eventType == END_TAG ? elNamespaceCount[ depth + 1 ] : namespaceEnd; - //if(pos < end) { - if(pos < namespaceEnd) { - return namespaceUri[ pos ]; - } else { - throw new XmlPullParserException( - "position "+pos+" exceedded number of available namespaces "+namespaceEnd); - } - } - - public String getNamespace( String prefix ) - //throws XmlPullParserException - { - //int count = namespaceCount[ depth ]; - if(prefix != null) { - for( int i = namespaceEnd -1; i >= 0; i--) { - if( prefix.equals( namespacePrefix[ i ] ) ) { - return namespaceUri[ i ]; - } - } - if("xml".equals( prefix )) { - return XML_URI; - } else if("xmlns".equals( prefix )) { - return XMLNS_URI; - } - } else { - for( int i = namespaceEnd -1; i >= 0; i--) { - if( namespacePrefix[ i ] == null) { //"") { //null ) { //TODO check FIXME Alek - return namespaceUri[ i ]; - } - } - - } - return null; - } - - - public int getDepth() - { - return depth; - } - - - private static int findFragment(int bufMinPos, char[] b, int start, int end) { - //System.err.println("bufStart="+bufStart+" b="+printable(new String(b, start, end - start))+" start="+start+" end="+end); - if(start < bufMinPos) { - start = bufMinPos; - if(start > end) start = end; - return start; - } - if(end - start > 65) { - start = end - 10; // try to find good location - } - int i = start + 1; - while(--i > bufMinPos) { - if((end - i) > 65) break; - final char c = b[i]; - if(c == '<' && (start - i) > 10) break; - } - return i; - } - - - /** - * Return string describing current position of parsers as - * text 'STATE [seen %s...] @line:column'. - */ - public String getPositionDescription () - { - String fragment = null; - if(posStart <= pos) { - final int start = findFragment(0, buf, posStart, pos); - //System.err.println("start="+start); - if(start < pos) { - fragment = new String(buf, start, pos - start); - } - if(bufAbsoluteStart > 0 || start > 0) fragment = "..." + fragment; - } - // return " at line "+tokenizerPosRow - // +" and column "+(tokenizerPosCol-1) - // +(fragment != null ? " seen "+printable(fragment)+"..." : ""); - return " "+TYPES[ eventType ] + - (fragment != null ? " seen "+printable(fragment)+"..." : "") - +" "+(location != null ? location : "") - +"@"+getLineNumber()+":"+getColumnNumber(); - } - - public int getLineNumber() - { - return lineNumber; - } - - public int getColumnNumber() - { - return columnNumber; - } - - - public boolean isWhitespace() throws XmlPullParserException - { - if(eventType == TEXT || eventType == CDSECT) { - if(usePC) { - for (int i = pcStart; i = 0; i--) { - // if( prefix.equals( namespacePrefix[ i ] ) ) { - // return namespaceUri[ i ]; - // } - // } - // } else { - // for( int i = namespaceEnd -1; i >= 0; i--) { - // if( namespacePrefix[ i ] == null ) { - // return namespaceUri[ i ]; - // } - // } - // - // } - // return ""; - } - - public String getName() - { - if(eventType == START_TAG) { - //return elName[ depth - 1 ] ; - return elName[ depth ] ; - } else if(eventType == END_TAG) { - return elName[ depth ] ; - } else if(eventType == ENTITY_REF) { - if(entityRefName == null) { - entityRefName = newString(buf, posStart, posEnd - posStart); - } - return entityRefName; - } else { - return null; - } - } - - public String getPrefix() - { - if(eventType == START_TAG) { - //return elPrefix[ depth - 1 ] ; - return elPrefix[ depth ] ; - } else if(eventType == END_TAG) { - return elPrefix[ depth ] ; - } - return null; - // if(eventType != START_TAG && eventType != END_TAG) return null; - // int maxDepth = eventType == END_TAG ? depth : depth - 1; - // return elPrefix[ maxDepth ]; - } - - - public boolean isEmptyElementTag() throws XmlPullParserException - { - if(eventType != START_TAG) throw new XmlPullParserException( - "parser must be on START_TAG to check for empty element", this, null); - return emptyElementTag; - } - - public int getAttributeCount() - { - if(eventType != START_TAG) return -1; - return attributeCount; - } - - public String getAttributeNamespace(int index) - { - if(eventType != START_TAG) throw new IndexOutOfBoundsException( - "only START_TAG can have attributes"); - if(processNamespaces == false) return NO_NAMESPACE; - if(index < 0 || index >= attributeCount) throw new IndexOutOfBoundsException( - "attribute position must be 0.."+(attributeCount-1)+" and not "+index); - return attributeUri[ index ]; - } - - public String getAttributeName(int index) - { - if(eventType != START_TAG) throw new IndexOutOfBoundsException( - "only START_TAG can have attributes"); - if(index < 0 || index >= attributeCount) throw new IndexOutOfBoundsException( - "attribute position must be 0.."+(attributeCount-1)+" and not "+index); - return attributeName[ index ]; - } - - public String getAttributePrefix(int index) - { - if(eventType != START_TAG) throw new IndexOutOfBoundsException( - "only START_TAG can have attributes"); - if(processNamespaces == false) return null; - if(index < 0 || index >= attributeCount) throw new IndexOutOfBoundsException( - "attribute position must be 0.."+(attributeCount-1)+" and not "+index); - return attributePrefix[ index ]; - } - - public String getAttributeType(int index) { - if(eventType != START_TAG) throw new IndexOutOfBoundsException( - "only START_TAG can have attributes"); - if(index < 0 || index >= attributeCount) throw new IndexOutOfBoundsException( - "attribute position must be 0.."+(attributeCount-1)+" and not "+index); - return "CDATA"; - } - - public boolean isAttributeDefault(int index) { - if(eventType != START_TAG) throw new IndexOutOfBoundsException( - "only START_TAG can have attributes"); - if(index < 0 || index >= attributeCount) throw new IndexOutOfBoundsException( - "attribute position must be 0.."+(attributeCount-1)+" and not "+index); - return false; - } - - public String getAttributeValue(int index) - { - if(eventType != START_TAG) throw new IndexOutOfBoundsException( - "only START_TAG can have attributes"); - if(index < 0 || index >= attributeCount) throw new IndexOutOfBoundsException( - "attribute position must be 0.."+(attributeCount-1)+" and not "+index); - return attributeValue[ index ]; - } - - public String getAttributeValue(String namespace, - String name) - { - if(eventType != START_TAG) throw new IndexOutOfBoundsException( - "only START_TAG can have attributes"+getPositionDescription()); - if(name == null) { - throw new IllegalArgumentException("attribute name can not be null"); - } - // TODO make check if namespace is interned!!! etc. for names!!! - if(processNamespaces) { - if(namespace == null) { - namespace = ""; - } - - for(int i = 0; i < attributeCount; ++i) { - if((namespace == attributeUri[ i ] || - namespace.equals(attributeUri[ i ]) ) - //(namespace != null && namespace.equals(attributeUri[ i ])) - // taking advantage of String.intern() - && name.equals(attributeName[ i ]) ) - { - return attributeValue[i]; - } - } - } else { - if(namespace != null && namespace.length() == 0) { - namespace = null; - } - if(namespace != null) throw new IllegalArgumentException( - "when namespaces processing is disabled attribute namespace must be null"); - for(int i = 0; i < attributeCount; ++i) { - if(name.equals(attributeName[i])) - { - return attributeValue[i]; - } - } - } - return null; - } - - - public int getEventType() - throws XmlPullParserException - { - return eventType; - } - - public void require(int type, String namespace, String name) - throws XmlPullParserException, IOException - { - if(processNamespaces == false && namespace != null) { - throw new XmlPullParserException( - "processing namespaces must be enabled on parser (or factory)"+ - " to have possible namespaces delcared on elements" - +(" (postion:"+ getPositionDescription())+")"); - } - if (type != getEventType() - || (namespace != null && !namespace.equals (getNamespace())) - || (name != null && !name.equals (getName ())) ) - { - throw new XmlPullParserException ( - "expected event "+TYPES[ type ] - +(name != null ? " with name '"+name+"'" : "") - +(namespace != null && name != null ? " and" : "") - +(namespace != null ? " with namespace '"+namespace+"'" : "") - +" but got" - +(type != getEventType() ? " "+TYPES[ getEventType() ] : "") - +(name != null && getName() != null && !name.equals (getName ()) - ? " name '"+getName()+"'" : "") - +(namespace != null && name != null - && getName() != null && !name.equals (getName ()) - && getNamespace() != null && !namespace.equals (getNamespace()) - ? " and" : "") - +(namespace != null && getNamespace() != null && !namespace.equals (getNamespace()) - ? " namespace '"+getNamespace()+"'" : "") - +(" (postion:"+ getPositionDescription())+")"); - } - } - - - /** - * Skip sub tree that is currently porser positioned on. - *
NOTE: parser must be on START_TAG and when funtion returns - * parser will be positioned on corresponding END_TAG - */ - public void skipSubTree() - throws XmlPullParserException, IOException - { - require(START_TAG, null, null); - int level = 1; - while(level > 0) { - int eventType = next(); - if(eventType == END_TAG) { - --level; - } else if(eventType == START_TAG) { - ++level; - } - } - } - - // public String readText() throws XmlPullParserException, IOException - // { - // if (getEventType() != TEXT) return ""; - // String result = getText(); - // next(); - // return result; - // } - - public String nextText() throws XmlPullParserException, IOException - { - // String result = null; - // boolean onStartTag = false; - // if(eventType == START_TAG) { - // onStartTag = true; - // next(); - // } - // if(eventType == TEXT) { - // result = getText(); - // next(); - // } else if(onStartTag && eventType == END_TAG) { - // result = ""; - // } else { - // throw new XmlPullParserException( - // "parser must be on START_TAG or TEXT to read text", this, null); - // } - // if(eventType != END_TAG) { - // throw new XmlPullParserException( - // "event TEXT it must be immediately followed by END_TAG", this, null); - // } - // return result; - if(getEventType() != START_TAG) { - throw new XmlPullParserException( - "parser must be on START_TAG to read next text", this, null); - } - int eventType = next(); - if(eventType == TEXT) { - final String result = getText(); - eventType = next(); - if(eventType != END_TAG) { - throw new XmlPullParserException( - "TEXT must be immediately followed by END_TAG and not " - +TYPES[ getEventType() ], this, null); - } - return result; - } else if(eventType == END_TAG) { - return ""; - } else { - throw new XmlPullParserException( - "parser must be on START_TAG or TEXT to read text", this, null); - } - } - - public int nextTag() throws XmlPullParserException, IOException - { - next(); - if(eventType == TEXT && isWhitespace()) { // skip whitespace - next(); - } - if (eventType != START_TAG && eventType != END_TAG) { - throw new XmlPullParserException("expected START_TAG or END_TAG not " - +TYPES[ getEventType() ], this, null); - } - return eventType; - } - - public int next() - throws XmlPullParserException, IOException - { - tokenize = false; - return nextImpl(); - } - - public int nextToken() - throws XmlPullParserException, IOException - { - tokenize = true; - return nextImpl(); - } - - - protected int nextImpl() - throws XmlPullParserException, IOException - { - text = null; - pcEnd = pcStart = 0; - usePC = false; - bufStart = posEnd; - if(pastEndTag) { - pastEndTag = false; - --depth; - namespaceEnd = elNamespaceCount[ depth ]; // less namespaces available - } - if(emptyElementTag) { - emptyElementTag = false; - pastEndTag = true; - return eventType = END_TAG; - } - - // [1] document ::= prolog element Misc* - if(depth > 0) { - - if(seenStartTag) { - seenStartTag = false; - return eventType = parseStartTag(); - } - if(seenEndTag) { - seenEndTag = false; - return eventType = parseEndTag(); - } - - // ASSUMPTION: we are _on_ first character of content or markup!!!! - // [43] content ::= CharData? ((element | Reference | CDSect | PI | Comment) CharData?)* - char ch; - if(seenMarkup) { // we have read ahead ... - seenMarkup = false; - ch = '<'; - } else if(seenAmpersand) { - seenAmpersand = false; - ch = '&'; - } else { - ch = more(); - } - posStart = pos - 1; // VERY IMPORTANT: this is correct start of event!!! - - // when true there is some potential event TEXT to return - keep gathering - boolean hadCharData = false; - - // when true TEXT data is not continous (like ) and requires PC merging - boolean needsMerging = false; - - MAIN_LOOP: - while(true) { - // work on MARKUP - if(ch == '<') { - if(hadCharData) { - //posEnd = pos - 1; - if(tokenize) { - seenMarkup = true; - return eventType = TEXT; - } - } - ch = more(); - if(ch == '/') { - if(!tokenize && hadCharData) { - seenEndTag = true; - //posEnd = pos - 2; - return eventType = TEXT; - } - return eventType = parseEndTag(); - } else if(ch == '!') { - ch = more(); - if(ch == '-') { - // note: if(tokenize == false) posStart/End is NOT changed!!!! - parseComment(); - if(tokenize) return eventType = COMMENT; - if( !usePC && hadCharData ) { - needsMerging = true; - } else { - posStart = pos; //completely ignore comment - } - } else if(ch == '[') { - //posEnd = pos - 3; - // must remeber previous posStart/End as it merges with content of CDATA - //int oldStart = posStart + bufAbsoluteStart; - //int oldEnd = posEnd + bufAbsoluteStart; - parseCDSect(hadCharData); - if(tokenize) return eventType = CDSECT; - final int cdStart = posStart; - final int cdEnd = posEnd; - final int cdLen = cdEnd - cdStart; - - - if(cdLen > 0) { // was there anything inside CDATA section? - hadCharData = true; - if(!usePC) { - needsMerging = true; - } - } - - // posStart = oldStart; - // posEnd = oldEnd; - // if(cdLen > 0) { // was there anything inside CDATA section? - // if(hadCharData) { - // // do merging if there was anything in CDSect!!!! - // // if(!usePC) { - // // // posEnd is correct already!!! - // // if(posEnd > posStart) { - // // joinPC(); - // // } else { - // // usePC = true; - // // pcStart = pcEnd = 0; - // // } - // // } - // // if(pcEnd + cdLen >= pc.length) ensurePC(pcEnd + cdLen); - // // // copy [cdStart..cdEnd) into PC - // // System.arraycopy(buf, cdStart, pc, pcEnd, cdLen); - // // pcEnd += cdLen; - // if(!usePC) { - // needsMerging = true; - // posStart = cdStart; - // posEnd = cdEnd; - // } - // } else { - // if(!usePC) { - // needsMerging = true; - // posStart = cdStart; - // posEnd = cdEnd; - // hadCharData = true; - // } - // } - // //hadCharData = true; - // } else { - // if( !usePC && hadCharData ) { - // needsMerging = true; - // } - // } - } else { - throw new XmlPullParserException( - "unexpected character in markup "+printable(ch), this, null); - } - } else if(ch == '?') { - parsePI(); - if(tokenize) return eventType = PROCESSING_INSTRUCTION; - if( !usePC && hadCharData ) { - needsMerging = true; - } else { - posStart = pos; //completely ignore PI - } - - } else if( isNameStartChar(ch) ) { - if(!tokenize && hadCharData) { - seenStartTag = true; - //posEnd = pos - 2; - return eventType = TEXT; - } - return eventType = parseStartTag(); - } else { - throw new XmlPullParserException( - "unexpected character in markup "+printable(ch), this, null); - } - // do content comapctation if it makes sense!!!! - - } else if(ch == '&') { - // work on ENTITTY - //posEnd = pos - 1; - if(tokenize && hadCharData) { - seenAmpersand = true; - return eventType = TEXT; - } - final int oldStart = posStart + bufAbsoluteStart; - final int oldEnd = posEnd + bufAbsoluteStart; - final char[] resolvedEntity = parseEntityRef(); - if(tokenize) return eventType = ENTITY_REF; - // check if replacement text can be resolved !!! - if(resolvedEntity == null) { - if(entityRefName == null) { - entityRefName = newString(buf, posStart, posEnd - posStart); - } - throw new XmlPullParserException( - "could not resolve entity named '"+printable(entityRefName)+"'", - this, null); - } - //int entStart = posStart; - //int entEnd = posEnd; - posStart = oldStart - bufAbsoluteStart; - posEnd = oldEnd - bufAbsoluteStart; - if(!usePC) { - if(hadCharData) { - joinPC(); // posEnd is already set correctly!!! - needsMerging = false; - } else { - usePC = true; - pcStart = pcEnd = 0; - } - } - //assert usePC == true; - // write into PC replacement text - do merge for replacement text!!!! - for (int i = 0; i < resolvedEntity.length; i++) - { - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = resolvedEntity[ i ]; - - } - hadCharData = true; - //assert needsMerging == false; - } else { - - if(needsMerging) { - //assert usePC == false; - joinPC(); // posEnd is already set correctly!!! - //posStart = pos - 1; - needsMerging = false; - } - - - //no MARKUP not ENTITIES so work on character data ... - - - - // [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*) - - - hadCharData = true; - - boolean normalizedCR = false; - final boolean normalizeInput = tokenize == false || roundtripSupported == false; - // use loop locality here!!!! - boolean seenBracket = false; - boolean seenBracketBracket = false; - do { - - // check that ]]> does not show in - if(ch == ']') { - if(seenBracket) { - seenBracketBracket = true; - } else { - seenBracket = true; - } - } else if(seenBracketBracket && ch == '>') { - throw new XmlPullParserException( - "characters ]]> are not allowed in content", this, null); - } else { - if(seenBracket) { - seenBracketBracket = seenBracket = false; - } - // assert seenTwoBrackets == seenBracket == false; - } - if(normalizeInput) { - // deal with normalization issues ... - if(ch == '\r') { - normalizedCR = true; - posEnd = pos -1; - // posEnd is alreadys set - if(!usePC) { - if(posEnd > posStart) { - joinPC(); - } else { - usePC = true; - pcStart = pcEnd = 0; - } - } - //assert usePC == true; - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = '\n'; - } else if(ch == '\n') { - // if(!usePC) { joinPC(); } else { if(pcEnd >= pc.length) ensurePC(); } - if(!normalizedCR && usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = '\n'; - } - normalizedCR = false; - } else { - if(usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = ch; - } - normalizedCR = false; - } - } - - ch = more(); - } while(ch != '<' && ch != '&'); - posEnd = pos - 1; - continue MAIN_LOOP; // skip ch = more() from below - we are alreayd ahead ... - } - ch = more(); - } // endless while(true) - } else { - if(seenRoot) { - return parseEpilog(); - } else { - return parseProlog(); - } - } - } - - - protected int parseProlog() - throws XmlPullParserException, IOException - { - // [2] prolog: ::= XMLDecl? Misc* (doctypedecl Misc*)? and look for [39] element - - char ch; - if(seenMarkup) { - ch = buf[ pos - 1 ]; - } else { - ch = more(); - } - - if(eventType == START_DOCUMENT) { - // bootstrap parsing with getting first character input! - // deal with BOM - // detect BOM and frop it (Unicode int Order Mark) - if(ch == '\uFFFE') { - throw new XmlPullParserException( - "first character in input was UNICODE noncharacter (0xFFFE)"+ - "- input requires int swapping", this, null); - } - if(ch == '\uFEFF') { - // skipping UNICODE int Order Mark (so called BOM) - ch = more(); - } - } - seenMarkup = false; - boolean gotS = false; - posStart = pos - 1; - final boolean normalizeIgnorableWS = tokenize == true && roundtripSupported == false; - boolean normalizedCR = false; - while(true) { - // deal with Misc - // [27] Misc ::= Comment | PI | S - // deal with docdecl --> mark it! - // else parseStartTag seen <[^/] - if(ch == '<') { - if(gotS && tokenize) { - posEnd = pos - 1; - seenMarkup = true; - return eventType = IGNORABLE_WHITESPACE; - } - ch = more(); - if(ch == '?') { - // check if it is 'xml' - // deal with XMLDecl - if(parsePI()) { // make sure to skip XMLDecl - if(tokenize) { - return eventType = PROCESSING_INSTRUCTION; - } - } else { - // skip over - continue tokenizing - posStart = pos; - gotS = false; - } - - } else if(ch == '!') { - ch = more(); - if(ch == 'D') { - if(seenDocdecl) { - throw new XmlPullParserException( - "only one docdecl allowed in XML document", this, null); - } - seenDocdecl = true; - parseDocdecl(); - if(tokenize) return eventType = DOCDECL; - } else if(ch == '-') { - parseComment(); - if(tokenize) return eventType = COMMENT; - } else { - throw new XmlPullParserException( - "unexpected markup posStart) { - joinPC(); - } else { - usePC = true; - pcStart = pcEnd = 0; - } - } - //assert usePC == true; - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = '\n'; - } else if(ch == '\n') { - if(!normalizedCR && usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = '\n'; - } - normalizedCR = false; - } else { - if(usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = ch; - } - normalizedCR = false; - } - } - } else { - throw new XmlPullParserException( - "only whitespace content allowed before start tag and not "+printable(ch), - this, null); - } - ch = more(); - } - } - - protected int parseEpilog() - throws XmlPullParserException, IOException - { - if(eventType == END_DOCUMENT) { - throw new XmlPullParserException("already reached end of XML input", this, null); - } - if(reachedEnd) { - return eventType = END_DOCUMENT; - } - boolean gotS = false; - final boolean normalizeIgnorableWS = tokenize == true && roundtripSupported == false; - boolean normalizedCR = false; - try { - // epilog: Misc* - char ch; - if(seenMarkup) { - ch = buf[ pos - 1 ]; - } else { - ch = more(); - } - seenMarkup = false; - posStart = pos - 1; - if(!reachedEnd) { - while(true) { - // deal with Misc - // [27] Misc ::= Comment | PI | S - if(ch == '<') { - if(gotS && tokenize) { - posEnd = pos - 1; - seenMarkup = true; - return eventType = IGNORABLE_WHITESPACE; - } - ch = more(); - if(reachedEnd) { - break; - } - if(ch == '?') { - // check if it is 'xml' - // deal with XMLDecl - parsePI(); - if(tokenize) return eventType = PROCESSING_INSTRUCTION; - - } else if(ch == '!') { - ch = more(); - if(reachedEnd) { - break; - } - if(ch == 'D') { - parseDocdecl(); //FIXME - if(tokenize) return eventType = DOCDECL; - } else if(ch == '-') { - parseComment(); - if(tokenize) return eventType = COMMENT; - } else { - throw new XmlPullParserException( - "unexpected markup posStart) { - joinPC(); - } else { - usePC = true; - pcStart = pcEnd = 0; - } - } - //assert usePC == true; - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = '\n'; - } else if(ch == '\n') { - if(!normalizedCR && usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = '\n'; - } - normalizedCR = false; - } else { - if(usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = ch; - } - normalizedCR = false; - } - } - } else { - throw new XmlPullParserException( - "in epilog non whitespace content is not allowed but got "+printable(ch), - this, null); - } - ch = more(); - if(reachedEnd) { - break; - } - - } - } - - // throw Exceptin("unexpected content in epilog - // cach EOFException return END_DOCUEMENT - //try { - } catch(EOFException ex) { - reachedEnd = true; - } - if(reachedEnd) { - if(tokenize && gotS) { - posEnd = pos; // well - this is LAST available character pos - return eventType = IGNORABLE_WHITESPACE; - } - return eventType = END_DOCUMENT; - } else { - throw new XmlPullParserException("internal error in parseEpilog"); - } - } - - - public int parseEndTag() throws XmlPullParserException, IOException { - //ASSUMPTION ch is past "' - char ch = more(); - if(!isNameStartChar(ch)) { - throw new XmlPullParserException( - "expected name start and not "+printable(ch), this, null); - } - posStart = pos - 3; - final int nameStart = pos - 1 + bufAbsoluteStart; - do { - ch = more(); - } while(isNameChar(ch)); - - // now we go one level down -- do checks - //--depth; //FIXME - - // check that end tag name is the same as start tag - //String name = new String(buf, nameStart - bufAbsoluteStart, - // (pos - 1) - (nameStart - bufAbsoluteStart)); - //int last = pos - 1; - int off = nameStart - bufAbsoluteStart; - //final int len = last - off; - final int len = (pos - 1) - off; - final char[] cbuf = elRawName[depth]; - if(elRawNameEnd[depth] != len) { - // construct strings for exception - final String startname = new String(cbuf, 0, elRawNameEnd[depth]); - final String endname = new String(buf, off, len); - throw new XmlPullParserException( - "end tag name must match start tag name <"+startname+">" - +" from line "+elRawNameLine[depth], this, null); - } - for (int i = 0; i < len; i++) - { - if(buf[off++] != cbuf[i]) { - // construct strings for exception - final String startname = new String(cbuf, 0, len); - final String endname = new String(buf, off - i - 1, len); - throw new XmlPullParserException( - "end tag name must be the same as start tag <"+startname+">" - +" from line "+elRawNameLine[depth], this, null); - } - } - - while(isS(ch)) { ch = more(); } // skip additional white spaces - if(ch != '>') { - throw new XmlPullParserException( - "expected > to finsh end tag not "+printable(ch) - +" from line "+elRawNameLine[depth], this, null); - } - - - //namespaceEnd = elNamespaceCount[ depth ]; //FIXME - - posEnd = pos; - pastEndTag = true; - return eventType = END_TAG; - } - - public int parseStartTag() throws XmlPullParserException, IOException { - //ASSUMPTION ch is past ' - // [44] EmptyElemTag ::= '<' Name (S Attribute)* S? '/>' - ++depth; //FIXME - - posStart = pos - 2; - - emptyElementTag = false; - attributeCount = 0; - // retrieve name - final int nameStart = pos - 1 + bufAbsoluteStart; - int colonPos = -1; - char ch = buf[ pos - 1]; - if(ch == ':' && processNamespaces) throw new XmlPullParserException( - "when namespaces processing enabled colon can not be at element name start", - this, null); - while(true) { - ch = more(); - if(!isNameChar(ch)) break; - if(ch == ':' && processNamespaces) { - if(colonPos != -1) throw new XmlPullParserException( - "only one colon is allowed in name of element when namespaces are enabled", - this, null); - colonPos = pos - 1 + bufAbsoluteStart; - } - } - - // retrieve name - ensureElementsCapacity(); - - - //TODO check for efficient interning and then use elRawNameInterned!!!! - - int elLen = (pos - 1) - (nameStart - bufAbsoluteStart); - if(elRawName[ depth ] == null || elRawName[ depth ].length < elLen) { - elRawName[ depth ] = new char[ 2 * elLen ]; - } - System.arraycopy(buf, nameStart - bufAbsoluteStart, elRawName[ depth ], 0, elLen); - elRawNameEnd[ depth ] = elLen; - elRawNameLine[ depth ] = lineNumber; - - String name = null; - - // work on prefixes and namespace URI - String prefix = null; - if(processNamespaces) { - if(colonPos != -1) { - prefix = elPrefix[ depth ] = newString(buf, nameStart - bufAbsoluteStart, - colonPos - nameStart); - name = elName[ depth ] = newString(buf, colonPos + 1 - bufAbsoluteStart, - //(pos -1) - (colonPos + 1)); - pos - 2 - (colonPos - bufAbsoluteStart)); - } else { - prefix = elPrefix[ depth ] = null; - name = elName[ depth ] = newString(buf, nameStart - bufAbsoluteStart, elLen); - } - } else { - - name = elName[ depth ] = newString(buf, nameStart - bufAbsoluteStart, elLen); - - } - - - while(true) { - - while(isS(ch)) { ch = more(); } // skip additional white spaces - - if(ch == '>') { - break; - } else if(ch == '/') { - if(emptyElementTag) throw new XmlPullParserException( - "repeated / in tag declaration", this, null); - emptyElementTag = true; - ch = more(); - if(ch != '>') throw new XmlPullParserException( - "expected > to end empty tag not "+printable(ch), this, null); - break; - } else if(isNameStartChar(ch)) { - ch = parseAttribute(); - ch = more(); - continue; - } else { - throw new XmlPullParserException( - "start tag unexpected character "+printable(ch), this, null); - } - //ch = more(); // skip space - } - - // now when namespaces were declared we can resolve them - if(processNamespaces) { - String uri = getNamespace(prefix); - if(uri == null) { - if(prefix == null) { // no prefix and no uri => use default namespace - uri = NO_NAMESPACE; - } else { - throw new XmlPullParserException( - "could not determine namespace bound to element prefix "+prefix, - this, null); - } - - } - elUri[ depth ] = uri; - - - //String uri = getNamespace(prefix); - //if(uri == null && prefix == null) { // no prefix and no uri => use default namespace - // uri = ""; - //} - // resolve attribute namespaces - for (int i = 0; i < attributeCount; i++) - { - final String attrPrefix = attributePrefix[ i ]; - if(attrPrefix != null) { - final String attrUri = getNamespace(attrPrefix); - if(attrUri == null) { - throw new XmlPullParserException( - "could not determine namespace bound to attribute prefix "+attrPrefix, - this, null); - - } - attributeUri[ i ] = attrUri; - } else { - attributeUri[ i ] = NO_NAMESPACE; - } - } - - //TODO - //[ WFC: Unique Att Spec ] - // check namespaced attribute uniqueness contraint!!! - - for (int i = 1; i < attributeCount; i++) - { - for (int j = 0; j < i; j++) - { - if( attributeUri[j] == attributeUri[i] - && (allStringsInterned && attributeName[j].equals(attributeName[i]) - || (!allStringsInterned - && attributeNameHash[ j ] == attributeNameHash[ i ] - && attributeName[j].equals(attributeName[i])) ) - - ) { - // prepare data for nice error messgae? - String attr1 = attributeName[j]; - if(attributeUri[j] != null) attr1 = attributeUri[j]+":"+attr1; - String attr2 = attributeName[i]; - if(attributeUri[i] != null) attr2 = attributeUri[i]+":"+attr2; - throw new XmlPullParserException( - "duplicated attributes "+attr1+" and "+attr2, this, null); - } - } - } - - - } else { // ! processNamespaces - - //[ WFC: Unique Att Spec ] - // check raw attribute uniqueness contraint!!! - for (int i = 1; i < attributeCount; i++) - { - for (int j = 0; j < i; j++) - { - if((allStringsInterned && attributeName[j].equals(attributeName[i]) - || (!allStringsInterned - && attributeNameHash[ j ] == attributeNameHash[ i ] - && attributeName[j].equals(attributeName[i])) ) - - ) { - // prepare data for nice error messgae? - final String attr1 = attributeName[j]; - final String attr2 = attributeName[i]; - throw new XmlPullParserException( - "duplicated attributes "+attr1+" and "+attr2, this, null); - } - } - } - } - - elNamespaceCount[ depth ] = namespaceEnd; - posEnd = pos; - return eventType = START_TAG; - } - - protected char parseAttribute() throws XmlPullParserException, IOException - { - // parse attribute - // [41] Attribute ::= Name Eq AttValue - // [WFC: No External Entity References] - // [WFC: No < in Attribute Values] - final int prevPosStart = posStart + bufAbsoluteStart; - final int nameStart = pos - 1 + bufAbsoluteStart; - int colonPos = -1; - char ch = buf[ pos - 1 ]; - if(ch == ':' && processNamespaces) throw new XmlPullParserException( - "when namespaces processing enabled colon can not be at attribute name start", - this, null); - - - boolean startsWithXmlns = processNamespaces && ch == 'x'; - int xmlnsPos = 0; - - ch = more(); - while(isNameChar(ch)) { - if(processNamespaces) { - if(startsWithXmlns && xmlnsPos < 5) { - ++xmlnsPos; - if(xmlnsPos == 1) { if(ch != 'm') startsWithXmlns = false; } - else if(xmlnsPos == 2) { if(ch != 'l') startsWithXmlns = false; } - else if(xmlnsPos == 3) { if(ch != 'n') startsWithXmlns = false; } - else if(xmlnsPos == 4) { if(ch != 's') startsWithXmlns = false; } - else if(xmlnsPos == 5) { - if(ch != ':') throw new XmlPullParserException( - "after xmlns in attribute name must be colon" - +"when namespaces are enabled", this, null); - //colonPos = pos - 1 + bufAbsoluteStart; - } - } - if(ch == ':') { - if(colonPos != -1) throw new XmlPullParserException( - "only one colon is allowed in attribute name" - +" when namespaces are enabled", this, null); - colonPos = pos - 1 + bufAbsoluteStart; - } - } - ch = more(); - } - - ensureAttributesCapacity(attributeCount); - - // --- start processing attributes - String name = null; - String prefix = null; - // work on prefixes and namespace URI - if(processNamespaces) { - if(xmlnsPos < 4) startsWithXmlns = false; - if(startsWithXmlns) { - if(colonPos != -1) { - //prefix = attributePrefix[ attributeCount ] = null; - final int nameLen = pos - 2 - (colonPos - bufAbsoluteStart); - if(nameLen == 0) { - throw new XmlPullParserException( - "namespace prefix is required after xmlns: " - +" when namespaces are enabled", this, null); - } - name = //attributeName[ attributeCount ] = - newString(buf, colonPos - bufAbsoluteStart + 1, nameLen); - //pos - 1 - (colonPos + 1 - bufAbsoluteStart) - } - } else { - if(colonPos != -1) { - int prefixLen = colonPos - nameStart; - prefix = attributePrefix[ attributeCount ] = - newString(buf, nameStart - bufAbsoluteStart,prefixLen); - //colonPos - (nameStart - bufAbsoluteStart)); - int nameLen = pos - 2 - (colonPos - bufAbsoluteStart); - name = attributeName[ attributeCount ] = - newString(buf, colonPos - bufAbsoluteStart + 1, nameLen); - //pos - 1 - (colonPos + 1 - bufAbsoluteStart)); - - //name.substring(0, colonPos-nameStart); - } else { - prefix = attributePrefix[ attributeCount ] = null; - name = attributeName[ attributeCount ] = - newString(buf, nameStart - bufAbsoluteStart, - pos - 1 - (nameStart - bufAbsoluteStart)); - } - if(!allStringsInterned) { - attributeNameHash[ attributeCount ] = name.hashCode(); - } - } - - } else { - // retrieve name - name = attributeName[ attributeCount ] = - newString(buf, nameStart - bufAbsoluteStart, - pos - 1 - (nameStart - bufAbsoluteStart)); - ////assert name != null; - if(!allStringsInterned) { - attributeNameHash[ attributeCount ] = name.hashCode(); - } - } - - // [25] Eq ::= S? '=' S? - while(isS(ch)) { ch = more(); } // skip additional spaces - if(ch != '=') throw new XmlPullParserException( - "expected = after attribute name", this, null); - ch = more(); - while(isS(ch)) { ch = more(); } // skip additional spaces - - // [10] AttValue ::= '"' ([^<&"] | Reference)* '"' - // | "'" ([^<&'] | Reference)* "'" - final char delimit = ch; - if(delimit != '"' && delimit != '\'') throw new XmlPullParserException( - "attribute value must start with quotation or apostrophe not " - +printable(delimit), this, null); - // parse until delimit or < and resolve Reference - //[67] Reference ::= EntityRef | CharRef - //int valueStart = pos + bufAbsoluteStart; - - - boolean normalizedCR = false; - usePC = false; - pcStart = pcEnd; - posStart = pos; - - while(true) { - ch = more(); - if(ch == delimit) { - break; - } if(ch == '<') { - throw new XmlPullParserException( - "markup not allowed inside attribute value - illegal < ", this, null); - } if(ch == '&') { - // extractEntityRef - posEnd = pos - 1; - if(!usePC) { - final boolean hadCharData = posEnd > posStart; - if(hadCharData) { - // posEnd is already set correctly!!! - joinPC(); - } else { - usePC = true; - pcStart = pcEnd = 0; - } - } - //assert usePC == true; - - final char[] resolvedEntity = parseEntityRef(); - // check if replacement text can be resolved !!! - if(resolvedEntity == null) { - if(entityRefName == null) { - entityRefName = newString(buf, posStart, posEnd - posStart); - } - throw new XmlPullParserException( - "could not resolve entity named '"+printable(entityRefName)+"'", - this, null); - } - // write into PC replacement text - do merge for replacement text!!!! - for (int i = 0; i < resolvedEntity.length; i++) - { - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = resolvedEntity[ i ]; - } - } else if(ch == '\t' || ch == '\n' || ch == '\r') { - // do attribute value normalization - // as described in http://www.w3.org/TR/REC-xml#AVNormalize - // TODO add test for it form spec ... - // handle EOL normalization ... - if(!usePC) { - posEnd = pos - 1; - if(posEnd > posStart) { - joinPC(); - } else { - usePC = true; - pcEnd = pcStart = 0; - } - } - //assert usePC == true; - if(pcEnd >= pc.length) ensurePC(pcEnd); - if(ch != '\n' || !normalizedCR) { - pc[pcEnd++] = ' '; //'\n'; - } - - } else { - if(usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = ch; - } - } - normalizedCR = ch == '\r'; - } - - - if(processNamespaces && startsWithXmlns) { - String ns = null; - if(!usePC) { - ns = newStringIntern(buf, posStart, pos - 1 - posStart); - } else { - ns = newStringIntern(pc, pcStart, pcEnd - pcStart); - } - ensureNamespacesCapacity(namespaceEnd); - int prefixHash = -1; - if(colonPos != -1) { - if(ns.length() == 0) { - throw new XmlPullParserException( - "non-default namespace can not be declared to be empty string", this, null); - } - // declare new namespace - namespacePrefix[ namespaceEnd ] = name; - if(!allStringsInterned) { - prefixHash = namespacePrefixHash[ namespaceEnd ] = name.hashCode(); - } - } else { - // declare new default namespace ... - namespacePrefix[ namespaceEnd ] = null; //""; //null; //TODO check FIXME Alek - if(!allStringsInterned) { - prefixHash = namespacePrefixHash[ namespaceEnd ] = -1; - } - } - namespaceUri[ namespaceEnd ] = ns; - - // detect duplicate namespace declarations!!! - final int startNs = elNamespaceCount[ depth - 1 ]; - for (int i = namespaceEnd - 1; i >= startNs; --i) - { - if(((allStringsInterned || name == null) && namespacePrefix[ i ] == name) - || (!allStringsInterned && name != null && - namespacePrefixHash[ i ] == prefixHash - && name.equals(namespacePrefix[ i ]) - )) - { - final String s = name == null ? "default" : "'"+name+"'"; - throw new XmlPullParserException( - "duplicated namespace declaration for "+s+" prefix", this, null); - } - } - - ++namespaceEnd; - - } else { - if(!usePC) { - attributeValue[ attributeCount ] = - new String(buf, posStart, pos - 1 - posStart); - } else { - attributeValue[ attributeCount ] = - new String(pc, pcStart, pcEnd - pcStart); - } - ++attributeCount; - } - posStart = prevPosStart - bufAbsoluteStart; - return ch; - } - - protected char[] charRefOneCharBuf = new char[1]; - - protected char[] parseEntityRef() - throws XmlPullParserException, IOException - { - // entity reference http://www.w3.org/TR/2000/REC-xml-20001006#NT-Reference - // [67] Reference ::= EntityRef | CharRef - - // ASSUMPTION just after & - entityRefName = null; - posStart = pos; - char ch = more(); - if(ch == '#') { - // parse character reference - char charRef = 0; - ch = more(); - if(ch == 'x') { - //encoded in hex - while(true) { - ch = more(); - if(ch >= '0' && ch <= '9') { - charRef = (char)(charRef * 16 + (ch - '0')); - } else if(ch >= 'a' && ch <= 'f') { - charRef = (char)(charRef * 16 + (ch - ('a' - 10))); - } else if(ch >= 'A' && ch <= 'F') { - charRef = (char)(charRef * 16 + (ch - ('A' - 10))); - } else if(ch == ';') { - break; - } else { - throw new XmlPullParserException( - "character reference (with hex value) may not contain " - +printable(ch), this, null); - } - } - } else { - // encoded in decimal - while(true) { - if(ch >= '0' && ch <= '9') { - charRef = (char)(charRef * 10 + (ch - '0')); - } else if(ch == ';') { - break; - } else { - throw new XmlPullParserException( - "character reference (with decimal value) may not contain " - +printable(ch), this, null); - } - ch = more(); - } - } - posEnd = pos - 1; - charRefOneCharBuf[0] = charRef; - if(tokenize) { - text = newString(charRefOneCharBuf, 0, 1); - } - return charRefOneCharBuf; - } else { - // [68] EntityRef ::= '&' Name ';' - // scan anem until ; - if(!isNameStartChar(ch)) { - throw new XmlPullParserException( - "entity reference names can not start with character '" - +printable(ch)+"'", this, null); - } - while(true) { - ch = more(); - if(ch == ';') { - break; - } - if(!isNameChar(ch)) { - throw new XmlPullParserException( - "entity reference name can not contain character " - +printable(ch)+"'", this, null); - } - } - posEnd = pos - 1; - // determine what name maps to - final int len = posEnd - posStart; - if(len == 2 && buf[posStart] == 'l' && buf[posStart+1] == 't') { - if(tokenize) { - text = "<"; - } - charRefOneCharBuf[0] = '<'; - return charRefOneCharBuf; - //if(paramPC || isParserTokenizing) { - // if(pcEnd >= pc.length) ensurePC(); - // pc[pcEnd++] = '<'; - //} - } else if(len == 3 && buf[posStart] == 'a' - && buf[posStart+1] == 'm' && buf[posStart+2] == 'p') { - if(tokenize) { - text = "&"; - } - charRefOneCharBuf[0] = '&'; - return charRefOneCharBuf; - } else if(len == 2 && buf[posStart] == 'g' && buf[posStart+1] == 't') { - if(tokenize) { - text = ">"; - } - charRefOneCharBuf[0] = '>'; - return charRefOneCharBuf; - } else if(len == 4 && buf[posStart] == 'a' && buf[posStart+1] == 'p' - && buf[posStart+2] == 'o' && buf[posStart+3] == 's') - { - if(tokenize) { - text = "'"; - } - charRefOneCharBuf[0] = '\''; - return charRefOneCharBuf; - } else if(len == 4 && buf[posStart] == 'q' && buf[posStart+1] == 'u' - && buf[posStart+2] == 'o' && buf[posStart+3] == 't') - { - if(tokenize) { - text = "\""; - } - charRefOneCharBuf[0] = '"'; - return charRefOneCharBuf; - } else { - final char[] result = lookuEntityReplacement(len); - if(result != null) { - return result; - } - } - if(tokenize) text = null; - return null; - } - } - - protected char[] lookuEntityReplacement(int entitNameLen) - throws XmlPullParserException, IOException - - { - if(!allStringsInterned) { - final int hash = fastHash(buf, posStart, posEnd - posStart); - LOOP: - for (int i = entityEnd - 1; i >= 0; --i) - { - if(hash == entityNameHash[ i ] && entitNameLen == entityNameBuf[ i ].length) { - final char[] entityBuf = entityNameBuf[ i ]; - for (int j = 0; j < entitNameLen; j++) - { - if(buf[posStart + j] != entityBuf[j]) continue LOOP; - } - if(tokenize) text = entityReplacement[ i ]; - return entityReplacementBuf[ i ]; - } - } - } else { - entityRefName = newString(buf, posStart, posEnd - posStart); - for (int i = entityEnd - 1; i >= 0; --i) - { - // take advantage that interning for newStirng is enforced - if(entityRefName == entityName[ i ]) { - if(tokenize) text = entityReplacement[ i ]; - return entityReplacementBuf[ i ]; - } - } - } - return null; - } - - - protected void parseComment() - throws XmlPullParserException, IOException - { - // implements XML 1.0 Section 2.5 Comments - - //ASSUMPTION: seen - ch = more(); - if(seenDashDash && ch != '>') { - throw new XmlPullParserException( - "in comment after two dashes (--) next character must be >" - +" not "+printable(ch), this, null); - } - if(ch == '-') { - if(!seenDash) { - seenDash = true; - } else { - seenDashDash = true; - seenDash = false; - } - } else if(ch == '>') { - if(seenDashDash) { - break; // found end sequence!!!! - } else { - seenDashDash = false; - } - seenDash = false; - } else { - seenDash = false; - } - if(normalizeIgnorableWS) { - if(ch == '\r') { - normalizedCR = true; - //posEnd = pos -1; - //joinPC(); - // posEnd is alreadys set - if(!usePC) { - posEnd = pos -1; - if(posEnd > posStart) { - joinPC(); - } else { - usePC = true; - pcStart = pcEnd = 0; - } - } - //assert usePC == true; - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = '\n'; - } else if(ch == '\n') { - if(!normalizedCR && usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = '\n'; - } - normalizedCR = false; - } else { - if(usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = ch; - } - normalizedCR = false; - } - } - } - - } catch(EOFException ex) { - // detect EOF and create meaningful error ... - throw new XmlPullParserException( - "comment started on line "+curLine+" and column "+curColumn+" was not closed", - this, ex); - } - if(tokenize) { - posEnd = pos - 3; - if(usePC) { - pcEnd -= 2; - } - } - } - - protected boolean parsePI() - throws XmlPullParserException, IOException - { - // implements XML 1.0 Section 2.6 Processing Instructions - - // [16] PI ::= '' Char*)))? '?>' - // [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) - //ASSUMPTION: seen - //ch = more(); - - if(ch == '?') { - seenQ = true; - } else if(ch == '>') { - if(seenQ) { - break; // found end sequence!!!! - } - seenQ = false; - } else { - if(piTargetEnd == -1 && isS(ch)) { - piTargetEnd = pos - 1 + bufAbsoluteStart; - - // [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) - if((piTargetEnd - piTargetStart) == 3) { - if((buf[piTargetStart] == 'x' || buf[piTargetStart] == 'X') - && (buf[piTargetStart+1] == 'm' || buf[piTargetStart+1] == 'M') - && (buf[piTargetStart+2] == 'l' || buf[piTargetStart+2] == 'L') - ) - { - if(piTargetStart > 3) { // posStart) { - joinPC(); - } else { - usePC = true; - pcStart = pcEnd = 0; - } - } - //assert usePC == true; - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = '\n'; - } else if(ch == '\n') { - if(!normalizedCR && usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = '\n'; - } - normalizedCR = false; - } else { - if(usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = ch; - } - normalizedCR = false; - } - } - ch = more(); - } - } catch(EOFException ex) { - // detect EOF and create meaningful error ... - throw new XmlPullParserException( - "processing instruction started on line "+curLine+" and column "+curColumn - +" was not closed", - this, ex); - } - if(piTargetEnd == -1) { - piTargetEnd = pos - 2 + bufAbsoluteStart; - //throw new XmlPullParserException( - // "processing instruction must have PITarget name", this, null); - } - piTargetStart -= bufAbsoluteStart; - piTargetEnd -= bufAbsoluteStart; - if(tokenize) { - posEnd = pos - 2; - if(normalizeIgnorableWS) { - --pcEnd; - } - } - return true; - } - - // protected final static char[] VERSION = {'v','e','r','s','i','o','n'}; - // protected final static char[] NCODING = {'n','c','o','d','i','n','g'}; - // protected final static char[] TANDALONE = {'t','a','n','d','a','l','o','n','e'}; - // protected final static char[] YES = {'y','e','s'}; - // protected final static char[] NO = {'n','o'}; - - protected final static char[] VERSION = "version".toCharArray(); - protected final static char[] NCODING = "ncoding".toCharArray(); - protected final static char[] TANDALONE = "tandalone".toCharArray(); - protected final static char[] YES = "yes".toCharArray(); - protected final static char[] NO = "no".toCharArray(); - - - - protected void parseXmlDecl(char ch) - throws XmlPullParserException, IOException - { - // [23] XMLDecl ::= '' - - // first make sure that relative positions will stay OK - preventBufferCompaction = true; - bufStart = 0; // necessary to keep pos unchanged during expansion! - - // --- parse VersionInfo - - // [24] VersionInfo ::= S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"') - // parse is positioned just on first S past 'z') && (ch < 'A' || ch > 'Z') && (ch < '0' || ch > '9') - && ch != '_' && ch != '.' && ch != ':' && ch != '-') - { - throw new XmlPullParserException( - " 'z') && (ch < 'A' || ch > 'Z')) - { - throw new XmlPullParserException( - " 'z') && (ch < 'A' || ch > 'Z') && (ch < '0' || ch > '9') - && ch != '.' && ch != '_' && ch != '-') - { - throw new XmlPullParserException( - " as last part of ') { - throw new XmlPullParserException( - "expected ?> as last part of ' - int bracketLevel = 0; - final boolean normalizeIgnorableWS = tokenize == true && roundtripSupported == false; - boolean normalizedCR = false; - while(true) { - ch = more(); - if(ch == '[') ++bracketLevel; - if(ch == ']') --bracketLevel; - if(ch == '>' && bracketLevel == 0) break; - if(normalizeIgnorableWS) { - if(ch == '\r') { - normalizedCR = true; - //posEnd = pos -1; - //joinPC(); - // posEnd is alreadys set - if(!usePC) { - posEnd = pos -1; - if(posEnd > posStart) { - joinPC(); - } else { - usePC = true; - pcStart = pcEnd = 0; - } - } - //assert usePC == true; - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = '\n'; - } else if(ch == '\n') { - if(!normalizedCR && usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = '\n'; - } - normalizedCR = false; - } else { - if(usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = ch; - } - normalizedCR = false; - } - } - - } - posEnd = pos - 1; - } - - protected void parseCDSect(boolean hadCharData) - throws XmlPullParserException, IOException - { - // implements XML 1.0 Section 2.7 CDATA Sections - - // [18] CDSect ::= CDStart CData CDEnd - // [19] CDStart ::= '' Char*)) - // [21] CDEnd ::= ']]>' - - //ASSUMPTION: seen posStart) { - joinPC(); - } else { - usePC = true; - pcStart = pcEnd = 0; - } - } - } - } - boolean seenBracket = false; - boolean seenBracketBracket = false; - boolean normalizedCR = false; - while(true) { - // scan until it hits "]]>" - ch = more(); - if(ch == ']') { - if(!seenBracket) { - seenBracket = true; - } else { - seenBracketBracket = true; - //seenBracket = false; - } - } else if(ch == '>') { - if(seenBracket && seenBracketBracket) { - break; // found end sequence!!!! - } else { - seenBracketBracket = false; - } - seenBracket = false; - } else { - if(seenBracket) { - seenBracket = false; - } - } - if(normalizeInput) { - // deal with normalization issues ... - if(ch == '\r') { - normalizedCR = true; - posStart = cdStart - bufAbsoluteStart; - posEnd = pos - 1; // posEnd is alreadys set - if(!usePC) { - if(posEnd > posStart) { - joinPC(); - } else { - usePC = true; - pcStart = pcEnd = 0; - } - } - //assert usePC == true; - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = '\n'; - } else if(ch == '\n') { - if(!normalizedCR && usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = '\n'; - } - normalizedCR = false; - } else { - if(usePC) { - if(pcEnd >= pc.length) ensurePC(pcEnd); - pc[pcEnd++] = ch; - } - normalizedCR = false; - } - } - } - } catch(EOFException ex) { - // detect EOF and create meaningful error ... - throw new XmlPullParserException( - "CDATA section started on line "+curLine+" and column "+curColumn+" was not closed", - this, ex); - } - if(normalizeInput) { - if(usePC) { - pcEnd = pcEnd - 2; - } - } - posStart = cdStart - bufAbsoluteStart; - posEnd = pos - 3; - } - - protected void fillBuf() throws IOException, XmlPullParserException { - if(reader == null) throw new XmlPullParserException( - "reader must be set before parsing is started"); - - // see if we are in compaction area - if(bufEnd > bufSoftLimit) { - - // expand buffer it makes sense!!!! - boolean compact = bufStart > bufSoftLimit; - boolean expand = false; - if(preventBufferCompaction) { - compact = false; - expand = true; - } else if(!compact) { - //freeSpace - if(bufStart < buf.length / 2) { - // less then half buffer available forcompactin --> expand instead!!! - expand = true; - } else { - // at least half of buffer can be reclaimed --> worthwhile effort!!! - compact = true; - } - } - - // if buffer almost full then compact it - if(compact) { - //TODO: look on trashing - // //assert bufStart > 0 - System.arraycopy(buf, bufStart, buf, 0, bufEnd - bufStart); - if(TRACE_SIZING) System.out.println( - "TRACE_SIZING fillBuf() compacting "+bufStart - +" bufEnd="+bufEnd - +" pos="+pos+" posStart="+posStart+" posEnd="+posEnd - +" buf first 100 chars:"+new String(buf, bufStart, - bufEnd - bufStart < 100 ? bufEnd - bufStart : 100 )); - - } else if(expand) { - final int newSize = 2 * buf.length; - final char newBuf[] = new char[ newSize ]; - if(TRACE_SIZING) System.out.println("TRACE_SIZING fillBuf() "+buf.length+" => "+newSize); - System.arraycopy(buf, bufStart, newBuf, 0, bufEnd - bufStart); - buf = newBuf; - if(bufLoadFactor > 0) { - bufSoftLimit = ( bufLoadFactor * buf.length ) /100; - } - - } else { - throw new XmlPullParserException("internal error in fillBuffer()"); - } - bufEnd -= bufStart; - pos -= bufStart; - posStart -= bufStart; - posEnd -= bufStart; - bufAbsoluteStart += bufStart; - bufStart = 0; - if(TRACE_SIZING) System.out.println( - "TRACE_SIZING fillBuf() after bufEnd="+bufEnd - +" pos="+pos+" posStart="+posStart+" posEnd="+posEnd - +" buf first 100 chars:"+new String(buf, 0, bufEnd < 100 ? bufEnd : 100)); - } - // at least one charcter must be read or error - final int len = buf.length - bufEnd > READ_CHUNK_SIZE ? READ_CHUNK_SIZE : buf.length - bufEnd; - final int ret = reader.read(buf, bufEnd, len); - if(ret > 0) { - bufEnd += ret; - if(TRACE_SIZING) System.out.println( - "TRACE_SIZING fillBuf() after filling in buffer" - +" buf first 100 chars:"+new String(buf, 0, bufEnd < 100 ? bufEnd : 100)); - - return; - } - if(ret == -1) { - if(bufAbsoluteStart == 0 && pos == 0) { - throw new EOFException("input contained no data"); - } else { - if(seenRoot && depth == 0) { // inside parsing epilog!!! - reachedEnd = true; - return; - } else { - StringBuffer expectedTagStack = new StringBuffer(); - if(depth > 0) { - //final char[] cbuf = elRawName[depth]; - //final String startname = new String(cbuf, 0, elRawNameEnd[depth]); - expectedTagStack.append(" - expected end tag"); - if(depth > 1) { - expectedTagStack.append("s"); //more than one end tag - } - expectedTagStack.append(" "); - for (int i = depth; i > 0; i--) - { - String tagName = new String(elRawName[i], 0, elRawNameEnd[i]); - expectedTagStack.append("'); - } - expectedTagStack.append(" to close"); - for (int i = depth; i > 0; i--) - { - if(i != depth) { - expectedTagStack.append(" and"); //more than one end tag - } - String tagName = new String(elRawName[i], 0, elRawNameEnd[i]); - expectedTagStack.append(" start tag <"+tagName+">"); - expectedTagStack.append(" from line "+elRawNameLine[i]); - } - expectedTagStack.append(", parser stopped on"); - } - throw new EOFException("no more data available" - +expectedTagStack.toString()+getPositionDescription()); - } - } - } else { - throw new IOException("error reading input, returned "+ret); - } - } - - protected char more() throws IOException, XmlPullParserException { - if(pos >= bufEnd) { - fillBuf(); - // this return value should be ignonored as it is used in epilog parsing ... - if(reachedEnd) return (char)-1; - } - final char ch = buf[pos++]; - //line/columnNumber - if(ch == '\n') { ++lineNumber; columnNumber = 1; } - else { ++columnNumber; } - //System.out.print(ch); - return ch; - } - - // /** - // * This function returns position of parser in XML input stream - // * (how many characters were processed. - // *

NOTE: this logical position and not byte offset as encodings - // * such as UTF8 may use more than one byte to encode one character. - // */ - // public int getCurrentInputPosition() { - // return pos + bufAbsoluteStart; - // } - - protected void ensurePC(int end) { - //assert end >= pc.length; - final int newSize = end > READ_CHUNK_SIZE ? 2 * end : 2 * READ_CHUNK_SIZE; - final char[] newPC = new char[ newSize ]; - if(TRACE_SIZING) System.out.println("TRACE_SIZING ensurePC() "+pc.length+" ==> "+newSize+" end="+end); - System.arraycopy(pc, 0, newPC, 0, pcEnd); - pc = newPC; - //assert end < pc.length; - } - - protected void joinPC() { - //assert usePC == false; - //assert posEnd > posStart; - final int len = posEnd - posStart; - final int newEnd = pcEnd + len + 1; - if(newEnd >= pc.length) ensurePC(newEnd); // add 1 for extra space for one char - //assert newEnd < pc.length; - System.arraycopy(buf, posStart, pc, pcEnd, len); - pcEnd += len; - usePC = true; - - } - - protected char requireInput(char ch, char[] input) - throws XmlPullParserException, IOException - { - for (int i = 0; i < input.length; i++) - { - if(ch != input[i]) { - throw new XmlPullParserException( - "expected "+printable(input[i])+" in "+new String(input) - +" and not "+printable(ch), this, null); - } - ch = more(); - } - return ch; - } - - protected char requireNextS() - throws XmlPullParserException, IOException - { - final char ch = more(); - if(!isS(ch)) { - throw new XmlPullParserException( - "white space is required and not "+printable(ch), this, null); - } - return skipS(ch); - } - - protected char skipS(char ch) - throws XmlPullParserException, IOException - { - while(isS(ch)) { ch = more(); } // skip additional spaces - return ch; - } - - // nameStart / name lookup tables based on XML 1.1 http://www.w3.org/TR/2001/WD-xml11-20011213/ - protected static final int LOOKUP_MAX = 0x400; - protected static final char LOOKUP_MAX_CHAR = (char)LOOKUP_MAX; - // protected static int lookupNameStartChar[] = new int[ LOOKUP_MAX_CHAR / 32 ]; - // protected static int lookupNameChar[] = new int[ LOOKUP_MAX_CHAR / 32 ]; - protected static boolean lookupNameStartChar[] = new boolean[ LOOKUP_MAX ]; - protected static boolean lookupNameChar[] = new boolean[ LOOKUP_MAX ]; - - private static final void setName(char ch) - //{ lookupNameChar[ (int)ch / 32 ] |= (1 << (ch % 32)); } - { lookupNameChar[ ch ] = true; } - private static final void setNameStart(char ch) - //{ lookupNameStartChar[ (int)ch / 32 ] |= (1 << (ch % 32)); setName(ch); } - { lookupNameStartChar[ ch ] = true; setName(ch); } - - static { - setNameStart(':'); - for (char ch = 'A'; ch <= 'Z'; ++ch) setNameStart(ch); - setNameStart('_'); - for (char ch = 'a'; ch <= 'z'; ++ch) setNameStart(ch); - for (char ch = '\u00c0'; ch <= '\u02FF'; ++ch) setNameStart(ch); - for (char ch = '\u0370'; ch <= '\u037d'; ++ch) setNameStart(ch); - for (char ch = '\u037f'; ch < '\u0400'; ++ch) setNameStart(ch); - - setName('-'); - setName('.'); - for (char ch = '0'; ch <= '9'; ++ch) setName(ch); - setName('\u00b7'); - for (char ch = '\u0300'; ch <= '\u036f'; ++ch) setName(ch); - } - - //private final static boolean isNameStartChar(char ch) { - protected boolean isNameStartChar(char ch) { - return (ch < LOOKUP_MAX_CHAR && lookupNameStartChar[ ch ]) - || (ch >= LOOKUP_MAX_CHAR && ch <= '\u2027') - || (ch >= '\u202A' && ch <= '\u218F') - || (ch >= '\u2800' && ch <= '\uFFEF') - ; - - // if(ch < LOOKUP_MAX_CHAR) return lookupNameStartChar[ ch ]; - // else return ch <= '\u2027' - // || (ch >= '\u202A' && ch <= '\u218F') - // || (ch >= '\u2800' && ch <= '\uFFEF') - // ; - //return false; - // return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch == ':' - // || (ch >= '0' && ch <= '9'); - // if(ch < LOOKUP_MAX_CHAR) return (lookupNameStartChar[ (int)ch / 32 ] & (1 << (ch % 32))) != 0; - // if(ch <= '\u2027') return true; - // //[#x202A-#x218F] - // if(ch < '\u202A') return false; - // if(ch <= '\u218F') return true; - // // added pairts [#x2800-#xD7FF] | [#xE000-#xFDCF] | [#xFDE0-#xFFEF] | [#x10000-#x10FFFF] - // if(ch < '\u2800') return false; - // if(ch <= '\uFFEF') return true; - // return false; - - - // else return (supportXml11 && ( (ch < '\u2027') || (ch > '\u2029' && ch < '\u2200') ... - } - - //private final static boolean isNameChar(char ch) { - protected boolean isNameChar(char ch) { - //return isNameStartChar(ch); - - // if(ch < LOOKUP_MAX_CHAR) return (lookupNameChar[ (int)ch / 32 ] & (1 << (ch % 32))) != 0; - - return (ch < LOOKUP_MAX_CHAR && lookupNameChar[ ch ]) - || (ch >= LOOKUP_MAX_CHAR && ch <= '\u2027') - || (ch >= '\u202A' && ch <= '\u218F') - || (ch >= '\u2800' && ch <= '\uFFEF') - ; - //return false; - // return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch == ':' - // || (ch >= '0' && ch <= '9'); - // if(ch < LOOKUP_MAX_CHAR) return (lookupNameStartChar[ (int)ch / 32 ] & (1 << (ch % 32))) != 0; - - //else return - // else if(ch <= '\u2027') return true; - // //[#x202A-#x218F] - // else if(ch < '\u202A') return false; - // else if(ch <= '\u218F') return true; - // // added pairts [#x2800-#xD7FF] | [#xE000-#xFDCF] | [#xFDE0-#xFFEF] | [#x10000-#x10FFFF] - // else if(ch < '\u2800') return false; - // else if(ch <= '\uFFEF') return true; - //else return false; - } - - protected boolean isS(char ch) { - return (ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t'); - // || (supportXml11 && (ch == '\u0085' || ch == '\u2028'); - } - - //protected boolean isChar(char ch) { return (ch < '\uD800' || ch > '\uDFFF') - // ch != '\u0000' ch < '\uFFFE' - - - //protected char printable(char ch) { return ch; } - protected String printable(char ch) { - if(ch == '\n') { - return "\\n"; - } else if(ch == '\r') { - return "\\r"; - } else if(ch == '\t') { - return "\\t"; - } else if(ch == '\'') { - return "\\'"; - } if(ch > 127 || ch < 32) { - return "\\u"+Integer.toHexString((int)ch); - } - return ""+ch; - } - - protected String printable(String s) { - if(s == null) return null; - final int sLen = s.length(); - StringBuffer buf = new StringBuffer(sLen + 10); - for(int i = 0; i < sLen; ++i) { - buf.append(printable(s.charAt(i))); - } - s = buf.toString(); - return s; - } -} - - -/* - * Indiana University Extreme! Lab Software License, Version 1.2 - * - * Copyright (C) 2003 The Trustees of Indiana University. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1) All redistributions of source code must retain the above - * copyright notice, the list of authors in the original source - * code, this list of conditions and the disclaimer listed in this - * license; - * - * 2) All redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the disclaimer - * listed in this license in the documentation and/or other - * materials provided with the distribution; - * - * 3) Any documentation included with all redistributions must include - * the following acknowledgement: - * - * "This product includes software developed by the Indiana - * University Extreme! Lab. For further information please visit - * http://www.extreme.indiana.edu/" - * - * Alternatively, this acknowledgment may appear in the software - * itself, and wherever such third-party acknowledgments normally - * appear. - * - * 4) The name "Indiana University" or "Indiana University - * Extreme! Lab" shall not be used to endorse or promote - * products derived from this software without prior written - * permission from Indiana University. For written permission, - * please contact http://www.extreme.indiana.edu/. - * - * 5) Products derived from this software may not use "Indiana - * University" name nor may "Indiana University" appear in their name, - * without prior written permission of the Indiana University. - * - * Indiana University provides no reassurances that the source code - * provided does not infringe the patent or any other intellectual - * property rights of any other entity. Indiana University disclaims any - * liability to any recipient for claims brought by any other entity - * based on infringement of intellectual property rights or otherwise. - * - * LICENSEE UNDERSTANDS THAT SOFTWARE IS PROVIDED "AS IS" FOR WHICH - * NO WARRANTIES AS TO CAPABILITIES OR ACCURACY ARE MADE. INDIANA - * UNIVERSITY GIVES NO WARRANTIES AND MAKES NO REPRESENTATION THAT - * SOFTWARE IS FREE OF INFRINGEMENT OF THIRD PARTY PATENT, COPYRIGHT, OR - * OTHER PROPRIETARY RIGHTS. INDIANA UNIVERSITY MAKES NO WARRANTIES THAT - * SOFTWARE IS FREE FROM "BUGS", "VIRUSES", "TROJAN HORSES", "TRAP - * DOORS", "WORMS", OR OTHER HARMFUL CODE. LICENSEE ASSUMES THE ENTIRE - * RISK AS TO THE PERFORMANCE OF SOFTWARE AND/OR ASSOCIATED MATERIALS, - * AND TO THE PERFORMANCE AND VALIDITY OF INFORMATION GENERATED USING - * SOFTWARE. - */ - - - - - - diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/pull/MXSerializer.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/pull/MXSerializer.java deleted file mode 100644 index 13676af5b..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/pull/MXSerializer.java +++ /dev/null @@ -1,1111 +0,0 @@ -package org.codehaus.plexus.util.xml.pull; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.Writer; - -/** - * Implementation of XmlSerializer interface from XmlPull V1 API. - * This implementation is optimzied for performance and low memory footprint. - * - *

Implemented features:

    - *
  • FEATURE_NAMES_INTERNED - when enabled all returned names - * (namespaces, prefixes) will be interned and it is required that - * all names passed as arguments MUST be interned - *
  • FEATURE_SERIALIZER_ATTVALUE_USE_APOSTROPHE - *
- *

Implemented properties:

    - *
  • PROPERTY_SERIALIZER_INDENTATION - *
  • PROPERTY_SERIALIZER_LINE_SEPARATOR - *
- * - */ -public class MXSerializer implements XmlSerializer { - protected final static String XML_URI = "http://www.w3.org/XML/1998/namespace"; - protected final static String XMLNS_URI = "http://www.w3.org/2000/xmlns/"; - private static final boolean TRACE_SIZING = false; - - protected final String FEATURE_SERIALIZER_ATTVALUE_USE_APOSTROPHE = - "http://xmlpull.org/v1/doc/features.html#serializer-attvalue-use-apostrophe"; - protected final String FEATURE_NAMES_INTERNED = - "http://xmlpull.org/v1/doc/features.html#names-interned"; - protected final String PROPERTY_SERIALIZER_INDENTATION = - "http://xmlpull.org/v1/doc/properties.html#serializer-indentation"; - protected final String PROPERTY_SERIALIZER_LINE_SEPARATOR = - "http://xmlpull.org/v1/doc/properties.html#serializer-line-separator"; - protected final static String PROPERTY_LOCATION = - "http://xmlpull.org/v1/doc/properties.html#location"; - - // properties/features - protected boolean namesInterned; - protected boolean attributeUseApostrophe; - protected String indentationString = null; //" "; - protected String lineSeparator = "\n"; - - protected String location; - protected Writer out; - - protected int autoDeclaredPrefixes; - - protected int depth = 0; - - // element stack - protected String elNamespace[] = new String[ 2 ]; - protected String elName[] = new String[ elNamespace.length ]; - protected int elNamespaceCount[] = new int[ elNamespace.length ]; - - //namespace stack - protected int namespaceEnd = 0; - protected String namespacePrefix[] = new String[ 8 ]; - protected String namespaceUri[] = new String[ namespacePrefix.length ]; - - protected boolean finished; - protected boolean pastRoot; - protected boolean setPrefixCalled; - protected boolean startTagIncomplete; - - protected boolean doIndent; - protected boolean seenTag; - - protected boolean seenBracket; - protected boolean seenBracketBracket; - - // buffer output if neede to write escaped String see text(String) - private static final int BUF_LEN = Runtime.getRuntime().freeMemory() > 1000000L ? 8*1024 : 256; - protected char buf[] = new char[ BUF_LEN ]; - - - protected static final String precomputedPrefixes[]; - - static { - precomputedPrefixes = new String[32]; //arbitrary number ... - for (int i = 0; i < precomputedPrefixes.length; i++) - { - precomputedPrefixes[i] = ("n"+i).intern(); - } - } - - private boolean checkNamesInterned = false; - - private void checkInterning(String name) { - if(namesInterned && name != name.intern()) { - throw new IllegalArgumentException( - "all names passed as arguments must be interned" - +"when NAMES INTERNED feature is enabled"); - } - } - - protected void reset() { - location = null; - out = null; - autoDeclaredPrefixes = 0; - depth = 0; - - // nullify references on all levels to allow it to be GCed - for (int i = 0; i < elNamespaceCount.length; i++) - { - elName[ i ] = null; - elNamespace[ i ] = null; - elNamespaceCount[ i ] = 2; - } - - - namespaceEnd = 0; - - - //NOTE: no need to intern() as all literal strings and string-valued constant expressions - //are interned. String literals are defined in 3.10.5 of the Java Language Specification - // just checking ... - //assert "xmlns" == "xmlns".intern(); - //assert XMLNS_URI == XMLNS_URI.intern(); - - //TODO: how to prevent from reporting this namespace? - // this is special namespace declared for consistensy with XML infoset - namespacePrefix[ namespaceEnd ] = "xmlns"; - namespaceUri[ namespaceEnd ] = XMLNS_URI; - ++namespaceEnd; - - namespacePrefix[ namespaceEnd ] = "xml"; - namespaceUri[ namespaceEnd ] = XML_URI; - ++namespaceEnd; - - finished = false; - pastRoot = false; - setPrefixCalled = false; - startTagIncomplete = false; - //doIntent is not changed - seenTag = false; - - seenBracket = false; - seenBracketBracket = false; - } - - - protected void ensureElementsCapacity() { - final int elStackSize = elName.length; - //assert (depth + 1) >= elName.length; - // we add at least one extra slot ... - final int newSize = (depth >= 7 ? 2 * depth : 8) + 2; // = lucky 7 + 1 //25 - if(TRACE_SIZING) { - System.err.println( - getClass().getName()+" elStackSize "+elStackSize+" ==> "+newSize); - } - final boolean needsCopying = elStackSize > 0; - String[] arr = null; - // reuse arr local variable slot - arr = new String[newSize]; - if(needsCopying) System.arraycopy(elName, 0, arr, 0, elStackSize); - elName = arr; - arr = new String[newSize]; - if(needsCopying) System.arraycopy(elNamespace, 0, arr, 0, elStackSize); - elNamespace = arr; - - final int[] iarr = new int[newSize]; - if(needsCopying) { - System.arraycopy(elNamespaceCount, 0, iarr, 0, elStackSize); - } else { - // special initialization - iarr[0] = 0; - } - elNamespaceCount = iarr; - } - - protected void ensureNamespacesCapacity() { //int size) { - //int namespaceSize = namespacePrefix != null ? namespacePrefix.length : 0; - //assert (namespaceEnd >= namespacePrefix.length); - - //if(size >= namespaceSize) { - //int newSize = size > 7 ? 2 * size : 8; // = lucky 7 + 1 //25 - final int newSize = namespaceEnd > 7 ? 2 * namespaceEnd : 8; - if(TRACE_SIZING) { - System.err.println( - getClass().getName()+" namespaceSize "+namespacePrefix.length+" ==> "+newSize); - } - final String[] newNamespacePrefix = new String[newSize]; - final String[] newNamespaceUri = new String[newSize]; - if(namespacePrefix != null) { - System.arraycopy( - namespacePrefix, 0, newNamespacePrefix, 0, namespaceEnd); - System.arraycopy( - namespaceUri, 0, newNamespaceUri, 0, namespaceEnd); - } - namespacePrefix = newNamespacePrefix; - namespaceUri = newNamespaceUri; - - // TODO use hashes for quick namespace->prefix lookups - // if( ! allStringsInterned ) { - // int[] newNamespacePrefixHash = new int[newSize]; - // if(namespacePrefixHash != null) { - // System.arraycopy( - // namespacePrefixHash, 0, newNamespacePrefixHash, 0, namespaceEnd); - // } - // namespacePrefixHash = newNamespacePrefixHash; - // } - //prefixesSize = newSize; - // ////assert nsPrefixes.length > size && nsPrefixes.length == newSize - //} - } - - - public void setFeature(String name, - boolean state) throws IllegalArgumentException, IllegalStateException - { - if(name == null) { - throw new IllegalArgumentException("feature name can not be null"); - } - if(FEATURE_NAMES_INTERNED.equals(name)) { - namesInterned = state; - } else if(FEATURE_SERIALIZER_ATTVALUE_USE_APOSTROPHE.equals(name)) { - attributeUseApostrophe = state; - } else { - throw new IllegalStateException("unsupported feature "+name); - } - } - - public boolean getFeature(String name) throws IllegalArgumentException - { - if(name == null) { - throw new IllegalArgumentException("feature name can not be null"); - } - if(FEATURE_NAMES_INTERNED.equals(name)) { - return namesInterned; - } else if(FEATURE_SERIALIZER_ATTVALUE_USE_APOSTROPHE.equals(name)) { - return attributeUseApostrophe; - } else { - return false; - } - } - - // precomputed variables to simplify writing indentation - protected int offsetNewLine; - protected int indentationJump; - protected char[] indentationBuf; - protected int maxIndentLevel; - protected boolean writeLineSepartor; //should end-of-line be written - protected boolean writeIndentation; // is indentation used? - - /** - * For maximum efficiency when writing indents the required output is pre-computed - * This is internal function that recomputes buffer after user requested chnages. - */ - protected void rebuildIndentationBuf() { - if(doIndent == false) return; - final int maxIndent = 65; //hardcoded maximum indentation size in characters - int bufSize = 0; - offsetNewLine = 0; - if(writeLineSepartor) { - offsetNewLine = lineSeparator.length(); - bufSize += offsetNewLine; - } - maxIndentLevel = 0; - if(writeIndentation) { - indentationJump = indentationString.length(); - maxIndentLevel = maxIndent / indentationJump; - bufSize += maxIndentLevel * indentationJump; - } - if(indentationBuf == null || indentationBuf.length < bufSize) { - indentationBuf = new char[bufSize + 8]; - } - int bufPos = 0; - if(writeLineSepartor) { - for (int i = 0; i < lineSeparator.length(); i++) - { - indentationBuf[ bufPos++ ] = lineSeparator.charAt(i); - } - } - if(writeIndentation) { - for (int i = 0; i < maxIndentLevel; i++) - { - for (int j = 0; j < indentationString.length(); j++) - { - indentationBuf[ bufPos++ ] = indentationString.charAt(j); - } - } - } - } - - // if(doIndent) writeIndent(); - protected void writeIndent() throws IOException { - final int start = writeLineSepartor ? 0 : offsetNewLine; - final int level = (depth > maxIndentLevel) ? maxIndentLevel : depth; - out.write( indentationBuf, start, (level * indentationJump) + offsetNewLine); - } - - public void setProperty(String name, - Object value) throws IllegalArgumentException, IllegalStateException - { - if(name == null) { - throw new IllegalArgumentException("property name can not be null"); - } - if(PROPERTY_SERIALIZER_INDENTATION.equals(name)) { - indentationString = (String)value; - } else if(PROPERTY_SERIALIZER_LINE_SEPARATOR.equals(name)) { - lineSeparator = (String)value; - } else if(PROPERTY_LOCATION.equals(name)) { - location = (String) value; - } else { - throw new IllegalStateException("unsupported property "+name); - } - writeLineSepartor = lineSeparator != null && lineSeparator.length() > 0; - writeIndentation = indentationString != null && indentationString.length() > 0; - // optimize - do not write when nothing to write ... - doIndent = indentationString != null && (writeLineSepartor || writeIndentation); - //NOTE: when indentationString == null there is no indentation - // (even though writeLineSeparator may be true ...) - rebuildIndentationBuf(); - seenTag = false; // for consistency - } - - public Object getProperty(String name) throws IllegalArgumentException - { - if(name == null) { - throw new IllegalArgumentException("property name can not be null"); - } - if(PROPERTY_SERIALIZER_INDENTATION.equals(name)) { - return indentationString; - } else if(PROPERTY_SERIALIZER_LINE_SEPARATOR.equals(name)) { - return lineSeparator; - } else if(PROPERTY_LOCATION.equals(name)) { - return location; - } else { - return null; - } - } - - private String getLocation() { - return location != null ? " @"+location : ""; - } - - // this is special method that can be accessed directly to retrieve Writer serializer is using - public Writer getWriter() - { - return out; - } - - public void setOutput(Writer writer) - { - reset(); - out = writer; - } - - public void setOutput(OutputStream os, String encoding) throws IOException - { - if(os == null) throw new IllegalArgumentException("output stream can not be null"); - reset(); - if(encoding != null) { - out = new OutputStreamWriter(os, encoding); - } else { - out = new OutputStreamWriter(os); - } - } - - public void startDocument (String encoding, Boolean standalone) throws IOException - { - char apos = attributeUseApostrophe ? '\'' : '"'; - if(attributeUseApostrophe) { - out.write(""); - } - - public void endDocument() throws IOException - { - // close all unclosed tag; - while(depth > 0) { - endTag(elNamespace[ depth ], elName[ depth ]); - } - //assert depth == 0; - //assert startTagIncomplete == false; - finished = pastRoot = startTagIncomplete = true; - out.flush(); - } - - public void setPrefix(String prefix, String namespace) throws IOException - { - if(startTagIncomplete) closeStartTag(); - //assert prefix != null; - //assert namespace != null; - if (prefix == null) { - prefix = ""; - } - if(!namesInterned) { - prefix = prefix.intern(); //will throw NPE if prefix==null - } else if(checkNamesInterned) { - checkInterning(prefix); - } else if(prefix == null) { - throw new IllegalArgumentException("prefix must be not null"+getLocation()); - } - - //check that prefix is not duplicated ... - for (int i = elNamespaceCount[ depth ]; i < namespaceEnd; i++) - { - if(prefix == namespacePrefix[ i ]) { - throw new IllegalStateException("duplicated prefix "+printable(prefix)+getLocation()); - } - } - - if(!namesInterned) { - namespace = namespace.intern(); - } else if(checkNamesInterned) { - checkInterning(namespace); - } else if(namespace == null) { - throw new IllegalArgumentException("namespace must be not null"+getLocation()); - } - - if(namespaceEnd >= namespacePrefix.length) { - ensureNamespacesCapacity(); - } - namespacePrefix[ namespaceEnd ] = prefix; - namespaceUri[ namespaceEnd ] = namespace; - ++namespaceEnd; - setPrefixCalled = true; - } - - protected String lookupOrDeclarePrefix( String namespace ) { - return getPrefix(namespace, true); - } - - public String getPrefix(String namespace, boolean generatePrefix) - { - //assert namespace != null; - if(!namesInterned) { - // when String is interned we can do much faster namespace stack lookups ... - namespace = namespace.intern(); - } else if(checkNamesInterned) { - checkInterning(namespace); - //assert namespace != namespace.intern(); - } - if(namespace == null) { - throw new IllegalArgumentException("namespace must be not null"+getLocation()); - } else if(namespace.length() == 0) { - throw new IllegalArgumentException("default namespace cannot have prefix"+getLocation()); - } - - // first check if namespace is already in scope - for (int i = namespaceEnd - 1; i >= 0 ; --i) - { - if(namespace == namespaceUri[ i ]) { - final String prefix = namespacePrefix[ i ]; - // now check that prefix is still in scope - for (int p = namespaceEnd - 1; p > i ; --p) - { - if(prefix == namespacePrefix[ p ]) - continue; // too bad - prefix is redeclared with different namespace - } - return prefix; - } - } - - // so not found it ... - if(!generatePrefix) { - return null; - } - return generatePrefix(namespace); - } - - private String generatePrefix(String namespace) { - //assert namespace == namespace.intern(); - while(true) { - ++autoDeclaredPrefixes; - //fast lookup uses table that was pre-initialized in static{} .... - final String prefix = autoDeclaredPrefixes < precomputedPrefixes.length - ? precomputedPrefixes[autoDeclaredPrefixes] : ("n"+autoDeclaredPrefixes).intern(); - // make sure this prefix is not declared in any scope (avoid hiding in-scope prefixes)! - for (int i = namespaceEnd - 1; i >= 0 ; --i) - { - if(prefix == namespacePrefix[ i ]) { - continue; // prefix is already declared - generate new and try again - } - } - // declare prefix - - if(namespaceEnd >= namespacePrefix.length) { - ensureNamespacesCapacity(); - } - namespacePrefix[ namespaceEnd ] = prefix; - namespaceUri[ namespaceEnd ] = namespace; - ++namespaceEnd; - - return prefix; - } - } - - public int getDepth() - { - return depth; - } - - public String getNamespace () - { - return elNamespace[depth]; - } - - public String getName() - { - return elName[depth]; - } - - public XmlSerializer startTag (String namespace, String name) throws IOException - { - - if(startTagIncomplete) { - closeStartTag(); - } - seenBracket = seenBracketBracket = false; - if(doIndent && depth > 0 && seenTag) { - writeIndent(); - } - seenTag = true; - setPrefixCalled = false; - startTagIncomplete = true; - ++depth; - if( (depth + 1) >= elName.length) { - ensureElementsCapacity(); - } - ////assert namespace != null; - - if(checkNamesInterned && namesInterned) checkInterning(namespace); - elNamespace[ depth ] = (namesInterned || namespace == null) ? namespace : namespace.intern(); - //assert name != null; - //elName[ depth ] = name; - if(checkNamesInterned && namesInterned) checkInterning(name); - elName[ depth ] = (namesInterned || name == null) ? name : name.intern(); - if(out == null) { - throw new IllegalStateException("setOutput() must called set before serialization can start"); - } - out.write('<'); - if(namespace != null) { - - if(namespace.length() > 0) { - //ALEK: in future make it as feature on serializer - String prefix = null; - if(depth > 0 && (namespaceEnd - elNamespaceCount[depth-1]) == 1) { - // if only one prefix was declared un-declare it ifprefix is alredy declared on parent el with the same URI - String uri = namespaceUri[namespaceEnd-1]; - if(uri == namespace || uri.equals(namespace)) { - String elPfx = namespacePrefix[namespaceEnd-1]; - // 2 == to skip predefined namesapces (xml and xmlns ...) - for(int pos = elNamespaceCount[depth-1] - 1; pos >= 2; --pos ) { - String pf = namespacePrefix[pos]; - if(pf == elPfx || pf.equals(elPfx)) { - String n = namespaceUri[pos]; - if(n == uri || n.equals(uri)) { - --namespaceEnd; //un-declare namespace - prefix = elPfx; - } - break; - } - } - } - } - if(prefix == null) { - prefix = lookupOrDeclarePrefix( namespace ); - } - //assert prefix != null; - // make sure that default ("") namespace to not print ":" - if(prefix.length() > 0) { - out.write(prefix); - out.write(':'); - } - } else { - // make sure that default namespace can be declared - for (int i = namespaceEnd - 1; i >= 0 ; --i) - { - if(namespacePrefix[ i ] == "") { - final String uri = namespaceUri[ i ]; - if(uri == null) { - // declare default namespace - setPrefix("", ""); - } else if(uri.length() > 0) { - throw new IllegalStateException( - "start tag can not be written in empty default namespace "+ - "as default namespace is currently bound to '"+uri+"'"+getLocation()); - } - break; - } - } - } - - } - out.write(name); - return this; - } - - public XmlSerializer attribute (String namespace, String name, - String value) throws IOException - { - if(!startTagIncomplete) { - throw new IllegalArgumentException("startTag() must be called before attribute()"+getLocation()); - } - //assert setPrefixCalled == false; - out.write(' '); - ////assert namespace != null; - if(namespace != null && namespace.length() > 0) { - //namespace = namespace.intern(); - if(!namesInterned) { - namespace = namespace.intern(); - } else if(checkNamesInterned) { - checkInterning(namespace); - } - String prefix = lookupOrDeclarePrefix( namespace ); - //assert( prefix != null); - if(prefix.length() == 0) { - // needs to declare prefix to hold default namespace - //NOTE: attributes such as a='b' are in NO namespace - prefix = generatePrefix(namespace); - } - out.write(prefix); - out.write(':'); - // if(prefix.length() > 0) { - // out.write(prefix); - // out.write(':'); - // } - } - //assert name != null; - out.write(name); - out.write('='); - //assert value != null; - out.write( attributeUseApostrophe ? '\'' : '"'); - writeAttributeValue(value, out); - out.write( attributeUseApostrophe ? '\'' : '"'); - return this; - } - - protected void closeStartTag() throws IOException { - if(finished) { - throw new IllegalArgumentException("trying to write past already finished output"+getLocation()); - } - if(seenBracket) { - seenBracket = seenBracketBracket = false; - } - if( startTagIncomplete || setPrefixCalled ) { - if(setPrefixCalled) { - throw new IllegalArgumentException( - "startTag() must be called immediately after setPrefix()"+getLocation()); - } - if(!startTagIncomplete) { - throw new IllegalArgumentException("trying to close start tag that is not opened"+getLocation()); - } - - // write all namespace delcarations! - writeNamespaceDeclarations(); - out.write('>'); - elNamespaceCount[ depth ] = namespaceEnd; - startTagIncomplete = false; - } - } - - private void writeNamespaceDeclarations() throws IOException - { - //int start = elNamespaceCount[ depth - 1 ]; - for (int i = elNamespaceCount[ depth - 1 ]; i < namespaceEnd; i++) - { - if(doIndent && namespaceUri[ i ].length() > 40) { - writeIndent(); - out.write(" "); - } - if(namespacePrefix[ i ] != "") { - out.write(" xmlns:"); - out.write(namespacePrefix[ i ]); - out.write('='); - } else { - out.write(" xmlns="); - } - out.write( attributeUseApostrophe ? '\'' : '"'); - - //NOTE: escaping of namespace value the same way as attributes!!!! - writeAttributeValue(namespaceUri[ i ], out); - - out.write( attributeUseApostrophe ? '\'' : '"'); - } - } - - public XmlSerializer endTag(String namespace, String name) throws IOException - { - // check that level is valid - ////assert namespace != null; - //if(namespace != null) { - // namespace = namespace.intern(); - //} - seenBracket = seenBracketBracket = false; - if(namespace != null) { - if(!namesInterned) { - namespace = namespace.intern(); - } else if(checkNamesInterned) { - checkInterning(namespace); - } - } - - if(namespace != elNamespace[ depth ]) - { - throw new IllegalArgumentException( - "expected namespace "+printable(elNamespace[ depth ]) - +" and not "+printable(namespace)+getLocation()); - } - if(name == null) { - throw new IllegalArgumentException("end tag name can not be null"+getLocation()); - } - if(checkNamesInterned && namesInterned) { - checkInterning(name); - } - - if((!namesInterned && !name.equals(elName[ depth ])) - || (namesInterned && name != elName[ depth ])) - { - throw new IllegalArgumentException( - "expected element name "+printable(elName[ depth ])+" and not "+printable(name)+getLocation()); - } - if(startTagIncomplete) { - writeNamespaceDeclarations(); - out.write(" />"); //space is added to make it easier to work in XHTML!!! - --depth; - } else { - --depth; - //assert startTagIncomplete == false; - if(doIndent && seenTag) { writeIndent(); } - out.write(" 0) { - //TODO prefix should be alredy known from matching start tag ... - final String prefix = lookupOrDeclarePrefix( namespace ); - //assert( prefix != null); - if(prefix.length() > 0) { - out.write(prefix); - out.write(':'); - } - } - out.write(name); - out.write('>'); - - } - namespaceEnd = elNamespaceCount[ depth ]; - startTagIncomplete = false; - seenTag = true; - return this; - } - - public XmlSerializer text (String text) throws IOException - { - //assert text != null; - if(startTagIncomplete || setPrefixCalled) closeStartTag(); - if(doIndent && seenTag) seenTag = false; - writeElementContent(text, out); - return this; - } - - public XmlSerializer text (char [] buf, int start, int len) throws IOException - { - if(startTagIncomplete || setPrefixCalled) closeStartTag(); - if(doIndent && seenTag) seenTag = false; - writeElementContent(buf, start, len, out); - return this; - } - - public void cdsect (String text) throws IOException - { - if(startTagIncomplete || setPrefixCalled || seenBracket) closeStartTag(); - if(doIndent && seenTag) seenTag = false; - out.write(""); - } - - public void entityRef (String text) throws IOException - { - if(startTagIncomplete || setPrefixCalled || seenBracket) closeStartTag(); - if(doIndent && seenTag) seenTag = false; - out.write('&'); - out.write(text); //escape? - out.write(';'); - } - - public void processingInstruction (String text) throws IOException - { - if(startTagIncomplete || setPrefixCalled || seenBracket) closeStartTag(); - if(doIndent && seenTag) seenTag = false; - out.write(""); - } - - public void comment (String text) throws IOException - { - if(startTagIncomplete || setPrefixCalled || seenBracket) closeStartTag(); - if(doIndent && seenTag) seenTag = false; - out.write(""); - } - - public void docdecl (String text) throws IOException - { - if(startTagIncomplete || setPrefixCalled || seenBracket) closeStartTag(); - if(doIndent && seenTag) seenTag = false; - out.write(""); - } - - public void ignorableWhitespace (String text) throws IOException - { - if(startTagIncomplete || setPrefixCalled || seenBracket) closeStartTag(); - if(doIndent && seenTag) seenTag = false; - if(text.length() == 0) { - throw new IllegalArgumentException( - "empty string is not allowed for ignorable whitespace"+getLocation()); - } - out.write(text); //no escape? - } - - public void flush () throws IOException - { - if(!finished && startTagIncomplete) closeStartTag(); - out.flush(); - } - - // --- utility methods - - protected void writeAttributeValue(String value, Writer out) throws IOException - { - //.[apostrophe and <, & escaped], - final char quot = attributeUseApostrophe ? '\'' : '"'; - final String quotEntity = attributeUseApostrophe ? "'" : """; - - int pos = 0; - for (int i = 0; i < value.length(); i++) - { - char ch = value.charAt(i); - if(ch == '&') { - if(i > pos) out.write(value.substring(pos, i)); - out.write("&"); - pos = i + 1; - } if(ch == '<') { - if(i > pos) out.write(value.substring(pos, i)); - out.write("<"); - pos = i + 1; - }else if(ch == quot) { - if(i > pos) out.write(value.substring(pos, i)); - out.write(quotEntity); - pos = i + 1; - } else if(ch < 32) { - //in XML 1.0 only legal character are #x9 | #xA | #xD - // and they must be escaped otherwise in attribute value they are normalized to spaces - if(ch == 13 || ch == 10 || ch == 9) { - if(i > pos) out.write(value.substring(pos, i)); - out.write("&#"); - out.write(Integer.toString(ch)); - out.write(';'); - pos = i + 1; - } else { - throw new IllegalStateException( - "character "+Integer.toString(ch)+" is not allowed in output"+getLocation()); - // in XML 1.1 legal are [#x1-#xD7FF] - // if(ch > 0) { - // if(i > pos) out.write(text.substring(pos, i)); - // out.write("&#"); - // out.write(Integer.toString(ch)); - // out.write(';'); - // pos = i + 1; - // } else { - // throw new IllegalStateException( - // "character zero is not allowed in XML 1.1 output"+getLocation()); - // } - } - } - } - if(pos > 0) { - out.write(value.substring(pos)); - } else { - out.write(value); // this is shortcut to the most common case - } - - } - - protected void writeElementContent(String text, Writer out) throws IOException - { - // esccape '<', '&', ']]>', <32 if necessary - int pos = 0; - for (int i = 0; i < text.length(); i++) - { - //TODO: check if doing char[] text.getChars() would be faster than getCharAt(i) ... - char ch = text.charAt(i); - if(ch == ']') { - if(seenBracket) { - seenBracketBracket = true; - } else { - seenBracket = true; - } - } else { - if(ch == '&') { - if(i > pos) out.write(text.substring(pos, i)); - out.write("&"); - pos = i + 1; - } else if(ch == '<') { - if(i > pos) out.write(text.substring(pos, i)); - out.write("<"); - pos = i + 1; - } else if(seenBracketBracket && ch == '>') { - if(i > pos) out.write(text.substring(pos, i)); - out.write(">"); - pos = i + 1; - } else if(ch < 32) { - //in XML 1.0 only legal character are #x9 | #xA | #xD - if( ch == 9 || ch == 10 || ch == 13) { - // pass through - - // } else if(ch == 13) { //escape - // if(i > pos) out.write(text.substring(pos, i)); - // out.write("&#"); - // out.write(Integer.toString(ch)); - // out.write(';'); - // pos = i + 1; - } else { - throw new IllegalStateException( - "character "+Integer.toString(ch)+" is not allowed in output"+getLocation()); - // in XML 1.1 legal are [#x1-#xD7FF] - // if(ch > 0) { - // if(i > pos) out.write(text.substring(pos, i)); - // out.write("&#"); - // out.write(Integer.toString(ch)); - // out.write(';'); - // pos = i + 1; - // } else { - // throw new IllegalStateException( - // "character zero is not allowed in XML 1.1 output"+getLocation()); - // } - } - } - if(seenBracket) { - seenBracketBracket = seenBracket = false; - } - - } - } - if(pos > 0) { - out.write(text.substring(pos)); - } else { - out.write(text); // this is shortcut to the most common case - } - - - - } - - protected void writeElementContent(char[] buf, int off, int len, Writer out) throws IOException - { - // esccape '<', '&', ']]>' - final int end = off + len; - int pos = off; - for (int i = off; i < end; i++) - { - final char ch = buf[i]; - if(ch == ']') { - if(seenBracket) { - seenBracketBracket = true; - } else { - seenBracket = true; - } - } else { - if(ch == '&') { - if(i > pos) { - out.write(buf, pos, i - pos); - } - out.write("&"); - pos = i + 1; - } else if(ch == '<') { - if(i > pos) { - out.write(buf, pos, i - pos); - } - out.write("<"); - pos = i + 1; - - } else if(seenBracketBracket && ch == '>') { - if(i > pos) { - out.write(buf, pos, i - pos); - } - out.write(">"); - pos = i + 1; - } else if(ch < 32) { - //in XML 1.0 only legal character are #x9 | #xA | #xD - if( ch == 9 || ch == 10 || ch == 13) { - // pass through - - - // } else if(ch == 13 ) { //if(ch == '\r') { - // if(i > pos) { - // out.write(buf, pos, i - pos); - // } - // out.write("&#"); - // out.write(Integer.toString(ch)); - // out.write(';'); - // pos = i + 1; - } else { - throw new IllegalStateException( - "character "+Integer.toString(ch)+" is not allowed in output"+getLocation()); - // in XML 1.1 legal are [#x1-#xD7FF] - // if(ch > 0) { - // if(i > pos) out.write(text.substring(pos, i)); - // out.write("&#"); - // out.write(Integer.toString(ch)); - // out.write(';'); - // pos = i + 1; - // } else { - // throw new IllegalStateException( - // "character zero is not allowed in XML 1.1 output"+getLocation()); - // } - } - } - if(seenBracket) { - seenBracketBracket = seenBracket = false; - } - // assert seenBracketBracket == seenBracket == false; - } - } - if(end > pos) { - out.write(buf, pos, end - pos); - } - } - - /** simple utility method -- good for debugging */ - protected static final String printable(String s) { - if(s == null) return "null"; - StringBuffer retval = new StringBuffer(s.length() + 16); - retval.append("'"); - char ch; - for (int i = 0; i < s.length(); i++) { - addPrintable(retval, s.charAt(i)); - } - retval.append("'"); - return retval.toString(); - } - - protected static final String printable(char ch) { - StringBuffer retval = new StringBuffer(); - addPrintable(retval, ch); - return retval.toString(); - } - - private static void addPrintable(StringBuffer retval, char ch) - { - switch (ch) - { - case '\b': - retval.append("\\b"); - break; - case '\t': - retval.append("\\t"); - break; - case '\n': - retval.append("\\n"); - break; - case '\f': - retval.append("\\f"); - break; - case '\r': - retval.append("\\r"); - break; - case '\"': - retval.append("\\\""); - break; - case '\'': - retval.append("\\\'"); - break; - case '\\': - retval.append("\\\\"); - break; - default: - if (ch < 0x20 || ch > 0x7e) { - final String ss = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + ss.substring(ss.length() - 4, ss.length())); - } else { - retval.append(ch); - } - } - } - -} - diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/pull/XmlPullParser.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/pull/XmlPullParser.java deleted file mode 100644 index c6c8189bc..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/pull/XmlPullParser.java +++ /dev/null @@ -1,1116 +0,0 @@ -/* -*- c-basic-offset: 4; indent-tabs-mode: nil; -*- //------100-columns-wide------>|*/ -// for license please see accompanying LICENSE.txt file (available also at http://www.xmlpull.org/) - -package org.codehaus.plexus.util.xml.pull; - -import java.io.InputStream; -import java.io.IOException; -import java.io.Reader; - -/** - * XML Pull Parser is an interface that defines parsing functionlity provided - * in XMLPULL V1 API (visit this website to - * learn more about API and its implementations). - * - *

There are following different - * kinds of parser depending on which features are set:

    - *
  • non-validating parser as defined in XML 1.0 spec when - * FEATURE_PROCESS_DOCDECL is set to true - *
  • validating parser as defined in XML 1.0 spec when - * FEATURE_VALIDATION is true (and that implies that FEATURE_PROCESS_DOCDECL is true) - *
  • when FEATURE_PROCESS_DOCDECL is false (this is default and - * if different value is required necessary must be changed before parsing is started) - * then parser behaves like XML 1.0 compliant non-validating parser under condition that - * no DOCDECL is present in XML documents - * (internal entites can still be defined with defineEntityReplacementText()). - * This mode of operation is intened for operation in constrained environments such as J2ME. - *
- * - * - *

There are two key methods: next() and nextToken(). While next() provides - * access to high level parsing events, nextToken() allows access to lower - * level tokens. - * - *

The current event state of the parser - * can be determined by calling the - * getEventType() method. - * Initially, the parser is in the START_DOCUMENT - * state. - * - *

The method next() advances the parser to the - * next event. The int value returned from next determines the current parser - * state and is identical to the value returned from following calls to - * getEventType (). - * - *

Th following event types are seen by next()

- *
START_TAG
An XML start tag was read. - *
TEXT
Text content was read; - * the text content can be retreived using the getText() method. - * (when in validating mode next() will not report ignorable whitespaces, use nextToken() instead) - *
END_TAG
An end tag was read - *
END_DOCUMENT
No more events are available - *
- * - *

after first next() or nextToken() (or any other next*() method) - * is called user application can obtain - * XML version, standalone and encoding from XML declaration - * in following ways:

    - *
  • version: - * getProperty("http://xmlpull.org/v1/doc/properties.html#xmldecl-version") - * returns String ("1.0") or null if XMLDecl was not read or if property is not supported - *
  • standalone: - * getProperty("http://xmlpull.org/v1/doc/features.html#xmldecl-standalone") - * returns Boolean: null if there was no standalone declaration - * or if property is not supported - * otherwise returns Boolean(true) if standalon="yes" and Boolean(false) when standalone="no" - *
  • encoding: obtained from getInputEncoding() - * null if stream had unknown encoding (not set in setInputStream) - * and it was not declared in XMLDecl - *
- * - * A minimal example for using this API may look as follows: - *
- * import java.io.IOException;
- * import java.io.StringReader;
- *
- * import org.xmlpull.v1.XmlPullParser;
- * import org.xmlpull.v1.XmlPullParserException.html;
- * import org.xmlpull.v1.XmlPullParserFactory;
- *
- * public class SimpleXmlPullApp
- * {
- *
- *     public static void main (String args[])
- *         throws XmlPullParserException, IOException
- *     {
- *         XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
- *         factory.setNamespaceAware(true);
- *         XmlPullParser xpp = factory.newPullParser();
- *
- *         xpp.setInput( new StringReader ( "<foo>Hello World!</foo>" ) );
- *         int eventType = xpp.getEventType();
- *         while (eventType != xpp.END_DOCUMENT) {
- *          if(eventType == xpp.START_DOCUMENT) {
- *              System.out.println("Start document");
- *          } else if(eventType == xpp.END_DOCUMENT) {
- *              System.out.println("End document");
- *          } else if(eventType == xpp.START_TAG) {
- *              System.out.println("Start tag "+xpp.getName());
- *          } else if(eventType == xpp.END_TAG) {
- *              System.out.println("End tag "+xpp.getName());
- *          } else if(eventType == xpp.TEXT) {
- *              System.out.println("Text "+xpp.getText());
- *          }
- *          eventType = xpp.next();
- *         }
- *     }
- * }
- * 
- * - *

The above example will generate the following output: - *

- * Start document
- * Start tag foo
- * Text Hello World!
- * End tag foo
- * 
- * - *

For more details on API usage, please refer to the - * quick Introduction available at http://www.xmlpull.org - * - * @see XmlPullParserFactory - * @see #defineEntityReplacementText - * @see #getName - * @see #getNamespace - * @see #getText - * @see #next - * @see #nextToken - * @see #setInput - * @see #FEATURE_PROCESS_DOCDECL - * @see #FEATURE_VALIDATION - * @see #START_DOCUMENT - * @see #START_TAG - * @see #TEXT - * @see #END_TAG - * @see #END_DOCUMENT - * - * @author Stefan Haustein - * @author Aleksander Slominski - */ - -public interface XmlPullParser { - - /** This constant represents the default namespace (empty string "") */ - String NO_NAMESPACE = ""; - - // ---------------------------------------------------------------------------- - // EVENT TYPES as reported by next() - - /** - * Signalize that parser is at the very beginning of the document - * and nothing was read yet. - * This event type can only be observed by calling getEvent() - * before the first call to next(), nextToken, or nextTag()). - * - * @see #next - * @see #nextToken - */ - int START_DOCUMENT = 0; - - /** - * Logical end of the xml document. Returned from getEventType, next() - * and nextToken() - * when the end of the input document has been reached. - *

NOTE: calling again - * next() or nextToken() - * will result in exception being thrown. - * - * @see #next - * @see #nextToken - */ - int END_DOCUMENT = 1; - - /** - * Returned from getEventType(), - * next(), nextToken() when - * a start tag was read. - * The name of start tag is available from getName(), its namespace and prefix are - * available from getNamespace() and getPrefix() - * if namespaces are enabled. - * See getAttribute* methods to retrieve element attributes. - * See getNamespace* methods to retrieve newly declared namespaces. - * - * @see #next - * @see #nextToken - * @see #getName - * @see #getPrefix - * @see #getNamespace - * @see #getAttributeCount - * @see #getDepth - * @see #getNamespaceCount - * @see #getNamespace - * @see #FEATURE_PROCESS_NAMESPACES - */ - int START_TAG = 2; - - /** - * Returned from getEventType(), next(), or - * nextToken() when an end tag was read. - * The name of start tag is available from getName(), its - * namespace and prefix are - * available from getNamespace() and getPrefix(). - * - * @see #next - * @see #nextToken - * @see #getName - * @see #getPrefix - * @see #getNamespace - * @see #FEATURE_PROCESS_NAMESPACES - */ - int END_TAG = 3; - - - /** - * Character data was read and will is available by calling getText(). - *

Please note: next() will - * accumulate multiple - * events into one TEXT event, skipping IGNORABLE_WHITESPACE, - * PROCESSING_INSTRUCTION and COMMENT events, - * In contrast, nextToken() will stop reading - * text when any other event is observed. - * Also, when the state was reached by calling next(), the text value will - * be normalized, whereas getText() will - * return unnormalized content in the case of nextToken(). This allows - * an exact roundtrip without chnanging line ends when examining low - * level events, whereas for high level applications the text is - * normalized apropriately. - * - * @see #next - * @see #nextToken - * @see #getText - */ - int TEXT = 4; - - // ---------------------------------------------------------------------------- - // additional events exposed by lower level nextToken() - - /** - * A CDATA sections was just read; - * this token is available only from calls to nextToken(). - * A call to next() will accumulate various text events into a single event - * of type TEXT. The text contained in the CDATA section is available - * by callling getText(). - * - * @see #nextToken - * @see #getText - */ - int CDSECT = 5; - - /** - * An entity reference was just read; - * this token is available from nextToken() - * only. The entity name is available by calling getName(). If available, - * the replacement text can be obtained by calling getTextt(); otherwise, - * the user is responsibile for resolving the entity reference. - * This event type is never returned from next(); next() will - * accumulate the replacement text and other text - * events to a single TEXT event. - * - * @see #nextToken - * @see #getText - */ - int ENTITY_REF = 6; - - /** - * Ignorable whitespace was just read. - * This token is available only from nextToken()). - * For non-validating - * parsers, this event is only reported by nextToken() when outside - * the root element. - * Validating parsers may be able to detect ignorable whitespace at - * other locations. - * The ignorable whitespace string is available by calling getText() - * - *

NOTE: this is different from calling the - * isWhitespace() method, since text content - * may be whitespace but not ignorable. - * - * Ignorable whitespace is skipped by next() automatically; this event - * type is never returned from next(). - * - * @see #nextToken - * @see #getText - */ - int IGNORABLE_WHITESPACE = 7; - - /** - * An XML processing instruction declaration was just read. This - * event type is available only via nextToken(). - * getText() will return text that is inside the processing instruction. - * Calls to next() will skip processing instructions automatically. - * @see #nextToken - * @see #getText - */ - int PROCESSING_INSTRUCTION = 8; - - /** - * An XML comment was just read. This event type is this token is - * available via nextToken() only; - * calls to next() will skip comments automatically. - * The content of the comment can be accessed using the getText() - * method. - * - * @see #nextToken - * @see #getText - */ - int COMMENT = 9; - - /** - * An XML document type declaration was just read. This token is - * available from nextToken() only. - * The unparsed text inside the doctype is available via - * the getText() method. - * - * @see #nextToken - * @see #getText - */ - int DOCDECL = 10; - - /** - * This array can be used to convert the event type integer constants - * such as START_TAG or TEXT to - * to a string. For example, the value of TYPES[START_TAG] is - * the string "START_TAG". - * - * This array is intended for diagnostic output only. Relying - * on the contents of the array may be dangerous since malicous - * applications may alter the array, although it is final, due - * to limitations of the Java language. - */ - String [] TYPES = { - "START_DOCUMENT", - "END_DOCUMENT", - "START_TAG", - "END_TAG", - "TEXT", - "CDSECT", - "ENTITY_REF", - "IGNORABLE_WHITESPACE", - "PROCESSING_INSTRUCTION", - "COMMENT", - "DOCDECL" - }; - - - // ---------------------------------------------------------------------------- - // namespace related features - - /** - * This feature determines whether the parser processes - * namespaces. As for all features, the default value is false. - *

NOTE: The value can not be changed during - * parsing an must be set before parsing. - * - * @see #getFeature - * @see #setFeature - */ - String FEATURE_PROCESS_NAMESPACES = - "http://xmlpull.org/v1/doc/features.html#process-namespaces"; - - /** - * This feature determines whether namespace attributes are - * exposed via the attribute access methods. Like all features, - * the default value is false. This feature cannot be changed - * during parsing. - * - * @see #getFeature - * @see #setFeature - */ - String FEATURE_REPORT_NAMESPACE_ATTRIBUTES = - "http://xmlpull.org/v1/doc/features.html#report-namespace-prefixes"; - - /** - * This feature determines whether the document declaration - * is processed. If set to false, - * the DOCDECL event type is reported by nextToken() - * and ignored by next(). - * - * If this featue is activated, then the document declaration - * must be processed by the parser. - * - *

Please note: If the document type declaration - * was ignored, entity references may cause exceptions - * later in the parsing process. - * The default value of this feature is false. It cannot be changed - * during parsing. - * - * @see #getFeature - * @see #setFeature - */ - String FEATURE_PROCESS_DOCDECL = - "http://xmlpull.org/v1/doc/features.html#process-docdecl"; - - /** - * If this feature is activated, all validation errors as - * defined in the XML 1.0 sepcification are reported. - * This implies that FEATURE_PROCESS_DOCDECL is true and both, the - * internal and external document type declaration will be processed. - *

Please Note: This feature can not be changed - * during parsing. The default value is false. - * - * @see #getFeature - * @see #setFeature - */ - String FEATURE_VALIDATION = - "http://xmlpull.org/v1/doc/features.html#validation"; - - /** - * Use this call to change the general behaviour of the parser, - * such as namespace processing or doctype declaration handling. - * This method must be called before the first call to next or - * nextToken. Otherwise, an exception is thrown. - *

Example: call setFeature(FEATURE_PROCESS_NAMESPACES, true) in order - * to switch on namespace processing. The initial settings correspond - * to the properties requested from the XML Pull Parser factory. - * If none were requested, all feautures are deactivated by default. - * - * @exception XmlPullParserException If the feature is not supported or can not be set - * @exception IllegalArgumentException If string with the feature name is null - */ - void setFeature(String name, - boolean state) throws XmlPullParserException; - - /** - * Returns the current value of the given feature. - *

Please note: unknown features are - * always returned as false. - * - * @param name The name of feature to be retrieved. - * @return The value of the feature. - * @exception IllegalArgumentException if string the feature name is null - */ - - boolean getFeature(String name); - - /** - * Set the value of a property. - * - * The property name is any fully-qualified URI. - * - * @exception XmlPullParserException If the property is not supported or can not be set - * @exception IllegalArgumentException If string with the property name is null - */ - void setProperty(String name, - Object value) throws XmlPullParserException; - - /** - * Look up the value of a property. - * - * The property name is any fully-qualified URI. - *

NOTE: unknown properties are always - * returned as null. - * - * @param name The name of property to be retrieved. - * @return The value of named property. - */ - Object getProperty(String name); - - - /** - * Set the input source for parser to the given reader and - * resets the parser. The event type is set to the initial value - * START_DOCUMENT. - * Setting the reader to null will just stop parsing and - * reset parser state, - * allowing the parser to free internal resources - * such as parsing buffers. - */ - void setInput(Reader in) throws XmlPullParserException; - - - /** - * Sets the input stream the parser is going to process. - * This call resets the parser state and sets the event type - * to the initial value START_DOCUMENT. - * - *

NOTE: If an input encoding string is passed, - * it MUST be used. Otherwise, - * if inputEncoding is null, the parser SHOULD try to determine - * input encoding following XML 1.0 specification (see below). - * If encoding detection is supported then following feature - * http://xmlpull.org/v1/doc/features.html#detect-encoding - * MUST be true amd otherwise it must be false - * - * @param inputStream contains a raw byte input stream of possibly - * unknown encoding (when inputEncoding is null). - * - * @param inputEncoding if not null it MUST be used as encoding for inputStream - */ - void setInput(InputStream inputStream, String inputEncoding) - throws XmlPullParserException; - - /** - * Returns the input encoding if known, null otherwise. - * If setInput(InputStream, inputEncoding) was called with an inputEncoding - * value other than null, this value must be returned - * from this method. Otherwise, if inputEncoding is null and - * the parser suppports the encoding detection feature - * (http://xmlpull.org/v1/doc/features.html#detect-encoding), - * it must return the detected encoding. - * If setInput(Reader) was called, null is returned. - * After first call to next if XML declaration was present this method - * will return encoding declared. - */ - String getInputEncoding(); - - /** - * Set new value for entity replacement text as defined in - * XML 1.0 Section 4.5 - * Construction of Internal Entity Replacement Text. - * If FEATURE_PROCESS_DOCDECL or FEATURE_VALIDATION are set, calling this - * function will result in an exception -- when processing of DOCDECL is - * enabled, there is no need to the entity replacement text manually. - * - *

The motivation for this function is to allow very small - * implementations of XMLPULL that will work in J2ME environments. - * Though these implementations may not be able to process the document type - * declaration, they still can work with known DTDs by using this function. - * - *

Please notes: The given value is used literally as replacement text - * and it corresponds to declaring entity in DTD that has all special characters - * escaped: left angle bracket is replaced with &lt;, ampersnad with &amp; - * and so on. - * - *

Note: The given value is the literal replacement text and must not - * contain any other entity reference (if it contains any entity reference - * there will be no further replacement). - * - *

Note: The list of pre-defined entity names will - * always contain standard XML entities such as - * amp (&amp;), lt (&lt;), gt (&gt;), quot (&quot;), and apos (&apos;). - * Those cannot be redefined by this method! - * - * @see #setInput - * @see #FEATURE_PROCESS_DOCDECL - * @see #FEATURE_VALIDATION - */ - void defineEntityReplacementText( String entityName, - String replacementText ) throws XmlPullParserException; - - /** - * Returns the numbers of elements in the namespace stack for the given - * depth. - * If namespaces are not enabled, 0 is returned. - * - *

NOTE: when parser is on END_TAG then it is allowed to call - * this function with getDepth()+1 argument to retrieve position of namespace - * prefixes and URIs that were declared on corresponding START_TAG. - *

NOTE: to retrieve lsit of namespaces declared in current element:

-     *       XmlPullParser pp = ...
-     *       int nsStart = pp.getNamespaceCount(pp.getDepth()-1);
-     *       int nsEnd = pp.getNamespaceCount(pp.getDepth());
-     *       for (int i = nsStart; i < nsEnd; i++) {
-     *          String prefix = pp.getNamespacePrefix(i);
-     *          String ns = pp.getNamespaceUri(i);
-     *           // ...
-     *      }
-     * 
- * - * @see #getNamespacePrefix - * @see #getNamespaceUri - * @see #getNamespace() - * @see #getNamespace(String) - */ - int getNamespaceCount(int depth) throws XmlPullParserException; - - /** - * Returns the namespace prefixe for the given position - * in the namespace stack. - * Default namespace declaration (xmlns='...') will have null as prefix. - * If the given index is out of range, an exception is thrown. - *

Please note: when the parser is on an END_TAG, - * namespace prefixes that were declared - * in the corresponding START_TAG are still accessible - * although they are no longer in scope. - */ - String getNamespacePrefix(int pos) throws XmlPullParserException; - - /** - * Returns the namespace URI for the given position in the - * namespace stack - * If the position is out of range, an exception is thrown. - *

NOTE: when parser is on END_TAG then namespace prefixes that were declared - * in corresponding START_TAG are still accessible even though they are not in scope - */ - String getNamespaceUri(int pos) throws XmlPullParserException; - - /** - * Returns the URI corresponding to the given prefix, - * depending on current state of the parser. - * - *

If the prefix was not declared in the current scope, - * null is returned. The default namespace is included - * in the namespace table and is available via - * getNamespace (null). - * - *

This method is a convenience method for - * - *

-     *  for (int i = getNamespaceCount(getDepth ())-1; i >= 0; i--) {
-     *   if (getNamespacePrefix(i).equals( prefix )) {
-     *     return getNamespaceUri(i);
-     *   }
-     *  }
-     *  return null;
-     * 
- * - *

Please note: parser implementations - * may provide more efifcient lookup, e.g. using a Hashtable. - * The 'xml' prefix is bound to "http://www.w3.org/XML/1998/namespace", as - * defined in the - * Namespaces in XML - * specification. Analogous, the 'xmlns' prefix is resolved to - * http://www.w3.org/2000/xmlns/ - * - * @see #getNamespaceCount - * @see #getNamespacePrefix - * @see #getNamespaceUri - */ - String getNamespace (String prefix); - - - // -------------------------------------------------------------------------- - // miscellaneous reporting methods - - /** - * Returns the current depth of the element. - * Outside the root element, the depth is 0. The - * depth is incremented by 1 when a start tag is reached. - * The depth is decremented AFTER the end tag - * event was observed. - * - *

-     * <!-- outside -->     0
-     * <root>                  1
-     *   sometext                 1
-     *     <foobar>         2
-     *     </foobar>        2
-     * </root>              1
-     * <!-- outside -->     0
-     * 
- */ - int getDepth(); - - /** - * Returns a short text describing the current parser state, including - * the position, a - * description of the current event and the data source if known. - * This method is especially useful to provide meaningful - * error messages and for debugging purposes. - */ - String getPositionDescription (); - - - /** - * Returns the current line number, starting from 1. - * When the parser does not know the current line number - * or can not determine it, -1 is returned (e.g. for WBXML). - * - * @return current line number or -1 if unknown. - */ - int getLineNumber(); - - /** - * Returns the current column number, starting from 0. - * When the parser does not know the current column number - * or can not determine it, -1 is returned (e.g. for WBXML). - * - * @return current column number or -1 if unknown. - */ - int getColumnNumber(); - - - // -------------------------------------------------------------------------- - // TEXT related methods - - /** - * Checks whether the current TEXT event contains only whitespace - * characters. - * For IGNORABLE_WHITESPACE, this is always true. - * For TEXT and CDSECT, false is returned when the current event text - * contains at least one non-white space character. For any other - * event type an exception is thrown. - * - *

Please note: non-validating parsers are not - * able to distinguish whitespace and ignorable whitespace, - * except from whitespace outside the root element. Ignorable - * whitespace is reported as separate event, which is exposed - * via nextToken only. - * - */ - boolean isWhitespace() throws XmlPullParserException; - - /** - * Returns the text content of the current event as String. - * The value returned depends on current event type, - * for example for TEXT event it is element content - * (this is typical case when next() is used). - * - * See description of nextToken() for detailed description of - * possible returned values for different types of events. - * - *

NOTE: in case of ENTITY_REF, this method returns - * the entity replacement text (or null if not available). This is - * the only case where - * getText() and getTextCharacters() return different values. - * - * @see #getEventType - * @see #next - * @see #nextToken - */ - String getText (); - - - /** - * Returns the buffer that contains the text of the current event, - * as well as the start offset and length relevant for the current - * event. See getText(), next() and nextToken() for description of possible returned values. - * - *

Please note: this buffer must not - * be modified and its content MAY change after a call to - * next() or nextToken(). This method will always return the - * same value as getText(), except for ENTITY_REF. In the case - * of ENTITY ref, getText() returns the replacement text and - * this method returns the actual input buffer containing the - * entity name. - * If getText() returns null, this method returns null as well and - * the values returned in the holder array MUST be -1 (both start - * and length). - * - * @see #getText - * @see #next - * @see #nextToken - * - * @param holderForStartAndLength Must hold an 2-element int array - * into which the start offset and length values will be written. - * @return char buffer that contains the text of the current event - * (null if the current event has no text associated). - */ - char[] getTextCharacters(int [] holderForStartAndLength); - - // -------------------------------------------------------------------------- - // START_TAG / END_TAG shared methods - - /** - * Returns the namespace URI of the current element. - * The default namespace is represented - * as empty string. - * If namespaces are not enabled, an empty String ("") is always returned. - * The current event must be START_TAG or END_TAG; otherwise, - * null is returned. - */ - String getNamespace (); - - /** - * For START_TAG or END_TAG events, the (local) name of the current - * element is returned when namespaces are enabled. When namespace - * processing is disabled, the raw name is returned. - * For ENTITY_REF events, the entity name is returned. - * If the current event is not START_TAG, END_TAG, or ENTITY_REF, - * null is returned. - *

Please note: To reconstruct the raw element name - * when namespaces are enabled and the prefix is not null, - * you will need to add the prefix and a colon to localName.. - * - */ - String getName(); - - /** - * Returns the prefix of the current element. - * If the element is in the default namespace (has no prefix), - * null is returned. - * If namespaces are not enabled, or the current event - * is not START_TAG or END_TAG, null is returned. - */ - String getPrefix(); - - /** - * Returns true if the current event is START_TAG and the tag - * is degenerated - * (e.g. <foobar/>). - *

NOTE: if the parser is not on START_TAG, an exception - * will be thrown. - */ - boolean isEmptyElementTag() throws XmlPullParserException; - - // -------------------------------------------------------------------------- - // START_TAG Attributes retrieval methods - - /** - * Returns the number of attributes of the current start tag, or - * -1 if the current event type is not START_TAG - * - * @see #getAttributeNamespace - * @see #getAttributeName - * @see #getAttributePrefix - * @see #getAttributeValue - */ - int getAttributeCount(); - - /** - * Returns the namespace URI of the attribute - * with the given index (starts from 0). - * Returns an empty string ("") if namespaces are not enabled - * or the attribute has no namespace. - * Throws an IndexOutOfBoundsException if the index is out of range - * or the current event type is not START_TAG. - * - *

NOTE: if FEATURE_REPORT_NAMESPACE_ATTRIBUTES is set - * then namespace attributes (xmlns:ns='...') must be reported - * with namespace - * http://www.w3.org/2000/xmlns/ - * (visit this URL for description!). - * The default namespace attribute (xmlns="...") will be reported with empty namespace. - *

NOTE:The xml prefix is bound as defined in - * Namespaces in XML - * specification to "http://www.w3.org/XML/1998/namespace". - * - * @param zero based index of attribute - * @return attribute namespace, - * empty string ("") is returned if namesapces processing is not enabled or - * namespaces processing is enabled but attribute has no namespace (it has no prefix). - */ - String getAttributeNamespace (int index); - - /** - * Returns the local name of the specified attribute - * if namespaces are enabled or just attribute name if namespaces are disabled. - * Throws an IndexOutOfBoundsException if the index is out of range - * or current event type is not START_TAG. - * - * @param zero based index of attribute - * @return attribute name (null is never returned) - */ - String getAttributeName (int index); - - /** - * Returns the prefix of the specified attribute - * Returns null if the element has no prefix. - * If namespaces are disabled it will always return null. - * Throws an IndexOutOfBoundsException if the index is out of range - * or current event type is not START_TAG. - * - * @param zero based index of attribute - * @return attribute prefix or null if namespaces processing is not enabled. - */ - String getAttributePrefix(int index); - - /** - * Returns the type of the specified attribute - * If parser is non-validating it MUST return CDATA. - * - * @param zero based index of attribute - * @return attribute type (null is never returned) - */ - String getAttributeType(int index); - - /** - * Returns if the specified attribute was not in input was declared in XML. - * If parser is non-validating it MUST always return false. - * This information is part of XML infoset: - * - * @param zero based index of attribute - * @return false if attribute was in input - */ - boolean isAttributeDefault(int index); - - /** - * Returns the given attributes value. - * Throws an IndexOutOfBoundsException if the index is out of range - * or current event type is not START_TAG. - * - *

NOTE: attribute value must be normalized - * (including entity replacement text if PROCESS_DOCDECL is false) as described in - * XML 1.0 section - * 3.3.3 Attribute-Value Normalization - * - * @see #defineEntityReplacementText - * - * @param zero based index of attribute - * @return value of attribute (null is never returned) - */ - String getAttributeValue(int index); - - /** - * Returns the attributes value identified by namespace URI and namespace localName. - * If namespaces are disabled namespace must be null. - * If current event type is not START_TAG then IndexOutOfBoundsException will be thrown. - * - *

NOTE: attribute value must be normalized - * (including entity replacement text if PROCESS_DOCDECL is false) as described in - * XML 1.0 section - * 3.3.3 Attribute-Value Normalization - * - * @see #defineEntityReplacementText - * - * @param namespace Namespace of the attribute if namespaces are enabled otherwise must be null - * @param name If namespaces enabled local name of attribute otherwise just attribute name - * @return value of attribute or null if attribute with given name does not exist - */ - String getAttributeValue(String namespace, - String name); - - // -------------------------------------------------------------------------- - // actual parsing methods - - /** - * Returns the type of the current event (START_TAG, END_TAG, TEXT, etc.) - * - * @see #next() - * @see #nextToken() - */ - int getEventType() - throws XmlPullParserException; - - /** - * Get next parsing event - element content wil be coalesced and only one - * TEXT event must be returned for whole element content - * (comments and processing instructions will be ignored and emtity references - * must be expanded or exception mus be thrown if entity reerence can not be exapnded). - * If element content is empty (content is "") then no TEXT event will be reported. - * - *

NOTE: empty element (such as <tag/>) will be reported - * with two separate events: START_TAG, END_TAG - it must be so to preserve - * parsing equivalency of empty element to <tag></tag>. - * (see isEmptyElementTag ()) - * - * @see #isEmptyElementTag - * @see #START_TAG - * @see #TEXT - * @see #END_TAG - * @see #END_DOCUMENT - */ - - int next() - throws XmlPullParserException, IOException; - - - /** - * This method works similarly to next() but will expose - * additional event types (COMMENT, CDSECT, DOCDECL, ENTITY_REF, PROCESSING_INSTRUCTION, or - * IGNORABLE_WHITESPACE) if they are available in input. - * - *

If special feature - * FEATURE_XML_ROUNDTRIP - * (identified by URI: http://xmlpull.org/v1/doc/features.html#xml-roundtrip) - * is enabled it is possible to do XML document round trip ie. reproduce - * exectly on output the XML input using getText(): - * returned content is always unnormalized (exactly as in input). - * Otherwise returned content is end-of-line normalized as described - * XML 1.0 End-of-Line Handling - * and. Also when this feature is enabled exact content of START_TAG, END_TAG, - * DOCDECL and PROCESSING_INSTRUCTION is available. - * - *

Here is the list of tokens that can be returned from nextToken() - * and what getText() and getTextCharacters() returns:

- *
START_DOCUMENT
null - *
END_DOCUMENT
null - *
START_TAG
null unless FEATURE_XML_ROUNDTRIP - * enabled and then returns XML tag, ex: <tag attr='val'> - *
END_TAG
null unless FEATURE_XML_ROUNDTRIP - * id enabled and then returns XML tag, ex: </tag> - *
TEXT
return element content. - *
Note: that element content may be delivered in multiple consecutive TEXT events. - *
IGNORABLE_WHITESPACE
return characters that are determined to be ignorable white - * space. If the FEATURE_XML_ROUNDTRIP is enabled all whitespace content outside root - * element will always reported as IGNORABLE_WHITESPACE otherise rteporting is optional. - *
Note: that element content may be delevered in multiple consecutive IGNORABLE_WHITESPACE events. - *
CDSECT
- * return text inside CDATA - * (ex. 'fo<o' from <!CDATA[fo<o]]>) - *
PROCESSING_INSTRUCTION
- * if FEATURE_XML_ROUNDTRIP is true - * return exact PI content ex: 'pi foo' from <?pi foo?> - * otherwise it may be exact PI content or concatenation of PI target, - * space and data so for example for - * <?target data?> string "target data" may - * be returned if FEATURE_XML_ROUNDTRIP is false. - *
COMMENT
return comment content ex. 'foo bar' from <!--foo bar--> - *
ENTITY_REF
getText() MUST return entity replacement text if PROCESS_DOCDECL is false - * otherwise getText() MAY return null, - * additionally getTextCharacters() MUST return entity name - * (for example 'entity_name' for &entity_name;). - *
NOTE: this is the only place where value returned from getText() and - * getTextCharacters() are different - *
NOTE: it is user responsibility to resolve entity reference - * if PROCESS_DOCDECL is false and there is no entity replacement text set in - * defineEntityReplacementText() method (getText() will be null) - *
NOTE: character entities (ex. &#32;) and standard entities such as - * &amp; &lt; &gt; &quot; &apos; are reported as well - * and are not reported as TEXT tokens but as ENTITY_REF tokens! - * This requirement is added to allow to do roundtrip of XML documents! - *
DOCDECL
- * if FEATURE_XML_ROUNDTRIP is true or PROCESS_DOCDECL is false - * then return what is inside of DOCDECL for example it returns:
-     * " titlepage SYSTEM "http://www.foo.bar/dtds/typo.dtd"
-     * [<!ENTITY % active.links "INCLUDE">]"
- *

for input document that contained:

-     * <!DOCTYPE titlepage SYSTEM "http://www.foo.bar/dtds/typo.dtd"
-     * [<!ENTITY % active.links "INCLUDE">]>
- * otherwise if FEATURE_XML_ROUNDTRIP is false and PROCESS_DOCDECL is true - * then what is returned is undefined (it may be even null) - *
- *
- * - *

NOTE: there is no gurantee that there will only one TEXT or - * IGNORABLE_WHITESPACE event from nextToken() as parser may chose to deliver element content in - * multiple tokens (dividing element content into chunks) - * - *

NOTE: whether returned text of token is end-of-line normalized - * is depending on FEATURE_XML_ROUNDTRIP. - * - *

NOTE: XMLDecl (<?xml ...?>) is not reported but its content - * is available through optional properties (see class description above). - * - * @see #next - * @see #START_TAG - * @see #TEXT - * @see #END_TAG - * @see #END_DOCUMENT - * @see #COMMENT - * @see #DOCDECL - * @see #PROCESSING_INSTRUCTION - * @see #ENTITY_REF - * @see #IGNORABLE_WHITESPACE - */ - int nextToken() - throws XmlPullParserException, IOException; - - //----------------------------------------------------------------------------- - // utility methods to mak XML parsing easier ... - - /** - * Test if the current event is of the given type and if the - * namespace and name do match. null will match any namespace - * and any name. If the test is not passed, an exception is - * thrown. The exception text indicates the parser position, - * the expected event and the current event that is not meeting the - * requirement. - * - *

Essentially it does this - *

-     *  if (type != getEventType()
-     *  || (namespace != null &&  !namespace.equals( getNamespace () ) )
-     *  || (name != null &&  !name.equals( getName() ) ) )
-     *     throw new XmlPullParserException( "expected "+ TYPES[ type ]+getPositionDescription());
-     * 
- */ - void require(int type, String namespace, String name) - throws XmlPullParserException, IOException; - - /** - * If current event is START_TAG then if next element is TEXT then element content is returned - * or if next event is END_TAG then empty string is returned, otherwise exception is thrown. - * After calling this function successfully parser will be positioned on END_TAG. - * - *

The motivation for this function is to allow to parse consistently both - * empty elements and elements that has non empty content, for example for input:

    - *
  1. <tag>foo</tag> - *
  2. <tag></tag> (which is equivalent to <tag/> - * both input can be parsed with the same code: - *
    -     *   p.nextTag()
    -     *   p.requireEvent(p.START_TAG, "", "tag");
    -     *   String content = p.nextText();
    -     *   p.requireEvent(p.END_TAG, "", "tag");
    -     * 
    - * This function together with nextTag make it very easy to parse XML that has - * no mixed content. - * - * - *

    Essentially it does this - *

    -     *  if(getEventType() != START_TAG) {
    -     *     throw new XmlPullParserException(
    -     *       "parser must be on START_TAG to read next text", this, null);
    -     *  }
    -     *  int eventType = next();
    -     *  if(eventType == TEXT) {
    -     *     String result = getText();
    -     *     eventType = next();
    -     *     if(eventType != END_TAG) {
    -     *       throw new XmlPullParserException(
    -     *          "event TEXT it must be immediately followed by END_TAG", this, null);
    -     *      }
    -     *      return result;
    -     *  } else if(eventType == END_TAG) {
    -     *     return "";
    -     *  } else {
    -     *     throw new XmlPullParserException(
    -     *       "parser must be on START_TAG or TEXT to read text", this, null);
    -     *  }
    -     * 
    - */ - String nextText() throws XmlPullParserException, IOException; - - /** - * Call next() and return event if it is START_TAG or END_TAG - * otherwise throw an exception. - * It will skip whitespace TEXT before actual tag if any. - * - *

    essentially it does this - *

    -     *   int eventType = next();
    -     *   if(eventType == TEXT &&  isWhitespace()) {   // skip whitespace
    -     *      eventType = next();
    -     *   }
    -     *   if (eventType != START_TAG &&  eventType != END_TAG) {
    -     *      throw new XmlPullParserException("expected start or end tag", this, null);
    -     *   }
    -     *   return eventType;
    -     * 
    - */ - int nextTag() throws XmlPullParserException, IOException; - -} - diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/pull/XmlPullParserException.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/pull/XmlPullParserException.java deleted file mode 100644 index 9dcd8395f..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/pull/XmlPullParserException.java +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- c-basic-offset: 4; indent-tabs-mode: nil; -*- //------100-columns-wide------>|*/ -// for license please see accompanying LICENSE.txt file (available also at http://www.xmlpull.org/) - -package org.codehaus.plexus.util.xml.pull; - -/** - * This exception is thrown to signal XML Pull Parser related faults. - * - * @author Aleksander Slominski - */ -public class XmlPullParserException extends Exception { - protected Throwable detail; - protected int row = -1; - protected int column = -1; - - /* public XmlPullParserException() { - }*/ - - public XmlPullParserException(String s) { - super(s); - } - - /* - public XmlPullParserException(String s, Throwable thrwble) { - super(s); - this.detail = thrwble; - } - - public XmlPullParserException(String s, int row, int column) { - super(s); - this.row = row; - this.column = column; - } - */ - - public XmlPullParserException(String msg, XmlPullParser parser, Throwable chain) { - super ((msg == null ? "" : msg+" ") - + (parser == null ? "" : "(position:"+parser.getPositionDescription()+") ") - + (chain == null ? "" : "caused by: "+chain)); - - if (parser != null) { - this.row = parser.getLineNumber(); - this.column = parser.getColumnNumber(); - } - this.detail = chain; - } - - public Throwable getDetail() { return detail; } - // public void setDetail(Throwable cause) { this.detail = cause; } - public int getLineNumber() { return row; } - public int getColumnNumber() { return column; } - - /* - public String getMessage() { - if(detail == null) - return super.getMessage(); - else - return super.getMessage() + "; nested exception is: \n\t" - + detail.getMessage(); - } - */ - - //NOTE: code that prints this and detail is difficult in J2ME - public void printStackTrace() { - if (detail == null) { - super.printStackTrace(); - } else { - synchronized(System.err) { - System.err.println(super.getMessage() + "; nested exception is:"); - detail.printStackTrace(); - } - } - } - -} - diff --git a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/pull/XmlSerializer.java b/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/pull/XmlSerializer.java deleted file mode 100644 index 522d75e18..000000000 --- a/plexus-utils/src/main/java/org/codehaus/plexus/util/xml/pull/XmlSerializer.java +++ /dev/null @@ -1,326 +0,0 @@ -package org.codehaus.plexus.util.xml.pull; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.Writer; - -/** - * Define an interface to serialziation of XML Infoset. - * This interface abstracts away if serialized XML is XML 1.0 comaptible text or - * other formats of XML 1.0 serializations (such as binary XML for example with WBXML). - * - *

    PLEASE NOTE: This interface will be part of XmlPull 1.2 API. - * It is included as basis for discussion. It may change in any way. - * - *

    Exceptions that may be thrown are: IOException or runtime exception - * (more runtime exceptions can be thrown but are not declared and as such - * have no semantics defined for this interface): - *

      - *
    • IllegalArgumentException - for almost all methods to signal that - * argument is illegal - *
    • IllegalStateException - to signal that call has good arguments but - * is not expected here (violation of contract) and for features/properties - * when requesting setting unimplemented feature/property - * (UnsupportedOperationException would be better but it is not in MIDP) - *
    - * - *

    NOTE: writing CDSECT, ENTITY_REF, IGNORABLE_WHITESPACE, - * PROCESSING_INSTRUCTION, COMMENT, and DOCDECL in some implementations - * may not be supported (for example when serializing to WBXML). - * In such case IllegalStateException will be thrown and it is recommened - * to use an optional feature to signal that implementation is not - * supporting this kind of output. - */ - -public interface XmlSerializer { - - /** - * Set feature identified by name (recommended to be URI for uniqueness). - * Some well known optional features are defined in - * - * http://www.xmlpull.org/v1/doc/features.html. - * - * If feature is not recocgnized or can not be set - * then IllegalStateException MUST be thrown. - * - * @exception IllegalStateException If the feature is not supported or can not be set - */ - void setFeature(String name, - boolean state) - throws IllegalArgumentException, IllegalStateException; - - - /** - * Return the current value of the feature with given name. - *

    NOTE: unknown properties are always returned as null - * - * @param name The name of feature to be retrieved. - * @return The value of named feature. - * @exception IllegalArgumentException if feature string is null - */ - boolean getFeature(String name); - - - /** - * Set the value of a property. - * (the property name is recommened to be URI for uniqueness). - * Some well known optional properties are defined in - * - * http://www.xmlpull.org/v1/doc/properties.html. - * - * If property is not recocgnized or can not be set - * then IllegalStateException MUST be thrown. - * - * @exception IllegalStateException if the property is not supported or can not be set - */ - void setProperty(String name, - Object value) - throws IllegalArgumentException, IllegalStateException; - - /** - * Look up the value of a property. - * - * The property name is any fully-qualified URI. I - *

    NOTE: unknown properties are always returned as null - * - * @param name The name of property to be retrieved. - * @return The value of named property. - */ - Object getProperty(String name); - - /** - * Set to use binary output stream with given encoding. - */ - void setOutput (OutputStream os, String encoding) - throws IOException, IllegalArgumentException, IllegalStateException; - - /** - * Set the output to the given writer. - *

    WARNING no information about encoding is available! - */ - void setOutput (Writer writer) - throws IOException, IllegalArgumentException, IllegalStateException; - - /** - * Write <?xml declaration with encoding (if encoding not null) - * and standalone flag (if standalone not null) - * This method can only be called just after setOutput. - */ - void startDocument (String encoding, Boolean standalone) - throws IOException, IllegalArgumentException, IllegalStateException; - - /** - * Finish writing. All unclosed start tags will be closed and output - * will be flushed. After calling this method no more output can be - * serialized until next call to setOutput() - */ - void endDocument () - throws IOException, IllegalArgumentException, IllegalStateException; - - /** - * Binds the given prefix to the given namespace. - * This call is valid for the next element including child elements. - * The prefix and namespace MUST be always declared even if prefix - * is not used in element (startTag() or attribute()) - for XML 1.0 - * it must result in declaring xmlns:prefix='namespace' - * (or xmlns:prefix="namespace" depending what character is used - * to quote attribute value). - * - *

    NOTE: this method MUST be called directly before startTag() - * and if anything but startTag() or setPrefix() is called next there will be exception. - *

    NOTE: prefixes "xml" and "xmlns" are already bound - * and can not be redefined see: - * Namespaces in XML Errata. - *

    NOTE: to set default namespace use as prefix empty string. - * - * @param prefix must be not null (or IllegalArgumentException is thrown) - * @param namespace must be not null - */ - void setPrefix (String prefix, String namespace) - throws IOException, IllegalArgumentException, IllegalStateException; - - /** - * Return namespace that corresponds to given prefix - * If there is no prefix bound to this namespace return null - * but if generatePrefix is false then return generated prefix. - * - *

    NOTE: if the prefix is empty string "" and defualt namespace is bound - * to this prefix then empty string ("") is returned. - * - *

    NOTE: prefixes "xml" and "xmlns" are already bound - * will have values as defined - * Namespaces in XML specification - */ - String getPrefix (String namespace, boolean generatePrefix) - throws IllegalArgumentException; - - /** - * Returns the current depth of the element. - * Outside the root element, the depth is 0. The - * depth is incremented by 1 when startTag() is called. - * The depth is decremented after the call to endTag() - * event was observed. - * - *

    -     * <!-- outside -->     0
    -     * <root>               1
    -     *   sometext                 1
    -     *     <foobar>         2
    -     *     </foobar>        2
    -     * </root>              1
    -     * <!-- outside -->     0
    -     * 
    - */ - int getDepth(); - - /** - * Returns the namespace URI of the current element as set by startTag(). - * - *

    NOTE: that measn in particaulr that:

      - *
    • if there was startTag("", ...) then getNamespace() returns "" - *
    • if there was startTag(null, ...) then getNamespace() returns null - *
    - * - * @return namespace set by startTag() that is currently in scope - */ - String getNamespace (); - - /** - * Returns the name of the current element as set by startTag(). - * It can only be null before first call to startTag() - * or when last endTag() is called to close first startTag(). - * - * @return namespace set by startTag() that is currently in scope - */ - String getName(); - - /** - * Writes a start tag with the given namespace and name. - * If there is no prefix defined for the given namespace, - * a prefix will be defined automatically. - * The explicit prefixes for namespaces can be established by calling setPrefix() - * immediately before this method. - * If namespace is null no namespace prefix is printed but just name. - * If namespace is empty string then serialzier will make sure that - * default empty namespace is declared (in XML 1.0 xmlns='') - * or throw IllegalStateException if default namespace is already bound - * to non-empty string. - */ - XmlSerializer startTag (String namespace, String name) - throws IOException, IllegalArgumentException, IllegalStateException; - - /** - * Write an attribute. Calls to attribute() MUST follow a call to - * startTag() immediately. If there is no prefix defined for the - * given namespace, a prefix will be defined automatically. - * If namespace is null or empty string - * no namespace prefix is printed but just name. - */ - XmlSerializer attribute (String namespace, String name, String value) - throws IOException, IllegalArgumentException, IllegalStateException; - - /** - * Write end tag. Repetition of namespace and name is just for avoiding errors. - *

    Background: in kXML endTag had no arguments, and non matching tags were - * very difficult to find... - * If namespace is null no namespace prefix is printed but just name. - * If namespace is empty string then serialzier will make sure that - * default empty namespace is declared (in XML 1.0 xmlns=''). - */ - XmlSerializer endTag (String namespace, String name) - throws IOException, IllegalArgumentException, IllegalStateException; - - - // /** - // * Writes a start tag with the given namespace and name. - // *
    If there is no prefix defined (prefix == null) for the given namespace, - // * a prefix will be defined automatically. - // *
    If explicit prefixes is passed (prefix != null) then it will be used - // *and namespace declared if not already declared or - // * throw IllegalStateException the same prefix was already set on this - // * element (setPrefix()) and was bound to different namespace. - // *
    If namespace is null then prefix must be null too or IllegalStateException is thrown. - // *
    If namespace is null then no namespace prefix is printed but just name. - // *
    If namespace is empty string then serializer will make sure that - // * default empty namespace is declared (in XML 1.0 xmlns='') - // * or throw IllegalStateException if default namespace is already bound - // * to non-empty string. - // */ - // XmlSerializer startTag (String prefix, String namespace, String name) - // throws IOException, IllegalArgumentException, IllegalStateException; - // - // /** - // * Write an attribute. Calls to attribute() MUST follow a call to - // * startTag() immediately. - // *
    If there is no prefix defined (prefix == null) for the given namespace, - // * a prefix will be defined automatically. - // *
    If explicit prefixes is passed (prefix != null) then it will be used - // * and namespace declared if not already declared or - // * throw IllegalStateException the same prefix was already set on this - // * element (setPrefix()) and was bound to different namespace. - // *
    If namespace is null then prefix must be null too or IllegalStateException is thrown. - // *
    If namespace is null then no namespace prefix is printed but just name. - // *
    If namespace is empty string then serializer will make sure that - // * default empty namespace is declared (in XML 1.0 xmlns='') - // * or throw IllegalStateException if default namespace is already bound - // * to non-empty string. - // */ - // XmlSerializer attribute (String prefix, String namespace, String name, String value) - // throws IOException, IllegalArgumentException, IllegalStateException; - // - // /** - // * Write end tag. Repetition of namespace, prefix, and name is just for avoiding errors. - // *
    If namespace or name arguments are different from corresponding startTag call - // * then IllegalArgumentException is thrown, if prefix argument is not null and is different - // * from corresponding starTag then IllegalArgumentException is thrown. - // *
    If namespace is null then prefix must be null too or IllegalStateException is thrown. - // *
    If namespace is null then no namespace prefix is printed but just name. - // *
    If namespace is empty string then serializer will make sure that - // * default empty namespace is declared (in XML 1.0 xmlns=''). - // *

    Background: in kXML endTag had no arguments, and non matching tags were - // * very difficult to find...

    - // */ - // ALEK: This is really optional as prefix in end tag MUST correspond to start tag but good for error checking - // XmlSerializer endTag (String prefix, String namespace, String name) - // throws IOException, IllegalArgumentException, IllegalStateException; - - /** - * Writes text, where special XML chars are escaped automatically - */ - XmlSerializer text (String text) - throws IOException, IllegalArgumentException, IllegalStateException; - - /** - * Writes text, where special XML chars are escaped automatically - */ - XmlSerializer text (char [] buf, int start, int len) - throws IOException, IllegalArgumentException, IllegalStateException; - - void cdsect (String text) - throws IOException, IllegalArgumentException, IllegalStateException; - void entityRef (String text) throws IOException, - IllegalArgumentException, IllegalStateException; - void processingInstruction (String text) - throws IOException, IllegalArgumentException, IllegalStateException; - void comment (String text) - throws IOException, IllegalArgumentException, IllegalStateException; - void docdecl (String text) - throws IOException, IllegalArgumentException, IllegalStateException; - void ignorableWhitespace (String text) - throws IOException, IllegalArgumentException, IllegalStateException; - - /** - * Write all pending output to the stream. - * If method startTag() or attribute() was called then start tag is closed (final >) - * before flush() is called on underlying output stream. - * - *

    NOTE: if there is need to close start tag - * (so no more attribute() calls are allowed) but without flushinging output - * call method text() with empty string (text("")). - * - */ - void flush () - throws IOException; - -} - diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/AbstractTestThread.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/AbstractTestThread.java deleted file mode 100644 index 8e249426f..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/AbstractTestThread.java +++ /dev/null @@ -1,274 +0,0 @@ -package org.codehaus.plexus.util; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/** - * A thread which is registered with a ThreadRegistry and notifies it when it has completed - * running. Collects any errors and makes it available for analysis. - * - *

    Created on 1/07/2003

    - * - * @author Bert van Brakel - * @version $Revision$ - */ -public abstract class AbstractTestThread implements Runnable -{ - //~ Instance fields ---------------------------------------------------------------------------- - private String name; - - public static final boolean DEBUG = true; - - private boolean isRunning = false; - - /** Error msg provided by implementing class (of why the test failed) */ - private String errorMsg = null; - - /** The registry to notify on completion */ - private TestThreadManager registry; - - /** The error thrown when running the test. Not neccesarily a test failuer as some tests - * may test for an exception */ - private Throwable error; - - /** If the thread has been run */ - private boolean hasRun = false; - - /** Flag indicating if the test has passed. Some test might require an - * exception so using the error to determine if the test has passed is - * not sufficient. - */ - private boolean passed = false; - - //~ Constructors ------------------------------------------------------------------------------- - - /** - * Constructor - * - *

    Remember to call setThreadRegistry(ThreadRegistry) - */ - public AbstractTestThread() - { - super(); - } - - public AbstractTestThread( TestThreadManager registry ) - { - super(); - setThreadRegistry( registry ); - } - - //~ Methods ------------------------------------------------------------------------------------ - - /** - * @return - */ - public Throwable getError() - { - return error; - } - - /** - * Resets the test back to it's state before starting. If the test - * is currently running this method will block until the test has - * finished running. Subclasses should call this method if - * overriding it. - * - * */ - public void reset() - { - //shouldn't reset until the test has finished running - synchronized ( this ) - { - while ( isRunning ) - { - try - { - wait(); - } - catch ( InterruptedException e ) - { - - } - } - errorMsg = null; - error = null; - hasRun = false; - passed = false; - } - } - - /** - * Start this TestThread running. If the test is currently running then - * this method does nothing. - * - */ - public final void start() - { - //shouldn't have multiple threads running this test at the same time - synchronized ( this ) - { - if ( isRunning == false ) - { - isRunning = true; - Thread t = new Thread( this ); - t.start(); - } - } - } - - /** - * @return - */ - public String getErrorMsg() - { - return errorMsg; - } - - /** - * @return - */ - public boolean hasFailed() - { - return !passed; - } - - /** - * DOCUMENT ME! - * - * @return DOCUMENT ME! - */ - public boolean hasPassed() - { - return passed; - } - - /** - * Don't override this. Calls doRun() - * - * @see java.lang.Runnable#run() - */ - public final void run() - { - if ( registry == null ) - { - throw new IllegalArgumentException( "The ThreadRegistry is null. Ensure this is set before running this thread" ); - } - passed = false; - try - { - doRun(); - } - catch ( Throwable t ) - { - error = t; - } - - registry.completed( this ); - hasRun = true; - isRunning = false; - //notify objects with blocked methods which are waiting - //on this test to complete running - synchronized ( this ) - { - notifyAll(); - } - } - - /** - * Override this to run your custom test - * - * @throws Throwable - */ - public abstract void doRun() throws Throwable; - - /** - * Set the registry this thread should notify when it has completed running - * - * @param registry - */ - public void setThreadRegistry( TestThreadManager registry ) - - { - this.registry = registry; - } - - /** - * Test if the test has run - * - * @return - */ - public boolean hasRun() - { - return hasRun; - } - - /** - * @param throwable - */ - public void setError( Throwable throwable ) - { - error = throwable; - } - - /** - * @param string - */ - public void setErrorMsg( String string ) - { - errorMsg = string; - } - - /** - * @param b - */ - public void setPassed( boolean b ) - { - passed = b; - } - - /** - * @return - */ - public String getName() - { - return name; - } - - /** - * @param string - */ - public void setName( String string ) - { - name = string; - } - - private final void debug( String msg ) - { - if ( DEBUG ) - { - System.out.println( this + ":" + msg ); - } - } -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/CollectionUtilsTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/CollectionUtilsTest.java deleted file mode 100644 index 9cdd21556..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/CollectionUtilsTest.java +++ /dev/null @@ -1,238 +0,0 @@ -package org.codehaus.plexus.util; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Properties; - -import junit.framework.TestCase; - -public class CollectionUtilsTest - extends TestCase -{ - public void testMergeMaps() - { - Map dominantMap = new HashMap(); - dominantMap.put( "a", "a" ); - dominantMap.put( "b", "b" ); - dominantMap.put( "c", "c" ); - dominantMap.put( "d", "d" ); - dominantMap.put( "e", "e" ); - dominantMap.put( "f", "f" ); - - Map recessiveMap = new HashMap(); - recessiveMap.put( "a", "invalid" ); - recessiveMap.put( "b", "invalid" ); - recessiveMap.put( "c", "invalid" ); - recessiveMap.put( "x", "x" ); - recessiveMap.put( "y", "y" ); - recessiveMap.put( "z", "z" ); - - Map result = CollectionUtils.mergeMaps( dominantMap, recessiveMap ); - - // We should have 9 elements - assertEquals( 9, result.keySet().size() ); - - // Check the elements. - assertEquals( "a", result.get( "a" ) ); - assertEquals( "b", result.get( "b" ) ); - assertEquals( "c", result.get( "c" ) ); - assertEquals( "d", result.get( "d" ) ); - assertEquals( "e", result.get( "e" ) ); - assertEquals( "f", result.get( "f" ) ); - assertEquals( "x", result.get( "x" ) ); - assertEquals( "y", result.get( "y" ) ); - assertEquals( "z", result.get( "z" ) ); - } - - public void testMergeMapArray() - { - // Test empty array of Maps - Map result0 = CollectionUtils.mergeMaps( new Map[] - { - } ); - - assertNull( result0 ); - - // Test with an array with a single element. - Map map1 = new HashMap(); - map1.put( "a", "a" ); - - Map result1 = CollectionUtils.mergeMaps( new Map[] - { - map1 - } ); - - assertEquals( "a", result1.get( "a" ) ); - - // Test with an array with two elements. - Map map2 = new HashMap(); - map2.put( "a", "aa" ); - map2.put( "b", "bb" ); - - Map result2 = CollectionUtils.mergeMaps( new Map[] - { - map1, - map2 - } ); - - assertEquals( "a", result2.get( "a" ) ); - assertEquals( "bb", result2.get( "b" ) ); - - // Now swap the dominant order. - Map result3 = CollectionUtils.mergeMaps( new Map[] - { - map2, - map1 - } ); - - assertEquals( "aa", result3.get( "a" ) ); - assertEquals( "bb", result3.get( "b" ) ); - - // Test with an array with three elements. - Map map3 = new HashMap(); - map3.put( "a", "aaa" ); - map3.put( "b", "bbb" ); - map3.put( "c", "ccc" ); - - Map result4 = CollectionUtils.mergeMaps( new Map[] - { - map1, - map2, - map3 - } ); - - assertEquals( "a", result4.get( "a" ) ); - assertEquals( "bb", result4.get( "b" ) ); - assertEquals( "ccc", result4.get( "c" ) ); - - // Now swap the dominant order. - Map result5 = CollectionUtils.mergeMaps( new Map[] - { - map3, - map2, - map1 - } ); - - assertEquals( "aaa", result5.get( "a" ) ); - assertEquals( "bbb", result5.get( "b" ) ); - assertEquals( "ccc", result5.get( "c" ) ); - } - - public void testMavenPropertiesLoading() - { - // Mimic MavenSession properties loading. Properties listed - // in dominant order. - Properties systemProperties = new Properties(); - Properties userBuildProperties = new Properties(); - Properties projectBuildProperties = new Properties(); - Properties projectProperties = new Properties(); - Properties driverProperties = new Properties(); - - // System properties - systemProperties.setProperty( "maven.home", "/projects/maven" ); - - // User build properties - userBuildProperties.setProperty( "maven.username", "jvanzyl" ); - userBuildProperties.setProperty( "maven.repo.remote.enabled", "false" ); - userBuildProperties.setProperty( "maven.repo.local", "/opt/maven/artifact" ); - - // Project build properties - projectBuildProperties.setProperty( "maven.final.name", "maven" ); - - String mavenRepoRemote = "http://www.ibiblio.org/maven,http://foo/bar"; - - // Project properties - projectProperties.setProperty( "maven.repo.remote", mavenRepoRemote ); - - String basedir = "/home/jvanzyl/projects/maven"; - - // Driver properties - driverProperties.setProperty( "basedir", basedir ); - driverProperties.setProperty( "maven.build.src", "${basedir}/src" ); - driverProperties.setProperty( "maven.build.dir", "${basedir}/target" ); - driverProperties.setProperty( "maven.build.dest", "${maven.build.dir}/classes" ); - driverProperties.setProperty( "maven.repo.remote", "http://www.ibiblio.org/maven" ); - driverProperties.setProperty( "maven.final.name", "maven-1.0" ); - driverProperties.setProperty( "maven.repo.remote.enabled", "true" ); - driverProperties.setProperty( "maven.repo.local", "${maven.home}/artifact" ); - - Map result = CollectionUtils.mergeMaps( new Map[] - { - systemProperties, - userBuildProperties, - projectBuildProperties, - projectProperties, - driverProperties - } ); - - // Values that should be taken from systemProperties. - assertEquals( "/projects/maven", (String) result.get( "maven.home" ) ); - - // Values that should be taken from userBuildProperties. - assertEquals( "/opt/maven/artifact", (String) result.get( "maven.repo.local" ) ); - assertEquals( "false", (String) result.get( "maven.repo.remote.enabled" ) ); - assertEquals( "jvanzyl", (String) result.get( "maven.username" ) ); - - // Values take from projectBuildProperties. - assertEquals( "maven", (String) result.get( "maven.final.name" ) ); - - // Values take from projectProperties. - assertEquals( mavenRepoRemote, (String) result.get( "maven.repo.remote" ) ); - } - - public void testIteratorToListWithAPopulatedList() - { - List original = new ArrayList(); - - original.add( "en" ); - original.add( "to" ); - original.add( "tre" ); - - List copy = CollectionUtils.iteratorToList( original.iterator() ); - - assertNotNull( copy ); - - assertEquals( 3, copy.size() ); - - assertEquals( "en", copy.get( 0 ) ); - assertEquals( "to", copy.get( 1 ) ); - assertEquals( "tre", copy.get( 2 ) ); - } - - public void testIteratorToListWithAEmptyList() - { - List original = new ArrayList(); - - List copy = CollectionUtils.iteratorToList( original.iterator() ); - - assertNotNull( copy ); - - assertEquals( 0, copy.size() ); - } -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/DirectoryScannerTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/DirectoryScannerTest.java deleted file mode 100644 index df7bd6e98..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/DirectoryScannerTest.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.codehaus.plexus.util; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.io.File; -import java.io.IOException; -import java.util.List; - -import org.codehaus.plexus.util.FileUtils; - -/** - * Base class for testcases doing tests with files. - * - * @author Dan T. Tran - */ -public class DirectoryScannerTest - extends FileBasedTestCase -{ - private static String testDir = getTestDirectory().getPath() ; - - private void createTestFiles() - throws IOException - { - FileUtils.mkdir( testDir ); - this.createFile( new File ( testDir + "/scanner1.dat") , 0 ); - this.createFile( new File ( testDir + "/scanner2.dat") , 0 ); - this.createFile( new File ( testDir + "/scanner3.dat") , 0 ); - this.createFile( new File ( testDir + "/scanner4.dat") , 0 ); - this.createFile( new File ( testDir + "/scanner5.dat") , 0 ); - } - - public void testGeneral() - throws IOException - { - this.createTestFiles(); - - String includes = "scanner1.dat,scanner2.dat,scanner3.dat,scanner4.dat,scanner5.dat" ; - String excludes = "scanner1.dat,scanner2.dat" ; - - List fileNames = FileUtils.getFiles( new File ( testDir ), includes, excludes, false ); - - assertEquals( "Wrong number of results.", 3, fileNames.size() ); - assertTrue( "3 not found.", fileNames.contains( new File( "scanner3.dat" ) ) ); - assertTrue( "4 not found.", fileNames.contains( new File( "scanner4.dat" ) ) ); - assertTrue( "5 not found.", fileNames.contains( new File( "scanner5.dat" ) ) ); - - } - - public void testIncludesExcludesWithWhiteSpaces() - throws IOException - { - this.createTestFiles(); - - String includes = "scanner1.dat,\n \n,scanner2.dat \n\r, scanner3.dat\n, \tscanner4.dat,scanner5.dat\n," ; - - String excludes = "scanner1.dat,\n \n,scanner2.dat \n\r,," ; - - List fileNames = FileUtils.getFiles( new File ( testDir ), includes, excludes, false ); - - assertEquals( "Wrong number of results.", 3, fileNames.size() ); - assertTrue( "3 not found.", fileNames.contains( new File( "scanner3.dat" ) ) ); - assertTrue( "4 not found.", fileNames.contains( new File( "scanner4.dat" ) ) ); - assertTrue( "5 not found.", fileNames.contains( new File( "scanner5.dat" ) ) ); - } -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/DirectoryWalkerTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/DirectoryWalkerTest.java deleted file mode 100644 index f91b40f44..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/DirectoryWalkerTest.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.codehaus.plexus.util; - -/* - * Copyright 2001-2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -import java.io.File; - -import junit.framework.TestCase; - -public class DirectoryWalkerTest extends TestCase { - public void testDirectoryWalk() - { - DirectoryWalker walker = new DirectoryWalker(); - - walker.addSCMExcludes(); - - walker.setBaseDir( new File("src/test/resources/directorywalker") ); - - WalkCollector collector = new WalkCollector(); - walker.addDirectoryWalkListener( collector ); - - walker.scan(); - - assertEquals( "Walk Collector / Starting Count", 1, collector.startCount ); - assertNotNull( "Walk Collector / Starting Dir", collector.startingDir ); - assertEquals( "Walk Collector / Finish Count", 1, collector.finishCount ); - assertEquals( "Walk Collector / Steps Count", 4, collector.steps.size() ); - assertTrue( "Walk Collector / percentage low >= 0", collector.percentageLow >= 0 ); - assertTrue( "Walk Collector / percentage high <= 100", collector.percentageHigh <= 100 ); - } -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/FileBasedTestCase.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/FileBasedTestCase.java deleted file mode 100644 index 1dc199126..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/FileBasedTestCase.java +++ /dev/null @@ -1,254 +0,0 @@ -package org.codehaus.plexus.util; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.io.BufferedOutputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.Writer; -import java.util.Arrays; - -import junit.framework.AssertionFailedError; -import junit.framework.TestCase; - -import org.codehaus.plexus.util.FileUtils; - -/** - * Base class for testcases doing tests with files. - * - * @author Jeremias Maerki - */ -public abstract class FileBasedTestCase - extends TestCase -{ - private static File testDir; - - public static File getTestDirectory() - { - if ( testDir == null ) - { - testDir = ( new File( "target/test/io/" ) ).getAbsoluteFile(); - } - return testDir; - } - - protected byte[] createFile( final File file, final long size ) - throws IOException - { - if ( !file.getParentFile().exists() ) - { - throw new IOException( "Cannot create file " + file + " as the parent directory does not exist" ); - } - - byte[] data = generateTestData( size ); - - final BufferedOutputStream output = new BufferedOutputStream( new java.io.FileOutputStream( file ) ); - - try - { - output.write( data ); - - return data; - } - finally - { - output.close(); - } - } - - protected byte[] generateTestData( final long size ) - { - try - { - ByteArrayOutputStream baout = new ByteArrayOutputStream(); - generateTestData( baout, size ); - return baout.toByteArray(); - } - catch ( IOException ioe ) - { - throw new RuntimeException( "This should never happen: " + ioe.getMessage() ); - } - } - - protected void generateTestData( final OutputStream out, final long size ) - throws IOException - { - for ( int i = 0; i < size; i++ ) - { - //output.write((byte)'X'); - - // nice varied byte pattern compatible with Readers and Writers - out.write( (byte) ( ( i % 127 ) + 1 ) ); - } - } - - protected File newFile( String filename ) throws IOException - { - final File destination = new File( getTestDirectory(), filename ); - /* - assertTrue( filename + "Test output data file shouldn't previously exist", - !destination.exists() ); - */ - if ( destination.exists() ) - { - FileUtils.forceDelete( destination ); - } - return destination; - } - - protected void checkFile( final File file, final File referenceFile ) - throws Exception - { - assertTrue( "Check existence of output file", file.exists() ); - assertEqualContent( referenceFile, file ); - } - - protected void checkWrite( final OutputStream output ) throws Exception - { - try - { - new java.io.PrintStream( output ).write( 0 ); - } - catch ( final Throwable t ) - { - throw new AssertionFailedError( - "The copy() method closed the stream " - + "when it shouldn't have. " - + t.getMessage() ); - } - } - - protected void checkWrite( final Writer output ) throws Exception - { - try - { - new java.io.PrintWriter( output ).write( 'a' ); - } - catch ( final Throwable t ) - { - throw new AssertionFailedError( - "The copy() method closed the stream " - + "when it shouldn't have. " - + t.getMessage() ); - } - } - - protected void deleteFile( final File file ) - throws Exception - { - if ( file.exists() ) - { - assertTrue( "Couldn't delete file: " + file, file.delete() ); - } - } - - // ---------------------------------------------------------------------- - // Assertions - // ---------------------------------------------------------------------- - - /** Assert that the content of two files is the same. */ - private void assertEqualContent( final File f0, final File f1 ) - throws IOException - { - /* This doesn't work because the filesize isn't updated until the file - * is closed. - assertTrue( "The files " + f0 + " and " + f1 + - " have differing file sizes (" + f0.length() + - " vs " + f1.length() + ")", ( f0.length() == f1.length() ) ); - */ - final InputStream is0 = new java.io.FileInputStream( f0 ); - try - { - final InputStream is1 = new java.io.FileInputStream( f1 ); - try - { - final byte[] buf0 = new byte[1024]; - final byte[] buf1 = new byte[1024]; - int n0 = 0; - int n1 = 0; - - while ( -1 != n0 ) - { - n0 = is0.read( buf0 ); - n1 = is1.read( buf1 ); - assertTrue( "The files " + f0 + " and " + f1 + - " have differing number of bytes available (" + n0 + - " vs " + n1 + ")", ( n0 == n1 ) ); - - assertTrue( "The files " + f0 + " and " + f1 + - " have different content", Arrays.equals( buf0, buf1 ) ); - } - } - finally - { - is1.close(); - } - } - finally - { - is0.close(); - } - } - - /** Assert that the content of a file is equal to that in a byte[]. */ - protected void assertEqualContent( final byte[] b0, final File file ) - throws IOException - { - final InputStream is = new java.io.FileInputStream( file ); - try - { - byte[] b1 = new byte[b0.length]; - int numRead = is.read( b1 ); - assertTrue( "Different number of bytes", numRead == b0.length && is.available() == 0 ); - for ( int i = 0; - i < numRead; - assertTrue( "Byte " + i + " differs (" + b0[i] + " != " + b1[i] + ")", - b0[i] == b1[i] ), i++ - ) - ; - } - finally - { - is.close(); - } - } - - protected void assertIsDirectory( File file ) - { - assertTrue( "The File doesn't exists: " + file.getAbsolutePath(), file.exists() ); - - assertTrue( "The File isn't a directory: " + file.getAbsolutePath(), file.isDirectory() ); - } - - protected void assertIsFile( File file ) - { - assertTrue( "The File doesn't exists: " + file.getAbsolutePath(), file.exists() ); - - assertTrue( "The File isn't a file: " + file.getAbsolutePath(), file.isFile() ); - } -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/FileUtilsTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/FileUtilsTest.java deleted file mode 100644 index c0215d78a..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/FileUtilsTest.java +++ /dev/null @@ -1,861 +0,0 @@ -package org.codehaus.plexus.util; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.io.Reader; -import java.net.URL; -import java.util.Properties; - -/** - * This is used to test FileUtils for correctness. - * - * @author Peter Donald - * @author Matthew Hawthorne - * @version $Id$ - * @see FileUtils - */ -public final class FileUtilsTest - extends FileBasedTestCase -{ - // Test data - - /** - * Size of test directory. - */ - private static final int TEST_DIRECTORY_SIZE = 0; - - private final File testFile1; - - private final File testFile2; - - private static int testFile1Size; - - private static int testFile2Size; - - public FileUtilsTest() - throws Exception - { - testFile1 = new File( getTestDirectory(), "file1-test.txt" ); - testFile2 = new File( getTestDirectory(), "file1a-test.txt" ); - - testFile1Size = (int) testFile1.length(); - testFile2Size = (int) testFile2.length(); - } - - /** - * @see junit.framework.TestCase#setUp() - */ - protected void setUp() - throws Exception - { - getTestDirectory().mkdirs(); - createFile( testFile1, testFile1Size ); - createFile( testFile2, testFile2Size ); - FileUtils.deleteDirectory( getTestDirectory() ); - getTestDirectory().mkdirs(); - createFile( testFile1, testFile1Size ); - createFile( testFile2, testFile2Size ); - } - - // byteCountToDisplaySize - - public void testByteCountToDisplaySize() - { - assertEquals( FileUtils.byteCountToDisplaySize( 0 ), "0 bytes" ); - assertEquals( FileUtils.byteCountToDisplaySize( 1024 ), "1 KB" ); - assertEquals( FileUtils.byteCountToDisplaySize( 1024 * 1024 ), "1 MB" ); - assertEquals( FileUtils.byteCountToDisplaySize( 1024 * 1024 * 1024 ), "1 GB" ); - } - - // waitFor - - public void testWaitFor() - { - FileUtils.waitFor( "", -1 ); - - FileUtils.waitFor( "", 2 ); - } - - // Hacked to sanity by Trygve - public void testToURLs() - throws Exception - { - File[] files = new File[]{new File( "file1" ), new File( "file2" ),}; - - URL[] urls = FileUtils.toURLs( files ); - - assertEquals( "The length of the generated URL's is not equals to the length of files. " + "Was " + files - .length + ", expected " + urls.length, files.length, urls.length ); - - for ( int i = 0; i < urls.length; i++ ) - { - assertEquals( files[i].toURL(), urls[i] ); - } - } - - public void testGetFilesFromExtension() - { - // TODO I'm not sure what is supposed to happen here - FileUtils.getFilesFromExtension( "dir", null ); - - // Non-existent files - final String[] emptyFileNames = - FileUtils.getFilesFromExtension( getTestDirectory().getAbsolutePath(), new String[]{"java"} ); - assertTrue( emptyFileNames.length == 0 ); - - // Existing files - // TODO Figure out how to test this - /* - final String[] fileNames = - FileUtils.getFilesFromExtension( - getClass().getResource("/java/util/").getFile(), - new String[] { "class" }); - assertTrue(fileNames.length > 0); - */ - } - - // mkdir - - public void testMkdir() - { - final File dir = new File( getTestDirectory(), "testdir" ); - FileUtils.mkdir( dir.getAbsolutePath() ); - dir.deleteOnExit(); - } - - // contentEquals - - public void testContentEquals() - throws Exception - { - // Non-existent files - final File file = new File( getTestDirectory(), getName() ); - assertTrue( FileUtils.contentEquals( file, file ) ); - - // TODO Should comparing 2 directories throw an Exception instead of returning false? - // Directories - assertTrue( !FileUtils.contentEquals( getTestDirectory(), getTestDirectory() ) ); - - // Different files - final File objFile1 = new File( getTestDirectory(), getName() + ".object" ); - objFile1.deleteOnExit(); - FileUtils.copyURLToFile( getClass().getResource( "/java/lang/Object.class" ), objFile1 ); - - final File objFile2 = new File( getTestDirectory(), getName() + ".collection" ); - objFile2.deleteOnExit(); - FileUtils.copyURLToFile( getClass().getResource( "/java/util/Collection.class" ), objFile2 ); - - assertTrue( "Files should not be equal.", !FileUtils.contentEquals( objFile1, objFile2 ) ); - - // Equal files - file.createNewFile(); - assertTrue( FileUtils.contentEquals( file, file ) ); - } - - // removePath - - public void testRemovePath() - { - final String fileName = FileUtils.removePath( new File( getTestDirectory(), getName() ).getAbsolutePath() ); - assertEquals( getName(), fileName ); - } - - // getPath - - public void testGetPath() - { - final String fileName = FileUtils.getPath( new File( getTestDirectory(), getName() ).getAbsolutePath() ); - assertEquals( getTestDirectory().getAbsolutePath(), fileName ); - } - - // copyURLToFile - - public void testCopyURLToFile() - throws Exception - { - // Creates file - final File file = new File( getTestDirectory(), getName() ); - file.deleteOnExit(); - - // Loads resource - final String resourceName = "/java/lang/Object.class"; - FileUtils.copyURLToFile( getClass().getResource( resourceName ), file ); - - // Tests that resuorce was copied correctly - final FileInputStream fis = new FileInputStream( file ); - try - { - assertTrue( "Content is not equal.", - IOUtil.contentEquals( getClass().getResourceAsStream( resourceName ), fis ) ); - } - finally - { - fis.close(); - } - } - - // catPath - - public void testCatPath() - { - // TODO StringIndexOutOfBoundsException thrown if file doesn't contain slash. - // Is this acceptable? - //assertEquals("", FileUtils.catPath("a", "b")); - - assertEquals( "/a/c", FileUtils.catPath( "/a/b", "c" ) ); - assertEquals( "/a/d", FileUtils.catPath( "/a/b/c", "../d" ) ); - } - - // forceMkdir - - public void testForceMkdir() - throws Exception - { - // Tests with existing directory - FileUtils.forceMkdir( getTestDirectory() ); - - // Creates test file - final File testFile = new File( getTestDirectory(), getName() ); - testFile.deleteOnExit(); - testFile.createNewFile(); - assertTrue( "Test file does not exist.", testFile.exists() ); - - // Tests with existing file - try - { - FileUtils.forceMkdir( testFile ); - fail( "Exception expected." ); - } - catch ( IOException ex ) - { - } - - testFile.delete(); - - // Tests with non-existent directory - FileUtils.forceMkdir( testFile ); - assertTrue( "Directory was not created.", testFile.exists() ); - } - - // sizeOfDirectory - - public void testSizeOfDirectory() - throws Exception - { - final File file = new File( getTestDirectory(), getName() ); - - // Non-existent file - try - { - FileUtils.sizeOfDirectory( file ); - fail( "Exception expected." ); - } - catch ( IllegalArgumentException ex ) - { - } - - // Creates file - file.createNewFile(); - file.deleteOnExit(); - - // Existing file - try - { - FileUtils.sizeOfDirectory( file ); - fail( "Exception expected." ); - } - catch ( IllegalArgumentException ex ) - { - } - - // Existing directory - file.delete(); - file.mkdir(); - - assertEquals( "Unexpected directory size", TEST_DIRECTORY_SIZE, FileUtils.sizeOfDirectory( file ) ); - } - - // isFileNewer - - // TODO Finish test - - public void XtestIsFileNewer() - { - } - - // copyFile - public void testCopyFile1() - throws Exception - { - final File destination = new File( getTestDirectory(), "copy1.txt" ); - FileUtils.copyFile( testFile1, destination ); - assertTrue( "Check Exist", destination.exists() ); - assertTrue( "Check Full copy", destination.length() == testFile1Size ); - } - - public void testCopyFile2() - throws Exception - { - final File destination = new File( getTestDirectory(), "copy2.txt" ); - FileUtils.copyFile( testFile1, destination ); - assertTrue( "Check Exist", destination.exists() ); - assertTrue( "Check Full copy", destination.length() == testFile2Size ); - } - - // copyFileIfModified - - public void testCopyIfModifiedWhenSourceIsNewer() - throws Exception - { - FileUtils.forceMkdir( new File( getTestDirectory() + "/temp" ) ); - - // Place destination - File destination = new File( getTestDirectory() + "/temp/copy1.txt" ); - FileUtils.copyFile( testFile1, destination ); - - // Make sure source is newer - Thread.sleep( 1000 ); - - // Place source - File source = new File( getTestDirectory(), "copy1.txt" ); - FileUtils.copyFile( testFile1, source ); - - // Copy will occur when source is newer - assertTrue( "Failed copy. Target file should have been updated.", - FileUtils.copyFileIfModified( source, destination ) ); - } - - public void testCopyIfModifiedWhenSourceIsOlder() - throws Exception - { - FileUtils.forceMkdir( new File( getTestDirectory() + "/temp" ) ); - - // Place source - File source = new File( getTestDirectory() + "copy1.txt" ); - FileUtils.copyFile( testFile1, source ); - - // Make sure desintation is newer - Thread.sleep( 1000 ); - - // Place destination - File desintation = new File( getTestDirectory(), "/temp/copy1.txt" ); - FileUtils.copyFile( testFile1, desintation ); - - // Copy will occur when desintation is newer - assertFalse( "Source file should not have been copied.", FileUtils.copyFileIfModified( source, desintation ) ); - } - - // forceDelete - - public void testForceDeleteAFile1() - throws Exception - { - final File destination = new File( getTestDirectory(), "copy1.txt" ); - destination.createNewFile(); - assertTrue( "Copy1.txt doesn't exist to delete", destination.exists() ); - FileUtils.forceDelete( destination ); - assertTrue( "Check No Exist", !destination.exists() ); - } - - public void testForceDeleteAFile2() - throws Exception - { - final File destination = new File( getTestDirectory(), "copy2.txt" ); - destination.createNewFile(); - assertTrue( "Copy2.txt doesn't exist to delete", destination.exists() ); - FileUtils.forceDelete( destination ); - assertTrue( "Check No Exist", !destination.exists() ); - } - - // copyFileToDirectory - - public void testCopyFile1ToDir() - throws Exception - { - final File directory = new File( getTestDirectory(), "subdir" ); - if ( !directory.exists() ) - { - directory.mkdirs(); - } - final File destination = new File( directory, testFile1.getName() ); - FileUtils.copyFileToDirectory( testFile1, directory ); - assertTrue( "Check Exist", destination.exists() ); - assertTrue( "Check Full copy", destination.length() == testFile1Size ); - } - - public void testCopyFile2ToDir() - throws Exception - { - final File directory = new File( getTestDirectory(), "subdir" ); - if ( !directory.exists() ) - { - directory.mkdirs(); - } - final File destination = new File( directory, testFile1.getName() ); - FileUtils.copyFileToDirectory( testFile1, directory ); - assertTrue( "Check Exist", destination.exists() ); - assertTrue( "Check Full copy", destination.length() == testFile2Size ); - } - - // copyFileToDirectoryIfModified - - public void testCopyFile1ToDirIfModified() - throws Exception - { - final File directory = new File( getTestDirectory(), "subdir" ); - if ( directory.exists() ) - { - FileUtils.forceDelete( directory ); - } - directory.mkdirs(); - - final File destination = new File( directory, testFile1.getName() ); - - FileUtils.copyFileToDirectoryIfModified( testFile1, directory ); - - final File target = new File( getTestDirectory() + "/subdir", testFile1.getName() ); - long timestamp = target.lastModified(); - - assertTrue( "Check Exist", destination.exists() ); - assertTrue( "Check Full copy", destination.length() == testFile1Size ); - - FileUtils.copyFileToDirectoryIfModified( testFile1, directory ); - - assertTrue( "Timestamp was changed", timestamp == target.lastModified() ); - } - - public void testCopyFile2ToDirIfModified() - throws Exception - { - final File directory = new File( getTestDirectory(), "subdir" ); - if ( directory.exists() ) - { - FileUtils.forceDelete( directory ); - } - directory.mkdirs(); - - final File destination = new File( directory, testFile2.getName() ); - - FileUtils.copyFileToDirectoryIfModified( testFile2, directory ); - - final File target = new File( getTestDirectory() + "/subdir", testFile2.getName() ); - long timestamp = target.lastModified(); - - assertTrue( "Check Exist", destination.exists() ); - assertTrue( "Check Full copy", destination.length() == testFile2Size ); - - FileUtils.copyFileToDirectoryIfModified( testFile2, directory ); - - assertTrue( "Timestamp was changed", timestamp == target.lastModified() ); - } - - // forceDelete - - public void testForceDeleteDir() - throws Exception - { - FileUtils.forceDelete( getTestDirectory().getParentFile() ); - assertTrue( "Check No Exist", !getTestDirectory().getParentFile().exists() ); - } - - // resolveFile - - public void testResolveFileDotDot() - throws Exception - { - final File file = FileUtils.resolveFile( getTestDirectory(), ".." ); - assertEquals( "Check .. operator", file, getTestDirectory().getParentFile() ); - } - - public void testResolveFileDot() - throws Exception - { - final File file = FileUtils.resolveFile( getTestDirectory(), "." ); - assertEquals( "Check . operator", file, getTestDirectory() ); - } - - // normalize - - public void testNormalize() - throws Exception - { - final String[] src = {"", "/", "///", "/foo", "/foo//", "/./", "/foo/./", "/foo/./bar", "/foo/../bar", - "/foo/../bar/../baz", "/foo/bar/../../baz", "/././", "/foo/./../bar", "/foo/.././bar/", "//foo//./bar", - "/../", "/foo/../../"}; - - final String[] dest = {"", "/", "/", "/foo", "/foo/", "/", "/foo/", "/foo/bar", "/bar", "/baz", "/baz", "/", - "/bar", "/bar/", "/foo/bar", null, null}; - - assertEquals( "Oops, test writer goofed", src.length, dest.length ); - - for ( int i = 0; i < src.length; i++ ) - { - assertEquals( "Check if '" + src[i] + "' normalized to '" + dest[i] + "'", dest[i], - FileUtils.normalize( src[i] ) ); - } - } - - private String replaceAll( String text, String lookFor, String replaceWith ) - { - StringBuffer sb = new StringBuffer( text ); - while ( true ) - { - int idx = sb.indexOf( lookFor ); - if ( idx < 0 ) - { - break; - } - sb.replace( idx, idx + lookFor.length(), replaceWith ); - } - return sb.toString(); - } - - /** - * Test the FileUtils implementation. - */ - // Used to exist as IOTestCase class - public void testFileUtils() - throws Exception - { - // Loads file from classpath - final String path = "/test.txt"; - final URL url = this.getClass().getResource( path ); - assertNotNull( path + " was not found.", url ); - - String filename = url.getFile(); - //The following line applies a fix for spaces in a path - filename = replaceAll( filename, "%20", " " ); - final String filename2 = "test2.txt"; - - assertTrue( "test.txt extension == \"txt\"", FileUtils.getExtension( filename ).equals( "txt" ) ); - - assertTrue( "Test file does not exist: " + filename, FileUtils.fileExists( filename ) ); - - assertTrue( "Second test file does not exist", !FileUtils.fileExists( filename2 ) ); - - FileUtils.fileWrite( filename2, filename ); - assertTrue( "Second file was written", FileUtils.fileExists( filename2 ) ); - - final String file2contents = FileUtils.fileRead( filename2 ); - assertTrue( "Second file's contents correct", FileUtils.fileRead( filename2 ).equals( file2contents ) ); - - FileUtils.fileAppend( filename2, filename ); - assertTrue( "Second file's contents correct", - FileUtils.fileRead( filename2 ).equals( file2contents + file2contents ) ); - - FileUtils.fileDelete( filename2 ); - assertTrue( "Second test file does not exist", !FileUtils.fileExists( filename2 ) ); - - final String contents = FileUtils.fileRead( filename ); - assertTrue( "FileUtils.fileRead()", contents.equals( "This is a test" ) ); - - } - - public void testGetExtension() - { - final String[][] tests = - {{"filename.ext", "ext"}, {"README", ""}, {"domain.dot.com", "com"}, {"image.jpeg", "jpeg"}}; - for ( int i = 0; i < tests.length; i++ ) - { - assertEquals( tests[i][1], FileUtils.getExtension( tests[i][0] ) ); - //assertEquals(tests[i][1], FileUtils.extension(tests[i][0])); - } - } - - /* TODO: Reenable this test */ - public void DISABLED__testGetExtensionWithPaths() - { - final String[][] testsWithPaths = {{"/tmp/foo/filename.ext", "ext"}, {"C:\\temp\\foo\\filename.ext", "ext"}, - {"/tmp/foo.bar/filename.ext", "ext"}, {"C:\\temp\\foo.bar\\filename.ext", "ext"}, - {"/tmp/foo.bar/README", ""}, {"C:\\temp\\foo.bar\\README", ""}, {"../filename.ext", "ext"}}; - for ( int i = 0; i < testsWithPaths.length; i++ ) - { - assertEquals( testsWithPaths[i][1], FileUtils.getExtension( testsWithPaths[i][0] ) ); - //assertEquals(testsWithPaths[i][1], FileUtils.extension(testsWithPaths[i][0])); - } - } - - public void testRemoveExtension() - { - final String[][] tests = {{"filename.ext", "filename"}, {"first.second.third.ext", "first.second.third"}, - {"README", "README"}, {"domain.dot.com", "domain.dot"}, {"image.jpeg", "image"}}; - - for ( int i = 0; i < tests.length; i++ ) - { - assertEquals( tests[i][1], FileUtils.removeExtension( tests[i][0] ) ); - //assertEquals(tests[i][1], FileUtils.basename(tests[i][0])); - } - } - - /* TODO: Reenable this test */ - public void DISABLED__testRemoveExtensionWithPaths() - { - final String[][] testsWithPaths = {{"/tmp/foo/filename.ext", "filename"}, - {"C:\\temp\\foo\\filename.ext", "filename"}, {"/tmp/foo.bar/filename.ext", "filename"}, - {"C:\\temp\\foo.bar\\filename.ext", "filename"}, {"/tmp/foo.bar/README", "README"}, - {"C:\\temp\\foo.bar\\README", "README"}, {"../filename.ext", "filename"}}; - - for ( int i = 0; i < testsWithPaths.length; i++ ) - { - assertEquals( testsWithPaths[i][1], FileUtils.removeExtension( testsWithPaths[i][0] ) ); - //assertEquals(testsWithPaths[i][1], FileUtils.basename(testsWithPaths[i][0])); - } - } - - public void testCopyDirectoryStructureWithAEmptyDirectoryStruture() - throws Exception - { - File from = new File( getTestDirectory(), "from" ); - - FileUtils.deleteDirectory( from ); - - assertTrue( from.mkdirs() ); - - File to = new File( getTestDirectory(), "to" ); - - assertTrue( to.mkdirs() ); - - FileUtils.copyDirectoryStructure( from, to ); - } - - public void testCopyDirectoryStructureWithAPopulatedStructure() - throws Exception - { - // Make a structure to copy - File from = new File( getTestDirectory(), "from" ); - - FileUtils.deleteDirectory( from ); - - File fRoot = new File( from, "root.txt" ); - - File d1 = new File( from, "1" ); - - File d1_1 = new File( d1, "1_1" ); - - File d2 = new File( from, "2" ); - - File f2 = new File( d2, "2.txt" ); - - File d2_1 = new File( d2, "2_1" ); - - File f2_1 = new File( d2_1, "2_1.txt" ); - - assertTrue( from.mkdir() ); - - assertTrue( d1.mkdir() ); - - assertTrue( d1_1.mkdir() ); - - assertTrue( d2.mkdir() ); - - assertTrue( d2_1.mkdir() ); - - createFile( fRoot, 100 ); - - createFile( f2, 100 ); - - createFile( f2_1, 100 ); - - File to = new File( getTestDirectory(), "to" ); - - assertTrue( to.mkdirs() ); - - FileUtils.copyDirectoryStructure( from, to ); - - checkFile( fRoot, new File( to, "root.txt" ) ); - - assertIsDirectory( new File( to, "1" ) ); - - assertIsDirectory( new File( to, "1/1_1" ) ); - - assertIsDirectory( new File( to, "2" ) ); - - assertIsDirectory( new File( to, "2/2_1" ) ); - - checkFile( f2, new File( to, "2/2.txt" ) ); - - checkFile( f2_1, new File( to, "2/2_1/2_1.txt" ) ); - } - - public void testCopyDirectoryStructureIfModified() - throws Exception - { - // Make a structure to copy - File from = new File( getTestDirectory(), "from" ); - - FileUtils.deleteDirectory( from ); - - File fRoot = new File( from, "root.txt" ); - - File d1 = new File( from, "1" ); - - File d1_1 = new File( d1, "1_1" ); - - File d2 = new File( from, "2" ); - - File f2 = new File( d2, "2.txt" ); - - File d2_1 = new File( d2, "2_1" ); - - File f2_1 = new File( d2_1, "2_1.txt" ); - - assertTrue( from.mkdir() ); - - assertTrue( d1.mkdir() ); - - assertTrue( d1_1.mkdir() ); - - assertTrue( d2.mkdir() ); - - assertTrue( d2_1.mkdir() ); - - createFile( fRoot, 100 ); - - createFile( f2, 100 ); - - createFile( f2_1, 100 ); - - File to = new File( getTestDirectory(), "to" ); - - assertTrue( to.mkdirs() ); - - FileUtils.copyDirectoryStructureIfModified( from, to ); - - File files[] = {new File( to, "root.txt" ), new File( to, "2/2.txt" ), new File( to, "2/2_1/2_1.txt" )}; - - long timestamps[] = {files[0].lastModified(), files[1].lastModified(), files[2].lastModified()}; - - checkFile( fRoot, files[0] ); - - assertIsDirectory( new File( to, "1" ) ); - - assertIsDirectory( new File( to, "1/1_1" ) ); - - assertIsDirectory( new File( to, "2" ) ); - - assertIsDirectory( new File( to, "2/2_1" ) ); - - checkFile( f2, files[1] ); - - checkFile( f2_1, files[2] ); - - FileUtils.copyDirectoryStructureIfModified( from, to ); - - assertTrue( "Unmodified file was overwritten", timestamps[0] == files[0].lastModified() ); - assertTrue( "Unmodified file was overwritten", timestamps[1] == files[1].lastModified() ); - assertTrue( "Unmodified file was overwritten", timestamps[2] == files[2].lastModified() ); - - files[1].setLastModified( f2.lastModified() - 5000L ); - timestamps[1] = files[1].lastModified(); - - FileUtils.copyDirectoryStructureIfModified( from, to ); - - assertTrue( "Unmodified file was overwritten", timestamps[0] == files[0].lastModified() ); - assertTrue( "Outdated file was not overwritten", timestamps[1] < files[1].lastModified() ); - assertTrue( "Unmodified file was overwritten", timestamps[2] == files[2].lastModified() ); - - } - - public void testCopyDirectoryStructureToSelf() - throws Exception - { - // Make a structure to copy - File toFrom = new File( getTestDirectory(), "tofrom" ); - - FileUtils.deleteDirectory( toFrom ); - - File fRoot = new File( toFrom, "root.txt" ); - - File dSub = new File( toFrom, "subdir" ); - - File f1 = new File( dSub, "notempty.txt" ); - - File dSubSub = new File( dSub, "subsubdir" ); - - File f2 = new File( dSubSub, "notemptytoo.txt" ); - - assertTrue( toFrom.mkdir() ); - - assertTrue( dSub.mkdir() ); - - assertTrue( dSubSub.mkdir() ); - - createFile( fRoot, 100 ); - - createFile( f1, 100 ); - - createFile( f2, 100 ); - - try - { - FileUtils.copyDirectoryStructure( toFrom, toFrom ); - fail( "An exception must be thrown." ); - } - catch ( IOException e ) - { - } - } - - public void testFilteredFileCopy() - throws Exception - { - File compareFile = new File( getTestDirectory(), "compare.txt" ); - OutputStream compareStream = new FileOutputStream( compareFile ); - compareStream.write( "This is a test. Test sample text\n".getBytes() ); - compareStream.flush(); - - File destFile = new File( getTestDirectory(), "target.txt" ); - - final Properties filterProperties = new Properties(); - filterProperties.setProperty( "s", "sample text" ); - - // test ${token} - FileUtils.FilterWrapper[] wrappers1 = new FileUtils.FilterWrapper[]{new FileUtils.FilterWrapper() - { - public Reader getReader( Reader reader ) - { - return new InterpolationFilterReader( reader, filterProperties, "${", "}" ); - } - }}; - - File srcFile = new File( getTestDirectory(), "root.txt" ); - OutputStream os = new FileOutputStream( srcFile ); - os.write( ( "This is a test. Test ${s}\n" ).getBytes() ); - os.flush(); - - FileUtils.copyFile( srcFile, destFile, System.getProperty( "file.encoding" ), wrappers1 ); - assertTrue( "Files should be equal.", FileUtils.contentEquals( compareFile, destFile ) ); - - srcFile.delete(); - destFile.delete(); - compareFile.delete(); - } - -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/IOUtilTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/IOUtilTest.java deleted file mode 100644 index 204672f0e..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/IOUtilTest.java +++ /dev/null @@ -1,572 +0,0 @@ -package org.codehaus.plexus.util; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.io.BufferedOutputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.PrintStream; -import java.io.PrintWriter; -import java.io.Reader; -import java.io.Writer; -import java.util.Arrays; - -import junit.framework.AssertionFailedError; -import junit.framework.TestCase; - -/** - * This is used to test IOUtil for correctness. The following checks are performed: - *

      - *
    • The return must not be null, must be the same type and equals() to the method's second arg
    • - *
    • All bytes must have been read from the source (available() == 0)
    • - *
    • The source and destination content must be identical (byte-wise comparison check)
    • - *
    • The output stream must not have been closed (a byte/char is written to test this, and - * subsequent size checked)
    • - *
    - * Due to interdependencies in IOUtils and IOUtilsTestlet, one bug may cause - * multiple tests to fail. - * - * @author Jeff Turner - */ -public final class IOUtilTest - extends TestCase -{ - /* - * Note: this is not particularly beautiful code. A better way to check for - * flush and close status would be to implement "trojan horse" wrapper - * implementations of the various stream classes, which set a flag when - * relevant methods are called. (JT) - */ - - private int FILE_SIZE = 1024 * 4 + 1; - - private File testDirectory; - private File testFile; - - public void setUp() - { - try - { - testDirectory = ( new File( "target/test/io/" ) ).getAbsoluteFile(); - if ( !testDirectory.exists() ) - { - testDirectory.mkdirs(); - } - - testFile = new File( testDirectory, "file2-test.txt" ); - - createFile( testFile, FILE_SIZE ); - } - catch ( IOException ioe ) - { - throw new RuntimeException( "Can't run this test because environment could not be built" ); - } - } - - public void tearDown() - { - testFile.delete(); - testDirectory.delete(); - } - - public IOUtilTest( String name ) - { - super( name ); - } - - private void createFile( File file, long size ) - throws IOException - { - BufferedOutputStream output = - new BufferedOutputStream( new FileOutputStream( file ) ); - - for ( int i = 0; i < size; i++ ) - { - output.write( (byte) ( i % 128 ) ); // nice varied byte pattern compatible with Readers and Writers - } - - output.close(); - } - - /** Assert that the contents of two byte arrays are the same. */ - private void assertEqualContent( byte[] b0, byte[] b1 ) - { - assertTrue( "Content not equal according to java.util.Arrays#equals()", Arrays.equals( b0, b1 ) ); - } - - /** Assert that the content of two files is the same. */ - private void assertEqualContent( File f0, File f1 ) - throws IOException - { - FileInputStream is0 = new FileInputStream( f0 ); - FileInputStream is1 = new FileInputStream( f1 ); - byte[] buf0 = new byte[FILE_SIZE]; - byte[] buf1 = new byte[FILE_SIZE]; - int n0 = 0; - int n1 = 0; - - try - { - while ( -1 != n0 ) - { - n0 = is0.read( buf0 ); - n1 = is1.read( buf1 ); - assertTrue( "The files " + f0 + " and " + f1 + - " have differing number of bytes available (" + n0 + - " vs " + n1 + ")", ( n0 == n1 ) ); - - assertTrue( "The files " + f0 + " and " + f1 + - " have different content", Arrays.equals( buf0, buf1 ) ); - } - } - finally - { - is0.close(); - is1.close(); - } - } - - /** Assert that the content of a file is equal to that in a byte[]. */ - private void assertEqualContent( byte[] b0, File file ) - throws IOException - { - FileInputStream is = new FileInputStream( file ); - byte[] b1 = new byte[b0.length]; - int numRead = is.read( b1 ); - assertTrue( "Different number of bytes", numRead == b0.length && is.available() == 0 ); - for ( int i = 0; - i < numRead; - assertTrue( "Byte " + i + " differs (" + b0[i] + " != " + b1[i] + ")", b0[i] == b1[i] ), i++ - ) - ; - is.close(); - } - - public void testInputStreamToOutputStream() - throws Exception - { - File destination = newFile( "copy1.txt" ); - FileInputStream fin = new FileInputStream( testFile ); - FileOutputStream fout = new FileOutputStream( destination ); - - IOUtil.copy( fin, fout ); - assertTrue( "Not all bytes were read", fin.available() == 0 ); - fout.flush(); - - checkFile( destination ); - checkWrite( fout ); - fout.close(); - fin.close(); - deleteFile( destination ); - } - - public void testInputStreamToWriter() - throws Exception - { - File destination = newFile( "copy2.txt" ); - FileInputStream fin = new FileInputStream( testFile ); - FileWriter fout = new FileWriter( destination ); - - IOUtil.copy( fin, fout ); - - assertTrue( "Not all bytes were read", fin.available() == 0 ); - fout.flush(); - - checkFile( destination ); - checkWrite( fout ); - fout.close(); - fin.close(); - deleteFile( destination ); - } - - public void testInputStreamToString() - throws Exception - { - FileInputStream fin = new FileInputStream( testFile ); - String out = IOUtil.toString( fin ); - assertNotNull( out ); - assertTrue( "Not all bytes were read", fin.available() == 0 ); - assertTrue( "Wrong output size: out.length()=" + out.length() + - "!=" + FILE_SIZE, out.length() == FILE_SIZE ); - fin.close(); - } - - public void testReaderToOutputStream() - throws Exception - { - File destination = newFile( "copy3.txt" ); - FileReader fin = new FileReader( testFile ); - FileOutputStream fout = new FileOutputStream( destination ); - IOUtil.copy( fin, fout ); - //Note: this method *does* flush. It is equivalent to: - // OutputStreamWriter _out = new OutputStreamWriter(fout); - // IOUtil.copy( fin, _out, 4096 ); // copy( Reader, Writer, int ); - // _out.flush(); - // out = fout; - - // Note: rely on the method to flush - checkFile( destination ); - checkWrite( fout ); - fout.close(); - fin.close(); - deleteFile( destination ); - } - - public void testReaderToWriter() - throws Exception - { - File destination = newFile( "copy4.txt" ); - FileReader fin = new FileReader( testFile ); - FileWriter fout = new FileWriter( destination ); - IOUtil.copy( fin, fout ); - - fout.flush(); - checkFile( destination ); - checkWrite( fout ); - fout.close(); - fin.close(); - deleteFile( destination ); - } - - public void testReaderToString() - throws Exception - { - FileReader fin = new FileReader( testFile ); - String out = IOUtil.toString( fin ); - assertNotNull( out ); - assertTrue( "Wrong output size: out.length()=" + - out.length() + "!=" + FILE_SIZE, - out.length() == FILE_SIZE ); - fin.close(); - } - - public void testStringToOutputStream() - throws Exception - { - File destination = newFile( "copy5.txt" ); - FileReader fin = new FileReader( testFile ); - // Create our String. Rely on testReaderToString() to make sure this is valid. - String str = IOUtil.toString( fin ); - FileOutputStream fout = new FileOutputStream( destination ); - IOUtil.copy( str, fout ); - //Note: this method *does* flush. It is equivalent to: - // OutputStreamWriter _out = new OutputStreamWriter(fout); - // IOUtil.copy( str, _out, 4096 ); // copy( Reader, Writer, int ); - // _out.flush(); - // out = fout; - // note: we don't flush here; this IOUtils method does it for us - - checkFile( destination ); - checkWrite( fout ); - fout.close(); - fin.close(); - deleteFile( destination ); - } - - public void testStringToWriter() - throws Exception - { - File destination = newFile( "copy6.txt" ); - FileReader fin = new FileReader( testFile ); - // Create our String. Rely on testReaderToString() to make sure this is valid. - String str = IOUtil.toString( fin ); - FileWriter fout = new FileWriter( destination ); - IOUtil.copy( str, fout ); - fout.flush(); - - checkFile( destination ); - checkWrite( fout ); - fout.close(); - fin.close(); - - deleteFile( destination ); - } - - public void testInputStreamToByteArray() - throws Exception - { - FileInputStream fin = new FileInputStream( testFile ); - byte[] out = IOUtil.toByteArray( fin ); - assertNotNull( out ); - assertTrue( "Not all bytes were read", fin.available() == 0 ); - assertTrue( "Wrong output size: out.length=" + out.length + - "!=" + FILE_SIZE, out.length == FILE_SIZE ); - assertEqualContent( out, testFile ); - fin.close(); - } - - public void testStringToByteArray() - throws Exception - { - FileReader fin = new FileReader( testFile ); - - // Create our String. Rely on testReaderToString() to make sure this is valid. - String str = IOUtil.toString( fin ); - - byte[] out = IOUtil.toByteArray( str ); - assertEqualContent( str.getBytes(), out ); - fin.close(); - } - - public void testByteArrayToWriter() - throws Exception - { - File destination = newFile( "copy7.txt" ); - FileWriter fout = new FileWriter( destination ); - FileInputStream fin = new FileInputStream( testFile ); - - // Create our byte[]. Rely on testInputStreamToByteArray() to make sure this is valid. - byte[] in = IOUtil.toByteArray( fin ); - IOUtil.copy( in, fout ); - fout.flush(); - checkFile( destination ); - checkWrite( fout ); - fout.close(); - fin.close(); - deleteFile( destination ); - } - - public void testByteArrayToString() - throws Exception - { - FileInputStream fin = new FileInputStream( testFile ); - byte[] in = IOUtil.toByteArray( fin ); - // Create our byte[]. Rely on testInputStreamToByteArray() to make sure this is valid. - String str = IOUtil.toString( in ); - assertEqualContent( in, str.getBytes() ); - fin.close(); - } - - public void testByteArrayToOutputStream() - throws Exception - { - File destination = newFile( "copy8.txt" ); - FileOutputStream fout = new FileOutputStream( destination ); - FileInputStream fin = new FileInputStream( testFile ); - - // Create our byte[]. Rely on testInputStreamToByteArray() to make sure this is valid. - byte[] in = IOUtil.toByteArray( fin ); - - IOUtil.copy( in, fout ); - - fout.flush(); - - checkFile( destination ); - checkWrite( fout ); - fout.close(); - fin.close(); - deleteFile( destination ); - } - - // ---------------------------------------------------------------------- - // Test closeXXX() - // ---------------------------------------------------------------------- - - public void testCloseInputStream() - throws Exception - { - IOUtil.close( (InputStream) null ); - - TestInputStream inputStream = new TestInputStream(); - - IOUtil.close( inputStream ); - - assertTrue( inputStream.closed ); - } - - public void testCloseOutputStream() - throws Exception - { - IOUtil.close( (OutputStream) null ); - - TestOutputStream outputStream = new TestOutputStream(); - - IOUtil.close( outputStream ); - - assertTrue( outputStream.closed ); - } - - public void testCloseReader() - throws Exception - { - IOUtil.close( (Reader) null ); - - TestReader reader = new TestReader(); - - IOUtil.close( reader ); - - assertTrue( reader.closed ); - } - - public void testCloseWriter() - throws Exception - { - IOUtil.close( (Writer) null ); - - TestWriter writer = new TestWriter(); - - IOUtil.close( writer ); - - assertTrue( writer.closed ); - } - - private class TestInputStream - extends InputStream - { - boolean closed; - - public void close() - { - closed = true; - } - - public int read() - { - fail( "This method shouldn't be called" ); - - return 0; - } - } - - private class TestOutputStream - extends OutputStream - { - boolean closed; - - public void close() - { - closed = true; - } - - public void write( int value ) - { - fail( "This method shouldn't be called" ); - } - } - - private class TestReader - extends Reader - { - boolean closed; - - public void close() - { - closed = true; - } - - public int read( char cbuf[], int off, int len ) - { - fail( "This method shouldn't be called" ); - - return 0; - } - } - - private class TestWriter - extends Writer - { - boolean closed; - - public void close() - { - closed = true; - } - - public void write( char cbuf[], int off, int len ) - { - fail( "This method shouldn't be called" ); - } - - public void flush() - { - fail( "This method shouldn't be called" ); - } - } - - // ---------------------------------------------------------------------- - // Utility methods - // ---------------------------------------------------------------------- - - private File newFile( String filename ) - throws Exception - { - File destination = new File( testDirectory, filename ); - assertTrue( filename + "Test output data file shouldn't previously exist", - !destination.exists() ); - - return destination; - } - - private void checkFile( File file ) - throws Exception - { - assertTrue( "Check existence of output file", file.exists() ); - assertEqualContent( testFile, file ); - } - - private void checkWrite( OutputStream output ) - throws Exception - { - try - { - new PrintStream( output ).write( 0 ); - } - catch ( Throwable t ) - { - throw new AssertionFailedError( "The copy() method closed the stream " + - "when it shouldn't have. " + t.getMessage() ); - } - } - - private void checkWrite( Writer output ) - throws Exception - { - try - { - new PrintWriter( output ).write( 'a' ); - } - catch ( Throwable t ) - { - throw new AssertionFailedError( "The copy() method closed the stream " + - "when it shouldn't have. " + t.getMessage() ); - } - } - - private void deleteFile( File file ) - throws Exception - { - assertTrue( "Wrong output size: file.length()=" + - file.length() + "!=" + FILE_SIZE + 1, - file.length() == FILE_SIZE + 1 ); - - assertTrue( "File would not delete", ( file.delete() || ( !file.exists() ) ) ); - } -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/InterpolationFilterReaderTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/InterpolationFilterReaderTest.java deleted file mode 100644 index 884016c73..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/InterpolationFilterReaderTest.java +++ /dev/null @@ -1,177 +0,0 @@ -package org.codehaus.plexus.util; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.io.StringReader; -import java.util.HashMap; -import java.util.Map; - -import junit.framework.TestCase; - -public class InterpolationFilterReaderTest - extends TestCase -{ - /* - * Added and commented by jdcasey@03-Feb-2005 because it is a bug in the - * InterpolationFilterReader. - * kenneyw@15-04-2005 fixed the bug. - */ - public void testShouldNotInterpolateExpressionAtEndOfDataWithInvalidEndToken() - throws Exception - { - Map m = new HashMap(); - m.put( "test", "TestValue" ); - - String testStr = "This is a ${test"; - - assertEquals( "This is a ${test", interpolate( testStr, m ) ); - } - - /* - * kenneyw@14-04-2005 Added test to check above fix. - */ - public void testShouldNotInterpolateExpressionWithMissingEndToken() - throws Exception - { - Map m = new HashMap(); - m.put( "test", "TestValue" ); - - String testStr = "This is a ${test, really"; - - assertEquals( "This is a ${test, really", interpolate( testStr, m ) ); - } - - public void testShouldNotInterpolateWithMalformedStartToken() - throws Exception - { - Map m = new HashMap(); - m.put( "test", "testValue" ); - - String foo = "This is a $!test} again"; - - assertEquals( "This is a $!test} again", interpolate( foo, m ) ); - } - - public void testShouldNotInterpolateWithMalformedEndToken() - throws Exception - { - Map m = new HashMap(); - m.put( "test", "testValue" ); - - String foo = "This is a ${test!} again"; - - assertEquals( "This is a ${test!} again", interpolate( foo, m, "${", "$}" ) ); - } - - public void testInterpolationWithMulticharDelimiters() - throws Exception - { - Map m = new HashMap(); - m.put( "test", "testValue" ); - - String foo = "This is a ${test$} again"; - - assertEquals( "This is a testValue again", interpolate( foo, m, "${", "$}" ) ); - } - - - - public void testDefaultInterpolationWithNonInterpolatedValueAtEnd() - throws Exception - { - Map m = new HashMap(); - m.put( "name", "jason" ); - m.put( "noun", "asshole" ); - - String foo = "${name} is an ${noun}. ${not.interpolated}"; - - assertEquals( "jason is an asshole. ${not.interpolated}", interpolate( foo, m ) ); - } - - public void testDefaultInterpolationWithInterpolatedValueAtEnd() - throws Exception - { - Map m = new HashMap(); - m.put( "name", "jason" ); - m.put( "noun", "asshole" ); - - String foo = "${name} is an ${noun}"; - - assertEquals( "jason is an asshole", interpolate( foo, m ) ); - } - - public void testInterpolationWithSpecifiedBoundaryTokens() - throws Exception - { - Map m = new HashMap(); - m.put( "name", "jason" ); - m.put( "noun", "asshole" ); - - String foo = "@name@ is an @noun@. @not.interpolated@ baby @foo@. @bar@"; - - assertEquals( "jason is an asshole. @not.interpolated@ baby @foo@. @bar@", interpolate( foo, m, "@", "@" ) ); - } - - public void testInterpolationWithSpecifiedBoundaryTokensWithNonInterpolatedValueAtEnd() - throws Exception - { - Map m = new HashMap(); - m.put( "name", "jason" ); - m.put( "noun", "asshole" ); - - String foo = "@name@ is an @foobarred@"; - - assertEquals( "jason is an @foobarred@", interpolate( foo, m, "@", "@" ) ); - } - - public void testInterpolationWithSpecifiedBoundaryTokensWithInterpolatedValueAtEnd() - throws Exception - { - Map m = new HashMap(); - m.put( "name", "jason" ); - m.put( "noun", "asshole" ); - - String foo = "@name@ is an @noun@"; - - assertEquals( "jason is an asshole", interpolate( foo, m, "@", "@" ) ); - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - private String interpolate( String input, Map context ) - throws Exception - { - return IOUtil.toString( new InterpolationFilterReader( new StringReader( input ), context ) ); - } - - private String interpolate( String input, Map context, String startToken, String endToken ) - throws Exception - { - return IOUtil.toString( new InterpolationFilterReader( new StringReader( input ), - context, startToken, endToken ) ); - } -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/LineOrientedInterpolatingReaderTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/LineOrientedInterpolatingReaderTest.java deleted file mode 100644 index 4bc1d740f..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/LineOrientedInterpolatingReaderTest.java +++ /dev/null @@ -1,188 +0,0 @@ -package org.codehaus.plexus.util; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.StringReader; -import java.io.StringWriter; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -import junit.framework.TestCase; - -/** - * Generated by JUnitDoclet, a tool provided by ObjectFab GmbH under LGPL. - * Please see www.junitdoclet.org, www.gnu.org and www.objectfab.de for - * informations about the tool, the licence and the authors. - */ -public class LineOrientedInterpolatingReaderTest - extends TestCase -{ - public LineOrientedInterpolatingReaderTest( String name ) - { - super( name ); - } - - /** - * The JUnit setup method - */ - protected void setUp() throws Exception - { - } - - /** - * The teardown method for JUnit - */ - protected void tearDown() throws Exception - { - } - - /* - * Added and commented by jdcasey@03-Feb-2005 because it is a bug in the - * InterpolationFilterReader. - */ - public void testShouldInterpolateExpressionAtEndOfDataWithInvalidEndToken() throws IOException - { - String testStr = "This is a ${test"; - LineOrientedInterpolatingReader iReader = new LineOrientedInterpolatingReader( - new StringReader( testStr ), - Collections - .singletonMap( - "test", - "TestValue" ) ); - BufferedReader reader = new BufferedReader( iReader ); - - String result = reader.readLine(); - - assertEquals( "This is a ${test", result ); - } - - public void testDefaultInterpolationWithNonInterpolatedValueAtEnd() throws Exception - { - Map m = new HashMap(); - m.put( "name", "jason" ); - m.put( "noun", "asshole" ); - - String foo = "${name} is an ${noun}. ${not.interpolated}"; - - LineOrientedInterpolatingReader reader = new LineOrientedInterpolatingReader( new StringReader( foo ), m ); - - StringWriter writer = new StringWriter(); - IOUtil.copy( reader, writer ); - - String bar = writer.toString(); - assertEquals( "jason is an asshole. ${not.interpolated}", bar ); - } - - public void testDefaultInterpolationWithEscapedExpression() throws Exception - { - Map m = new HashMap(); - m.put( "name", "jason" ); - m.put( "noun", "asshole" ); - - String foo = "${name} is an ${noun}. \\${noun} value"; - - LineOrientedInterpolatingReader reader = new LineOrientedInterpolatingReader( new StringReader( foo ), m ); - - StringWriter writer = new StringWriter(); - IOUtil.copy( reader, writer ); - - String bar = writer.toString(); - assertEquals( "jason is an asshole. ${noun} value", bar ); - } - - public void testDefaultInterpolationWithInterpolatedValueAtEnd() throws Exception - { - Map m = new HashMap(); - m.put( "name", "jason" ); - m.put( "noun", "asshole" ); - - String foo = "${name} is an ${noun}"; - - LineOrientedInterpolatingReader reader = new LineOrientedInterpolatingReader( new StringReader( foo ), m ); - - StringWriter writer = new StringWriter(); - IOUtil.copy( reader, writer ); - - String bar = writer.toString(); - assertEquals( "jason is an asshole", bar ); - } - - public void testInterpolationWithSpecifiedBoundaryTokens() throws Exception - { - Map m = new HashMap(); - m.put( "name", "jason" ); - m.put( "noun", "asshole" ); - - String foo = "@name@ is an @noun@. @not.interpolated@ baby @foo@. @bar@"; - - LineOrientedInterpolatingReader reader = new LineOrientedInterpolatingReader( new StringReader( foo ), m, "@", - "@" ); - - StringWriter writer = new StringWriter(); - IOUtil.copy( reader, writer ); - - String bar = writer.toString(); - assertEquals( "jason is an asshole. @not.interpolated@ baby @foo@. @bar@", bar ); - } - - public void testInterpolationWithSpecifiedBoundaryTokensWithNonInterpolatedValueAtEnd() throws Exception - { - Map m = new HashMap(); - m.put( "name", "jason" ); - m.put( "noun", "asshole" ); - - String foo = "@name@ is an @foobarred@"; - - LineOrientedInterpolatingReader reader = new LineOrientedInterpolatingReader( new StringReader( foo ), m, "@", - "@" ); - - StringWriter writer = new StringWriter(); - IOUtil.copy( reader, writer ); - - String bar = writer.toString(); - assertEquals( "jason is an @foobarred@", bar ); - } - - public void testInterpolationWithSpecifiedBoundaryTokensWithInterpolatedValueAtEnd() throws Exception - { - Map m = new HashMap(); - m.put( "name", "jason" ); - m.put( "noun", "asshole" ); - - String foo = "@name@ is an @noun@"; - - LineOrientedInterpolatingReader reader = new LineOrientedInterpolatingReader( new StringReader( foo ), m, "@", - "@" ); - - StringWriter writer = new StringWriter(); - IOUtil.copy( reader, writer ); - - String bar = writer.toString(); - assertEquals( "jason is an asshole", bar ); - } -} \ No newline at end of file diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/ReflectionUtilsTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/ReflectionUtilsTest.java deleted file mode 100644 index 2a964b3a1..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/ReflectionUtilsTest.java +++ /dev/null @@ -1,100 +0,0 @@ -package org.codehaus.plexus.util; - -import junit.framework.TestCase; - -import java.util.Map; -import java.util.HashMap; - -/* - * Copyright 2005 The Codehaus. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * This is used to test ReflectionUtils for correctness. - * - * @author Jesse McConnell - * @version $Id:$ - * @see org.codehaus.plexus.util.ReflectionUtils - */ -public final class ReflectionUtilsTest - extends TestCase -{ - public ReflectionUtilsTestClass testClass = new ReflectionUtilsTestClass(); - - protected void setUp() throws Exception - { - - } - - public void testSimpleVariableAccess() - throws IllegalAccessException - { - assertEquals("woohoo", (String)ReflectionUtils.getValueIncludingSuperclasses( "myString", testClass ) ); - } - - public void testComplexVariableAccess() - throws IllegalAccessException - { - Map map = (Map)ReflectionUtils.getVariablesAndValuesIncludingSuperclasses( testClass ); - - Map myMap = (Map)map.get( "myMap" ); - - assertEquals( "myValue", (String)myMap.get( "myKey" ) ); - assertEquals( "myOtherValue", (String)myMap.get( "myOtherKey") ); - - } - - public void testSuperClassVariableAccess() - throws IllegalAccessException - { - assertEquals("super-duper", (String)ReflectionUtils.getValueIncludingSuperclasses( "mySuperString", testClass ) ); - } - - public void testSettingVariableValue() - throws IllegalAccessException - { - ReflectionUtils.setVariableValueInObject( testClass, "mySettableString", "mySetString" ); - - assertEquals("mySetString", (String)ReflectionUtils.getValueIncludingSuperclasses( "mySettableString", testClass ) ); - - - ReflectionUtils.setVariableValueInObject( testClass, "myParentsSettableString", "myParentsSetString" ); - - assertEquals("myParentsSetString", (String)ReflectionUtils.getValueIncludingSuperclasses( "myParentsSettableString", testClass ) ); - } - - - private class ReflectionUtilsTestClass - extends AbstractReflectionUtilsTestClass - - { - private String myString = "woohoo"; - private String mySettableString; - private Map myMap = new HashMap(); - - public ReflectionUtilsTestClass() - { - myMap.put("myKey", "myValue"); - myMap.put( "myOtherKey", "myOtherValue" ); - } - } - - - private class AbstractReflectionUtilsTestClass - { - private String mySuperString = "super-duper"; - private String myParentsSettableString; - } -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/StringInputStreamTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/StringInputStreamTest.java deleted file mode 100644 index 6f31004d9..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/StringInputStreamTest.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.codehaus.plexus.util; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import junit.framework.TestCase; - -/** - * @author Ben Walding - * @version $Id$ - */ -public class StringInputStreamTest extends TestCase -{ - public void testFoo() - { - } -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/StringUtilsTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/StringUtilsTest.java deleted file mode 100644 index cbe91c274..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/StringUtilsTest.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.codehaus.plexus.util; - -import junit.framework.TestCase; - -import java.util.Locale; - -/** - * Test string utils. - * - * @author Brett Porter - * @version $Id$ - */ -public class StringUtilsTest - extends TestCase -{ - public void testCapitalizeFirstLetter() - { - assertEquals( "Id", StringUtils.capitalizeFirstLetter( "id" ) ); - assertEquals( "Id", StringUtils.capitalizeFirstLetter( "Id" ) ); - } - - public void testCapitalizeFirstLetterTurkish() - { - Locale l = Locale.getDefault(); - Locale.setDefault( new Locale( "tr" ) ); - assertEquals( "Id", StringUtils.capitalizeFirstLetter( "id" ) ); - assertEquals( "Id", StringUtils.capitalizeFirstLetter( "Id" ) ); - Locale.setDefault( l ); - } - - public void testLowerCaseFirstLetter() - { - assertEquals( "id", StringUtils.lowercaseFirstLetter( "id" ) ); - assertEquals( "id", StringUtils.lowercaseFirstLetter( "Id" ) ); - } - - public void testLowerCaseFirstLetterTurkish() - { - Locale l = Locale.getDefault(); - Locale.setDefault( new Locale( "tr" ) ); - assertEquals( "id", StringUtils.lowercaseFirstLetter( "id" ) ); - assertEquals( "id", StringUtils.lowercaseFirstLetter( "Id" ) ); - Locale.setDefault( l ); - } - - public void testRemoveAndHump() - { - assertEquals( "Id", StringUtils.removeAndHump( "id", "-" ) ); - assertEquals( "SomeId", StringUtils.removeAndHump( "some-id", "-" ) ); - } - - public void testRemoveAndHumpTurkish() - { - Locale l = Locale.getDefault(); - Locale.setDefault( new Locale( "tr" ) ); - assertEquals( "Id", StringUtils.removeAndHump( "id", "-" ) ); - assertEquals( "SomeId", StringUtils.removeAndHump( "some-id", "-" ) ); - Locale.setDefault( l ); - } - -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/SweeperPoolTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/SweeperPoolTest.java deleted file mode 100644 index 6c99a5393..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/SweeperPoolTest.java +++ /dev/null @@ -1,231 +0,0 @@ -package org.codehaus.plexus.util; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import junit.framework.TestCase; - -import java.util.Vector; - -/** - * Created on 21/06/2003 - * - * @author Bert van Brakel - * @version $Revision$ - */ -public class SweeperPoolTest extends TestCase -{ - /** The pool under test */ - TestObjectPool pool; - /** A bunch of object to pool */ - Object o1; - Object o2; - Object o3; - Object o4; - Object o5; - Object o6; - - /** - * Constructor - * - * - */ - public SweeperPoolTest() - { - super(); - } - - /** - * Constructor - * - * @param arg0 - */ - public SweeperPoolTest( String arg0 ) - { - super( arg0 ); - } - - /** - * Test the pool limits it's size, and disposes unneeded objects correctly - * - */ - public void testMaxSize() - { - int sweepInterval = 0; - int initialCapacity = 5; - int maxSize = 2; - int minSize = 1; - int triggerSize = 2; - - pool = - new TestObjectPool( - maxSize, - minSize, - initialCapacity, - sweepInterval, - triggerSize ); - - Object tmp = pool.get(); - assertNull( "Expected object from pool to be null", tmp ); - pool.put( o1 ); - assertEquals( "Expected pool to contain 1 object", 1, pool.getSize() ); - tmp = pool.get(); - assertSame( - "Expected returned pool object to be the same as the one put in", - tmp, - o1 ); - pool.put( o1 ); - pool.put( o2 ); - assertEquals( "Expected pool to contain 2 objects", 2, pool.getSize() ); - pool.put( o3 ); - assertEquals( - "Expected pool to contain only a maximuim of 2 objects.", - 2, - pool.getSize() ); - assertEquals( - "Expected 1 disposed pool object", - 1, - pool.testGetDisposedObjects().size() ); - tmp = pool.testGetDisposedObjects().iterator().next(); - - tmp = pool.get(); - assertEquals( - "Expected pool size to be 1 after removing one object", - 1, - pool.getSize() ); - Object tmp2 = pool.get(); - assertEquals( - "Expected pool size to be 0 after removing 2 objects", - 0, - pool.getSize() ); - assertNotSame( "Expected returned objects to be differnet", tmp, tmp2 ); - - } - - public void testSweepAndTrim1() - { - //test trigger - int sweepInterval = 1; - int initialCapacity = 5; - int maxSize = 5; - int minSize = 1; - int triggerSize = 2; - - pool = - new TestObjectPool( - maxSize, - minSize, - initialCapacity, - sweepInterval, - triggerSize ); - pool.put( o1 ); - pool.put( o2 ); - pool.put( o3 ); - pool.put( o4 ); - //give the seeper some time to run - synchronized ( this ) - { - try - { - wait( 2 * 1000 ); - } - catch ( InterruptedException e ) - { - fail( - "Unexpected exception thrown. e=" - + Tracer.traceToString( e ) ); - } - } - assertEquals( - "Expected pool to only contain 1 object", - 1, - pool.getSize() ); - assertEquals( - "Expected 3 diposed objects", - 3, - pool.testGetDisposedObjects().size() ); - - } - - /** - * @see junit.framework.TestCase#setUp() - */ - protected void setUp() throws Exception - { - - o1 = new Object(); - o2 = new Object(); - o3 = new Object(); - o4 = new Object(); - o5 = new Object(); - o6 = new Object(); - super.setUp(); - } - - /** - * @see junit.framework.TestCase#tearDown() - */ - protected void tearDown() throws Exception - { - pool.dispose(); - pool = null; - super.tearDown(); - - } - - class TestObjectPool extends SweeperPool - { - private Vector disposedObjects = new Vector(); - - public TestObjectPool( - int maxSize, - int minSize, - int intialCapacity, - int sweepInterval, - int triggerSize ) - { - super( maxSize, minSize, intialCapacity, sweepInterval, triggerSize ); - } - - public void reset() - { - disposedObjects.clear(); - } - - /** - * @see nz.co.bonzo.beans.castor.pool.ObjectPool#objectDisposed(java.lang.Object) - */ - public void objectDisposed( Object obj ) - { - disposedObjects.add( obj ); - } - - public Vector testGetDisposedObjects() - { - return disposedObjects; - } - - } - -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/TestThreadManager.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/TestThreadManager.java deleted file mode 100644 index 8b6144034..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/TestThreadManager.java +++ /dev/null @@ -1,207 +0,0 @@ -package org.codehaus.plexus.util; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.util.Collection; -import java.util.Iterator; -import java.util.Vector; -import java.util.logging.Logger; - -/** - * Manages a number of test threads, which notify this manager when they have - * completed. Allows TestCases to easily start and manage multiple test threads. - * - *

    Created on 9/06/2003

    - * - * @author Bert van Brakel - * @version $Revision$ - * - */ -public class TestThreadManager -{ - //~ Instance fields ---------------------------------------------------------------------------- - - /** Test threads which have completed running */ - private Collection runThreads = new Vector(); - /** Test threads still needing to be run, or are currently running*/ - private Collection toRunThreads = new Vector(); - private Logger logger = null; - /** Any test threads which failed */ - private Vector failedThreads = new Vector(); - - /**The object to notify when all the test threads have complleted. Clients use this - * to lock on (wait) while waiting for the tests to complete*/ - private Object notify = null; - - //~ Constructors ------------------------------------------------------------------------------- - - public TestThreadManager( Object notify ) - { - super(); - this.notify = notify; - } - - //~ Methods ------------------------------------------------------------------------------------ - - /** - * @return - */ - public Collection getRunThreads() - { - return runThreads; - } - - public void runTestThreads() - { - failedThreads.clear(); - //use an array as the tests may run very quickly - //and modify the toRunThreads vector and hence - //cause a Concurrent ModificationException on an - //iterator - Object[] threads = toRunThreads.toArray(); - for ( int i = 0; i < threads.length; i++ ) - { - //System.out.println("Starting thread " + i +" ..." ); - ( (AbstractTestThread) threads[i] ).start(); - } - } - - public Collection getFailedTests() - { - return failedThreads; - } - - /** - * Return the object which threads can wait on to be notified - * when all the test threads have completed running - * - * @return - */ - public Object getNotifyObject() - { - return notify; - } - - - public boolean hasFailedThreads() - { - if ( failedThreads.size() == 0 ) - { - return false; - } - else - return true; - } - - /** - * Determine if any threads are still running! - * - * @return DOCUMENT ME! - */ - public boolean isStillRunningThreads() - { - return !toRunThreads.isEmpty(); - } - - /** - * @return - */ - public Collection getToRunThreads() - { - return toRunThreads; - } - - /** - * DOCUMENT ME! - */ - public void clear() - { - toRunThreads.clear(); - runThreads.clear(); - failedThreads.clear(); - } - - /* (non-Javadoc) - * @see java.util.Collection#remove(java.lang.Object) - */ - public synchronized void completed( AbstractTestThread thread ) - { - toRunThreads.remove( thread ); - runThreads.add( thread ); - if ( thread.hasFailed() ) - { - failedThreads.add( thread ); - } - //wakeup thread which is waiting for the threads to complete - //execution - if ( toRunThreads.isEmpty() ) - { - synchronized ( notify ) - { - notify.notify(); - } - } - } - - /** - * Overide this to add your own stuff. Called after - * registerThread(Object) - * - * @param thread DOCUMENT ME! - */ - public void doRegisterThread( AbstractTestThread thread ) - { - } - - public final void registerThread( AbstractTestThread thread ) - { - thread.setThreadRegistry( this ); - if ( toRunThreads.contains( thread ) == false ) - { - toRunThreads.add( thread ); - doRegisterThread( thread ); - } - - } - - /** - * Put all the runThreads back in the que to be run again and - * clear the failedTest collection - */ - public void reset() - { - toRunThreads.clear(); - Iterator iter = runThreads.iterator(); - while ( iter.hasNext() ) - { - AbstractTestThread test = (AbstractTestThread) iter.next(); - test.reset(); - registerThread( test ); - } - - runThreads.clear(); - failedThreads.clear(); - } -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/Tracer.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/Tracer.java deleted file mode 100644 index b55f38872..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/Tracer.java +++ /dev/null @@ -1,65 +0,0 @@ -package org.codehaus.plexus.util; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.io.PrintWriter; -import java.io.StringWriter; - -/** - * Convenience class to handle throwable stacktraces - * - *

    Created on 18/06/2003

    - * - * @author Bert van Brakel - * @version $Revision$ - */ -public class Tracer -{ - - /** - * Constructor - * - * - */ - private Tracer() - { - super(); - } - - /** - * Return the throwable stack trace as a string - * */ - public static String traceToString( Throwable t ) - { - if ( t == null ) - { - return null; - } - StringWriter sw = new StringWriter(); - t.printStackTrace( new PrintWriter( sw ) ); - return sw.toString(); - } - -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/WalkCollector.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/WalkCollector.java deleted file mode 100644 index 108f92cec..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/WalkCollector.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.codehaus.plexus.util; - -import java.io.File; -import java.util.ArrayList; -import java.util.List; - -class WalkCollector - implements DirectoryWalkListener -{ - public List steps; - - public File startingDir; - - public int startCount; - - public int finishCount; - - public int percentageLow; - - public int percentageHigh; - - public WalkCollector() - { - steps = new ArrayList(); - startCount = 0; - finishCount = 0; - percentageLow = 0; - percentageHigh = 0; - } - - public void directoryWalkStarting( File basedir ) - { - debug( "Walk Starting: " + basedir ); - startCount++; - startingDir = basedir; - } - - public void directoryWalkStep( int percentage, File file ) - { - percentageLow = Math.min( percentageLow, percentage ); - percentageHigh = Math.max( percentageHigh, percentage ); - debug( "Walk Step: [" + percentage + "%] " + file ); - steps.add( file ); - } - - public void directoryWalkFinished() - { - debug( "Walk Finished." ); - finishCount++; - } - - public void debug( String message ) - { - System.out.println( message ); - } -} \ No newline at end of file diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/cli/CommandlineTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/cli/CommandlineTest.java deleted file mode 100644 index 729921175..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/cli/CommandlineTest.java +++ /dev/null @@ -1,272 +0,0 @@ -package org.codehaus.plexus.util.cli; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import junit.framework.TestCase; - -import java.io.File; - -import org.codehaus.plexus.util.cli.shell.CmdShell; - -public class CommandlineTest - extends TestCase -{ - private String baseDir; - - /** - * @param testName - */ - public CommandlineTest( final String testName ) - { - super( testName ); - } - - /* - * @see TestCase#setUp() - */ - public void setUp() - throws Exception - { - super.setUp(); - baseDir = System.getProperty( "basedir" ); - assertNotNull( "The system property basedir was not defined.", baseDir ); - } - - public void testCommandlineWithoutArgumentInConstructor() - { - try - { - Commandline cmd = new Commandline(); - cmd.setWorkingDirectory( baseDir ); - cmd.createArgument().setValue( "cd" ); - cmd.createArgument().setValue( "." ); - assertEquals( "cd .", cmd.toString() ); - } - catch ( Exception e ) - { - fail( e.getMessage() ); - } - } - - public void testCommandlineWithArgumentInConstructor() - { - try - { - Commandline cmd = new Commandline( "cd ." ); - cmd.setWorkingDirectory( baseDir ); - assertEquals( "cd .", cmd.toString() ); - } - catch ( Exception e ) - { - fail( e.getMessage() ); - } - } - - public void testExecute() - { - try - { - Commandline cmd = new Commandline(); - cmd.setWorkingDirectory( baseDir ); - cmd.setExecutable( "echo" ); - assertEquals( "echo", cmd.getExecutable() ); - cmd.createArgument().setValue( "Hello" ); - assertEquals( "echo Hello", cmd.toString() ); - cmd.execute(); - } - catch ( Exception e ) - { - fail( e.getMessage() ); - } - } - - public void testSetLine() - { - try - { - Commandline cmd = new Commandline(); - cmd.setWorkingDirectory( baseDir ); - cmd.setExecutable( "echo" ); - cmd.createArgument().setLine( null ); - cmd.createArgument().setLine( "Hello" ); - assertEquals( "echo Hello", cmd.toString() ); - } - catch ( Exception e ) - { - fail( e.getMessage() ); - } - } - - public void testCreateCommandInReverseOrder() - { - try - { - Commandline cmd = new Commandline(); - cmd.setWorkingDirectory( baseDir ); - cmd.createArgument().setValue( "." ); - cmd.createArgument( true ).setValue( "cd" ); - assertEquals( "cd .", cmd.toString() ); - } - catch ( Exception e ) - { - fail( e.getMessage() ); - } - } - - public void testSetFile() - { - try - { - Commandline cmd = new Commandline(); - cmd.setWorkingDirectory( baseDir ); - cmd.createArgument().setValue( "more" ); - File f = new File( "test.txt" ); - cmd.createArgument().setFile( f ); - String fileName = f.getAbsolutePath(); - if ( fileName.indexOf( " " ) >= 0 ) - { - fileName = "\"" + fileName + "\""; - } - assertEquals( "more " + fileName, cmd.toString() ); - } - catch ( Exception e ) - { - fail( e.getMessage() ); - } - } - - public void testQuoteArguments() - { - try - { - String result = Commandline.quoteArgument( "Hello" ); - System.out.println( result ); - assertEquals( "Hello", result ); - result = Commandline.quoteArgument( "Hello World" ); - System.out.println( result ); - assertEquals( "\"Hello World\"", result ); - result = Commandline.quoteArgument( "\"Hello World\"" ); - System.out.println( result ); - assertEquals( "\'\"Hello World\"\'", result ); - } - catch ( Exception e ) - { - fail( e.getMessage() ); - } - try - { - Commandline.quoteArgument( "\"Hello \'World\'\'" ); - fail(); - } - catch ( Exception e ) - { - } - } - - public void testGetShellCommandLineWindows() - throws Exception - { - Commandline cmd = new Commandline(); - cmd.setShell( new CmdShell() ); - cmd.setExecutable( "c:\\Program Files\\xxx" ); - cmd.addArguments( new String[] { "a", "b" } ); - String[] shellCommandline = cmd.getShellCommandline(); - - assertEquals( "Command line size", 4, shellCommandline.length ); - - assertEquals( "cmd.exe", shellCommandline[0] ); - assertEquals( "/X", shellCommandline[1] ); - assertEquals( "/C", shellCommandline[2] ); - String expectedShellCmd = "\"c:" + File.separator + "Program Files" + File.separator + "xxx\" a b"; - expectedShellCmd = "\"" + expectedShellCmd + "\""; - assertEquals( expectedShellCmd, shellCommandline[3] ); - } - - public void testGetShellCommandLineWindowsWithSeveralQuotes() - throws Exception - { - Commandline cmd = new Commandline(); - cmd.setShell( new CmdShell() ); - cmd.setExecutable( "c:\\Program Files\\xxx" ); - cmd.addArguments( new String[] { "c:\\Documents and Settings\\whatever", "b" } ); - String[] shellCommandline = cmd.getShellCommandline(); - - assertEquals( "Command line size", 4, shellCommandline.length ); - - assertEquals( "cmd.exe", shellCommandline[0] ); - assertEquals( "/X", shellCommandline[1] ); - assertEquals( "/C", shellCommandline[2] ); - String expectedShellCmd = "\"c:" + File.separator + "Program Files" + File.separator + "xxx\" \"c:\\Documents and Settings\\whatever\" b"; - expectedShellCmd = "\"" + expectedShellCmd + "\""; - assertEquals( expectedShellCmd, shellCommandline[3] ); - } - - /** - * Test the command line generated for the bash shell - * @throws Exception - */ -// public void testGetShellCommandLineBash() -// throws Exception -// { -// Commandline cmd = new Commandline(); -// cmd.setShell( "/bin/bash" ); -// cmd.setShellArgs( new String[] { "-c" } ); -// cmd.setExecutable( "/bin/echo" ); -// cmd.addArguments( new String[] { "hello world" } ); -// String[] shellCommandline = cmd.getShellCommandline(); -// -// assertEquals( "Command line size", 3, shellCommandline.length ); -// -// assertEquals( "/bin/bash", shellCommandline[0] ); -// assertEquals( "-c", shellCommandline[1] ); -// String expectedShellCmd = File.separator + "bin" + File.separator + "echo \\\"hello world\\\""; -// expectedShellCmd = "\"" + expectedShellCmd + "\""; -// assertEquals( expectedShellCmd, shellCommandline[2] ); -// } - - public void testGetShellCommandLineNonWindows() - throws Exception - { - Commandline cmd = new Commandline(); - cmd.setShell( null ); - cmd.setExecutable( "/usr/bin" ); - cmd.addArguments( new String[] { "a", "b" } ); - String[] shellCommandline = cmd.getShellCommandline(); - - assertEquals( "Command line size", 3, shellCommandline.length ); - - assertEquals( File.separator + "usr" + File.separator + "bin", shellCommandline[0] ); - assertEquals( "a", shellCommandline[1] ); - assertEquals( "b", shellCommandline[2] ); - } - - public void testEnvironment() - throws Exception - { - Commandline cmd = new Commandline(); - cmd.addEnvironment( "name", "value" ); - assertEquals( "name=value", cmd.getEnvironmentVariables()[0] ); - } -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/cli/DefaultConsumerTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/cli/DefaultConsumerTest.java deleted file mode 100644 index 6015879d9..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/cli/DefaultConsumerTest.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.codehaus.plexus.util.cli; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import junit.framework.TestCase; - -public class DefaultConsumerTest extends TestCase -{ - /** - * @param testName - */ - public DefaultConsumerTest( String testName ) - { - super( testName ); - } - - /* - * @see TestCase#setUp() - */ - public void setUp() throws Exception - { - super.setUp(); - } - - public void testConsumeLine() - { - DefaultConsumer cons = new DefaultConsumer(); - cons.consumeLine( "Test DefaultConsumer consumeLine" ); - } - -} \ No newline at end of file diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/cli/EnhancedStringTokenizerTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/cli/EnhancedStringTokenizerTest.java deleted file mode 100644 index fc3965555..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/cli/EnhancedStringTokenizerTest.java +++ /dev/null @@ -1,120 +0,0 @@ -package org.codehaus.plexus.util.cli; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import junit.framework.TestCase; - -public class EnhancedStringTokenizerTest extends TestCase -{ - /** - * @param testName - */ - public EnhancedStringTokenizerTest( final String testName ) - { - super( testName ); - } - - /* - * @see TestCase#setUp() - */ - public void setUp() throws Exception - { - super.setUp(); - } - - public void test1() - { - EnhancedStringTokenizer est = new EnhancedStringTokenizer( "this is a test string" ); - StringBuffer sb = new StringBuffer(); - while ( est.hasMoreTokens() ) - { - sb.append( est.nextToken() ); - sb.append( " " ); - } - assertEquals( "this is a test string ", sb.toString() ); - } - - public void test2() - { - EnhancedStringTokenizer est = new EnhancedStringTokenizer( "1,,,3,,4", "," ); - assertEquals( "Token 1", "1", est.nextToken() ); - assertEquals( "Token 2", "", est.nextToken() ); - assertEquals( "Token 3", "", est.nextToken() ); - assertEquals( "Token 4", "3", est.nextToken() ); - assertEquals( "Token 5", "", est.nextToken() ); - assertEquals( "Token 6", "4", est.nextToken() ); - } - - public void test3() - { - EnhancedStringTokenizer est = new EnhancedStringTokenizer( "1,,,3,,4", ",", true ); - assertEquals( "Token 1", "1", est.nextToken() ); - assertEquals( "Token 2", ",", est.nextToken() ); - assertEquals( "Token 3", "", est.nextToken() ); - assertEquals( "Token 4", ",", est.nextToken() ); - assertEquals( "Token 5", "", est.nextToken() ); - assertEquals( "Token 6", ",", est.nextToken() ); - assertEquals( "Token 7", "3", est.nextToken() ); - assertEquals( "Token 8", ",", est.nextToken() ); - assertEquals( "Token 9", "", est.nextToken() ); - assertEquals( "Token 10", ",", est.nextToken() ); - assertEquals( "Token 11", "4", est.nextToken() ); - } - - public void testMultipleDelim() - { - EnhancedStringTokenizer est = new EnhancedStringTokenizer( "1 2|3|4", " |", true ); - assertEquals( "Token 1", "1", est.nextToken() ); - assertEquals( "Token 2", " ", est.nextToken() ); - assertEquals( "Token 3", "2", est.nextToken() ); - assertEquals( "Token 4", "|", est.nextToken() ); - assertEquals( "Token 5", "3", est.nextToken() ); - assertEquals( "Token 6", "|", est.nextToken() ); - assertEquals( "Token 7", "4", est.nextToken() ); - assertEquals( "est.hasMoreTokens()", false, est.hasMoreTokens() ); - } - - public void testEmptyString() - { - EnhancedStringTokenizer est = new EnhancedStringTokenizer( "" ); - assertEquals( "est.hasMoreTokens()", false, est.hasMoreTokens() ); - try - { - est.nextToken(); - fail(); - } - catch ( Exception e ) - { - } - } - - public void testSimpleString() - { - EnhancedStringTokenizer est = new EnhancedStringTokenizer( "a " ); - assertEquals( "Token 1", "a", est.nextToken() ); - assertEquals( "Token 2", "", est.nextToken() ); - assertEquals( "est.hasMoreTokens()", false, est.hasMoreTokens() ); - } -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/cli/StreamPumperTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/cli/StreamPumperTest.java deleted file mode 100644 index e3b346051..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/cli/StreamPumperTest.java +++ /dev/null @@ -1,181 +0,0 @@ -/******************************************************************************** - * CruiseControl, a Continuous Integration Toolkit - * Copyright (c) 2003, ThoughtWorks, Inc. - * 651 W Washington Ave. Suite 500 - * Chicago, IL 60661 USA - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * + Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * + Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * - * + Neither the name of ThoughtWorks, Inc., CruiseControl, nor the - * names of its contributors may be used to endorse or promote - * products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ********************************************************************************/ -package org.codehaus.plexus.util.cli; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.io.ByteArrayInputStream; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.util.ArrayList; -import java.util.List; - -import junit.framework.TestCase; - -/** - * @author Paul Julius - */ -public class StreamPumperTest extends TestCase -{ - private String lineSeparator; - - /** - * @param testName - */ - public StreamPumperTest( String testName ) - { - super( testName ); - } - - /* - * @see TestCase#setUp() - */ - public void setUp() throws Exception - { - super.setUp(); - lineSeparator = System.getProperty( "line.separator" ); - } - - public void testPumping() - { - String line1 = "line1"; - String line2 = "line2"; - String lines = line1 + "\n" + line2; - ByteArrayInputStream inputStream = - new ByteArrayInputStream( lines.getBytes() ); - - TestConsumer consumer = new TestConsumer(); - StreamPumper pumper = new StreamPumper( inputStream, consumer ); - new Thread( pumper ).run(); - - //Check the consumer to see if it got both lines. - assertTrue( consumer.wasLineConsumed( line1, 1000 ) ); - assertTrue( consumer.wasLineConsumed( line2, 1000 ) ); - } - - public void testPumpingWithPrintWriter() - { - String inputString = "This a test string"; - ByteArrayInputStream bais = new ByteArrayInputStream( inputString.getBytes() ); - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter( sw ); - StreamPumper pumper = new StreamPumper( bais, pw ); - pumper.run(); - pumper.flush(); - System.out.println( "aaa" + sw.toString() ); - assertEquals( "This a test string" + lineSeparator, sw.toString() ); - pumper.close(); - } -} - -/** - * Used by the test to track whether a line actually got consumed or not. - */ -class TestConsumer implements StreamConsumer -{ - - private List lines = new ArrayList(); - - /** - * Checks to see if this consumer consumed a particular line. This method - * will wait up to timeout number of milliseconds for the line to get - * consumed. - * - * @param testLine Line to test for. - * @param timeout Number of milliseconds to wait for the line. - * @return true if the line gets consumed, else false. - */ - public boolean wasLineConsumed( String testLine, long timeout ) - { - - long start = System.currentTimeMillis(); - long trialTime = 0; - - do - { - if ( lines.contains( testLine ) ) - { - return true; - } - - //Sleep a bit. - try - { - Thread.sleep( 10 ); - } - catch ( InterruptedException e ) - { - //ignoring... - } - - //How long have been waiting for the line? - trialTime = System.currentTimeMillis() - start; - - } - while ( trialTime < timeout ); - - //If we got here, then the line wasn't consume within the timeout - return false; - } - - public void consumeLine( String line ) - { - lines.add( line ); - } -} \ No newline at end of file diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/dag/CycleDetectedExceptionTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/dag/CycleDetectedExceptionTest.java deleted file mode 100644 index 2506f7fdb..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/dag/CycleDetectedExceptionTest.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.codehaus.plexus.util.dag; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import junit.framework.TestCase; - -import java.util.ArrayList; -import java.util.List; - -/** - * @author Jason van Zyl - * @version $Id$ - */ -public class CycleDetectedExceptionTest - extends TestCase -{ - public void testException() - { - final List cycle = new ArrayList(); - - cycle.add( "a" ); - - cycle.add( "b" ); - - cycle.add( "a" ); - - final CycleDetectedException e = new CycleDetectedException( "Cycle detected", cycle ); - - assertEquals( "Cycle detected a --> b --> a", e.getMessage() ); - } -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/dag/CycleDetectorTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/dag/CycleDetectorTest.java deleted file mode 100644 index bd26b6ea1..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/dag/CycleDetectorTest.java +++ /dev/null @@ -1,224 +0,0 @@ -package org.codehaus.plexus.util.dag; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import junit.framework.TestCase; - -import java.util.List; - -/** - * @author Michal Maczka - * @version $Id$ - */ -public class CycleDetectorTest extends TestCase -{ - - public void testCycyleDetection() - { - // No cycle - // - // a --> b --->c - // - try - { - final DAG dag1 = new DAG(); - - dag1.addEdge( "a", "b" ); - - dag1.addEdge( "b", "c" ); - - } - catch ( CycleDetectedException e ) - { - - fail( "Cycle should not be detected" ); - } - - // - // a --> b --->c - // ^ | - // | | - // -----------| - - try - { - final DAG dag2 = new DAG(); - - dag2.addEdge( "a", "b" ); - - dag2.addEdge( "b", "c" ); - - dag2.addEdge( "c", "a" ); - - fail( "Cycle should be detected" ); - - } - catch ( CycleDetectedException e ) - { - - final List cycle = e.getCycle(); - - assertNotNull( "Cycle should be not null", cycle ); - - assertTrue( "Cycle contains 'a'", cycle.contains( "a" ) ); - - assertTrue( "Cycle contains 'b'", cycle.contains( "b" ) ); - - assertTrue( "Cycle contains 'c'", cycle.contains( "c" ) ); - - } - - // | --> c - // a --> b - // | | --> d - // ---------> - try - { - final DAG dag3 = new DAG(); - - dag3.addEdge( "a", "b" ); - - dag3.addEdge( "b", "c" ); - - dag3.addEdge( "b", "d" ); - - dag3.addEdge( "a", "d" ); - - } - catch ( CycleDetectedException e ) - { - fail( "Cycle should not be detected" ); - } - - // ------------ - // | | - // V | --> c - // a --> b - // | | --> d - // ---------> - try - { - final DAG dag4 = new DAG(); - - dag4.addEdge( "a", "b" ); - - dag4.addEdge( "b", "c" ); - - dag4.addEdge( "b", "d" ); - - dag4.addEdge( "a", "d" ); - - dag4.addEdge( "c", "a" ); - - fail( "Cycle should be detected" ); - - } - catch ( CycleDetectedException e ) - { - final List cycle = e.getCycle(); - - assertNotNull( "Cycle should be not null", cycle ); - - assertEquals( "Cycle contains 'a'", "a", ( String ) cycle.get( 0 ) ); - - assertEquals( "Cycle contains 'b'", "b", cycle.get( 1 ) ); - - assertEquals( "Cycle contains 'c'", "c", cycle.get( 2 ) ); - - assertEquals( "Cycle contains 'a'", "a", ( String ) cycle.get( 3 ) ); - } - - - // f --> g --> h - // | - // | - // a --> b ---> c --> d - // ^ | - // | V - // ------------ e - - final DAG dag5 = new DAG(); - - try - { - - dag5.addEdge( "a", "b" ); - - dag5.addEdge( "b", "c" ); - - dag5.addEdge( "b", "f" ); - - dag5.addEdge( "f", "g" ); - - dag5.addEdge( "g", "h" ); - - dag5.addEdge( "c", "d" ); - - dag5.addEdge( "d", "e" ); - - dag5.addEdge( "e", "b" ); - - fail( "Cycle should be detected" ); - - } - catch ( CycleDetectedException e ) - { - final List cycle = e.getCycle(); - - assertNotNull( "Cycle should be not null", cycle ); - - assertEquals( "Cycle contains 5 elements", 5, cycle.size() ); - - assertEquals( "Cycle contains 'b'", "b", ( String ) cycle.get( 0 ) ); - - assertEquals( "Cycle contains 'c'", "c", cycle.get( 1 ) ); - - assertEquals( "Cycle contains 'd'", "d", cycle.get( 2 ) ); - - assertEquals( "Cycle contains 'e'", "e", ( String ) cycle.get( 3 ) ); - - assertEquals( "Cycle contains 'b'", "b", ( String ) cycle.get( 4 ) ); - - assertTrue( "Edge exixst", dag5.hasEdge( "a", "b" ) ); - - assertTrue( "Edge exixst", dag5.hasEdge( "b", "c" ) ); - - assertTrue( "Edge exixst", dag5.hasEdge( "b", "f" ) ); - - assertTrue( "Edge exixst", dag5.hasEdge( "f", "g" ) ); - - assertTrue( "Edge exixst", dag5.hasEdge( "g", "h" ) ); - - assertTrue( "Edge exixst", dag5.hasEdge( "c", "d" ) ); - - assertTrue( "Edge exixst", dag5.hasEdge( "d", "e" ) ); - - assertFalse( dag5.hasEdge( "e", "b" ) ); - } - - } - - -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/dag/DAGTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/dag/DAGTest.java deleted file mode 100644 index 8eedeb041..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/dag/DAGTest.java +++ /dev/null @@ -1,197 +0,0 @@ -package org.codehaus.plexus.util.dag; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import junit.framework.TestCase; - -import java.util.ArrayList; -import java.util.List; -import java.util.Set; - -/** - * @author Michal Maczka - * @version $Id$ - */ -public class DAGTest - extends TestCase -{ - public void testDAG() - throws CycleDetectedException - { - final DAG dag = new DAG(); - - dag.addVertex( "a" ); - - assertEquals( 1, dag.getVerticies().size() ); - - assertEquals( "a", dag.getVertex( "a" ).getLabel() ); - - dag.addVertex( "a" ); - - assertEquals( 1, dag.getVerticies().size() ); - - assertEquals( "a", dag.getVertex( "a" ).getLabel() ); - - dag.addVertex( "b" ); - - assertEquals( 2, dag.getVerticies().size() ); - - assertFalse( dag.hasEdge( "a", "b" ) ); - - assertFalse( dag.hasEdge( "b", "a" ) ); - - final Vertex a = dag.getVertex( "a" ); - - final Vertex b = dag.getVertex( "b" ); - - assertEquals( "a", a.getLabel() ); - - assertEquals( "b", b.getLabel() ); - - dag.addEdge( "a", "b" ); - - assertTrue( a.getChildren().contains( b ) ); - - assertTrue( b.getParents().contains( a ) ); - - assertTrue( dag.hasEdge( "a", "b" ) ); - - assertFalse( dag.hasEdge( "b", "a" ) ); - - dag.addEdge( "c", "d" ); - - assertEquals( 4, dag.getVerticies().size() ); - - final Vertex c = dag.getVertex( "c" ); - - final Vertex d = dag.getVertex( "d" ); - - assertEquals( "a", a.getLabel() ); - - assertEquals( "b", b.getLabel() ); - - assertEquals( "c", c.getLabel() ); - - assertEquals( "d", d.getLabel() ); - - assertFalse( dag.hasEdge( "b", "a" ) ); - - assertFalse( dag.hasEdge( "a", "c" ) ); - - assertFalse( dag.hasEdge( "a", "d" ) ); - - assertTrue( dag.hasEdge( "c", "d" ) ); - - assertFalse( dag.hasEdge( "d", "c" ) ); - - final Set labels = dag.getLabels(); - - assertEquals( 4, labels.size() ); - - assertTrue( labels.contains( "a" ) ); - - assertTrue( labels.contains( "b" ) ); - - assertTrue( labels.contains( "c" ) ); - - assertTrue( labels.contains( "d" ) ); - - dag.addEdge( "a", "d" ); - - assertTrue( a.getChildren().contains( d ) ); - - assertTrue( d.getParents().contains( a ) ); - - // "b" and "d" are children of "a" - assertEquals( 2, a.getChildren().size() ); - - assertTrue( a.getChildLabels().contains( "b" ) ); - - assertTrue( a.getChildLabels().contains( "d" ) ); - - // "a" and "c" are parents of "d" - assertEquals( 2, d.getParents().size() ); - - assertTrue( d.getParentLabels().contains( "a" ) ); - - assertTrue( d.getParentLabels().contains( "c" ) ); - } - - - public void testGetPredessors() - throws CycleDetectedException - { - final DAG dag = new DAG(); - - dag.addEdge( "a", "b" ); - - // - // a --> b --> c --> e - // | | | - // | V V - // --> d <-- f --> g - // result d, g, f, c, b, a - - //force order of nodes - - dag.addVertex( "c" ); - - dag.addVertex( "d" ); - - dag.addEdge( "a", "b" ); - - dag.addEdge( "b", "c" ); - - dag.addEdge( "b", "d" ); - - dag.addEdge( "c", "d" ); - - dag.addEdge( "c", "e" ); - - dag.addEdge( "f", "d" ); - - dag.addEdge( "e", "f" ); - - dag.addEdge( "f", "g" ); - - final List actual = dag.getSuccessorLabels( "b" ); - - final List expected = new ArrayList(); - - expected.add( "d" ); - - expected.add( "g" ); - - expected.add( "f" ); - - expected.add( "e" ); - - expected.add( "c" ); - - expected.add( "b" ); - - assertEquals( expected, actual ); - } -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/dag/TopologicalSorterTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/dag/TopologicalSorterTest.java deleted file mode 100644 index e767fe340..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/dag/TopologicalSorterTest.java +++ /dev/null @@ -1,201 +0,0 @@ -package org.codehaus.plexus.util.dag; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import junit.framework.TestCase; - -import java.util.ArrayList; -import java.util.List; - -/** - * @author Michal Maczka - * @version $Id$ - */ -public class TopologicalSorterTest - extends TestCase -{ - public void testDfs() - throws CycleDetectedException - { - // a --> b --->c - // - // result a,b,c - final DAG dag1 = new DAG(); - - dag1.addEdge( "a", "b" ); - - dag1.addEdge( "b", "c" ); - - final List expected1 = new ArrayList(); - - expected1.add( "c" ); - - expected1.add( "b" ); - - expected1.add( "a" ); - - final List actual1 = TopologicalSorter.sort( dag1 ); - - assertEquals( "Order is different then expected", expected1, actual1 ); - - // - // a <-- b <---c - // - // result c, b, a - final DAG dag2 = new DAG(); - - dag2.addVertex( "a" ); - - dag2.addVertex( "b" ); - - dag2.addVertex( "c" ); - - dag2.addEdge( "b", "a" ); - - dag2.addEdge( "c", "b" ); - - final List expected2 = new ArrayList(); - - expected2.add( "a" ); - - expected2.add( "b" ); - - expected2.add( "c" ); - - final List actual2 = TopologicalSorter.sort( dag2 ); - - assertEquals( "Order is different then expected", expected2, actual2 ); - - // - // a --> b --> c --> e - // | | | - // | V V - // --> d <-- f --> g - // result d, g, f, c, b, a - final DAG dag3 = new DAG(); - - // force order of nodes in the graph - dag3.addVertex( "a" ); - - dag3.addVertex( "b" ); - - dag3.addVertex( "c" ); - - dag3.addVertex( "d" ); - - dag3.addVertex( "e" ); - - dag3.addVertex( "f" ); - - dag3.addEdge( "a", "b" ); - - dag3.addEdge( "b", "c" ); - - dag3.addEdge( "b", "d" ); - - dag3.addEdge( "c", "d" ); - - dag3.addEdge( "c", "e" ); - - dag3.addEdge( "f", "d" ); - - dag3.addEdge( "e", "f" ); - - dag3.addEdge( "f", "g" ); - - final List expected3 = new ArrayList(); - - expected3.add( "d" ); - - expected3.add( "g" ); - - expected3.add( "f" ); - - expected3.add( "e" ); - - expected3.add( "c" ); - - expected3.add( "b" ); - - expected3.add( "a" ); - - final List actual3 = TopologicalSorter.sort( dag3 ); - - assertEquals( "Order is different then expected", expected3, actual3 ); - - // - // a --> b --> c --> e - // | | | - // | V V - // --> d <-- f - // result d, f, e, c, b, a - final DAG dag4 = new DAG(); - // force order of nodes in the graph - - dag4.addVertex( "f" ); - - dag4.addVertex( "e" ); - - dag4.addVertex( "d" ); - - dag4.addVertex( "c" ); - - dag4.addVertex( "a" ); - - dag4.addVertex( "b" ); - - dag4.addEdge( "a", "b" ); - - dag4.addEdge( "b", "c" ); - - dag4.addEdge( "b", "d" ); - - dag4.addEdge( "c", "d" ); - - dag4.addEdge( "c", "e" ); - - dag4.addEdge( "f", "d" ); - - dag4.addEdge( "e", "f" ); - - final List expected4 = new ArrayList(); - - expected4.add( "d" ); - - expected4.add( "f" ); - - expected4.add( "e" ); - - expected4.add( "c" ); - - expected4.add( "b" ); - - expected4.add( "a" ); - - final List actual4 = TopologicalSorter.sort( dag4 ); - - assertEquals( "Order is different then expected", expected4, actual4 ); - } -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/dag/VertexTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/dag/VertexTest.java deleted file mode 100644 index d6d9520b3..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/dag/VertexTest.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.codehaus.plexus.util.dag; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import junit.framework.TestCase; - -/** - * @author Michal Maczka - * @version $Id$ - */ -public class VertexTest extends TestCase -{ - public void testVertex() - { - - final Vertex vertex1 = new Vertex( "a" ); - - assertEquals( "a", vertex1.getLabel() ); - - assertEquals( 0, vertex1.getChildren().size() ); - - assertEquals( 0, vertex1.getChildLabels().size() ); - - final Vertex vertex2 = new Vertex( "b" ); - - assertEquals( "b", vertex2.getLabel() ); - - vertex1.addEdgeTo( vertex2 ); - - assertEquals( 1, vertex1.getChildren().size() ); - - assertEquals( 1, vertex1.getChildLabels().size() ); - - assertEquals( vertex2, vertex1.getChildren().get( 0 ) ); - - assertEquals( "b", vertex1.getChildLabels().get( 0 ) ); - - } -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/interpolation/RegexBasedInterpolatorTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/interpolation/RegexBasedInterpolatorTest.java deleted file mode 100644 index 27d4457e3..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/interpolation/RegexBasedInterpolatorTest.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.codehaus.plexus.util.interpolation; - -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -import junit.framework.TestCase; - - -public class RegexBasedInterpolatorTest - extends TestCase -{ - - public String getVar() - { - return "testVar"; - } - - public void testShouldResolveByMy_getVar_Method() - { - RegexBasedInterpolator rbi = new RegexBasedInterpolator(); - rbi.addValueSource( new ObjectBasedValueSource( this ) ); - String result = rbi.interpolate( "this is a ${this.var}", "this" ); - - assertEquals( "this is a testVar", result ); - } - - public void testShouldResolveByContextValue() - { - RegexBasedInterpolator rbi = new RegexBasedInterpolator(); - - Map context = new HashMap(); - context.put( "var", "testVar" ); - - rbi.addValueSource( new MapBasedValueSource( context ) ); - - String result = rbi.interpolate( "this is a ${this.var}", "this" ); - - assertEquals( "this is a testVar", result ); - } - - public void testShouldResolveByEnvar() throws IOException - { - RegexBasedInterpolator rbi = new RegexBasedInterpolator(); - - rbi.addValueSource( new EnvarBasedValueSource() ); - - String result = rbi.interpolate( "this is a ${env.HOME}", "this" ); - - assertFalse( "this is a ${HOME}".equals( result ) ); - } - -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractorTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractorTest.java deleted file mode 100644 index be2a2d3b4..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractorTest.java +++ /dev/null @@ -1,223 +0,0 @@ -package org.codehaus.plexus.util.introspection; - -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import junit.framework.Assert; -import junit.framework.TestCase; - -import java.util.List; -import java.util.ArrayList; - -/** - * @author Jason van Zyl - * @version $Id$ - */ -public class ReflectionValueExtractorTest - extends TestCase -{ - private Project project; - - protected void setUp() - throws Exception - { - super.setUp(); - - project = new Project(); - project.setModelVersion( "4.0.0" ); - project.setGroupId( "org.apache.maven" ); - project.setArtifactId( "maven-core" ); - project.setName( "Maven" ); - project.setVersion( "2.0-SNAPSHOT" ); - project.setScm( new Scm() ); - project.getScm().setConnection( "scm-connection" ); - project.addDependency( new Dependency() ); - project.addDependency( new Dependency() ); - project.setBuild( new Build() ); - } - - public void testValueExtraction() - throws Exception - { - // ---------------------------------------------------------------------- - // Top level values - // ---------------------------------------------------------------------- - - assertEquals( "4.0.0", ReflectionValueExtractor.evaluate( "project.modelVersion", project ) ); - - assertEquals( "org.apache.maven", ReflectionValueExtractor.evaluate( "project.groupId", project ) ); - - assertEquals( "maven-core", ReflectionValueExtractor.evaluate( "project.artifactId", project ) ); - - assertEquals( "Maven", ReflectionValueExtractor.evaluate( "project.name", project ) ); - - assertEquals( "2.0-SNAPSHOT", ReflectionValueExtractor.evaluate( "project.version", project ) ); - - // ---------------------------------------------------------------------- - // SCM - // ---------------------------------------------------------------------- - - assertEquals( "scm-connection", ReflectionValueExtractor.evaluate( "project.scm.connection", project ) ); - - // ---------------------------------------------------------------------- - // Dependencies - // ---------------------------------------------------------------------- - - List dependencies = (List) ReflectionValueExtractor.evaluate( "project.dependencies", project ); - - Assert.assertNotNull( dependencies ); - - Assert.assertEquals( 2, dependencies.size() ); - - // ---------------------------------------------------------------------- - // Build - // ---------------------------------------------------------------------- - - Build build = (Build) ReflectionValueExtractor.evaluate( "project.build", project ); - - Assert.assertNotNull( build ); - } - - public void testValueExtractorWithAInvalidExpression() - throws Exception - { - Assert.assertNull( ReflectionValueExtractor.evaluate( "project.foo", project ) ); - } - - public static class Project - { - private String modelVersion; - - private String groupId; - - private Scm scm; - - private List dependencies = new ArrayList(); - - private Build build; - - private String artifactId; - - private String name; - - private String version; - - public void setModelVersion( String modelVersion ) - { - this.modelVersion = modelVersion; - } - - public void setGroupId( String groupId ) - { - this.groupId = groupId; - } - - public void setScm( Scm scm ) - { - this.scm = scm; - } - - public void addDependency( Dependency dependency ) - { - this.dependencies.add( dependency ); - } - - public void setBuild( Build build ) - { - this.build = build; - } - - public void setArtifactId( String artifactId ) - { - this.artifactId = artifactId; - } - - public void setName( String name ) - { - this.name = name; - } - - public void setVersion( String version ) - { - this.version = version; - } - - public Scm getScm() - { - return scm; - } - - public String getModelVersion() - { - return modelVersion; - } - - public String getGroupId() - { - return groupId; - } - - public List getDependencies() - { - return dependencies; - } - - public Build getBuild() - { - return build; - } - - public String getArtifactId() - { - return artifactId; - } - - public String getName() - { - return name; - } - - public String getVersion() - { - return version; - } - } - - public static class Build - { - - } - - public static class Dependency - { - - } - - public static class Scm - { - private String connection; - - public void setConnection( String connection ) - { - this.connection = connection; - } - - public String getConnection() - { - return connection; - } - } -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomBuilderTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomBuilderTest.java deleted file mode 100644 index c4641e891..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomBuilderTest.java +++ /dev/null @@ -1,233 +0,0 @@ -package org.codehaus.plexus.util.xml; - -import junit.framework.TestCase; -import org.codehaus.plexus.util.xml.pull.MXParser; -import org.codehaus.plexus.util.xml.pull.XmlPullParser; -import org.codehaus.plexus.util.xml.pull.XmlPullParserException; - -import java.io.IOException; -import java.io.StringReader; -import java.io.StringWriter; - -/** - * Test the Xpp3DomBuilder. - * - * @author Brett Porter - * @version $Id$ - */ -public class Xpp3DomBuilderTest - extends TestCase -{ - - private static final String LS = System.getProperty("line.separator"); - - public void testBuildFromReader() - throws Exception - { - String domString = createDomString(); - - Xpp3Dom dom = Xpp3DomBuilder.build( new StringReader( domString ) ); - - Xpp3Dom expectedDom = createExpectedDom(); - - assertEquals( "check DOMs match", expectedDom, dom ); - } - - public void testBuildTrimming() - throws Exception - { - String domString = createDomString(); - - Xpp3Dom dom = Xpp3DomBuilder.build( new StringReader( domString ), true ); - - assertEquals( "test with trimming on", "element1", dom.getChild( "el1" ).getValue() ); - - dom = Xpp3DomBuilder.build( new StringReader( domString ), false ); - - assertEquals( "test with trimming off", " element1\n ", dom.getChild( "el1" ).getValue() ); - } - - public void testBuildFromXpp3Dom() - throws Exception - { - Xpp3Dom expectedDom = createExpectedDom(); - Xpp3Dom dom = null; - - XmlPullParser parser = new MXParser(); - - String domString = "" + createDomString() + ""; - parser.setInput( new StringReader( domString ) ); - - int eventType = parser.getEventType(); - - boolean configurationClosed = false; - boolean newRootClosed = false; - boolean rootClosed = false; - - while ( eventType != XmlPullParser.END_DOCUMENT ) - { - if ( eventType == XmlPullParser.START_TAG ) - { - String rawName = parser.getName(); - - if ( rawName.equals( "root" ) ) - { - dom = Xpp3DomBuilder.build( parser ); - } - } - else if ( eventType == XmlPullParser.END_TAG ) - { - String rawName = parser.getName(); - - if ( rawName.equals( "configuration" ) ) - { - configurationClosed = true; - } - else if ( rawName.equals( "newRoot" ) ) - { - newRootClosed = true; - } - else if ( rawName.equals( "root" ) ) - { - rootClosed = true; - } - } - eventType = parser.next(); - } - - assertEquals( "Check DOM matches", expectedDom, dom ); - assertFalse( "Check closing root was consumed", rootClosed ); - assertTrue( "Check continued to parse configuration", configurationClosed ); - assertTrue( "Check continued to parse newRoot", newRootClosed ); - } - - /** - * Test we get an error from the parser, and don't hit the IllegalStateException. - */ - public void testUnclosedXml() - { - String domString = "" + createDomString(); - try - { - Xpp3DomBuilder.build( new StringReader( domString ) ); - } - catch ( XmlPullParserException expected ) - { - // correct - assertTrue( true ); - } - catch ( IOException expected ) - { - // this will do too - assertTrue( true ); - } - } - - public void testEscapingInContent() - throws IOException, XmlPullParserException - { - Xpp3Dom dom = Xpp3DomBuilder.build( new StringReader( getEncodedString() ) ); - - assertEquals( "Check content value", "\"text\"", dom.getChild( "el" ).getValue() ); - assertEquals( "Check content value", "\"text\"", dom.getChild( "ela" ).getValue() ); - assertEquals( "Check content value", "\"text\"", dom.getChild( "elb" ).getValue() ); - - StringWriter w = new StringWriter(); - Xpp3DomWriter.write( w, dom ); - assertEquals( "Compare stringified DOMs", getExpectedString(), w.toString() ); - } - - public void testEscapingInAttributes() - throws IOException, XmlPullParserException - { - String s = getAttributeEncodedString(); - Xpp3Dom dom = Xpp3DomBuilder.build( new StringReader( s ) ); - - assertEquals( "Check attribute value", "", dom.getChild( "el" ).getAttribute( "att" ) ); - - StringWriter w = new StringWriter(); - Xpp3DomWriter.write( w, dom ); - String newString = w.toString(); - assertEquals( "Compare stringified DOMs", newString, s ); - } - - private static String getAttributeEncodedString() - { - StringBuffer domString = new StringBuffer(); - domString.append( "" ); - domString.append( LS ); - domString.append( " bar" ); - domString.append( LS ); - domString.append( "" ); - - return domString.toString(); - } - - private static String getEncodedString() - { - StringBuffer domString = new StringBuffer(); - domString.append( "\n" ); - domString.append( " \"text\"\n" ); - domString.append( " \"text\"]]>\n" ); - domString.append( " <b>"text"</b>\n" ); - domString.append( "" ); - - return domString.toString(); - } - - private static String getExpectedString() - { - StringBuffer domString = new StringBuffer(); - domString.append( "" ); - domString.append( LS ); - domString.append( " "text"" ); - domString.append( LS ); - domString.append( " <b>"text"</b>" ); - domString.append( LS ); - domString.append( " <b>"text"</b>" ); - domString.append( LS ); - domString.append( "" ); - - return domString.toString(); - } - - // - // HELPER METHODS - // - - private static String createDomString() - { - StringBuffer buf = new StringBuffer(); - buf.append( "\n" ); - buf.append( " element1\n \n" ); - buf.append( " \n" ); - buf.append( " element3\n" ); - buf.append( " \n" ); - buf.append( " \n" ); - buf.append( " \n" ); - buf.append( "\n" ); - - return buf.toString(); - } - - private static Xpp3Dom createExpectedDom() - { - Xpp3Dom expectedDom = new Xpp3Dom( "root" ); - Xpp3Dom el1 = new Xpp3Dom( "el1" ); - el1.setValue( "element1" ); - expectedDom.addChild( el1 ); - Xpp3Dom el2 = new Xpp3Dom( "el2" ); - el2.setAttribute( "att2", "attribute2\nnextline" ); - expectedDom.addChild( el2 ); - Xpp3Dom el3 = new Xpp3Dom( "el3" ); - el3.setAttribute( "att3", "attribute3" ); - el3.setValue( "element3" ); - el2.addChild( el3 ); - Xpp3Dom el4 = new Xpp3Dom( "el4" ); - el4.setValue( "" ); - expectedDom.addChild( el4 ); - Xpp3Dom el5 = new Xpp3Dom( "el5" ); - expectedDom.addChild( el5 ); - return expectedDom; - } -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomTest.java deleted file mode 100644 index 64bd57cbe..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomTest.java +++ /dev/null @@ -1,150 +0,0 @@ -package org.codehaus.plexus.util.xml; - -import junit.framework.TestCase; - -public class Xpp3DomTest - extends TestCase -{ - - public void testShouldPerformAppendAtFirstSubElementLevel() - { - // create the dominant DOM - Xpp3Dom t1 = new Xpp3Dom( "top" ); - t1.setAttribute( Xpp3Dom.CHILDREN_COMBINATION_MODE_ATTRIBUTE, Xpp3Dom.CHILDREN_COMBINATION_APPEND ); - - Xpp3Dom t1s1 = new Xpp3Dom( "topsub1" ); - t1s1.setValue( "t1s1Value" ); - - t1.addChild( t1s1 ); - - // create the recessive DOM - Xpp3Dom t2 = new Xpp3Dom( "top" ); - - Xpp3Dom t2s1 = new Xpp3Dom( "topsub1" ); - t2s1.setValue( "t2s1Value" ); - - t2.addChild( t2s1 ); - - // merge and check results. - Xpp3Dom result = Xpp3Dom.mergeXpp3Dom( t1, t2 ); - - assertEquals( 2, result.getChildren( "topsub1" ).length ); - } - - public void testShouldOverrideAppendAndDeepMerge() - { - // create the dominant DOM - Xpp3Dom t1 = new Xpp3Dom( "top" ); - t1.setAttribute( Xpp3Dom.CHILDREN_COMBINATION_MODE_ATTRIBUTE, Xpp3Dom.CHILDREN_COMBINATION_APPEND ); - - Xpp3Dom t1s1 = new Xpp3Dom( "topsub1" ); - t1s1.setValue( "t1s1Value" ); - - t1.addChild( t1s1 ); - - // create the recessive DOM - Xpp3Dom t2 = new Xpp3Dom( "top" ); - - Xpp3Dom t2s1 = new Xpp3Dom( "topsub1" ); - t2s1.setValue( "t2s1Value" ); - - t2.addChild( t2s1 ); - - // merge and check results. - Xpp3Dom result = Xpp3Dom.mergeXpp3Dom( t1, t2, Boolean.TRUE ); - - assertEquals( 1, result.getChildren( "topsub1" ).length ); - } - - public void testShouldPerformSelfOverrideAtTopLevel() - { - // create the dominant DOM - Xpp3Dom t1 = new Xpp3Dom( "top" ); - t1.setAttribute( "attr", "value" ); - - t1.setAttribute( Xpp3Dom.SELF_COMBINATION_MODE_ATTRIBUTE, Xpp3Dom.SELF_COMBINATION_OVERRIDE ); - - // create the recessive DOM - Xpp3Dom t2 = new Xpp3Dom( "top" ); - t2.setAttribute( "attr2", "value2" ); - t2.setValue( "t2Value" ); - - // merge and check results. - Xpp3Dom result = Xpp3Dom.mergeXpp3Dom( t1, t2 ); - - assertEquals( 2, result.getAttributeNames().length ); - assertNull( result.getValue() ); - } - - public void testShouldMergeValuesAtTopLevelByDefault() - { - // create the dominant DOM - Xpp3Dom t1 = new Xpp3Dom( "top" ); - t1.setAttribute( "attr", "value" ); - - // create the recessive DOM - Xpp3Dom t2 = new Xpp3Dom( "top" ); - t2.setAttribute( "attr2", "value2" ); - t2.setValue( "t2Value" ); - - // merge and check results. - Xpp3Dom result = Xpp3Dom.mergeXpp3Dom( t1, t2 ); - - // this is still 2, since we're not using the merge-control attribute. - assertEquals( 2, result.getAttributeNames().length ); - - assertEquals( result.getValue(), t2.getValue() ); - } - - public void testShouldMergeValuesAtTopLevel() - { - // create the dominant DOM - Xpp3Dom t1 = new Xpp3Dom( "top" ); - t1.setAttribute( "attr", "value" ); - - t1.setAttribute( Xpp3Dom.SELF_COMBINATION_MODE_ATTRIBUTE, Xpp3Dom.SELF_COMBINATION_MERGE ); - - // create the recessive DOM - Xpp3Dom t2 = new Xpp3Dom( "top" ); - t2.setAttribute( "attr2", "value2" ); - t2.setValue( "t2Value" ); - - // merge and check results. - Xpp3Dom result = Xpp3Dom.mergeXpp3Dom( t1, t2 ); - - assertEquals( 3, result.getAttributeNames().length ); - assertEquals( result.getValue(), t2.getValue() ); - } - - public void testNullAttributeNameOrValue() - { - Xpp3Dom t1 = new Xpp3Dom( "top" ); - try - { - t1.setAttribute( "attr", null ); - fail( "null attribute values shouldn't be allowed" ); - } - catch ( NullPointerException e ) - { - } - t1.toString(); - try - { - t1.setAttribute( null, "value" ); - fail( "null attribute names shouldn't be allowed" ); - } - catch ( NullPointerException e ) - { - } - t1.toString(); - } - - public void testEquals() - { - Xpp3Dom dom = new Xpp3Dom( "top" ); - - assertEquals( dom, dom ); - assertFalse( dom.equals( null ) ); - assertFalse( dom.equals( new Xpp3Dom( (String) null ) ) ); - } -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomWriterTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomWriterTest.java deleted file mode 100644 index 2055f03f6..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/xml/Xpp3DomWriterTest.java +++ /dev/null @@ -1,73 +0,0 @@ -package org.codehaus.plexus.util.xml; - -import junit.framework.TestCase; - -import java.io.StringWriter; - -/** - * @author Edwin Punzalan - */ -public class Xpp3DomWriterTest - extends TestCase -{ - - private static final String LS = System.getProperty("line.separator"); - - public void testWriter() - { - StringWriter writer = new StringWriter(); - - Xpp3DomWriter.write( writer, createXpp3Dom() ); - - assertEquals( "Check if output matches", createExpectedXML(), writer.toString() ); - } - - private String createExpectedXML() - { - StringBuffer buf = new StringBuffer(); - buf.append( "" ); - buf.append( LS ); - buf.append( " element1" ); - buf.append( LS ); - buf.append( " " ); - buf.append( LS ); - buf.append( " element3" ); - buf.append( LS ); - buf.append( " " ); - buf.append( LS ); - buf.append( " " ); - buf.append( LS ); - buf.append( " " ); - buf.append( LS ); - buf.append( "" ); - - return buf.toString(); - } - - private Xpp3Dom createXpp3Dom() - { - Xpp3Dom dom = new Xpp3Dom( "root" ); - - Xpp3Dom el1 = new Xpp3Dom( "el1" ); - el1.setValue( "element1" ); - dom.addChild( el1 ); - - Xpp3Dom el2 = new Xpp3Dom( "el2" ); - el2.setAttribute( "att2", "attribute2\nnextline" ); - dom.addChild( el2 ); - - Xpp3Dom el3 = new Xpp3Dom( "el3" ); - el3.setAttribute( "att3", "attribute3" ); - el3.setValue( "element3" ); - el2.addChild( el3 ); - - Xpp3Dom el4 = new Xpp3Dom( "el4" ); - el4.setValue( "" ); - dom.addChild( el4 ); - - Xpp3Dom el5 = new Xpp3Dom( "el5" ); - dom.addChild( el5 ); - - return dom; - } -} diff --git a/plexus-utils/src/test/java/org/codehaus/plexus/util/xml/pull/MXParserTest.java b/plexus-utils/src/test/java/org/codehaus/plexus/util/xml/pull/MXParserTest.java deleted file mode 100644 index 4739f0ca7..000000000 --- a/plexus-utils/src/test/java/org/codehaus/plexus/util/xml/pull/MXParserTest.java +++ /dev/null @@ -1,117 +0,0 @@ -package org.codehaus.plexus.util.xml.pull; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import java.io.StringReader; - -import junit.framework.TestCase; - -/** - * @author Trygve Laugstøl - * @version $Id$ - */ -public class MXParserTest - extends TestCase -{ - public void testHexadecimalEntities() - throws Exception - { - MXParser parser = new MXParser(); - - parser.defineEntityReplacementText( "test", "replacement" ); - - String input = "A"; - - parser.setInput( new StringReader( input ) ); - - assertEquals( XmlPullParser.START_TAG, parser.next() ); - - assertEquals( XmlPullParser.TEXT, parser.next() ); - - assertEquals( "A", parser.getText() ); - - assertEquals( XmlPullParser.END_TAG, parser.next() ); - } - - public void testDecimalEntities() - throws Exception - { - MXParser parser = new MXParser(); - - parser.defineEntityReplacementText( "test", "replacement" ); - - String input = "A"; - - parser.setInput( new StringReader( input ) ); - - assertEquals( XmlPullParser.START_TAG, parser.next() ); - - assertEquals( XmlPullParser.TEXT, parser.next() ); - - assertEquals( "A", parser.getText() ); - - assertEquals( XmlPullParser.END_TAG, parser.next() ); - } - - public void testPredefinedEntities() - throws Exception - { - MXParser parser = new MXParser(); - - parser.defineEntityReplacementText( "test", "replacement" ); - - String input = "<>&'""; - - parser.setInput( new StringReader( input ) ); - - assertEquals( XmlPullParser.START_TAG, parser.next() ); - - assertEquals( XmlPullParser.TEXT, parser.next() ); - - assertEquals( "<>&'\"", parser.getText() ); - - assertEquals( XmlPullParser.END_TAG, parser.next() ); - } - - public void testCustomEntities() - throws Exception - { - MXParser parser = new MXParser(); - - String input = "&myentity;"; - - parser.setInput( new StringReader( input ) ); - - parser.defineEntityReplacementText( "myentity", "replacement" ); - - assertEquals( XmlPullParser.START_TAG, parser.next() ); - - assertEquals( XmlPullParser.TEXT, parser.next() ); - - assertEquals( "replacement", parser.getText() ); - - assertEquals( XmlPullParser.END_TAG, parser.next() ); - } -} diff --git a/plexus-utils/src/test/resources/directorywalker/directory1/file1.txt b/plexus-utils/src/test/resources/directorywalker/directory1/file1.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/plexus-utils/src/test/resources/directorywalker/directory2/directory21/file21.txt b/plexus-utils/src/test/resources/directorywalker/directory2/directory21/file21.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/plexus-utils/src/test/resources/directorywalker/directory2/file2.txt b/plexus-utils/src/test/resources/directorywalker/directory2/file2.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/plexus-utils/src/test/resources/directorywalker/file.txt b/plexus-utils/src/test/resources/directorywalker/file.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/plexus-utils/src/test/resources/test.txt b/plexus-utils/src/test/resources/test.txt deleted file mode 100644 index 793aa682b..000000000 --- a/plexus-utils/src/test/resources/test.txt +++ /dev/null @@ -1 +0,0 @@ -This is a test \ No newline at end of file diff --git a/pom.xml b/pom.xml index 6cdad3fe6..e1a01ac33 100644 --- a/pom.xml +++ b/pom.xml @@ -1,107 +1,42 @@ - + + 4.0.0 + org.codehaus.plexus plexus + 25-SNAPSHOT pom + Plexus - 1.0.9-SNAPSHOT - - - - mail - -
    dev@plexus.codehaus.org
    -
    -
    - - irc - - irc.codehaus.org - 6667 - #plexus - - -
    -
    + The Plexus project provides a full software stack for creating and executing software projects. + https://codehaus-plexus.github.io/plexus-pom/ 2001 - - - Plexus User List - http://xircles.codehaus.org/manage_email/user%40plexus.codehaus.org - http://xircles.codehaus.org/manage_email/user%40plexus.codehaus.org - http://archive.plexus.codehaus.org/user - - - Plexus Developer List - http://xircles.codehaus.org/manage_email/dev%40plexus.codehaus.org - http://xircles.codehaus.org/manage_email/dev%40plexus.codehaus.org - http://archive.plexus.codehaus.org/dev - - - Plexus Announce List - http://xircles.codehaus.org/manage_email/announce%40plexus.codehaus.org - http://xircles.codehaus.org/manage_email/announce%40plexus.codehaus.org - http://archive.plexus.codehaus.org/announce - - - Plexus Commit List - http://xircles.codehaus.org/manage_email/scm%40plexus.codehaus.org - http://xircles.codehaus.org/manage_email/scm%40plexus.codehaus.org - http://archive.plexus.codehaus.org/scm - - - - JIRA - http://jira.codehaus.org/browse/PLX - - - - - codehaus.org - Plexus Central Repository - dav:https://dav.codehaus.org/repository/plexus - - - codehaus.org - Plexus Central Development Repository - dav:https://dav.codehaus.org/snapshots.repository/plexus - - - codehaus.org - dav:https://dav.codehaus.org/plexus - - - - - apache-snapshots - Snapshot repository - http://people.apache.org/maven-snapshot-repository - - false - - - - codehaus-snapshots - Codehaus Snapshot Development Repository - http://snapshots.repository.codehaus.org - - false - - - - - - codehaus-snapshots - Codehaus Snapshot Development Repository - http://snapshots.repository.codehaus.org - - false - - - + + Codehaus Plexus + https://codehaus-plexus.github.io/ + + + + Apache-2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + repo + + @@ -116,8 +51,8 @@ kaz Pete Kazmier - - + + Developer @@ -126,7 +61,7 @@ jtaylor James Taylor james@jamestaylor.org - + Developer @@ -144,7 +79,7 @@ kasper Kasper Nielsen apache@kav.dk - + Developer @@ -183,95 +118,831 @@ - Trygve Laugstol trygvis + Trygve Laugstøl trygvis@codehaus.org Developer - Kenney Westerhof kenney + Kenney Westerhof kenney@codehaus.org Developer - Carlos Sanchez carlos + Carlos Sanchez carlos@codehaus.org Developer - Brett Porter brett + Brett Porter brett@codehaus.org Developer - John Casey jdcasey + John Casey jdcasey@codehaus.org Developer + + handyande + Andrew Williams + andy@handyande.co.uk + + Developer + + + + rahul + Rahul Thakur + rahul.thakur.xdev@gmail.com + + Developer + + + + joakime + Joakim Erdfelt + joakim@erdfelt.com + + Developer + + + + olamy + Olivier Lamy + olamy@codehaus.org + + Developer + + + + hboutemy + Hervé Boutemy + hboutemy@apache.org + + Developer + + + + oleg + Oleg Gusakov + olegy@codehaus.org + + Developer + + + + vsiveton + Vincent Siveton + vsiveton@codehaus.org + + Developer + + + + krosenvold + Kristian Rosenvold + krosenvold@apache.org + + Developer + + + + agudian + Andreas Gudian + agudian@apache.org + + Developer + + + + khmarbaise + Karl Heinz Marbaise + khmarbaise@apache.org + + Developer + + + + michael-o + Michael Osipov + 1983-01-06@gmx.net + + Developer + + + + belingueres + Gabriel Belingueres + belingueres@gmail.com + + Developer + + + + kwin + Konrad Windszus + kwin@apache.org + + Developer + + + + sjaranowski + Slawomir Jaranowski + sjaranowski@apache.org + + Developer + + + + slachiewicz + Sylwester Lachiewicz + slachiewicz@apache.org + ASF + + Developer + + + + gnodet + Guillaume Nodet + gnodet@apache.org + ASF + + Developer + + - - - junit - junit - 3.8.1 - test - - + + + + Plexus and MojoHaus Development List + mojohaus-dev+subscribe@googlegroups.com + mojohaus-dev+unsubscribe@googlegroups.com + mojohaus-dev@googlegroups.com + https://groups.google.com/forum/#!forum/mojohaus-dev + + + - scm:svn:http://svn.codehaus.org/plexus/trunk/ - scm:svn:https://svn.codehaus.org/plexus/trunk + scm:git:https://github.com/codehaus-plexus/plexus-pom.git + ${project.scm.connection} + master + https://github.com/codehaus-plexus/plexus-pom/tree/${project.scm.tag}/ - - Codehaus - http://www.codehaus.org/ - - - - plexus-archetypes - plexus-examples - plexus-components - plexus-component-factories - plexus-containers - plexus-logging - plexus-maven-plugin - plexus-tools - plexus-utils - + + + github + https://github.com/codehaus-plexus/plexus-pom/issues + + + + + sonatype-central-portal + Sonatype Central Portal + https://repo.maven.apache.org/maven2 + + + ${plexusDistMgmtSnapshotsId} + ${plexusDistMgmtSnapshotsName} + ${plexusDistMgmtSnapshotsUrl} + + + + github:gh-pages + ${project.scm.developerConnection} + + + + + 8 + 3.6.3 + ${javaVersion} + ${javaVersion} + ${javaVersion} + ${javaVersion} + + none + true + UTF-8 + + sonatype-central-portal + Sonatype Central Snapshots + https://central.sonatype.com/repository/maven-snapshots + + 2025-10-11T11:22:53Z + true + 3.1.0 + 3.15.2 + 2.1.0 + 3.5.4 + 5.14.1 + 0.7.5 + apply + 0.9.0.M4 + true + + + njord:template:release-sca + sonatype-cp + true + automatic + true + false + + + + + + + org.junit + junit-bom + ${junit5Version} + pom + import + + + + + + + + eu.maveniverse.maven.plugins + njord + ${njord.version} + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.8.0 + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.6.0 + + config/maven_checks.xml + + https://raw.githubusercontent.com/codehaus-plexus/plexus-pom/plexus-11/src/main/resources/config/plexus-header.txt + + + + + org.apache.maven.shared + maven-shared-resources + 6 + + + + + org.apache.maven.plugins + maven-clean-plugin + 3.5.0 + + + org.apache.maven.plugins + maven-compiler-plugin + 3.14.1 + + ${maven.compiler.proc} + ${maven.compiler.showDeprecation} + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.9.0 + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.4 + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.6.2 + + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.8 + + true + + + + org.apache.maven.plugins + maven-install-plugin + 3.1.4 + + + org.apache.maven.plugins + maven-jar-plugin + 3.5.0 + + + + true + true + + + + + + org.apache.maven.plugins + maven-invoker-plugin + 3.9.1 + + ${invoker.streamLogsOnFailures} + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.12.0 + + true + en + + true + + + + org.apache.maven.plugins + maven-jxr-plugin + 3.6.0 + + + org.apache.maven.plugins + maven-plugin-plugin + ${mavenPluginToolsVersion} + + + default-descriptor + process-classes + + ./apidocs/ + + + + generate-helpmojo + + helpmojo + + + + + + org.apache.maven.plugins + maven-plugin-report-plugin + ${mavenPluginToolsVersion} + + + org.apache.maven.plugins + maven-pmd-plugin + 3.28.0 + + ${maven.compiler.source} + + rulesets/maven.xml + + + ${project.build.directory}/generated-sources/modello + ${project.build.directory}/generated-sources/plugin + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 3.9.0 + + + org.apache.maven.plugins + maven-release-plugin + 3.3.1 + + deploy + plexus-release + + + + org.apache.maven.plugins + maven-resources-plugin + 3.4.0 + + + org.apache.maven.plugins + maven-scm-publish-plugin + 3.3.0 + + + ${project.scm.developerConnection} + gh-pages + + + + org.apache.maven.plugins + maven-site-plugin + 3.21.0 + + + true + + + + org.apache.maven.plugins + maven-source-plugin + 3.4.0 + + + org.apache.maven.plugins + maven-surefire-plugin + ${mavenSurefireVersion} + + + org.apache.maven.plugins + maven-surefire-report-plugin + ${mavenSurefireVersion} + + + org.apache.maven.plugins + maven-failsafe-plugin + ${mavenSurefireVersion} + + + org.codehaus.mojo + taglist-maven-plugin + 3.2.2 + + + org.eclipse.sisu + sisu-maven-plugin + ${sisuMavenPluginVersion} + + + generate-index + + main-index + test-index + + + + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless-maven-plugin.version} + + + + + + + + javax,java,,\# + + + + PRESERVE + + + false + + true + true + + + + + **/*.md + + + target/** + + + + + true + + + + + spotless-check + + ${spotless.action} + + process-sources + + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + org.codehaus.mojo + extra-enforcer-rules + 1.11.0 + + + + + enforce-maven-and-java-bytecode + + enforce + + + + + ${minimalMavenBuildVersion} + This project requires at least Maven ${minimalMavenBuildVersion} + + + ${maven.compiler.target} + + + ${minimalJavaBuildVersion} + + + + + + + + maven-site-plugin + + + attach-descriptor + + attach-descriptor + + false + + + + - org.apache.maven.wagon - wagon-webdav - 1.0-beta-1 + eu.maveniverse.maven.njord + extension + ${njord.version} + + + org.apache.maven.plugins - maven-release-plugin - - https://svn.codehaus.org/plexus/tags - + maven-project-info-reports-plugin + + + + index + summary + dependency-info + modules + licenses + team + scm + issue-management + mailing-lists + dependency-management + dependencies + dependency-convergence + ci-management + plugin-management + plugins + distribution-management + + + - + + + + + reporting + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + + + org.apache.maven.plugins + maven-surefire-report-plugin + + false + false + + + + org.apache.maven.plugins + maven-pmd-plugin + + true + + + + default + + cpd + pmd + + + + + + org.codehaus.mojo + taglist-maven-plugin + + true + + + + org.apache.maven.plugins + maven-jxr-plugin + + + default + + jxr + test-jxr + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + default + + javadoc + + + + + + org.apache.maven.plugins + maven-artifact-plugin + 3.6.1 + + + + + + plexus-release + + 3.9.0 + + true + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + org.apache.apache.resources + apache-source-release-assembly-descriptor + 1.7 + + + + + source-release-assembly + + single + + package + + true + + source-release + + posix + + + + + + org.apache.maven.plugins + maven-gpg-plugin + + + sign-artifacts + + sign + + + + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + attach-javadocs + + jar + + + + + + + + + + java17+ + + [17,) + + + + + config/maven_checks_nocodestyle.xml + + + + + + + com.diffplug.spotless + spotless-maven-plugin + + + org.apache.maven.plugins + maven-checkstyle-plugin + + ${checkstyle.spotless.config} + + + + + + + format-check + + + env.CI + + + + check + + + + format + + + !env.CI + + + + apply + + +
    diff --git a/src/main/resources/config/plexus-header.txt b/src/main/resources/config/plexus-header.txt new file mode 100644 index 000000000..aa1f0bfa8 --- /dev/null +++ b/src/main/resources/config/plexus-header.txt @@ -0,0 +1,18 @@ +^package +^\s*$ +^/\*\s*$ +^ \* Copyright The Codehaus Foundation\.\s*$ +^ \*\s*$ +^ \* Licensed under the Apache License, Version 2.0 \(the "License"\);\s*$ +^ \* you may not use this file except in compliance with the License\.\s*$ +^ \* You may obtain a copy of the License at\s*$ +^ \*\s*$ +^ \*\s+http://www\.apache\.org/licenses/LICENSE-2\.0\s*$ +^ \*\s*$ +^ \* Unless required by applicable law or agreed to in writing, software\s*$ +^ \* distributed under the License is distributed on an "AS IS" BASIS,\s*$ +^ \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.\s*$ +^ \* See the License for the specific language governing permissions and\s*$ +^ \* limitations under the License\.\s*$ +^ \*/\s*$ +^\s*$ \ No newline at end of file diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md new file mode 100644 index 000000000..d40ba7c63 --- /dev/null +++ b/src/site/markdown/index.md @@ -0,0 +1,23 @@ +# Plexus Parent POM + +Plexus Parent POM defines common [plugins](./plugin-management.html), reporting and release configuration. + +## Preparing the environment for publishing vie the Central Portal + +Release manager should include the following sections in your personal `settings.xml`: + +```xml + + + + sonatype-central-portal + jqhacker + SeCrEt + + + +``` + +Tokens can be obtained from https://central.sonatype.com/account + diff --git a/src/site/resources/images/plexus-logo-trans.png b/src/site/resources/images/plexus-logo-trans.png new file mode 100644 index 000000000..9e7214628 Binary files /dev/null and b/src/site/resources/images/plexus-logo-trans.png differ diff --git a/src/site/site.xml b/src/site/site.xml new file mode 100644 index 000000000..59edeea41 --- /dev/null +++ b/src/site/site.xml @@ -0,0 +1,69 @@ + + + + + + Plexus + + + + org.apache.maven.skins + maven-fluido-skin + ${mavenFluidoSkinVersion} + + + ${project.scm.url} + + + + 18 + https://analytics.apache.org/ + + + + + + + + true + + https://codehaus-plexus.github.io/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +