org.ow2.petals.jmx
Class DeploymentServiceClient

java.lang.Object
  extended by org.ow2.petals.jmx.AbstractServiceClient
      extended by org.ow2.petals.jmx.DeploymentServiceClient

public final class DeploymentServiceClient
extends AbstractServiceClient

Client API of the JMX deployment service.

Author:
cdeneux - Capgemini Sud

Nested Class Summary
static class DeploymentServiceClient.State
          Service assembly states
 
Field Summary
 
Fields inherited from class org.ow2.petals.jmx.AbstractServiceClient
JMX_FIELD_NAME, JMX_FIELD_TYPE, JMX_SERVICE_TYPE, mbeanName, mBeanServerConnection, petalsDomain
 
Constructor Summary
DeploymentServiceClient(java.lang.String petalsDomain, javax.management.MBeanServerConnection mBeanServerConnection)
          Creates a new instance of DeploymentServiceClient
 
Method Summary
 java.lang.String deploy(java.net.URL packageURL)
          Deploy a service assembly.
 java.lang.Boolean forceUndeploy(java.lang.String serviceAssemblyName)
          Force the undeployment of the service assembly.
 java.lang.String[] getDeployedServiceAssemblies()
          Get deployed service assemblies.
 java.lang.String[] getDeployedServiceAssembliesForComponent(java.lang.String componentName)
          Get service assemblies containing service units running on a component.
 java.lang.String getServiceAssemblyDescriptor(java.lang.String serviceAssemblyName)
          Get the service assembly descriptor.
 java.lang.String[] getServiceUnitForServiceAssembly(java.lang.String serviceAssemblyName)
          Get Service Unit embedded in the given Service Assembly.
 java.lang.String getState(java.lang.String serviceAssemblyName)
          Get the current state of a JBI service assembly.
 boolean isServiceAssemblyDeployed(java.lang.String serviceAssembly)
          Check if a service assembly is deployed.
 java.lang.String shutdown(java.lang.String serviceAssemblyName)
          Shutdown a service assembly.
 java.lang.String[] shutdownAllServiceAssemblies()
          Shutdown all service assemblies.
 java.lang.String start(java.lang.String serviceAssemblyName)
          Start a service assembly.
 java.lang.String[] startAllServiceAssemblies()
          Start all service assemblies.
 java.lang.String stop(java.lang.String serviceAssemblyName)
          Stop a service assembly.
 java.lang.String[] stopAllServiceAssemblies()
          Stop all service assemblies.
 java.lang.String undeploy(java.lang.String serviceAssemblyName)
          Undeploy a service assembly.
 java.lang.String[] undeployAllServiceAssemblies(boolean force)
          Undeploy all service assemblies.
 
Methods inherited from class org.ow2.petals.jmx.AbstractServiceClient
getAttribute, getAttribute, performAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeploymentServiceClient

public DeploymentServiceClient(java.lang.String petalsDomain,
                               javax.management.MBeanServerConnection mBeanServerConnection)
                        throws DeploymentServiceDoesNotExistException,
                               DeploymentServiceErrorException
Creates a new instance of DeploymentServiceClient

Parameters:
petalsDomain -
mBeanServerConnection -
Throws:
DeploymentServiceDoesNotExistException
DeploymentServiceErrorException
Method Detail

deploy

public java.lang.String deploy(java.net.URL packageURL)
                        throws DeploymentServiceErrorException
Deploy a service assembly.

Parameters:
packageURL -
Throws:
PerformActionErrorException
DeploymentServiceErrorException
See Also:
DeploymentServiceMBean.deploy(String)

forceUndeploy

public java.lang.Boolean forceUndeploy(java.lang.String serviceAssemblyName)
                                throws DeploymentServiceErrorException
Force the undeployment of the service assembly.

Parameters:
serviceAssemblyName - service assembly identifier
Throws:
PerformActionErrorException
DeploymentServiceErrorException
See Also:
DeploymentServiceMBean.undeploy(String)

getDeployedServiceAssemblies

public java.lang.String[] getDeployedServiceAssemblies()
                                                throws DeploymentServiceErrorException
Get deployed service assemblies.

