|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.dream.control.activity.task.ThreadPerTaskTaskManagerControllerMixin
Provides a basic implementation of the
TaskManagerController
interface. Each registered task has its own scheduler and thread task. Two
types of thread tasks are available :
registerTask(org.objectweb.dream.control.activity.task.Task, java.util.Map)
method returns
null
"thread"
key mapped to the "pool"
value. In
addition the pool capacity can be specified with a
"threadPool.capacity"
key mapped to the required
Integer
value. In this case, the registerTask(org.objectweb.dream.control.activity.task.Task, java.util.Map)
method
returns the
ThreadPoolController
control interface of the thread pool component.
ThreadTask
,
ThreadPoolTask
,
ThreadPoolController.setCapacity(int)
Field Summary | |
ContentController |
_this_weaveableCC
The ContentController interface of the component to which this
controller object belongs. |
Logger |
_this_weaveableTMCLogger
The weaveableTMCLogger field required by this mixin. |
protected Map |
interruptedTasks
The map of the interrupted tasks. |
protected Map |
tasks
The map of registered tasks and the thread they are bound to. |
Method Summary | |
abstract void |
_super_initFcController(InitializationContext ic)
The Controller.initFcController(org.objectweb.fractal.julia.InitializationContext) method
overriden by this mixin. |
Task[] |
getTasks()
Returns the tasks that have been registered. |
void |
initFcController(InitializationContext ic)
|
void |
interruptTask(Task task,
TaskStoppedListener listener)
Interrupts the specified task. |
Object |
registerTask(Task task,
Map hints)
Registers a new task. |
void |
removeTask(Task task,
Component componentTask,
Component forwarderScheduler,
Component thread)
Removes a task from this composite component. |
void |
taskStopped(Task thread)
Called when the specified task is inactinaved. |
void |
unregisterTask(Task task)
Unregisters the specified task. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Map tasks
protected Map interruptedTasks
public Logger _this_weaveableTMCLogger
Logger
of this controller.
public ContentController _this_weaveableCC
ContentController
interface of the component to which this
controller object belongs.
Method Detail |
public void initFcController(InitializationContext ic) throws InstantiationException
InstantiationException
Controller.initFcController(InitializationContext)
public Object registerTask(Task task, Map hints) throws IllegalTaskException
TaskManagerController
registerTask
in interface TaskManagerController
task
- the task to be registered.hints
- additionnal parameters.
null
if no control is available on the task).
IllegalTaskException
- if an error occurs.TaskManagerController.registerTask(Task, Map)
public void unregisterTask(Task task) throws IllegalTaskException
TaskManagerController
unregisterTask
in interface TaskManagerController
task
- the task to be unregistered.
IllegalTaskException
- if an error occurs.TaskManagerController.unregisterTask(Task)
public void interruptTask(Task task, TaskStoppedListener listener) throws IllegalTaskException
TaskManagerController
listener
is notified when the task is interrupted. The
interrupted task should then be unregistered from the activity manager.
interruptTask
in interface TaskManagerController
task
- the task to interrupt.listener
- the listener that is notified when the task is interrupted.
Can be null
.
IllegalTaskException
- if the given task is unknown.TaskManagerController.interruptTask(Task, TaskStoppedListener)
public Task[] getTasks()
TaskManagerController
getTasks
in interface TaskManagerController
TaskManagerController.getTasks()
public void taskStopped(Task thread)
TaskStoppedListener
taskStopped
in interface TaskStoppedListener
thread
- an inactivated task.TaskStoppedListener.taskStopped(Task)
public void removeTask(Task task, Component componentTask, Component forwarderScheduler, Component thread) throws IllegalTaskException
task
- the registered task.componentTask
- the task component.forwarderScheduler
- the scheduler of the task.thread
- the thread executing the task.
IllegalTaskException
- if an error occurs.public abstract void _super_initFcController(InitializationContext ic) throws InstantiationException
Controller.initFcController(org.objectweb.fractal.julia.InitializationContext)
method
overriden by this mixin.
InstantiationException
Controller.initFcController(InitializationContext)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |