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

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

+
+
All Known Implementing Classes:
MqttDefaultFilePersistence
+
+
+
+
public interface MqttClientPersistence
+ +

+Represents a persistent data store, used to store outbound and inbound messages while they + are in flight, enabling delivery to the QOS specified. You can specify an implementation + of this interface using MqttClient.MqttClient(String, String, MqttClientPersistence), + which the MqttClient will use to persist QoS 1 and 2 messages. +

+ If the methods defined throw the MqttPersistenceException then the state of the data persisted + should remain as prior to the method being called. For example, if put(String, MqttPersistable) + throws an exception at any point then the data will be assumed to not be in the persistent store. + Similarly if remove(String) throws an exception then the data will be + assumed to still be held in the persistent store.

+

+ It is up to the persistence interface to log any exceptions or error information + which may be required when diagnosing a persistence failure.

+

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidclear() + +
+          Clears persistence, so that it no longer contains any persisted data.
+ voidclose() + +
+          Close the persistent store that was previously opened. +
+ booleancontainsKey(java.lang.String key) + +
+          Returns whether or not data is persisted using the specified key.
+ MqttPersistableget(java.lang.String key) + +
+          Gets the specified data out of the persistent store.
+ java.util.Enumerationkeys() + +
+          Returns an Enumeration over the keys in this persistent data store.
+ voidopen(java.lang.String clientId, + java.lang.String serverURI) + +
+          Initialise the persistent store. +
+ voidput(java.lang.String key, + MqttPersistable persistable) + +
+          Puts the specified data into the persistent store.
+ voidremove(java.lang.String key) + +
+          Remove the data for the specified key.
+  +

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

+open

+
+public void open(java.lang.String clientId,
+                 java.lang.String serverURI)
+          throws MqttPersistenceException
+
+
Initialise the persistent store. + If a persistent store exists for this client ID then open it, otherwise + create a new one. If the persistent store is already open then just return. + An application may use the same client ID to connect to many different + servers, so the client ID in conjunction with the + connection will uniquely identify the persistence store required. +

+

+
Parameters:
clientId - The client for which the persistent store should be opened.
serverURI - The connection string as specified when the MQTT client instance was created. +
Throws: +
MqttPersistenceException - if there was a problem opening the persistent store.
+
+
+
+ +

+close

+
+public void close()
+           throws MqttPersistenceException
+
+
Close the persistent store that was previously opened. + This will be called when a client application disconnects from the broker. +

+

+ +
Throws: +
MqttPersistenceException
+
+
+
+ +

+put

+
+public void put(java.lang.String key,
+                MqttPersistable persistable)
+         throws MqttPersistenceException
+
+
Puts the specified data into the persistent store. +

+

+
Parameters:
key - the key for the data, which will be used later to retrieve it.
persistable - the data to persist +
Throws: +
MqttPersistenceException - if there was a problem putting the data + into the persistent store.
+
+
+
+ +

+get

+
+public MqttPersistable get(java.lang.String key)
+                    throws MqttPersistenceException
+
+
Gets the specified data out of the persistent store. +

+

+
Parameters:
key - the key for the data, which was used when originally saving it. +
Returns:
the un-persisted data +
Throws: +
MqttPersistenceException - if there was a problem getting the data + from the persistent store.
+
+
+
+ +

+remove

+
+public void remove(java.lang.String key)
+            throws MqttPersistenceException
+
+
Remove the data for the specified key. +

+

+ +
Throws: +
MqttPersistenceException
+
+
+
+ +

+keys

+
+public java.util.Enumeration keys()
+                           throws MqttPersistenceException
+
+
Returns an Enumeration over the keys in this persistent data store. +

+

+ +
Returns:
an enumeration of String objects. +
Throws: +
MqttPersistenceException
+
+
+
+ +

+clear

+
+public void clear()
+           throws MqttPersistenceException
+
+
Clears persistence, so that it no longer contains any persisted data. +

+

+ +
Throws: +
MqttPersistenceException
+
+
+
+ +

+containsKey

+
+public boolean containsKey(java.lang.String key)
+                    throws MqttPersistenceException
+
+
Returns whether or not data is persisted using the specified key. +

+

+
Parameters:
key - the key for data, which was used when originally saving it. +
Throws: +
MqttPersistenceException
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + -- cgit v1.2.1