blob: 8d400aec1bb9242687dd1f632883192544ad52cb [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 Mon Dec 18 11:25:21 EST 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>IotProvider (Apache Edgent (incubating) v1.2.0 API)</title>
<meta name="date" content="2017-12-18">
<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="IotProvider (Apache Edgent (incubating) v1.2.0 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":9,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</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><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/IotProvider.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>Prev&nbsp;Class</li>
<li>Next&nbsp;Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/edgent/providers/iot/IotProvider.html" target="_top">Frames</a></li>
<li><a href="IotProvider.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>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.edgent.providers.iot</div>
<h2 title="Class IotProvider" class="title">Class IotProvider</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.edgent.providers.iot.IotProvider</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../../org/apache/edgent/execution/DirectSubmitter.html" title="interface in org.apache.edgent.execution">DirectSubmitter</a>&lt;<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>,<a href="../../../../../org/apache/edgent/execution/Job.html" title="interface in org.apache.edgent.execution">Job</a>&gt;, <a href="../../../../../org/apache/edgent/execution/Submitter.html" title="interface in org.apache.edgent.execution">Submitter</a>&lt;<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>,<a href="../../../../../org/apache/edgent/execution/Job.html" title="interface in org.apache.edgent.execution">Job</a>&gt;, <a href="../../../../../org/apache/edgent/topology/TopologyProvider.html" title="interface in org.apache.edgent.topology">TopologyProvider</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">IotProvider</span>
extends <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="../../../../../org/apache/edgent/topology/TopologyProvider.html" title="interface in org.apache.edgent.topology">TopologyProvider</a>, <a href="../../../../../org/apache/edgent/execution/DirectSubmitter.html" title="interface in org.apache.edgent.execution">DirectSubmitter</a>&lt;<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>,<a href="../../../../../org/apache/edgent/execution/Job.html" title="interface in org.apache.edgent.execution">Job</a>&gt;</pre>
<div class="block">A provider that supports sharing of a single connection to an IoT message hub and
access to control MBeans via IoT device commands.
<pre><code>
// sample use
class MyApp {
...
public void run(String[] args) throws Exception {
IotProvider provider = new IotProvider((top) -&gt; new IotpDevice(top, myDeviceConfig));
provider.registerTopology("app1", (iotDevice, cfg) -&gt; buildApp1(iotDevice, cfg));
provider.start();
}
private void buildApp1(IotDevice iotDevice, JsonConfig cfg) {
Topology top = iotDevice.getTopology();
... build the topology
}
}
</code></pre>
<p>The registered builders are subsequently invoked from
<a href="../../../../../org/apache/edgent/topology/mbeans/ApplicationServiceMXBean.html#submit-java.lang.String-java.lang.String-"><code>ApplicationServiceMXBean.submit()</code></a>.
Each builder invocation is given a virtual <code>IotDevice</code> for the topology's use.
Jobs can be stopped using their <a href="../../../../../org/apache/edgent/execution/mbeans/JobMXBean.html" title="interface in org.apache.edgent.execution.mbeans"><code>JobMXBean</code></a> control.
<p>Applications may also be registered via
<a href="../../../../../org/apache/edgent/topology/mbeans/ApplicationServiceMXBean.html#registerJar-java.lang.String-java.lang.String-"><code>registerJar()</code></a>.
See the note below regarding the <code>TopologyBuilder</code> for such applications.
<p>Constructed topologies may also be submitted via
<a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#submit-org.apache.edgent.topology.Topology-com.google.gson.JsonObject-"><code>submit()</code></a> and are controllable
via their <code>JobMXBean</code>.
The <code>ApplicationService</code> is unaware of these topologies.
<p>See the
<a href="../../../../../org/apache/edgent/providers/iot/package-summary.html">package documentation</a>
for details of using <a href="../../../../../org/apache/edgent/connectors/iot/Commands.html#CONTROL_SERVICE"><code>edgentControl</code></a> IoT device commands
to invoke methods on MBeans registered with the <code>ControlService</code>.
<p>This provider registers these services:
<UL>
<LI><a href="../../../../../org/apache/edgent/execution/services/ControlService.html" title="interface in org.apache.edgent.execution.services"><code>control</code></a> - An instance of <a href="../../../../../org/apache/edgent/runtime/jsoncontrol/JsonControlService.html" title="class in org.apache.edgent.runtime.jsoncontrol"><code>JsonControlService</code></a>.</LI>
<LI><a href="../../../../../org/apache/edgent/topology/services/ApplicationService.html" title="interface in org.apache.edgent.topology.services"><code>application</code></a> - An instance of <a href="../../../../../org/apache/edgent/runtime/appservice/AppService.html" title="class in org.apache.edgent.runtime.appservice"><code>AppService</code></a>.</LI>
<LI><a href="../../../../../org/apache/edgent/connectors/pubsub/service/PublishSubscribeService.html" title="interface in org.apache.edgent.connectors.pubsub.service"><code>publish-subscribe</code></a> - An instance of <a href="../../../../../org/apache/edgent/connectors/pubsub/service/ProviderPubSub.html" title="class in org.apache.edgent.connectors.pubsub.service"><code>ProviderPubSub</code></a></LI>
<LI><code>preferences</code> (optional) - An instance of <code>java.util.prefs.Preferences</code> to store application
and service preferences. A <code>Preferences</code> node is created if the provider is created with
a name that is not <code>null</code>. If the preferences implementation supports persistence
then any preferences will be maintained across provider and JVM restarts when creating a
provider with the same name. The <code>Preferences</code> node is a user node.
</UL>
<p>System applications provide:
<UL>
<LI>Single connection to the message hub using an <code>IotDevice</code>
using <a href="../../../../../org/apache/edgent/apps/iot/IotDevicePubSub.html" title="class in org.apache.edgent.apps.iot"><code>IotDevicePubSub</code></a>.
Applications using this provider that want to connect
to the message hub for device events and commands must create an instance of
<code>IotDevice</code> using <a href="../../../../../org/apache/edgent/apps/iot/IotDevicePubSub.html#addIotDevice-org.apache.edgent.topology.TopologyElement-"><code>addIotDevice()</code></a>.
See below for more information.
</LI>
<LI>Access to the control service through device commands from the message hub.</LI>
</UL>
<p>If topology builders are registered with the ApplicationService using
something other than this provider's <code>registerTopology()</code>,
that code is responsible for creating the virtual IotDevice as described
above on each builder invocation.
<p>For example, an application loaded and registered via
<a href="../../../../../org/apache/edgent/topology/services/ApplicationService.html#registerJar-java.lang.String-java.lang.String-"><code>ApplicationService.registerJar()</code></a>
would create the <code>IotDevice</code> for its builder in its
<a href="../../../../../org/apache/edgent/topology/services/TopologyBuilder.html#getBuilder--"><code>TopologyBuilder.getBuilder()</code></a> implementation:
<pre><code>
class MyApp implements TopologyBuilder { // be loadable by registerJar()
&#64;Override
public BiConsumer&lt;Topology t, JsonConfig c&gt; getBuilder() {
return (t, c) -&gt; buildTopology(IotDevicePubSub.addIotDevice(t), c);
}
private void buildTopology(IotDevice iotDevice, JsonConfig c) {
Topology t = iotDevice.getTopology();
... build your topology
}
}
</code></pre></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/edgent/connectors/iot/IotDevice.html" title="interface in org.apache.edgent.connectors.iot"><code>IotDevice</code></a>,
<a href="../../../../../org/apache/edgent/apps/iot/IotDevicePubSub.html" title="class in org.apache.edgent.apps.iot"><code>IotDevicePubSub</code></a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#CONTROL_APP_NAME">CONTROL_APP_NAME</a></span></code>
<div class="block">IoT control using device commands application name.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#IotProvider-org.apache.edgent.function.Function-">IotProvider</a></span>(<a href="../../../../../org/apache/edgent/function/Function.html" title="interface in org.apache.edgent.function">Function</a>&lt;<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>,<a href="../../../../../org/apache/edgent/connectors/iot/IotDevice.html" title="interface in org.apache.edgent.connectors.iot">IotDevice</a>&gt;&nbsp;iotDeviceCreator)</code>
<div class="block">Create an <code>IotProvider</code> that uses its own <code>DirectProvider</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#IotProvider-java.lang.String-org.apache.edgent.providers.direct.DirectProvider-org.apache.edgent.function.Function-">IotProvider</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="../../../../../org/apache/edgent/providers/direct/DirectProvider.html" title="class in org.apache.edgent.providers.direct">DirectProvider</a>&nbsp;provider,
<a href="../../../../../org/apache/edgent/function/Function.html" title="interface in org.apache.edgent.function">Function</a>&lt;<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>,<a href="../../../../../org/apache/edgent/connectors/iot/IotDevice.html" title="interface in org.apache.edgent.connectors.iot">IotDevice</a>&gt;&nbsp;iotDeviceCreator)</code>
<div class="block">Create an <code>IotProvider</code> that uses the passed in <code>DirectProvider</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#IotProvider-java.lang.String-org.apache.edgent.function.Function-">IotProvider</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="../../../../../org/apache/edgent/function/Function.html" title="interface in org.apache.edgent.function">Function</a>&lt;<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>,<a href="../../../../../org/apache/edgent/connectors/iot/IotDevice.html" title="interface in org.apache.edgent.connectors.iot">IotDevice</a>&gt;&nbsp;iotDeviceCreator)</code>
<div class="block">Create an <code>IotProvider</code> that uses its own <code>DirectProvider</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#IotProvider-java.lang.String-org.apache.edgent.topology.TopologyProvider-org.apache.edgent.execution.DirectSubmitter-org.apache.edgent.function.Function-">IotProvider</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="../../../../../org/apache/edgent/topology/TopologyProvider.html" title="interface in org.apache.edgent.topology">TopologyProvider</a>&nbsp;provider,
<a href="../../../../../org/apache/edgent/execution/DirectSubmitter.html" title="interface in org.apache.edgent.execution">DirectSubmitter</a>&lt;<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>,<a href="../../../../../org/apache/edgent/execution/Job.html" title="interface in org.apache.edgent.execution">Job</a>&gt;&nbsp;submitter,
<a href="../../../../../org/apache/edgent/function/Function.html" title="interface in org.apache.edgent.function">Function</a>&lt;<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>,<a href="../../../../../org/apache/edgent/connectors/iot/IotDevice.html" title="interface in org.apache.edgent.connectors.iot">IotDevice</a>&gt;&nbsp;iotDeviceCreator)</code>
<div class="block">Create an <code>IotProvider</code>.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#createIotCommandToControlApp--">createIotCommandToControlApp</a></span>()</code>
<div class="block">Create application connects <code>edgentControl</code> device commands
to the control service.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#createIotDeviceApp--">createIotDeviceApp</a></span>()</code>
<div class="block">Create application that connects to the message hub.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#createJobMonitorApp--">createJobMonitorApp</a></span>()</code>
<div class="block">Create Job monitor application.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/edgent/connectors/iot/IotDevice.html" title="interface in org.apache.edgent.connectors.iot">IotDevice</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#createMessageHubDevice-org.apache.edgent.topology.Topology-">createMessageHubDevice</a></span>(<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>&nbsp;topology)</code>
<div class="block">Create the connection to the message hub.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/edgent/topology/services/ApplicationService.html" title="interface in org.apache.edgent.topology.services">ApplicationService</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#getApplicationService--">getApplicationService</a></span>()</code>
<div class="block">Get the application service.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/edgent/runtime/jsoncontrol/JsonControlService.html" title="class in org.apache.edgent.runtime.jsoncontrol">JsonControlService</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#getControlService--">getControlService</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#getName--">getName</a></span>()</code>
<div class="block">Return the name of this provider.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/8/docs/api/java/util/prefs/Preferences.html?is-external=true" title="class or interface in java.util.prefs">Preferences</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#getPreferences-java.lang.String-">getPreferences</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;providerName)</code>
<div class="block">Get the Preferences node that will be used for the IotProvider with the specified name.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/edgent/execution/services/ServiceContainer.html" title="class in org.apache.edgent.execution.services">ServiceContainer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#getServices--">getServices</a></span>()</code>
<div class="block">Access to services.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#newTopology--">newTopology</a></span>()</code>
<div class="block">Create a new topology with a generated name.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#newTopology-java.lang.String-">newTopology</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</code>
<div class="block">Create a new topology with a given name.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#registerApplicationService--">registerApplicationService</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#registerControlService--">registerControlService</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#registerPreferencesService--">registerPreferencesService</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#registerPublishSubscribeService--">registerPublishSubscribeService</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#registerTopology-java.lang.String-org.apache.edgent.function.BiConsumer-">registerTopology</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;applicationName,
<a href="../../../../../org/apache/edgent/function/BiConsumer.html" title="interface in org.apache.edgent.function">BiConsumer</a>&lt;<a href="../../../../../org/apache/edgent/connectors/iot/IotDevice.html" title="interface in org.apache.edgent.connectors.iot">IotDevice</a>,com.google.gson.JsonObject&gt;&nbsp;builder)</code>
<div class="block">Register an application that uses an <code>IotDevice</code>.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#registerTopology-java.lang.String-org.apache.edgent.function.BiConsumer-boolean-com.google.gson.JsonObject-">registerTopology</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;applicationName,
<a href="../../../../../org/apache/edgent/function/BiConsumer.html" title="interface in org.apache.edgent.function">BiConsumer</a>&lt;<a href="../../../../../org/apache/edgent/connectors/iot/IotDevice.html" title="interface in org.apache.edgent.connectors.iot">IotDevice</a>,com.google.gson.JsonObject&gt;&nbsp;builder,
boolean&nbsp;autoSubmit,
com.google.gson.JsonObject&nbsp;config)</code>
<div class="block">Register an application that uses an <code>IotDevice</code>.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#start--">start</a></span>()</code>
<div class="block">Start this provider by starting its system applications
and any autoSubmit-enabled registered applications.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html?is-external=true" title="class or interface in java.util.concurrent">Future</a>&lt;<a href="../../../../../org/apache/edgent/execution/Job.html" title="interface in org.apache.edgent.execution">Job</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#submit-org.apache.edgent.topology.Topology-">submit</a></span>(<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>&nbsp;topology)</code>
<div class="block">Submit an executable.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html?is-external=true" title="class or interface in java.util.concurrent">Future</a>&lt;<a href="../../../../../org/apache/edgent/execution/Job.html" title="interface in org.apache.edgent.execution">Job</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#submit-org.apache.edgent.topology.Topology-com.google.gson.JsonObject-">submit</a></span>(<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>&nbsp;topology,
com.google.gson.JsonObject&nbsp;config)</code>
<div class="block">Submit an executable.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="CONTROL_APP_NAME">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>CONTROL_APP_NAME</h4>
<pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> CONTROL_APP_NAME</pre>
<div class="block">IoT control using device commands application name.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.edgent.providers.iot.IotProvider.CONTROL_APP_NAME">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="IotProvider-org.apache.edgent.function.Function-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>IotProvider</h4>
<pre>public&nbsp;IotProvider(<a href="../../../../../org/apache/edgent/function/Function.html" title="interface in org.apache.edgent.function">Function</a>&lt;<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>,<a href="../../../../../org/apache/edgent/connectors/iot/IotDevice.html" title="interface in org.apache.edgent.connectors.iot">IotDevice</a>&gt;&nbsp;iotDeviceCreator)</pre>
<div class="block">Create an <code>IotProvider</code> that uses its own <code>DirectProvider</code>.
No name is assigned to the provider so a preferences service is not created.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>iotDeviceCreator</code> - How the <code>IotDevice</code> is created.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/edgent/providers/direct/DirectProvider.html" title="class in org.apache.edgent.providers.direct"><code>DirectProvider</code></a></dd>
</dl>
</li>
</ul>
<a name="IotProvider-java.lang.String-org.apache.edgent.function.Function-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>IotProvider</h4>
<pre>public&nbsp;IotProvider(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="../../../../../org/apache/edgent/function/Function.html" title="interface in org.apache.edgent.function">Function</a>&lt;<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>,<a href="../../../../../org/apache/edgent/connectors/iot/IotDevice.html" title="interface in org.apache.edgent.connectors.iot">IotDevice</a>&gt;&nbsp;iotDeviceCreator)</pre>
<div class="block">Create an <code>IotProvider</code> that uses its own <code>DirectProvider</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - Name of the provider, if the value is not <code>null</code> then a preferences service is created.</dd>
<dd><code>iotDeviceCreator</code> - How the <code>IotDevice</code> is created.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/edgent/providers/direct/DirectProvider.html" title="class in org.apache.edgent.providers.direct"><code>DirectProvider</code></a></dd>
</dl>
</li>
</ul>
<a name="IotProvider-java.lang.String-org.apache.edgent.providers.direct.DirectProvider-org.apache.edgent.function.Function-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>IotProvider</h4>
<pre>public&nbsp;IotProvider(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="../../../../../org/apache/edgent/providers/direct/DirectProvider.html" title="class in org.apache.edgent.providers.direct">DirectProvider</a>&nbsp;provider,
<a href="../../../../../org/apache/edgent/function/Function.html" title="interface in org.apache.edgent.function">Function</a>&lt;<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>,<a href="../../../../../org/apache/edgent/connectors/iot/IotDevice.html" title="interface in org.apache.edgent.connectors.iot">IotDevice</a>&gt;&nbsp;iotDeviceCreator)</pre>
<div class="block">Create an <code>IotProvider</code> that uses the passed in <code>DirectProvider</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - Name of the provider, if the value is not <code>null</code> then a preferences service is created.</dd>
<dd><code>provider</code> - <code>DirectProvider</code> to use for topology creation and submission.</dd>
<dd><code>iotDeviceCreator</code> - How the <code>IotDevice</code> is created.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/edgent/providers/direct/DirectProvider.html" title="class in org.apache.edgent.providers.direct"><code>DirectProvider</code></a></dd>
</dl>
</li>
</ul>
<a name="IotProvider-java.lang.String-org.apache.edgent.topology.TopologyProvider-org.apache.edgent.execution.DirectSubmitter-org.apache.edgent.function.Function-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>IotProvider</h4>
<pre>public&nbsp;IotProvider(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="../../../../../org/apache/edgent/topology/TopologyProvider.html" title="interface in org.apache.edgent.topology">TopologyProvider</a>&nbsp;provider,
<a href="../../../../../org/apache/edgent/execution/DirectSubmitter.html" title="interface in org.apache.edgent.execution">DirectSubmitter</a>&lt;<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>,<a href="../../../../../org/apache/edgent/execution/Job.html" title="interface in org.apache.edgent.execution">Job</a>&gt;&nbsp;submitter,
<a href="../../../../../org/apache/edgent/function/Function.html" title="interface in org.apache.edgent.function">Function</a>&lt;<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>,<a href="../../../../../org/apache/edgent/connectors/iot/IotDevice.html" title="interface in org.apache.edgent.connectors.iot">IotDevice</a>&gt;&nbsp;iotDeviceCreator)</pre>
<div class="block">Create an <code>IotProvider</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - Name of the provider, if the value is not <code>null</code> then a preferences service is created.</dd>
<dd><code>provider</code> - How topologies are created.</dd>
<dd><code>submitter</code> - How topologies will be submitted.</dd>
<dd><code>iotDeviceCreator</code> - How the <code>IotDevice</code> is created.</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getName--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getName</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getName()</pre>
<div class="block">Return the name of this provider.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Provider's name, can be <code>null</code>.</dd>
</dl>
</li>
</ul>
<a name="getApplicationService--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getApplicationService</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/edgent/topology/services/ApplicationService.html" title="interface in org.apache.edgent.topology.services">ApplicationService</a>&nbsp;getApplicationService()</pre>
<div class="block">Get the application service.
Callers may use this to register applications to
be executed by this provider.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>application service.</dd>
</dl>
</li>
</ul>
<a name="getServices--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getServices</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/edgent/execution/services/ServiceContainer.html" title="class in org.apache.edgent.execution.services">ServiceContainer</a>&nbsp;getServices()</pre>
<div class="block">Access to services.
Since any executables are executed directly within
the current virtual machine, callers may register
services that are visible to the executable
and its elements.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/edgent/execution/DirectSubmitter.html#getServices--">getServices</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/edgent/execution/DirectSubmitter.html" title="interface in org.apache.edgent.execution">DirectSubmitter</a>&lt;<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>,<a href="../../../../../org/apache/edgent/execution/Job.html" title="interface in org.apache.edgent.execution">Job</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Service container for this submitter.</dd>
</dl>
</li>
</ul>
<a name="newTopology--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newTopology</h4>
<pre>public final&nbsp;<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>&nbsp;newTopology()</pre>
<div class="block">Create a new topology with a generated name.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/edgent/topology/TopologyProvider.html#newTopology--">newTopology</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/edgent/topology/TopologyProvider.html" title="interface in org.apache.edgent.topology">TopologyProvider</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A new topology.</dd>
</dl>
</li>
</ul>
<a name="newTopology-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newTopology</h4>
<pre>public final&nbsp;<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>&nbsp;newTopology(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</pre>
<div class="block">Create a new topology with a given name.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/edgent/topology/TopologyProvider.html#newTopology-java.lang.String-">newTopology</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/edgent/topology/TopologyProvider.html" title="interface in org.apache.edgent.topology">TopologyProvider</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - name for topology</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A new topology.</dd>
</dl>
</li>
</ul>
<a name="submit-org.apache.edgent.topology.Topology-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>submit</h4>
<pre>public final&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html?is-external=true" title="class or interface in java.util.concurrent">Future</a>&lt;<a href="../../../../../org/apache/edgent/execution/Job.html" title="interface in org.apache.edgent.execution">Job</a>&gt;&nbsp;submit(<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>&nbsp;topology)</pre>
<div class="block">Submit an executable.
No configuration options are specified,
this is equivalent to <code>submit(executable, new JsonObject())</code>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/edgent/execution/Submitter.html#submit-E-">submit</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/edgent/execution/Submitter.html" title="interface in org.apache.edgent.execution">Submitter</a>&lt;<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>,<a href="../../../../../org/apache/edgent/execution/Job.html" title="interface in org.apache.edgent.execution">Job</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>topology</code> - executable to submit</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a future for the submitted executable</dd>
</dl>
</li>
</ul>
<a name="submit-org.apache.edgent.topology.Topology-com.google.gson.JsonObject-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>submit</h4>
<pre>public final&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html?is-external=true" title="class or interface in java.util.concurrent">Future</a>&lt;<a href="../../../../../org/apache/edgent/execution/Job.html" title="interface in org.apache.edgent.execution">Job</a>&gt;&nbsp;submit(<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>&nbsp;topology,
com.google.gson.JsonObject&nbsp;config)</pre>
<div class="block">Submit an executable.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/edgent/execution/Submitter.html#submit-E-com.google.gson.JsonObject-">submit</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/edgent/execution/Submitter.html" title="interface in org.apache.edgent.execution">Submitter</a>&lt;<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>,<a href="../../../../../org/apache/edgent/execution/Job.html" title="interface in org.apache.edgent.execution">Job</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>topology</code> - executable to submit</dd>
<dd><code>config</code> - context <a href="../../../../../org/apache/edgent/execution/Configs.html" title="interface in org.apache.edgent.execution">information</a> for the submission</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a future for the submitted executable</dd>
</dl>
</li>
</ul>
<a name="registerControlService--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>registerControlService</h4>
<pre>protected&nbsp;void&nbsp;registerControlService()</pre>
</li>
</ul>
<a name="registerApplicationService--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>registerApplicationService</h4>
<pre>protected&nbsp;void&nbsp;registerApplicationService()</pre>
</li>
</ul>
<a name="registerPublishSubscribeService--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>registerPublishSubscribeService</h4>
<pre>protected&nbsp;void&nbsp;registerPublishSubscribeService()</pre>
</li>
</ul>
<a name="registerPreferencesService--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>registerPreferencesService</h4>
<pre>protected&nbsp;void&nbsp;registerPreferencesService()</pre>
</li>
</ul>
<a name="getPreferences-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPreferences</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/util/prefs/Preferences.html?is-external=true" title="class or interface in java.util.prefs">Preferences</a>&nbsp;getPreferences(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;providerName)</pre>
<div class="block">Get the Preferences node that will be used for the IotProvider with the specified name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>providerName</code> - The value that will be passed into <a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#IotProvider-java.lang.String-org.apache.edgent.topology.TopologyProvider-org.apache.edgent.execution.DirectSubmitter-org.apache.edgent.function.Function-"><code>IotProvider()</code></a></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Preferences</dd>
</dl>
</li>
</ul>
<a name="getControlService--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getControlService</h4>
<pre>protected&nbsp;<a href="../../../../../org/apache/edgent/runtime/jsoncontrol/JsonControlService.html" title="class in org.apache.edgent.runtime.jsoncontrol">JsonControlService</a>&nbsp;getControlService()</pre>
</li>
</ul>
<a name="createIotDeviceApp--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createIotDeviceApp</h4>
<pre>protected&nbsp;void&nbsp;createIotDeviceApp()</pre>
<div class="block">Create application that connects to the message hub.
Subscribes to device events and sends them to the messages hub.
Publishes device commands from the message hub.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/edgent/apps/iot/IotDevicePubSub.html" title="class in org.apache.edgent.apps.iot"><code>IotDevicePubSub</code></a>,
<a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#createMessageHubDevice-org.apache.edgent.topology.Topology-"><code>createMessageHubDevice(Topology)</code></a></dd>
</dl>
</li>
</ul>
<a name="createJobMonitorApp--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createJobMonitorApp</h4>
<pre>protected&nbsp;void&nbsp;createJobMonitorApp()</pre>
<div class="block">Create Job monitor application.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/edgent/apps/runtime/JobMonitorApp.html" title="class in org.apache.edgent.apps.runtime"><code>JobMonitorApp</code></a></dd>
</dl>
</li>
</ul>
<a name="createIotCommandToControlApp--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createIotCommandToControlApp</h4>
<pre>protected&nbsp;void&nbsp;createIotCommandToControlApp()</pre>
<div class="block">Create application connects <code>edgentControl</code> device commands
to the control service.
Subscribes to device
commands of type <a href="../../../../../org/apache/edgent/connectors/iot/Commands.html#CONTROL_SERVICE"><code>Commands.CONTROL_SERVICE</code></a>
and sends the payload into the JSON control service
to invoke the control operation.</div>
</li>
</ul>
<a name="start--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>start</h4>
<pre>public&nbsp;void&nbsp;start()
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<div class="block">Start this provider by starting its system applications
and any autoSubmit-enabled registered applications.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - on failure starting applications.</dd>
</dl>
</li>
</ul>
<a name="createMessageHubDevice-org.apache.edgent.topology.Topology-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createMessageHubDevice</h4>
<pre>protected&nbsp;<a href="../../../../../org/apache/edgent/connectors/iot/IotDevice.html" title="interface in org.apache.edgent.connectors.iot">IotDevice</a>&nbsp;createMessageHubDevice(<a href="../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a>&nbsp;topology)</pre>
<div class="block">Create the connection to the message hub.
Creates an instance of <a href="../../../../../org/apache/edgent/connectors/iot/IotDevice.html" title="interface in org.apache.edgent.connectors.iot"><code>IotDevice</code></a>
used to communicate with the message hub. This
provider creates and submits an application
that subscribes to published events to send
as device events and publishes device commands.
<BR>
The application is created using
<a href="../../../../../org/apache/edgent/apps/iot/IotDevicePubSub.html#createApplication-org.apache.edgent.connectors.iot.IotDevice-"><code>IotDevicePubSub.createApplication(IotDevice)</code></a>.
<BR>
The <code>IotDevice</code> is created using the function
passed into the constructor.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>topology</code> - Topology the <code>IotDevice</code> will be contained in.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>IotDevice device used to communicate with the message hub.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/edgent/connectors/iot/IotDevice.html" title="interface in org.apache.edgent.connectors.iot"><code>IotDevice</code></a>,
<a href="../../../../../org/apache/edgent/apps/iot/IotDevicePubSub.html" title="class in org.apache.edgent.apps.iot"><code>IotDevicePubSub</code></a></dd>
</dl>
</li>
</ul>
<a name="registerTopology-java.lang.String-org.apache.edgent.function.BiConsumer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>registerTopology</h4>
<pre>public&nbsp;void&nbsp;registerTopology(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;applicationName,
<a href="../../../../../org/apache/edgent/function/BiConsumer.html" title="interface in org.apache.edgent.function">BiConsumer</a>&lt;<a href="../../../../../org/apache/edgent/connectors/iot/IotDevice.html" title="interface in org.apache.edgent.connectors.iot">IotDevice</a>,com.google.gson.JsonObject&gt;&nbsp;builder)</pre>
<div class="block">Register an application that uses an <code>IotDevice</code>.
<BR>
Same as <a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#registerTopology-java.lang.String-org.apache.edgent.function.BiConsumer-boolean-com.google.gson.JsonObject-"><code>registerTopology(appName, builder, false, null)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>applicationName</code> - Application name</dd>
<dd><code>builder</code> - Function that builds the topology.</dd>
</dl>
</li>
</ul>
<a name="registerTopology-java.lang.String-org.apache.edgent.function.BiConsumer-boolean-com.google.gson.JsonObject-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>registerTopology</h4>
<pre>public&nbsp;void&nbsp;registerTopology(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;applicationName,
<a href="../../../../../org/apache/edgent/function/BiConsumer.html" title="interface in org.apache.edgent.function">BiConsumer</a>&lt;<a href="../../../../../org/apache/edgent/connectors/iot/IotDevice.html" title="interface in org.apache.edgent.connectors.iot">IotDevice</a>,com.google.gson.JsonObject&gt;&nbsp;builder,
boolean&nbsp;autoSubmit,
com.google.gson.JsonObject&nbsp;config)</pre>
<div class="block">Register an application that uses an <code>IotDevice</code>.
<BR>
Wrapper around <a href="../../../../../org/apache/edgent/topology/services/ApplicationService.html#registerTopology-java.lang.String-org.apache.edgent.function.BiConsumer-"><code>ApplicationService.registerTopology(String, BiConsumer)</code></a>
that passes in an <a href="../../../../../org/apache/edgent/connectors/iot/IotDevice.html" title="interface in org.apache.edgent.connectors.iot"><code>IotDevice</code></a> and configuration to the supplied
function <code>builder</code> that builds the application. The passed
in <code>IotDevice</code> is created using <a href="../../../../../org/apache/edgent/apps/iot/IotDevicePubSub.html#addIotDevice-org.apache.edgent.topology.TopologyElement-"><code>IotDevicePubSub.addIotDevice(org.apache.edgent.topology.TopologyElement)</code></a>.
<BR>
Note that <code>builder</code> obtains a reference to its topology using
<a href="../../../../../org/apache/edgent/topology/TopologyElement.html#topology--"><code>TopologyElement.topology()</code></a>.
<P>
When the application is
<a href="../../../../../org/apache/edgent/topology/mbeans/ApplicationServiceMXBean.html#submit-java.lang.String-java.lang.String-"><code>submitted</code></a> <code>builder.accept(iotDevice, config)</code>
is called to build the application's graph.
</P>
<P>
Specify <code>autoSubmit==true</code>, to have the provider submit the application
when <a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#start--"><code>start()</code></a> is called.
</P></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>applicationName</code> - Application name</dd>
<dd><code>builder</code> - Function that builds the topology.</dd>
<dd><code>autoSubmit</code> - auto submit the application when <a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#start--"><code>start()</code></a> is called.</dd>
<dd><code>config</code> - config for auto-submitted application.
See <a href="../../../../../org/apache/edgent/providers/iot/IotProvider.html#submit-org.apache.edgent.topology.Topology-com.google.gson.JsonObject-"><code>submit</code></a>. May be null.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= 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><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/IotProvider.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>Prev&nbsp;Class</li>
<li>Next&nbsp;Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/edgent/providers/iot/IotProvider.html" target="_top">Frames</a></li>
<li><a href="IotProvider.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>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2016&#x2013;2017 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>