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, pointListChangedaddedChangedPoints, 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, updateChangedPointsgetExceptionMessage, getId, getName, getPersistentData, getSerialExceptionMessage, initialize, raiseEvent, relinquish, returnToNormal, setPersistentDatapublic 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 DataSourceRTpublic void removeDataPoint(DataPointRT dataPoint)
removeDataPoint in class DataSourceRTpublic void forcePointRead(DataPointRT dataPoint)
forcePointRead in class DataSourceRTprotected void doPoll(long time)
doPoll in class PollingDataSourceprotected 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.LocalizableExceptionpublic void setPointValue(DataPointRT dataPoint, PointValueTime valueTime, SetPointSource source)
setPointValue in class DataSourceRT