Class CompositeJobExecutionListener
java.lang.Object
org.springframework.batch.core.listener.CompositeJobExecutionListener
- All Implemented Interfaces:
JobExecutionListener
- Author:
- Dave Syer, Mahmoud Ben Hassine
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterJob(JobExecution jobExecution) Call the registered listeners in reverse order, respecting and prioritising those that implementOrdered.voidbeforeJob(JobExecution jobExecution) Call the registered listeners in order, respecting and prioritising those that implementOrdered.voidregister(JobExecutionListener jobExecutionListener) Register additional listener.voidsetListeners(List<? extends JobExecutionListener> listeners) Public setter for the listeners.
-
Constructor Details
-
CompositeJobExecutionListener
public CompositeJobExecutionListener()
-
-
Method Details
-
setListeners
Public setter for the listeners.- Parameters:
listeners- list ofJobExecutionListeners to be called when job execution events occur.
-
register
Register additional listener.- Parameters:
jobExecutionListener- instanceJobExecutionListenerto be registered.
-
afterJob
Call the registered listeners in reverse order, respecting and prioritising those that implementOrdered.- Specified by:
afterJobin interfaceJobExecutionListener- Parameters:
jobExecution- the currentJobExecution- See Also:
-
beforeJob
Call the registered listeners in order, respecting and prioritising those that implementOrdered.- Specified by:
beforeJobin interfaceJobExecutionListener- Parameters:
jobExecution- the currentJobExecution- See Also:
-