public interface IMqttDeliveryToken extends IMqttToken
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.
MqttCallbackcan 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:
|Modifier and Type||Method and Description|
Returns the message associated with this token.
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
MqttException- if there was a problem completing retrieving the message