org.objectweb.perseus.distribution.lib

Class TaskScheduler


public class TaskScheduler
extends java.lang.Object

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

Constructor Summary

TaskScheduler(String name)

Method Summary

void
addTaskPerformer(TaskPerformer ap)
Adds a performer.
TaskThread
getTaskThread(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.
String
toString()

Constructor Details

TaskScheduler

public TaskScheduler(String name)

Method Details

addTaskPerformer

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

Parameters:
ap - the performer to add


getTaskThread

public TaskThread getTaskThread(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


removeTaskPerformer

public void removeTaskPerformer(TaskPerformer ap)
Removes a performer.

Parameters:
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.