Class CompositeStepExecutionListener
java.lang.Object
org.springframework.batch.core.listener.CompositeStepExecutionListener
- All Implemented Interfaces:
StepExecutionListener,StepListener
- Author:
- Lucas Ward, Dave Syer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionafterStep(StepExecution stepExecution) Call the registered listeners in reverse order, respecting and prioritizing those that implementOrdered.voidbeforeStep(StepExecution stepExecution) Call the registered listeners in order, respecting and prioritizing those that implementOrdered.voidregister(StepExecutionListener stepExecutionListener) Register additional listener.voidsetListeners(StepExecutionListener[] listeners) Public setter for the listeners.
-
Constructor Details
-
CompositeStepExecutionListener
public CompositeStepExecutionListener()
-
-
Method Details
-
setListeners
Public setter for the listeners.- Parameters:
listeners- list ofStepExecutionListeners to be called when step execution events occur.
-
register
Register additional listener.- Parameters:
stepExecutionListener- instance ofStepExecutionListenerto be registered.
-
afterStep
Call the registered listeners in reverse order, respecting and prioritizing those that implementOrdered.- Specified by:
afterStepin interfaceStepExecutionListener- Parameters:
stepExecution- aStepExecutioninstance.- Returns:
- an
ExitStatusto combine with the normal value. Returnnull(the default) to leave the old value unchanged. - See Also:
-
beforeStep
Call the registered listeners in order, respecting and prioritizing those that implementOrdered.- Specified by:
beforeStepin interfaceStepExecutionListener- Parameters:
stepExecution- instance ofStepExecution.- See Also:
-