org.objectweb.perseus.distribution.lib
Class TaskScheduler

java.lang.Object
  extended byorg.objectweb.perseus.distribution.lib.TaskScheduler

public class TaskScheduler
extends java.lang.Object

This class implements a scheduler of threads of tasks (instances of TaskThread).


Constructor Summary
TaskScheduler(java.lang.String name)
           
 
Method Summary
 void addTaskPerformer(TaskPerformer ap)
          Adds a performer.
 TaskThread getTaskThread(java.lang.Object tid)
          Retrieves the instance of TaskThread corresponding to the id
 void removeTaskPerformer(TaskPerformer ap)
          Removes a performer.
 void stop()
          Stops the scheduler and all performers that have been added (i.e.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TaskScheduler

public TaskScheduler(java.lang.String name)
Method Detail

toString

public java.lang.String toString()

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)


addTaskPerformer

public void addTaskPerformer(TaskPerformer ap)
Adds a performer. It will be automatically stopped when stopping the scheduler.

Parameters:
ap - the performer to add

removeTaskPerformer

public void removeTaskPerformer(TaskPerformer ap)
Removes a performer.

Parameters:
ap - the performer to be removed

getTaskThread

public TaskThread getTaskThread(java.lang.Object tid)
Retrieves the instance of TaskThread corresponding to the id

Parameters:
tid - the id of the thread to retrieve
Returns:
the instance of TaskThread corresponding to the id


Copyright © 2000-2002 France Telecom S.A., INRIA, IMAG-LSR All Rights Reserved.