com.croftsoft.core.util
Class Metronome

java.lang.Object
  extended by 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)
           
 
Method Summary
 void destroy()
           
 void init()
           
 void resetPeriodInMilliseconds(long periodInMilliseconds)
           
 void resetRunnable(Runnable runnable)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Metronome

public Metronome(Runnable runnable,
                 long periodInMilliseconds,
                 boolean useDaemonThread)
Method Detail

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 Javadoc

CroftSoft Core Javadoc (2008-09-28 20:58:02)