javax.jbi.management
Interface DeploymentServiceMBean


public interface DeploymentServiceMBean

The deployment service MBean allows administrative tools to manage service assembly deployments. The tasks supported are:

Author:
JSR208 Expert Group

Field Summary
static java.lang.String SHUTDOWN
          The service assembly has been deployed, or shutdown
static java.lang.String STARTED
          The service assembly is started.
static java.lang.String STOPPED
          The service assembly is stopped.
 
Method Summary
 boolean canDeployToComponent(java.lang.String componentName)
          Returns true if the the given component accepts the deployment of service units.
 java.lang.String deploy(java.lang.String serviceAssemblyZipUrl)
          Deploys the given Service Assembly to the JBI environment.
 java.lang.String[] getComponentsForDeployedServiceAssembly(java.lang.String serviceAssemblyName)
          Returns an array of component names, where for each the given assembly contains a service unit for the component.
 java.lang.String[] getDeployedServiceAssemblies()
          Returns a list of Service Assemblies deployed to the JBI environment.
 java.lang.String[] getDeployedServiceAssembliesForComponent(java.lang.String componentName)
          Returns an array of Service Assembly names, where each assembly contains Service Units for the given component.
 java.lang.String[] getDeployedServiceUnitList(java.lang.String componentName)
          Returns an array of service unit names that are currently deployed to the named component.
 java.lang.String getServiceAssemblyDescriptor(java.lang.String serviceAssemblyName)
          Returns the deployment descriptor of the Service Assembly that was deployed to the JBI enviroment, serialized to a String.
 java.lang.String getState(java.lang.String serviceAssemblyName)
          Get the running state of a service assembly.
 boolean isDeployedServiceUnit(java.lang.String componentName, java.lang.String serviceUnitName)
          Queries if the named Service Unit is currently deployed to the named component.
 java.lang.String shutDown(java.lang.String serviceAssemblyName)
          Shut down the service assembly.
 java.lang.String start(java.lang.String serviceAssemblyName)
          Start the service assembly.
 java.lang.String stop(java.lang.String serviceAssemblyName)
          Stop the service assembly.
 java.lang.String undeploy(java.lang.String serviceAssemblyName)
          Undeploys the given Service Assembly from the JBI environment.
 

Field Detail

SHUTDOWN

public static final java.lang.String SHUTDOWN
The service assembly has been deployed, or shutdown

See Also:
Constant Field Values

STOPPED

public static final java.lang.String STOPPED
The service assembly is stopped. This means that the assembly's offered services can accept message exchanges, but it will not send any.

See Also:
Constant Field Values

STARTED

public static final java.lang.String STARTED
The service assembly is started. This means that the assembly's offered services can accept message exchanges, and it can send exchanges to consume services.

See Also:
Constant Field Values
Method Detail

canDeployToComponent

public boolean canDeployToComponent(java.lang.String componentName)
Returns true if the the given component accepts the deployment of service units. This is used by admin tools to determine which components can be named in service assembly deployment descriptors.

Parameters:
componentName - name of the component; must be non-null and non-empty
Returns:
true if the named component accepts deployments; false if the named component does not accept deployments or it does not exist

deploy

public java.lang.String deploy(java.lang.String serviceAssemblyZipUrl)
                        throws java.lang.Exception
Deploys the given Service Assembly to the JBI environment.

Note that the implementation must not automatically start the service assembly after deployment; it must wait for the start(String) method to be invoked by the administrative tool.

Parameters:
serviceAssemblyZipUrl - String containing the location URL of the Service Assembly ZIP file; must be non-null, non-empty, and a legal URL
Returns:
Result/Status of the current deployment; must conform to JBI management result/status XML schema; must be non-null and non-empty
Throws:
java.lang.Exception - if complete deployment fails

undeploy

public java.lang.String undeploy(java.lang.String serviceAssemblyName)
                          throws java.lang.Exception
Undeploys the given Service Assembly from the JBI environment.

Parameters:
serviceAssemblyName - name of the Service Assembly that is to be undeployed; must be non-null and non-empty
Returns:
Result/Status of the current undeployment; must conform to JBI management result/status XML schema; must be non-null and non-empty
Throws:
java.lang.Exception - if compelete undeployment fails

getDeployedServiceUnitList

public java.lang.String[] getDeployedServiceUnitList(java.lang.String componentName)
                                              throws java.lang.Exception
Returns an array of service unit names that are currently deployed to the named component.

Parameters:
componentName - the name of the component to query; must be non-null and non-empty
Returns:
array of service unit names deployed in the named component; must be non-null; may be empty
Throws:
java.lang.Exception - if a processing error occurs

