public class RegistryLifecycleManager extends AbstractLifecycleManager<Registry> implements RegistryLifecycleHelpers
Modifier and Type | Field and Description |
---|---|
protected SortedMap<String,LifecycleCallback> |
callbacks |
protected MuleContext |
muleContext |
protected Map<String,LifecyclePhase> |
phases |
completedPhases, currentPhase, executingPhase, lifecycleManagerId, logger, object, phaseNames, state
NOT_IN_LIFECYCLE_PHASE
Constructor and Description |
---|
RegistryLifecycleManager(String id,
Registry object,
Map<String,LifecyclePhase> phases) |
RegistryLifecycleManager(String id,
Registry object,
MuleContext muleContext) |
Modifier and Type | Method and Description |
---|---|
void |
applyCompletedPhases(Object object)
Successively applies all completed lifecycle phase to an object.
|
void |
applyPhase(Object object,
String fromPhase,
String toPhase)
Applies lifecycle phase to an object independent of the current lifecycle phase.
|
void |
fireLifecycle(String destinationPhase)
Applies lifecycle phase to a collection of objects.
|
protected void |
invokePhase(String phase,
Object object,
LifecycleCallback callback) |
protected void |
registerPhase(String phaseName,
LifecyclePhase phase) |
protected void |
registerPhase(String phaseName,
LifecyclePhase phase,
LifecycleCallback callback) |
protected void |
registerPhases() |
protected void |
registerTransitions() |
addDirectTransition, checkPhase, createLifecycleState, getCurrentPhase, getExecutingPhase, getLifecycleObject, getState, isDirectTransition, isDirectTransition, isPhaseComplete, notifyTransition, registerLifecycleCallback, reset, setCurrentPhase, setExecutingPhase
protected Map<String,LifecyclePhase> phases
protected SortedMap<String,LifecycleCallback> callbacks
protected MuleContext muleContext
public RegistryLifecycleManager(String id, Registry object, MuleContext muleContext)
public RegistryLifecycleManager(String id, Registry object, Map<String,LifecyclePhase> phases)
protected void registerPhases()
protected void registerTransitions()
registerTransitions
in class AbstractLifecycleManager<Registry>
protected void registerPhase(String phaseName, LifecyclePhase phase)
protected void registerPhase(String phaseName, LifecyclePhase phase, LifecycleCallback callback)
public void fireLifecycle(String destinationPhase) throws LifecycleException
LifecycleManager
fireLifecycle
in interface LifecycleManager
fireLifecycle
in class AbstractLifecycleManager<Registry>
destinationPhase
- that phase to execute nextLifecycleException
- if the phase is not a valid transition of does not exist on this lifecycle managerprotected void invokePhase(String phase, Object object, LifecycleCallback callback) throws LifecycleException
invokePhase
in class AbstractLifecycleManager<Registry>
LifecycleException
public void applyPhase(Object object, String fromPhase, String toPhase) throws LifecycleException
RegistryLifecycleHelpers
applyPhase
in interface RegistryLifecycleHelpers
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.LifecycleException
- if there is an exception while invoking lifecycle on the objectpublic void applyCompletedPhases(Object object) throws LifecycleException
RegistryLifecycleHelpers
applyCompletedPhases
in interface RegistryLifecycleHelpers
object
- the object to which the lifecycle should be appliedLifecycleException
- if there is an error while applying lifecycle to the objectCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.