O - the object type being managed by this LifecycleManagerpublic abstract class SimpleLifecycleManager<O> extends AbstractLifecycleManager<O>
LifecycleManager implementation is designed to track the lifecycle of objects
that support the Initialisable.PHASE_NAME, Startable.PHASE_NAME,
Stoppable.PHASE_NAME and Disposable.PHASE_NAME phases and
adds convenience methods for firing these phases by callbacks.
This is an internal class used by Mule for managing state for objects such as Service,
Connector and Agent, all of which can be controlled externally via JMXcompletedPhases, currentPhase, executingPhase, lifecycleManagerId, logger, object, phaseNames, stateNOT_IN_LIFECYCLE_PHASE| Constructor and Description |
|---|
SimpleLifecycleManager(String id,
O object) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
fireDisposePhase(LifecycleCallback<O> callback) |
abstract void |
fireInitialisePhase(LifecycleCallback<O> callback) |
void |
fireLifecycle(String phase)
Applies lifecycle phase to a collection of objects.
|
abstract void |
fireStartPhase(LifecycleCallback<O> callback) |
abstract void |
fireStopPhase(LifecycleCallback<O> callback) |
protected void |
registerTransitions() |
addDirectTransition, checkPhase, createLifecycleState, getCurrentPhase, getExecutingPhase, getLifecycleObject, getState, invokePhase, isDirectTransition, isDirectTransition, isPhaseComplete, notifyTransition, registerLifecycleCallback, reset, setCurrentPhase, setExecutingPhaseprotected void registerTransitions()
registerTransitions in class AbstractLifecycleManager<O>public void fireLifecycle(String phase) throws LifecycleException
LifecycleManagerfireLifecycle in interface LifecycleManagerfireLifecycle in class AbstractLifecycleManager<O>phase - that phase to execute nextLifecycleException - if the phase is not a valid transition of does not exist on this lifecycle managerpublic abstract void fireInitialisePhase(LifecycleCallback<O> callback) throws MuleException
MuleExceptionpublic abstract void fireStartPhase(LifecycleCallback<O> callback) throws MuleException
MuleExceptionpublic abstract void fireStopPhase(LifecycleCallback<O> callback) throws MuleException
MuleExceptionpublic abstract void fireDisposePhase(LifecycleCallback<O> callback) throws MuleException
MuleExceptionCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.