org.mule.lifecycle
Class SimpleLifecycleManager<O>
java.lang.Object
org.mule.lifecycle.AbstractLifecycleManager<O>
org.mule.lifecycle.SimpleLifecycleManager<O>
- Type Parameters:
O
- the object type being managed by this LifecycleManager
- All Implemented Interfaces:
- LifecycleManager
- Direct Known Subclasses:
- ComponentLifecycleManager, ConnectableLifecycleManager, ConnectorLifecycleManager, FlowConstructLifecycleManager, ModelLifecycleManager, SedaStageLifecycleManager, ServiceLifecycleManager
public abstract class SimpleLifecycleManager<O>
- extends AbstractLifecycleManager<O>
This 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 JMX
Methods inherited from class org.mule.lifecycle.AbstractLifecycleManager |
addDirectTransition, checkPhase, createLifecycleState, getCurrentPhase, getExecutingPhase, getLifecycleObject, getState, invokePhase, isDirectTransition, isDirectTransition, isPhaseComplete, notifyTransition, registerLifecycleCallback, reset, setCurrentPhase, setExecutingPhase |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleLifecycleManager
public SimpleLifecycleManager(String id,
O object)
registerTransitions
protected void registerTransitions()
- Specified by:
registerTransitions
in class AbstractLifecycleManager<O>
fireLifecycle
public void fireLifecycle(String phase)
throws LifecycleException
- Description copied from interface:
LifecycleManager
- Applies lifecycle phase to a collection of objects.
- Specified by:
fireLifecycle
in interface LifecycleManager
- Overrides:
fireLifecycle
in class AbstractLifecycleManager<O>
- Parameters:
phase
- that phase to execute next
- Throws:
LifecycleException
- if the phase is not a valid transition of does not exist on this lifecycle manager
fireInitialisePhase
public abstract void fireInitialisePhase(LifecycleCallback<O> callback)
throws MuleException
- Throws:
MuleException
fireStartPhase
public abstract void fireStartPhase(LifecycleCallback<O> callback)
throws MuleException
- Throws:
MuleException
fireStopPhase
public abstract void fireStopPhase(LifecycleCallback<O> callback)
throws MuleException
- Throws:
MuleException
fireDisposePhase
public abstract void fireDisposePhase(LifecycleCallback<O> callback)
throws MuleException
- Throws:
MuleException
Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.