Class TaskListenerExecutor
java.lang.Object
org.springframework.cloud.task.listener.annotation.TaskListenerExecutor
- All Implemented Interfaces:
TaskExecutionListener
Identifies all beans that contain a TaskExecutionListener annotation and stores the
associated method so that it can be called by the
TaskExecutionListener
at the
appropriate time.- Author:
- Glenn Renfro, Isik Erhan
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onTaskEnd
(TaskExecution taskExecution) Executes all the methods that have been annotated with @AfterTask.void
onTaskFailed
(TaskExecution taskExecution, Throwable throwable) Executes all the methods that have been annotated with @FailedTask.void
onTaskStartup
(TaskExecution taskExecution) Executes all the methods that have been annotated with @BeforeTask.
-
Constructor Details
-
TaskListenerExecutor
-
-
Method Details
-
onTaskStartup
Executes all the methods that have been annotated with @BeforeTask.- Specified by:
onTaskStartup
in interfaceTaskExecutionListener
- Parameters:
taskExecution
- associated with the event.
-
onTaskEnd
Executes all the methods that have been annotated with @AfterTask.- Specified by:
onTaskEnd
in interfaceTaskExecutionListener
- Parameters:
taskExecution
- associated with the event.
-
onTaskFailed
Executes all the methods that have been annotated with @FailedTask.- Specified by:
onTaskFailed
in interfaceTaskExecutionListener
- Parameters:
throwable
- that was not caught for the task execution.taskExecution
- associated with the event.
-