Package de.intarsys.tools.concurrent
Class TaskCallbackDispatcher
- java.lang.Object
-
- de.intarsys.tools.concurrent.TaskCallbackDispatcher
-
- All Implemented Interfaces:
ITaskListener,ITaskListenerSupport
public class TaskCallbackDispatcher extends java.lang.Object implements ITaskListenerSupport, ITaskListener
Helper object for implementingITaskListenerSupport.
-
-
Constructor Summary
Constructors Constructor Description TaskCallbackDispatcher(java.lang.Object pOwner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTaskListener(ITaskListener listener)voidattach(ITaskListenerSupport support)voidclear()voiddetach(ITaskListenerSupport support)java.lang.ObjectgetOwner()booleanisEmpty()voidremoveTaskListener(ITaskListener listener)voidtaskCancelled(java.lang.Object task)voidtaskFailed(java.lang.Object task, java.util.concurrent.ExecutionException exception)voidtaskFinished(java.lang.Object task, java.lang.Object result)voidtaskStarted(java.lang.Object task)
-
-
-
Method Detail
-
addTaskListener
public void addTaskListener(ITaskListener listener)
- Specified by:
addTaskListenerin interfaceITaskListenerSupport
-
attach
public void attach(ITaskListenerSupport support)
-
clear
public void clear()
-
detach
public void detach(ITaskListenerSupport support)
-
getOwner
public java.lang.Object getOwner()
-
isEmpty
public boolean isEmpty()
-
removeTaskListener
public void removeTaskListener(ITaskListener listener)
- Specified by:
removeTaskListenerin interfaceITaskListenerSupport
-
taskCancelled
public void taskCancelled(java.lang.Object task)
- Specified by:
taskCancelledin interfaceITaskListener
-
taskFailed
public void taskFailed(java.lang.Object task, java.util.concurrent.ExecutionException exception)- Specified by:
taskFailedin interfaceITaskListener
-
taskFinished
public void taskFinished(java.lang.Object task, java.lang.Object result)- Specified by:
taskFinishedin interfaceITaskListener
-
taskStarted
public void taskStarted(java.lang.Object task)
- Specified by:
taskStartedin interfaceITaskListener
-
-