|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Lifecycle
Defines a common interface for component life cycle methods. Any managed component that needs to be started, and stopped during it's lifetime may implement this interface. It is up to the associated manager to invoke these methods.
| Field Summary | |
|---|---|
static String |
START_EVENT
The LifecycleEvent type for the "component start" event. |
static String |
STOP_EVENT
The LifecycleEvent type for the "component stop" event. |
| Method Summary | |
|---|---|
void |
addLifecycleListener(LifecycleListener listener)
Add a LifecycleEvent listener to this component. |
boolean |
isStarted()
Determine if the implementing Lifecycle object has been started. |
void |
removeLifecycleListener(LifecycleListener listener)
Remove a LifecycleEvent listener from this component. |
void |
start()
Prepare for the beginning of active use of the public methods of this component. |
void |
stop()
Gracefully terminate the active use of the public methods of this component. |
| Field Detail |
|---|
static final String START_EVENT
static final String STOP_EVENT
| Method Detail |
|---|
void addLifecycleListener(LifecycleListener listener)
listener - The listener to addvoid removeLifecycleListener(LifecycleListener listener)
listener - The listener to remove
void start()
throws LifecycleException
LifecycleException - if this component detects a fatal error
that prevents this component from being used
void stop()
throws LifecycleException
LifecycleException - if this component detects a fatal error
that needs to be reportedboolean isStarted()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||