org.mule.lifecycle
Class RegistryLifecycleManager
java.lang.Object
org.mule.lifecycle.AbstractLifecycleManager<Registry>
org.mule.lifecycle.RegistryLifecycleManager
- All Implemented Interfaces:
- LifecycleManager, RegistryLifecycleHelpers
- Direct Known Subclasses:
- RegistryBrokerLifecycleManager, SpringRegistryLifecycleManager
public class RegistryLifecycleManager
- extends AbstractLifecycleManager<Registry>
- implements RegistryLifecycleHelpers
Methods inherited from class org.mule.lifecycle.AbstractLifecycleManager |
addDirectTransition, checkPhase, createLifecycleState, getCurrentPhase, getExecutingPhase, getLifecycleObject, getState, 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 |
phases
protected Map<String,LifecyclePhase> phases
callbacks
protected TreeMap<String,LifecycleCallback> callbacks
muleContext
protected MuleContext muleContext
RegistryLifecycleManager
public RegistryLifecycleManager(String id,
Registry object,
MuleContext muleContext)
RegistryLifecycleManager
public RegistryLifecycleManager(String id,
Registry object,
Map<String,LifecyclePhase> phases)
registerPhases
protected void registerPhases()
registerTransitions
protected void registerTransitions()
- Specified by:
registerTransitions
in class AbstractLifecycleManager<Registry>
registerPhase
protected void registerPhase(String phaseName,
LifecyclePhase phase)
registerPhase
protected void registerPhase(String phaseName,
LifecyclePhase phase,
LifecycleCallback callback)
fireLifecycle
public void fireLifecycle(String destinationPhase)
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<Registry>
- Parameters:
destinationPhase
- that phase to execute next
- Throws:
LifecycleException
- if the phase is not a valid transition of does not exist on this lifecycle manager
invokePhase
protected void invokePhase(String phase,
Object object,
LifecycleCallback callback)
throws LifecycleException
- Overrides:
invokePhase
in class AbstractLifecycleManager<Registry>
- Throws:
LifecycleException
applyPhase
public void applyPhase(Object object,
String fromPhase,
String toPhase)
throws LifecycleException
- Description copied from interface:
RegistryLifecycleHelpers
- Applies lifecycle phase to an object independent of the current lifecycle phase. All phases between the current
phase and the 'endPhase' will be executed.
- Specified by:
applyPhase
in interface RegistryLifecycleHelpers
- Parameters:
object
- the object to apply lifecycle tofromPhase
- the lifecycle phase the object is currently in. Must not be null.toPhase
- the lifecycle phase to transition the object to. Must not be null.
- Throws:
LifecycleException
- if there is an exception while invoking lifecycle on the object
applyCompletedPhases
public void applyCompletedPhases(Object object)
throws LifecycleException
- Description copied from interface:
RegistryLifecycleHelpers
- Successively applies all completed lifecycle phase to an object.
- Specified by:
applyCompletedPhases
in interface RegistryLifecycleHelpers
- Parameters:
object
- the object to which the lifecycle should be applied
- Throws:
LifecycleException
- if there is an error while applying lifecycle to the object
Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.