|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
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 |
public static final String START_EVENT
public static final String STOP_EVENT
| Method Detail |
public void addLifecycleListener(LifecycleListener listener)
listener - The listener to addpublic void removeLifecycleListener(LifecycleListener listener)
listener - The listener to remove
public void start()
throws LifecycleException
LifecycleException - if this component detects a fatal error
that prevents this component from being used
public void stop()
throws LifecycleException
LifecycleException - if this component detects a fatal error
that needs to be reportedpublic boolean isStarted()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||