getDeployedServiceAssemblies

public java.lang.String[] getDeployedServiceAssemblies()
                                                throws java.lang.Exception
Returns a list of Service Assemblies deployed to the JBI environment.

Returns:
list of Service Assembly names; must be non-null; may be empty
Throws:
java.lang.Exception - if a processing error occurs

getServiceAssemblyDescriptor

public java.lang.String getServiceAssemblyDescriptor(java.lang.String serviceAssemblyName)
                                              throws java.lang.Exception
Returns the deployment descriptor of the Service Assembly that was deployed to the JBI enviroment, serialized to a String.

Parameters:
serviceAssemblyName - name of the service assembly to be queried; must be non-null and non-empty
Returns:
descriptor of the Assembly Unit; must be non-null
Throws:
java.lang.Exception - if a processing error occurs

getDeployedServiceAssembliesForComponent

public java.lang.String[] getDeployedServiceAssembliesForComponent(java.lang.String componentName)
                                                            throws java.lang.Exception
Returns an array of Service Assembly names, where each assembly contains Service Units for the given component.

Parameters:
componentName - name of the component to query; must be non-null and non-empty
Returns:
array of of Service Assembly names, where each assembly contains a Service Unit for the named component; must be non-null; may be empty
Throws:
java.lang.Exception - if a processing error occurs

getComponentsForDeployedServiceAssembly

public java.lang.String[] getComponentsForDeployedServiceAssembly(java.lang.String serviceAssemblyName)
                                                           throws java.lang.Exception
Returns an array of component names, where for each the given assembly contains a service unit for the component.

Parameters:
serviceAssemblyName - the service assembly to be queried; must be non-null and non-empty
Returns:
array of component names, where for each name the given assembly contains a service unit from the given service assembly; must be non-null; may be empty
Throws:
java.lang.Exception - if a processing error occurs

isDeployedServiceUnit

public boolean isDeployedServiceUnit(java.lang.String componentName,
                                     java.lang.String serviceUnitName)
                              throws java.lang.Exception
Queries if the named Service Unit is currently deployed to the named component.

Parameters:
componentName - name of the component to query; must be non-null and non-empty
serviceUnitName - name of the subject service unit; must be non-null and non-empty
Returns:
true if the named service unit is currently deployed to the named component
Throws:
java.lang.Exception

start

public java.lang.String start(java.lang.String serviceAssemblyName)
                       throws java.lang.Exception
Start the service assembly. This puts the assembly into the STARTED state.

Parameters:
serviceAssemblyName - name of the assembly to be started; must be non-null and non-empty
Returns:
result / status string giving the results of starting (and possibly initializing) each service unit in the assembly; must be non-null and non-empty
Throws:
java.lang.Exception - if there is no such assembly
java.lang.Exception - if the assembly fails to start

stop

public java.lang.String stop(java.lang.String serviceAssemblyName)
                      throws java.lang.Exception
Stop the service assembly. This puts the assembly into the STOPPED state.

Parameters:
serviceAssemblyName - name of the assembly to be stopped; must be non-null and non-empty
Returns:
result / status string giving the results of stopping each service unit in the assembly; must be non-null and non-empty
Throws:
java.lang.Exception - if there is no such assembly
java.lang.Exception - if the assembly fails to stop

shutDown

public java.lang.String shutDown(java.lang.String serviceAssemblyName)
                          throws java.lang.Exception
Shut down the service assembly. This puts the assembly back into the SHUTDOWN state.

Parameters:
serviceAssemblyName - name of the assembly to be shut down; must be non-null and non-empty
Returns:
result / status string giving the results of shutting down each service unit in the assembly; must be non-null and non-empty
Throws:
java.lang.Exception - if there is no such assembly
java.lang.Exception - if the assembly fails to shut down

getState

public java.lang.String getState(java.lang.String serviceAssemblyName)
                          throws java.lang.Exception
Get the running state of a service assembly. The possible result values of this query are enumerated by the following set of constants: SHUTDOWN, STOPPED, STARTED.

Parameters:
serviceAssemblyName - name of the assembly to query; must be non-null and non-empty
Returns:
the state of the service assembly, as a string value; must be one of the enumerated string values provided by this interface: SHUTDOWN, STOPPED, or STARTED
Throws:
java.lang.Exception - if there is no such assembly

Built 06/07/2005 11:16 AM on acer (SunOS 5.9)

Copyright (c) 2004-2005 Sun Microsystems Inc., All Rights Reserved.