Class NoWorkFoundStepExecutionListener
java.lang.Object
org.springframework.batch.core.step.NoWorkFoundStepExecutionListener
- All Implemented Interfaces:
StepExecutionListener,StepListener
Fails the step if no items have been processed ( item count is 0).
- Author:
- Robert Kasanicky, Mahmoud Ben Hassine
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionafterStep(StepExecution stepExecution) Give a listener a chance to modify the exit status from a step.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.batch.core.StepExecutionListener
beforeStep
-
Constructor Details
-
NoWorkFoundStepExecutionListener
public NoWorkFoundStepExecutionListener()
-
-
Method Details
-
afterStep
Description copied from interface:StepExecutionListenerGive 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.- Specified by:
afterStepin interfaceStepExecutionListener- Parameters:
stepExecution-StepExecutioninstance.- Returns:
- an
ExitStatusto combine with the normal value. Returnnullto leave the old value unchanged.
-