Package org.springframework.batch.core
Interface StepExecutionListener
- All Superinterfaces:
StepListener
- All Known Implementing Classes:
ChunkMessageChannelItemWriter,CompositeStepExecutionListener,ExecutionContextPromotionListener,JobParameterExecutionContextCopyListener,MulticasterBatchListener,NoWorkFoundStepExecutionListener,StepExecutionListenerSupport,StepExecutionSimpleCompletionPolicy,StepListenerSupport,SystemCommandTasklet
Listener interface for the lifecycle of a
Step.- Author:
- Lucas Ward, Dave Syer, Mahmoud Ben Hassine, Parikshit Dutta
-
Method Summary
Modifier and TypeMethodDescriptiondefault ExitStatusafterStep(StepExecution stepExecution) Give a listener a chance to modify the exit status from a step.default voidbeforeStep(StepExecution stepExecution) Initialize the state of the listener with theStepExecutionfrom the current scope.
-
Method Details
-
beforeStep
Initialize the state of the listener with theStepExecutionfrom the current scope.- Parameters:
stepExecution- instance ofStepExecution.
-
afterStep
Give a listener a chance to modify the exit status from a step. The value returned will be combined with the normal exit status usingExitStatus.and(ExitStatus). Called after execution of step's processing logic (both successful or failed). Throwing exception in this method has no effect, it will only be logged.- Parameters:
stepExecution-StepExecutioninstance.- Returns:
- an
ExitStatusto combine with the normal value. Returnnullto leave the old value unchanged.
-