blob: 26c2754f969533ad2639c4b4b1be0b2ba0715870 [file] [log] [blame]
<!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 (1.8.0_112) on Sun Feb 26 17:08:12 EST 2017 -->
<title>org.apache.edgent.providers.iot (Edgent v1.1.0)</title>
<meta name="date" content="2017-02-26">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="org.apache.edgent.providers.iot (Edgent v1.1.0)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li class="navBarCell1Rev">Package</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-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/edgent/providers/direct/package-summary.html">Prev&nbsp;Package</a></li>
<li><a href="../../../../../org/apache/edgent/runtime/appservice/package-summary.html">Next&nbsp;Package</a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/edgent/providers/iot/package-summary.html" target="_top">Frames</a></li>
<li><a href="package-summary.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;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&nbsp;org.apache.edgent.providers.iot</h1>
<div class="docSummary">
<div class="block">Iot provider that allows multiple applications to
share an <code>IotDevice</code>.</div>
</div>
<p>See:&nbsp;<a href="#package.description">Description</a></p>
</div>
<div class="contentContainer">
<ul class="blockList">
<li class="blockList">
<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation">
<caption><span>Class Summary</span><span class="tabEnd">&nbsp;</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/apache/edgent/providers/iot/IotProvider.html" title="class in org.apache.edgent.providers.iot">IotProvider</a></td>
<td class="colLast">
<div class="block">IoT provider supporting multiple topologies with a single connection to a
message hub.</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
<a name="package.description">
<!-- -->
</a>
<h2 title="Package org.apache.edgent.providers.iot Description">Package org.apache.edgent.providers.iot Description</h2>
<div class="block">Iot provider that allows multiple applications to
share an <code>IotDevice</code>.
<H3>IoT device</H3>
<H3>Application registration</H3>
The provider includes an <a href="../../../../../org/apache/edgent/topology/services/ApplicationService.html" title="interface in org.apache.edgent.topology.services"><code>ApplicationService</code></a> that allows applications
to be registered by name. Once registered an application can be started (and stopped) remotely
through the control service using a device command.
<H3>Supported device commands</H3>
This provider supports a number of system level device commands to control the applications
running within it.
<H4>Control service</H4>
Device commands with the command identifier '<a href="../../../../../org/apache/edgent/connectors/iot/Commands.html#CONTROL_SERVICE"><code>edgentControl</code></a>'
are sent to the provider's control service, an instance of <a href="../../../../../org/apache/edgent/runtime/jsoncontrol/JsonControlService.html" title="class in org.apache.edgent.runtime.jsoncontrol"><code>JsonControlService</code></a>.
This allows invocation of an operation against a control mbean registered with the
control service, either by an application or the provider itself.
<BR>
The command's data (JSON) uniquely identifies a control MBean through its type and
alias, and indicates the operation to call on the MBean and the arguments to
pass to the operation.
<BR>
Thus any control operation can be remotely invoked through a <code>edgentControl</code> device command,
including arbitrary control mbeans registered by applications.
<H4 id="providerOps">Provider operations</H4>
<table border="1" summary="Provider operations">
<tr>
<th id="operation">Operation</th><th id="cmdIdentifier">Command identifier</th>
<th id="type">type</th><th id="alias">alias</th><th id="op">op</th><th id="args">args</th>
<th id="controlMbean">Control MBean</th>
</tr>
<tr>
<td rowspan="2" headers="operation"><strong>Submit (start) a registered application</strong></td>
<td headers="cmdIdentifier"><code>edgentControl</code></td>
<td headers="type"><code>appService</code></td>
<td headers="alias"><code>edgent</code></td>
<td headers="op"><a href="../../../../../org/apache/edgent/topology/mbeans/ApplicationServiceMXBean.html#submit-java.lang.String-java.lang.String-"><code>submit</code></a></td>
<td headers="args"><em><code>[applicationName, configJSONObject]</code></em></td>
<td headers="controlMbean"><a href="../../../../../org/apache/edgent/topology/mbeans/ApplicationServiceMXBean.html" title="interface in org.apache.edgent.topology.mbeans"><code>ApplicationServiceMXBean</code></a></td>
</tr>
<tr>
<td headers="cmdIdentifier"><strong>Sample command data</strong></td>
<td colspan=5 headers="type alias op args controlMbean"><code>{"type":"appService","alias":"edgent","op":"submit","args":["Heartbeat",{}]}</code></td>
</tr>
<tr></tr>
<tr>
<td rowspan="2" headers="operation"><strong>Close (stop) a running registered application</strong></td>
<td headers="cmdIdentifier"><code>edgentControl</code></td>
<td headers="type"><code>job</code></td>
<td headers="alias"><em><code>applicationName</code></em></td>
<td headers="op"><a href="../../../../../org/apache/edgent/execution/mbeans/JobMXBean.html#stateChange-org.apache.edgent.execution.Job.Action-"><code>stateChange</code></a></td>
<td headers="args"><code>["CLOSE"]</code></td>
<td headers="controlMbean"><a href="../../../../../org/apache/edgent/execution/mbeans/JobMXBean.html" title="interface in org.apache.edgent.execution.mbeans"><code>JobMXBean</code></a></td>
</tr>
<tr>
<td headers="cmdIdentifier"><strong>Sample command data</strong></td>
<td colspan=5 headers="type alias op args controlMbean"><code>{"type":"job","alias":"Heartbeat","op":"stateChange","args":["CLOSE"]}</code></td>
</tr>
<tr></tr>
</table></div>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li class="navBarCell1Rev">Package</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-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><a href="http://edgent.incubator.apache.org">Apache Edgent (incubating)</a></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/edgent/providers/direct/package-summary.html">Prev&nbsp;Package</a></li>
<li><a href="../../../../../org/apache/edgent/runtime/appservice/package-summary.html">Next&nbsp;Package</a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/edgent/providers/iot/package-summary.html" target="_top">Frames</a></li>
<li><a href="package-summary.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;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 ======= -->
<p class="legalCopy"><small>Copyright &#169; 2017 The Apache Software Foundation. All Rights Reserved - 4744f56-20170226-1707</small></p>
</body>
</html>