public interface LifecycleInterceptor
lifecycle phases over each target object.| Modifier and Type | Method and Description |
|---|---|
void |
afterPhaseExecution(LifecyclePhase phase,
Object object,
Optional<Exception> exceptionThrownOptional)
Invoked after the given
phase was applied over the object. |
boolean |
beforePhaseExecution(LifecyclePhase phase,
Object object)
Invoked before the given
phase is applied over the object. |
void |
onPhaseCompleted(LifecyclePhase phase)
Invoked when the given
phase finished processing all the eligible target objects, including those for which
beforePhaseExecution(LifecyclePhase, Object) return false |
boolean beforePhaseExecution(LifecyclePhase phase, Object object)
phase is applied over the object.
This method's return value also indicates if the lifecycle should in fact be applied over the object or if it should
be skipped. Note that this interceptor is not responsible from actually preventing the phase from being applied. It's
the invoker's responsibility to skip the object if the interceptor indicates so.
phase - the phase being appliedobject - the target objectphase should be applied or cancelled for the given objectvoid afterPhaseExecution(LifecyclePhase phase, Object object, Optional<Exception> exceptionThrownOptional)
phase was applied over the object.phase - the phase that was appliedobject - the target objectexceptionThrownOptional - an optional with an exception. If present then there was an error execution the phase, otherwise the
phase execution was successfulvoid onPhaseCompleted(LifecyclePhase phase)
phase finished processing all the eligible target objects, including those for which
beforePhaseExecution(LifecyclePhase, Object) return falsephase - the phase that was appliedCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.