org.objectweb.dream.control.activity.manager
Interface TaskManager

All Known Implementing Classes:
TaskManagerImpl

public interface TaskManager

A control interface to manage tasks.


Field Summary
static String ITF_NAME
          Default name of this interface.
 
Method Summary
 Task[] getTasks()
          Returns the tasks that have been registered.
 void interruptTask(Task task, TaskStoppedListener listener)
          Interrupts the specified task.
 void registerTask(Task task, Map hints)
          Registers a new task.
 void unregisterTask(Task task)
          Unregisters the specified task.
 

Field Detail

ITF_NAME

static final String ITF_NAME
Default name of this interface.

See Also:
Constant Field Values
Method Detail

registerTask

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

Parameters:
task - the task to be registered.
hints - additionnal parameters.
Throws:
IllegalTaskException - if an error occurs.

unregisterTask

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

Parameters:
task - the task to be unregistered.
Throws:
IllegalTaskException - if an error occurs.
InterruptedException - if the method is interrupted

interruptTask

void interruptTask(Task task,
                   TaskStoppedListener listener)
                   throws IllegalTaskException
Interrupts the specified task. An interrupted task is no more executed. The given listener is notified when the task is stopped. The interrupted task should then be unregistered from the activity manager.

Parameters:
task - the task to interrupt.
listener - the listener that is notified when the task is interrupted. Can be null.
Throws:
IllegalTaskException - if the given task is unknown.

getTasks

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

Returns:
the tasks that have been registered.


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