public abstract class Poller
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
static boolean |
debug
Debug flag
|
protected long |
interval
interval for polling (milliseconds)
|
protected java.awt.event.ActionListener |
listener
listener for polling events
|
protected boolean |
running
flag for running
|
Constructor and Description |
---|
Poller(java.awt.event.ActionListener listener,
long interval)
Create a Poller
|
Poller(long interval)
Create a Poller
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
doPoll()
This method does the work.
|
long |
getInterval()
Get the polling interval
|
void |
init()
Initialize.
|
void |
run()
Run the poller
|
void |
stopRunning()
Stop polling.
|
public static boolean debug
protected java.awt.event.ActionListener listener
protected long interval
protected boolean running
public Poller(long interval)
interval
- polling intervalpublic Poller(java.awt.event.ActionListener listener, long interval)
listener
- listener for eventsinterval
- polling intervalpublic void init()
public void run()
run
in interface java.lang.Runnable
protected abstract void doPoll()
public void stopRunning()
public long getInterval()