Interface TaskListener
-
- All Superinterfaces:
org.springframework.core.Ordered
- All Known Implementing Classes:
KibanaLogFieldsTaskListener,LoggingTaskListener,OpenTracingAsyncTaskListener
public interface TaskListener extends org.springframework.core.OrderedAn interface that allows listeners to be informed about the task's lifecycle.The setSharedTaskContext method is called before the task is being run. Then the startExecution method is called (prior to starting the task). Optionally the timeout method is called. Then the finish is called last.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidfinish()Called just after a task is finished.default voidsetSharedTaskContext(SharedTaskContext sharedTaskContext)Set the shared task context in this task context.default voidstartExecution()Called just before the task is started.default voidtimeout()Called just after a task has timed-out.
-
-
-
Method Detail
-
setSharedTaskContext
default void setSharedTaskContext(SharedTaskContext sharedTaskContext)
Set the shared task context in this task context. Invoked before the set.- Parameters:
sharedTaskContext- the shared task context.
-
startExecution
default void startExecution()
Called just before the task is started.
-
finish
default void finish()
Called just after a task is finished.
-
timeout
default void timeout()
Called just after a task has timed-out.
-
-