public class InitDisposeLifecycleInterceptor extends Object implements LifecycleInterceptor
LifecycleInterceptor which tracks the completion of the Initialisable
phase so that if it fails to complete, the Disposable phase is only applied on
the target objects on which it could be successfully applied.| Constructor and Description |
|---|
InitDisposeLifecycleInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterLifecycle(LifecyclePhase phase,
Object object)
|
boolean |
beforeLifecycle(LifecyclePhase phase,
Object object)
Evaluates the following conditions in order to determine if the phase
should be skipped:
|
void |
onPhaseCompleted(LifecyclePhase phase)
If the
phase name is Initialisable.PHASE_NAME then it
marks the Initialisable phase as completed and clears all other
tracking state so that memory can be reclaimed. |
public boolean beforeLifecycle(LifecyclePhase phase, Object object)
phase name is Disposable.PHASE_NAMEInitialisable phase was not successfully completedobject is Initialisable yet it wasn't initialised
If all three of the above conditions are met, then this method returns false.
Otherwise, it returns true
beforeLifecycle in interface LifecycleInterceptorphase - the phase being appliedobject - the target objectphase should be applied on the objectpublic void afterLifecycle(LifecyclePhase phase, Object object)
afterLifecycle in interface LifecycleInterceptorphase - the phase that was appliedobject - the target objectpublic void onPhaseCompleted(LifecyclePhase phase)
phase name is Initialisable.PHASE_NAME then it
marks the Initialisable phase as completed and clears all other
tracking state so that memory can be reclaimed.onPhaseCompleted in interface LifecycleInterceptorphase - the phase that was appliedCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.