edu.mssm.crover.ims.tasks.groups
Class SequenceTask
java.lang.Object
|
+--edu.mssm.crover.ims.tasks.Task
|
+--edu.mssm.crover.ims.tasks.groups.GroupOfTasks
|
+--edu.mssm.crover.ims.tasks.groups.SequenceTask
- All Implemented Interfaces:
- TaskControl, TaskListener
- public class SequenceTask
- extends GroupOfTasks
Organizes a sequence of tasks. Tasks in this group are scheduled to be executed
in the order they are added to the group. When the last task of the sequence
is finished (failed or succeeded), the SequenceTask itself can start its execution.
|
Method Summary |
void |
add(Task new_last_task)
Add a task to the sequence. |
void |
allFinished()
Does nothing. |
void |
statusChanged(java.lang.String taskid,
TaskStatus newstatus)
The status of a task has just changed. |
| Methods inherited from class edu.mssm.crover.ims.tasks.Task |
abnormalTermination, addListener, addPriorTask, getData, getPriorTasks, getStatus, getTaskID, getTaskType, getTimeout, installEngine, isReadyToStart, normalTermination, notifyListeners, priorTasksDone, process, removeListener, removePriorTask, setData, setTaskID, setTaskType, start |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SequenceTask
public SequenceTask(TaskManager tm,
long timeout)
statusChanged
public void statusChanged(java.lang.String taskid,
TaskStatus newstatus)
- The status of a task has just changed. We are notified of the new status
and the identity of the task that experienced the change.
- Specified by:
statusChanged in interface TaskListener- Overrides:
statusChanged in class Task
- See Also:
TaskListener#statusChanged(String, TaskStatus)
add
public void add(Task new_last_task)
throws TaskNotFoundException
- Add a task to the sequence.
- Specified by:
add in class GroupOfTasks
TaskNotFoundException
allFinished
public void allFinished()
- Does nothing.
- Specified by:
allFinished in class GroupOfTasks
Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.