org.ow2.petals.jbi.management.deployment
Class DeploymentServiceImpl

java.lang.Object
  extended by org.ow2.petals.jbi.management.deployment.DeploymentServiceImpl
All Implemented Interfaces:
javax.jbi.management.DeploymentServiceMBean, DeploymentService, PetalsLifeCycle

public class DeploymentServiceImpl
extends java.lang.Object
implements DeploymentService

JBI deployment service implementation.

Author:
Olivier Fabre - EBM Websourcing, ddesjardins - eBMWebsourcing, wjoseph - eBMWebsourcing

Field Summary
protected  ContainerService container
          Container :: Container Service
 
Fields inherited from interface javax.jbi.management.DeploymentServiceMBean
SHUTDOWN, STARTED, STOPPED
 
Constructor Summary
DeploymentServiceImpl()
          Default constructor.
 
Method Summary
 boolean canDeployToComponent(java.lang.String componentName)
           
 java.lang.String deploy(java.lang.String serviceAssemblyZipUrl)
           
 boolean forceUndeploy(java.lang.String serviceAssemblyName)
          Try to undeploy a service assembly.
 java.lang.String[] getComponentsForDeployedServiceAssembly(java.lang.String serviceAssemblyName)
           
 java.lang.String[] getDeployedServiceAssemblies()
           
 java.lang.String[] getDeployedServiceAssembliesForComponent(java.lang.String componentName)
           
 java.lang.String[] getDeployedServiceUnitList(java.lang.String componentName)
           
 java.lang.String getServiceAssemblyDescriptor(java.lang.String serviceAssemblyName)
           
 java.lang.String[] getServiceUnitForServiceAssembly(java.lang.String saName)
          Get all the service unit names for the given service assembly
 java.lang.String getState(java.lang.String serviceAssemblyName)
           
 boolean isDeployedServiceUnit(java.lang.String componentName, java.lang.String serviceUnitName)
           
 void shutdown()
          Called to shutdown a component.
 java.lang.String shutDown(java.lang.String serviceAssemblyName)
           
 java.lang.String[] shutdownAllServiceAssemblies()
          Try to shutdown all service assemblies.
protected  void start()
           
 java.lang.String start(java.lang.String serviceAssemblyName)
           
 java.lang.String[] startAllServiceAssemblies()
          Try to start all service assemblies.
protected  void stop()
           
 java.lang.String stop(java.lang.String serviceAssemblyName)
           
 java.lang.String[] stopAllServiceAssemblies()
          Try to stop all service assemblies.
 java.lang.String undeploy(java.lang.String serviceAssemblyName)
           
 java.lang.String[] undeployAllServiceAssemblies(boolean force)
          Try to undeploy all service assemblies.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

container

protected ContainerService container
Container :: Container Service

Constructor Detail

DeploymentServiceImpl

public DeploymentServiceImpl()
Default constructor.

Method Detail

canDeployToComponent

public boolean canDeployToComponent(java.lang.String componentName)
Specified by:
canDeployToComponent in interface javax.jbi.management.DeploymentServiceMBean

deploy

public java.lang.String deploy(java.lang.String serviceAssemblyZipUrl)
                        throws java.lang.Exception
Specified by:
deploy in interface javax.jbi.management.DeploymentServiceMBean
Throws:
java.lang.Exception

forceUndeploy

public boolean forceUndeploy(java.lang.String serviceAssemblyName)
Description copied from interface: DeploymentServiceMBean
Try to undeploy a service assembly. If the SA is in the STARTED state, it will be previously stopped and shut down. If the SA is in the STOPPED state, it will be previously shut down.

Returns:
true if the SA is undeployed, false otherwise.

getComponentsForDeployedServiceAssembly

public java.lang.String[] getComponentsForDeployedServiceAssembly(java.lang.String serviceAssemblyName)
                                                           throws java.lang.Exception
Specified by:
getComponentsForDeployedServiceAssembly in interface javax.jbi.management.DeploymentServiceMBean
Throws:
java.lang.Exception

getDeployedServiceAssemblies

public java.lang.String[] getDeployedServiceAssemblies()
                                                throws java.lang.Exception
Specified by:
getDeployedServiceAssemblies in interface javax.jbi.management.DeploymentServiceMBean
Throws:
java.lang.Exception

getDeployedServiceAssembliesForComponent

public java.lang.String[] getDeployedServiceAssembliesForComponent(java.lang.String componentName)
                                                            throws java.lang.Exception
