| java.lang.Object com.sun.jbi.framework.Deployer
Deployer | public class Deployer implements DeployerMBean(Code) | | This class implements the DeployerMBean for a component (BC or SE). This
MBean acts as an agent between the Deployment Service, the Component
Registry, and the component's Service Unit Manager to coordinate the
registration and unregistration of Service Units, the maintenance of the
states of Service Units, and the control of the Service Unit life cycle.
Methods in this class interact directly with the Component Registry and
the component's Service Unit Manager implementation.
Direct calls to the component's Service Unit Manager are protected by a
timeout, so that ill-behaved components cannot hang the system. The
deploy , undeploy , init ,
start , stop , and shutDown methods
are all called under timeout protection.
author: Sun Microsystems, Inc. |
Method Summary | |
public String | deploy(String serviceUnitName, String serviceUnitRootPath) Deploy a Service Unit to the component.
Parameters: serviceUnitName - the unique name of the Service Unit beingdeployed. Parameters: serviceUnitRootPath - the full path to the deployment descriptorfor this Service Unit. throws: javax.jbi.management.DeploymentException - if the Service Unit isnot successfully deployed. | public String[] | getDeployments() Returns a list of the names all Service Units currently deployed to
this component. | public ServiceUnitState | getServiceUnitState(String serviceUnitName) Returns the current state of a Service Unit.
Parameters: serviceUnitName - the unique name of the Service Unit. | public void | init(String serviceUnitName, String serviceUnitRootPath) Initialize a Service Unit. | public boolean | isDeployed(String serviceUnitName) Returns a boolean value indicating whether the specified Service Unit
is currently deployed.
Parameters: serviceUnitName - the unique name of the Service Unit. | void | setServiceUnitManager(ServiceUnitManager suManager) Set the ServiceUnitManager reference for this instance. | public void | shutDown(String serviceUnitName) Shut down a Service Unit. | public void | shutDown(String serviceUnitName, boolean force) Shut down a Service Unit. | public void | start(String serviceUnitName) Start a Service Unit. | public void | stop(String serviceUnitName) Stop a Service Unit. | public String | undeploy(String serviceUnitName, String serviceUnitRootPath) Undeploy a Service Unit from the component.
Parameters: serviceUnitName - the unique name of the Service Unit beingundeployed. Parameters: serviceUnitRootPath - the full path to the deployment descriptorfor this Service Unit. throws: javax.jbi.management.DeploymentException - if the Service Unit isnot successfully undeployed. | public String | undeploy(String serviceUnitName, String serviceUnitRootPath, boolean force) Undeploy a Service Unit from the component.
Parameters: serviceUnitName - the unique name of the Service Unit beingundeployed. Parameters: serviceUnitRootPath - the full path to the deployment descriptorfor this Service Unit. Parameters: force - set to true to force the undeploy regardless of anyconditions. throws: javax.jbi.management.DeploymentException - if the Service Unit isnot successfully undeployed. |
Deployer | Deployer(Component component)(Code) | | Constructor.
Parameters: component - is the instance representing the component with whichthis deployer is associated. |
getDeployments | public String[] getDeployments()(Code) | | Returns a list of the names all Service Units currently deployed to
this component.
An array of Strings containing the names of the Service Units.The array is empty if no Service Units are deployed. |
getServiceUnitState | public ServiceUnitState getServiceUnitState(String serviceUnitName)(Code) | | Returns the current state of a Service Unit.
Parameters: serviceUnitName - the unique name of the Service Unit. the current state of the Service Unit as one of the values inServiceUnitState, or ServiceUnitState.UNKNOWN if the Service Unit isnot found. |
init | public void init(String serviceUnitName, String serviceUnitRootPath) throws javax.jbi.management.DeploymentException(Code) | | Initialize a Service Unit. This is the first phase of a two-phase
start, where the component must prepare to receive service requests
related to the Service Unit.
Parameters: serviceUnitName - the name of the Service Unit being initialized. Parameters: serviceUnitRootPath - the absolute path to the directory, whichhas the extracted service unit contents. throws: javax.jbi.management.DeploymentException - if the Service Unit isnot deployed, or is in an incorrect state, or if the component is notstarted. |
isDeployed | public boolean isDeployed(String serviceUnitName)(Code) | | Returns a boolean value indicating whether the specified Service Unit
is currently deployed.
Parameters: serviceUnitName - the unique name of the Service Unit. true if the Service Unit is deployed, false if not. |
setServiceUnitManager | void setServiceUnitManager(ServiceUnitManager suManager) throws javax.jbi.management.DeploymentException(Code) | | Set the ServiceUnitManager reference for this instance.
Parameters: suManager - the instance of javax.jbi.component.ServiceUnitManagerreturned by the by the component's javax.jbi.component.Component.getServiceUnitManager() method. |
shutDown | public void shutDown(String serviceUnitName, boolean force) throws javax.jbi.management.DeploymentException(Code) | | Shut down a Service Unit. This causes the Service Unit to return to the
state it was in after deploy() and before init() .
Parameters: serviceUnitName - the name of the Service Unit being shut down. Parameters: force - set to true to force the shutdown regardless of state. throws: javax.jbi.management.DeploymentException - if the Service Unitis not deployed, or is in an incorrect state, or if the component isnot started. |
start | public void start(String serviceUnitName) throws javax.jbi.management.DeploymentException(Code) | | Start a Service Unit. This is the second phase of a two-phase start,
where the component can now initiate service requests related to the
Service Unit.
Parameters: serviceUnitName - the name of the Service Unit being started. throws: javax.jbi.management.DeploymentException - if the Service Unitis not deployed, or is in an incorrect state, or if the component isnot started. |
stop | public void stop(String serviceUnitName) throws javax.jbi.management.DeploymentException(Code) | | Stop a Service Unit. This causes the component to cease generating
service requests related to the Service Unit. It returns the Service Unit
to a state equivalent to after init() was called.
Parameters: serviceUnitName - the name of the Service Unit being stopped. throws: javax.jbi.management.DeploymentException - if the Service Unitis not deployed, or is in an incorrect state, or if the component isnot started. |
undeploy | public String undeploy(String serviceUnitName, String serviceUnitRootPath, boolean force) throws javax.jbi.management.DeploymentException(Code) | | Undeploy a Service Unit from the component.
Parameters: serviceUnitName - the unique name of the Service Unit beingundeployed. Parameters: serviceUnitRootPath - the full path to the deployment descriptorfor this Service Unit. Parameters: force - set to true to force the undeploy regardless of anyconditions. throws: javax.jbi.management.DeploymentException - if the Service Unit isnot successfully undeployed. A status message. |
|
|