public class GalilDataSourceRT extends PollingDataSource implements com.serotonin.messaging.MessagingExceptionHandler
Modifier and Type | Field and Description |
---|---|
static java.nio.charset.Charset |
CHARSET |
private com.serotonin.messaging.MessageControl |
conn |
static int |
DATA_SOURCE_EXCEPTION_EVENT |
private org.apache.commons.logging.Log |
LOG |
static int |
POINT_READ_EXCEPTION_EVENT |
static int |
POINT_WRITE_EXCEPTION_EVENT |
private java.net.Socket |
socket |
private GalilDataSourceVO |
vo |
dataPoints, pointListChanged
addedChangedPoints, ATTR_DISCONNECTED_KEY, ATTR_UNRELIABLE_KEY, pointListChangeLock, removedPoints
Constructor and Description |
---|
GalilDataSourceRT(GalilDataSourceVO vo) |
Modifier and Type | Method and Description |
---|---|
private void |
closeConnection() |
protected void |
doPoll(long time) |
void |
initialize() |
private void |
openConnection() |
void |
receivedException(java.lang.Exception e) |
void |
receivedMessageMismatchException(java.lang.Exception e) |
void |
receivedResponseException(java.lang.Exception e) |
private com.serotonin.web.i18n.LocalizableMessage |
sendRequest(GalilRequest request,
DataPointRT dataPoint,
GalilPointLocatorRT locator,
long time) |
void |
setPointValue(DataPointRT dataPoint,
PointValueTime valueTime,
SetPointSource source) |
void |
terminate() |
beginPolling, joinTermination, scheduleTimeout, setPollingPeriod, updateChangedPoints
addDataPoint, forcePointRead, getExceptionMessage, getId, getName, getPersistentData, getSerialExceptionMessage, raiseEvent, relinquish, removeDataPoint, returnToNormal, setPersistentData
public static final java.nio.charset.Charset CHARSET
private final org.apache.commons.logging.Log LOG
public static final int DATA_SOURCE_EXCEPTION_EVENT
public static final int POINT_READ_EXCEPTION_EVENT
public static final int POINT_WRITE_EXCEPTION_EVENT
private final GalilDataSourceVO vo
private java.net.Socket socket
private com.serotonin.messaging.MessageControl conn
public GalilDataSourceRT(GalilDataSourceVO vo)
protected void doPoll(long time)
doPoll
in class PollingDataSource
private com.serotonin.web.i18n.LocalizableMessage sendRequest(GalilRequest request, DataPointRT dataPoint, GalilPointLocatorRT locator, long time) throws java.io.IOException
java.io.IOException
public void initialize()
initialize
in interface com.serotonin.util.ILifecycle
initialize
in class DataSourceRT
public void terminate()
terminate
in interface com.serotonin.util.ILifecycle
terminate
in class PollingDataSource
public void setPointValue(DataPointRT dataPoint, PointValueTime valueTime, SetPointSource source)
setPointValue
in class DataSourceRT
public void receivedException(java.lang.Exception e)
receivedException
in interface com.serotonin.messaging.MessagingExceptionHandler
public void receivedMessageMismatchException(java.lang.Exception e)
public void receivedResponseException(java.lang.Exception e)
private void openConnection() throws java.io.IOException
java.io.IOException
private void closeConnection()