Luky Library - 4.1.1 (20061117-1148)

luky.util
Class Watchdog

java.lang.Object
  extended by java.util.TimerTask
      extended by luky.util.Watchdog
All Implemented Interfaces:
Runnable

public class Watchdog
extends TimerTask

The Watchdog class extends the TimerTask class and is created to make a periodic request of a certain routine by sending events

Usage:

 // run in seperate thread
 Timer poller = new Timer(true); 

 // start after 1 minute
 poller.scheduleAtFixedRate(new Watchdog(this), 60 * 1000,
 periodicSync * 1000);
 

Version:
1.0.0
Author:
Chris Lukassen
 

Field Summary
protected  EventListenerList listenerList
           
 
Constructor Summary
Watchdog(MyEventListener target)
          constructor
 
Method Summary
 void addMyEventListener(MyEventListener listener)
          This methods allows classes to register for MyEvents
 void fireMyEvent(MyEvent evt)
          This methods is used to fire MyEvents
 void removeMyEventListener(MyEventListener listener)
          This methods allows classes to unregister for MyEvents
 void run()
          execute the timeing action
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listenerList

protected EventListenerList listenerList
Constructor Detail

Watchdog

public Watchdog(MyEventListener target)
constructor

Method Detail

run

public void run()
execute the timeing action

Specified by:
run in interface Runnable
Specified by:
run in class TimerTask

addMyEventListener

public void addMyEventListener(MyEventListener listener)
This methods allows classes to register for MyEvents


removeMyEventListener

public void removeMyEventListener(MyEventListener listener)
This methods allows classes to unregister for MyEvents


fireMyEvent

public void fireMyEvent(MyEvent evt)
This methods is used to fire MyEvents


Luky Library - 4.1.1 (20061117-1148)