| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (11.0.10) on Tue Mar 30 10:48:34 CDT 2021 --> |
| <title>MessageHandler (Eclipse Jetty API Doc - v11.0.2)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="dc.created" content="2021-03-30"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../../../jquery/jquery-3.5.1.js"></script> |
| <script type="text/javascript" src="../../../../../../jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="MessageHandler (Eclipse Jetty API Doc - v11.0.2)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":9,"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,"i15":10,"i16":10,"i17":10}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../../../../"; |
| var useModuleDirectories = true; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/MessageHandler.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" id="allclasses_navbar_top"> |
| <li><a href="../../../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </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> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </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 id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.eclipse.jetty.websocket.core.internal</a></div> |
| <h2 title="Class MessageHandler" class="title">Class MessageHandler</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.eclipse.jetty.websocket.core.internal.MessageHandler</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code><a href="../FrameHandler.html" title="interface in org.eclipse.jetty.websocket.core">FrameHandler</a></code>, <code><a href="../IncomingFrames.html" title="interface in org.eclipse.jetty.websocket.core">IncomingFrames</a></code></dd> |
| </dl> |
| <hr> |
| <pre>public class <span class="typeNameLabel">MessageHandler</span> |
| extends java.lang.Object |
| implements <a href="../FrameHandler.html" title="interface in org.eclipse.jetty.websocket.core">FrameHandler</a></pre> |
| <div class="block">A utility implementation of FrameHandler that defragments |
| text frames into a String message before calling <a href="#onText(java.lang.String,org.eclipse.jetty.util.Callback)"><code>onText(String, Callback)</code></a>. |
| Flow control is by default automatic, but an implementation |
| may extend <a href="../FrameHandler.html#isDemanding()"><code>FrameHandler.isDemanding()</code></a> to return true and then explicityly control |
| demand with calls to <a href="../CoreSession.html#demand(long)"><code>CoreSession.demand(long)</code></a></div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Constructor</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">MessageHandler</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></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="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static <a href="MessageHandler.html" title="class in org.eclipse.jetty.websocket.core.internal">MessageHandler</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#from(java.util.function.Consumer,java.util.function.Consumer)">from</a></span>​(java.util.function.Consumer<java.lang.String> onText, |
| java.util.function.Consumer<java.nio.ByteBuffer> onBinary)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="../CoreSession.html" title="interface in org.eclipse.jetty.websocket.core">CoreSession</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCoreSession()">getCoreSession</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onBinary(java.nio.ByteBuffer,org.eclipse.jetty.util.Callback)">onBinary</a></span>​(java.nio.ByteBuffer message, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</code></th> |
| <td class="colLast"> |
| <div class="block">Method called when a complete binary message is received.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onBinaryFrame(org.eclipse.jetty.websocket.core.Frame,org.eclipse.jetty.util.Callback)">onBinaryFrame</a></span>​(<a href="../Frame.html" title="class in org.eclipse.jetty.websocket.core">Frame</a> frame, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onClosed(org.eclipse.jetty.websocket.core.CloseStatus,org.eclipse.jetty.util.Callback)">onClosed</a></span>​(<a href="../CloseStatus.html" title="class in org.eclipse.jetty.websocket.core">CloseStatus</a> closeStatus, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</code></th> |
| <td class="colLast"> |
| <div class="block">This is the Close Handshake Complete event.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onCloseFrame(org.eclipse.jetty.websocket.core.Frame,org.eclipse.jetty.util.Callback)">onCloseFrame</a></span>​(<a href="../Frame.html" title="class in org.eclipse.jetty.websocket.core">Frame</a> frame, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onContinuationFrame(org.eclipse.jetty.websocket.core.Frame,org.eclipse.jetty.util.Callback)">onContinuationFrame</a></span>​(<a href="../Frame.html" title="class in org.eclipse.jetty.websocket.core">Frame</a> frame, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onError(java.lang.Throwable,org.eclipse.jetty.util.Callback)">onError</a></span>​(java.lang.Throwable cause, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</code></th> |
| <td class="colLast"> |
| <div class="block">An error has occurred or been detected in websocket-core and being reported to FrameHandler.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onFrame(org.eclipse.jetty.websocket.core.Frame,org.eclipse.jetty.util.Callback)">onFrame</a></span>​(<a href="../Frame.html" title="class in org.eclipse.jetty.websocket.core">Frame</a> frame, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</code></th> |
| <td class="colLast"> |
| <div class="block">Receiver of all Frames.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onOpen(org.eclipse.jetty.websocket.core.CoreSession,org.eclipse.jetty.util.Callback)">onOpen</a></span>​(<a href="../CoreSession.html" title="interface in org.eclipse.jetty.websocket.core">CoreSession</a> coreSession, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</code></th> |
| <td class="colLast"> |
| <div class="block">Async notification that Connection is being opened.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onPingFrame(org.eclipse.jetty.websocket.core.Frame,org.eclipse.jetty.util.Callback)">onPingFrame</a></span>​(<a href="../Frame.html" title="class in org.eclipse.jetty.websocket.core">Frame</a> frame, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onPongFrame(org.eclipse.jetty.websocket.core.Frame,org.eclipse.jetty.util.Callback)">onPongFrame</a></span>​(<a href="../Frame.html" title="class in org.eclipse.jetty.websocket.core">Frame</a> frame, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onText(java.lang.String,org.eclipse.jetty.util.Callback)">onText</a></span>​(java.lang.String message, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</code></th> |
| <td class="colLast"> |
| <div class="block">Method called when a complete text message is received.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onTextFrame(org.eclipse.jetty.websocket.core.Frame,org.eclipse.jetty.util.Callback)">onTextFrame</a></span>​(<a href="../Frame.html" title="class in org.eclipse.jetty.websocket.core">Frame</a> frame, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sendBinary(java.nio.ByteBuffer,org.eclipse.jetty.util.Callback,boolean)">sendBinary</a></span>​(java.nio.ByteBuffer message, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback, |
| boolean batch)</code></th> |
| <td class="colLast"> |
| <div class="block">Send a ByteBuffer as a single binary frame.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sendBinary(org.eclipse.jetty.util.Callback,boolean,java.nio.ByteBuffer...)">sendBinary</a></span>​(<a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback, |
| boolean batch, |
| java.nio.ByteBuffer... parts)</code></th> |
| <td class="colLast"> |
| <div class="block">Send a sequence of ByteBuffers as a sequences for fragmented text frame.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sendText(java.lang.String,org.eclipse.jetty.util.Callback,boolean)">sendText</a></span>​(java.lang.String message, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback, |
| boolean batch)</code></th> |
| <td class="colLast"> |
| <div class="block">Send a String as a single text frame.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sendText(org.eclipse.jetty.util.Callback,boolean,java.lang.String...)">sendText</a></span>​(<a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback, |
| boolean batch, |
| java.lang.String... parts)</code></th> |
| <td class="colLast"> |
| <div class="block">Send a sequence of Strings as a sequences for fragmented text frame.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="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> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.org.eclipse.jetty.websocket.core.FrameHandler"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.eclipse.jetty.websocket.core.<a href="../FrameHandler.html" title="interface in org.eclipse.jetty.websocket.core">FrameHandler</a></h3> |
| <code><a href="../FrameHandler.html#isDemanding()">isDemanding</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a id="<init>()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>MessageHandler</h4> |
| <pre>public MessageHandler()</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="from(java.util.function.Consumer,java.util.function.Consumer)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>from</h4> |
| <pre class="methodSignature">public static <a href="MessageHandler.html" title="class in org.eclipse.jetty.websocket.core.internal">MessageHandler</a> from​(java.util.function.Consumer<java.lang.String> onText, |
| java.util.function.Consumer<java.nio.ByteBuffer> onBinary)</pre> |
| </li> |
| </ul> |
| <a id="getCoreSession()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCoreSession</h4> |
| <pre class="methodSignature">public <a href="../CoreSession.html" title="interface in org.eclipse.jetty.websocket.core">CoreSession</a> getCoreSession()</pre> |
| </li> |
| </ul> |
| <a id="onOpen(org.eclipse.jetty.websocket.core.CoreSession,org.eclipse.jetty.util.Callback)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>onOpen</h4> |
| <pre class="methodSignature">public void onOpen​(<a href="../CoreSession.html" title="interface in org.eclipse.jetty.websocket.core">CoreSession</a> coreSession, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../FrameHandler.html#onOpen(org.eclipse.jetty.websocket.core.CoreSession,org.eclipse.jetty.util.Callback)">FrameHandler</a></code></span></div> |
| <div class="block">Async notification that Connection is being opened. |
| <p> |
| FrameHandler can write during this call, but can not receive frames until the callback is succeeded. |
| </p> |
| <p> |
| If the FrameHandler succeeds the callback we transition to OPEN state and can now receive frames if |
| not demanding, or can now call <a href="../CoreSession.html#demand(long)"><code>CoreSession.demand(long)</code></a> to receive frames if demanding. |
| If the FrameHandler fails the callback a close frame will be sent with <a href="../CloseStatus.html#SERVER_ERROR"><code>CloseStatus.SERVER_ERROR</code></a> and |
| the connection will be closed. <br> |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../FrameHandler.html#onOpen(org.eclipse.jetty.websocket.core.CoreSession,org.eclipse.jetty.util.Callback)">onOpen</a></code> in interface <code><a href="../FrameHandler.html" title="interface in org.eclipse.jetty.websocket.core">FrameHandler</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>coreSession</code> - the session associated with this connection.</dd> |
| <dd><code>callback</code> - the callback to indicate success in processing (or failure)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="onFrame(org.eclipse.jetty.websocket.core.Frame,org.eclipse.jetty.util.Callback)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>onFrame</h4> |
| <pre class="methodSignature">public void onFrame​(<a href="../Frame.html" title="class in org.eclipse.jetty.websocket.core">Frame</a> frame, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../FrameHandler.html#onFrame(org.eclipse.jetty.websocket.core.Frame,org.eclipse.jetty.util.Callback)">FrameHandler</a></code></span></div> |
| <div class="block">Receiver of all Frames. |
| This method will never be called in parallel for the same session and will be called |
| sequentially to satisfy all outstanding demand signaled by calls to |
| <a href="../CoreSession.html#demand(long)"><code>CoreSession.demand(long)</code></a>. |
| Control and Data frames are passed to this method. |
| Close frames may be responded to by the handler, but if an appropriate close response is not |
| sent once the callback is succeeded, then a response close will be generated and sent.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../FrameHandler.html#onFrame(org.eclipse.jetty.websocket.core.Frame,org.eclipse.jetty.util.Callback)">onFrame</a></code> in interface <code><a href="../FrameHandler.html" title="interface in org.eclipse.jetty.websocket.core">FrameHandler</a></code></dd> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../IncomingFrames.html#onFrame(org.eclipse.jetty.websocket.core.Frame,org.eclipse.jetty.util.Callback)">onFrame</a></code> in interface <code><a href="../IncomingFrames.html" title="interface in org.eclipse.jetty.websocket.core">IncomingFrames</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>frame</code> - the raw frame</dd> |
| <dd><code>callback</code> - the callback to indicate success in processing frame (or failure)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="onError(java.lang.Throwable,org.eclipse.jetty.util.Callback)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>onError</h4> |
| <pre class="methodSignature">public void onError​(java.lang.Throwable cause, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../FrameHandler.html#onError(java.lang.Throwable,org.eclipse.jetty.util.Callback)">FrameHandler</a></code></span></div> |
| <div class="block">An error has occurred or been detected in websocket-core and being reported to FrameHandler. |
| A call to onError will be followed by a call to <a href="../FrameHandler.html#onClosed(org.eclipse.jetty.websocket.core.CloseStatus,org.eclipse.jetty.util.Callback)"><code>FrameHandler.onClosed(CloseStatus, Callback)</code></a> giving the close status |
| derived from the error. This will not be called more than once, <a href="../FrameHandler.html#onClosed(org.eclipse.jetty.websocket.core.CloseStatus,org.eclipse.jetty.util.Callback)"><code>FrameHandler.onClosed(CloseStatus, Callback)</code></a> |
| will be called on the callback completion.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../FrameHandler.html#onError(java.lang.Throwable,org.eclipse.jetty.util.Callback)">onError</a></code> in interface <code><a href="../FrameHandler.html" title="interface in org.eclipse.jetty.websocket.core">FrameHandler</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>cause</code> - the reason for the error</dd> |
| <dd><code>callback</code> - the callback to indicate success in processing (or failure)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="onClosed(org.eclipse.jetty.websocket.core.CloseStatus,org.eclipse.jetty.util.Callback)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>onClosed</h4> |
| <pre class="methodSignature">public void onClosed​(<a href="../CloseStatus.html" title="class in org.eclipse.jetty.websocket.core">CloseStatus</a> closeStatus, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../FrameHandler.html#onClosed(org.eclipse.jetty.websocket.core.CloseStatus,org.eclipse.jetty.util.Callback)">FrameHandler</a></code></span></div> |
| <div class="block">This is the Close Handshake Complete event. |
| <p> |
| The connection is now closed, no reading or writing is possible anymore. |
| Implementations of FrameHandler can cleanup their resources for this connection now. |
| This method will be called only once. |
| </p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../FrameHandler.html#onClosed(org.eclipse.jetty.websocket.core.CloseStatus,org.eclipse.jetty.util.Callback)">onClosed</a></code> in interface <code><a href="../FrameHandler.html" title="interface in org.eclipse.jetty.websocket.core">FrameHandler</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>closeStatus</code> - the close status received from remote, or in the case of abnormal closure from local.</dd> |
| <dd><code>callback</code> - the callback to indicate success in processing (or failure)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="onTextFrame(org.eclipse.jetty.websocket.core.Frame,org.eclipse.jetty.util.Callback)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>onTextFrame</h4> |
| <pre class="methodSignature">protected void onTextFrame​(<a href="../Frame.html" title="class in org.eclipse.jetty.websocket.core">Frame</a> frame, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</pre> |
| </li> |
| </ul> |
| <a id="onBinaryFrame(org.eclipse.jetty.websocket.core.Frame,org.eclipse.jetty.util.Callback)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>onBinaryFrame</h4> |
| <pre class="methodSignature">protected void onBinaryFrame​(<a href="../Frame.html" title="class in org.eclipse.jetty.websocket.core">Frame</a> frame, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</pre> |
| </li> |
| </ul> |
| <a id="onContinuationFrame(org.eclipse.jetty.websocket.core.Frame,org.eclipse.jetty.util.Callback)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>onContinuationFrame</h4> |
| <pre class="methodSignature">protected void onContinuationFrame​(<a href="../Frame.html" title="class in org.eclipse.jetty.websocket.core">Frame</a> frame, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</pre> |
| </li> |
| </ul> |
| <a id="onPingFrame(org.eclipse.jetty.websocket.core.Frame,org.eclipse.jetty.util.Callback)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>onPingFrame</h4> |
| <pre class="methodSignature">protected void onPingFrame​(<a href="../Frame.html" title="class in org.eclipse.jetty.websocket.core">Frame</a> frame, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</pre> |
| </li> |
| </ul> |
| <a id="onPongFrame(org.eclipse.jetty.websocket.core.Frame,org.eclipse.jetty.util.Callback)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>onPongFrame</h4> |
| <pre class="methodSignature">protected void onPongFrame​(<a href="../Frame.html" title="class in org.eclipse.jetty.websocket.core">Frame</a> frame, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</pre> |
| </li> |
| </ul> |
| <a id="onCloseFrame(org.eclipse.jetty.websocket.core.Frame,org.eclipse.jetty.util.Callback)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>onCloseFrame</h4> |
| <pre class="methodSignature">protected void onCloseFrame​(<a href="../Frame.html" title="class in org.eclipse.jetty.websocket.core">Frame</a> frame, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</pre> |
| </li> |
| </ul> |
| <a id="onText(java.lang.String,org.eclipse.jetty.util.Callback)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>onText</h4> |
| <pre class="methodSignature">protected void onText​(java.lang.String message, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</pre> |
| <div class="block">Method called when a complete text message is received.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>message</code> - the received text payload</dd> |
| <dd><code>callback</code> - The callback to signal completion of handling.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="onBinary(java.nio.ByteBuffer,org.eclipse.jetty.util.Callback)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>onBinary</h4> |
| <pre class="methodSignature">protected void onBinary​(java.nio.ByteBuffer message, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback)</pre> |
| <div class="block">Method called when a complete binary message is received.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>message</code> - The binary payload</dd> |
| <dd><code>callback</code> - The callback to signal completion of handling.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="sendText(java.lang.String,org.eclipse.jetty.util.Callback,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sendText</h4> |
| <pre class="methodSignature">public void sendText​(java.lang.String message, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback, |
| boolean batch)</pre> |
| <div class="block">Send a String as a single text frame.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>message</code> - The message to send</dd> |
| <dd><code>callback</code> - The callback to call when the send is complete</dd> |
| <dd><code>batch</code> - The batch mode to send the frames in.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="sendText(org.eclipse.jetty.util.Callback,boolean,java.lang.String...)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sendText</h4> |
| <pre class="methodSignature">public void sendText​(<a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback, |
| boolean batch, |
| java.lang.String... parts)</pre> |
| <div class="block">Send a sequence of Strings as a sequences for fragmented text frame. |
| Sending a large message in fragments can reduce memory overheads as only a |
| single fragment need be converted to bytes</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>callback</code> - The callback to call when the send is complete</dd> |
| <dd><code>batch</code> - The batch mode to send the frames in.</dd> |
| <dd><code>parts</code> - The parts of the message.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="sendBinary(java.nio.ByteBuffer,org.eclipse.jetty.util.Callback,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sendBinary</h4> |
| <pre class="methodSignature">public void sendBinary​(java.nio.ByteBuffer message, |
| <a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback, |
| boolean batch)</pre> |
| <div class="block">Send a ByteBuffer as a single binary frame.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>message</code> - The message to send</dd> |
| <dd><code>callback</code> - The callback to call when the send is complete</dd> |
| <dd><code>batch</code> - The batch mode to send the frames in.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="sendBinary(org.eclipse.jetty.util.Callback,boolean,java.nio.ByteBuffer...)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>sendBinary</h4> |
| <pre class="methodSignature">public void sendBinary​(<a href="../../../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a> callback, |
| boolean batch, |
| java.nio.ByteBuffer... parts)</pre> |
| <div class="block">Send a sequence of ByteBuffers as a sequences for fragmented text frame.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>callback</code> - The callback to call when the send is complete</dd> |
| <dd><code>batch</code> - The batch mode to send the frames in.</dd> |
| <dd><code>parts</code> - The parts of the message.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/MessageHandler.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" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../../allclasses.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> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </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 id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 1995–2021 <a href="https://webtide.com">Webtide</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |