org.mortbay.util
Interface LifeCycle
- All Known Implementing Classes:
- ThreadPool
- public interface LifeCycle
A component LifeCycle.
Represents the life cycle interface for an abstract
software component. Implementations should respect
the following state table:
State: Destroyed (initial state)
start() -> Started
stop() -> Stopped
destroy() -> Destroyed
State: Stopped
start() -> Started
stop() -> Stopped
destroy() -> Destroyed
State: Started
start() -> Started
stop() -> Stopped
destroy() -> Destroyed
- Version:
- $Id: LifeCycle.java,v 1.1 2001/11/30 13:38:22 kobit Exp $
- Author:
- Greg Wilkins (gregw)
start
public void start()
throws java.lang.Exception
- Start the LifeCycle.
- Throws:
java.lang.Exception
- An arbitrary exception may be thrown.
stop
public void stop()
throws java.lang.InterruptedException
- Stop the LifeCycle.
The LifeCycle may wait for current activities to complete
normally, but it can be interrupted.
destroy
public void destroy()
- Destroy the LifeCycle.
Activities are terminated.
isStarted
public boolean isStarted()
- Returns:
- True if the LifeCycle has been started.
isDestroyed
public boolean isDestroyed()
- Returns:
- True if the LifeCycle has been destroyed.
Copyright © GNU, wttools developers Team.