Package org.springframework.cloud.task.batch.listener

# Class EventEmittingJobExecutionListener

java.lang.Object
org.springframework.cloud.task.batch.listener.EventEmittingJobExecutionListener

All Implemented Interfaces:
  `org.springframework.batch.core.JobExecutionListener`, `org.springframework.core.Ordered`

public class EventEmittingJobExecutionListener extends Object implements org.springframework.batch.core.JobExecutionListener, org.springframework.core.Ordered
Provides `JobExecutionEvent` at both the start and end of the job's execution.

Author:
  Michael Minella, Glenn Renfro, Ali Shahbour

- ## Field Summary

  ### Fields inherited from interface org.springframework.core.Ordered

  `HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `EventEmittingJobExecutionListener(MessagePublisher messagePublisher, int order, TaskEventProperties properties)`
  `EventEmittingJobExecutionListener(MessagePublisher messagePublisher, TaskEventProperties properties)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `afterJob(org.springframework.batch.core.JobExecution jobExecution)`
  `void`
  `beforeJob(org.springframework.batch.core.JobExecution jobExecution)`
  `int`
  `getOrder()`

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

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

- ## Constructor Details

  - ### EventEmittingJobExecutionListener

    public EventEmittingJobExecutionListener(MessagePublisher messagePublisher, TaskEventProperties properties)

  - ### EventEmittingJobExecutionListener

    public EventEmittingJobExecutionListener(MessagePublisher messagePublisher, int order, TaskEventProperties properties)

- ## Method Details

  - ### beforeJob

    public void beforeJob(org.springframework.batch.core.JobExecution jobExecution)
    Specified by:
      `beforeJob` in interface `org.springframework.batch.core.JobExecutionListener`

  - ### afterJob

    public void afterJob(org.springframework.batch.core.JobExecution jobExecution)
    Specified by:
      `afterJob` in interface `org.springframework.batch.core.JobExecutionListener`

  - ### getOrder

    public int getOrder()
    Specified by:
      `getOrder` in interface `org.springframework.core.Ordered`