Class StepExecutionInvocationHandlerNotifier
- java.lang.Object
-
- de.bmiag.tapir.execution.executor.StepExecutionInvocationHandlerNotifier
-
@Component("tapirStepExecutionInvocationHandlerNotifier") public class StepExecutionInvocationHandlerNotifier extends java.lang.Object
TheStepExecutionInvocationHandlerNotifier
notifies all registeredstep execution invocation handlers
before and after a step is executed.- Since:
- 2.0.0
- Author:
- Oliver Libutzki <[email protected]>
-
-
Constructor Summary
Constructors Constructor Description StepExecutionInvocationHandlerNotifier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StepExecutionInvocationHandler.Result
notifyHandlers(java.util.function.Function<StepExecutionInvocationHandler,StepExecutionInvocationHandler.Result> stepExecutionInvocationHandlerFunction)
Notifies each registeredStepExecutionInvocationHandler
of the given event
If a notifiedStepExecutionInvocationHandler
returnsStepExecutionInvocationHandler.Result.SKIP
or throws an exception the result/exception is stored and all the upcoming handlers are notified anyway.
-
-
-
Method Detail
-
notifyHandlers
public StepExecutionInvocationHandler.Result notifyHandlers(java.util.function.Function<StepExecutionInvocationHandler,StepExecutionInvocationHandler.Result> stepExecutionInvocationHandlerFunction)
Notifies each registeredStepExecutionInvocationHandler
of the given event
If a notifiedStepExecutionInvocationHandler
returnsStepExecutionInvocationHandler.Result.SKIP
or throws an exception the result/exception is stored and all the upcoming handlers are notified anyway. After notifying all handlers, the first occurred exception is rethrown orStepExecutionInvocationHandler.Result.SKIP
is returned, if any handler has returnedStepExecutionInvocationHandler.Result.SKIP
.- Parameters:
stepExecutionInvocationHandlerFunction
- The code which should be executed on notification- Returns:
- tells the
ExecutionPlanExecutor
how to proceed - Since:
- 2.0.0
-
-