public class DefaultLifecyclePhase extends Object implements LifecyclePhase, MuleContextAware
LifecycleManager and by used to enforce a lifecycle
phase on an object. Usually, Lifecycle phases have a fixed configuration in which
case a specialisation of this class should be created that initialises its
configuration internally.
Note that this class and LifecycleTransitionResult
both make assumptions about the interfaces used - the return values and
exceptions. These are, currently, that the return value is either void or
LifecycleTransitionResult and either 0 or 1
exceptions can be thrown which are either InstantiationException or
LifecycleException.
LifecyclePhase| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
logger |
ALL_PHASES| Constructor and Description |
|---|
DefaultLifecyclePhase(String name,
Class<?> lifecycleClass,
String oppositeLifecyclePhase) |
public void setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAwareprotected List<?> sortLifecycleInstances(Collection<?> objects, LifecycleObject lo)
objects before the
lifecycle method is applied to them. This method does not apply any special
ordering to objects.objects - lo - public void addOrderedLifecycleObject(LifecycleObject lco)
addOrderedLifecycleObject in interface LifecyclePhasepublic void removeOrderedLifecycleObject(LifecycleObject lco)
removeOrderedLifecycleObject in interface LifecyclePhaseprotected boolean ignoreType(Class<?> type)
public Set<LifecycleObject> getOrderedLifecycleObjects()
getOrderedLifecycleObjects in interface LifecyclePhasepublic void setOrderedLifecycleObjects(Set<LifecycleObject> orderedLifecycleObjects)
setOrderedLifecycleObjects in interface LifecyclePhasepublic Class<?>[] getIgnoredObjectTypes()
getIgnoredObjectTypes in interface LifecyclePhasepublic void setIgnoredObjectTypes(Class<?>[] ignorredObjectTypes)
setIgnoredObjectTypes in interface LifecyclePhasepublic Class<?> getLifecycleClass()
getLifecycleClass in interface LifecyclePhasepublic void setLifecycleClass(Class<?> lifecycleClass)
setLifecycleClass in interface LifecyclePhasepublic String getName()
NamedObjectgetName in interface NamedObjectpublic Set<String> getSupportedPhases()
getSupportedPhases in interface LifecyclePhasepublic void setSupportedPhases(Set<String> supportedPhases)
setSupportedPhases in interface LifecyclePhasepublic void registerSupportedPhase(String phase)
registerSupportedPhase in interface LifecyclePhasepublic boolean isPhaseSupported(String phase)
isPhaseSupported in interface LifecyclePhasepublic void applyLifecycle(Object o) throws LifecycleException
applyLifecycle in interface LifecyclePhaseLifecycleExceptionpublic String getOppositeLifecyclePhase()
getOppositeLifecyclePhase in interface LifecyclePhaseCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.