public interface LifecycleManager
| Modifier and Type | Method and Description |
|---|---|
void |
applyCompletedPhases(Object object)
Successively applies all completed lifecycle phase to an object.
|
void |
applyPhase(Object object,
String startPhase,
String toPhase)
Applies lifecycle phase to an object independent of the current lifecycle phase.
|
void |
checkPhase(String name)
Will check that the phase passed in is a valid next phase for this lifecycle manager.
|
void |
fireLifecycle(String phase)
Applies lifecycle phase to a collection of objects.
|
String |
getCurrentPhase()
The current phase for the lifecycle manager.
|
String |
getExecutingPhase()
Returns the lifecycle phase being executed.
|
LifecycleState |
getState()
Provides access to a state machine for this lifecycle manager.
|
boolean |
isDirectTransition(String phase) |
boolean |
isPhaseComplete(String phaseName)
Checks that a phase has completed
|
void |
reset()
Reset the lifecycle manager state back to 'not in lifecycle' phase
|
void fireLifecycle(String phase) throws org.mule.runtime.api.lifecycle.LifecycleException
phase - that phase to execute nextorg.mule.runtime.api.lifecycle.LifecycleException - if the phase is not a valid transition of does not exist on this lifecycle managerString getCurrentPhase()
getExecutingPhase() to get the phase being executed.String getExecutingPhase()
void applyPhase(Object object, String startPhase, String toPhase) throws org.mule.runtime.api.lifecycle.LifecycleException
startPhase
(not inclusive) and the endPhase will be executed.object - the object to apply lifecycle tostartPhase - 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.org.mule.runtime.api.lifecycle.LifecycleException - if there is an exception while invoking lifecycle on the objectvoid applyCompletedPhases(Object object) throws org.mule.runtime.api.lifecycle.LifecycleException
object - the object to which the lifecycle should be appliedorg.mule.runtime.api.lifecycle.LifecycleException - if there is an error while applying lifecycle to the objectvoid reset()
boolean isPhaseComplete(String phaseName)
phaseName - the name of the pahse to check forvoid checkPhase(String name) throws IllegalStateException
name - The name of the lifecycle to validate as a valid next transitionIllegalStateException - if the lifecycle name is not recognised or the phase is not valid for the current lifecycle
stateLifecycleState getState()
boolean isDirectTransition(String phase)
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.