org.mortbay.component
Interface LifeCycle

All Known Subinterfaces:
Connector, Handler, RequestLog, SessionIdManager, SessionManager
All Known Implementing Classes:
AbstractConnector, AbstractHandler, AbstractLifeCycle, AbstractSessionManager, HashSessionIdManager, NCSARequestLog

public interface LifeCycle

A component LifeCycle. Represents the life cycle interface for an abstract software component.

Author:
Greg Wilkins (gregw)

Method Summary
 boolean isFailed()
           
 boolean isRunning()
           
 boolean isStarted()
           
 boolean isStarting()
           
 boolean isStopping()
           
 void start()
          Start the LifeCycle.
 void stop()
          Stop the LifeCycle.
 

Method Detail

start

public void start()
           throws Exception
Start the LifeCycle.

Throws:
Exception - An arbitrary exception may be thrown.

stop

public void stop()
          throws Exception
Stop the LifeCycle. The LifeCycle may wait for current activities to complete normally, but it can be interrupted.

Throws:
Exception - An arbitrary exception may be thrown.

isRunning

public boolean isRunning()
Returns:
True if the LifeCycle is starting or has been started.

isStarted

public boolean isStarted()
Returns:
True if the LifeCycle has been started.

isStarting

public boolean isStarting()
Returns:
True if the LifeCycle is starting.

isStopping

public boolean isStopping()
Returns:
True if the LifeCycle is stopping

isFailed

public boolean isFailed()
Returns:
True if the LifeCycle is failed