From cc8ace92f17c8e5aef7d68ff316e5cd038cd36b5 Mon Sep 17 00:00:00 2001 From: Nathan Lasseter Date: Wed, 22 May 2013 15:34:00 +0100 Subject: Initial Commit --- .../paho/client/mqttv3/MqttDeliveryToken.html | 322 +++++++++++++++++++++ 1 file changed, 322 insertions(+) create mode 100644 libs/org.eclipse.paho.client.mqttv3/org/eclipse/paho/client/mqttv3/MqttDeliveryToken.html (limited to 'libs/org.eclipse.paho.client.mqttv3/org/eclipse/paho/client/mqttv3/MqttDeliveryToken.html') diff --git a/libs/org.eclipse.paho.client.mqttv3/org/eclipse/paho/client/mqttv3/MqttDeliveryToken.html b/libs/org.eclipse.paho.client.mqttv3/org/eclipse/paho/client/mqttv3/MqttDeliveryToken.html new file mode 100644 index 0000000..323bb24 --- /dev/null +++ b/libs/org.eclipse.paho.client.mqttv3/org/eclipse/paho/client/mqttv3/MqttDeliveryToken.html @@ -0,0 +1,322 @@ + + + + + + +MqttDeliveryToken (MQTT v3 Client API) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

+ +org.eclipse.paho.client.mqttv3 +
+Interface MqttDeliveryToken

+
+
+
public interface MqttDeliveryToken
+ +

+Provides a mechanism for tracking the delivery of messages. + + Calls to MqttTopic.publish(MqttMessage) + return after the message has been sent, but do not wait for acknowledgements + to be received. This allows the + client to have multiple messages in-flight at one time. + + In order to track the delivery of a message, those methods + return an instance of this class which can be used in one of two ways: +

+

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ MqttMessagegetMessage() + +
+          Returns the message associated with this token, or null if the message has + already been successfully sent.
+ booleanisComplete() + +
+          Returns whether or not the delivery has finished.
+ voidwaitForCompletion() + +
+          Blocks the current thread until the message this is the token + for completes delivery.
+ voidwaitForCompletion(long timeout) + +
+          Blocks the current thread until the message this is the token + for completes delivery. +
+  +

+ + + + + + + + + + + + + + +
+Method Detail
+ +

+waitForCompletion

+
+public void waitForCompletion()
+                       throws MqttException,
+                              MqttSecurityException
+
+
Blocks the current thread until the message this is the token + for completes delivery. +

+

+ +
Throws: +
MqttException - if there was a problem completing delivery of the message. +
MqttSecurityException
+
+
+
+ +

+waitForCompletion

+
+public void waitForCompletion(long timeout)
+                       throws MqttException,
+                              MqttSecurityException
+
+
Blocks the current thread until the message this is the token + for completes delivery. + This will only block for specified timeout period. If the delivery has not + completed before the timeout occurs, this method will return - the + isComplete() method can be used to determine if the delivery is + complete, or if the wait has timed out. +

+

+
Parameters:
timeout - the maximum amount of time to wait for, in milliseconds. +
Throws: +
MqttException - if there was a problem completing delivery of the message +
MqttSecurityException
+
+
+
+ +

+isComplete

+
+public boolean isComplete()
+
+
Returns whether or not the delivery has finished. Note that a token will + be marked as complete even if the delivery failed. +

+

+
+
+
+
+ +

+getMessage

+
+public MqttMessage getMessage()
+                       throws MqttException
+
+
Returns the message associated with this token, or null if the message has + already been successfully sent. +

+

+ +
Returns:
the message associated with this token +
Throws: +
MqttException - if there was a problem completing retrieving the message
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + -- cgit v1.2.1