org.springframework.batch.core.step
Class NoWorkFoundStepExecutionListener

java.lang.Object
  extended by org.springframework.batch.core.listener.StepExecutionListenerSupport
      extended by org.springframework.batch.core.step.NoWorkFoundStepExecutionListener
All Implemented Interfaces:
StepExecutionListener, StepListener

public class NoWorkFoundStepExecutionListener
extends StepExecutionListenerSupport

Fails the step if no items have been processed ( item count is 0).

Author:
Robert Kasanicky

Constructor Summary
NoWorkFoundStepExecutionListener()
           
 
Method Summary
 ExitStatus afterStep(StepExecution stepExecution)
          Give a listener a chance to modify the exit status from a step.
 
Methods inherited from class org.springframework.batch.core.listener.StepExecutionListenerSupport
beforeStep, onErrorInStep
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoWorkFoundStepExecutionListener

public NoWorkFoundStepExecutionListener()
Method Detail

afterStep

public ExitStatus afterStep(StepExecution stepExecution)
Description copied from interface: StepExecutionListener
Give a listener a chance to modify the exit status from a step. The value returned will be combined with the normal exit status using ExitStatus.and(ExitStatus). Called after successful execution of step's processing logic. Throwing exception in this method will cause step to fail.

Specified by:
afterStep in interface StepExecutionListener
Overrides:
afterStep in class StepExecutionListenerSupport
Returns:
an ExitStatus to combine with the normal value. Return null to leave the old value unchanged.


Copyright © 2009 SpringSource. All Rights Reserved.