org.eclipse.paho.client.mqttv3
Class MqttDeliveryToken
java.lang.Object
org.eclipse.paho.client.mqttv3.MqttToken
org.eclipse.paho.client.mqttv3.MqttDeliveryToken
- All Implemented Interfaces:
- IMqttDeliveryToken, IMqttToken
public class MqttDeliveryToken
- extends MqttToken
- implements IMqttDeliveryToken
Provides a mechanism to track the delivery progress of a message.
Used to track the the delivery progress of a message when a publish is
executed in a non-blocking manner (run in the background)
- See Also:
MqttToken
Methods inherited from class org.eclipse.paho.client.mqttv3.MqttToken |
getActionCallback, getClient, getException, getMessageId, getTopics, getUserContext, isComplete, setActionCallback, setUserContext, waitForCompletion, waitForCompletion |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.paho.client.mqttv3.IMqttToken |
getActionCallback, getClient, getException, getMessageId, getTopics, getUserContext, isComplete, setActionCallback, setUserContext, waitForCompletion, waitForCompletion |
MqttDeliveryToken
public MqttDeliveryToken()
MqttDeliveryToken
public MqttDeliveryToken(String logContext)
getMessage
public 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.
- Specified by:
getMessage
in interface IMqttDeliveryToken
- Returns:
- the message associated with this token or null if already delivered.
- Throws:
MqttException
- if there was a problem completing retrieving the message
setMessage
protected void setMessage(MqttMessage msg)
Copyright © 2013. All Rights Reserved.