org.objectweb.perseus.distribution.lib
Class TaskScheduler
java.lang.Object
org.objectweb.perseus.distribution.lib.TaskScheduler
public class TaskScheduler
extends java.lang.Object
This class implements a scheduler of threads of tasks (instances of
TaskThread).
TaskScheduler
public TaskScheduler(String name)
addTaskPerformer
public void addTaskPerformer(TaskPerformer ap)
Adds a performer. It will be automatically stopped when stopping
the scheduler.
ap
- the performer to add
getTaskThread
public TaskThread getTaskThread(Object tid)
Retrieves the instance of TaskThread corresponding to the id
tid
- the id of the thread to retrieve
- the instance of TaskThread corresponding to the id
removeTaskPerformer
public void removeTaskPerformer(TaskPerformer ap)
Removes a performer.
ap
- the performer to be removed
stop
public void stop()
Stops the scheduler and all performers that have been added
(i.e. add null threads that is the signal of termination)
toString
public String toString()
Copyright © 2000-2002 France Telecom S.A., INRIA, IMAG-LSR All Rights Reserved.