| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (17) on Thu Sep 15 14:12:07 CDT 2022 --> |
| <title>Graceful (Eclipse Jetty API Doc - v10.0.12)</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="dc.created" content="2022-09-15"> |
| <meta name="description" content="declaration: package: org.eclipse.jetty.util.component, interface: Graceful"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../script-dir/jquery-ui.min.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../jquery-ui.overrides.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../script-dir/jquery-3.5.1.min.js"></script> |
| <script type="text/javascript" src="../../../../../script-dir/jquery-ui.min.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">var evenRowColor = "even-row-color"; |
| var oddRowColor = "odd-row-color"; |
| var tableTab = "table-tab"; |
| var activeTableTab = "active-table-tab"; |
| var pathtoroot = "../../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flex-box"> |
| <header role="banner" class="flex-header"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="top-nav" id="navbar-top"> |
| <div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div> |
| <ul id="navbar-top-firstrow" class="nav-list" title="Navigation"> |
| <li><a href="../../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">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#class">Help</a></li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div> |
| <ul class="sub-nav-list"> |
| <li>Summary: </li> |
| <li><a href="#nested-class-summary">Nested</a> | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </div> |
| <div class="nav-list-search"><label for="search-input">SEARCH:</label> |
| <input type="text" id="search-input" value="search" disabled="disabled"> |
| <input type="reset" id="reset-button" value="reset" disabled="disabled"> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <span class="skip-nav" id="skip-navbar-top"></span></nav> |
| </header> |
| <div class="flex-content"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.eclipse.jetty.util.component</a></div> |
| <h1 title="Interface Graceful" class="title">Interface Graceful</h1> |
| </div> |
| <section class="class-description" id="class-description"> |
| <dl class="notes"> |
| <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 class="notes"> |
| <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="../../http3/server/HTTP3ServerConnector.html" title="class in org.eclipse.jetty.http3.server">HTTP3ServerConnector</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="../../quic/server/QuicServerConnector.html" title="class in org.eclipse.jetty.quic.server">QuicServerConnector</a></code>, <code><a href="../../quic/common/QuicSessionContainer.html" title="class in org.eclipse.jetty.quic.common">QuicSessionContainer</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> |
| <div class="type-signature"><span class="modifiers">public interface </span><span class="element-name type-name-label">Graceful</span></div> |
| <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 <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/CompletableFuture.html" title="class or interface in java.util.concurrent" class="external-link"><code>CompletableFuture</code></a> 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> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <li> |
| <section class="nested-class-summary" id="nested-class-summary"> |
| <h2>Nested Class Summary</h2> |
| <div class="caption"><span>Nested Classes</span></div> |
| <div class="summary-table three-column-summary"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Interface</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color"><code>static class </code></div> |
| <div class="col-second even-row-color"><code><a href="Graceful.Shutdown.html" class="type-name-link" title="class in org.eclipse.jetty.util.component">Graceful.Shutdown</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">A utility class to assist implementing the Graceful interface.</div> |
| </div> |
| <div class="col-first odd-row-color"><code>static interface </code></div> |
| <div class="col-second odd-row-color"><code><a href="Graceful.ThrowingRunnable.html" class="type-name-link" title="interface in org.eclipse.jetty.util.component">Graceful.ThrowingRunnable</a></code></div> |
| <div class="col-last odd-row-color"> </div> |
| </div> |
| </section> |
| </li> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li> |
| <section class="method-summary" id="method-summary"> |
| <h2>Method Summary</h2> |
| <div id="method-summary-table"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel"> |
| <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Method</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#isShutdown()" class="member-name-link">isShutdown</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/CompletableFuture.html" title="class or interface in java.util.concurrent" class="external-link">CompletableFuture</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#shutdown()" class="member-name-link">shutdown</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Shutdown the component.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1"><code>static <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/CompletableFuture.html" title="class or interface in java.util.concurrent" class="external-link">CompletableFuture</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1"><code><a href="#shutdown(org.eclipse.jetty.util.component.Container)" class="member-name-link">shutdown</a><wbr>(<a href="Container.html" title="interface in org.eclipse.jetty.util.component">Container</a> component)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1"> |
| <div class="block">Utility method to shutdown all Gracefuls within a container.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1"><code>static <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/CompletableFuture.html" title="class or interface in java.util.concurrent" class="external-link">CompletableFuture</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1"><code><a href="#shutdown(org.eclipse.jetty.util.component.Graceful.ThrowingRunnable)" class="member-name-link">shutdown</a><wbr>(<a href="Graceful.ThrowingRunnable.html" title="interface in org.eclipse.jetty.util.component">Graceful.ThrowingRunnable</a> runnable)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1"> |
| <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 <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/CompletableFuture.html" title="class or interface in java.util.concurrent" class="external-link"><code>CompletableFuture</code></a>.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="shutdown()"> |
| <h3>shutdown</h3> |
| <div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/CompletableFuture.html" title="class or interface in java.util.concurrent" class="external-link">CompletableFuture</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>></span> <span class="element-name">shutdown</span>()</div> |
| <div class="block">Shutdown the component. When this method returns, the component should not accept any new load.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>A future that is completed once all load on the component is completed</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isShutdown()"> |
| <h3>isShutdown</h3> |
| <div class="member-signature"><span class="return-type">boolean</span> <span class="element-name">isShutdown</span>()</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>True if <a href="#shutdown()"><code>shutdown()</code></a> has been called.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="shutdown(org.eclipse.jetty.util.component.Container)"> |
| <h3>shutdown</h3> |
| <div class="member-signature"><span class="modifiers">static</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/CompletableFuture.html" title="class or interface in java.util.concurrent" class="external-link">CompletableFuture</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>></span> <span class="element-name">shutdown</span><wbr><span class="parameters">(<a href="Container.html" title="interface in org.eclipse.jetty.util.component">Container</a> component)</span></div> |
| <div class="block">Utility method to shutdown all Gracefuls within a container.</div> |
| <dl class="notes"> |
| <dt>Parameters:</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>Returns:</dt> |
| <dd>A <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/CompletableFuture.html" title="class or interface in java.util.concurrent" class="external-link"><code>CompletableFuture</code></a> 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> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="shutdown(org.eclipse.jetty.util.component.Graceful.ThrowingRunnable)"> |
| <h3>shutdown</h3> |
| <div class="member-signature"><span class="modifiers">static</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/CompletableFuture.html" title="class or interface in java.util.concurrent" class="external-link">CompletableFuture</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>></span> <span class="element-name">shutdown</span><wbr><span class="parameters">(<a href="Graceful.ThrowingRunnable.html" title="interface in org.eclipse.jetty.util.component">Graceful.ThrowingRunnable</a> runnable)</span></div> |
| <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 <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/CompletableFuture.html" title="class or interface in java.util.concurrent" class="external-link"><code>CompletableFuture</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>runnable</code> - the ThrowingRunnable to run.</dd> |
| <dt>Returns:</dt> |
| <dd>the CompletableFuture to be notified when the runnable either completes or fails.</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| <footer role="contentinfo"> |
| <hr> |
| <p class="legal-copy"><small>Copyright © 1995–2022 <a href="https://webtide.com">Webtide</a>. All rights reserved.</small></p> |
| </footer> |
| </div> |
| </div> |
| </body> |
| </html> |