Interface TaskExecutionListener
- All Known Implementing Classes:
SimpleCommandLineArgsProvider
,TaskBatchExecutionListener
,TaskExecutionListenerSupport
,TaskListenerExecutor
public interface TaskExecutionListener
The listener interface for receiving task execution events.
- Author:
- Glenn Renfro
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
onTaskEnd
(TaskExecution taskExecution) Invoked before theTaskExecution
has been updated in theTaskRepository
upon task end.default void
onTaskFailed
(TaskExecution taskExecution, Throwable throwable) Invoked if an uncaught exception occurs during a task execution.default void
onTaskStartup
(TaskExecution taskExecution) Invoked after theTaskExecution
has been stored in theTaskRepository
.
-
Method Details
-
onTaskStartup
Invoked after theTaskExecution
has been stored in theTaskRepository
.- Parameters:
taskExecution
- instance containing the information about the current task.
-
onTaskEnd
Invoked before theTaskExecution
has been updated in theTaskRepository
upon task end.- Parameters:
taskExecution
- instance containing the information about the current task.
-
onTaskFailed
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.- Parameters:
taskExecution
- instance containing the information about the current task.throwable
- the uncaught exception that was thrown during task execution.
-