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

All Known Implementing Classes:
BasicTaskActivationMixin

public interface TaskActivationController

A control interface used to activate or desactivate tasks of the component (ie. register/unregister in activity manager). This interface is an hidden control interface used by lifecycle controller or by task controller.


Method Summary
 void activateTask(Task task)
          Register the given task with the activity manager.
 void deactivateTask(Task task)
          Unregister the given task with the activity manager.
 void deactivateTask(Task task, TaskStoppedListener taskStoppedListener)
          Unregister the given task with the activity manager.
 

Method Detail

activateTask

public void activateTask(Task task)
                  throws NoSuchTaskException,
                         IllegalTaskException
Register the given task with the activity manager. If the task is already registered, do nothing.

Parameters:
task - the task to register.
Throws:
NoSuchTaskException - if the given task is unknown.
IllegalTaskException - if the task can't be registred in the activity manager.
See Also:
TaskManagerController.registerTask(Task, java.util.Map)

deactivateTask

public void deactivateTask(Task task)
                    throws NoSuchTaskException,
                           IllegalTaskException
Unregister the given task with the activity manager. This method will block until the task is stopped and unregistered with the activity manager. If the task is not activated, do nothing.

Parameters:
task - the task to unregister.
Throws:
NoSuchTaskException - if the given task is unknown.
IllegalTaskException - if the task can't be unregistred in the activity manager.
See Also:
TaskManagerController.unregisterTask(Task)

deactivateTask

public void deactivateTask(Task task,
                           TaskStoppedListener taskStoppedListener)
                    throws NoSuchTaskException,
                           IllegalTaskException
Unregister the given task with the activity manager. This method returns immediatly, and the given listener will be notify when the task stop unregister with the activity manager. If the task is not activated, the listener is immediatly notifyed and the method returns.

Parameters:
task - the task to unregister.
taskStoppedListener - the listener to notify.
Throws:
NoSuchTaskException - if the given task is unknown.
IllegalTaskException - if the task can't be unregistred in the activity manager.
See Also:
TaskManagerController.unregisterTask(Task)


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