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

# Class TaskBatchExecutionListener

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

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

public class TaskBatchExecutionListener extends Object implements org.springframework.batch.core.JobExecutionListener, org.springframework.core.Ordered
Responsible for storing the relationship between a Spring Batch job and the Spring Cloud task it was executed within.

Author:
  Michael Minella

- ## Field Summary

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

  `HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TaskBatchExecutionListener(TaskBatchDao taskBatchDao)`

- ## Method Summary

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

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

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

  ### Methods inherited from interface org.springframework.batch.core.JobExecutionListener

  `afterJob`

- ## Constructor Details

  - ### TaskBatchExecutionListener

    public TaskBatchExecutionListener(TaskBatchDao taskBatchDao)
    Parameters:
      `taskBatchDao` - dao used to persist the relationship. Must not be null

- ## Method Details

  - ### onTaskStartup

    @BeforeTask public void onTaskStartup(TaskExecution taskExecution)

  - ### beforeJob

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

  - ### getOrder

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