public interface DataTransportService
http://www.osgi.org/wiki/uploads/Links/whiteboard.pdf
is used to notify the service users about events such as message arrived, connection lost etc.
DataTransportListener| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Connects to the remote broker.
|
void |
disconnect(long quiesceTimeout)
Disconnects from the broker.
|
boolean |
isConnected()
Returns true if the DataTransportService is currently connected to the remote server.
|
DataTransportToken |
publish(String topic,
byte[] payload,
int qos,
boolean retain)
Enqueues a message for publishing with the underlying transport implementation.
|
void |
subscribe(String topic,
int qos)
Subscribes to a topic on the broker.
|
void |
unsubscribe(String topic)
Unsubscribes to a topic on the broker.
|
void connect()
throws EsfConnectException
EsfConnectException - the caller MAY retry connecting a later time.boolean isConnected()
void disconnect(long quiesceTimeout)
quiesceTimeout - - timeout that will be used before forcing a disconnectvoid subscribe(String topic, int qos) throws EsfTimeoutException, EsfException, EsfNotConnectedException
topic - qos - EsfTimeoutException - TODOEsfExceptionEsfNotConnectedException - TODOvoid unsubscribe(String topic) throws EsfTimeoutException, EsfException, EsfNotConnectedException
topic - EsfTimeoutExceptionEsfExceptionEsfNotConnectedException - TODODataTransportToken publish(String topic, byte[] payload, int qos, boolean retain) throws EsfTooManyInflightMessagesException, EsfException, EsfNotConnectedException
topic - payload - qos - retain - EsfTooManyInflightMessagesExceptionEsfExceptionEsfNotConnectedException - TODOCopyright © 2013. All Rights Reserved.