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
-
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, wait
Methods inherited from interface org.springframework.batch.core.StepExecutionListener
beforeStep
-
Constructor Details
-
NoWorkFoundStepExecutionListener
public NoWorkFoundStepExecutionListener()
-
-
Method Details
-
afterStep
Description copied from interface:StepExecutionListener
Give a listener a chance to modify the exit status from a step. The value returned is combined with the normal exit status by usingExitStatus.and(ExitStatus)
.Called after execution of the step's processing logic (whether successful or failed). Throwing an exception in this method has no effect, as it is only logged.
- Specified by:
afterStep
in interfaceStepExecutionListener
- Parameters:
stepExecution
- aStepExecution
instance.- Returns:
- an
ExitStatus
to combine with the normal value. Returnnull
(the default) to leave the old value unchanged.
-