org.mule.lifecycle
Class GenericLifecycleManager

java.lang.Object
  extended by org.mule.lifecycle.GenericLifecycleManager
All Implemented Interfaces:
LifecycleManager

public class GenericLifecycleManager
extends Object
implements LifecycleManager


Field Summary
protected  Set completedPhases
           
protected  String currentPhase
           
protected  String executingPhase
           
protected  Map<String,Integer> index
           
protected  ListOrderedSet lifecycles
           
protected static NotInLifecyclePhase notInLifecyclePhase
           
 
Constructor Summary
GenericLifecycleManager()
           
 
Method Summary
 void applyCompletedPhases(Object object)
          Successively applies all completed lifecycle phase to an object.
 LifecyclePhase applyPhase(Collection objects, String phase)
          Applies lifecycle phase to a collection of objects.
 void checkPhase(String name)
           
 void firePhase(MuleContext muleContext, String phase)
          Applies lifecycle phase to all objects in the Registry.
 String getCurrentPhase()
           
 String getExecutingPhase()
          Returns the name of the currently executing phase or null if there is not current phase.
 Set getLifecycles()
           
 boolean isPhaseComplete(String phaseName)
           
protected  LifecyclePhase lookupPhase(String phase)
           
 void registerLifecycle(LifecyclePhase phase)
           
 void reset()
           
protected  void setCurrentPhase(LifecyclePhase phase)
           
protected  void setExecutingPhase(String phase)
           
 void setLifecycles(Set lifecycles)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

notInLifecyclePhase

protected static final NotInLifecyclePhase notInLifecyclePhase

currentPhase

protected String currentPhase

executingPhase

protected String executingPhase

lifecycles

protected ListOrderedSet lifecycles

index

protected Map<String,Integer> index

completedPhases

protected Set completedPhases
Constructor Detail

GenericLifecycleManager

public GenericLifecycleManager()
Method Detail

getLifecycles

public Set getLifecycles()
Specified by:
getLifecycles in interface LifecycleManager

setLifecycles

public void setLifecycles(Set lifecycles)
Specified by:
setLifecycles in interface LifecycleManager

registerLifecycle

public void registerLifecycle(LifecyclePhase phase)
Specified by:
registerLifecycle in interface LifecycleManager

firePhase

public void firePhase(MuleContext muleContext,
                      String phase)
               throws MuleException
Applies lifecycle phase to all objects in the Registry.

Specified by:
firePhase in interface LifecycleManager
Throws:
MuleException

applyPhase

public LifecyclePhase applyPhase(Collection objects,
                                 String phase)
                          throws MuleException
Description copied from interface: LifecycleManager
Applies lifecycle phase to a collection of objects.

Specified by:
applyPhase in interface LifecycleManager
Throws:
MuleException

getCurrentPhase

public String getCurrentPhase()
Specified by:
getCurrentPhase in interface LifecycleManager

getExecutingPhase

public String getExecutingPhase()
Returns the name of the currently executing phase or null if there is not current phase.

Specified by:
getExecutingPhase in interface LifecycleManager

setCurrentPhase

protected void setCurrentPhase(LifecyclePhase phase)

setExecutingPhase

protected void setExecutingPhase(String phase)

reset

public void reset()
Specified by:
reset in interface LifecycleManager

isPhaseComplete

public boolean isPhaseComplete(String phaseName)
Specified by:
isPhaseComplete in interface LifecycleManager

applyCompletedPhases

public void applyCompletedPhases(Object object)
                          throws MuleException
Description copied from interface: LifecycleManager
Successively applies all completed lifecycle phase to an object.

Specified by:
applyCompletedPhases in interface LifecycleManager
Throws:
MuleException

checkPhase

public void checkPhase(String name)
                throws IllegalStateException
Specified by:
checkPhase in interface LifecycleManager
Throws:
IllegalStateException

lookupPhase

protected LifecyclePhase lookupPhase(String phase)
                              throws IllegalArgumentException
Throws:
IllegalArgumentException


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.