|
Luky Library - 4.1.1 (20061117-1148) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.TimerTask
luky.util.Watchdog
public class Watchdog
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);
![]() |
![]() |
| 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 |
|---|
protected EventListenerList listenerList
| Constructor Detail |
|---|
public Watchdog(MyEventListener target)
| Method Detail |
|---|
public void run()
run in interface Runnablerun in class TimerTaskpublic void addMyEventListener(MyEventListener listener)
public void removeMyEventListener(MyEventListener listener)
public void fireMyEvent(MyEvent evt)
|
Luky Library - 4.1.1 (20061117-1148) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||