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

java.lang.Object
  extended byorg.objectweb.dream.control.activity.task.BasicTaskControllerMixin
All Implemented Interfaces:
TaskController

public abstract class BasicTaskControllerMixin
extends Object
implements TaskController

Provides a basic implementation of the TaskManagerController interface.

Requirements


Field Summary
 BindingController _this_weaveableBC
          The weaveableBC field required by this mixin.
 Logger _this_weaveableTCLogger
          The weaveableTCLogger field required by this mixin.
protected  Map taskControls
          A map containing control interface for each registered task.
protected  Map taskRegistrationHints
          A map containing registration hints for eack task.
 
Method Summary
abstract  void _super_initFcController(InitializationContext ic)
          The Controller.initFcController(InitializationContext) method overriden by this mixin.
 void addTask(Task task, Map hints)
          Adds a new task in this controller
 Object getTaskControl(Task task)
          Returns an interface that can be used to control a task (may be null if no control is available for the task).
 Task[] getTasks()
          Returns the tasks of the component to which this interface belongs.
 void initFcController(InitializationContext ic)
           
 void removeTask(Task task)
          Removes a task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

taskRegistrationHints

protected Map taskRegistrationHints
A map containing registration hints for eack task.


taskControls

protected Map taskControls
A map containing control interface for each registered task.


_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_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.

Method Detail

initFcController

public void initFcController(InitializationContext ic)
                      throws InstantiationException
Throws:
InstantiationException
See Also:
Controller.initFcController(InitializationContext)

getTasks

public Task[] getTasks()
Description copied from interface: TaskController
Returns the tasks of the component to which this interface belongs.

Specified by:
getTasks in interface TaskController
Returns:
an array of task.
See Also:
TaskController.getTasks()

addTask

public void addTask(Task task,
                    Map hints)
             throws IllegalTaskException
Description copied from interface: TaskController
Adds a new task in this controller

Specified by:
addTask in interface TaskController
Parameters:
task - a new task.
hints - registration hints. It can contains the name of the controller descriptor of the created component task, with the key "taskControllerDesc". If no setted, use primitiveTask controller descriptor.
This parameter cannot be null.
Throws:
IllegalTaskException - if the task component can't be registered.
See Also:
TaskController.addTask(Task, Map)

getTaskControl

public Object getTaskControl(Task task)
                      throws NoSuchTaskException
Description copied from interface: TaskController
Returns an interface that can be used to control a task (may be null if no control is available for the task). The runtime type of the interface depends on the implementation of the activity manager and on the hints that have been given as paremeters of the registration method of the activity manager.

Specified by:
getTaskControl in interface TaskController
Parameters:
task - a task.
Returns:
an interface that can be used to control a task (may be null)
Throws:
NoSuchTaskException - if the given task component is unknown.
See Also:
TaskController.getTaskControl(Task)

removeTask

public void removeTask(Task task)
                throws NoSuchTaskException,
                       IllegalTaskException
Description copied from interface: TaskController
Removes a task. The controller unregisters the task (if registered) and remove it.

Specified by:
removeTask in interface TaskController
Parameters:
task - the task to remove.
Throws:
IllegalTaskException - if the given task can't be unregistered.
NoSuchTaskException - if the given task component is unknown.
See Also:
TaskController.removeTask(Task)

_super_initFcController

public abstract void _super_initFcController(InitializationContext ic)
                                      throws InstantiationException
The Controller.initFcController(InitializationContext) method overriden by this mixin.

Throws:
InstantiationException
See Also:
Controller.initFcController(InitializationContext)


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