Package org.springframework.batch.core.listener

# Class CompositeJobExecutionListener

java.lang.Object
org.springframework.batch.core.listener.CompositeJobExecutionListener

All Implemented Interfaces:
  `JobExecutionListener`

public class CompositeJobExecutionListener extends Object implements JobExecutionListener

Author:
  Dave Syer

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CompositeJobExecutionListener()`

- ## Method Summary

  Modifier and Type
  Method
  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(List<? extends JobExecutionListener> listeners)`
  Public setter for the listeners.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### CompositeJobExecutionListener

    public CompositeJobExecutionListener()

- ## Method Details

  - ### setListeners

    public void setListeners(List<? extends JobExecutionListener> listeners)
    Public setter for the listeners.
    Parameters:
      `listeners` - list of `JobExecutionListener`s to be called when job execution events occur.

  - ### register

    public void register(JobExecutionListener jobExecutionListener)
    Register additional listener.
    Parameters:
      `jobExecutionListener` - instance `JobExecutionListener` to be registered.

  - ### afterJob

    public void afterJob(JobExecution jobExecution)
    Call the registered listeners in reverse order, respecting and prioritising those that implement `Ordered`.
    Specified by:
      `afterJob` in interface `JobExecutionListener`
    Parameters:
      `jobExecution` - the current `JobExecution`
    See Also:
      - `JobExecutionListener.afterJob(org.springframework.batch.core.JobExecution)`

  - ### beforeJob

    public void beforeJob(JobExecution jobExecution)
    Call the registered listeners in order, respecting and prioritising those that implement `Ordered`.
    Specified by:
      `beforeJob` in interface `JobExecutionListener`
    Parameters:
      `jobExecution` - the current `JobExecution`
    See Also:
      - `JobExecutionListener.beforeJob(org.springframework.batch.core.JobExecution)`