org.ow2.petals.container.lifecycle
Class ComponentLifeCycle

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

public class ComponentLifeCycle
extends AbstractLifeCycle
implements ComponentLifeCycleInterface, javax.jbi.management.ComponentLifeCycleMBean

Implementation of the ComponentLifeCycle mbean

Author:
Adrien LOUIS - EBM WebSourcing, wjoseph - eBM-WebSourcing, nsalatge - eBM-WebSourcing

Field Summary
protected  ServiceEndpoint address
           
protected  AdminService adminService
          JBI-Management Component :: Admin Service
protected  ComponentLifeCycleThread componentLifeCycleThread
          The component life cycle thread.
protected  javax.naming.InitialContext initialContext
           
protected  java.lang.String installationRootPath
           
protected  JNDIService jndiService
          Communication component :: JNDIService
 
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
ComponentLifeCycle()
          Creates a new instance of ComponentLifeCycle
 
Method Summary
 void doInit()
           
 void doShutdown()
           
 void doStart()
           
 void doStop()
           
 javax.management.ObjectName getExtensionMBeanName()
           
protected  java.lang.String getJBIArtifactType()
           
 java.util.logging.Logger getLogger()
          Get the logger
 java.lang.String getName()
           
 void init(ComponentContext componentContext, ComponentLifeCycleThread componentLifeCycleThread, Context context)
          Initialization of ComponentLifeCycleMBean
protected  void setState(java.lang.String state)
          Set the State reference of the current state.
protected  void startComponentLifeCycle()
          Initialization of the petals component
protected  void stopComponentLifeCycle()
          Stop of the Fractal component, means shutdown the life cycle.
 
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
 
Methods inherited from interface javax.jbi.management.LifeCycleMBean
getCurrentState, shutDown, start, stop
 

Field Detail

jndiService

protected JNDIService jndiService
Communication component :: JNDIService


adminService

protected AdminService adminService
JBI-Management Component :: Admin Service


componentLifeCycleThread

protected ComponentLifeCycleThread componentLifeCycleThread
The component life cycle thread. Each life cycle have a thread to process operation in the component ClassLoader


installationRootPath

protected java.lang.String installationRootPath

address

protected ServiceEndpoint address

initialContext

protected javax.naming.InitialContext initialContext
Constructor Detail

ComponentLifeCycle

public ComponentLifeCycle()
Creates a new instance of ComponentLifeCycle

Method Detail

init

public void init(ComponentContext componentContext,
                 ComponentLifeCycleThread componentLifeCycleThread,
                 Context context)
          throws org.ow2.petals.kernel.api.server.PetalsException,
                 javax.jbi.JBIException
Description copied from interface: ComponentLifeCycleInterface
Initialization of ComponentLifeCycleMBean

Specified by:
init in interface ComponentLifeCycleInterface
Parameters:
componentContext - the component Context
componentLifeCycleThread - the thread of the component life cycle
context - the context
Throws:
org.ow2.petals.kernel.api.server.PetalsException - occurs when it is impossible to init the component life cycle
javax.jbi.JBIException

doInit

public void doInit()
            throws javax.jbi.JBIException
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

getExtensionMBeanName

public javax.management.ObjectName getExtensionMBeanName()
                                                  throws javax.jbi.JBIException
Specified by:
getExtensionMBeanName in interface javax.jbi.management.ComponentLifeCycleMBean
Throws:
javax.jbi.JBIException
See Also:
ComponentLifeCycleMBean.getExtensionMBeanName()

getName

public java.lang.String getName()
Returns:

getLogger

public java.util.logging.Logger getLogger()
Get the logger

Returns:
the logger

setState

protected 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()
Initialization of the petals component

Throws:
org.ow2.petals.kernel.api.server.PetalsException
javax.jbi.JBIException

stopComponentLifeCycle

protected void stopComponentLifeCycle()
Stop of the Fractal component, means shutdown the life cycle.


getJBIArtifactType

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


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