org.mortbay.component
Class AbstractLifeCycle
java.lang.Object
org.mortbay.component.AbstractLifeCycle
- All Implemented Interfaces:
- LifeCycle
- Direct Known Subclasses:
- AbstractConnector, AbstractHandler, AbstractSessionManager, AbstractSessionManager.NullMetaManager, AbstractSessionManager.SimpleMetaManager, BoundedThreadPool, Holder, NCSARequestLog, ResourceCache
public abstract class AbstractLifeCycle
- extends Object
- implements LifeCycle
- Author:
- gregw
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FAILED
private final int FAILED
- See Also:
- Constant Field Values
STOPPED
private final int STOPPED
- See Also:
- Constant Field Values
STARTING
private final int STARTING
- See Also:
- Constant Field Values
STARTED
private final int STARTED
- See Also:
- Constant Field Values
STOPPING
private final int STOPPING
- See Also:
- Constant Field Values
_state
private transient int _state
AbstractLifeCycle
public AbstractLifeCycle()
doStart
protected void doStart()
throws Exception
- Throws:
Exception
doStop
protected void doStop()
throws Exception
- Throws:
Exception
start
public final void start()
throws Exception
- Description copied from interface:
LifeCycle
- Start the LifeCycle.
- Specified by:
start
in interface LifeCycle
- Throws:
Exception
- An arbitrary exception may be thrown.
stop
public final void stop()
throws Exception
- Description copied from interface:
LifeCycle
- Stop the LifeCycle.
The LifeCycle may wait for current activities to complete
normally, but it can be interrupted.
- Specified by:
stop
in interface LifeCycle
- Throws:
Exception
- An arbitrary exception may be thrown.
isRunning
public boolean isRunning()
- Specified by:
isRunning
in interface LifeCycle
- Returns:
- True if the LifeCycle is starting or has been started.
isStarted
public boolean isStarted()
- Specified by:
isStarted
in interface LifeCycle
- Returns:
- True if the LifeCycle has been started.
isStarting
public boolean isStarting()
- Specified by:
isStarting
in interface LifeCycle
- Returns:
- True if the LifeCycle is starting.
isStopping
public boolean isStopping()
- Specified by:
isStopping
in interface LifeCycle
- Returns:
- True if the LifeCycle is stopping
isFailed
public boolean isFailed()
- Specified by:
isFailed
in interface LifeCycle
- Returns:
- True if the LifeCycle is failed