blob: 9408b40e795f7d36ef7df4992fcf87f7de756199 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.6) on Fri Apr 10 16:48:14 EDT 2020 -->
<title>Connection (Jetty :: Project 9.4.28.v20200408 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2020-04-10">
<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.3.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-migrate-3.0.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="Connection (Jetty :: Project 9.4.28.v20200408 API)";
}
}
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};
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 = false;
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/Connection.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><a href="#nested.class.summary">Nested</a>&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.io</a></div>
<h2 title="Interface Connection" class="title">Interface Connection</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><code>java.lang.AutoCloseable</code>, <code>java.io.Closeable</code></dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="AbstractConnection.html" title="class in org.eclipse.jetty.io">AbstractConnection</a></code>, <code><a href="../websocket/common/io/AbstractWebSocketConnection.html" title="class in org.eclipse.jetty.websocket.common.io">AbstractWebSocketConnection</a></code>, <code><a href="../alpn/client/ALPNClientConnection.html" title="class in org.eclipse.jetty.alpn.client">ALPNClientConnection</a></code>, <code><a href="../alpn/server/ALPNServerConnection.html" title="class in org.eclipse.jetty.alpn.server">ALPNServerConnection</a></code>, <code><a href="../proxy/ConnectHandler.DownstreamConnection.html" title="class in org.eclipse.jetty.proxy">ConnectHandler.DownstreamConnection</a></code>, <code><a href="../proxy/ConnectHandler.UpstreamConnection.html" title="class in org.eclipse.jetty.proxy">ConnectHandler.UpstreamConnection</a></code>, <code><a href="../http2/HTTP2Connection.html" title="class in org.eclipse.jetty.http2">HTTP2Connection</a></code>, <code><a href="../http2/server/HTTP2ServerConnection.html" title="class in org.eclipse.jetty.http2.server">HTTP2ServerConnection</a></code>, <code><a href="../server/HttpConnection.html" title="class in org.eclipse.jetty.server">HttpConnection</a></code>, <code><a href="../fcgi/client/http/HttpConnectionOverFCGI.html" title="class in org.eclipse.jetty.fcgi.client.http">HttpConnectionOverFCGI</a></code>, <code><a href="../client/http/HttpConnectionOverHTTP.html" title="class in org.eclipse.jetty.client.http">HttpConnectionOverHTTP</a></code>, <code><a href="NegotiatingClientConnection.html" title="class in org.eclipse.jetty.io">NegotiatingClientConnection</a></code>, <code><a href="../server/NegotiatingServerConnection.html" title="class in org.eclipse.jetty.server">NegotiatingServerConnection</a></code>, <code><a href="../proxy/ProxyConnection.html" title="class in org.eclipse.jetty.proxy">ProxyConnection</a></code>, <code><a href="../client/ProxyProtocolClientConnectionFactory.ProxyProtocolConnection.html" title="class in org.eclipse.jetty.client">ProxyProtocolClientConnectionFactory.ProxyProtocolConnection</a></code>, <code><a href="../fcgi/server/ServerFCGIConnection.html" title="class in org.eclipse.jetty.fcgi.server">ServerFCGIConnection</a></code>, <code><a href="ssl/SslConnection.html" title="class in org.eclipse.jetty.io.ssl">SslConnection</a></code>, <code><a href="../websocket/client/io/WebSocketClientConnection.html" title="class in org.eclipse.jetty.websocket.client.io">WebSocketClientConnection</a></code>, <code><a href="../websocket/server/WebSocketServerConnection.html" title="class in org.eclipse.jetty.websocket.server">WebSocketServerConnection</a></code></dd>
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">Connection</span>
extends java.io.Closeable</pre>
<div class="block"><p>A <a href="Connection.html" title="interface in org.eclipse.jetty.io"><code>Connection</code></a> is associated to an <a href="EndPoint.html" title="interface in org.eclipse.jetty.io"><code>EndPoint</code></a> so that I/O events
happening on the <a href="EndPoint.html" title="interface in org.eclipse.jetty.io"><code>EndPoint</code></a> can be processed by the <a href="Connection.html" title="interface in org.eclipse.jetty.io"><code>Connection</code></a>.</p>
<p>A typical implementation of <a href="Connection.html" title="interface in org.eclipse.jetty.io"><code>Connection</code></a> overrides <a href="#onOpen()"><code>onOpen()</code></a> to
<a href="EndPoint.html#fillInterested(org.eclipse.jetty.util.Callback)"><code>set read interest</code></a> on the <a href="EndPoint.html" title="interface in org.eclipse.jetty.io"><code>EndPoint</code></a>,
and when the <a href="EndPoint.html" title="interface in org.eclipse.jetty.io"><code>EndPoint</code></a> signals read readyness, this <a href="Connection.html" title="interface in org.eclipse.jetty.io"><code>Connection</code></a> can
read bytes from the network and interpret them.</p></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Interface</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Connection.Listener.html" title="interface in org.eclipse.jetty.io">Connection.Listener</a></span></code></th>
<td class="colLast">
<div class="block">A Listener for connection events.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Connection.UpgradeFrom.html" title="interface in org.eclipse.jetty.io">Connection.UpgradeFrom</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Connection.UpgradeTo.html" title="interface in org.eclipse.jetty.io">Connection.UpgradeTo</a></span></code></th>
<td class="colLast">&nbsp;</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">&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>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addListener(org.eclipse.jetty.io.Connection.Listener)">addListener</a></span>&#8203;(<a href="Connection.Listener.html" title="interface in org.eclipse.jetty.io">Connection.Listener</a>&nbsp;listener)</code></th>
<td class="colLast">
<div class="block">Adds a listener of connection events.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#close()">close</a></span>()</code></th>
<td class="colLast">
<div class="block">Performs a logical close of this connection.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBytesIn()">getBytesIn</a></span>()</code></th>
<td class="colLast">&nbsp;</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="#getBytesOut()">getBytesOut</a></span>()</code></th>
<td class="colLast">&nbsp;</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="#getCreatedTimeStamp()">getCreatedTimeStamp</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="EndPoint.html" title="interface in org.eclipse.jetty.io">EndPoint</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getEndPoint()">getEndPoint</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMessagesIn()">getMessagesIn</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMessagesOut()">getMessagesOut</a></span>()</code></th>
<td class="colLast">&nbsp;</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="#onClose()">onClose</a></span>()</code></th>
<td class="colLast">
<div class="block">Callback method invoked when this connection is closed.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onIdleExpired()">onIdleExpired</a></span>()</code></th>
<td class="colLast">
<div class="block">Callback method invoked upon an idle timeout event.</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="#onOpen()">onOpen</a></span>()</code></th>
<td class="colLast">
<div class="block">Callback method invoked when this connection is opened.</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="#removeListener(org.eclipse.jetty.io.Connection.Listener)">removeListener</a></span>&#8203;(<a href="Connection.Listener.html" title="interface in org.eclipse.jetty.io">Connection.Listener</a>&nbsp;listener)</code></th>
<td class="colLast">
<div class="block">Removes a listener of connection events.</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="addListener(org.eclipse.jetty.io.Connection.Listener)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addListener</h4>
<pre class="methodSignature">void&nbsp;addListener&#8203;(<a href="Connection.Listener.html" title="interface in org.eclipse.jetty.io">Connection.Listener</a>&nbsp;listener)</pre>
<div class="block"><p>Adds a listener of connection events.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>listener</code> - the listener to add</dd>
</dl>
</li>
</ul>
<a id="removeListener(org.eclipse.jetty.io.Connection.Listener)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeListener</h4>
<pre class="methodSignature">void&nbsp;removeListener&#8203;(<a href="Connection.Listener.html" title="interface in org.eclipse.jetty.io">Connection.Listener</a>&nbsp;listener)</pre>
<div class="block"><p>Removes a listener of connection events.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>listener</code> - the listener to remove</dd>
</dl>
</li>
</ul>
<a id="onOpen()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onOpen</h4>
<pre class="methodSignature">void&nbsp;onOpen()</pre>
<div class="block"><p>Callback method invoked when this connection is opened.</p>
<p>Creators of the connection implementation are responsible for calling this method.</p></div>
</li>
</ul>
<a id="onClose()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onClose</h4>
<pre class="methodSignature">void&nbsp;onClose()</pre>
<div class="block"><p>Callback method invoked when this connection is closed.</p>
<p>Creators of the connection implementation are responsible for calling this method.</p></div>
</li>
</ul>
<a id="getEndPoint()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEndPoint</h4>
<pre class="methodSignature"><a href="EndPoint.html" title="interface in org.eclipse.jetty.io">EndPoint</a>&nbsp;getEndPoint()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <a href="EndPoint.html" title="interface in org.eclipse.jetty.io"><code>EndPoint</code></a> associated with this Connection.</dd>
</dl>
</li>
</ul>
<a id="close()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre class="methodSignature">void&nbsp;close()</pre>
<div class="block"><p>Performs a logical close of this connection.</p>
<p>For simple connections, this may just mean to delegate the close to the associated
<a href="EndPoint.html" title="interface in org.eclipse.jetty.io"><code>EndPoint</code></a> but, for example, SSL connections should write the SSL close message
before closing the associated <a href="EndPoint.html" title="interface in org.eclipse.jetty.io"><code>EndPoint</code></a>.</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>close</code>&nbsp;in interface&nbsp;<code>java.lang.AutoCloseable</code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>close</code>&nbsp;in interface&nbsp;<code>java.io.Closeable</code></dd>
</dl>
</li>
</ul>
<a id="onIdleExpired()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onIdleExpired</h4>
<pre class="methodSignature">boolean&nbsp;onIdleExpired()</pre>
<div class="block"><p>Callback method invoked upon an idle timeout event.</p>
<p>Implementations of this method may return true to indicate that the idle timeout
handling should proceed normally, typically failing the EndPoint and causing it to
be closed.</p>
<p>When false is returned, the handling of the idle timeout event is halted
immediately and the EndPoint left in the state it was before the idle timeout event.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true to let the EndPoint handle the idle timeout,
false to tell the EndPoint to halt the handling of the idle timeout.</dd>
</dl>
</li>
</ul>
<a id="getMessagesIn()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMessagesIn</h4>
<pre class="methodSignature">long&nbsp;getMessagesIn()</pre>
</li>
</ul>
<a id="getMessagesOut()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMessagesOut</h4>
<pre class="methodSignature">long&nbsp;getMessagesOut()</pre>
</li>
</ul>
<a id="getBytesIn()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBytesIn</h4>
<pre class="methodSignature">long&nbsp;getBytesIn()</pre>
</li>
</ul>
<a id="getBytesOut()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBytesOut</h4>
<pre class="methodSignature">long&nbsp;getBytesOut()</pre>
</li>
</ul>
<a id="getCreatedTimeStamp()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getCreatedTimeStamp</h4>
<pre class="methodSignature">long&nbsp;getCreatedTimeStamp()</pre>
</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/Connection.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><a href="#nested.class.summary">Nested</a>&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;2020 <a href="https://webtide.com">Webtide</a>. All rights reserved.</small></p>
</footer>
</body>
</html>