com.croftsoft.core.util
Class Metronome
java.lang.Object
com.croftsoft.core.util.Metronome
- All Implemented Interfaces:
- Commissionable, Destroyable, Initializable, Lifecycle, Resumable, Startable, Stoppable
public final class Metronome
- extends Object
- implements Lifecycle
Runs tasks periodically.
- Since:
- 2001-03-06
- Version:
- 2002-02-27
- Author:
- David Wallace Croft
Constructor Summary |
Metronome(Runnable runnable,
long periodInMilliseconds,
boolean useDaemonThread)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Metronome
public Metronome(Runnable runnable,
long periodInMilliseconds,
boolean useDaemonThread)
resetPeriodInMilliseconds
public void resetPeriodInMilliseconds(long periodInMilliseconds)
resetRunnable
public void resetRunnable(Runnable runnable)
init
public void init()
- Specified by:
init
in interface Initializable
start
public void start()
- Specified by:
start
in interface Startable
stop
public void stop()
- Specified by:
stop
in interface Stoppable
destroy
public void destroy()
- Specified by:
destroy
in interface Destroyable
CroftSoft Core Javadoc (2008-09-28 20:58:02)