org.eclipse.paho.client.mqttv3
Class MqttDeliveryToken

java.lang.Object
  extended by org.eclipse.paho.client.mqttv3.MqttToken
      extended by 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

Field Summary
 
Fields inherited from class org.eclipse.paho.client.mqttv3.MqttToken
internalTok
 
Constructor Summary
MqttDeliveryToken()
           
MqttDeliveryToken(String logContext)
           
 
Method Summary
 MqttMessage getMessage()
          Returns the message associated with this token.
protected  void setMessage(MqttMessage msg)
           
 
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
 

Constructor Detail

MqttDeliveryToken

public MqttDeliveryToken()

MqttDeliveryToken

public MqttDeliveryToken(String logContext)
Method Detail

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.