|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DataTransportService
DataTransportService implementations provide the ability of connecting to a
remote broker, publish messages, subscribe to topics, receive messages on the
subscribed topics, and disconnect from the remote message broker.
The whiteboard pattern 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
| Method Summary | |
|---|---|
void |
connect()
Connects to the remote broker. |
void |
disconnect(long quiesceTimeout)
Disconnects from the broker. |
String |
getAccountName()
Returns the account name associated with the DataTransportService |
String |
getBrokerUrl()
|
String |
getUsername()
|
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. |
| Method Detail |
|---|
void connect()
throws EsfConnectException
EsfConnectException - the caller MAY retry connecting a later time.boolean isConnected()
String getBrokerUrl()
String getAccountName()
String getUsername()
void disconnect(long quiesceTimeout)
quiesceTimeout - - timeout that will be used before forcing a disconnect
void subscribe(String topic,
int qos)
throws EsfTimeoutException,
EsfException,
EsfNotConnectedException
topic - qos -
EsfTimeoutException - TODO
EsfException
EsfNotConnectedException - TODO
void unsubscribe(String topic)
throws EsfTimeoutException,
EsfException,
EsfNotConnectedException
topic -
EsfTimeoutException
EsfException
EsfNotConnectedException - TODO
DataTransportToken publish(String topic,
byte[] payload,
int qos,
boolean retain)
throws EsfTooManyInflightMessagesException,
EsfException,
EsfNotConnectedException
topic - payload - qos - retain -
EsfTooManyInflightMessagesException
EsfException
EsfNotConnectedException - TODO
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||