Class 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.

Field Summary
Fields inherited from class edu.mssm.crover.ims.tasks.Task
data, priorTasks, status, taskID, taskType, tm
Constructor Summary
SequenceTask(TaskManager tm, long timeout)
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

Constructor Detail


public SequenceTask(TaskManager tm,
                    long timeout)
Method Detail


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
statusChanged in class Task
See Also:
TaskListener#statusChanged(String, TaskStatus)


public void add(Task new_last_task)
         throws TaskNotFoundException
Add a task to the sequence.

Specified by:
add in class GroupOfTasks


public void allFinished()
Does nothing.

Specified by:
allFinished in class GroupOfTasks

Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.