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 -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeJob(org.springframework.batch.core.JobExecution jobExecution) intgetOrder()voidonTaskStartup(TaskExecution taskExecution) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.batch.core.JobExecutionListener
afterJob
-
Constructor Details
-
TaskBatchExecutionListener
- Parameters:
taskBatchDao- dao used to persist the relationship. Must not be null
-
-
Method Details
-
onTaskStartup
-
beforeJob
public void beforeJob(org.springframework.batch.core.JobExecution jobExecution) - Specified by:
beforeJobin interfaceorg.springframework.batch.core.JobExecutionListener
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-