|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TaskSpawner
TaskSpawners manage FrameworkTask
s. Maintains a Collection
of all added tasks.
Provides method to process the result of a FrameworkTask
.
Method Summary | |
---|---|
void |
addTask(FrameworkTask task)
Adds and runs supplied FrameworkTask. |
void |
addTasks(java.util.Collection<? extends FrameworkTask> tasks)
Adds and runs supplied FrameworkTasks. |
boolean |
cancelTask(FrameworkTask task)
Cancels specified task if it exists in this TaskSpawner
Task is removed from TaskSpawner and canceled in the TaskManager . |
boolean |
containsTask(FrameworkTask t)
Returns whether this TaskSpawner manages this task. |
java.util.Collection<FrameworkTask> |
getRunningTasks()
Returns a UnmodifiableCollection that contains the FrameworkTasks in this
TaskSpawner. |
void |
receiveFinishedTask(FrameworkTask task)
This method receives a task that has finished. |
void |
setTaskManager(TaskManager taskManager)
Set the TaskManager this TaskSpawner will use to actually run the tasks. |
Methods inherited from interface edu.memphis.ccrg.lida.framework.initialization.Initializable |
---|
getParam, init, init |
Method Detail |
---|
void setTaskManager(TaskManager taskManager)
taskManager
- the TaskManager
of the system.void addTask(FrameworkTask task)
task
- the task to add.void addTasks(java.util.Collection<? extends FrameworkTask> tasks)
tasks
- a collection of tasks to be run.void receiveFinishedTask(FrameworkTask task)
TaskStatus
determines this action.
task
- finished FrameworkTask
boolean cancelTask(FrameworkTask task)
TaskSpawner
Task is removed from TaskSpawner
and canceled in the TaskManager
.
This is only possible if the tick for which the task
is scheduled has not been reached.
task
- The task to cancel.
TaskManager.cancelTask(FrameworkTask)
java.util.Collection<FrameworkTask> getRunningTasks()
UnmodifiableCollection
that contains the FrameworkTasks in this
TaskSpawner.
boolean containsTask(FrameworkTask t)
t
- a FrameworkTask
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |