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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonTaskEnd(TaskExecution taskExecution) Executes all the methods that have been annotated with @AfterTask.voidonTaskFailed(TaskExecution taskExecution, Throwable throwable) Executes all the methods that have been annotated with @FailedTask.voidonTaskStartup(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:
onTaskStartupin interfaceTaskExecutionListener- Parameters:
taskExecution- associated with the event.
-
onTaskEnd
Executes all the methods that have been annotated with @AfterTask.- Specified by:
onTaskEndin interfaceTaskExecutionListener- Parameters:
taskExecution- associated with the event.
-
onTaskFailed
Executes all the methods that have been annotated with @FailedTask.- Specified by:
onTaskFailedin interfaceTaskExecutionListener- Parameters:
throwable- that was not caught for the task execution.taskExecution- associated with the event.
-