public abstract class PollingDataSource extends DataSourceRT implements TimeoutClient
Modifier and Type | Field and Description |
---|---|
protected java.util.List<DataPointRT> |
dataPoints |
private java.lang.Thread |
jobThread |
private long |
jobThreadStartTime |
private org.apache.commons.logging.Log |
LOG |
protected boolean |
pointListChanged |
private long |
pollingPeriodMillis |
private boolean |
quantize |
private com.serotonin.timer.TimerTask |
timerTask |
private DataSourceVO<?> |
vo |
addedChangedPoints, ATTR_DISCONNECTED_KEY, ATTR_UNRELIABLE_KEY, pointListChangeLock, removedPoints
Constructor and Description |
---|
PollingDataSource(DataSourceVO<?> vo) |
Modifier and Type | Method and Description |
---|---|
void |
beginPolling() |
protected abstract void |
doPoll(long time) |
void |
joinTermination() |
void |
scheduleTimeout(long fireTime) |
void |
setPollingPeriod(int periodType,
int periods,
boolean quantize) |
void |
terminate() |
protected void |
updateChangedPoints() |
addDataPoint, forcePointRead, getExceptionMessage, getId, getName, getPersistentData, getSerialExceptionMessage, initialize, raiseEvent, relinquish, removeDataPoint, returnToNormal, setPersistentData, setPointValue
private final org.apache.commons.logging.Log LOG
private final DataSourceVO<?> vo
protected java.util.List<DataPointRT> dataPoints
protected boolean pointListChanged
private long pollingPeriodMillis
private boolean quantize
private com.serotonin.timer.TimerTask timerTask
private volatile java.lang.Thread jobThread
private long jobThreadStartTime
public PollingDataSource(DataSourceVO<?> vo)
public void setPollingPeriod(int periodType, int periods, boolean quantize)
public void scheduleTimeout(long fireTime)
scheduleTimeout
in interface TimeoutClient
protected abstract void doPoll(long time)
protected void updateChangedPoints()
public void beginPolling()
beginPolling
in class DataSourceRT
public void terminate()
terminate
in interface com.serotonin.util.ILifecycle
terminate
in class DataSourceRT
public void joinTermination()
joinTermination
in interface com.serotonin.util.ILifecycle
joinTermination
in class DataSourceRT