Jeospace API

org.jeospace.simulation
Interface TaskScheduler

All Known Implementing Classes:
ChronManager

public interface TaskScheduler

Defines the requirements for implementing a synchronous task scheduler

Version:
$Revision: 1.1.1.1 $
Author:
Rex Melton

Method Summary
 boolean addTask(java.lang.Runnable task)
          Add a new task to the scheduler's run list
 long getClockPeriod()
          Return the scheduler's clock period in milliseconds.
 boolean removeTask(java.lang.Runnable task)
          Remove a task from the scheduler's run list
 void setClockPeriod(long milliseconds)
          Set the scheduler's clock period in milliseconds
 void start()
          Start the TaskScheduler
 void stop()
          Stop the TaskScheduler
 

Method Detail

start

public void start()
Start the TaskScheduler


stop

public void stop()
Stop the TaskScheduler


addTask

public boolean addTask(java.lang.Runnable task)
Add a new task to the scheduler's run list

Parameters:
task - The new task to add
Returns:
a success flag true if the task was added to the run list, false if otherwise.

removeTask

public boolean removeTask(java.lang.Runnable task)
Remove a task from the scheduler's run list

Parameters:
task - The task to remove
Returns:
a success flag true if the task was removed from the run list, false if otherwise.

getClockPeriod

public long getClockPeriod()
Return the scheduler's clock period in milliseconds.

Returns:
the scheduler's clock period in milliseconds.

setClockPeriod

public void setClockPeriod(long milliseconds)
Set the scheduler's clock period in milliseconds

Parameters:
milliseconds - The scheduler's clock period

Jeospace API

Copyright © 2006 - jeospace.org