public abstract class AbstractPollIPSensorSession extends AbstractIPSensorSession
Constructor and Description |
---|
AbstractPollIPSensorSession(AbstractSensor<?> sensor,
java.lang.String ID,
java.lang.String host,
int port,
int reconnectionInterval,
int maxConAttempts,
java.util.Set<AbstractCommandConfiguration<?>> commandConfigurations) |
Modifier and Type | Method and Description |
---|---|
MessageProcessingStrategyFactory |
getMessageProcessingStrategyFactory()
Get a Factory for MessageProcessingStrategy objects.
|
boolean |
isMessageAvailable()
Check if a new message is available.
|
ByteMessage |
receiveMessage()
Receive a message.
|
ByteMessage |
receiveMessage(long timeout)
Receive a message.
|
disconnect, getHost, getPort, toString
getCommandInstance, getStatus, killComand, submit, submit, submit, submitAndBlock, suspendCommand
connect, getCommands, getDTO, getID, getSensor, getTimeout, handleTimeout, killAllCommands, restoreCommands
public AbstractPollIPSensorSession(AbstractSensor<?> sensor, java.lang.String ID, java.lang.String host, int port, int reconnectionInterval, int maxConAttempts, java.util.Set<AbstractCommandConfiguration<?>> commandConfigurations)
sensor
- ID
- host
- port
- reconnectionInterval
- maxConAttempts
- commandConfigurations
- public MessageProcessingStrategyFactory getMessageProcessingStrategyFactory()
AbstractIPSensorSession
public boolean isMessageAvailable() throws java.io.IOException
java.io.IOException
public ByteMessage receiveMessage() throws java.io.IOException, java.util.concurrent.TimeoutException
java.io.IOException
if
- the timeout has expired while waiting.java.util.concurrent.TimeoutException
public ByteMessage receiveMessage(long timeout) throws java.io.IOException, java.util.concurrent.TimeoutException
timeout
- the time to wait for a response in millisecondsjava.io.IOException
java.util.concurrent.TimeoutException
- if the timeout has expired while waiting.