| <!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_71) on Tue May 17 00:28:45 UTC 2016 --> |
| <title>IotProvider (Quarks v0.4.0)</title> |
| <meta name="date" content="2016-05-17"> |
| <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 (Quarks v0.4.0)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10}; |
| var tabs = {65535:["t0","All 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 Class</li> |
| <li>Next Class</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?quarks/providers/iot/IotProvider.html" target="_top">Frames</a></li> |
| <li><a href="IotProvider.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> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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">quarks.providers.iot</div> |
| <h2 title="Class IotProvider" class="title">Class IotProvider</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>quarks.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="../../../quarks/execution/DirectSubmitter.html" title="interface in quarks.execution">DirectSubmitter</a><<a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a>,<a href="../../../quarks/execution/Job.html" title="interface in quarks.execution">Job</a>>, <a href="../../../quarks/execution/Submitter.html" title="interface in quarks.execution">Submitter</a><<a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a>,<a href="../../../quarks/execution/Job.html" title="interface in quarks.execution">Job</a>>, <a href="../../../quarks/topology/TopologyProvider.html" title="interface in quarks.topology">TopologyProvider</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">IotProvider</span> |
| extends java.lang.Object |
| implements <a href="../../../quarks/topology/TopologyProvider.html" title="interface in quarks.topology">TopologyProvider</a>, <a href="../../../quarks/execution/DirectSubmitter.html" title="interface in quarks.execution">DirectSubmitter</a><<a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a>,<a href="../../../quarks/execution/Job.html" title="interface in quarks.execution">Job</a>></pre> |
| <div class="block">IoT provider supporting multiple topologies with a single connection to a |
| message hub. A provider that uses a single <a href="../../../quarks/connectors/iot/IotDevice.html" title="interface in quarks.connectors.iot"><code>IotDevice</code></a> to communicate |
| with an IoT scale message hub. |
| <a href="../../../quarks/connectors/pubsub/PublishSubscribe.html" title="class in quarks.connectors.pubsub"><code>Publish-subscribe</code></a> is |
| used to allow multiple topologies to communicate through the single |
| connection. |
| <P> |
| This provider registers these services: |
| <UL> |
| <LI><a href="../../../quarks/execution/services/ControlService.html" title="interface in quarks.execution.services"><code>control</code></a> - An instance of <a href="../../../quarks/runtime/jsoncontrol/JsonControlService.html" title="class in quarks.runtime.jsoncontrol"><code>JsonControlService</code></a>.</LI> |
| <LI><a href="../../../quarks/topology/services/ApplicationService.html" title="interface in quarks.topology.services"><code>application</code></a> - An instance of <a href="../../../quarks/runtime/appservice/AppService.html" title="class in quarks.runtime.appservice"><code>AppService</code></a>.</LI> |
| <LI><a href="../../../quarks/connectors/pubsub/service/PublishSubscribeService.html" title="interface in quarks.connectors.pubsub.service"><code>publish-subscribe</code></a> - An instance of <a href="../../../quarks/connectors/pubsub/service/ProviderPubSub.html" title="class in quarks.connectors.pubsub.service"><code>ProviderPubSub</code></a></LI> |
| </UL> |
| System applications provide this functionality: |
| <UL> |
| <LI>Single connection to the message hub using an <code>IotDevice</code> |
| using <a href="../../../quarks/apps/iot/IotDevicePubSub.html" title="class in quarks.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="../../../quarks/apps/iot/IotDevicePubSub.html#addIotDevice-quarks.topology.TopologyElement-"><code>IotDevicePubSub.addIotDevice(quarks.topology.TopologyElement)</code></a></LI> |
| <LI>Access to the control service through device commands from the message hub using command |
| identifier <a href="../../../quarks/connectors/iot/Commands.html#CONTROL_SERVICE"><code>quarksControl</code></a>. |
| </UL> |
| </P> |
| <P> |
| An <code>IotProvider</code> is created with a provider and submitter that it delegates |
| the creation and submission of topologies to. |
| </P></div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../quarks/connectors/iot/IotDevice.html" title="interface in quarks.connectors.iot"><code>IotDevice</code></a>, |
| <a href="../../../quarks/apps/iot/IotDevicePubSub.html" title="class in quarks.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"> </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 java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../quarks/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"> </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="../../../quarks/providers/iot/IotProvider.html#IotProvider-quarks.providers.direct.DirectProvider-quarks.function.Function-">IotProvider</a></span>(<a href="../../../quarks/providers/direct/DirectProvider.html" title="class in quarks.providers.direct">DirectProvider</a> provider, |
| <a href="../../../quarks/function/Function.html" title="interface in quarks.function">Function</a><<a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a>,<a href="../../../quarks/connectors/iot/IotDevice.html" title="interface in quarks.connectors.iot">IotDevice</a>> iotDeviceCreator)</code> |
| <div class="block">Create an <code>IotProvider</code> that uses the passed in <code>DirectProvider</code>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../quarks/providers/iot/IotProvider.html#IotProvider-quarks.function.Function-">IotProvider</a></span>(<a href="../../../quarks/function/Function.html" title="interface in quarks.function">Function</a><<a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a>,<a href="../../../quarks/connectors/iot/IotDevice.html" title="interface in quarks.connectors.iot">IotDevice</a>> iotDeviceCreator)</code> |
| <div class="block">Create an <code>IotProvider</code> that uses its own <code>DirectProvider</code>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../quarks/providers/iot/IotProvider.html#IotProvider-quarks.topology.TopologyProvider-quarks.execution.DirectSubmitter-quarks.function.Function-">IotProvider</a></span>(<a href="../../../quarks/topology/TopologyProvider.html" title="interface in quarks.topology">TopologyProvider</a> provider, |
| <a href="../../../quarks/execution/DirectSubmitter.html" title="interface in quarks.execution">DirectSubmitter</a><<a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a>,<a href="../../../quarks/execution/Job.html" title="interface in quarks.execution">Job</a>> submitter, |
| <a href="../../../quarks/function/Function.html" title="interface in quarks.function">Function</a><<a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a>,<a href="../../../quarks/connectors/iot/IotDevice.html" title="interface in quarks.connectors.iot">IotDevice</a>> 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"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </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="../../../quarks/providers/iot/IotProvider.html#createIotCommandToControlApp--">createIotCommandToControlApp</a></span>()</code> |
| <div class="block">Create application connects <code>quarksControl</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="../../../quarks/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 <a href="../../../quarks/connectors/iot/IotDevice.html" title="interface in quarks.connectors.iot">IotDevice</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../quarks/providers/iot/IotProvider.html#createMessageHubDevice-quarks.topology.Topology-">createMessageHubDevice</a></span>(<a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a> topology)</code> |
| <div class="block">Create the connection to the message hub.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../quarks/topology/services/ApplicationService.html" title="interface in quarks.topology.services">ApplicationService</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../quarks/providers/iot/IotProvider.html#getApplicationService--">getApplicationService</a></span>()</code> |
| <div class="block">Get the application service.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>protected <a href="../../../quarks/runtime/jsoncontrol/JsonControlService.html" title="class in quarks.runtime.jsoncontrol">JsonControlService</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../quarks/providers/iot/IotProvider.html#getControlService--">getControlService</a></span>()</code> </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../quarks/execution/services/ServiceContainer.html" title="class in quarks.execution.services">ServiceContainer</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../quarks/providers/iot/IotProvider.html#getServices--">getServices</a></span>()</code> |
| <div class="block">Access to services.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../quarks/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="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../quarks/providers/iot/IotProvider.html#newTopology-java.lang.String-">newTopology</a></span>(java.lang.String name)</code> |
| <div class="block">Create a new topology with a given name.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../quarks/providers/iot/IotProvider.html#registerApplicationService--">registerApplicationService</a></span>()</code> </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../quarks/providers/iot/IotProvider.html#registerControlService--">registerControlService</a></span>()</code> </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../quarks/providers/iot/IotProvider.html#registerPublishSubscribeService--">registerPublishSubscribeService</a></span>()</code> </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../quarks/providers/iot/IotProvider.html#registerTopology-java.lang.String-quarks.function.BiConsumer-">registerTopology</a></span>(java.lang.String applicationName, |
| <a href="../../../quarks/function/BiConsumer.html" title="interface in quarks.function">BiConsumer</a><<a href="../../../quarks/connectors/iot/IotDevice.html" title="interface in quarks.connectors.iot">IotDevice</a>,com.google.gson.JsonObject> builder)</code> |
| <div class="block">Register an application that uses an <code>IotDevice</code>.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../quarks/providers/iot/IotProvider.html#start--">start</a></span>()</code> |
| <div class="block">Start this provider by starting its system applications.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>java.util.concurrent.Future<<a href="../../../quarks/execution/Job.html" title="interface in quarks.execution">Job</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../quarks/providers/iot/IotProvider.html#submit-quarks.topology.Topology-">submit</a></span>(<a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a> topology)</code> |
| <div class="block">Submit an executable.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>java.util.concurrent.Future<<a href="../../../quarks/execution/Job.html" title="interface in quarks.execution">Job</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../quarks/providers/iot/IotProvider.html#submit-quarks.topology.Topology-com.google.gson.JsonObject-">submit</a></span>(<a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a> topology, |
| com.google.gson.JsonObject 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 java.lang.Object</h3> |
| <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</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 java.lang.String 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#quarks.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-quarks.function.Function-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>IotProvider</h4> |
| <pre>public IotProvider(<a href="../../../quarks/function/Function.html" title="interface in quarks.function">Function</a><<a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a>,<a href="../../../quarks/connectors/iot/IotDevice.html" title="interface in quarks.connectors.iot">IotDevice</a>> 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>iotDeviceCreator</code> - How the <code>IotDevice</code> is created.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../quarks/providers/direct/DirectProvider.html" title="class in quarks.providers.direct"><code>DirectProvider</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="IotProvider-quarks.providers.direct.DirectProvider-quarks.function.Function-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>IotProvider</h4> |
| <pre>public IotProvider(<a href="../../../quarks/providers/direct/DirectProvider.html" title="class in quarks.providers.direct">DirectProvider</a> provider, |
| <a href="../../../quarks/function/Function.html" title="interface in quarks.function">Function</a><<a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a>,<a href="../../../quarks/connectors/iot/IotDevice.html" title="interface in quarks.connectors.iot">IotDevice</a>> 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>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="../../../quarks/providers/direct/DirectProvider.html" title="class in quarks.providers.direct"><code>DirectProvider</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="IotProvider-quarks.topology.TopologyProvider-quarks.execution.DirectSubmitter-quarks.function.Function-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>IotProvider</h4> |
| <pre>public IotProvider(<a href="../../../quarks/topology/TopologyProvider.html" title="interface in quarks.topology">TopologyProvider</a> provider, |
| <a href="../../../quarks/execution/DirectSubmitter.html" title="interface in quarks.execution">DirectSubmitter</a><<a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a>,<a href="../../../quarks/execution/Job.html" title="interface in quarks.execution">Job</a>> submitter, |
| <a href="../../../quarks/function/Function.html" title="interface in quarks.function">Function</a><<a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a>,<a href="../../../quarks/connectors/iot/IotDevice.html" title="interface in quarks.connectors.iot">IotDevice</a>> iotDeviceCreator)</pre> |
| <div class="block">Create an <code>IotProvider</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <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="getApplicationService--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getApplicationService</h4> |
| <pre>public <a href="../../../quarks/topology/services/ApplicationService.html" title="interface in quarks.topology.services">ApplicationService</a> 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 <a href="../../../quarks/execution/services/ServiceContainer.html" title="class in quarks.execution.services">ServiceContainer</a> 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="../../../quarks/execution/DirectSubmitter.html#getServices--">getServices</a></code> in interface <code><a href="../../../quarks/execution/DirectSubmitter.html" title="interface in quarks.execution">DirectSubmitter</a><<a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a>,<a href="../../../quarks/execution/Job.html" title="interface in quarks.execution">Job</a>></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 <a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a> 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="../../../quarks/topology/TopologyProvider.html#newTopology--">newTopology</a></code> in interface <code><a href="../../../quarks/topology/TopologyProvider.html" title="interface in quarks.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 <a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a> newTopology(java.lang.String 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="../../../quarks/topology/TopologyProvider.html#newTopology-java.lang.String-">newTopology</a></code> in interface <code><a href="../../../quarks/topology/TopologyProvider.html" title="interface in quarks.topology">TopologyProvider</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A new topology.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="submit-quarks.topology.Topology-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>submit</h4> |
| <pre>public final java.util.concurrent.Future<<a href="../../../quarks/execution/Job.html" title="interface in quarks.execution">Job</a>> submit(<a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a> 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="../../../quarks/execution/Submitter.html#submit-E-">submit</a></code> in interface <code><a href="../../../quarks/execution/Submitter.html" title="interface in quarks.execution">Submitter</a><<a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a>,<a href="../../../quarks/execution/Job.html" title="interface in quarks.execution">Job</a>></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-quarks.topology.Topology-com.google.gson.JsonObject-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>submit</h4> |
| <pre>public final java.util.concurrent.Future<<a href="../../../quarks/execution/Job.html" title="interface in quarks.execution">Job</a>> submit(<a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a> topology, |
| com.google.gson.JsonObject config)</pre> |
| <div class="block">Submit an executable.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../quarks/execution/Submitter.html#submit-E-com.google.gson.JsonObject-">submit</a></code> in interface <code><a href="../../../quarks/execution/Submitter.html" title="interface in quarks.execution">Submitter</a><<a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a>,<a href="../../../quarks/execution/Job.html" title="interface in quarks.execution">Job</a>></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>topology</code> - executable to submit</dd> |
| <dd><code>config</code> - context <a href="../../../quarks/execution/Configs.html" title="interface in quarks.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 void registerControlService()</pre> |
| </li> |
| </ul> |
| <a name="registerApplicationService--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>registerApplicationService</h4> |
| <pre>protected void registerApplicationService()</pre> |
| </li> |
| </ul> |
| <a name="registerPublishSubscribeService--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>registerPublishSubscribeService</h4> |
| <pre>protected void registerPublishSubscribeService()</pre> |
| </li> |
| </ul> |
| <a name="getControlService--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getControlService</h4> |
| <pre>protected <a href="../../../quarks/runtime/jsoncontrol/JsonControlService.html" title="class in quarks.runtime.jsoncontrol">JsonControlService</a> getControlService()</pre> |
| </li> |
| </ul> |
| <a name="createIotDeviceApp--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createIotDeviceApp</h4> |
| <pre>protected void 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="../../../quarks/apps/iot/IotDevicePubSub.html" title="class in quarks.apps.iot"><code>IotDevicePubSub</code></a>, |
| <a href="../../../quarks/providers/iot/IotProvider.html#createMessageHubDevice-quarks.topology.Topology-"><code>createMessageHubDevice(Topology)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="createIotCommandToControlApp--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createIotCommandToControlApp</h4> |
| <pre>protected void createIotCommandToControlApp()</pre> |
| <div class="block">Create application connects <code>quarksControl</code> device commands |
| to the control service. |
| |
| Subscribes to device |
| commands of type <a href="../../../quarks/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 void start() |
| throws java.lang.Exception</pre> |
| <div class="block">Start this provider by starting its system applications.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.util.concurrent.ExecutionException</code> - Exception starting applications.</dd> |
| <dd><code>java.lang.Exception</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="createMessageHubDevice-quarks.topology.Topology-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createMessageHubDevice</h4> |
| <pre>protected <a href="../../../quarks/connectors/iot/IotDevice.html" title="interface in quarks.connectors.iot">IotDevice</a> createMessageHubDevice(<a href="../../../quarks/topology/Topology.html" title="interface in quarks.topology">Topology</a> topology)</pre> |
| <div class="block">Create the connection to the message hub. |
| |
| Creates an instance of <a href="../../../quarks/connectors/iot/IotDevice.html" title="interface in quarks.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="../../../quarks/apps/iot/IotDevicePubSub.html#createApplication-quarks.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="../../../quarks/connectors/iot/IotDevice.html" title="interface in quarks.connectors.iot"><code>IotDevice</code></a>, |
| <a href="../../../quarks/apps/iot/IotDevicePubSub.html" title="class in quarks.apps.iot"><code>IotDevicePubSub</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="registerTopology-java.lang.String-quarks.function.BiConsumer-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>registerTopology</h4> |
| <pre>public void registerTopology(java.lang.String applicationName, |
| <a href="../../../quarks/function/BiConsumer.html" title="interface in quarks.function">BiConsumer</a><<a href="../../../quarks/connectors/iot/IotDevice.html" title="interface in quarks.connectors.iot">IotDevice</a>,com.google.gson.JsonObject> builder)</pre> |
| <div class="block">Register an application that uses an <code>IotDevice</code>. |
| <BR> |
| Wrapper around <a href="../../../quarks/topology/services/ApplicationService.html#registerTopology-java.lang.String-quarks.function.BiConsumer-"><code>ApplicationService.registerTopology(String, BiConsumer)</code></a> |
| that passes in an <a href="../../../quarks/connectors/iot/IotDevice.html" title="interface in quarks.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="../../../quarks/apps/iot/IotDevicePubSub.html#addIotDevice-quarks.topology.TopologyElement-"><code>IotDevicePubSub.addIotDevice(quarks.topology.TopologyElement)</code></a>. |
| <BR> |
| Note that <code>builder</code> obtains a reference to its topology using |
| <a href="../../../quarks/topology/TopologyElement.html#topology--"><code>TopologyElement.topology()</code></a>. |
| <P> |
| When the application is |
| <a href="../../../quarks/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></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> |
| </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 class="aboutLanguage"><a href="http://quarks.incubator.apache.org">Apache Quarks (incubating)</a></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li>Prev Class</li> |
| <li>Next Class</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?quarks/providers/iot/IotProvider.html" target="_top">Frames</a></li> |
| <li><a href="IotProvider.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> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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 © 2016 The Apache Software Foundation. All Rights Reserved - d6cdfc6-20160517-0028</small></p> |
| </body> |
| </html> |