| <!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>Jsr356WebSocketClient (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="Jsr356WebSocketClient (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}; |
| 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/Jsr356WebSocketClient.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?org/apache/edgent/connectors/wsclient/javax/websocket/Jsr356WebSocketClient.html" target="_top">Frames</a></li> |
| <li><a href="Jsr356WebSocketClient.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>Field | </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>Field | </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">org.apache.edgent.connectors.wsclient.javax.websocket</div> |
| <h2 title="Class Jsr356WebSocketClient" class="title">Class Jsr356WebSocketClient</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.connectors.wsclient.javax.websocket.Jsr356WebSocketClient</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/connectors/wsclient/WebSocketClient.html" title="interface in org.apache.edgent.connectors.wsclient">WebSocketClient</a>, <a href="../../../../../../../org/apache/edgent/topology/TopologyElement.html" title="interface in org.apache.edgent.topology">TopologyElement</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">Jsr356WebSocketClient</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/connectors/wsclient/WebSocketClient.html" title="interface in org.apache.edgent.connectors.wsclient">WebSocketClient</a></pre> |
| <div class="block">A connector for sending and receiving messages to a WebSocket Server. |
| <p> |
| A connector is bound to its configuration specified |
| <code>javax.websockets</code> WebSocket URI. |
| <p> |
| A single connector instance supports sinking at most one stream |
| and sourcing at most one stream. |
| <p> |
| Sample use: |
| <pre><code> |
| // assuming a properties file containing at least: |
| // ws.uri=ws://myWsServerHost/myService |
| |
| String propsPath = <path to properties file>; |
| Properties properties = new Properties(); |
| properties.load(Files.newBufferedReader(new File(propsPath).toPath())); |
| |
| Topology t = ...; |
| Jsr356WebSocketClient wsclient = new Jsr356WebSocketClient(t, properties); |
| |
| // send a stream's JsonObject tuples as JSON WebSocket text messages |
| TStream<JsonObject> s = ...; |
| wsclient.send(s); |
| |
| // create a stream of JsonObject tuples from received JSON WebSocket text messages |
| TStream<JsonObject> r = wsclient.receive(); |
| r.print(); |
| </code></pre> |
| <p> |
| Note, the WebSocket protocol differentiates between text/String and |
| binary/byte messages. |
| A receiver only receives the messages of the type that it requests. |
| <p> |
| The connector is written against the JSR356 <code>javax.websockets</code> API. |
| <code>javax.websockets</code> uses the <a href="http://docs.oracle.com/javase/8/docs/api/java/util/ServiceLoader.html?is-external=true" title="class or interface in java.util"><code>ServiceLoader</code></a> to load |
| an implementation of <code>javax.websocket.ContainerProvider</code>. |
| <p> |
| The supplied <code>connectors/javax.websocket-client</code> provides one |
| such implementation. To use it, include |
| <code>connectors/javax.websocket-client/lib/javax.websocket-client.jar</code> |
| on your classpath.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== 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="../../../../../../../org/apache/edgent/connectors/wsclient/javax/websocket/Jsr356WebSocketClient.html#Jsr356WebSocketClient-org.apache.edgent.topology.Topology-java.util.Properties-">Jsr356WebSocketClient</a></span>(<a href="../../../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a> t, |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a> config)</code> |
| <div class="block">Create a new Web Socket Client connector.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/edgent/connectors/wsclient/javax/websocket/Jsr356WebSocketClient.html#Jsr356WebSocketClient-org.apache.edgent.topology.Topology-java.util.Properties-org.apache.edgent.function.Supplier-">Jsr356WebSocketClient</a></span>(<a href="../../../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a> t, |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a> config, |
| <a href="../../../../../../../org/apache/edgent/function/Supplier.html" title="interface in org.apache.edgent.function">Supplier</a><javax.websocket.WebSocketContainer> containerFn)</code> |
| <div class="block">Create a new Web Socket Client connector.</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><a href="../../../../../../../org/apache/edgent/topology/TStream.html" title="interface in org.apache.edgent.topology">TStream</a><com.google.gson.JsonObject></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/edgent/connectors/wsclient/javax/websocket/Jsr356WebSocketClient.html#receive--">receive</a></span>()</code> |
| <div class="block">Create a stream of JsonObject tuples from received JSON WebSocket text messages.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../../../org/apache/edgent/topology/TStream.html" title="interface in org.apache.edgent.topology">TStream</a><byte[]></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/edgent/connectors/wsclient/javax/websocket/Jsr356WebSocketClient.html#receiveBytes--">receiveBytes</a></span>()</code> |
| <div class="block">Create a stream of byte[] tuples from received WebSocket binary messages.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../../../org/apache/edgent/topology/TStream.html" title="interface in org.apache.edgent.topology">TStream</a><<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/connectors/wsclient/javax/websocket/Jsr356WebSocketClient.html#receiveString--">receiveString</a></span>()</code> |
| <div class="block">Create a stream of String tuples from received WebSocket text messages.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../../../org/apache/edgent/topology/TSink.html" title="interface in org.apache.edgent.topology">TSink</a><com.google.gson.JsonObject></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/edgent/connectors/wsclient/javax/websocket/Jsr356WebSocketClient.html#send-org.apache.edgent.topology.TStream-">send</a></span>(<a href="../../../../../../../org/apache/edgent/topology/TStream.html" title="interface in org.apache.edgent.topology">TStream</a><com.google.gson.JsonObject> stream)</code> |
| <div class="block">Send a stream's JsonObject tuples as JSON in a WebSocket text message.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../../../org/apache/edgent/topology/TSink.html" title="interface in org.apache.edgent.topology">TSink</a><byte[]></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/edgent/connectors/wsclient/javax/websocket/Jsr356WebSocketClient.html#sendBytes-org.apache.edgent.topology.TStream-">sendBytes</a></span>(<a href="../../../../../../../org/apache/edgent/topology/TStream.html" title="interface in org.apache.edgent.topology">TStream</a><byte[]> stream)</code> |
| <div class="block">Send a stream's byte[] tuples in a WebSocket binary message.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../../../org/apache/edgent/topology/TSink.html" title="interface in org.apache.edgent.topology">TSink</a><<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/connectors/wsclient/javax/websocket/Jsr356WebSocketClient.html#sendString-org.apache.edgent.topology.TStream-">sendString</a></span>(<a href="../../../../../../../org/apache/edgent/topology/TStream.html" title="interface in org.apache.edgent.topology">TStream</a><<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>> stream)</code> |
| <div class="block">Send a stream's String tuples in a WebSocket text message.</div> |
| </td> |
| </tr> |
| <tr id="i6" 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/connectors/wsclient/javax/websocket/Jsr356WebSocketClient.html#topology--">topology</a></span>()</code> |
| <div class="block">Topology this element is contained in.</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.<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"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="Jsr356WebSocketClient-org.apache.edgent.topology.Topology-java.util.Properties-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>Jsr356WebSocketClient</h4> |
| <pre>public Jsr356WebSocketClient(<a href="../../../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a> t, |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a> config)</pre> |
| <div class="block">Create a new Web Socket Client connector. |
| <p> |
| Configuration parameters: |
| <ul> |
| <li>ws.uri - "ws://host[:port][/path]", "wss://host[:port][/path]" |
| the default port is 80 and 443 for "ws" and "wss" respectively. |
| The optional path must match the server's configuration.</li> |
| <li>ws.trustStore - optional. Only used with "wss:". |
| Path to trust store file in JKS format. |
| If not set, the standard JRE and javax.net.ssl system properties |
| control the SSL behavior. |
| Generally not required if server has a CA-signed certificate.</li> |
| <li>ws.trustStorePassword - required if ws.trustStore is set</li> |
| <li>ws.keyStore - optional. Only used with "wss:" when the |
| server is configured for client auth. |
| Path to key store file in JKS format. |
| If not set, the standard JRE and javax.net.ssl system properties |
| control the SSL behavior.</li> |
| <li>ws.keyStorePassword - required if ws.keyStore is set.</li> |
| <li>ws.keyPassword - defaults to ws.keyStorePassword value</li> |
| <li>ws.keyCertificateAlias - alias for certificate in key store. defaults to "default"</li> |
| </ul> |
| Additional keys in <code>config</code> are ignored.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>t</code> - the topology to add the connector to</dd> |
| <dd><code>config</code> - the connector's configuration</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="Jsr356WebSocketClient-org.apache.edgent.topology.Topology-java.util.Properties-org.apache.edgent.function.Supplier-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>Jsr356WebSocketClient</h4> |
| <pre>public Jsr356WebSocketClient(<a href="../../../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a> t, |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a> config, |
| <a href="../../../../../../../org/apache/edgent/function/Supplier.html" title="interface in org.apache.edgent.function">Supplier</a><javax.websocket.WebSocketContainer> containerFn)</pre> |
| <div class="block">Create a new Web Socket Client connector. |
| <p> |
| This constructor is made available in case the container created |
| by <a href="../../../../../../../org/apache/edgent/connectors/wsclient/javax/websocket/Jsr356WebSocketClient.html#Jsr356WebSocketClient-org.apache.edgent.topology.Topology-java.util.Properties-"><code>Jsr356WebSocketClient(Topology, Properties)</code></a> |
| lacks the configuration needed for a particular use case. |
| <p> |
| At topology runtime <code>containerFn.get()</code> will be called to |
| get a <code>javax.websocket.WebSocketContainer</code> that will be used to |
| connect to the WebSocket server. |
| <p> |
| Only the "ws.uri" <code>config</code> parameter is used.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>t</code> - the topology to add the connector to</dd> |
| <dd><code>config</code> - the connector's configuration</dd> |
| <dd><code>containerFn</code> - supplier for a <code>WebSocketContainer</code>. May be null.</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="send-org.apache.edgent.topology.TStream-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>send</h4> |
| <pre>public <a href="../../../../../../../org/apache/edgent/topology/TSink.html" title="interface in org.apache.edgent.topology">TSink</a><com.google.gson.JsonObject> send(<a href="../../../../../../../org/apache/edgent/topology/TStream.html" title="interface in org.apache.edgent.topology">TStream</a><com.google.gson.JsonObject> stream)</pre> |
| <div class="block">Send a stream's JsonObject tuples as JSON in a WebSocket text message.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../../org/apache/edgent/connectors/wsclient/WebSocketClient.html#send-org.apache.edgent.topology.TStream-">send</a></code> in interface <code><a href="../../../../../../../org/apache/edgent/connectors/wsclient/WebSocketClient.html" title="interface in org.apache.edgent.connectors.wsclient">WebSocketClient</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>stream</code> - the stream</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>sink</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="sendString-org.apache.edgent.topology.TStream-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sendString</h4> |
| <pre>public <a href="../../../../../../../org/apache/edgent/topology/TSink.html" title="interface in org.apache.edgent.topology">TSink</a><<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>> sendString(<a href="../../../../../../../org/apache/edgent/topology/TStream.html" title="interface in org.apache.edgent.topology">TStream</a><<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>> stream)</pre> |
| <div class="block">Send a stream's String tuples in a WebSocket text message.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../../org/apache/edgent/connectors/wsclient/WebSocketClient.html#sendString-org.apache.edgent.topology.TStream-">sendString</a></code> in interface <code><a href="../../../../../../../org/apache/edgent/connectors/wsclient/WebSocketClient.html" title="interface in org.apache.edgent.connectors.wsclient">WebSocketClient</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>stream</code> - the stream</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>sink</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="sendBytes-org.apache.edgent.topology.TStream-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sendBytes</h4> |
| <pre>public <a href="../../../../../../../org/apache/edgent/topology/TSink.html" title="interface in org.apache.edgent.topology">TSink</a><byte[]> sendBytes(<a href="../../../../../../../org/apache/edgent/topology/TStream.html" title="interface in org.apache.edgent.topology">TStream</a><byte[]> stream)</pre> |
| <div class="block">Send a stream's byte[] tuples in a WebSocket binary message.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../../org/apache/edgent/connectors/wsclient/WebSocketClient.html#sendBytes-org.apache.edgent.topology.TStream-">sendBytes</a></code> in interface <code><a href="../../../../../../../org/apache/edgent/connectors/wsclient/WebSocketClient.html" title="interface in org.apache.edgent.connectors.wsclient">WebSocketClient</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>stream</code> - the stream</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>sink</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="receive--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>receive</h4> |
| <pre>public <a href="../../../../../../../org/apache/edgent/topology/TStream.html" title="interface in org.apache.edgent.topology">TStream</a><com.google.gson.JsonObject> receive()</pre> |
| <div class="block">Create a stream of JsonObject tuples from received JSON WebSocket text messages.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../../org/apache/edgent/connectors/wsclient/WebSocketClient.html#receive--">receive</a></code> in interface <code><a href="../../../../../../../org/apache/edgent/connectors/wsclient/WebSocketClient.html" title="interface in org.apache.edgent.connectors.wsclient">WebSocketClient</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the stream</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="receiveString--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>receiveString</h4> |
| <pre>public <a href="../../../../../../../org/apache/edgent/topology/TStream.html" title="interface in org.apache.edgent.topology">TStream</a><<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>> receiveString()</pre> |
| <div class="block">Create a stream of String tuples from received WebSocket text messages. |
| <p> |
| Note, the WebSocket protocol differentiates between text/String and |
| binary/byte messages. This method only receives messages sent as text.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../../org/apache/edgent/connectors/wsclient/WebSocketClient.html#receiveString--">receiveString</a></code> in interface <code><a href="../../../../../../../org/apache/edgent/connectors/wsclient/WebSocketClient.html" title="interface in org.apache.edgent.connectors.wsclient">WebSocketClient</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the stream</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="receiveBytes--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>receiveBytes</h4> |
| <pre>public <a href="../../../../../../../org/apache/edgent/topology/TStream.html" title="interface in org.apache.edgent.topology">TStream</a><byte[]> receiveBytes()</pre> |
| <div class="block">Create a stream of byte[] tuples from received WebSocket binary messages. |
| <p> |
| Note, the WebSocket protocol differentiates between text/String and |
| binary/byte messages. This method only receives messages sent as bytes.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../../org/apache/edgent/connectors/wsclient/WebSocketClient.html#receiveBytes--">receiveBytes</a></code> in interface <code><a href="../../../../../../../org/apache/edgent/connectors/wsclient/WebSocketClient.html" title="interface in org.apache.edgent.connectors.wsclient">WebSocketClient</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the stream</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="topology--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>topology</h4> |
| <pre>public <a href="../../../../../../../org/apache/edgent/topology/Topology.html" title="interface in org.apache.edgent.topology">Topology</a> topology()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../../../org/apache/edgent/topology/TopologyElement.html#topology--">TopologyElement</a></code></span></div> |
| <div class="block">Topology this element is contained in.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../../org/apache/edgent/topology/TopologyElement.html#topology--">topology</a></code> in interface <code><a href="../../../../../../../org/apache/edgent/topology/TopologyElement.html" title="interface in org.apache.edgent.topology">TopologyElement</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Topology this element is contained in.</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/Jsr356WebSocketClient.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?org/apache/edgent/connectors/wsclient/javax/websocket/Jsr356WebSocketClient.html" target="_top">Frames</a></li> |
| <li><a href="Jsr356WebSocketClient.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>Field | </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>Field | </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–2017 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |