package org.eclipse.paho.mqttv5.client; import org.eclipse.paho.mqttv5.common.MqttException; import org.eclipse.paho.mqttv5.common.MqttMessage; /** * 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:

* * */ public interface IMqttDeliveryToken extends IMqttToken { /** * 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. * @return the message associated with this token or null if already delivered. * @throws MqttException if there was a problem completing retrieving the message */ MqttMessage getMessage() throws MqttException; }