| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <title>RemoteEndpoint.Async</title> |
| <link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../script.js"></script> |
| |
| <link rel="shortcut icon" href="/img/jakarta-favicon.ico"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="RemoteEndpoint.Async"; |
| } |
| } |
| 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="package-tree.html">Tree</a></li> |
| <li><a href="../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../index-all.html">Index</a></li> |
| <li><a href="../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../javax/websocket/RemoteEndpoint.html" title="interface in javax.websocket"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../javax/websocket/RemoteEndpoint.Basic.html" title="interface in javax.websocket"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../index.html?javax/websocket/RemoteEndpoint.Async.html" target="_top">Frames</a></li> |
| <li><a href="RemoteEndpoint.Async.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>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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">javax.websocket</div> |
| <h2 title="Interface RemoteEndpoint.Async" class="title">Interface RemoteEndpoint.Async</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Superinterfaces:</dt> |
| <dd><a href="../../javax/websocket/RemoteEndpoint.html" title="interface in javax.websocket">RemoteEndpoint</a></dd> |
| </dl> |
| <dl> |
| <dt>Enclosing interface:</dt> |
| <dd><a href="../../javax/websocket/RemoteEndpoint.html" title="interface in javax.websocket">RemoteEndpoint</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public static interface <span class="typeNameLabel">RemoteEndpoint.Async</span> |
| extends <a href="../../javax/websocket/RemoteEndpoint.html" title="interface in javax.websocket">RemoteEndpoint</a></pre> |
| <div class="block">This representation of the peer of a web socket conversation has the ability to send messages asynchronously. The |
| point of completion of the send is defined when all the supplied data has been written to the underlying |
| connection. The completion handlers for the asynchronous methods are always called with a different thread from |
| that which initiated the send.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.classes.inherited.from.class.javax.websocket.RemoteEndpoint"> |
| <!-- --> |
| </a> |
| <h3>Nested classes/interfaces inherited from interface javax.websocket.<a href="../../javax/websocket/RemoteEndpoint.html" title="interface in javax.websocket">RemoteEndpoint</a></h3> |
| <code><a href="../../javax/websocket/RemoteEndpoint.Async.html" title="interface in javax.websocket">RemoteEndpoint.Async</a>, <a href="../../javax/websocket/RemoteEndpoint.Basic.html" title="interface in javax.websocket">RemoteEndpoint.Basic</a></code></li> |
| </ul> |
| </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="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract 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>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/websocket/RemoteEndpoint.Async.html#getSendTimeout--">getSendTimeout</a></span>()</code> |
| <div class="block">Return the number of milliseconds the implementation will timeout attempting to send a websocket message.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>java.util.concurrent.Future<java.lang.Void></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/websocket/RemoteEndpoint.Async.html#sendBinary-java.nio.ByteBuffer-">sendBinary</a></span>(java.nio.ByteBuffer data)</code> |
| <div class="block">Initiates the asynchronous transmission of a binary message.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/websocket/RemoteEndpoint.Async.html#sendBinary-java.nio.ByteBuffer-javax.websocket.SendHandler-">sendBinary</a></span>(java.nio.ByteBuffer data, |
| <a href="../../javax/websocket/SendHandler.html" title="interface in javax.websocket">SendHandler</a> handler)</code> |
| <div class="block">Initiates the asynchronous transmission of a binary message.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>java.util.concurrent.Future<java.lang.Void></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/websocket/RemoteEndpoint.Async.html#sendObject-java.lang.Object-">sendObject</a></span>(java.lang.Object data)</code> |
| <div class="block">Initiates the asynchronous transmission of a custom developer object.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/websocket/RemoteEndpoint.Async.html#sendObject-java.lang.Object-javax.websocket.SendHandler-">sendObject</a></span>(java.lang.Object data, |
| <a href="../../javax/websocket/SendHandler.html" title="interface in javax.websocket">SendHandler</a> handler)</code> |
| <div class="block">Initiates the asynchronous transmission of a custom developer object.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>java.util.concurrent.Future<java.lang.Void></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/websocket/RemoteEndpoint.Async.html#sendText-java.lang.String-">sendText</a></span>(java.lang.String text)</code> |
| <div class="block">Initiates the asynchronous transmission of a text message.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/websocket/RemoteEndpoint.Async.html#sendText-java.lang.String-javax.websocket.SendHandler-">sendText</a></span>(java.lang.String text, |
| <a href="../../javax/websocket/SendHandler.html" title="interface in javax.websocket">SendHandler</a> handler)</code> |
| <div class="block">Initiates the asynchronous transmission of a text message.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/websocket/RemoteEndpoint.Async.html#setSendTimeout-long-">setSendTimeout</a></span>(long timeoutmillis)</code> |
| <div class="block">Sets the number of milliseconds the implementation will timeout attempting to send a websocket message.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.javax.websocket.RemoteEndpoint"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface javax.websocket.<a href="../../javax/websocket/RemoteEndpoint.html" title="interface in javax.websocket">RemoteEndpoint</a></h3> |
| <code><a href="../../javax/websocket/RemoteEndpoint.html#flushBatch--">flushBatch</a>, <a href="../../javax/websocket/RemoteEndpoint.html#getBatchingAllowed--">getBatchingAllowed</a>, <a href="../../javax/websocket/RemoteEndpoint.html#sendPing-java.nio.ByteBuffer-">sendPing</a>, <a href="../../javax/websocket/RemoteEndpoint.html#sendPong-java.nio.ByteBuffer-">sendPong</a>, <a href="../../javax/websocket/RemoteEndpoint.html#setBatchingAllowed-boolean-">setBatchingAllowed</a></code></li> |
| </ul> |
| </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="getSendTimeout--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSendTimeout</h4> |
| <pre>long getSendTimeout()</pre> |
| <div class="block">Return the number of milliseconds the implementation will timeout attempting to send a websocket message. A |
| non-positive number indicates the implementation will not timeout attempting to send a websocket message |
| asynchronously. This value overrides the default value assigned in the WebSocketContainer.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the timeout time in milliseconds.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setSendTimeout-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setSendTimeout</h4> |
| <pre>void setSendTimeout(long timeoutmillis)</pre> |
| <div class="block">Sets the number of milliseconds the implementation will timeout attempting to send a websocket message. A |
| non-positive number indicates the implementation will not timeout attempting to send a websocket message |
| asynchronously. This value overrides the default value assigned in the WebSocketContainer.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>timeoutmillis</code> - The number of milliseconds this RemoteEndpoint will wait before timing out an incomplete |
| asynchronous message send.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="sendText-java.lang.String-javax.websocket.SendHandler-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sendText</h4> |
| <pre>void sendText(java.lang.String text, |
| <a href="../../javax/websocket/SendHandler.html" title="interface in javax.websocket">SendHandler</a> handler)</pre> |
| <div class="block">Initiates the asynchronous transmission of a text message. This method returns before the message is |
| transmitted. Developers provide a callback to be notified when the message has been transmitted. Errors in |
| transmission are given to the developer in the SendResult object.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>text</code> - the text being sent.</dd> |
| <dd><code>handler</code> - the handler which will be notified of progress.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code> - if the text or the handler is <code>null</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="sendText-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sendText</h4> |
| <pre>java.util.concurrent.Future<java.lang.Void> sendText(java.lang.String text)</pre> |
| <div class="block">Initiates the asynchronous transmission of a text message. This method returns before the message is |
| transmitted. Developers use the returned Future object to track progress of the transmission. The Future's |
| get() method returns <code>null</code> upon successful completion. Errors in transmission are wrapped in the |
| <code>ExecutionException</code> thrown when querying the Future object.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>text</code> - the text being sent.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the Future object representing the send operation.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code> - if the text is <code>null</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="sendBinary-java.nio.ByteBuffer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sendBinary</h4> |
| <pre>java.util.concurrent.Future<java.lang.Void> sendBinary(java.nio.ByteBuffer data)</pre> |
| <div class="block">Initiates the asynchronous transmission of a binary message. This method returns before the message is |
| transmitted. Developers use the returned Future object to track progress of the transmission. The Future's |
| get() method returns <code>null</code> upon successful completion. Errors in transmission are wrapped in the |
| <code>ExecutionException</code> thrown when querying the Future object.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>data</code> - the data being sent.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the Future object representing the send operation.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code> - if the data is <code>null</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="sendBinary-java.nio.ByteBuffer-javax.websocket.SendHandler-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sendBinary</h4> |
| <pre>void sendBinary(java.nio.ByteBuffer data, |
| <a href="../../javax/websocket/SendHandler.html" title="interface in javax.websocket">SendHandler</a> handler)</pre> |
| <div class="block">Initiates the asynchronous transmission of a binary message. This method returns before the message is |
| transmitted. Developers provide a callback to be notified when the message has been transmitted. Errors in |
| transmission are given to the developer in the SendResult object.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>data</code> - the data being sent, must not be <code>null</code>.</dd> |
| <dd><code>handler</code> - the handler that will be notified of progress, must not be <code>null</code>.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code> - if either the data or the handler are <code>null</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="sendObject-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sendObject</h4> |
| <pre>java.util.concurrent.Future<java.lang.Void> sendObject(java.lang.Object data)</pre> |
| <div class="block">Initiates the asynchronous transmission of a custom developer object. The developer will have provided an |
| encoder for this object type in the endpoint configuration. Containers will by default be able to encode java |
| primitive types and their object equivalents, otherwise the developer must have provided an encoder for the |
| object type in the endpoint configuration. Progress may be tracked using the Future object. The Future's |
| get() methods return <code>null</code> upon successful completion. Errors in transmission are wrapped in the |
| <code>ExecutionException</code> thrown when querying the Future object.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>data</code> - the object being sent.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the Future object representing the send operation.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code> - if the data is <code>null</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="sendObject-java.lang.Object-javax.websocket.SendHandler-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>sendObject</h4> |
| <pre>void sendObject(java.lang.Object data, |
| <a href="../../javax/websocket/SendHandler.html" title="interface in javax.websocket">SendHandler</a> handler)</pre> |
| <div class="block">Initiates the asynchronous transmission of a custom developer object. Containers will by default be able to |
| encode java primitive types and their object equivalents, otherwise the developer must have provided an |
| encoder for the object type in the endpoint configuration. Developers are notified when transmission is |
| complete through the supplied callback object.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>data</code> - the object being sent.</dd> |
| <dd><code>handler</code> - the handler that will be notified of progress, must not be <code>null</code>.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code> - if either the data or the handler are <code>null</code>.</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="package-tree.html">Tree</a></li> |
| <li><a href="../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../index-all.html">Index</a></li> |
| <li><a href="../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../javax/websocket/RemoteEndpoint.html" title="interface in javax.websocket"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../javax/websocket/RemoteEndpoint.Basic.html" title="interface in javax.websocket"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../index.html?javax/websocket/RemoteEndpoint.Async.html" target="_top">Frames</a></li> |
| <li><a href="RemoteEndpoint.Async.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>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |