Package com.evolveum.midpoint.task.api
Interface TaskListener
-
public interface TaskListener
Notifies external observers about task-related events. These methods are executed from within the task execution thread, so they have to finish as quickly as possible. For the difference between task start/finish and task thread start/finish, please see https://docs.evolveum.com/midpoint/reference/tasks/task-manager/#task-execution-a-bit-of-terminology.- Author:
- mederly
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onTaskFinish(Task task, TaskRunResult runResult, OperationResult result)
Called when a task execution routine (i.e.void
onTaskStart(Task task, OperationResult result)
Called when a task execution routine (i.e.void
onTaskThreadFinish(Task task, OperationResult result)
Called when task's execution thread is finishingvoid
onTaskThreadStart(Task task, boolean isRecovering, OperationResult result)
Called when a task's execution thread is started.
-
-
-
Method Detail
-
onTaskStart
void onTaskStart(Task task, OperationResult result)
Called when a task execution routine (i.e. task handler) starts. Task handler URI can be determined via task.getHandlerUri() method.- Parameters:
task
- task that is about to be started
-
onTaskFinish
void onTaskFinish(Task task, TaskRunResult runResult, OperationResult result)
Called when a task execution routine (i.e. task handler) finishes. Please note that execution-related task attributes, like task's operation result, last task run finish timestamp, are NOT updated when this routine is called. These values have to be got from runResult parameter.- Parameters:
task
- task that was just finishedrunResult
- result of the task's run
-
onTaskThreadStart
void onTaskThreadStart(Task task, boolean isRecovering, OperationResult result)
Called when a task's execution thread is started.- Parameters:
task
- task whose thread was startedisRecovering
- true if the task was recovering from previous nodefailure
-
onTaskThreadFinish
void onTaskThreadFinish(Task task, OperationResult result)
Called when task's execution thread is finishing- Parameters:
task
- task whose thread is finishing
-
-