fr.dyade.aaa.util.Timer Class Reference

Collaboration diagram for fr.dyade.aaa.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 32 of file Timer.java.


Constructor & Destructor Documentation

fr.dyade.aaa.util.Timer.Timer (  ) 

Constructs a Timer instance.

Definition at line 41 of file Timer.java.

References fr.dyade.aaa.util.Timer.daemon, and fr.dyade.aaa.util.Timer.tasks.


Member Function Documentation

synchronized void fr.dyade.aaa.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 fr.dyade.aaa.util.Timer.daemon, fr.dyade.aaa.util.TimerDaemon.start(), fr.dyade.aaa.util.TimerDaemon.started, and fr.dyade.aaa.util.Timer.tasks.

Referenced by fr.dyade.aaa.util.ReliableTcpConnection.receive(), and fr.dyade.aaa.agent.WakeUpTask.schedule().

Here is the call graph for this function:

synchronized void fr.dyade.aaa.util.Timer.cancel (  ) 

Cancels the timer and all its non executed tasks.

Definition at line 76 of file Timer.java.

References fr.dyade.aaa.util.Timer.daemon, fr.dyade.aaa.util.Daemon.running, fr.dyade.aaa.util.TimerDaemon.shutdown(), fr.dyade.aaa.util.TimerDaemon.started, and fr.dyade.aaa.util.Timer.tasks.

Referenced by fr.dyade.aaa.util.NTransaction.garbageAsync(), and fr.dyade.aaa.agent.AgentServer.stop().

Here is the call graph for this function:


Member Data Documentation

TimerDaemon fr.dyade.aaa.util.Timer.daemon [package]

The timer's daemon.

Definition at line 36 of file Timer.java.

Referenced by fr.dyade.aaa.util.TimerTask.cancel(), fr.dyade.aaa.util.Timer.cancel(), fr.dyade.aaa.util.Timer.schedule(), and fr.dyade.aaa.util.Timer.Timer().

Vector fr.dyade.aaa.util.Timer.tasks [package]

The timer's tasks.

Definition at line 38 of file Timer.java.

Referenced by fr.dyade.aaa.util.TimerTask.cancel(), fr.dyade.aaa.util.Timer.cancel(), fr.dyade.aaa.util.TimerDaemon.run(), fr.dyade.aaa.util.Timer.schedule(), and fr.dyade.aaa.util.Timer.Timer().


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