org.ow2.petals.container.lifecycle
Class ServiceAssemblyLifeCycle

java.lang.Object
  extended by org.ow2.petals.container.lifecycle.AbstractLifeCycle
      extended by org.ow2.petals.container.lifecycle.ServiceAssemblyLifeCycle
All Implemented Interfaces:
javax.jbi.management.LifeCycleMBean

public class ServiceAssemblyLifeCycle
extends AbstractLifeCycle

This class manage the life cycle of deployed service assemblies

Author:
Olivier Fabre - EBM Websourcing, ddesjardins - eBMWebsourcing

Field Summary
 
Fields inherited from class org.ow2.petals.container.lifecycle.AbstractLifeCycle
activitySynchronizer, forcedState, initialized, log, name
 
Fields inherited from interface javax.jbi.management.LifeCycleMBean
SHUTDOWN, STARTED, STOPPED, UNKNOWN
 
Constructor Summary
ServiceAssemblyLifeCycle()
           
 
Method Summary
 void doInit()
          Do nothing
 void doShutdown()
           
 void doStart()
           
 void doStop()
           
 org.objectweb.fractal.api.Component getComponent()
          Accessor to the fractal component
protected  java.lang.String getJBIArtifactType()
           
 org.ow2.petals.jbi.descriptor.original.generated.ServiceAssembly getServiceAssembly()
           
 java.util.List<ServiceUnitLifeCycle> getServiceUnitLifeCycles()
           
 void init(org.ow2.petals.jbi.descriptor.original.generated.ServiceAssembly serviceAssembly)
          Initialize the life-cycle.
 void registerSU(ServiceUnitLifeCycle serviceUnitLifeCycle)
          Register a ServiceUnitLifeCycle into a synchronized map of the ServiceAssemblyLifeCycle
 void setServiceAssembly(org.ow2.petals.jbi.descriptor.original.generated.ServiceAssembly serviceAssembly)
           
 void setState(java.lang.String state)
          Set the State reference of the current state.
protected  void startComponentLifeCycle()
           
protected  void stopComponentLifeCycle()
          Stop of the petals component
 void unregisterSU(ServiceUnitLifeCycle serviceUnitLifeCycle)
          Unregister a ServiceUnitLifeCycle from a synchronized map of the ServiceAssemblyLifeCycle
 
Methods inherited from class org.ow2.petals.container.lifecycle.AbstractLifeCycle
getCurrentState, isShutdownState, isStartedState, isStoppedState, isUnknownState, setForcedState, shutDown, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceAssemblyLifeCycle

public ServiceAssemblyLifeCycle()
Method Detail

getComponent

public org.objectweb.fractal.api.Component getComponent()
Accessor to the fractal component

Returns:
the fractal component

init

public void init(org.ow2.petals.jbi.descriptor.original.generated.ServiceAssembly serviceAssembly)
          throws javax.jbi.JBIException
Initialize the life-cycle. This is not the init() step of the life-cycle.

Parameters:
mbeanName - name of the MBean for this LifeCycle. In fact, the DeploymentServiceMBean name is used as there is no SALifeCycleMBean
log -
Throws:
javax.jbi.JBIException

doInit

public void doInit()
            throws javax.jbi.JBIException
Do nothing

Specified by:
doInit in class AbstractLifeCycle
Throws:
javax.jbi.JBIException

doShutdown

public void doShutdown()
                throws javax.jbi.JBIException
Specified by:
doShutdown in class AbstractLifeCycle
Throws:
javax.jbi.JBIException

doStart

public void doStart()
             throws javax.jbi.JBIException
Specified by:
doStart in class AbstractLifeCycle
Throws:
javax.jbi.JBIException

doStop

public void doStop()
            throws javax.jbi.JBIException
Specified by:
doStop in class AbstractLifeCycle
Throws:
javax.jbi.JBIException

getServiceAssembly

public org.ow2.petals.jbi.descriptor.original.generated.ServiceAssembly getServiceAssembly()

setServiceAssembly

public void setServiceAssembly(org.ow2.petals.jbi.descriptor.original.generated.ServiceAssembly serviceAssembly)
Parameters:
serviceAssembly - the serviceAssembly to set

getServiceUnitLifeCycles

public java.util.List<ServiceUnitLifeCycle> getServiceUnitLifeCycles()

registerSU

public void registerSU(ServiceUnitLifeCycle serviceUnitLifeCycle)
                throws javax.jbi.JBIException
Register a ServiceUnitLifeCycle into a synchronized map of the ServiceAssemblyLifeCycle

Parameters:
suName - name of a service unit
serviceUnitLifeCycle - life cycle of the service unit
Throws:
javax.jbi.JBIException

unregisterSU

public void unregisterSU(ServiceUnitLifeCycle serviceUnitLifeCycle)
Unregister a ServiceUnitLifeCycle from a synchronized map of the ServiceAssemblyLifeCycle

Parameters:
suName - name of a service unit

setState

public void setState(java.lang.String state)
              throws javax.jbi.JBIException
Description copied from class: AbstractLifeCycle
Set the State reference of the current state. An LifeCycleStateEventAbstract is thrown.

Overrides:
setState in class AbstractLifeCycle
Throws:
javax.jbi.JBIException

startComponentLifeCycle

protected void startComponentLifeCycle()
Throws:
org.ow2.petals.kernel.api.server.PetalsException
javax.jbi.JBIException

stopComponentLifeCycle

protected void stopComponentLifeCycle()
                               throws javax.jbi.JBIException
Stop of the petals component

Throws:
javax.jbi.JBIException

getJBIArtifactType

protected java.lang.String getJBIArtifactType()
Specified by:
getJBIArtifactType in class AbstractLifeCycle


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