O
- the object type being managed by this LifecycleManager
public 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, state
NOT_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, setExecutingPhase
protected void registerTransitions()
registerTransitions
in class AbstractLifecycleManager<O>
public void fireLifecycle(String phase) throws LifecycleException
LifecycleManager
fireLifecycle
in interface LifecycleManager
fireLifecycle
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
MuleException
public abstract void fireStartPhase(LifecycleCallback<O> callback) throws MuleException
MuleException
public abstract void fireStopPhase(LifecycleCallback<O> callback) throws MuleException
MuleException
public abstract void fireDisposePhase(LifecycleCallback<O> callback) throws MuleException
MuleException
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.