Interface TaskListener
- All Superinterfaces:
org.springframework.core.Ordered
- All Known Implementing Classes:
KibanaLogFieldsTaskListener,LoggingTaskListener
public interface TaskListener
extends org.springframework.core.Ordered
An 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.
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Method Summary
Modifier and TypeMethodDescriptiondefault voidfinish()Called just after a task is finished.default voidsetSharedTaskContext(SharedTaskContext sharedTaskContext) Set the shared task context in this task context.default voidCalled just before the task is started.default voidtimeout()Called just after a task has timed-out.Methods inherited from interface org.springframework.core.Ordered
getOrder
-
Method Details
-
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.