public interface Lifecycle<M,S>
| Modifier and Type | Field and Description |
|---|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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
LifecycleListener<M,S>[] findLifecycleListeners()
void removeLifecycleListener(LifecycleListener<M,S> listener)
listener - The listener to removevoid addLifecycleListener(LifecycleListener<M,S> listener)
listener - The listener to addvoid start()
throws LifecycleException
LifecycleException - if this component detects a fatal error that
prevents this component from being usedvoid stop()
throws LifecycleException
LifecycleException - if this component detects a fatal error that
needs to be reportedCopyright © 2011–2015 eXo Platform SAS. All rights reserved.