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

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

+
+
+
public interface MqttCallback
+ +

+Asynchronous message listener. Classes implementing this interface + can be passed to MqttClient.setCallback(MqttCallback), + which will create a call back on this interface. +

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidconnectionLost(java.lang.Throwable cause) + +
+          This method is called when the connection to the server is lost.
+ voiddeliveryComplete(MqttDeliveryToken token) + +
+          Called when delivery for a message has been completed, and all + acknowledgements have been received.
+ voidmessageArrived(MqttTopic topic, + MqttMessage message) + +
+          This method is called when a message arrives from the server. + +
+  +

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

+connectionLost

+
+public void connectionLost(java.lang.Throwable cause)
+
+
This method is called when the connection to the server is lost. +

+

+
Parameters:
cause - the reason behind the loss of connection.
+
+
+
+ +

+messageArrived

+
+public void messageArrived(MqttTopic topic,
+                           MqttMessage message)
+                    throws java.lang.Exception
+
+
This method is called when a message arrives from the server. + +

+ This method is invoked synchronously by the MQTT client. An + acknowledgment on the network is not sent back to the server until this + method returns cleanly.

+

+ If an implementation of this method throws an Exception, then the + client will be shut down. When the client is next re-connected, any QoS + 1 or 2 messages will be redelivered.

+

+ Any additional messages which arrive while an + implementation of this method is running, will build up in memory, and + will then back up on the network.

+

+ If an application needs to persist data, then it + should ensure the data is persisted prior to returning from this method, as + after returning from this method, the message is considered to have been + delivered, and will not be reproducable.

+

+ It is possible to send a new message within an implementation of this callback + (for example, a response to this message), but the implementation must not + disconnect the client, as it will be impossible to send an acknowledgement for + the message being processed, and a deadlock will occur.

+

+

+
Parameters:
topic - the topic on which the message arrived.
message - the actual message. +
Throws: +
java.lang.Exception - if a terminal error has occurred, and the client should be + shut down.
+
+
+
+ +

+deliveryComplete

+
+public void deliveryComplete(MqttDeliveryToken token)
+
+
Called when delivery for a message has been completed, and all + acknowledgements have been received. The supplied token will be same + token which was returned when the message was first sent, if it was + sent using MqttTopic.publish(MqttMessage). +

+

+
Parameters:
token - the delivery token associated with the message.
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + -- cgit v1.2.1