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