Class CompositeJobExecutionListener
java.lang.Object
org.springframework.batch.core.listener.CompositeJobExecutionListener
- All Implemented Interfaces:
JobExecutionListener
- Author:
- Dave Syer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterJob
(JobExecution jobExecution) Call the registered listeners in reverse order, respecting and prioritising those that implementOrdered
.void
beforeJob
(JobExecution jobExecution) Call the registered listeners in order, respecting and prioritising those that implementOrdered
.void
register
(JobExecutionListener jobExecutionListener) Register additional listener.void
setListeners
(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 ofJobExecutionListener
s to be called when job execution events occur.
-
register
Register additional listener.- Parameters:
jobExecutionListener
- instanceJobExecutionListener
to be registered.
-
afterJob
Call the registered listeners in reverse order, respecting and prioritising those that implementOrdered
.- Specified by:
afterJob
in interfaceJobExecutionListener
- Parameters:
jobExecution
- the currentJobExecution
- See Also:
-
beforeJob
Call the registered listeners in order, respecting and prioritising those that implementOrdered
.- Specified by:
beforeJob
in interfaceJobExecutionListener
- Parameters:
jobExecution
- the currentJobExecution
- See Also:
-