Class TaskBatchExecutionListener
java.lang.Object
org.springframework.cloud.task.batch.listener.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.
- Author:
- Michael Minella
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
beforeJob
(org.springframework.batch.core.JobExecution jobExecution) int
getOrder()
void
onTaskStartup
(TaskExecution taskExecution) Invoked after theTaskExecution
has been stored in theTaskRepository
.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
Methods inherited from interface org.springframework.cloud.task.listener.TaskExecutionListener
onTaskEnd, onTaskFailed
-
Constructor Details
-
TaskBatchExecutionListener
- Parameters:
taskBatchDao
- dao used to persist the relationship. Must not be null
-
-
Method Details
-
onTaskStartup
Description copied from interface:TaskExecutionListener
Invoked after theTaskExecution
has been stored in theTaskRepository
.- Specified by:
onTaskStartup
in interfaceTaskExecutionListener
- Parameters:
taskExecution
- instance containing the information about the current task.
-
beforeJob
public void beforeJob(org.springframework.batch.core.JobExecution jobExecution) - Specified by:
beforeJob
in interfaceorg.springframework.batch.core.JobExecutionListener
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-