|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IMqttDeliveryToken
Provides a mechanism for tracking the delivery of a message.
A subclass of IMqttToken that allows the delivery of a message to be tracked. Unlike instances of IMqttToken delivery tokens can be used across connection and client restarts. This enables the delivery of a messages to be tracked after failures. There are two approaches
IMqttAsyncClient.getPendingDeliveryTokens(). The waitForCompletion
method can then be used to block until the delivery is complete.
MqttCallback can be set on the client. Once a message has been
delivered the MqttCallback.deliveryComplete(IMqttDeliveryToken) method will
be called withe delivery token being passed as a parameter.
An action is in progress until either:
| Method Summary | |
|---|---|
MqttMessage |
getMessage()
Returns the message associated with this token. |
| Methods inherited from interface org.eclipse.paho.client.mqttv3.IMqttToken |
|---|
getActionCallback, getClient, getException, getMessageId, getTopics, getUserContext, isComplete, setActionCallback, setUserContext, waitForCompletion, waitForCompletion |
| Method Detail |
|---|
MqttMessage getMessage()
throws MqttException
Until the message has been delivered, the message being delivered will
be returned. Once the message has been delivered null will be
returned.
MqttException - if there was a problem completing retrieving the message
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||