blob: b10303ca6de3554a60aa5297ab357a8b215c1208 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.11) on Mon Jun 14 16:40:44 EDT 2021 -->
<title>WebSocketPolicy (Eclipse Jetty API Doc - v10.0.5)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2021-06-14">
<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="WebSocketPolicy (Eclipse Jetty API Doc - v10.0.5)";
}
}
catch(err) {
}
//-->
var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":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";
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/WebSocketPolicy.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&nbsp;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:&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 id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</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>&nbsp;<a href="package-summary.html">org.eclipse.jetty.websocket.api</a></div>
<h2 title="Interface WebSocketPolicy" class="title">Interface WebSocketPolicy</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Subinterfaces:</dt>
<dd><code><a href="../server/JettyWebSocketServletFactory.html" title="interface in org.eclipse.jetty.websocket.server">JettyWebSocketServletFactory</a></code>, <code><a href="Session.html" title="interface in org.eclipse.jetty.websocket.api">Session</a></code></dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="../server/JettyWebSocketServerContainer.html" title="class in org.eclipse.jetty.websocket.server">JettyWebSocketServerContainer</a></code>, <code><a href="../client/WebSocketClient.html" title="class in org.eclipse.jetty.websocket.client">WebSocketClient</a></code>, <code><a href="../common/WebSocketSession.html" title="class in org.eclipse.jetty.websocket.common">WebSocketSession</a></code></dd>
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">WebSocketPolicy</span></pre>
<div class="block">Settings for WebSocket operations.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== 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">&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="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="WebSocketBehavior.html" title="enum in org.eclipse.jetty.websocket.api">WebSocketBehavior</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBehavior()">getBehavior</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>java.time.Duration</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getIdleTimeout()">getIdleTimeout</a></span>()</code></th>
<td class="colLast">
<div class="block">The duration that a websocket may be idle before being closed by the implementation</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getInputBufferSize()">getInputBufferSize</a></span>()</code></th>
<td class="colLast">
<div class="block">The input (read from network layer) buffer size.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxBinaryMessageSize()">getMaxBinaryMessageSize</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the maximum size of a binary message during parsing.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxFrameSize()">getMaxFrameSize</a></span>()</code></th>
<td class="colLast">
<div class="block">The maximum payload size of any WebSocket Frame which can be received.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxTextMessageSize()">getMaxTextMessageSize</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the maximum size of a text message during parsing.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getOutputBufferSize()">getOutputBufferSize</a></span>()</code></th>
<td class="colLast">
<div class="block">The output (write to network layer) buffer size.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isAutoFragment()">isAutoFragment</a></span>()</code></th>
<td class="colLast">
<div class="block">If true, frames are automatically fragmented to respect the maximum frame size.</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="#setAutoFragment(boolean)">setAutoFragment</a></span>&#8203;(boolean&nbsp;autoFragment)</code></th>
<td class="colLast">
<div class="block">If set to true, frames are automatically fragmented to respect the maximum frame size.</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="#setIdleTimeout(java.time.Duration)">setIdleTimeout</a></span>&#8203;(java.time.Duration&nbsp;duration)</code></th>
<td class="colLast">
<div class="block">The duration that a websocket may be idle before being closed by the implementation</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setInputBufferSize(int)">setInputBufferSize</a></span>&#8203;(int&nbsp;size)</code></th>
<td class="colLast">
<div class="block">The input (read from network layer) buffer size.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMaxBinaryMessageSize(long)">setMaxBinaryMessageSize</a></span>&#8203;(long&nbsp;size)</code></th>
<td class="colLast">
<div class="block">The maximum size of a binary message during parsing/generating.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMaxFrameSize(long)">setMaxFrameSize</a></span>&#8203;(long&nbsp;maxFrameSize)</code></th>
<td class="colLast">
<div class="block">The maximum payload size of any WebSocket Frame which can be received.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMaxTextMessageSize(long)">setMaxTextMessageSize</a></span>&#8203;(long&nbsp;size)</code></th>
<td class="colLast">
<div class="block">The maximum size of a text message during parsing/generating.</div>
</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="#setOutputBufferSize(int)">setOutputBufferSize</a></span>&#8203;(int&nbsp;size)</code></th>
<td class="colLast">
<div class="block">The output (write to network layer) buffer size.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="getBehavior()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBehavior</h4>
<pre class="methodSignature"><a href="WebSocketBehavior.html" title="enum in org.eclipse.jetty.websocket.api">WebSocketBehavior</a>&nbsp;getBehavior()</pre>
</li>
</ul>
<a id="getIdleTimeout()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIdleTimeout</h4>
<pre class="methodSignature">java.time.Duration&nbsp;getIdleTimeout()</pre>
<div class="block">The duration that a websocket may be idle before being closed by the implementation</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the timeout duration</dd>
</dl>
</li>
</ul>
<a id="getInputBufferSize()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInputBufferSize</h4>
<pre class="methodSignature">int&nbsp;getInputBufferSize()</pre>
<div class="block">The input (read from network layer) buffer size.
<p>
This is the raw read operation buffer size, before the parsing of the websocket frames.
</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the raw network buffer input size.</dd>
</dl>
</li>
</ul>
<a id="getOutputBufferSize()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOutputBufferSize</h4>
<pre class="methodSignature">int&nbsp;getOutputBufferSize()</pre>
<div class="block">The output (write to network layer) buffer size.
<p>
This is the raw write operation buffer size and has no relationship to the websocket frame.
</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the raw network buffer output size.</dd>
</dl>
</li>
</ul>
<a id="getMaxBinaryMessageSize()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxBinaryMessageSize</h4>
<pre class="methodSignature">long&nbsp;getMaxBinaryMessageSize()</pre>
<div class="block">Get the maximum size of a binary message during parsing.
<p>
This is a memory conservation option, memory over this limit will not be
allocated by Jetty for handling binary messages. This applies to individual frames,
whole message handling, and partial message handling.
</p>
<p>
Binary messages over this maximum will result in a close code 1009 <a href="StatusCode.html#MESSAGE_TOO_LARGE"><code>StatusCode.MESSAGE_TOO_LARGE</code></a>
</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the maximum size of a binary message</dd>
</dl>
</li>
</ul>
<a id="getMaxTextMessageSize()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxTextMessageSize</h4>
<pre class="methodSignature">long&nbsp;getMaxTextMessageSize()</pre>
<div class="block">Get the maximum size of a text message during parsing.
<p>
This is a memory conservation option, memory over this limit will not be
allocated by Jetty for handling text messages. This applies to individual frames,
whole message handling, and partial message handling.
</p>
<p>
Text messages over this maximum will result in a close code 1009 <a href="StatusCode.html#MESSAGE_TOO_LARGE"><code>StatusCode.MESSAGE_TOO_LARGE</code></a>
</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the maximum size of a text message.</dd>
</dl>
</li>
</ul>
<a id="getMaxFrameSize()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxFrameSize</h4>
<pre class="methodSignature">long&nbsp;getMaxFrameSize()</pre>
<div class="block">The maximum payload size of any WebSocket Frame which can be received.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the maximum size of a WebSocket Frame.</dd>
</dl>
</li>
</ul>
<a id="isAutoFragment()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isAutoFragment</h4>
<pre class="methodSignature">boolean&nbsp;isAutoFragment()</pre>
<div class="block">If true, frames are automatically fragmented to respect the maximum frame size.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether to automatically fragment incoming WebSocket Frames.</dd>
</dl>
</li>
</ul>
<a id="setIdleTimeout(java.time.Duration)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIdleTimeout</h4>
<pre class="methodSignature">void&nbsp;setIdleTimeout&#8203;(java.time.Duration&nbsp;duration)</pre>
<div class="block">The duration that a websocket may be idle before being closed by the implementation</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>duration</code> - the timeout duration (may not be null or negative)</dd>
</dl>
</li>
</ul>
<a id="setInputBufferSize(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setInputBufferSize</h4>
<pre class="methodSignature">void&nbsp;setInputBufferSize&#8203;(int&nbsp;size)</pre>
<div class="block">The input (read from network layer) buffer size.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>size</code> - the size in bytes</dd>
</dl>
</li>
</ul>
<a id="setOutputBufferSize(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOutputBufferSize</h4>
<pre class="methodSignature">void&nbsp;setOutputBufferSize&#8203;(int&nbsp;size)</pre>
<div class="block">The output (write to network layer) buffer size.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>size</code> - the size in bytes</dd>
</dl>
</li>
</ul>
<a id="setMaxBinaryMessageSize(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxBinaryMessageSize</h4>
<pre class="methodSignature">void&nbsp;setMaxBinaryMessageSize&#8203;(long&nbsp;size)</pre>
<div class="block">The maximum size of a binary message during parsing/generating.
<p>
Binary messages over this maximum will result in a close code 1009 <a href="StatusCode.html#MESSAGE_TOO_LARGE"><code>StatusCode.MESSAGE_TOO_LARGE</code></a>
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>size</code> - the maximum allowed size of a binary message.</dd>
</dl>
</li>
</ul>
<a id="setMaxTextMessageSize(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxTextMessageSize</h4>
<pre class="methodSignature">void&nbsp;setMaxTextMessageSize&#8203;(long&nbsp;size)</pre>
<div class="block">The maximum size of a text message during parsing/generating.
<p>
Text messages over this maximum will result in a close code 1009 <a href="StatusCode.html#MESSAGE_TOO_LARGE"><code>StatusCode.MESSAGE_TOO_LARGE</code></a></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>size</code> - the maximum allowed size of a text message.</dd>
</dl>
</li>
</ul>
<a id="setMaxFrameSize(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxFrameSize</h4>
<pre class="methodSignature">void&nbsp;setMaxFrameSize&#8203;(long&nbsp;maxFrameSize)</pre>
<div class="block">The maximum payload size of any WebSocket Frame which can be received.
<p>
WebSocket Frames over this maximum will result in a close code 1009 <a href="StatusCode.html#MESSAGE_TOO_LARGE"><code>StatusCode.MESSAGE_TOO_LARGE</code></a>
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>maxFrameSize</code> - the maximum allowed size of a WebSocket Frame.</dd>
</dl>
</li>
</ul>
<a id="setAutoFragment(boolean)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>setAutoFragment</h4>
<pre class="methodSignature">void&nbsp;setAutoFragment&#8203;(boolean&nbsp;autoFragment)</pre>
<div class="block">If set to true, frames are automatically fragmented to respect the maximum frame size.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>autoFragment</code> - whether to automatically fragment incoming WebSocket Frames.</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/WebSocketPolicy.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&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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</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 id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 1995&#x2013;2021 <a href="https://webtide.com">Webtide</a>. All rights reserved.</small></p>
</footer>
</body>
</html>