@ProviderType
public interface DataTransportService
DataTransportListener
DataTransportListener
Modifier and Type | Method and Description |
---|---|
void |
addDataTransportListener(DataTransportListener listener)
Adds a listener.
|
void |
connect()
Connects to the remote broker.
|
void |
disconnect(long quiesceTimeout)
Disconnects from the broker.
|
java.lang.String |
getAccountName()
Returns the account name associated with the DataTransportService
|
java.lang.String |
getBrokerUrl() |
java.lang.String |
getClientId() |
java.lang.String |
getUsername() |
boolean |
isConnected()
Returns true if the DataTransportService is currently connected to the remote server.
|
DataTransportToken |
publish(java.lang.String topic,
byte[] payload,
int qos,
boolean retain)
Enqueues a message for publishing with the underlying transport implementation.
|
void |
removeDataTransportListener(DataTransportListener listener)
Removes a listener.
|
void |
subscribe(java.lang.String topic,
int qos)
Subscribes to a topic on the broker.
|
void |
unsubscribe(java.lang.String topic)
Unsubscribes to a topic on the broker.
|
void connect() throws KuraConnectException
KuraConnectException
- the caller MAY retry connecting a later time.boolean isConnected()
java.lang.String getBrokerUrl()
java.lang.String getAccountName()
java.lang.String getUsername()
java.lang.String getClientId()
void disconnect(long quiesceTimeout)
quiesceTimeout
- - timeout that will be used before forcing a disconnectvoid subscribe(java.lang.String topic, int qos) throws KuraTimeoutException, KuraException, KuraNotConnectedException
topic
- qos
- KuraTimeoutException
- TODOKuraException
KuraNotConnectedException
- TODOvoid unsubscribe(java.lang.String topic) throws KuraTimeoutException, KuraException, KuraNotConnectedException
topic
- KuraTimeoutException
KuraException
KuraNotConnectedException
- TODODataTransportToken publish(java.lang.String topic, byte[] payload, int qos, boolean retain) throws KuraTooManyInflightMessagesException, KuraException, KuraNotConnectedException
topic
- payload
- qos
- retain
- KuraTooManyInflightMessagesException
KuraException
KuraNotConnectedException
- TODOvoid addDataTransportListener(DataTransportListener listener)
listener
- void removeDataTransportListener(DataTransportListener listener)
listener
-