Returns:
an array of String containing all the deployed SA.
Throws:
DeploymentServiceErrorException

getDeployedServiceAssembliesForComponent

public java.lang.String[] getDeployedServiceAssembliesForComponent(java.lang.String componentName)
                                                            throws DeploymentServiceErrorException
Get service assemblies containing service units running on a component.

Parameters:
componentName -
Returns:
an array of String containing all the deployed SA for the given component.
Throws:
PerformActionErrorException
DeploymentServiceErrorException

getServiceAssemblyDescriptor

public java.lang.String getServiceAssemblyDescriptor(java.lang.String serviceAssemblyName)
                                              throws DeploymentServiceErrorException
Get the service assembly descriptor.

Returns:
the descriptor in String form
Throws:
DeploymentServiceErrorException

getServiceUnitForServiceAssembly

public java.lang.String[] getServiceUnitForServiceAssembly(java.lang.String serviceAssemblyName)
                                                    throws DeploymentServiceErrorException
Get Service Unit embedded in the given Service Assembly.

Parameters:
serviceAssemblyName -
Returns:
an array of SU names
Throws:
DeploymentServiceErrorException

getState

public java.lang.String getState(java.lang.String serviceAssemblyName)
                          throws DeploymentServiceErrorException
Get the current state of a JBI service assembly.

Parameters:
serviceAssemblyName - Service assembly identifier.
Returns:
the current state of the JBI service assembly.
Throws:
PerformActionErrorException
DeploymentServiceErrorException

isServiceAssemblyDeployed

public boolean isServiceAssemblyDeployed(java.lang.String serviceAssembly)
                                  throws DeploymentServiceErrorException
Check if a service assembly is deployed.

Parameters:
serviceAssembly - The service assembly identifier
Returns:
true if the service assembly; false if the service assembly is not deploy or if serviceAssembly is null.
Throws:
DeploymentServiceErrorException

shutdown

public java.lang.String shutdown(java.lang.String serviceAssemblyName)
                          throws DeploymentServiceErrorException
Shutdown a service assembly.

Parameters:
serviceAssemblyName - service assembly identifier
Throws:
PerformActionErrorException
DeploymentServiceErrorException
See Also:
DeploymentServiceMBean.shutDown(String)

shutdownAllServiceAssemblies

public java.lang.String[] shutdownAllServiceAssemblies()
                                                throws DeploymentServiceErrorException
Shutdown all service assemblies.

Throws:
PerformActionErrorException
DeploymentServiceErrorException

start

public java.lang.String start(java.lang.String serviceAssemblyName)
                       throws DeploymentServiceErrorException
Start a service assembly.

Parameters:
serviceAssemblyName - service assembly identifier
Throws:
PerformActionErrorException
DeploymentServiceErrorException
See Also:
DeploymentServiceMBean.start(String)

startAllServiceAssemblies

public java.lang.String[] startAllServiceAssemblies()
                                             throws DeploymentServiceErrorException
Start all service assemblies.

Throws:
PerformActionErrorException
DeploymentServiceErrorException

stop

public java.lang.String stop(java.lang.String serviceAssemblyName)
                      throws DeploymentServiceErrorException
Stop a service assembly.

Parameters:
serviceAssemblyName - service assembly identifier
Throws:
PerformActionErrorException
DeploymentServiceErrorException
See Also:
DeploymentServiceMBean.stop(String)

stopAllServiceAssemblies

public java.lang.String[] stopAllServiceAssemblies()
                                            throws DeploymentServiceErrorException
Stop all service assemblies.

Throws:
PerformActionErrorException
DeploymentServiceErrorException

undeploy

public java.lang.String undeploy(java.lang.String serviceAssemblyName)
                          throws DeploymentServiceErrorException
Undeploy a service assembly.

Parameters:
serviceAssemblyName - service assembly identifier
Throws:
DeploymentServiceErrorException
See Also:
DeploymentServiceMBean.undeploy(String)

undeployAllServiceAssemblies

public java.lang.String[] undeployAllServiceAssemblies(boolean force)
                                                throws DeploymentServiceErrorException
Undeploy all service assemblies.

Throws:
PerformActionErrorException
DeploymentServiceErrorException


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.