All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JavaGroups.Timer

java.lang.Object
   |
   +----JavaGroups.Timer

public class Timer
extends Object
implements Runnable
Allows to register commands to be executed at a certain time, or in n milliseconds from now. The command will be executed in a separate thread.


Constructor Index

 o Timer()
Constructor.

Method Index

 o finalize()
 o main(String[])
 o run()
 o Start()
 o Stop()
 o Trigger(Command, Date)
Call command.Execute at time time.
 o Trigger(Command, long)
Call command.Execute in time milliseconds.

Constructors

 o Timer
 public Timer()
Constructor. Starts the timer thread

Methods

 o finalize
 public void finalize()
Overrides:
finalize in class Object
 o Trigger
 public void Trigger(Command command,
                     long time)
Call command.Execute in time milliseconds. A command can be registered multiple times, and will be called multiple times. Each command will be executed on a separate thread.

 o Start
 public void Start()
 o Stop
 public void Stop()
 o Trigger
 public void Trigger(Command command,
                     Date time)
Call command.Execute at time time. A command can be registered multiple times, and will be called multiple times. Each command will be executed on a separate thread. If the date is in the past, the command will be executed immediately.

 o run
 public void run()
 o main
 public static void main(String args[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index