Specified by:
getDeployedServiceAssembliesForComponent in interface javax.jbi.management.DeploymentServiceMBean
Throws:
java.lang.Exception

getDeployedServiceUnitList

public java.lang.String[] getDeployedServiceUnitList(java.lang.String componentName)
                                              throws java.lang.Exception
Specified by:
getDeployedServiceUnitList in interface javax.jbi.management.DeploymentServiceMBean
Throws:
java.lang.Exception

getServiceAssemblyDescriptor

public java.lang.String getServiceAssemblyDescriptor(java.lang.String serviceAssemblyName)
                                              throws java.lang.Exception
Specified by:
getServiceAssemblyDescriptor in interface javax.jbi.management.DeploymentServiceMBean
Throws:
java.lang.Exception

getServiceUnitForServiceAssembly

public java.lang.String[] getServiceUnitForServiceAssembly(java.lang.String saName)
                                                    throws java.lang.Exception
Description copied from interface: DeploymentServiceMBean
Get all the service unit names for the given service assembly

Returns:
Throws:
java.lang.Exception

getState

public java.lang.String getState(java.lang.String serviceAssemblyName)
                          throws java.lang.Exception
Specified by:
getState in interface javax.jbi.management.DeploymentServiceMBean
Throws:
java.lang.Exception

isDeployedServiceUnit

public boolean isDeployedServiceUnit(java.lang.String componentName,
                                     java.lang.String serviceUnitName)
Specified by:
isDeployedServiceUnit in interface javax.jbi.management.DeploymentServiceMBean

shutdown

public void shutdown()
              throws java.lang.Exception
Description copied from interface: PetalsLifeCycle
Called to shutdown a component. The component must unregister all container related information.

Specified by:
shutdown in interface PetalsLifeCycle
Throws:
java.lang.Exception

shutDown

public java.lang.String shutDown(java.lang.String serviceAssemblyName)
                          throws java.lang.Exception
Specified by:
shutDown in interface javax.jbi.management.DeploymentServiceMBean
Throws:
java.lang.Exception

shutdownAllServiceAssemblies

public java.lang.String[] shutdownAllServiceAssemblies()
Description copied from interface: DeploymentServiceMBean
Try to shutdown all service assemblies. If a service assembly can't be shut down, the shutting down process isn't aborted. It returns the list of all shutdown service assemblies.

Returns:
an array of successfully shutdown service assembly names.

start

public java.lang.String start(java.lang.String serviceAssemblyName)
                       throws java.lang.Exception
Specified by:
start in interface javax.jbi.management.DeploymentServiceMBean
Throws:
java.lang.Exception

startAllServiceAssemblies

public java.lang.String[] startAllServiceAssemblies()
Description copied from interface: DeploymentServiceMBean
Try to start all service assemblies. If a service assembly can't be started, the starting process isn't aborted. It returns the list of all started service assemblies.

Returns:
an array of successfully started service assembly names.

stop

public java.lang.String stop(java.lang.String serviceAssemblyName)
                      throws java.lang.Exception
Specified by:
stop in interface javax.jbi.management.DeploymentServiceMBean
Throws:
java.lang.Exception

stopAllServiceAssemblies

public java.lang.String[] stopAllServiceAssemblies()
Description copied from interface: DeploymentServiceMBean
Try to stop all service assemblies. If a service assembly can't be stopped, the stopping process isn't aborted. It returns the list of all stopped service assemblies.

Returns:
an array of successfully stopped service assembly names.

undeploy

public java.lang.String undeploy(java.lang.String serviceAssemblyName)
                          throws java.lang.Exception
Specified by:
undeploy in interface javax.jbi.management.DeploymentServiceMBean
Throws:
java.lang.Exception

undeployAllServiceAssemblies

public java.lang.String[] undeployAllServiceAssemblies(boolean force)
Description copied from interface: DeploymentServiceMBean
Try to undeploy all service assemblies. The undeployment can be forced; in this case, the deployment process is completed as this : if the SA is in the STARTED state, it will be stopped and shutdown. If the SA is in the STOPPED state, it will be shutdown. If a service assembly can't be undeployed, the undeploying process isn't aborted. It returns the list of all undeployed service assemblies.

Parameters:
force - true if you want to force undeployment, ignoring assembly state. Default is false
Returns:
an array of successfully undeployed service assembly names.

start

protected void start()

stop

protected void stop()


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