|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ServiceUnitManager
This interface defines component-supplied methods for managing service
unit deployments, and is implemented by the component. The JBI
implementation queries the component for the implementation of this
interface using the Component.getServiceUnitManager()
method.
Method Summary | |
---|---|
String |
deploy(String serviceUnitName,
String serviceUnitRootPath)
Deploy a Service Unit to the component. |
void |
init(String serviceUnitName,
String serviceUnitRootPath)
Initialize the given deployed service unit. |
void |
shutDown(String serviceUnitName)
Shut down the deployment. |
void |
start(String serviceUnitName)
Start the deployed service unit. |
void |
stop(String serviceUnitName)
Stop the deployed service unit. |
String |
undeploy(String serviceUnitName,
String serviceUnitRootPath)
Undeploy a service unit from the component. |
Method Detail |
---|
String deploy(String serviceUnitName, String serviceUnitRootPath) throws DeploymentException
<component-task-result> <component-name>BC1</component-name> <component-task-result-details xmlns="http://java.sun.com/xml/ns/jbi/management-message"> <task-result-details> <task-id>deploy</task-id> <task-result>SUCCESS</task-result> </task-result-details> </component-task-result-details> </component-task-result>A failed deployment of the service unit must be reported using the
component-task-result
element as well; the
task-result
must be set to FAILED.
serviceUnitName
- name of the service unit being deployed; must be
non-null and non-empty and unique among service units already
deployed to the component.serviceUnitRootPath
- path of the service unit artifact root, in
platform specific format; must be non-null and non-empty.
DeploymentException
- if the deployment operation is
unsuccessful.void init(String serviceUnitName, String serviceUnitRootPath) throws DeploymentException
The serviceUnitRootPath parameter is provided to facilitate restart of the component. This allows simple components to rely entirely on JBI's ability to persist deployment information, avoiding the need for the component to provide its own persistence mechanism.
serviceUnitName
- name of the service unit being initialized; must
be non-null, non-empty, and match the name of a previously
deployed (but not yet undeployed) service unit.serviceUnitRootPath
- path of the service unit artifact root, in
platform specific format; must be non-null and non-empty.
DeploymentException
- if the service unit is not deployed, or
if it is in an incorrect state.void start(String serviceUnitName) throws DeploymentException
serviceUnitName
- the name of the service unit being started; must
be non-null, non-empty, and match the name of a previously
deployed (but not yet undeployed) service unit.
DeploymentException
- if the service unit is not deployed, or
if it is in an incorrect state.void stop(String serviceUnitName) throws DeploymentException
init(String, String)
was called.
serviceUnitName
- name of the service unit being stopped; must
be non-null, non-empty, and match the name of a previously
deployed (but not yet undeployed) service unit.
DeploymentException
- if the service unit is not deployed, or
if it is in an incorrect state.void shutDown(String serviceUnitName) throws DeploymentException
deploy(String, String)
, and before
init(String, String)
.
serviceUnitName
- name of the service unit being shut down; must
be non-null, non-empty, and match the name of a previously
deployed (but not yet undeployed) service unit.
DeploymentException
- if the service unit is not deployed, or
if it is in an incorrect state.String undeploy(String serviceUnitName, String serviceUnitRootPath) throws DeploymentException
serviceUnitName
- name of the service unit being undeployed; must
be non-null, non-empty, and match the name of a previously
deployed (but not yet undeployed) service unit.serviceUnitRootPath
- path of the service unit artifact root, in
platform specific format; must be non-null and non-empty.
component-task-result
type from
the schema given in the MBean Status and Result Strings
section of the Management chapter of the JBI
specification; must be non-null and non-empty.
DeploymentException
- if undeployment operation is unsuccessful,
or if the service unit is in an incorrect state.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |