dsto.dfc.util
Class Timers

java.lang.Object
  extended by dsto.dfc.util.Timers

public final class Timers
extends Object

General routines for the java.util.Timer class including timer pool factory methods.

Version:
$Revision$
Author:
Matthew Phillips

Method Summary
static void dispose()
           
static Timer getTimer(boolean isDaemon)
          Get a timer from the global timer pool.
static void reset()
          Reset (clear) the shared timers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTimer

public static Timer getTimer(boolean isDaemon)
Get a timer from the global timer pool.

NOTE: if you create a non-daemon timer, you need to call dispose () on this class for the application to exit normally.

Parameters:
isDaemon - True if the timer should be a daemon (see Timer class for more info).
Returns:
A shared timer instance.

dispose

public static void dispose()

reset

public static void reset()
Reset (clear) the shared timers. This may be needed if the timer threads have been killed (eg on applet restart). Unfortunately there is no way to automatically detect when a Timer's thread has been killed.



Copyright © 2008 Commonwealth of Australia