Interface ProcessingLifecycle

All Known Subinterfaces:
ProcessingContext
All Known Implementing Classes:
LegacyMessageSupportingContext, ResourceOverridingProcessingContext, UnitOfWork

public interface ProcessingLifecycle
Interface dedicate to managing the lifecycle of any process.

Throughout the lifecycle of any process, actions need to be taken in different phases. Numerous default phases are defined that are used throughout the framework for these actions. The ProcessingLifecycle has shorthand operations corresponding to these DefaultPhases. For example, the onPreInvocation(Function) uses the ProcessingLifecycle.DefaultPhases.PRE_INVOCATION phase.

When the ProcessingLifecycle is started, the phases are invoked beginning with the lowest ProcessingLifecycle.Phase.order(), moving up until all phase actions are executed. Note that actions registered in a Phase with the same order may be executed in parallel.

If necessary, a custom ProcessingLifecycle.Phase can be defined that can be invoked before or after any other Phase. To ensure it is invoked before/after one of the DefaultPhases, set the ProcessingLifecycle.Phase.order() to a value higher/lower than the DefaultPhase you want the step to occur before or after.

Since:
5.0.0
Author:
Allard Buijze, Gerard Klijs, Milan Savić, Mitchell Herrijgers, Sara Pellegrini, Steven van Beelen