com.levigo.util.concurrent.tasks
Interface TaskListener

All Known Implementing Classes:
TaskServiceMonitorSnapIn, TaskView

public interface TaskListener

By implementing this interface and attaching the listener to - for example - TaskService.addTaskListener(TaskListener), interested parties can receive notification about what is going on inside a TaskService.


Method Summary
 void scopeDeregistered(Task<?> task, TaskScope<?> scope)
          Receive notification about a Task that has been abandoned (cancelled) by a scope.
 void scopeRegistered(Task<?> task, TaskScope<?> scope)
          Receive notification about a Task that has been re-submitted identically but from a different scope.
 void taskCancelled(Task<?> task)
          Receive notification about a Task that whose execution has been cancelled.
 void taskCompleted(Task<?> task)
          Receive notification about a Task that whose execution has completed without exceptions.
 void taskFailed(Task<?> task)
          Receive notification about a Task that whose execution has failed.
 void taskQueued(Task<?> task, int priority)
          Receive notification about a Task that has been enqueued.
 void taskStarted(Task<?> task)
          Receive notification about a Task that whose execution has been started.
 

Method Detail

taskQueued

void taskQueued(Task<?> task,
                int priority)
Receive notification about a Task that has been enqueued.

Parameters:
task - the task
priority - the task's priority.

taskStarted

void taskStarted(Task<?> task)
Receive notification about a Task that whose execution has been started.

Parameters:
task - the task

taskFailed

void taskFailed(Task<?> task)
Receive notification about a Task that whose execution has failed.

Parameters:
task - the task

taskCompleted

void taskCompleted(Task<?> task)
Receive notification about a Task that whose execution has completed without exceptions.

Parameters:
task - the task

taskCancelled

void taskCancelled(Task<?> task)
Receive notification about a Task that whose execution has been cancelled.

Parameters:
task - the task

scopeRegistered

void scopeRegistered(Task<?> task,
                     TaskScope<?> scope)
Receive notification about a Task that has been re-submitted identically but from a different scope.

Parameters:
task - the task
scope - the additional scope

scopeDeregistered

void scopeDeregistered(Task<?> task,
                       TaskScope<?> scope)
Receive notification about a Task that has been abandoned (cancelled) by a scope.

Parameters:
task - the task
scope - the scope that abandoned (cancelled) the task


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.