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/MqttPersistable.html | 387 +++++++++++++++++++++ 1 file changed, 387 insertions(+) create mode 100644 libs/org.eclipse.paho.client.mqttv3/org/eclipse/paho/client/mqttv3/MqttPersistable.html (limited to 'libs/org.eclipse.paho.client.mqttv3/org/eclipse/paho/client/mqttv3/MqttPersistable.html') diff --git a/libs/org.eclipse.paho.client.mqttv3/org/eclipse/paho/client/mqttv3/MqttPersistable.html b/libs/org.eclipse.paho.client.mqttv3/org/eclipse/paho/client/mqttv3/MqttPersistable.html new file mode 100644 index 0000000..153e026 --- /dev/null +++ b/libs/org.eclipse.paho.client.mqttv3/org/eclipse/paho/client/mqttv3/MqttPersistable.html @@ -0,0 +1,387 @@ + + + + + + +MqttPersistable (MQTT v3 Client API) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +

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

+
+
+
public interface MqttPersistable
+ +

+Represents an object used to pass data to be persisted across the + MqttClientPersistence + interface. +

+ When data is passed across the interface the header and payload are + separated, so that unnecessary message copies may be avoided. + For example, if a 10 MB payload was published it would be inefficient + to create a byte array a few bytes larger than 10 MB and copy the + MQTT message header and payload into a contiguous byte array.

+

+ When the request to persist data is made a separate byte array and offset + is passed for the header and payload. Only the data between + offset and length need be persisted. + So for example, a message to be persisted consists of a header byte + array starting at offset 1 and length 4, plus a payload byte array + starting at offset 30 and length 40000. There are three ways in which + the persistence implementation may return data to the client on + recovery: +

+

+

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ byte[]getHeaderBytes() + +
+          Returns the header bytes in an array. +
+ intgetHeaderLength() + +
+          Returns the length of the header.
+ intgetHeaderOffset() + +
+          Returns the offset of the header within the byte array returned by getHeaderBytes().
+ byte[]getPayloadBytes() + +
+          Returns the payload bytes in an array. +
+ intgetPayloadLength() + +
+          Returns the length of the payload.
+ intgetPayloadOffset() + +
+          Returns the offset of the payload within the byte array returned by getPayloadBytes().
+  +

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

+getHeaderBytes

+
+public byte[] getHeaderBytes()
+                      throws MqttPersistenceException
+
+
Returns the header bytes in an array. + The bytes start at getHeaderOffset() + and continue for getHeaderLength(). +

+

+ +
Returns:
the header bytes. +
Throws: +
MqttPersistenceException
+
+
+
+ +

+getHeaderLength

+
+public int getHeaderLength()
+                    throws MqttPersistenceException
+
+
Returns the length of the header. +

+

+ +
Returns:
the header length +
Throws: +
MqttPersistenceException
+
+
+
+ +

+getHeaderOffset

+
+public int getHeaderOffset()
+                    throws MqttPersistenceException
+
+
Returns the offset of the header within the byte array returned by getHeaderBytes(). +

+

+ +
Returns:
the header offset. +
Throws: +
MqttPersistenceException
+
+
+
+ +

+getPayloadBytes

+
+public byte[] getPayloadBytes()
+                       throws MqttPersistenceException
+
+
Returns the payload bytes in an array. + The bytes start at getPayloadOffset() + and continue for getPayloadLength(). +

+

+ +
Returns:
the payload bytes. +
Throws: +
MqttPersistenceException
+
+
+
+ +

+getPayloadLength

+
+public int getPayloadLength()
+                     throws MqttPersistenceException
+
+
Returns the length of the payload. +

+

+ +
Returns:
the payload length. +
Throws: +
MqttPersistenceException
+
+
+
+ +

+getPayloadOffset

+
+public int getPayloadOffset()
+                     throws MqttPersistenceException
+
+
Returns the offset of the payload within the byte array returned by getPayloadBytes(). +

+

+ +
Returns:
the payload offset. +
Throws: +
MqttPersistenceException
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + -- cgit v1.2.1