blob: 63161b680eddaddb169c8e7eff05b614ca269198 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.13) on Tue Feb 08 12:40:05 CST 2022 -->
<title>EndPoint (Eclipse Jetty API Doc - v10.0.8)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2022-02-08">
<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="EndPoint (Eclipse Jetty API Doc - v10.0.8)";
}
}
catch(err) {
}
//-->
var data = {"i0":18,"i1":6,"i2":18,"i3":6,"i4":18,"i5":6,"i6":6,"i7":6,"i8":38,"i9":18,"i10":38,"i11":18,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6,"i20":6,"i21":6,"i22":6,"i23":6,"i24":18};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],16:["t5","Default Methods"],32:["t6","Deprecated 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/EndPoint.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 EndPoint" class="title">Interface EndPoint</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="AbstractEndPoint.html" title="class in org.eclipse.jetty.io">AbstractEndPoint</a></code>, <code><a href="ByteArrayEndPoint.html" title="class in org.eclipse.jetty.io">ByteArrayEndPoint</a></code>, <code><a href="../http2/client/http/ClientHTTP2StreamEndPoint.html" title="class in org.eclipse.jetty.http2.client.http">ClientHTTP2StreamEndPoint</a></code>, <code><a href="DatagramChannelEndPoint.html" title="class in org.eclipse.jetty.io">DatagramChannelEndPoint</a></code>, <code><a href="../http2/HTTP2StreamEndPoint.html" title="class in org.eclipse.jetty.http2">HTTP2StreamEndPoint</a></code>, <code><a href="../server/LocalConnector.LocalEndPoint.html" title="class in org.eclipse.jetty.server">LocalConnector.LocalEndPoint</a></code>, <code><a href="NetworkTrafficSocketChannelEndPoint.html" title="class in org.eclipse.jetty.io">NetworkTrafficSocketChannelEndPoint</a></code>, <code><a href="../server/ProxyConnectionFactory.ProxyEndPoint.html" title="class in org.eclipse.jetty.server">ProxyConnectionFactory.ProxyEndPoint</a></code>, <code><a href="../quic/common/QuicStreamEndPoint.html" title="class in org.eclipse.jetty.quic.common">QuicStreamEndPoint</a></code>, <code><a href="SelectableChannelEndPoint.html" title="class in org.eclipse.jetty.io">SelectableChannelEndPoint</a></code>, <code><a href="../http2/server/ServerHTTP2StreamEndPoint.html" title="class in org.eclipse.jetty.http2.server">ServerHTTP2StreamEndPoint</a></code>, <code><a href="SocketChannelEndPoint.html" title="class in org.eclipse.jetty.io">SocketChannelEndPoint</a></code>, <code><a href="ssl/SslConnection.DecryptedEndPoint.html" title="class in org.eclipse.jetty.io.ssl">SslConnection.DecryptedEndPoint</a></code>, <code><a href="../unixsocket/common/UnixSocketEndPoint.html" title="class in org.eclipse.jetty.unixsocket.common">UnixSocketEndPoint</a></code></dd>
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">EndPoint</span>
extends java.io.Closeable</pre>
<div class="block"><p>EndPoint is the abstraction for an I/O channel that transports bytes.</p>
<p>Asynchronous Methods</p>
<p>The asynchronous scheduling methods of <a href="EndPoint.html" title="interface in org.eclipse.jetty.io"><code>EndPoint</code></a>
has been influenced by NIO.2 Futures and Completion
handlers, but does not use those actual interfaces because they have
some inefficiencies.</p>
<p>This class will frequently be used in conjunction with some of the utility
implementations of <a href="../util/Callback.html" title="interface in org.eclipse.jetty.util"><code>Callback</code></a>, such as <a href="../util/FutureCallback.html" title="class in org.eclipse.jetty.util"><code>FutureCallback</code></a> and
<a href="../util/IteratingCallback.html" title="class in org.eclipse.jetty.util"><code>IteratingCallback</code></a>.</p>
<p>Reads</p>
<p>A <a href="../util/FutureCallback.html" title="class in org.eclipse.jetty.util"><code>FutureCallback</code></a> can be used to block until an endpoint is ready
to fill bytes - the notification will be emitted by the NIO subsystem:</p>
<pre>
FutureCallback callback = new FutureCallback();
endPoint.fillInterested(callback);
// Blocks until read to fill bytes.
callback.get();
// Now bytes can be filled in a ByteBuffer.
int filled = endPoint.fill(byteBuffer);
</pre>
<p>Asynchronous Reads</p>
<p>A <a href="../util/Callback.html" title="interface in org.eclipse.jetty.util"><code>Callback</code></a> can be used to read asynchronously in its own dispatched
thread:</p>
<pre>
endPoint.fillInterested(new Callback()
{
public void onSucceeded()
{
executor.execute(() -&gt;
{
// Fill bytes in a different thread.
int filled = endPoint.fill(byteBuffer);
});
}
public void onFailed(Throwable failure)
{
endPoint.close();
}
});
</pre>
<p>Blocking Writes</p>
<p>The write contract is that the callback is completed when all the bytes
have been written or there is a failure.
Blocking writes look like this:</p>
<pre>
FutureCallback callback = new FutureCallback();
endpoint.write(callback, headerBuffer, contentBuffer);
// Blocks until the write succeeds or fails.
future.get();
</pre>
<p>Note also that multiple buffers may be passed in <a href="#write(org.eclipse.jetty.util.Callback,java.nio.ByteBuffer...)"><code>write(Callback, ByteBuffer...)</code></a>
so that gather writes can be performed for efficiency.</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="EndPoint.Wrapper.html" title="interface in org.eclipse.jetty.io">EndPoint.Wrapper</a></span></code></th>
<td class="colLast">
<div class="block">Marks an <code>EndPoint</code> that wraps another <code>EndPoint</code>.</div>
</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><span id="t5" class="tableTab"><span><a href="javascript:show(16);">Default Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated 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>default 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">Close any backing stream associated with the endpoint</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(java.lang.Throwable)">close</a></span>&#8203;(java.lang.Throwable&nbsp;cause)</code></th>
<td class="colLast">
<div class="block">Close any backing stream associated with the endpoint, passing a cause</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>default int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#fill(java.nio.ByteBuffer)">fill</a></span>&#8203;(java.nio.ByteBuffer&nbsp;buffer)</code></th>
<td class="colLast">
<div class="block">Fill the passed buffer with data from this endpoint.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#fillInterested(org.eclipse.jetty.util.Callback)">fillInterested</a></span>&#8203;(<a href="../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a>&nbsp;callback)</code></th>
<td class="colLast">
<div class="block">Requests callback methods to be invoked when a call to <a href="#fill(java.nio.ByteBuffer)"><code>fill(ByteBuffer)</code></a> would return data or EOF.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>default boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flush(java.nio.ByteBuffer...)">flush</a></span>&#8203;(java.nio.ByteBuffer...&nbsp;buffer)</code></th>
<td class="colLast">
<div class="block">Flush data from the passed header/buffer to this endpoint.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="Connection.html" title="interface in org.eclipse.jetty.io">Connection</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getConnection()">getConnection</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="#getCreatedTimeStamp()">getCreatedTimeStamp</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="#getIdleTimeout()">getIdleTimeout</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the max idle time in ms.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>java.net.InetSocketAddress</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLocalAddress()">getLocalAddress</a></span>()</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">use <a href="#getLocalSocketAddress()"><code>getLocalSocketAddress()</code></a> instead</div>
</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>default java.net.SocketAddress</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLocalSocketAddress()">getLocalSocketAddress</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>java.net.InetSocketAddress</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRemoteAddress()">getRemoteAddress</a></span>()</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">use <a href="#getRemoteSocketAddress()"><code>getRemoteSocketAddress()</code></a> instead.</div>
</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>default java.net.SocketAddress</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRemoteSocketAddress()">getRemoteSocketAddress</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTransport()">getTransport</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isFillInterested()">isFillInterested</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isInputShutdown()">isInputShutdown</a></span>()</code></th>
<td class="colLast">
<div class="block">Test if the input is shutdown.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isOpen()">isOpen</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isOutputShutdown()">isOutputShutdown</a></span>()</code></th>
<td class="colLast">
<div class="block">Test if output is shutdown.</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="#onClose(java.lang.Throwable)">onClose</a></span>&#8203;(java.lang.Throwable&nbsp;cause)</code></th>
<td class="colLast">
<div class="block">Callback method invoked when this <a href="EndPoint.html" title="interface in org.eclipse.jetty.io"><code>EndPoint</code></a> is closed.</div>
</td>
</tr>
<tr id="i18" 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 EndPoint is opened.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setConnection(org.eclipse.jetty.io.Connection)">setConnection</a></span>&#8203;(<a href="Connection.html" title="interface in org.eclipse.jetty.io">Connection</a>&nbsp;connection)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setIdleTimeout(long)">setIdleTimeout</a></span>&#8203;(long&nbsp;idleTimeout)</code></th>
<td class="colLast">
<div class="block">Set the idle timeout.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#shutdownOutput()">shutdownOutput</a></span>()</code></th>
<td class="colLast">
<div class="block">Shutdown the output.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#tryFillInterested(org.eclipse.jetty.util.Callback)">tryFillInterested</a></span>&#8203;(<a href="../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a>&nbsp;callback)</code></th>
<td class="colLast">
<div class="block">Requests callback methods to be invoked when a call to <a href="#fill(java.nio.ByteBuffer)"><code>fill(ByteBuffer)</code></a> would return data or EOF.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#upgrade(org.eclipse.jetty.io.Connection)">upgrade</a></span>&#8203;(<a href="Connection.html" title="interface in org.eclipse.jetty.io">Connection</a>&nbsp;newConnection)</code></th>
<td class="colLast">
<div class="block">Upgrades this EndPoint from the current connection to the given new connection.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>default void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#write(org.eclipse.jetty.util.Callback,java.nio.ByteBuffer...)">write</a></span>&#8203;(<a href="../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a>&nbsp;callback,
java.nio.ByteBuffer...&nbsp;buffers)</code></th>
<td class="colLast">
<div class="block">Writes the given buffers via <a href="#flush(java.nio.ByteBuffer...)"><code>flush(ByteBuffer...)</code></a> and invokes callback methods when either
all the data has been flushed or an error occurs.</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="getLocalAddress()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocalAddress</h4>
<pre class="methodSignature">@Deprecated
java.net.InetSocketAddress&nbsp;getLocalAddress()</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">use <a href="#getLocalSocketAddress()"><code>getLocalSocketAddress()</code></a> instead</div>
</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The local InetSocketAddress to which this <code>EndPoint</code> is bound, or <code>null</code>
if this <code>EndPoint</code> is not bound to a Socket address.</dd>
</dl>
</li>
</ul>
<a id="getLocalSocketAddress()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocalSocketAddress</h4>
<pre class="methodSignature">default&nbsp;java.net.SocketAddress&nbsp;getLocalSocketAddress()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the local SocketAddress to which this <code>EndPoint</code> is bound or <code>null</code>
if this <code>EndPoint</code> is not bound to a Socket address.</dd>
</dl>
</li>
</ul>
<a id="getRemoteAddress()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRemoteAddress</h4>
<pre class="methodSignature">@Deprecated
java.net.InetSocketAddress&nbsp;getRemoteAddress()</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">use <a href="#getRemoteSocketAddress()"><code>getRemoteSocketAddress()</code></a> instead.</div>
</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The remote InetSocketAddress to which this <code>EndPoint</code> is connected, or <code>null</code>
if this <code>EndPoint</code> is not connected to a Socket address.</dd>
</dl>
</li>
</ul>
<a id="getRemoteSocketAddress()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRemoteSocketAddress</h4>
<pre class="methodSignature">default&nbsp;java.net.SocketAddress&nbsp;getRemoteSocketAddress()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The remote SocketAddress to which this <code>EndPoint</code> is connected, or <code>null</code>
if this <code>EndPoint</code> is not connected to a Socket address.</dd>
</dl>
</li>
</ul>
<a id="isOpen()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isOpen</h4>
<pre class="methodSignature">boolean&nbsp;isOpen()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether this EndPoint is open</dd>
</dl>
</li>
</ul>
<a id="getCreatedTimeStamp()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCreatedTimeStamp</h4>
<pre class="methodSignature">long&nbsp;getCreatedTimeStamp()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the epoch time in milliseconds when this EndPoint was created</dd>
</dl>
</li>
</ul>
<a id="shutdownOutput()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shutdownOutput</h4>
<pre class="methodSignature">void&nbsp;shutdownOutput()</pre>
<div class="block">Shutdown the output.
<p>This call indicates that no more data will be sent on this endpoint that
that the remote end should read an EOF once all previously sent data has been
consumed. Shutdown may be done either at the TCP/IP level, as a protocol exchange (Eg
TLS close handshake) or both.
<p>
If the endpoint has <a href="#isInputShutdown()"><code>isInputShutdown()</code></a> true, then this call has the same effect
as <a href="#close()"><code>close()</code></a>.</div>
</li>
</ul>
<a id="isOutputShutdown()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isOutputShutdown</h4>
<pre class="methodSignature">boolean&nbsp;isOutputShutdown()</pre>
<div class="block">Test if output is shutdown.
The output is shutdown by a call to <a href="#shutdownOutput()"><code>shutdownOutput()</code></a>
or <a href="#close()"><code>close()</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the output is shutdown or the endpoint is closed.</dd>
</dl>
</li>
</ul>
<a id="isInputShutdown()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isInputShutdown</h4>
<pre class="methodSignature">boolean&nbsp;isInputShutdown()</pre>
<div class="block">Test if the input is shutdown.
The input is shutdown if an EOF has been read while doing
a <a href="#fill(java.nio.ByteBuffer)"><code>fill(ByteBuffer)</code></a>. Once the input is shutdown, all calls to
<a href="#fill(java.nio.ByteBuffer)"><code>fill(ByteBuffer)</code></a> will return -1, until such time as the
end point is close, when they will return <a href="EofException.html" title="class in org.eclipse.jetty.io"><code>EofException</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>True if the input is shutdown or the endpoint is closed.</dd>
</dl>
</li>
</ul>
<a id="close()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre class="methodSignature">default&nbsp;void&nbsp;close()</pre>
<div class="block">Close any backing stream associated with the endpoint</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="close(java.lang.Throwable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre class="methodSignature">void&nbsp;close&#8203;(java.lang.Throwable&nbsp;cause)</pre>
<div class="block">Close any backing stream associated with the endpoint, passing a cause</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cause</code> - the reason for the close or null</dd>
</dl>
</li>
</ul>
<a id="fill(java.nio.ByteBuffer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fill</h4>
<pre class="methodSignature">default&nbsp;int&nbsp;fill&#8203;(java.nio.ByteBuffer&nbsp;buffer)
throws java.io.IOException</pre>
<div class="block">Fill the passed buffer with data from this endpoint. The bytes are appended to any
data already in the buffer by writing from the buffers limit up to it's capacity.
The limit is updated to include the filled bytes.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buffer</code> - The buffer to fill. The position and limit are modified during the fill. After the
operation, the position is unchanged and the limit is increased to reflect the new data filled.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an <code>int</code> value indicating the number of bytes
filled or -1 if EOF is read or the input is shutdown.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code> - if the endpoint is closed.</dd>
</dl>
</li>
</ul>
<a id="flush(java.nio.ByteBuffer...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flush</h4>
<pre class="methodSignature">default&nbsp;boolean&nbsp;flush&#8203;(java.nio.ByteBuffer...&nbsp;buffer)
throws java.io.IOException</pre>
<div class="block">Flush data from the passed header/buffer to this endpoint. As many bytes as can be consumed
are taken from the header/buffer position up until the buffer limit. The header/buffers position
is updated to indicate how many bytes have been consumed.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buffer</code> - the buffers to flush</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>True IFF all the buffers have been consumed and the endpoint has flushed the data to its
destination (ie is not buffering any data).</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code> - If the endpoint is closed or output is shutdown.</dd>
</dl>
</li>
</ul>
<a id="getTransport()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTransport</h4>
<pre class="methodSignature">java.lang.Object&nbsp;getTransport()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The underlying transport object (socket, channel, etc.)</dd>
</dl>
</li>
</ul>
<a id="getIdleTimeout()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIdleTimeout</h4>
<pre class="methodSignature">long&nbsp;getIdleTimeout()</pre>
<div class="block">Get the max idle time in ms.
<p>The max idle time is the time the endpoint can be idle before
extraordinary handling takes place.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the max idle time in ms or if ms &lt;= 0 implies an infinite timeout</dd>
</dl>
</li>
</ul>
<a id="setIdleTimeout(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIdleTimeout</h4>
<pre class="methodSignature">void&nbsp;setIdleTimeout&#8203;(long&nbsp;idleTimeout)</pre>
<div class="block">Set the idle timeout.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>idleTimeout</code> - the idle timeout in MS. Timeout &lt;= 0 implies an infinite timeout</dd>
</dl>
</li>
</ul>
<a id="fillInterested(org.eclipse.jetty.util.Callback)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fillInterested</h4>
<pre class="methodSignature">void&nbsp;fillInterested&#8203;(<a href="../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a>&nbsp;callback)
throws java.nio.channels.ReadPendingException</pre>
<div class="block"><p>Requests callback methods to be invoked when a call to <a href="#fill(java.nio.ByteBuffer)"><code>fill(ByteBuffer)</code></a> would return data or EOF.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>callback</code> - the callback to call when an error occurs or we are readable. The callback may implement the <a href="../util/thread/Invocable.html" title="interface in org.eclipse.jetty.util.thread"><code>Invocable</code></a> interface to
self declare its blocking status. Non-blocking callbacks may be called more efficiently without dispatch delays.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.nio.channels.ReadPendingException</code> - if another read operation is concurrent.</dd>
</dl>
</li>
</ul>
<a id="tryFillInterested(org.eclipse.jetty.util.Callback)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>tryFillInterested</h4>
<pre class="methodSignature">boolean&nbsp;tryFillInterested&#8203;(<a href="../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a>&nbsp;callback)</pre>
<div class="block"><p>Requests callback methods to be invoked when a call to <a href="#fill(java.nio.ByteBuffer)"><code>fill(ByteBuffer)</code></a> would return data or EOF.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>callback</code> - the callback to call when an error occurs or we are readable. The callback may implement the <a href="../util/thread/Invocable.html" title="interface in org.eclipse.jetty.util.thread"><code>Invocable</code></a> interface to
self declare its blocking status. Non-blocking callbacks may be called more efficiently without dispatch delays.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if set</dd>
</dl>
</li>
</ul>
<a id="isFillInterested()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isFillInterested</h4>
<pre class="methodSignature">boolean&nbsp;isFillInterested()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether <a href="#fillInterested(org.eclipse.jetty.util.Callback)"><code>fillInterested(Callback)</code></a> has been called, but <a href="#fill(java.nio.ByteBuffer)"><code>fill(ByteBuffer)</code></a> has not yet
been called</dd>
</dl>
</li>
</ul>
<a id="write(org.eclipse.jetty.util.Callback,java.nio.ByteBuffer...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre class="methodSignature">default&nbsp;void&nbsp;write&#8203;(<a href="../util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a>&nbsp;callback,
java.nio.ByteBuffer...&nbsp;buffers)
throws java.nio.channels.WritePendingException</pre>
<div class="block"><p>Writes the given buffers via <a href="#flush(java.nio.ByteBuffer...)"><code>flush(ByteBuffer...)</code></a> and invokes callback methods when either
all the data has been flushed or an error occurs.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>callback</code> - the callback to call when an error occurs or the write completed. The callback may implement the <a href="../util/thread/Invocable.html" title="interface in org.eclipse.jetty.util.thread"><code>Invocable</code></a> interface to
self declare its blocking status. Non-blocking callbacks may be called more efficiently without dispatch delays.</dd>
<dd><code>buffers</code> - one or more <code>ByteBuffer</code>s that will be flushed.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.nio.channels.WritePendingException</code> - if another write operation is concurrent.</dd>
</dl>
</li>
</ul>
<a id="getConnection()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConnection</h4>
<pre class="methodSignature"><a href="Connection.html" title="interface in org.eclipse.jetty.io">Connection</a>&nbsp;getConnection()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <a href="Connection.html" title="interface in org.eclipse.jetty.io"><code>Connection</code></a> associated with this EndPoint</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#setConnection(org.eclipse.jetty.io.Connection)"><code>setConnection(Connection)</code></a></dd>
</dl>
</li>
</ul>
<a id="setConnection(org.eclipse.jetty.io.Connection)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setConnection</h4>
<pre class="methodSignature">void&nbsp;setConnection&#8203;(<a href="Connection.html" title="interface in org.eclipse.jetty.io">Connection</a>&nbsp;connection)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>connection</code> - the <a href="Connection.html" title="interface in org.eclipse.jetty.io"><code>Connection</code></a> associated with this EndPoint</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#getConnection()"><code>getConnection()</code></a>,
<a href="#upgrade(org.eclipse.jetty.io.Connection)"><code>upgrade(Connection)</code></a></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 EndPoint is opened.</p></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#onClose(java.lang.Throwable)"><code>onClose(Throwable)</code></a></dd>
</dl>
</li>
</ul>
<a id="onClose(java.lang.Throwable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onClose</h4>
<pre class="methodSignature">void&nbsp;onClose&#8203;(java.lang.Throwable&nbsp;cause)</pre>
<div class="block"><p>Callback method invoked when this <a href="EndPoint.html" title="interface in org.eclipse.jetty.io"><code>EndPoint</code></a> is closed.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cause</code> - The reason for the close, or null if a normal close.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#onOpen()"><code>onOpen()</code></a></dd>
</dl>
</li>
</ul>
<a id="upgrade(org.eclipse.jetty.io.Connection)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>upgrade</h4>
<pre class="methodSignature">void&nbsp;upgrade&#8203;(<a href="Connection.html" title="interface in org.eclipse.jetty.io">Connection</a>&nbsp;newConnection)</pre>
<div class="block"><p>Upgrades this EndPoint from the current connection to the given new connection.</p>
<p>Closes the current connection, links this EndPoint to the new connection and
then opens the new connection.</p>
<p>If the current connection is an instance of <a href="Connection.UpgradeFrom.html" title="interface in org.eclipse.jetty.io"><code>Connection.UpgradeFrom</code></a> then
a buffer of unconsumed bytes is requested.
If the buffer of unconsumed bytes is non-null and non-empty, then the new
connection is tested: if it is an instance of <a href="Connection.UpgradeTo.html" title="interface in org.eclipse.jetty.io"><code>Connection.UpgradeTo</code></a>, then
the unconsumed buffer is passed to the new connection; otherwise, an exception
is thrown since there are unconsumed bytes that cannot be consumed by the new
connection.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>newConnection</code> - the connection to upgrade to</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/EndPoint.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;2022 <a href="https://webtide.com">Webtide</a>. All rights reserved.</small></p>
</footer>
</body>
</html>