public class PachubeDataSourceRT extends PollingDataSource
Modifier and Type | Field and Description |
---|---|
static int |
DATA_RETRIEVAL_FAILURE_EVENT |
static java.lang.String |
HEADER_API_KEY |
private org.apache.commons.httpclient.HttpClient |
httpClient |
(package private) org.apache.commons.logging.Log |
log |
static int |
PARSE_EXCEPTION_EVENT |
static int |
POINT_WRITE_EXCEPTION_EVENT |
(package private) java.text.SimpleDateFormat |
sdf |
(package private) PachubeDataSourceVO |
vo |
dataPoints, pointListChanged
addedChangedPoints, ATTR_DISCONNECTED_KEY, ATTR_UNRELIABLE_KEY, pointListChangeLock, removedPoints
Constructor and Description |
---|
PachubeDataSourceRT(PachubeDataSourceVO vo) |
Modifier and Type | Method and Description |
---|---|
void |
addDataPoint(DataPointRT dataPoint) |
static org.apache.commons.httpclient.HttpClient |
createHttpClient(int timeoutSeconds,
int retries) |
protected void |
doPoll(long time) |
void |
forcePointRead(DataPointRT dataPoint) |
static java.util.Map<java.lang.String,PachubeValue> |
getData(org.apache.commons.httpclient.HttpClient client,
int feedId,
java.lang.String apiKey) |
protected void |
pollFeed(int feedId,
java.util.List<DataPointRT> points,
long time) |
void |
removeDataPoint(DataPointRT dataPoint) |
void |
setPointValue(DataPointRT dataPoint,
PointValueTime valueTime,
SetPointSource source) |
beginPolling, joinTermination, scheduleTimeout, setPollingPeriod, terminate, updateChangedPoints
getExceptionMessage, getId, getName, getPersistentData, getSerialExceptionMessage, initialize, raiseEvent, relinquish, returnToNormal, setPersistentData
public static final int DATA_RETRIEVAL_FAILURE_EVENT
public static final int PARSE_EXCEPTION_EVENT
public static final int POINT_WRITE_EXCEPTION_EVENT
public static final java.lang.String HEADER_API_KEY
final org.apache.commons.logging.Log log
final PachubeDataSourceVO vo
private final org.apache.commons.httpclient.HttpClient httpClient
final java.text.SimpleDateFormat sdf
public PachubeDataSourceRT(PachubeDataSourceVO vo)
public static org.apache.commons.httpclient.HttpClient createHttpClient(int timeoutSeconds, int retries)
public void addDataPoint(DataPointRT dataPoint)
addDataPoint
in class DataSourceRT
public void removeDataPoint(DataPointRT dataPoint)
removeDataPoint
in class DataSourceRT
public void forcePointRead(DataPointRT dataPoint)
forcePointRead
in class DataSourceRT
protected void doPoll(long time)
doPoll
in class PollingDataSource
protected void pollFeed(int feedId, java.util.List<DataPointRT> points, long time)
public static java.util.Map<java.lang.String,PachubeValue> getData(org.apache.commons.httpclient.HttpClient client, int feedId, java.lang.String apiKey) throws com.serotonin.web.i18n.LocalizableException
com.serotonin.web.i18n.LocalizableException
public void setPointValue(DataPointRT dataPoint, PointValueTime valueTime, SetPointSource source)
setPointValue
in class DataSourceRT