org.springframework.batch.core.jsr

## Class JobListenerAdapter

- java.lang.Object
- - org.springframework.batch.core.jsr.JobListenerAdapter

- All Implemented Interfaces:
    JobExecutionListener

      public class JobListenerAdapter
      extends java.lang.Object
      implements JobExecutionListener

  Wrapper class to adapt the `JobListener` to a `JobExecutionListener`.
  Since:
    3.0
  Author:
    Michael Minella

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JobListenerAdapter(javax.batch.api.listener.JobListener delegate)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `afterJob(JobExecution jobExecution)` Callback after completion of a job.
    `void` | `beforeJob(JobExecution jobExecution)` Callback before a job executes.

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

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

- - ### Constructor Detail

    - #### JobListenerAdapter

          public JobListenerAdapter(javax.batch.api.listener.JobListener delegate)

      Parameters:
        `delegate` - to be delegated to

  - ### Method Detail

    - #### beforeJob

          public void beforeJob(JobExecution jobExecution)

      Description copied from interface: `JobExecutionListener`
      Callback before a job executes.
      Specified by:
        `beforeJob` in interface `JobExecutionListener`
      Parameters:
        `jobExecution` - the current `JobExecution`

    - #### afterJob

          public void afterJob(JobExecution jobExecution)

      Description copied from interface: `JobExecutionListener`
      Callback after completion of a job. Called after both both successful and failed executions. To perform logic on a particular status, use "if (jobExecution.getStatus() == BatchStatus.X)".
      Specified by:
        `afterJob` in interface `JobExecutionListener`
      Parameters:
        `jobExecution` - the current `JobExecution`