blob: 6a62ffd8388fe0ff143b8af9b445423838f4b9f9 [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:19 EST 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Connector (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="Connector (Apache Edgent (incubating) v1.2.0 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract 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/Connector.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><a href="../../../../org/apache/edgent/graph/Edge.html" title="interface in org.apache.edgent.graph"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/edgent/graph/Connector.html" target="_top">Frames</a></li>
<li><a href="Connector.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>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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.graph</div>
<h2 title="Interface Connector" class="title">Interface Connector&lt;T&gt;</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - Type of the data item produced by the output port</dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">Connector&lt;T&gt;</span></pre>
<div class="block">A <code>Connector</code> represents an output port of a <code>Vertex</code>.
A <code>Connector</code> supports two methods to add processing for tuples
submitted to the port:
<UL>
<LI><a href="../../../../org/apache/edgent/graph/Connector.html#connect-org.apache.edgent.graph.Vertex-int-"><code>connect(Vertex, int)</code></a> : Connect this to an input port of another
<code>Vertex</code>. Any number of connections can be made. Any tuple submitted by
the output port will appear on all connections made through this method. For
any tuple <code>t</code> ordering of appearance across the connected input ports
is not guaranteed.</LI>
<LI><a href="../../../../org/apache/edgent/graph/Connector.html#peek-N-"><code>peek(Peek)</code></a> : Insert a peek after the output port and before any
connections made by <a href="../../../../org/apache/edgent/graph/Connector.html#connect-org.apache.edgent.graph.Vertex-int-"><code>connect(Vertex, int)</code></a>. Multiple peeks can be
inserted. A tuple <code>t</code> submitted by the output port will be seen by all
peek oplets. The ordering of the peek is guaranteed such that the peeks
are processed in the order they were added to this <code>Connector</code> with the
<code>t</code> being seen first by the first peek added.
<LI>
</UL>
For example with peeks <code>P1,P2,P3</code> added in that order and connections
<code>C1,C2</code> added, the graph will be logically:
<pre>
<code>
--&gt;C1
port--&gt;P1--&gt;P2--&gt;P3--|
--&gt;C2
</code>
</pre>
A tuple <code>t</code> submitted by the port will be peeked at by <code>P1</code>, then
<code>P2</code> then <code>P3</code>. After <code>P3</code> peeked at the tuple, <code>C1</code>
and <code>C2</code> will process the tuple in an arbitrary order.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== 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="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract 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>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/edgent/graph/Connector.html#alias-java.lang.String-">alias</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;alias)</code>
<div class="block">Set the alias for the connector.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/edgent/graph/Connector.html#connect-org.apache.edgent.graph.Vertex-int-">connect</a></span>(<a href="../../../../org/apache/edgent/graph/Vertex.html" title="interface in org.apache.edgent.graph">Vertex</a>&lt;?,<a href="../../../../org/apache/edgent/graph/Connector.html" title="type parameter in Connector">T</a>,?&gt;&nbsp;target,
int&nbsp;inputPort)</code>
<div class="block">Connect this <code>Connector</code> to the specified target's input.</div>
</td>
</tr>
<tr id="i2" 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/graph/Connector.html#getAlias--">getAlias</a></span>()</code>
<div class="block">Returns the alias for the connector if any.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<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>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/edgent/graph/Connector.html#getTags--">getTags</a></span>()</code>
<div class="block">Returns the set of tags associated with this connector.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/edgent/graph/Graph.html" title="interface in org.apache.edgent.graph">Graph</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/edgent/graph/Connector.html#graph--">graph</a></span>()</code>
<div class="block">Gets the <code>Graph</code> for this <code>Connector</code>.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/edgent/graph/Connector.html#isConnected--">isConnected</a></span>()</code>
<div class="block">Was connect() called on this connector?</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>&lt;N extends <a href="../../../../org/apache/edgent/oplet/core/Peek.html" title="class in org.apache.edgent.oplet.core">Peek</a>&lt;<a href="../../../../org/apache/edgent/graph/Connector.html" title="type parameter in Connector">T</a>&gt;&gt;<br><a href="../../../../org/apache/edgent/graph/Connector.html" title="interface in org.apache.edgent.graph">Connector</a>&lt;<a href="../../../../org/apache/edgent/graph/Connector.html" title="type parameter in Connector">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/edgent/graph/Connector.html#peek-N-">peek</a></span>(N&nbsp;oplet)</code>
<div class="block">Inserts a <code>Peek</code> oplet between an output port and its
connections.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/edgent/graph/Connector.html#tag-java.lang.String...-">tag</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;values)</code>
<div class="block">Adds the specified tags to the connector.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="graph--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>graph</h4>
<pre><a href="../../../../org/apache/edgent/graph/Graph.html" title="interface in org.apache.edgent.graph">Graph</a>&nbsp;graph()</pre>
<div class="block">Gets the <code>Graph</code> for this <code>Connector</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>Graph</code> for this <code>Connector</code>.</dd>
</dl>
</li>
</ul>
<a name="connect-org.apache.edgent.graph.Vertex-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>connect</h4>
<pre>void&nbsp;connect(<a href="../../../../org/apache/edgent/graph/Vertex.html" title="interface in org.apache.edgent.graph">Vertex</a>&lt;?,<a href="../../../../org/apache/edgent/graph/Connector.html" title="type parameter in Connector">T</a>,?&gt;&nbsp;target,
int&nbsp;inputPort)</pre>
<div class="block">Connect this <code>Connector</code> to the specified target's input. This
method may be called multiple times to fan out to multiple input ports.
Each tuple submitted to this output port will be processed by all
connections.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>target</code> - the <code>Vertex</code> to connect to</dd>
<dd><code>inputPort</code> - the index of the target's input port to connect to.</dd>
</dl>
</li>
</ul>
<a name="isConnected--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isConnected</h4>
<pre>boolean&nbsp;isConnected()</pre>
<div class="block">Was connect() called on this connector?</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if connected</dd>
</dl>
</li>
</ul>
<a name="peek-org.apache.edgent.oplet.core.Peek-">
<!-- -->
</a><a name="peek-N-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>peek</h4>
<pre>&lt;N extends <a href="../../../../org/apache/edgent/oplet/core/Peek.html" title="class in org.apache.edgent.oplet.core">Peek</a>&lt;<a href="../../../../org/apache/edgent/graph/Connector.html" title="type parameter in Connector">T</a>&gt;&gt;&nbsp;<a href="../../../../org/apache/edgent/graph/Connector.html" title="interface in org.apache.edgent.graph">Connector</a>&lt;<a href="../../../../org/apache/edgent/graph/Connector.html" title="type parameter in Connector">T</a>&gt;&nbsp;peek(N&nbsp;oplet)</pre>
<div class="block">Inserts a <code>Peek</code> oplet between an output port and its
connections. This method may be called multiple times to insert multiple
peeks. Each tuple submitted to this output port will be seen by all peeks
in order of their insertion, starting with the first peek inserted.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>N</code> - Peek oplet type</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>oplet</code> - Oplet to insert.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>output</code></dd>
</dl>
</li>
</ul>
<a name="tag-java.lang.String...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>tag</h4>
<pre>void&nbsp;tag(<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;values)</pre>
<div class="block">Adds the specified tags to the connector. Adding the same tag
multiple times will not change the result beyond the initial
application. An unconnected connector can be tagged.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>values</code> - Tag values.</dd>
</dl>
</li>
</ul>
<a name="getTags--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTags</h4>
<pre><a href="http://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<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>&gt;&nbsp;getTags()</pre>
<div class="block">Returns the set of tags associated with this connector.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>set of tag values.</dd>
</dl>
</li>
</ul>
<a name="alias-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>alias</h4>
<pre>void&nbsp;alias(<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;alias)</pre>
<div class="block">Set the alias for the connector.
<p>
The alias must be unique within the topology.
The alias may be used in various contexts:
</p>
<ul>
<li>Runtime control services for the Connector (stream/outputport)
are registered with this alias.</li>
</ul></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>alias</code> - the alias</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if the an alias has already been set</dd>
</dl>
</li>
</ul>
<a name="getAlias--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getAlias</h4>
<pre><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;getAlias()</pre>
<div class="block">Returns the alias for the connector if any.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the alias. null if one has not be set.</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/Connector.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><a href="../../../../org/apache/edgent/graph/Edge.html" title="interface in org.apache.edgent.graph"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/edgent/graph/Connector.html" target="_top">Frames</a></li>
<li><a href="Connector.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>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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>