org.codehaus.plexus.application.deploy
Class DefaultApplicationDeployer

java.lang.Object
  extended byorg.codehaus.plexus.logging.AbstractLogEnabled
      extended byorg.codehaus.plexus.application.deploy.DefaultApplicationDeployer
All Implemented Interfaces:
ApplicationDeployer, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable, org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, org.codehaus.plexus.logging.LogEnabled

public class DefaultApplicationDeployer
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements ApplicationDeployer, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable

Since:
Mar 19, 2004
Author:
Dan Diephouse

Field Summary
private  java.util.List applicationListeners
           
private  java.lang.String applicationsDirectory
           
private  java.util.Properties contextValues
           
private  java.util.Map deployments
           
private  org.codehaus.plexus.DefaultPlexusContainer parentPlexus
           
 
Fields inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
 
Fields inherited from interface org.codehaus.plexus.application.deploy.ApplicationDeployer
ROLE
 
Constructor Summary
DefaultApplicationDeployer()
           
 
Method Summary
 void addApplicationListener(ApplicationListener listener)
           
 void contextualize(org.codehaus.plexus.context.Context context)
           
private  DefaultDeployEvent createDeployEvent(ApplicationRuntimeProfile runtimeProfile)
           
 void deploy(java.lang.String name, java.lang.String url)
           
 void deploy(java.lang.String name, java.net.URL url)
           
protected  void deployApplicationDirectory(java.lang.String name, java.io.File location)
           
private  void deployJar(java.io.File file, java.lang.String directory)
           
 void dispose()
           
 ApplicationRuntimeProfile getApplicationRuntimeProfile(java.lang.String applicationName)
           
 void initialize()
           
 void redeploy(java.lang.String name, java.lang.String url)
           
 void removeApplicationListener(ApplicationListener listener)
           
 void undeploy(java.lang.String name)
           
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

deployments

private java.util.Map deployments

parentPlexus

private org.codehaus.plexus.DefaultPlexusContainer parentPlexus

applicationListeners

private java.util.List applicationListeners

applicationsDirectory

private java.lang.String applicationsDirectory

contextValues

private java.util.Properties contextValues
Constructor Detail

DefaultApplicationDeployer

public DefaultApplicationDeployer()
Method Detail

deploy

public void deploy(java.lang.String name,
                   java.lang.String url)
            throws ApplicationServerException
Specified by:
deploy in interface ApplicationDeployer
Throws:
ApplicationServerException

deploy

public void deploy(java.lang.String name,
                   java.net.URL url)
            throws ApplicationServerException
Throws:
ApplicationServerException

deployJar

private void deployJar(java.io.File file,
                       java.lang.String directory)
                throws java.io.IOException,
                       ApplicationServerException,
                       org.codehaus.plexus.util.xml.pull.XmlPullParserException
Throws:
java.io.IOException
ApplicationServerException
org.codehaus.plexus.util.xml.pull.XmlPullParserException

deployApplicationDirectory

protected void deployApplicationDirectory(java.lang.String name,
                                          java.io.File location)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

redeploy

public void redeploy(java.lang.String name,
                     java.lang.String url)
              throws ApplicationServerException
Specified by:
redeploy in interface ApplicationDeployer
Throws:
ApplicationServerException

undeploy

public void undeploy(java.lang.String name)
              throws ApplicationServerException
Specified by:
undeploy in interface ApplicationDeployer
Throws:
ApplicationServerException

createDeployEvent

private DefaultDeployEvent createDeployEvent(ApplicationRuntimeProfile runtimeProfile)

getApplicationRuntimeProfile

public ApplicationRuntimeProfile getApplicationRuntimeProfile(java.lang.String applicationName)
                                                       throws ApplicationServerException
Specified by:
getApplicationRuntimeProfile in interface ApplicationDeployer
Throws:
ApplicationServerException

addApplicationListener

public void addApplicationListener(ApplicationListener listener)
Specified by:
addApplicationListener in interface ApplicationDeployer

removeApplicationListener

public void removeApplicationListener(ApplicationListener listener)
Specified by:
removeApplicationListener in interface ApplicationDeployer

contextualize

public void contextualize(org.codehaus.plexus.context.Context context)
                   throws org.codehaus.plexus.context.ContextException
Specified by:
contextualize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Throws:
org.codehaus.plexus.context.ContextException

initialize

public void initialize()
                throws org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
Specified by:
initialize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
Throws:
org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException

dispose

public void dispose()
Specified by:
dispose in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable