<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<!-- NewPage --> | |
<html lang="en"> | |
<head> | |
<!-- Generated by javadoc (version 1.7.0_13) on Wed Apr 23 18:07:53 CST 2014 --> | |
<title>org.eclipse.paho.android.service</title> | |
<meta name="date" content="2014-04-23"> | |
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> | |
</head> | |
<body> | |
<script type="text/javascript"><!-- | |
if (location.href.indexOf('is-external=true') == -1) { | |
parent.document.title="org.eclipse.paho.android.service"; | |
} | |
//--> | |
</script> | |
<noscript> | |
<div>JavaScript is disabled on your browser.</div> | |
</noscript> | |
<!-- ========= START OF TOP NAVBAR ======= --> | |
<div class="topNav"><a name="navbar_top"> | |
<!-- --> | |
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> | |
<!-- --> | |
</a> | |
<ul class="navList" title="Navigation"> | |
<li><a href="../../../../../org/eclipse/paho/android/service/package-summary.html">Package</a></li> | |
<li>Class</li> | |
<li><a href="package-use.html">Use</a></li> | |
<li><a href="package-tree.html">Tree</a></li> | |
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> | |
<li><a href="../../../../../index-files/index-1.html">Index</a></li> | |
<li><a href="../../../../../help-doc.html">Help</a></li> | |
</ul> | |
</div> | |
<div class="subNav"> | |
<ul class="navList"> | |
<li>Prev Package</li> | |
<li>Next Package</li> | |
</ul> | |
<ul class="navList"> | |
<li><a href="../../../../../index.html?org/eclipse/paho/android/service/package-summary.html" target="_top">Frames</a></li> | |
<li><a href="package-summary.html" target="_top">No Frames</a></li> | |
</ul> | |
<ul class="navList" id="allclasses_navbar_top"> | |
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> | |
</ul> | |
<div> | |
<script type="text/javascript"><!-- | |
allClassesLink = document.getElementById("allclasses_navbar_top"); | |
if(window==top) { | |
allClassesLink.style.display = "block"; | |
} | |
else { | |
allClassesLink.style.display = "none"; | |
} | |
//--> | |
</script> | |
</div> | |
<a name="skip-navbar_top"> | |
<!-- --> | |
</a></div> | |
<!-- ========= END OF TOP NAVBAR ========= --> | |
<div class="header"> | |
<h1 title="Package" class="title">Package org.eclipse.paho.android.service</h1> | |
<div class="docSummary"> | |
<div class="block">Contains a set of classes which allow an Android App to communicate | |
with an MQTT server using an Android Service.</div> | |
</div> | |
<p>See: <a href="#package_description">Description</a></p> | |
</div> | |
<div class="contentContainer"> | |
<ul class="blockList"> | |
<li class="blockList"> | |
<table class="packageSummary" border="0" cellpadding="3" cellspacing="0" summary="Interface Summary table, listing interfaces, and an explanation"> | |
<caption><span>Interface Summary</span><span class="tabEnd"> </span></caption> | |
<tr> | |
<th class="colFirst" scope="col">Interface</th> | |
<th class="colLast" scope="col">Description</th> | |
</tr> | |
<tbody> | |
<tr class="altColor"> | |
<td class="colFirst"><a href="../../../../../org/eclipse/paho/android/service/MessageStore.html" title="interface in org.eclipse.paho.android.service">MessageStore</a></td> | |
<td class="colLast"> | |
<div class="block"> | |
Mechanism for persisting messages until we know they have been received</div> | |
</td> | |
</tr> | |
<tr class="rowColor"> | |
<td class="colFirst"><a href="../../../../../org/eclipse/paho/android/service/MessageStore.StoredMessage.html" title="interface in org.eclipse.paho.android.service">MessageStore.StoredMessage</a></td> | |
<td class="colLast"> | |
<div class="block">External representation of a stored message</div> | |
</td> | |
</tr> | |
<tr class="altColor"> | |
<td class="colFirst"><a href="../../../../../org/eclipse/paho/android/service/MqttServiceConstants.html" title="interface in org.eclipse.paho.android.service">MqttServiceConstants</a></td> | |
<td class="colLast"> | |
<div class="block">Various strings used to identify operations or data in the Android MQTT | |
service, mainly used in Intents passed between Activities and the Service.</div> | |
</td> | |
</tr> | |
<tr class="rowColor"> | |
<td class="colFirst"><a href="../../../../../org/eclipse/paho/android/service/MqttTraceHandler.html" title="interface in org.eclipse.paho.android.service">MqttTraceHandler</a></td> | |
<td class="colLast"> | |
<div class="block">Interface for simple trace handling</div> | |
</td> | |
</tr> | |
</tbody> | |
</table> | |
</li> | |
<li class="blockList"> | |
<table class="packageSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation"> | |
<caption><span>Class Summary</span><span class="tabEnd"> </span></caption> | |
<tr> | |
<th class="colFirst" scope="col">Class</th> | |
<th class="colLast" scope="col">Description</th> | |
</tr> | |
<tbody> | |
<tr class="altColor"> | |
<td class="colFirst"><a href="../../../../../org/eclipse/paho/android/service/AlarmPingSender.html" title="class in org.eclipse.paho.android.service">AlarmPingSender</a></td> | |
<td class="colLast"> | |
<div class="block">Default ping sender implementation on Android.</div> | |
</td> | |
</tr> | |
<tr class="altColor"> | |
<td class="colFirst"><a href="../../../../../org/eclipse/paho/android/service/DatabaseMessageStore.html" title="class in org.eclipse.paho.android.service">DatabaseMessageStore</a></td> | |
<td class="colLast"> | |
<div class="block">Implementation of the <a href="../../../../../org/eclipse/paho/android/service/MessageStore.html" title="interface in org.eclipse.paho.android.service"><code>MessageStore</code></a> interface, using a SQLite database</div> | |
</td> | |
</tr> | |
<tr class="rowColor"> | |
<td class="colFirst"><a href="../../../../../org/eclipse/paho/android/service/MqttAndroidClient.html" title="class in org.eclipse.paho.android.service">MqttAndroidClient</a></td> | |
<td class="colLast"> | |
<div class="block">Enables an android application to communicate with an MQTT server using non-blocking methods.</div> | |
</td> | |
</tr> | |
<tr class="altColor"> | |
<td class="colFirst"><a href="../../../../../org/eclipse/paho/android/service/MqttConnection.html" title="class in org.eclipse.paho.android.service">MqttConnection</a></td> | |
<td class="colLast"> | |
<div class="block"> | |
MqttConnection holds a MqttAsyncClient {host,port,clientId} instance to perform | |
MQTT operations to MQTT broker.</div> | |
</td> | |
</tr> | |
<tr class="rowColor"> | |
<td class="colFirst"><a href="../../../../../org/eclipse/paho/android/service/MqttDeliveryTokenAndroid.html" title="class in org.eclipse.paho.android.service">MqttDeliveryTokenAndroid</a></td> | |
<td class="colLast"> | |
<div class="block"> | |
Implementation of the IMqttDeliveryToken interface for use from within the | |
MqttAndroidClient implementation</div> | |
</td> | |
</tr> | |
<tr class="altColor"> | |
<td class="colFirst"><a href="../../../../../org/eclipse/paho/android/service/MqttService.html" title="class in org.eclipse.paho.android.service">MqttService</a></td> | |
<td class="colLast"> | |
<div class="block"> | |
The android service which interfaces with an MQTT client implementation</div> | |
</td> | |
</tr> | |
<tr class="rowColor"> | |
<td class="colFirst"><a href="../../../../../org/eclipse/paho/android/service/MqttServiceBinder.html" title="class in org.eclipse.paho.android.service">MqttServiceBinder</a></td> | |
<td class="colLast"> | |
<div class="block">What the Service passes to the Activity on binding:- | |
a reference to the Service | |
the activityToken provided when the Service was started | |
</div> | |
</td> | |
</tr> | |
<tr class="altColor"> | |
<td class="colFirst"><a href="../../../../../org/eclipse/paho/android/service/MqttTokenAndroid.html" title="class in org.eclipse.paho.android.service">MqttTokenAndroid</a></td> | |
<td class="colLast"> | |
<div class="block"> | |
Implementation of the IMqttToken interface for use from within the | |
MqttAndroidClient implementation</div> | |
</td> | |
</tr> | |
<tr class="rowColor"> | |
<td class="colFirst"><a href="../../../../../org/eclipse/paho/android/service/ParcelableMqttMessage.html" title="class in org.eclipse.paho.android.service">ParcelableMqttMessage</a></td> | |
<td class="colLast"> | |
<div class="block"> | |
A way to flow MqttMessages via Bundles/Intents</div> | |
</td> | |
</tr> | |
</tbody> | |
</table> | |
</li> | |
<li class="blockList"> | |
<table class="packageSummary" border="0" cellpadding="3" cellspacing="0" summary="Enum Summary table, listing enums, and an explanation"> | |
<caption><span>Enum Summary</span><span class="tabEnd"> </span></caption> | |
<tr> | |
<th class="colFirst" scope="col">Enum</th> | |
<th class="colLast" scope="col">Description</th> | |
</tr> | |
<tbody> | |
<tr class="altColor"> | |
<td class="colFirst"><a href="../../../../../org/eclipse/paho/android/service/MqttAndroidClient.Ack.html" title="enum in org.eclipse.paho.android.service">MqttAndroidClient.Ack</a></td> | |
<td class="colLast"> | |
<div class="block">The Acknowledgment mode for messages received from <code>MqttCallback.messageArrived(String, MqttMessage)</code></div> | |
</td> | |
</tr> | |
<tr class="rowColor"> | |
<td class="colFirst"><a href="../../../../../org/eclipse/paho/android/service/Status.html" title="enum in org.eclipse.paho.android.service">Status</a></td> | |
<td class="colLast"> | |
<div class="block">Enumeration representing the success or failure of an operation</div> | |
</td> | |
</tr> | |
</tbody> | |
</table> | |
</li> | |
</ul> | |
<a name="package_description"> | |
<!-- --> | |
</a> | |
<h2 title="Package org.eclipse.paho.android.service Description">Package org.eclipse.paho.android.service Description</h2> | |
<div class="block">Contains a set of classes which allow an Android App to communicate | |
with an MQTT server using an Android Service. | |
<p> | |
The Android environment requires that a Service is used to support | |
such things as a long-lasting network connection.<br> This | |
package provides the classes need to implement such a Service to | |
interact with MQTT, together with an implementation of the | |
IMqttAsyncClient interface which uses the Service to implement the | |
interface operations. | |
</p> | |
<p>The Service returns results via the Android Intent mechanism. | |
The MqttAndroidClient class shows how the interaction is | |
managed</p> | |
<p> | |
<strong>Note:</strong> An App which uses this service must include the | |
appropriate Service tag in its manifest - e.g. | |
<pre> | |
‹!-- Mqtt Service --› | |
‹service android:name="com.ibm.android.service.MqttService" /› | |
</pre> | |
</p> | |
<p><strong>Note regarding network connectivity</strong></p> | |
<p> | |
The service does not attempt to track network state and automatically reconnect to MQTT servers as connectivity is lost and regained | |
While this is clearly possible, determining appropriate behaviour presents certain challenges. <br> | |
Any maintainer adding support for such functionality should look to providing a <i>BroadcastReceiver</i> for | |
<i>ConnectivityManager.CONNECTIVITY_ACTION</i> probably as part of the MqttService object.<br> | |
Changes in network connectivity would then need to be notified to the relevant MqttConnection objects. | |
</p> | |
<p> | |
The behaviour in response to changes in network connectivity would need to be considered in some detail - for example :- | |
<ul> | |
<li>Should the behaviour differ for CleanSession=true vs CleanSession=false?<br> | |
Remember that CleanSession=false will preserve subscriptions and messages with QOS > 0 should not be lost. | |
This would not be true for CleanSession=true; | |
<li>What is the meaning of the <i>isConnected()</i> in this context? | |
</ul> | |
</p></div> | |
</div> | |
<!-- ======= START OF BOTTOM NAVBAR ====== --> | |
<div class="bottomNav"><a name="navbar_bottom"> | |
<!-- --> | |
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> | |
<!-- --> | |
</a> | |
<ul class="navList" title="Navigation"> | |
<li><a href="../../../../../org/eclipse/paho/android/service/package-summary.html">Package</a></li> | |
<li>Class</li> | |
<li><a href="package-use.html">Use</a></li> | |
<li><a href="package-tree.html">Tree</a></li> | |
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> | |
<li><a href="../../../../../index-files/index-1.html">Index</a></li> | |
<li><a href="../../../../../help-doc.html">Help</a></li> | |
</ul> | |
</div> | |
<div class="subNav"> | |
<ul class="navList"> | |
<li>Prev Package</li> | |
<li>Next Package</li> | |
</ul> | |
<ul class="navList"> | |
<li><a href="../../../../../index.html?org/eclipse/paho/android/service/package-summary.html" target="_top">Frames</a></li> | |
<li><a href="package-summary.html" target="_top">No Frames</a></li> | |
</ul> | |
<ul class="navList" id="allclasses_navbar_bottom"> | |
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> | |
</ul> | |
<div> | |
<script type="text/javascript"><!-- | |
allClassesLink = document.getElementById("allclasses_navbar_bottom"); | |
if(window==top) { | |
allClassesLink.style.display = "block"; | |
} | |
else { | |
allClassesLink.style.display = "none"; | |
} | |
//--> | |
</script> | |
</div> | |
<a name="skip-navbar_bottom"> | |
<!-- --> | |
</a></div> | |
<!-- ======== END OF BOTTOM NAVBAR ======= --> | |
</body> | |
</html> |