org.eclipse.paho.client.mqttv3
Interface IMqttDeliveryToken

All Superinterfaces:
IMqttToken
All Known Implementing Classes:
MqttDeliveryToken

public interface IMqttDeliveryToken
extends IMqttToken

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

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

getMessage

MqttMessage getMessage()
                       throws MqttException
Returns the message associated with this token.

Until the message has been delivered, the message being delivered will be returned. Once the message has been delivered null will be returned.

Returns:
the message associated with this token or null if already delivered.
Throws:
MqttException - if there was a problem completing retrieving the message


Copyright © 2013. All Rights Reserved.