|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Lifecycle<M,S>
Common interface for component life cycle methods. In order to provide a consistent to start and stop the component.
| Field Summary | |
|---|---|
static String |
AFTER_START_EVENT
The LifecycleEvent type for the "component after start" |
static String |
AFTER_STOP_EVENT
The LifecycleEvent type for the "component after start" |
static String |
BEFORE_START_EVENT
The LifecycleEvent type for the "component before start" |
static String |
BEFORE_STOP_EVENT
The LifecycleEvent type for the "component before stop" |
static String |
DESTROY_EVENT
The LifecycleEvent type for the "component destroy" |
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<M,S> listener)
Add a LifecycleEvent listener to this component. |
LifecycleListener<M,S>[] |
findLifecycleListeners()
Get the lifecycle listeners associated with this lifecycle. |
void |
removeLifecycleListener(LifecycleListener<M,S> 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 BEFORE_START_EVENT
static final String AFTER_START_EVENT
static final String STOP_EVENT
static final String BEFORE_STOP_EVENT
static final String AFTER_STOP_EVENT
static final String DESTROY_EVENT
| Method Detail |
|---|
LifecycleListener<M,S>[] findLifecycleListeners()
void removeLifecycleListener(LifecycleListener<M,S> listener)
listener - The listener to removevoid addLifecycleListener(LifecycleListener<M,S> listener)
listener - The listener to add
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 reported
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||