Class TaskExecutionListenerSupport
java.lang.Object
org.springframework.cloud.task.listener.TaskExecutionListenerSupport
- All Implemented Interfaces:
TaskExecutionListener
- Direct Known Subclasses:
SimpleCommandLineArgsProvider
A no-op implementation of the
TaskExecutionListener
to allow for overriding
only the methods of interest.- Since:
- 1.2
- Author:
- Michael Minella
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onTaskEnd
(TaskExecution taskExecution) Invoked before theTaskExecution
has been updated in theTaskRepository
upon task end.void
onTaskFailed
(TaskExecution taskExecution, Throwable throwable) Invoked if an uncaught exception occurs during a task execution.void
onTaskStartup
(TaskExecution taskExecution) Invoked after theTaskExecution
has been stored in theTaskRepository
.
-
Constructor Details
-
TaskExecutionListenerSupport
public TaskExecutionListenerSupport()
-
-
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.
-
onTaskEnd
Description copied from interface:TaskExecutionListener
Invoked before theTaskExecution
has been updated in theTaskRepository
upon task end.- Specified by:
onTaskEnd
in interfaceTaskExecutionListener
- Parameters:
taskExecution
- instance containing the information about the current task.
-
onTaskFailed
Description copied from interface:TaskExecutionListener
Invoked if an uncaught exception occurs during a task execution. This invocation will occur before theTaskExecution
has been updated in theTaskRepository
and before the onTaskEnd is called.- Specified by:
onTaskFailed
in interfaceTaskExecutionListener
- Parameters:
taskExecution
- instance containing the information about the current task.throwable
- the uncaught exception that was thrown during task execution.
-