de.bb.bejy
Class Cron

java.lang.Object
  |
  +--de.bb.bejy.Cron

public class Cron
extends java.lang.Object

Start Runnable at specified times.


Constructor Summary
Cron()
           
 
Method Summary
 java.lang.Object remove(java.lang.Object key)
          Remove a Runnable from the Cron.
 java.lang.Object runAt(java.lang.Runnable r, long at)
          Run a Runnable object at a given time.
 java.lang.Object runEvery(java.lang.Runnable r, long time)
          Run a Runnable object each x ms.
 java.lang.Object runIn(java.lang.Runnable r, long time)
          Run a Runnable object in x ms.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cron

public Cron()
Method Detail

runIn

public java.lang.Object runIn(java.lang.Runnable r,
                              long time)
Run a Runnable object in x ms.
Parameters:
r - a runnable object
time - time in ms
Returns:
an Object which can be used to remove this runnable.

runAt

public java.lang.Object runAt(java.lang.Runnable r,
                              long at)
Run a Runnable object at a given time.
Parameters:
r - a runnable object
time - time in ms
Returns:
an Object which can be used to remove this runnable.

runEvery

public java.lang.Object runEvery(java.lang.Runnable r,
                                 long time)
Run a Runnable object each x ms.
Parameters:
r - a runnable object
time - time in ms
Returns:
an Object which can be used to remove this runnable.

remove

public java.lang.Object remove(java.lang.Object key)
Remove a Runnable from the Cron.
Parameters:
r - a Runnable object's key
Returns:
the Runnable.