public class CompositeJobExecutionListener extends java.lang.Object implements JobExecutionListener
| Constructor and Description |
|---|
CompositeJobExecutionListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterJob(JobExecution jobExecution)
Call the registered listeners in reverse order, respecting and
prioritising those that implement
Ordered. |
void |
beforeJob(JobExecution jobExecution)
Call the registered listeners in order, respecting and prioritising those
that implement
Ordered. |
void |
register(JobExecutionListener jobExecutionListener)
Register additional listener.
|
void |
setListeners(java.util.List<? extends JobExecutionListener> listeners)
Public setter for the listeners.
|
public void setListeners(java.util.List<? extends JobExecutionListener> listeners)
listeners - list of JobExecutionListeners to be called when job execution events occur.public void register(JobExecutionListener jobExecutionListener)
jobExecutionListener - instance JobExecutionListener to be registered.public void afterJob(JobExecution jobExecution)
Ordered.afterJob in interface JobExecutionListenerjobExecution - the current JobExecutionJobExecutionListener.afterJob(org.springframework.batch.core.JobExecution)public void beforeJob(JobExecution jobExecution)
Ordered.beforeJob in interface JobExecutionListenerjobExecution - the current JobExecutionJobExecutionListener.beforeJob(org.springframework.batch.core.JobExecution)