Class TaskBatchExecutionListener

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

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

    • TaskBatchExecutionListener

      public TaskBatchExecutionListener(TaskBatchDao taskBatchDao)
      taskBatchDao - dao used to persist the relationship. Must not be null
  • Method Details

    • onTaskStartup

      public void onTaskStartup(TaskExecution taskExecution)
      Description copied from interface: TaskExecutionListener
      Invoked after the TaskExecution has been stored in the TaskRepository.
      Specified by:
      onTaskStartup in interface TaskExecutionListener
      taskExecution - instance containing the information about the current task.
    • 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