blob: ccddc95f57022fedfb533baa437a1b64acf9509c [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Thu Sep 15 14:12:07 CDT 2022 -->
<title>Handler (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.server, interface: Handler">
<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/Handler.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:&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="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</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>&nbsp;<a href="package-summary.html">org.eclipse.jetty.server</a></div>
<h1 title="Interface Handler" class="title">Interface Handler</h1>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Superinterfaces:</dt>
<dd><code><a href="../util/component/Destroyable.html" title="interface in org.eclipse.jetty.util.component">Destroyable</a></code>, <code><a href="../util/component/LifeCycle.html" title="interface in org.eclipse.jetty.util.component">LifeCycle</a></code></dd>
</dl>
<dl class="notes">
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="handler/AbstractHandler.html" title="class in org.eclipse.jetty.server.handler">AbstractHandler</a></code>, <code><a href="handler/AbstractHandler.ErrorDispatchHandler.html" title="class in org.eclipse.jetty.server.handler">AbstractHandler.ErrorDispatchHandler</a></code>, <code><a href="handler/AbstractHandlerContainer.html" title="class in org.eclipse.jetty.server.handler">AbstractHandlerContainer</a></code>, <code><a href="../ant/AntWebAppContext.html" title="class in org.eclipse.jetty.ant">AntWebAppContext</a></code>, <code><a href="../ant/AntWebAppContext.AntServletHandler.html" title="class in org.eclipse.jetty.ant">AntWebAppContext.AntServletHandler</a></code>, <code><a href="handler/AsyncDelayHandler.html" title="class in org.eclipse.jetty.server.handler">AsyncDelayHandler</a></code>, <code><a href="handler/BufferedResponseHandler.html" title="class in org.eclipse.jetty.server.handler">BufferedResponseHandler</a></code>, <code><a href="../proxy/ConnectHandler.html" title="class in org.eclipse.jetty.proxy">ConnectHandler</a></code>, <code><a href="../security/ConstraintSecurityHandler.html" title="class in org.eclipse.jetty.security">ConstraintSecurityHandler</a></code>, <code><a href="handler/ContextHandler.html" title="class in org.eclipse.jetty.server.handler">ContextHandler</a></code>, <code><a href="handler/ContextHandlerCollection.html" title="class in org.eclipse.jetty.server.handler">ContextHandlerCollection</a></code>, <code><a href="handler/DebugHandler.html" title="class in org.eclipse.jetty.server.handler">DebugHandler</a></code>, <code><a href="handler/DefaultHandler.html" title="class in org.eclipse.jetty.server.handler">DefaultHandler</a></code>, <code><a href="handler/ErrorHandler.html" title="class in org.eclipse.jetty.server.handler">ErrorHandler</a></code>, <code><a href="../servlet/ErrorPageErrorHandler.html" title="class in org.eclipse.jetty.servlet">ErrorPageErrorHandler</a></code>, <code><a href="handler/FileBufferedResponseHandler.html" title="class in org.eclipse.jetty.server.handler">FileBufferedResponseHandler</a></code>, <code><a href="handler/gzip/GzipHandler.html" title="class in org.eclipse.jetty.server.handler.gzip">GzipHandler</a></code>, <code><a href="handler/HandlerCollection.html" title="class in org.eclipse.jetty.server.handler">HandlerCollection</a></code>, <code><a href="handler/HandlerList.html" title="class in org.eclipse.jetty.server.handler">HandlerList</a></code>, <code><a href="handler/HandlerWrapper.html" title="class in org.eclipse.jetty.server.handler">HandlerWrapper</a></code>, <code><a href="handler/HotSwapHandler.html" title="class in org.eclipse.jetty.server.handler">HotSwapHandler</a></code>, <code><a href="../http/spi/HttpSpiContextHandler.html" title="class in org.eclipse.jetty.http.spi">HttpSpiContextHandler</a></code>, <code><a href="handler/IdleTimeoutHandler.html" title="class in org.eclipse.jetty.server.handler">IdleTimeoutHandler</a></code>, <code><a href="handler/InetAccessHandler.html" title="class in org.eclipse.jetty.server.handler">InetAccessHandler</a></code>, <code><a href="../maven/plugin/MavenWebAppContext.html" title="class in org.eclipse.jetty.maven.plugin">MavenWebAppContext</a></code>, <code><a href="handler/MovedContextHandler.html" title="class in org.eclipse.jetty.server.handler">MovedContextHandler</a></code>, <code><a href="handler/RequestLogHandler.html" title="class in org.eclipse.jetty.server.handler">RequestLogHandler</a></code>, <code><a href="handler/ResourceHandler.html" title="class in org.eclipse.jetty.server.handler">ResourceHandler</a></code>, <code><a href="../rewrite/handler/RewriteHandler.html" title="class in org.eclipse.jetty.rewrite.handler">RewriteHandler</a></code>, <code><a href="handler/ScopedHandler.html" title="class in org.eclipse.jetty.server.handler">ScopedHandler</a></code>, <code><a href="handler/SecuredRedirectHandler.html" title="class in org.eclipse.jetty.server.handler">SecuredRedirectHandler</a></code>, <code><a href="../security/SecurityHandler.html" title="class in org.eclipse.jetty.security">SecurityHandler</a></code>, <code><a href="Server.html" title="class in org.eclipse.jetty.server">Server</a></code>, <code><a href="../servlet/ServletContextHandler.html" title="class in org.eclipse.jetty.servlet">ServletContextHandler</a></code>, <code><a href="../servlet/ServletHandler.html" title="class in org.eclipse.jetty.servlet">ServletHandler</a></code>, <code><a href="session/SessionHandler.html" title="class in org.eclipse.jetty.server.session">SessionHandler</a></code>, <code><a href="handler/ShutdownHandler.html" title="class in org.eclipse.jetty.server.handler">ShutdownHandler</a></code>, <code><a href="handler/StatisticsHandler.html" title="class in org.eclipse.jetty.server.handler">StatisticsHandler</a></code>, <code><a href="handler/ThreadLimitHandler.html" title="class in org.eclipse.jetty.server.handler">ThreadLimitHandler</a></code>, <code><a href="../webapp/WebAppContext.html" title="class in org.eclipse.jetty.webapp">WebAppContext</a></code>, <code><a href="../websocket/core/server/WebSocketUpgradeHandler.html" title="class in org.eclipse.jetty.websocket.core.server">WebSocketUpgradeHandler</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="annotations"><a href="../util/annotation/ManagedObject.html" title="annotation in org.eclipse.jetty.util.annotation">@ManagedObject</a>("Jetty Handler")
</span><span class="modifiers">public interface </span><span class="element-name type-name-label">Handler</span><span class="extends-implements">
extends <a href="../util/component/LifeCycle.html" title="interface in org.eclipse.jetty.util.component">LifeCycle</a>, <a href="../util/component/Destroyable.html" title="interface in org.eclipse.jetty.util.component">Destroyable</a></span></div>
<div class="block">A Jetty Server Handler.
<p>
A Handler instance is required by a <a href="Server.html" title="class in org.eclipse.jetty.server"><code>Server</code></a> to handle incoming
HTTP requests.
<p>
A Handler may:
<ul>
<li>Completely generate the HTTP Response</li>
<li>Examine/modify the request and call another Handler (see <a href="handler/HandlerWrapper.html" title="class in org.eclipse.jetty.server.handler"><code>HandlerWrapper</code></a>).
<li>Pass the request to one or more other Handlers (see <a href="handler/HandlerCollection.html" title="class in org.eclipse.jetty.server.handler"><code>HandlerCollection</code></a>).
</ul>
Handlers are passed the servlet API request and response object, but are
not Servlets. The servlet container is implemented by handlers for
context, security, session and servlet that modify the request object
before passing it to the next stage of handling.</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="inherited-list">
<h2 id="nested-classes-inherited-from-class-org.eclipse.jetty.util.component.LifeCycle">Nested classes/interfaces inherited from interface&nbsp;org.eclipse.jetty.util.component.<a href="../util/component/LifeCycle.html" title="interface in org.eclipse.jetty.util.component">LifeCycle</a></h2>
<code><a href="../util/component/LifeCycle.Listener.html" title="interface in org.eclipse.jetty.util.component">LifeCycle.Listener</a></code></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-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>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#destroy()" class="member-name-link">destroy</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="Server.html" title="class in org.eclipse.jetty.server">Server</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getServer()" class="member-name-link">getServer</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#handle(java.lang.String,org.eclipse.jetty.server.Request,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)" class="member-name-link">handle</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;target,
<a href="Request.html" title="class in org.eclipse.jetty.server">Request</a>&nbsp;baseRequest,
javax.servlet.http.HttpServletRequest&nbsp;request,
javax.servlet.http.HttpServletResponse&nbsp;response)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Handle a request.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#setServer(org.eclipse.jetty.server.Server)" class="member-name-link">setServer</a><wbr>(<a href="Server.html" title="class in org.eclipse.jetty.server">Server</a>&nbsp;server)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">&nbsp;</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-org.eclipse.jetty.util.component.LifeCycle">Methods inherited from interface&nbsp;org.eclipse.jetty.util.component.<a href="../util/component/LifeCycle.html" title="interface in org.eclipse.jetty.util.component">LifeCycle</a></h3>
<code><a href="../util/component/LifeCycle.html#addEventListener(java.util.EventListener)">addEventListener</a>, <a href="../util/component/LifeCycle.html#isFailed()">isFailed</a>, <a href="../util/component/LifeCycle.html#isRunning()">isRunning</a>, <a href="../util/component/LifeCycle.html#isStarted()">isStarted</a>, <a href="../util/component/LifeCycle.html#isStarting()">isStarting</a>, <a href="../util/component/LifeCycle.html#isStopped()">isStopped</a>, <a href="../util/component/LifeCycle.html#isStopping()">isStopping</a>, <a href="../util/component/LifeCycle.html#removeEventListener(java.util.EventListener)">removeEventListener</a>, <a href="../util/component/LifeCycle.html#start()">start</a>, <a href="../util/component/LifeCycle.html#stop()">stop</a></code></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="handle(java.lang.String,org.eclipse.jetty.server.Request,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)">
<h3>handle</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">handle</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;target,
<a href="Request.html" title="class in org.eclipse.jetty.server">Request</a>&nbsp;baseRequest,
javax.servlet.http.HttpServletRequest&nbsp;request,
javax.servlet.http.HttpServletResponse&nbsp;response)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a>,
javax.servlet.ServletException</span></div>
<div class="block">Handle a request.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>target</code> - The target of the request - either a URI or a name.</dd>
<dd><code>baseRequest</code> - The original unwrapped request object.</dd>
<dd><code>request</code> - The request either as the <a href="Request.html" title="class in org.eclipse.jetty.server"><code>Request</code></a> object or a wrapper of that request. The
<code><a href="HttpConnection.html#getCurrentConnection()"><code>HttpConnection.getCurrentConnection()</code></a>.<a href="HttpConnection.html#getHttpChannel()"><code>getHttpChannel()</code></a>.<a href="HttpChannel.html#getRequest()"><code>getRequest()</code></a></code>
method can be used access the Request object if required.</dd>
<dd><code>response</code> - The response as the <a href="Response.html" title="class in org.eclipse.jetty.server"><code>Response</code></a> object or a wrapper of that request. The
<code><a href="HttpConnection.html#getCurrentConnection()"><code>HttpConnection.getCurrentConnection()</code></a>.<a href="HttpConnection.html#getHttpChannel()"><code>getHttpChannel()</code></a>.<a href="HttpChannel.html#getResponse()"><code>getResponse()</code></a></code>
method can be used access the Response object if required.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - if unable to handle the request or response processing</dd>
<dd><code>javax.servlet.ServletException</code> - if unable to handle the request or response due to underlying servlet issue</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setServer(org.eclipse.jetty.server.Server)">
<h3>setServer</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setServer</span><wbr><span class="parameters">(<a href="Server.html" title="class in org.eclipse.jetty.server">Server</a>&nbsp;server)</span></div>
</section>
</li>
<li>
<section class="detail" id="getServer()">
<h3>getServer</h3>
<div class="member-signature"><span class="annotations"><a href="../util/annotation/ManagedAttribute.html" title="annotation in org.eclipse.jetty.util.annotation">@ManagedAttribute</a>(<a href="../util/annotation/ManagedAttribute.html#value()">value</a>="the jetty server for this handler",
<a href="../util/annotation/ManagedAttribute.html#readonly()">readonly</a>=true)
</span><span class="return-type"><a href="Server.html" title="class in org.eclipse.jetty.server">Server</a></span>&nbsp;<span class="element-name">getServer</span>()</div>
</section>
</li>
<li>
<section class="detail" id="destroy()">
<h3>destroy</h3>
<div class="member-signature"><span class="annotations"><a href="../util/annotation/ManagedOperation.html" title="annotation in org.eclipse.jetty.util.annotation">@ManagedOperation</a>(<a href="../util/annotation/ManagedOperation.html#value()">value</a>="destroy associated resources",
<a href="../util/annotation/ManagedOperation.html#impact()">impact</a>="ACTION")
</span><span class="return-type">void</span>&nbsp;<span class="element-name">destroy</span>()</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../util/component/Destroyable.html#destroy()">destroy</a></code>&nbsp;in interface&nbsp;<code><a href="../util/component/Destroyable.html" title="interface in org.eclipse.jetty.util.component">Destroyable</a></code></dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &#169; 1995&#x2013;2022 <a href="https://webtide.com">Webtide</a>. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>