org.ow2.petals.registry.api.lifecycle
Class AbstractLifeCycle

java.lang.Object
  extended by org.ow2.petals.registry.api.lifecycle.AbstractLifeCycle
All Implemented Interfaces:
LifeCycle

public abstract class AbstractLifeCycle
extends java.lang.Object
implements LifeCycle

The abstract life cycle

Author:
Christophe HAMERLING - eBM WebSourcing

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.ow2.petals.registry.api.lifecycle.LifeCycle
LifeCycle.STATE
 
Field Summary
protected  org.apache.commons.logging.Log log
          The class logger
 
Constructor Summary
AbstractLifeCycle()
          Creates a new instance of AbstractLifeCycle
 
Method Summary
protected  void doInit(Context context)
          Do the initialization
protected  void doStart()
           
protected  void doStop()
           
 LifeCycle.STATE getState()
           
 void init(Context context)
           
 boolean isInitialized()
           
 boolean isNotInitialized()
           
 boolean isRunning()
           
 boolean isStarted()
           
 boolean isStopped()
           
 void setState(LifeCycle.STATE state)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.apache.commons.logging.Log log
The class logger

Constructor Detail

AbstractLifeCycle

public AbstractLifeCycle()
Creates a new instance of AbstractLifeCycle

Method Detail

init

public final void init(Context context)
                throws LifeCycleException
Specified by:
init in interface LifeCycle
Throws:
LifeCycleException

doInit

protected void doInit(Context context)
               throws LifeCycleException
Do the initialization

Parameters:
params - the initialization parameters
Throws:
LifeCycleException

doStart

protected void doStart()
                throws LifeCycleException
Throws:
LifeCycleException

doStop

protected void doStop()
               throws LifeCycleException
Throws:
LifeCycleException

start

public final void start()
                 throws LifeCycleException
Specified by:
start in interface LifeCycle
Throws:
LifeCycleException

stop

public final void stop()
                throws LifeCycleException
Specified by:
stop in interface LifeCycle
Throws:
LifeCycleException

isRunning

public boolean isRunning()
Specified by:
isRunning in interface LifeCycle
Returns:

isStarted

public boolean isStarted()
Specified by:
isStarted in interface LifeCycle
Returns:

isStopped

public boolean isStopped()
Specified by:
isStopped in interface LifeCycle
Returns:

isInitialized

public boolean isInitialized()
Specified by:
isInitialized in interface LifeCycle
Returns:

isNotInitialized

public boolean isNotInitialized()
Specified by:
isNotInitialized in interface LifeCycle
Returns:

getState

public LifeCycle.STATE getState()
Specified by:
getState in interface LifeCycle
Returns:

setState

public void setState(LifeCycle.STATE state)


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