org.objectweb.dream.control.activity.task
Interface TaskManagerController

All Known Implementing Classes:
ThreadPerTaskTaskManagerControllerMixin

public interface TaskManagerController

A control interface to manage tasks.


Method Summary
 Task[] getTasks()
          Returns the tasks that have been registered.
 void interruptTask(Task task, TaskStoppedListener listener)
          Interrupt the specified task. an interrupted task, is no more executed.
 Object registerTask(Task task, Map hints)
          Registers a new task.
 void unregisterTask(Task task)
          Unregisters the specified task.
 

Method Detail

registerTask

public Object registerTask(Task task,
                           Map hints)
                    throws IllegalTaskException
Registers a new task.

Parameters:
task - the task to be registered.
hints - additionnal parameters.
Returns:
an interface that can used to control the registered task (may be null if no control is available on the task).
Throws:
IllegalTaskException - if an error occurs.

unregisterTask

public void unregisterTask(Task task)
                    throws IllegalTaskException
Unregisters the specified task.

Parameters:
task - the task to be removed.
Throws:
IllegalTaskException - if an error occurs.

interruptTask

public void interruptTask(Task task,
                          TaskStoppedListener listener)
                   throws IllegalTaskException
Interrupt the specified task. an interrupted task, is no more executed. The givent listener is notified when the task is inactivated. The inactivated task should then be unregistered from the activity manager.

Parameters:
task - the task to interrupt.
listener - a listener to notify. Can be null.
Throws:
IllegalTaskException - if the given task is unknown.

getTasks

public Task[] getTasks()
Returns the tasks that have been registered.

Returns:
the tasks that have been registered.


Copyright © 2003, 2004 - INRIA Rhone-Alpes - All Rights Reserved.