protected class PollingRS485Server.Poller extends TimerTask
PollingRS485Server.KEY_POLLBASE. To allow different read-out times in active and
passive states, the poller drops some read cycles, depending on
PollingRS485Server.KEY_ACTIVEDROP and PollingRS485Server.KEY_PASSIVEDROP.| Modifier and Type | Field and Description |
|---|---|
private Triggering |
cycle
True if polling is retrieving data.
|
private int |
dropcycle
The dropping counter.
|
private int |
listindex
The actual index in the list.
|
private Object |
monitor
An object to notify on the start of each run.
|
private int |
polldrop
The actual polldrop of the poller.
|
private List |
pollist
The actual poller's list of keys to poll.
|
private boolean |
running
True if poller is running.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Poller()
Constructs a new polling thread.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel()
Cancels this polling thread.
|
boolean |
isRunning()
Returns the status of the running flag.
|
private void |
notifyCacheList(String key,
String newval)
Notifies all listeners subscribed to the specified key.
|
void |
run()
The run method of the poller.
|
private void |
setMonitor(Object mon)
Sets an object that should be notified at the start of each run
cycle.
|
protected void |
setPollingDrop(int newdrop)
Sets the list of command this poller should query.
|
protected void |
setPollingList(List newlist)
Sets the list of command this poller should query.
|
scheduledExecutionTimeprivate List pollist
private int listindex
private int polldrop
private int dropcycle
private final Triggering cycle
private boolean running
private Object monitor
protected Poller()
throws InitException
InitExceptionprivate void setMonitor(Object mon)
public void run()
CacheChangedListeners. The null element is allowed in the
cache and may even spark the listener's notification.
A call to cancel() allows this thread to die.
public boolean cancel()
PollingRS485Server.KEY_POLLBASE multiplied by the current drop
rate.public boolean isRunning()
protected void setPollingList(List newlist)
protected void setPollingDrop(int newdrop)