org.apache.avalon.phoenix.components.deployer
Class DefaultDeployer

java.lang.Object
  |
  +--AbstractLogEnabled
        |
        +--org.apache.avalon.phoenix.components.deployer.DefaultDeployer
All Implemented Interfaces:
Deployer, DeployerMBean

public class DefaultDeployer
extends AbstractLogEnabled
implements Deployer, DeployerMBean

Deploy .sar files into a kernel using this class.

Author:
Peter Donald
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.avalon.phoenix.interfaces.Deployer
ROLE
 
Fields inherited from interface org.apache.avalon.phoenix.interfaces.DeployerMBean
ROLE
 
Constructor Summary
DefaultDeployer()
           
 
Method Summary
 void deploy(java.lang.String name, java.lang.String sarURL)
          Deploy an application from an installation.
 void deploy(java.lang.String name, java.net.URL location)
          Deploy an application from an installation.
 void dispose()
          Dispose the dpeloyer which effectively means undeploying all the currently deployed apps.
 void initialize()
           
 void parameterize(Parameters parameters)
          Retrieve parameter that specifies work directory.
 void redeploy(java.lang.String name)
          Redeploy an application.
 void service(ServiceManager serviceManager)
          Retrieve relevant services needed to deploy.
 void undeploy(java.lang.String name)
          Undeploy an application.
protected  void verify(SarMetaData metaData, java.lang.ClassLoader classLoader)
          Verify that the application conforms to our requirements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDeployer

public DefaultDeployer()
Method Detail

parameterize

public void parameterize(Parameters parameters)
                  throws ParameterException
Retrieve parameter that specifies work directory.

Parameters:
parameters - the parameters to read
Throws:
ParameterException - if invlaid work directory

service

public void service(ServiceManager serviceManager)
             throws ServiceException
Retrieve relevant services needed to deploy.

Parameters:
serviceManager - the ComponentManager
Throws:
ServiceException - if an error occurs

initialize

public void initialize()
                throws java.lang.Exception
java.lang.Exception

dispose

public void dispose()
Dispose the dpeloyer which effectively means undeploying all the currently deployed apps.


redeploy

public void redeploy(java.lang.String name)
              throws DeploymentException
Redeploy an application.

Specified by:
redeploy in interface DeployerMBean
Parameters:
name - the name of deployment
Throws:
DeploymentException - if an error occurs
See Also:
DeployerMBean.deploy(String,String), DeployerMBean.deploy(String,URL), DeployerMBean.undeploy(String)

undeploy

public void undeploy(java.lang.String name)
              throws DeploymentException
Undeploy an application.

Specified by:
undeploy in interface Deployer
Parameters:
name - the name of deployment
Throws:
DeploymentException - if an error occurs

deploy

public void deploy(java.lang.String name,
                   java.lang.String sarURL)
            throws DeploymentException
Deploy an application from an installation.

Specified by:
deploy in interface DeployerMBean
Parameters:
name - the name of application
sarURL - the location to deploy from represented as String
Throws:
DeploymentException - if an error occurs
See Also:
DeployerMBean.deploy(String,String), DeployerMBean.undeploy(String), DeployerMBean.redeploy(String)

deploy

public void deploy(java.lang.String name,
                   java.net.URL location)
            throws DeploymentException
Deploy an application from an installation.

Specified by:
deploy in interface Deployer
Parameters:
name - the name of application
location - the location to deploy from
Throws:
DeploymentException - if an error occurs

verify

protected void verify(SarMetaData metaData,
                      java.lang.ClassLoader classLoader)
               throws VerifyException
Verify that the application conforms to our requirements.

Parameters:
metaData - the application metaData
classLoader - the ClassLoader associated with app
Throws:
VerifyException - on error


Copyright © 2001 Apache Jakarta Project. All Rights Reserved.