blob: 0f8a7448b813a3f54dc8b8a0938654982ac3f11c [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>Graceful (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="Graceful (Eclipse Jetty API Doc - v10.0.5)";
}
}
catch(err) {
}
//-->
var data = {"i0":6,"i1":6,"i2":1,"i3":1};
var tabs = {65535:["t0","All Methods"],1:["t1","Static 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/Graceful.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.util.component</a></div>
<h2 title="Interface Graceful" class="title">Interface Graceful</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/Connector.html" title="interface in org.eclipse.jetty.server">Connector</a></code>, <code><a href="../../server/NetworkConnector.html" title="interface in org.eclipse.jetty.server">NetworkConnector</a></code></dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="../../server/AbstractConnector.html" title="class in org.eclipse.jetty.server">AbstractConnector</a></code>, <code><a href="../../http2/server/AbstractHTTP2ServerConnectionFactory.HTTP2SessionContainer.html" title="class in org.eclipse.jetty.http2.server">AbstractHTTP2ServerConnectionFactory.HTTP2SessionContainer</a></code>, <code><a href="../../server/AbstractNetworkConnector.html" title="class in org.eclipse.jetty.server">AbstractNetworkConnector</a></code>, <code><a href="../../ant/AntWebAppContext.html" title="class in org.eclipse.jetty.ant">AntWebAppContext</a></code>, <code><a href="../../server/handler/ContextHandler.html" title="class in org.eclipse.jetty.server.handler">ContextHandler</a></code>, <code><a href="Graceful.Shutdown.html" title="class in org.eclipse.jetty.util.component">Graceful.Shutdown</a></code>, <code><a href="../../http/spi/HttpSpiContextHandler.html" title="class in org.eclipse.jetty.http.spi">HttpSpiContextHandler</a></code>, <code><a href="../../server/LocalConnector.html" title="class in org.eclipse.jetty.server">LocalConnector</a></code>, <code><a href="../../maven/plugin/MavenServerConnector.html" title="class in org.eclipse.jetty.maven.plugin">MavenServerConnector</a></code>, <code><a href="../../maven/plugin/MavenWebAppContext.html" title="class in org.eclipse.jetty.maven.plugin">MavenWebAppContext</a></code>, <code><a href="../../server/handler/MovedContextHandler.html" title="class in org.eclipse.jetty.server.handler">MovedContextHandler</a></code>, <code><a href="../../server/NetworkTrafficServerConnector.html" title="class in org.eclipse.jetty.server">NetworkTrafficServerConnector</a></code>, <code><a href="../../server/ServerConnector.html" title="class in org.eclipse.jetty.server">ServerConnector</a></code>, <code><a href="../../servlet/ServletContextHandler.html" title="class in org.eclipse.jetty.servlet">ServletContextHandler</a></code>, <code><a href="../../websocket/common/SessionTracker.html" title="class in org.eclipse.jetty.websocket.common">SessionTracker</a></code>, <code><a href="../../websocket/javax/common/SessionTracker.html" title="class in org.eclipse.jetty.websocket.javax.common">SessionTracker</a></code>, <code><a href="../../server/handler/StatisticsHandler.html" title="class in org.eclipse.jetty.server.handler">StatisticsHandler</a></code>, <code><a href="../../unixsocket/server/UnixSocketConnector.html" title="class in org.eclipse.jetty.unixsocket.server">UnixSocketConnector</a></code>, <code><a href="../../webapp/WebAppContext.html" title="class in org.eclipse.jetty.webapp">WebAppContext</a></code></dd>
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">Graceful</span></pre>
<div class="block"><p>Jetty components that wish to be part of a Graceful shutdown implement this interface so that
the <a href="#shutdown()"><code>shutdown()</code></a> method will be called to initiate a shutdown. Shutdown operations
can fall into the following categories:</p>
<ul>
<li>Preventing new load from being accepted (eg connectors stop accepting connections)</li>
<li>Preventing existing load expanding (eg stopping existing connections accepting new requests)</li>
<li>Waiting for existing load to complete (eg waiting for active request count to reduce to 0)</li>
<li>Performing cleanup operations that may take time (eg closing an SSL connection)</li>
</ul>
<p>The <code>CompletableFuture</code> returned by the the shutdown call will be completed to indicate the
shutdown operation is completed.
Some shutdown operations may be instantaneous and always return a completed future.
</p><p>
Graceful shutdown is typically orchestrated by the doStop methods of Server or ContextHandler (for a full or partial
shutdown respectively).
</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 class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Graceful.Shutdown.html" title="class in org.eclipse.jetty.util.component">Graceful.Shutdown</a></span></code></th>
<td class="colLast">
<div class="block">A utility class to assist implementing the Graceful interface.</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="Graceful.ThrowingRunnable.html" title="interface in org.eclipse.jetty.util.component">Graceful.ThrowingRunnable</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="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></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>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isShutdown()">isShutdown</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>java.util.concurrent.CompletableFuture&lt;java.lang.Void&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#shutdown()">shutdown</a></span>()</code></th>
<td class="colLast">
<div class="block">Shutdown the component.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static java.util.concurrent.CompletableFuture&lt;java.lang.Void&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#shutdown(org.eclipse.jetty.util.component.Container)">shutdown</a></span>&#8203;(<a href="Container.html" title="interface in org.eclipse.jetty.util.component">Container</a>&nbsp;component)</code></th>
<td class="colLast">
<div class="block">Utility method to shutdown all Gracefuls within a container.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static java.util.concurrent.CompletableFuture&lt;java.lang.Void&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#shutdown(org.eclipse.jetty.util.component.Graceful.ThrowingRunnable)">shutdown</a></span>&#8203;(<a href="Graceful.ThrowingRunnable.html" title="interface in org.eclipse.jetty.util.component">Graceful.ThrowingRunnable</a>&nbsp;runnable)</code></th>
<td class="colLast">
<div class="block">Utility method to execute a <a href="Graceful.ThrowingRunnable.html" title="interface in org.eclipse.jetty.util.component"><code>Graceful.ThrowingRunnable</code></a> in a new daemon thread and
be notified of the result in a <code>CompletableFuture</code>.</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="shutdown()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shutdown</h4>
<pre class="methodSignature">java.util.concurrent.CompletableFuture&lt;java.lang.Void&gt;&nbsp;shutdown()</pre>
<div class="block">Shutdown the component. When this method returns, the component should not accept any new load.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A future that is completed once all load on the component is completed</dd>
</dl>
</li>
</ul>
<a id="isShutdown()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isShutdown</h4>
<pre class="methodSignature">boolean&nbsp;isShutdown()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>True if <a href="#shutdown()"><code>shutdown()</code></a> has been called.</dd>
</dl>
</li>
</ul>
<a id="shutdown(org.eclipse.jetty.util.component.Container)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shutdown</h4>
<pre class="methodSignature">static&nbsp;java.util.concurrent.CompletableFuture&lt;java.lang.Void&gt;&nbsp;shutdown&#8203;(<a href="Container.html" title="interface in org.eclipse.jetty.util.component">Container</a>&nbsp;component)</pre>
<div class="block">Utility method to shutdown all Gracefuls within a container.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>component</code> - The container in which to look for <a href="Graceful.html" title="interface in org.eclipse.jetty.util.component"><code>Graceful</code></a>s</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A <code>CompletableFuture</code> that is complete once all returns from <a href="#shutdown()"><code>shutdown()</code></a>
of the contained <a href="Graceful.html" title="interface in org.eclipse.jetty.util.component"><code>Graceful</code></a>s are complete.</dd>
</dl>
</li>
</ul>
<a id="shutdown(org.eclipse.jetty.util.component.Graceful.ThrowingRunnable)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>shutdown</h4>
<pre class="methodSignature">static&nbsp;java.util.concurrent.CompletableFuture&lt;java.lang.Void&gt;&nbsp;shutdown&#8203;(<a href="Graceful.ThrowingRunnable.html" title="interface in org.eclipse.jetty.util.component">Graceful.ThrowingRunnable</a>&nbsp;runnable)</pre>
<div class="block">Utility method to execute a <a href="Graceful.ThrowingRunnable.html" title="interface in org.eclipse.jetty.util.component"><code>Graceful.ThrowingRunnable</code></a> in a new daemon thread and
be notified of the result in a <code>CompletableFuture</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>runnable</code> - the ThrowingRunnable to run.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the CompletableFuture to be notified when the runnable either completes or fails.</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/Graceful.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;2021 <a href="https://webtide.com">Webtide</a>. All rights reserved.</small></p>
</footer>
</body>
</html>