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.
|
protected void |
doOnConnectException(ConnectException ce) |
void |
fireLifecycle(String destinationPhase)
Applies lifecycle phase to a collection of objects.
|
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, getLastPhaseExecuted, getLifecycleObject, getState, invokePhase, isDirectTransition, isDirectTransition, isLastPhaseExecutionFailed, 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 doOnConnectException(ConnectException ce) throws LifecycleException
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–2018 MuleSoft, Inc.. All rights reserved.