diff options
Diffstat (limited to 'libs/org.eclipse.paho.client.mqttv3/org/eclipse/paho/client/mqttv3/MqttClient.html')
-rw-r--r-- | libs/org.eclipse.paho.client.mqttv3/org/eclipse/paho/client/mqttv3/MqttClient.html | 959 |
1 files changed, 959 insertions, 0 deletions
diff --git a/libs/org.eclipse.paho.client.mqttv3/org/eclipse/paho/client/mqttv3/MqttClient.html b/libs/org.eclipse.paho.client.mqttv3/org/eclipse/paho/client/mqttv3/MqttClient.html new file mode 100644 index 0000000..3a14a1a --- /dev/null +++ b/libs/org.eclipse.paho.client.mqttv3/org/eclipse/paho/client/mqttv3/MqttClient.html @@ -0,0 +1,959 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.4.2) on Tue Oct 02 23:24:48 BST 2012 -->
+<TITLE>
+MqttClient (MQTT v3 Client API)
+</TITLE>
+
+<META NAME="keywords" CONTENT="org.eclipse.paho.client.mqttv3.MqttClient class">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="MqttClient (MQTT v3 Client API)";
+}
+</SCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+ +<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A> +<A HREF="#skip-navbar_top" title="Skip navigation links"></A> +<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A> +<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <A HREF="#main"><FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT></A> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/MqttClient.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../serialized-form.html"><FONT CLASS="NavBarFont1"><B>Serialized</B></FONT></A> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ PREV CLASS
+ <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttConnectOptions.html" title="class in org.eclipse.paho.client.mqttv3"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>
+ <A HREF="MqttClient.html" target="_top"><B>NO FRAMES</B></A>
+ <SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT> +
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A> +<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<A NAME="main"></A>
+<!-- ======== START OF CLASS DATA ======== -->
+<H2>
+<FONT SIZE="-1">
+org.eclipse.paho.client.mqttv3</FONT>
+<BR>
+Class MqttClient</H2>
+<PRE>
+java.lang.Object
+ <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>org.eclipse.paho.client.mqttv3.MqttClient</B>
+</PRE>
+<DL>
+<DT><B>All Implemented Interfaces:</B> <DD>org.eclipse.paho.client.mqttv3.internal.DestinationProvider</DD>
+</DL>
+<HR>
+<DL>
+<DT>public class <B>MqttClient</B><DT>extends java.lang.Object<DT>implements org.eclipse.paho.client.mqttv3.internal.DestinationProvider</DL>
+
+<P>
+Lightweight client for talking to a server via the MQTT version 3 + protocol. The client allows an application to use publish/subscribe + messaging.
+<P>
+
+<P>
+<HR>
+
+<P>
+<!-- ======== NESTED CLASS SUMMARY ======== -->
+
+
+<!-- =========== FIELD SUMMARY =========== -->
+
+
+<!-- ======== CONSTRUCTOR SUMMARY ======== -->
+
+<A NAME="constructor_summary"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN=2><FONT SIZE="+2">
+<B>Constructor Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE><B><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#MqttClient(java.lang.String, java.lang.String)">MqttClient</A></B>(java.lang.String serverURI, + java.lang.String clientId)</CODE>
+
+<BR>
+ Creates an MqttClient to connect to the specified address, using the + specified client identifier. </TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE><B><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#MqttClient(java.lang.String, java.lang.String, org.eclipse.paho.client.mqttv3.MqttClientPersistence)">MqttClient</A></B>(java.lang.String serverURI, + java.lang.String clientId, + <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClientPersistence.html" title="interface in org.eclipse.paho.client.mqttv3">MqttClientPersistence</A> persistence)</CODE>
+
+<BR>
+ Creates an MqttClient to connect to the specified address, using the + specified client identifer and persistence implementation. </TD>
+</TR>
+</TABLE>
+
+<!-- ========== METHOD SUMMARY =========== -->
+
+<A NAME="method_summary"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN=2><FONT SIZE="+2">
+<B>Method Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE> void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#connect()">connect</A></B>()</CODE>
+
+<BR>
+ Connects to a server using the default options. + </TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE> void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#connect(org.eclipse.paho.client.mqttv3.MqttConnectOptions)">connect</A></B>(<A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttConnectOptions.html" title="class in org.eclipse.paho.client.mqttv3">MqttConnectOptions</A> options)</CODE>
+
+<BR>
+ Connects to a server using the specified options. + </TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE> void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#disconnect()">disconnect</A></B>()</CODE>
+
+<BR>
+ Disconnects from the server, which quiesces for up to a + maximum of thirty seconds, to allow the client to finish any work it + currently has.</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE> void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#disconnect(long)">disconnect</A></B>(long quiesceTimeout)</CODE>
+
+<BR>
+ Disconnects from the server. + </TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>static java.lang.String</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#generateClientId()">generateClientId</A></B>()</CODE>
+
+<BR>
+ Returns a randomly generated client identifier based on the current user's login + name and the system time. + </TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE> java.lang.String</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#getClientId()">getClientId</A></B>()</CODE>
+
+<BR>
+ Returns the client ID used by this client.</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE> <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttDeliveryToken.html" title="interface in org.eclipse.paho.client.mqttv3">MqttDeliveryToken</A>[]</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#getPendingDeliveryTokens()">getPendingDeliveryTokens</A></B>()</CODE>
+
+<BR>
+ Returns the delivery tokens for any outstanding publish operations.</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE> java.lang.String</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#getServerURI()">getServerURI</A></B>()</CODE>
+
+<BR>
+ Returns the address of the server used by this client, as a URI. + </TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE> <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttTopic.html" title="class in org.eclipse.paho.client.mqttv3">MqttTopic</A></CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#getTopic(java.lang.String)">getTopic</A></B>(java.lang.String topic)</CODE>
+
+<BR>
+ Gets a topic object which can be used to publish messages. + </TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE> boolean</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#isConnected()">isConnected</A></B>()</CODE>
+
+<BR>
+ Determines if this client is currently connected to the + server.</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE> void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#setCallback(org.eclipse.paho.client.mqttv3.MqttCallback)">setCallback</A></B>(<A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttCallback.html" title="interface in org.eclipse.paho.client.mqttv3">MqttCallback</A> callback)</CODE>
+
+<BR>
+ Sets the callback listener to use for asynchronously received + messages. + </TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE> void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#subscribe(java.lang.String)">subscribe</A></B>(java.lang.String topicFilter)</CODE>
+
+<BR>
+ Subscribes to a topic, which may include wildcards, using the default + options. </TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE> void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#subscribe(java.lang.String[])">subscribe</A></B>(java.lang.String[] topicFilters)</CODE>
+
+<BR>
+ Subscribes to multiple topics, each of which may include wildcards, + using the default options. </TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE> void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#subscribe(java.lang.String[], int[])">subscribe</A></B>(java.lang.String[] topicFilters, + int[] qos)</CODE>
+
+<BR>
+ Subscribes to multiple topics, each of which may include wildcards, + using the specified options. </TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE> void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#subscribe(java.lang.String, int)">subscribe</A></B>(java.lang.String topicFilter, + int qos)</CODE>
+
+<BR>
+ Subscribes to a topic, which may include wildcards, using the specified + options. </TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE> void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#unsubscribe(java.lang.String)">unsubscribe</A></B>(java.lang.String topicFilter)</CODE>
+
+<BR>
+ Unsubscribes from a topic.</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE> void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#unsubscribe(java.lang.String[])">unsubscribe</A></B>(java.lang.String[] topicFilters)</CODE>
+
+<BR>
+ Unsubscribes from multiple topics.</TD>
+</TR>
+</TABLE>
+ <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
+<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
+</TR>
+</TABLE>
+
+<P>
+
+<!-- ============ FIELD DETAIL =========== -->
+
+
+<!-- ========= CONSTRUCTOR DETAIL ======== -->
+
+<A NAME="constructor_detail"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TD COLSPAN=1><FONT SIZE="+2">
+<B>Constructor Detail</B></FONT></TD>
+</TR>
+</TABLE>
+
+<A NAME="MqttClient(java.lang.String, java.lang.String)"><!-- --></A><H3>
+MqttClient</H3>
+<PRE>
+public <B>MqttClient</B>(java.lang.String serverURI, + java.lang.String clientId) + throws <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A></PRE>
+<DL>
+<DD>Creates an MqttClient to connect to the specified address, using the + specified client identifier. The address + should be a URI, using a scheme of either "tcp://" for a TCP connection + or "ssl://" for a TCP connection secured by SSL/TLS. For example: + <ul> + <li><code>tcp://localhost:1883</code></li> + <li><code>ssl://localhost:8883</code></li> + </ul> + <p> + If the port is not specified, it will + default to 1883 for "tcp://" URIs, and 8883 for "ssl://" URIs. + </p> + <p> + The client identifier should be unique across all clients connecting to the same + server. A convenience method is provided to generate a random client id that + should satisfy this criteria - <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#generateClientId()"><CODE>generateClientId()</CODE></A>. As the client identifier + is used by the server to identify a client when it reconnects, the client must use the + same identifier between connections if durable subscriptions are to be used. + </p> + <p> + In Java SE, SSL can be configured in one of several ways, which the + client will use in the following order: + </p> + <ul> + <li><strong>Supplying an <code>SSLSocketFactory</code></strong> - applications can + use <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttConnectOptions.html#setSocketFactory(javax.net.SocketFactory)"><CODE>MqttConnectOptions.setSocketFactory(SocketFactory)</CODE></A> to supply + a factory with the appropriate SSL settings.</li> + <li><strong>SSL Properties</strong> - applications can supply SSL settings as a + simple Java Properties using <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttConnectOptions.html#setSSLProperties(java.util.Properties)"><CODE>MqttConnectOptions.setSSLProperties(Properties)</CODE></A>.</li> + <li><strong>Use JVM settings</strong> - There are a number of standard + Java system properties that can be used to configure key and trust stores.</li> + </ul> + + <p>In Java ME, the platform settings are used for SSL connections.</p> + + <p>A default instance of <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttDefaultFilePersistence.html" title="class in org.eclipse.paho.client.mqttv3"><CODE>MqttDefaultFilePersistence</CODE></A> is used by + the client. To specify a different persistence implementation, or to turn + off persistence, use the <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#MqttClient(java.lang.String, java.lang.String, org.eclipse.paho.client.mqttv3.MqttClientPersistence)"><CODE>MqttClient(String, String, MqttClientPersistence)</CODE></A> constructor.
+<P>
+<DT><B>Parameters:</B><DD><CODE>serverURI</CODE> - the address to connect to, specified as a URI<DD><CODE>clientId</CODE> - the client ID to use +<DT><B>Throws:</B> +<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the URI does not start with + "tcp://", "ssl://" or "local://". +<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the clientId is null or is greater than 23 characters in length +<DD><CODE><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A></CODE> - if any other problem was encountered</DL>
+<HR>
+
+<A NAME="MqttClient(java.lang.String, java.lang.String, org.eclipse.paho.client.mqttv3.MqttClientPersistence)"><!-- --></A><H3>
+MqttClient</H3>
+<PRE>
+public <B>MqttClient</B>(java.lang.String serverURI, + java.lang.String clientId, + <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClientPersistence.html" title="interface in org.eclipse.paho.client.mqttv3">MqttClientPersistence</A> persistence) + throws <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A></PRE>
+<DL>
+<DD>Creates an MqttClient to connect to the specified address, using the + specified client identifer and persistence implementation. The address + should be a URI, using a scheme of either "tcp://" for a TCP connection + or "ssl://" for a TCP connection secured by SSL/TLS. For example: + <ul> + <li><code>tcp://localhost:1883</code></li> + <li><code>ssl://localhost:8883</code></li> + <li><code>local://FirstBroker</code></li> + </ul> + <p> + If the port is not specified, it will + default to 1883 for "tcp://" URIs, and 8883 for "ssl://" URIs. + </p> + <p> + The client identifier should be unique across all clients connecting to the same + server. A convenience method is provided to generate a random client id that + should satisfy this criteria - <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#generateClientId()"><CODE>generateClientId()</CODE></A>. As the client identifier + is used by the server to identify a client when it reconnects, the client must use the + same identifier between connections if durable subscriptions are to be used. + </p> + <p> + In Java SE, SSL can be configured in one of several ways, which the + client will use in the following order: + </p> + <ul> + <li><strong>Supplying an <code>SSLSocketFactory</code></strong> - applications can + use <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttConnectOptions.html#setSocketFactory(javax.net.SocketFactory)"><CODE>MqttConnectOptions.setSocketFactory(SocketFactory)</CODE></A> to supply + a factory with the appropriate SSL settings.</li> + <li><strong>SSL Properties</strong> - applications can supply SSL settings as a + simple Java Properties using <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttConnectOptions.html#setSSLProperties(java.util.Properties)"><CODE>MqttConnectOptions.setSSLProperties(Properties)</CODE></A>.</li> + <li><strong>Use JVM settings</strong> - There are a number of standard + Java system properties that can be used to configure key and trust stores.</li> + </ul> + + <p>In Java ME, the platform settings are used for SSL connections.</p> + + The persistence mechanism is used to enable reliable messaging. + For qualities of server (QoS) 1 or 2 to work, messages must be persisted + to disk by both the client and the server. If this is not done, then + a failure in the client or server will result in lost messages. It + is the application's responsibility to provide an implementation of the + <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClientPersistence.html" title="interface in org.eclipse.paho.client.mqttv3"><CODE>MqttClientPersistence</CODE></A> interface, which the client can use to + persist messages. If the application is only sending QoS 0 messages, + then this is not needed. + + <p>An implementation of file-based persistence is provided in the + class <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttDefaultFilePersistence.html" title="class in org.eclipse.paho.client.mqttv3"><CODE>MqttDefaultFilePersistence</CODE></A>. + If no persistence is needed, it can be explicitly set to <code>null</code>.</p>
+<P>
+<DT><B>Parameters:</B><DD><CODE>serverURI</CODE> - the address to connect to, specified as a URI<DD><CODE>clientId</CODE> - the client ID to use<DD><CODE>persistence</CODE> - the persistence mechanism to use. +<DT><B>Throws:</B> +<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the URI does not start with + "tcp://", "ssl://" or "local://". +<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the clientId is null or is greater than 23 characters in length +<DD><CODE><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A></CODE> - if any other problem was encountered</DL>
+
+<!-- ============ METHOD DETAIL ========== -->
+
+<A NAME="method_detail"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TD COLSPAN=1><FONT SIZE="+2">
+<B>Method Detail</B></FONT></TD>
+</TR>
+</TABLE>
+
+<A NAME="connect()"><!-- --></A><H3>
+connect</H3>
+<PRE>
+public void <B>connect</B>() + throws <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttSecurityException.html" title="class in org.eclipse.paho.client.mqttv3">MqttSecurityException</A>, + <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A></PRE>
+<DL>
+<DD>Connects to a server using the default options. + It is recommended to call <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#setCallback(org.eclipse.paho.client.mqttv3.MqttCallback)"><CODE>setCallback(MqttCallback)</CODE></A> prior to + connecting.
+<P>
+<DD><DL>
+</DL>
+</DD>
+<DD><DL>
+ +<DT><B>Throws:</B> +<DD><CODE><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttSecurityException.html" title="class in org.eclipse.paho.client.mqttv3">MqttSecurityException</A></CODE> +<DD><CODE><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A></CODE></DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="connect(org.eclipse.paho.client.mqttv3.MqttConnectOptions)"><!-- --></A><H3>
+connect</H3>
+<PRE>
+public void <B>connect</B>(<A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttConnectOptions.html" title="class in org.eclipse.paho.client.mqttv3">MqttConnectOptions</A> options) + throws <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttSecurityException.html" title="class in org.eclipse.paho.client.mqttv3">MqttSecurityException</A>, + <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A></PRE>
+<DL>
+<DD>Connects to a server using the specified options. + It is recommended to call <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#setCallback(org.eclipse.paho.client.mqttv3.MqttCallback)"><CODE>setCallback(MqttCallback)</CODE></A> prior to + connecting.
+<P>
+<DD><DL>
+</DL>
+</DD>
+<DD><DL>
+ +<DT><B>Throws:</B> +<DD><CODE><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttSecurityException.html" title="class in org.eclipse.paho.client.mqttv3">MqttSecurityException</A></CODE> +<DD><CODE><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A></CODE></DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="disconnect()"><!-- --></A><H3>
+disconnect</H3>
+<PRE>
+public void <B>disconnect</B>() + throws <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A></PRE>
+<DL>
+<DD>Disconnects from the server, which quiesces for up to a + maximum of thirty seconds, to allow the client to finish any work it + currently has.
+<P>
+<DD><DL>
+</DL>
+</DD>
+<DD><DL>
+ +<DT><B>Throws:</B> +<DD><CODE><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#disconnect(long)"><CODE>disconnect(long)</CODE></A></DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="disconnect(long)"><!-- --></A><H3>
+disconnect</H3>
+<PRE>
+public void <B>disconnect</B>(long quiesceTimeout) + throws <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A></PRE>
+<DL>
+<DD>Disconnects from the server. + This method must not be called from inside <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttCallback.html" title="interface in org.eclipse.paho.client.mqttv3"><CODE>MqttCallback</CODE></A> methods. + <p> + Firstly, the client will wait for all <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttCallback.html" title="interface in org.eclipse.paho.client.mqttv3"><CODE>MqttCallback</CODE></A> methods to + complete. It will then quiesce for the specified time, to allow for + work which has already been accepted to complete - for example, it will + wait for the QoS 2 flows from earlier publications to complete. After + the quiesce timeout, the client will disconnect from the server. When + the client is next connected, any QoS 1 or 2 messages which have not + completed will be retried.</p>
+<P>
+<DD><DL>
+</DL>
+</DD>
+<DD><DL>
+<DT><B>Parameters:</B><DD><CODE>quiesceTimeout</CODE> - the amount of time in milliseconds to allow for existing work to finish + before disconnecting. A value of zero or less means the client will + not quiesce. +<DT><B>Throws:</B> +<DD><CODE><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A></CODE></DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="isConnected()"><!-- --></A><H3>
+isConnected</H3>
+<PRE>
+public boolean <B>isConnected</B>()</PRE>
+<DL>
+<DD>Determines if this client is currently connected to the + server.
+<P>
+<DD><DL>
+</DL>
+</DD>
+<DD><DL>
+ +<DT><B>Returns:</B><DD><code>true</code> if connected, <code>false</code> otherwise.</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="getClientId()"><!-- --></A><H3>
+getClientId</H3>
+<PRE>
+public java.lang.String <B>getClientId</B>()</PRE>
+<DL>
+<DD>Returns the client ID used by this client.
+<P>
+<DD><DL>
+</DL>
+</DD>
+<DD><DL>
+ +<DT><B>Returns:</B><DD>the client ID used by this client.</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="getServerURI()"><!-- --></A><H3>
+getServerURI</H3>
+<PRE>
+public java.lang.String <B>getServerURI</B>()</PRE>
+<DL>
+<DD>Returns the address of the server used by this client, as a URI. + The format is the same as specified on the constructor.
+<P>
+<DD><DL>
+</DL>
+</DD>
+<DD><DL>
+ +<DT><B>Returns:</B><DD>the server's address, as a URI String.<DT><B>See Also:</B><DD><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#MqttClient(java.lang.String, java.lang.String)"><CODE>MqttClient(String, String)</CODE></A></DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="getTopic(java.lang.String)"><!-- --></A><H3>
+getTopic</H3>
+<PRE>
+public <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttTopic.html" title="class in org.eclipse.paho.client.mqttv3">MqttTopic</A> <B>getTopic</B>(java.lang.String topic)</PRE>
+<DL>
+<DD>Gets a topic object which can be used to publish messages. + <p>When you build an application, + the design of the topic tree should take into account the following principles + of topic name syntax and semantics:</p> + + <ul> + <li>A topic must be at least one character long.</li> + <li>Topic names are case sensitive. For example, <em>ACCOUNTS</em> and <em>Accounts</em> are + two different topics.</li> + <li>Topic names can include the space character. For example, <em>Accounts + payable</em> is a valid topic.</li> + <li>A leading "/" creates a distinct topic. For example, <em>/finance</em> is + different from <em>finance</em>. <em>/finance</em> matches "+/+" and "/+", but + not "+".</li> + <li>Do not include the null character (Unicode<samp class="codeph"> \x0000</samp>) in + any topic.</li> + </ul> + + <p>The following principles apply to the construction and content of a topic + tree:</p> + + <ul> + <li>The length is limited to 64k but within that there are no limits to the + number of levels in a topic tree.</li> + <li>There can be any number of root nodes; that is, there can be any number + of topic trees.</li> + </ul> + </p>
+<P>
+<DD><DL>
+<DT><B>Specified by:</B><DD><CODE>getTopic</CODE> in interface <CODE>org.eclipse.paho.client.mqttv3.internal.DestinationProvider</CODE></DL>
+</DD>
+<DD><DL>
+<DT><B>Parameters:</B><DD><CODE>topic</CODE> - the topic to use, for example "finance/stock/ibm". +<DT><B>Returns:</B><DD>an MqttTopic object, which can be used to publish messages to + the topic. +<DT><B>Throws:</B> +<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the topic contains a '+' or '#' + wildcard character.</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="subscribe(java.lang.String)"><!-- --></A><H3>
+subscribe</H3>
+<PRE>
+public void <B>subscribe</B>(java.lang.String topicFilter) + throws <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A>, + <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttSecurityException.html" title="class in org.eclipse.paho.client.mqttv3">MqttSecurityException</A></PRE>
+<DL>
+<DD>Subscribes to a topic, which may include wildcards, using the default + options. The <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#setCallback(org.eclipse.paho.client.mqttv3.MqttCallback)"><CODE>setCallback(MqttCallback)</CODE></A> method should be called + before this method, otherwise any received messages will be discarded.
+<P>
+<DD><DL>
+</DL>
+</DD>
+<DD><DL>
+ +<DT><B>Throws:</B> +<DD><CODE><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A></CODE> +<DD><CODE><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttSecurityException.html" title="class in org.eclipse.paho.client.mqttv3">MqttSecurityException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#subscribe(java.lang.String[], int[])"><CODE>subscribe(String[], int[])</CODE></A></DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="subscribe(java.lang.String[])"><!-- --></A><H3>
+subscribe</H3>
+<PRE>
+public void <B>subscribe</B>(java.lang.String[] topicFilters) + throws <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A>, + <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttSecurityException.html" title="class in org.eclipse.paho.client.mqttv3">MqttSecurityException</A></PRE>
+<DL>
+<DD>Subscribes to multiple topics, each of which may include wildcards, + using the default options. The <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#setCallback(org.eclipse.paho.client.mqttv3.MqttCallback)"><CODE>setCallback(MqttCallback)</CODE></A> method should be called + before this method, otherwise any received messages will be discarded.
+<P>
+<DD><DL>
+</DL>
+</DD>
+<DD><DL>
+ +<DT><B>Throws:</B> +<DD><CODE><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A></CODE> +<DD><CODE><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttSecurityException.html" title="class in org.eclipse.paho.client.mqttv3">MqttSecurityException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#subscribe(java.lang.String[], int[])"><CODE>subscribe(String[], int[])</CODE></A></DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="subscribe(java.lang.String, int)"><!-- --></A><H3>
+subscribe</H3>
+<PRE>
+public void <B>subscribe</B>(java.lang.String topicFilter, + int qos) + throws <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A>, + <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttSecurityException.html" title="class in org.eclipse.paho.client.mqttv3">MqttSecurityException</A></PRE>
+<DL>
+<DD>Subscribes to a topic, which may include wildcards, using the specified + options. The <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#setCallback(org.eclipse.paho.client.mqttv3.MqttCallback)"><CODE>setCallback(MqttCallback)</CODE></A> method should be called + before this method, otherwise any received messages will be discarded.
+<P>
+<DD><DL>
+</DL>
+</DD>
+<DD><DL>
+<DT><B>Parameters:</B><DD><CODE>topicFilter</CODE> - the topic to subscribe to, which can include wildcards.<DD><CODE>qos</CODE> - the quality of service at which to subscribe. +<DT><B>Throws:</B> +<DD><CODE><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A></CODE> +<DD><CODE><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttSecurityException.html" title="class in org.eclipse.paho.client.mqttv3">MqttSecurityException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#subscribe(java.lang.String[], int[])"><CODE>subscribe(String[], int[])</CODE></A></DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="subscribe(java.lang.String[], int[])"><!-- --></A><H3>
+subscribe</H3>
+<PRE>
+public void <B>subscribe</B>(java.lang.String[] topicFilters, + int[] qos) + throws <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A>, + <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttSecurityException.html" title="class in org.eclipse.paho.client.mqttv3">MqttSecurityException</A></PRE>
+<DL>
+<DD>Subscribes to multiple topics, each of which may include wildcards, + using the specified options. The <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttClient.html#setCallback(org.eclipse.paho.client.mqttv3.MqttCallback)"><CODE>setCallback(MqttCallback)</CODE></A> method should be called + before this method, otherwise any received messages will be discarded. + + <p>The "topic filter" string used when subscribing + may contain special characters, which allow you to subscribe to multiple topics + at once.</p> + <p>The topic level separator is used to introduce structure into the topic, and + can therefore be specified within the topic for that purpose. The multi-level + wildcard and single-level wildcard can be used for subscriptions, but they + cannot be used within a topic by the publisher of a message. + <dl> + <dt>Topic level separator</dt> + <dd>The forward slash (/) is used to separate each level within + a topic tree and provide a hierarchical structure to the topic space. The + use of the topic level separator is significant when the two wildcard characters + are encountered in topics specified by subscribers.</dd> + + <dt>Multi-level wildcard</dt> + <dd><p>The number sign (#) is a wildcard character that matches + any number of levels within a topic. For example, if you subscribe to <span><span class="filepath">finance/stock/ibm/#</span></span>, you receive + messages on these topics:<pre> finance/stock/ibm<br /> finance/stock/ibm/closingprice<br /> finance/stock/ibm/currentprice</pre> + </p> + <p>The multi-level wildcard + can represent zero or more levels. Therefore, <em>finance/#</em> can also match + the singular <em>finance</em>, where <em>#</em> represents zero levels. The topic + level separator is meaningless in this context, because there are no levels + to separate.</p> + + <p>The <span>multi-level</span> wildcard can + be specified only on its own or next to the topic level separator character. + Therefore, <em>#</em> and <em>finance/#</em> are both valid, but <em>finance#</em> is + not valid. <span>The multi-level wildcard must be the last character + used within the topic tree. For example, <em>finance/#</em> is valid but <em>finance/#/closingprice</em> is + not valid.</span></p></dd> + + <dt>Single-level wildcard</dt> + <dd><p>The plus sign (+) is a wildcard character that matches only one topic + level. For example, <em>finance/stock/+</em> matches <em>finance/stock/ibm</em> and <em>finance/stock/xyz</em>, + but not <em>finance/stock/ibm/closingprice</em>. Also, because the single-level + wildcard matches only a single level, <em>finance/+</em> does not match <em>finance</em>.</p> + + <p>Use + the single-level wildcard at any level in the topic tree, and in conjunction + with the multilevel wildcard. Specify the single-level wildcard next to the + topic level separator, except when it is specified on its own. Therefore, <em>+</em> and <em>finance/+</em> are + both valid, but <em>finance+</em> is not valid. <span>The single-level + wildcard can be used at the end of the topic tree or within the topic tree. + For example, <em>finance/+</em> and <em>finance/+/ibm</em> are both valid.</span></p> + </dd> + </dl> + </p>
+<P>
+<DD><DL>
+</DL>
+</DD>
+<DD><DL>
+<DT><B>Parameters:</B><DD><CODE>topicFilters</CODE> - the topics to subscribe to, which can include wildcards.<DD><CODE>qos</CODE> - the qualities of service levels at which to subscribe. +<DT><B>Throws:</B> +<DD><CODE><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A></CODE> - if there was an error registering the subscription. +<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the two supplied arrays are not the same size. +<DD><CODE><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttSecurityException.html" title="class in org.eclipse.paho.client.mqttv3">MqttSecurityException</A></CODE></DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="unsubscribe(java.lang.String)"><!-- --></A><H3>
+unsubscribe</H3>
+<PRE>
+public void <B>unsubscribe</B>(java.lang.String topicFilter) + throws <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A></PRE>
+<DL>
+<DD>Unsubscribes from a topic.
+<P>
+<DD><DL>
+</DL>
+</DD>
+<DD><DL>
+<DT><B>Parameters:</B><DD><CODE>topicFilter</CODE> - the topic to unsubscribe from. +<DT><B>Throws:</B> +<DD><CODE><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A></CODE></DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="unsubscribe(java.lang.String[])"><!-- --></A><H3>
+unsubscribe</H3>
+<PRE>
+public void <B>unsubscribe</B>(java.lang.String[] topicFilters) + throws <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A></PRE>
+<DL>
+<DD>Unsubscribes from multiple topics.
+<P>
+<DD><DL>
+</DL>
+</DD>
+<DD><DL>
+<DT><B>Parameters:</B><DD><CODE>topicFilters</CODE> - the topics to unsubscribe from. +<DT><B>Throws:</B> +<DD><CODE><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A></CODE></DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="setCallback(org.eclipse.paho.client.mqttv3.MqttCallback)"><!-- --></A><H3>
+setCallback</H3>
+<PRE>
+public void <B>setCallback</B>(<A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttCallback.html" title="interface in org.eclipse.paho.client.mqttv3">MqttCallback</A> callback) + throws <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A></PRE>
+<DL>
+<DD>Sets the callback listener to use for asynchronously received + messages. + The + <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttCallback.html#messageArrived(org.eclipse.paho.client.mqttv3.MqttTopic, org.eclipse.paho.client.mqttv3.MqttMessage)"><CODE>MqttCallback.messageArrived(MqttTopic, MqttMessage)</CODE></A> + method will be called back whenever a message arrives.
+<P>
+<DD><DL>
+</DL>
+</DD>
+<DD><DL>
+<DT><B>Parameters:</B><DD><CODE>callback</CODE> - the class to callback when a message arrives. +<DT><B>Throws:</B> +<DD><CODE><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttException.html" title="class in org.eclipse.paho.client.mqttv3">MqttException</A></CODE></DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="generateClientId()"><!-- --></A><H3>
+generateClientId</H3>
+<PRE>
+public static java.lang.String <B>generateClientId</B>()</PRE>
+<DL>
+<DD>Returns a randomly generated client identifier based on the current user's login + name and the system time. + <p>When cleanSession is set to false, an application should ensure it uses the + same client identifier when it reconnects to the server to resume state and maintain + assured message delivery.</p>
+<P>
+<DD><DL>
+</DL>
+</DD>
+<DD><DL>
+ +<DT><B>Returns:</B><DD>a generated client identifier<DT><B>See Also:</B><DD><A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttConnectOptions.html#setCleanSession(boolean)"><CODE>MqttConnectOptions.setCleanSession(boolean)</CODE></A></DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="getPendingDeliveryTokens()"><!-- --></A><H3>
+getPendingDeliveryTokens</H3>
+<PRE>
+public <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttDeliveryToken.html" title="interface in org.eclipse.paho.client.mqttv3">MqttDeliveryToken</A>[] <B>getPendingDeliveryTokens</B>()</PRE>
+<DL>
+<DD>Returns the delivery tokens for any outstanding publish operations.
+<P>
+<DD><DL>
+</DL>
+</DD>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<!-- ========= END OF CLASS DATA ========= -->
+<HR>
+
+ +<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A> +<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> +<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A> +<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <A HREF="#main"><FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT></A> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/MqttClient.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../serialized-form.html"><FONT CLASS="NavBarFont1"><B>Serialized</B></FONT></A> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ PREV CLASS
+ <A HREF="../../../../../org/eclipse/paho/client/mqttv3/MqttConnectOptions.html" title="class in org.eclipse.paho.client.mqttv3"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>
+ <A HREF="MqttClient.html" target="_top"><B>NO FRAMES</B></A>
+ <SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT> +
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A> +<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
|