org.objectweb.dream.control.activity.task
Class BasicTaskActivationMixin

java.lang.Object
  extended by org.objectweb.dream.control.activity.task.BasicTaskActivationMixin
All Implemented Interfaces:
TaskActivationController

public abstract class BasicTaskActivationMixin
extends Object
implements TaskActivationController

Basic Implementation of the TaskActivationController. When a task is activated, it registers it in the TaskManagerthis component is bound to. This mixin must be used with a TaskController implementation mixin like BasicTaskControllerMixin.

Requirements


Field Summary
 Map _this_taskRegistrationHints
          The taskRegistrationHints field required by this mixin.
 BindingController _this_weaveableBC
          The weaveableBC field required by this mixin.
 Logger _this_weaveableTCLogger
          The weaveableTCLogger field required by this mixin.
 
Constructor Summary
BasicTaskActivationMixin()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_this_weaveableTCLogger

public Logger _this_weaveableTCLogger
The weaveableTCLogger field required by this mixin. This field is supposed to reference the logger of this controller.


_this_taskRegistrationHints

public Map _this_taskRegistrationHints
The taskRegistrationHints field required by this mixin. This field is supposed to reference the map containing hints passed when task are added in the task controller

See Also:
TaskController.addTask(Task, Map)

_this_weaveableBC

public BindingController _this_weaveableBC
The weaveableBC field required by this mixin. This field is supposed to reference the BindingControllerinterface of the component to which this controller object belongs.

Constructor Detail

BasicTaskActivationMixin

public BasicTaskActivationMixin()
Method Detail

activateTask

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

Specified by:
activateTask in interface TaskActivationController
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:
TaskActivationController.activateTask(Task)

deactivateTask

public void deactivateTask(Task task)
                    throws NoSuchTaskException,
                           IllegalTaskException
Description copied from interface: TaskActivationController
Unregister the given task with the activity manager. This method will block until the task is stopped and unregistered with the activity manager.

Specified by:
deactivateTask in interface TaskActivationController
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 or if the task is not activated.
See Also:
TaskActivationController.deactivateTask(Task)

deactivateTask

public void deactivateTask(Task task,
                           TaskStoppedListener taskStoppedListener)
                    throws NoSuchTaskException,
                           IllegalTaskException
Description copied from interface: TaskActivationController
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.

Specified by:
deactivateTask in interface TaskActivationController
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:
TaskActivationController.deactivateTask(Task, TaskStoppedListener)


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