com.scalagent.kjoram.util.Timer Class Reference

Collaboration diagram for com.scalagent.kjoram.util.Timer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Timer ()
synchronized void schedule (TimerTask task, long delay) throws Exception
synchronized void cancel ()

Package Attributes

TimerDaemon daemon
Vector tasks

Detailed Description

This class is a facility for scheduling tasks future execution.

It is a simplified version of the timer provided by the jdk1.3.

Definition at line 30 of file Timer.java.


Constructor & Destructor Documentation

com.scalagent.kjoram.util.Timer.Timer (  ) 

Constructs a Timer instance.

Definition at line 40 of file Timer.java.

References com.scalagent.kjoram.util.Timer.daemon, and com.scalagent.kjoram.util.Timer.tasks.


Member Function Documentation

synchronized void com.scalagent.kjoram.util.Timer.schedule ( TimerTask  task,
long  delay 
) throws Exception

Schedules a given task for execution after a given delay.

Parameters:
task The task to be executed.
delay Delay in ms before executing the task.
Exceptions:
IllegalStateException If the timer or the task have already been cancelled, or if the task is already scheduled.
IllegalArgumentException If the delay is negative.

Definition at line 55 of file Timer.java.

References com.scalagent.kjoram.util.Timer.daemon, com.scalagent.kjoram.util.TimerDaemon.interrupt(), com.scalagent.kjoram.util.TimerDaemon.nextWakeup, com.scalagent.kjoram.util.TimerDaemon.start(), com.scalagent.kjoram.util.TimerDaemon.started, and com.scalagent.kjoram.util.Timer.tasks.

Here is the call graph for this function:

synchronized void com.scalagent.kjoram.util.Timer.cancel (  ) 

Cancels the timer and all its non executed tasks.

Definition at line 79 of file Timer.java.

References com.scalagent.kjoram.util.Timer.daemon, com.scalagent.kjoram.util.TimerDaemon.interrupt(), com.scalagent.kjoram.util.TimerDaemon.started, and com.scalagent.kjoram.util.Timer.tasks.

Here is the call graph for this function:


Member Data Documentation

TimerDaemon com.scalagent.kjoram.util.Timer.daemon [package]

The timer's daemon.

Definition at line 35 of file Timer.java.

Referenced by com.scalagent.kjoram.util.TimerTask.cancel(), com.scalagent.kjoram.util.Timer.cancel(), com.scalagent.kjoram.util.Timer.schedule(), and com.scalagent.kjoram.util.Timer.Timer().

Vector com.scalagent.kjoram.util.Timer.tasks [package]

The timer's tasks.

Definition at line 37 of file Timer.java.

Referenced by com.scalagent.kjoram.util.TimerTask.cancel(), com.scalagent.kjoram.util.Timer.cancel(), com.scalagent.kjoram.util.TimerDaemon.run(), com.scalagent.kjoram.util.Timer.schedule(), and com.scalagent.kjoram.util.Timer.Timer().


The documentation for this class was generated from the following file:
Generated on Tue Sep 16 16:15:42 2008 for joram by  doxygen 1.5.0