org.ws4d.java.util
Class WatchDog

java.lang.Object
  extended by org.ws4d.java.util.WatchDog
All Implemented Interfaces:
java.lang.Runnable

public class WatchDog
extends java.lang.Object
implements java.lang.Runnable

Class


Method Summary
static WatchDog getInstance()
           
 void register(TimedEntry timedEntry, long timeUntilTimeout)
          Registers timed object to observe.
 void run()
          Starts thread to remove timed out message requests.
 void stop()
          Stops thread, which handles timed entries.
 void unregister(TimedEntry timedEntry)
          Disables timed entry from managed objects of watchdog.
 void update(TimedEntry timedEntry, long timeUntilTimeout)
          Updates timed entry with new time until timeout within managed objects of watchdog.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static WatchDog getInstance()

register

public void register(TimedEntry timedEntry,
                     long timeUntilTimeout)
Registers timed object to observe.

Parameters:
timedEntry -
timeUntilTimeout -

unregister

public void unregister(TimedEntry timedEntry)
Disables timed entry from managed objects of watchdog. Removing will occur later.

Parameters:
timedEntry -

update

public void update(TimedEntry timedEntry,
                   long timeUntilTimeout)
Updates timed entry with new time until timeout within managed objects of watchdog.

Parameters:
timedEntry -
timeUntilTimeout -

run

public void run()
Starts thread to remove timed out message requests.

Specified by:
run in interface java.lang.Runnable

stop

public void stop()
Stops thread, which handles timed entries.