|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.lifecycle.RegistryLifecycleManager
public class RegistryLifecycleManager
| Field Summary | |
|---|---|
protected Set |
completedPhases
|
protected String |
currentPhase
|
protected String |
executingPhase
|
protected List<LifecyclePair> |
lifecyclePairs
|
protected static NotInLifecyclePhase |
notInLifecyclePhase
|
protected LifecycleState |
state
|
protected Set |
transitions
|
| Constructor Summary | |
|---|---|
RegistryLifecycleManager()
|
|
| Method Summary | |
|---|---|
void |
applyCompletedPhases(Object object)
Successively applies all completed lifecycle phase to an object. |
void |
applyPhase(Object object,
String phase)
Applies lifecycle phase to an object independent of the current lifecycle phase. |
void |
checkPhase(String name)
|
protected void |
doApplyPhase(Registry registry,
String phase)
|
void |
fireLifecycle(Registry registry,
String phase)
Applies lifecycle phase to a collection of objects. |
void |
firePhase(MuleContext muleContext,
String phase)
Applies lifecycle phase to all objects in the Registry. |
String |
getCurrentPhase()
The current phase for the lifecycle manager. |
String |
getExecutingPhase()
Returns the name of the currently executing phase or null if there is not current phase. |
List<LifecyclePair> |
getLifecyclePairs()
The lifecycle pairs that will be invoked by this lifecycle manager |
protected LifecyclePhase |
getPhaseForIndex(int phaseIndex)
|
protected int |
getPhaseIndex(String phase)
|
protected List<LifecyclePhase> |
getPhasesIndex()
|
LifecycleState |
getState()
Provides access to a state machine for this lifecycle manager. |
boolean |
isPhaseComplete(String phaseName)
|
protected LifecyclePhase |
lookupPhase(String phase)
|
void |
registerLifecycle(LifecyclePair lifecyclePair)
Register a lifecycle pair that will be invoked by this lifecycle manager The order in which the lifecycle pairs are registered will be the order in which the life cycle phases will be invoked the LifecyclePair.getBegin() phases will be called in order, the
LifecyclePair.getEnd() will be called in opposite order. |
void |
reset()
Reset the lifecycle manager state back to 'not in lifecycle' phase |
protected void |
setCurrentPhase(LifecyclePhase phase)
|
protected void |
setExecutingPhase(String phase)
|
void |
setLifecyclePairs(List<LifecyclePair> lifecyclePairs)
The lifecycle pairs that will be invoked by this lifecycle manager The order the list will be the order in which the life cycle phases will be invoked the LifecyclePair.getBegin() phases will be called in order, the
LifecyclePair.getEnd() will be called in opposite order. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final NotInLifecyclePhase notInLifecyclePhase
protected String currentPhase
protected String executingPhase
protected Set completedPhases
protected Set transitions
protected List<LifecyclePair> lifecyclePairs
protected LifecycleState state
| Constructor Detail |
|---|
public RegistryLifecycleManager()
| Method Detail |
|---|
public List<LifecyclePair> getLifecyclePairs()
LifecycleManager
getLifecyclePairs in interface LifecycleManagerpublic void setLifecyclePairs(List<LifecyclePair> lifecyclePairs)
LifecycleManagerLifecyclePair.getBegin() phases will be called in order, the
LifecyclePair.getEnd() will be called in opposite order. i.e. call initialise first and dispose last.
setLifecyclePairs in interface LifecycleManagerlifecyclePairs - The lifecycle pairs that will be invoked by this lifecycle managerpublic void registerLifecycle(LifecyclePair lifecyclePair)
LifecycleManagerLifecyclePair.getBegin() phases will be called in order, the
LifecyclePair.getEnd() will be called in opposite order. i.e. call initialise first and dispose last.
registerLifecycle in interface LifecycleManagerlifecyclePair - a lifecycle pair that will be invoked by this lifecycle manager
public void firePhase(MuleContext muleContext,
String phase)
throws MuleException
MuleExceptionprotected List<LifecyclePhase> getPhasesIndex()
protected int getPhaseIndex(String phase)
protected LifecyclePhase getPhaseForIndex(int phaseIndex)
protected void doApplyPhase(Registry registry,
String phase)
throws MuleException
MuleException
public void applyPhase(Object object,
String phase)
throws MuleException
LifecycleManager
applyPhase in interface LifecycleManagerMuleException
public void fireLifecycle(Registry registry,
String phase)
throws MuleException
LifecycleManager
fireLifecycle in interface LifecycleManagerMuleExceptionpublic String getCurrentPhase()
LifecycleManagerLifecycleManager.getExecutingPhase() to get the phase being executed.
getCurrentPhase in interface LifecycleManagerpublic String getExecutingPhase()
getExecutingPhase in interface LifecycleManagerprotected void setCurrentPhase(LifecyclePhase phase)
protected void setExecutingPhase(String phase)
public void reset()
LifecycleManager
reset in interface LifecycleManagerpublic boolean isPhaseComplete(String phaseName)
isPhaseComplete in interface LifecycleManager
public void applyCompletedPhases(Object object)
throws MuleException
LifecycleManager
applyCompletedPhases in interface LifecycleManagerMuleException
public void checkPhase(String name)
throws IllegalStateException
checkPhase in interface LifecycleManagerIllegalStateException
protected LifecyclePhase lookupPhase(String phase)
throws IllegalArgumentException
IllegalArgumentExceptionpublic LifecycleState getState()
LifecycleManager
getState in interface LifecycleManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||