blob: d983aefbfc14db6db90742c2525415d5f441d0d3 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>ContainerRequestContext</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ContainerRequestContext";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"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":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</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">
<li><a href="../../../../jakarta/ws/rs/container/ConnectionCallback.html" title="interface in jakarta.ws.rs.container"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../jakarta/ws/rs/container/ContainerRequestFilter.html" title="interface in jakarta.ws.rs.container"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?jakarta/ws/rs/container/ContainerRequestContext.html" target="_top">Frames</a></li>
<li><a href="ContainerRequestContext.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></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>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&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 name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">jakarta.ws.rs.container</div>
<h2 title="Interface ContainerRequestContext" class="title">Interface ContainerRequestContext</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public interface <span class="typeNameLabel">ContainerRequestContext</span></pre>
<div class="block">Container request filter context.
A mutable class that provides request-specific information for the filter, such as request URI, message headers,
message entity or request-scoped properties. The exposed setters allow modification of the exposed request-specific
information.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.0</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#abortWith-jakarta.ws.rs.core.Response-">abortWith</a></span>(<a href="../../../../jakarta/ws/rs/core/Response.html" title="class in jakarta.ws.rs.core">Response</a>&nbsp;response)</code>
<div class="block">Abort the filter chain with a response.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>java.util.List&lt;java.util.Locale&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getAcceptableLanguages--">getAcceptableLanguages</a></span>()</code>
<div class="block">Get a list of languages that are acceptable for the response.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>java.util.List&lt;<a href="../../../../jakarta/ws/rs/core/MediaType.html" title="class in jakarta.ws.rs.core">MediaType</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getAcceptableMediaTypes--">getAcceptableMediaTypes</a></span>()</code>
<div class="block">Get a list of media types that are acceptable for the response.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>java.util.Map&lt;java.lang.String,<a href="../../../../jakarta/ws/rs/core/Cookie.html" title="class in jakarta.ws.rs.core">Cookie</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getCookies--">getCookies</a></span>()</code>
<div class="block">Get any cookies that accompanied the request.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>java.util.Date</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getDate--">getDate</a></span>()</code>
<div class="block">Get message date.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>java.io.InputStream</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getEntityStream--">getEntityStream</a></span>()</code>
<div class="block">Get the entity input stream.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/MultivaluedMap.html" title="interface in jakarta.ws.rs.core">MultivaluedMap</a>&lt;java.lang.String,java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getHeaders--">getHeaders</a></span>()</code>
<div class="block">Get the mutable request headers multivalued map.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getHeaderString-java.lang.String-">getHeaderString</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Get a message header as a single string value.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>java.util.Locale</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getLanguage--">getLanguage</a></span>()</code>
<div class="block">Get the language of the entity.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getLength--">getLength</a></span>()</code>
<div class="block">Get Content-Length value.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/MediaType.html" title="class in jakarta.ws.rs.core">MediaType</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getMediaType--">getMediaType</a></span>()</code>
<div class="block">Get the media type of the entity.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getMethod--">getMethod</a></span>()</code>
<div class="block">Get the request method.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getProperty-java.lang.String-">getProperty</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Returns the property with the given name registered in the current request/response exchange context, or <code>null</code>
if there is no property by that name.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>java.util.Collection&lt;java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getPropertyNames--">getPropertyNames</a></span>()</code>
<div class="block">Returns an immutable <code>collection</code> containing the property names available within the
context of the current request/response exchange context.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/Request.html" title="interface in jakarta.ws.rs.core">Request</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getRequest--">getRequest</a></span>()</code>
<div class="block">Get the injectable request information.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/SecurityContext.html" title="interface in jakarta.ws.rs.core">SecurityContext</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getSecurityContext--">getSecurityContext</a></span>()</code>
<div class="block">Get the injectable security context information for the current request.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code><a href="../../../../jakarta/ws/rs/core/UriInfo.html" title="interface in jakarta.ws.rs.core">UriInfo</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getUriInfo--">getUriInfo</a></span>()</code>
<div class="block">Get request URI information.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#hasEntity--">hasEntity</a></span>()</code>
<div class="block">Check if there is a non-empty entity input stream available in the request message.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#removeProperty-java.lang.String-">removeProperty</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Removes a property with the given name from the current request/response exchange context.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#setEntityStream-java.io.InputStream-">setEntityStream</a></span>(java.io.InputStream&nbsp;input)</code>
<div class="block">Set a new entity input stream.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#setMethod-java.lang.String-">setMethod</a></span>(java.lang.String&nbsp;method)</code>
<div class="block">Set the request method.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#setProperty-java.lang.String-java.lang.Object-">setProperty</a></span>(java.lang.String&nbsp;name,
java.lang.Object&nbsp;object)</code>
<div class="block">Binds an object to a given property name in the current request/response exchange context.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#setRequestUri-java.net.URI-">setRequestUri</a></span>(java.net.URI&nbsp;requestUri)</code>
<div class="block">Set a new request URI using the current base URI of the application to resolve the application-specific request URI
part.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#setRequestUri-java.net.URI-java.net.URI-">setRequestUri</a></span>(java.net.URI&nbsp;baseUri,
java.net.URI&nbsp;requestUri)</code>
<div class="block">Set a new request URI using a new base URI to resolve the application-specific request URI part.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#setSecurityContext-jakarta.ws.rs.core.SecurityContext-">setSecurityContext</a></span>(<a href="../../../../jakarta/ws/rs/core/SecurityContext.html" title="interface in jakarta.ws.rs.core">SecurityContext</a>&nbsp;context)</code>
<div class="block">Set a new injectable security context information for the current request.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getProperty-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getProperty</h4>
<pre>java.lang.Object&nbsp;getProperty(java.lang.String&nbsp;name)</pre>
<div class="block">Returns the property with the given name registered in the current request/response exchange context, or <code>null</code>
if there is no property by that name.
<p>
A property allows a JAX-RS filters and interceptors to exchange additional custom information not already provided by
this interface.
</p>
<p>
A list of supported properties can be retrieved using <a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getPropertyNames--"><code>getPropertyNames()</code></a>. Custom property names should
follow the same convention as package names.
</p>
<p>
In a Servlet container, the properties are synchronized with the <code>ServletRequest</code> and expose all the attributes
available in the <code>ServletRequest</code>. Any modifications of the properties are also reflected in the set of
properties of the associated <code>ServletRequest</code>.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - a <code>String</code> specifying the name of the property.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an <code>Object</code> containing the value of the property, or <code>null</code> if no property exists matching the
given name.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getPropertyNames--"><code>getPropertyNames()</code></a></dd>
</dl>
</li>
</ul>
<a name="getPropertyNames--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPropertyNames</h4>
<pre>java.util.Collection&lt;java.lang.String&gt;&nbsp;getPropertyNames()</pre>
<div class="block">Returns an immutable <code>collection</code> containing the property names available within the
context of the current request/response exchange context.
<p>
Use the <a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getProperty-java.lang.String-"><code>getProperty(java.lang.String)</code></a> method with a property name to get the value of a property.
</p>
<p>
In a Servlet container, the properties are synchronized with the <code>ServletRequest</code> and expose all the attributes
available in the <code>ServletRequest</code>. Any modifications of the properties are also reflected in the set of
properties of the associated <code>ServletRequest</code>.
</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an immutable <code>collection</code> of property names.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getProperty-java.lang.String-"><code>getProperty(java.lang.String)</code></a></dd>
</dl>
</li>
</ul>
<a name="setProperty-java.lang.String-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setProperty</h4>
<pre>void&nbsp;setProperty(java.lang.String&nbsp;name,
java.lang.Object&nbsp;object)</pre>
<div class="block">Binds an object to a given property name in the current request/response exchange context. If the name specified is
already used for a property, this method will replace the value of the property with the new value.
<p>
A property allows a JAX-RS filters and interceptors to exchange additional custom information not already provided by
this interface.
</p>
<p>
A list of supported properties can be retrieved using <a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getPropertyNames--"><code>getPropertyNames()</code></a>. Custom property names should
follow the same convention as package names.
</p>
<p>
If a <code>null</code> value is passed, the effect is the same as calling the <a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#removeProperty-java.lang.String-"><code>removeProperty(String)</code></a> method.
</p>
<p>
In a Servlet container, the properties are synchronized with the <code>ServletRequest</code> and expose all the attributes
available in the <code>ServletRequest</code>. Any modifications of the properties are also reflected in the set of
properties of the associated <code>ServletRequest</code>.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - a <code>String</code> specifying the name of the property.</dd>
<dd><code>object</code> - an <code>Object</code> representing the property to be bound.</dd>
</dl>
</li>
</ul>
<a name="removeProperty-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeProperty</h4>
<pre>void&nbsp;removeProperty(java.lang.String&nbsp;name)</pre>
<div class="block">Removes a property with the given name from the current request/response exchange context. After removal, subsequent
calls to <a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getProperty-java.lang.String-"><code>getProperty(java.lang.String)</code></a> to retrieve the property value will return <code>null</code>.
<p>
In a Servlet container, the properties are synchronized with the <code>ServletRequest</code> and expose all the attributes
available in the <code>ServletRequest</code>. Any modifications of the properties are also reflected in the set of
properties of the associated <code>ServletRequest</code>.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - a <code>String</code> specifying the name of the property to be removed.</dd>
</dl>
</li>
</ul>
<a name="getUriInfo--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUriInfo</h4>
<pre><a href="../../../../jakarta/ws/rs/core/UriInfo.html" title="interface in jakarta.ws.rs.core">UriInfo</a>&nbsp;getUriInfo()</pre>
<div class="block">Get request URI information.
The returned object contains "live" view of the request URI information in a sense that any changes made to the
request URI using one of the <code>setRequestUri(...)</code> methods will be reflected in the previously returned
<a href="../../../../jakarta/ws/rs/core/UriInfo.html" title="interface in jakarta.ws.rs.core"><code>UriInfo</code></a> instance.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>request URI information.</dd>
</dl>
</li>
</ul>
<a name="setRequestUri-java.net.URI-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRequestUri</h4>
<pre>void&nbsp;setRequestUri(java.net.URI&nbsp;requestUri)</pre>
<div class="block">Set a new request URI using the current base URI of the application to resolve the application-specific request URI
part.
<p>
Note that the method is usable only in pre-matching filters, prior to the resource matching occurs. Trying to invoke
the method in a filter bound to a resource method results in an <code>IllegalStateException</code> being thrown.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>requestUri</code> - new URI of the request.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - in case the method is not invoked from a <a href="../../../../jakarta/ws/rs/container/PreMatching.html" title="annotation in jakarta.ws.rs.container"><code>pre-matching</code></a> request
filter.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#setRequestUri-java.net.URI-java.net.URI-"><code>setRequestUri(java.net.URI, java.net.URI)</code></a></dd>
</dl>
</li>
</ul>
<a name="setRequestUri-java.net.URI-java.net.URI-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRequestUri</h4>
<pre>void&nbsp;setRequestUri(java.net.URI&nbsp;baseUri,
java.net.URI&nbsp;requestUri)</pre>
<div class="block">Set a new request URI using a new base URI to resolve the application-specific request URI part.
<p>
Note that the method is usable only in pre-matching filters, prior to the resource matching occurs. Trying to invoke
the method in a filter bound to a resource method results in an <code>IllegalStateException</code> being thrown.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>baseUri</code> - base URI that will be used to resolve the application-specific part of the request URI.</dd>
<dd><code>requestUri</code> - new URI of the request.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - in case the method is not invoked from a <a href="../../../../jakarta/ws/rs/container/PreMatching.html" title="annotation in jakarta.ws.rs.container"><code>pre-matching</code></a> request
filter.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#setRequestUri-java.net.URI-"><code>setRequestUri(java.net.URI)</code></a></dd>
</dl>
</li>
</ul>
<a name="getRequest--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRequest</h4>
<pre><a href="../../../../jakarta/ws/rs/core/Request.html" title="interface in jakarta.ws.rs.core">Request</a>&nbsp;getRequest()</pre>
<div class="block">Get the injectable request information.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>injectable request information.</dd>
</dl>
</li>
</ul>
<a name="getMethod--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMethod</h4>
<pre>java.lang.String&nbsp;getMethod()</pre>
<div class="block">Get the request method.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the request method.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../jakarta/ws/rs/HttpMethod.html" title="annotation in jakarta.ws.rs"><code>HttpMethod</code></a></dd>
</dl>
</li>
</ul>
<a name="setMethod-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMethod</h4>
<pre>void&nbsp;setMethod(java.lang.String&nbsp;method)</pre>
<div class="block">Set the request method.
<p>
Note that the method is usable only in pre-matching filters, prior to the resource matching occurs. Trying to invoke
the method in a filter bound to a resource method results in an <code>IllegalStateException</code> being thrown.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>method</code> - new request method.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - in case the method is not invoked from a <a href="../../../../jakarta/ws/rs/container/PreMatching.html" title="annotation in jakarta.ws.rs.container"><code>pre-matching</code></a> request
filter.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../jakarta/ws/rs/HttpMethod.html" title="annotation in jakarta.ws.rs"><code>HttpMethod</code></a></dd>
</dl>
</li>
</ul>
<a name="getHeaders--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHeaders</h4>
<pre><a href="../../../../jakarta/ws/rs/core/MultivaluedMap.html" title="interface in jakarta.ws.rs.core">MultivaluedMap</a>&lt;java.lang.String,java.lang.String&gt;&nbsp;getHeaders()</pre>
<div class="block">Get the mutable request headers multivalued map.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>mutable multivalued map of request headers.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getHeaderString-java.lang.String-"><code>getHeaderString(String)</code></a></dd>
</dl>
</li>
</ul>
<a name="getHeaderString-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHeaderString</h4>
<pre>java.lang.String&nbsp;getHeaderString(java.lang.String&nbsp;name)</pre>
<div class="block">Get a message header as a single string value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the message header.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the message header value. If the message header is not present then <code>null</code> is returned. If the message
header is present but has no value then the empty string is returned. If the message header is present more than once
then the values of joined together and separated by a ',' character.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../jakarta/ws/rs/container/ContainerRequestContext.html#getHeaders--"><code>getHeaders()</code></a></dd>
</dl>
</li>
</ul>
<a name="getDate--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDate</h4>
<pre>java.util.Date&nbsp;getDate()</pre>
<div class="block">Get message date.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the message date, otherwise <code>null</code> if not present.</dd>
</dl>
</li>
</ul>
<a name="getLanguage--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLanguage</h4>
<pre>java.util.Locale&nbsp;getLanguage()</pre>
<div class="block">Get the language of the entity.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the language of the entity or <code>null</code> if not specified</dd>
</dl>
</li>
</ul>
<a name="getLength--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLength</h4>
<pre>int&nbsp;getLength()</pre>
<div class="block">Get Content-Length value.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Content-Length as integer if present and valid number. In other cases returns <code>-1</code>.</dd>
</dl>
</li>
</ul>
<a name="getMediaType--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMediaType</h4>
<pre><a href="../../../../jakarta/ws/rs/core/MediaType.html" title="class in jakarta.ws.rs.core">MediaType</a>&nbsp;getMediaType()</pre>
<div class="block">Get the media type of the entity.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the media type or <code>null</code> if not specified (e.g. there's no request entity).</dd>
</dl>
</li>
</ul>
<a name="getAcceptableMediaTypes--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAcceptableMediaTypes</h4>
<pre>java.util.List&lt;<a href="../../../../jakarta/ws/rs/core/MediaType.html" title="class in jakarta.ws.rs.core">MediaType</a>&gt;&nbsp;getAcceptableMediaTypes()</pre>
<div class="block">Get a list of media types that are acceptable for the response.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a read-only list of requested response media types sorted according to their q-value, with highest preference
first.</dd>
</dl>
</li>
</ul>
<a name="getAcceptableLanguages--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAcceptableLanguages</h4>
<pre>java.util.List&lt;java.util.Locale&gt;&nbsp;getAcceptableLanguages()</pre>
<div class="block">Get a list of languages that are acceptable for the response.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a read-only list of acceptable languages sorted according to their q-value, with highest preference first.</dd>
</dl>
</li>
</ul>
<a name="getCookies--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCookies</h4>
<pre>java.util.Map&lt;java.lang.String,<a href="../../../../jakarta/ws/rs/core/Cookie.html" title="class in jakarta.ws.rs.core">Cookie</a>&gt;&nbsp;getCookies()</pre>
<div class="block">Get any cookies that accompanied the request.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a read-only map of cookie name (String) to <a href="../../../../jakarta/ws/rs/core/Cookie.html" title="class in jakarta.ws.rs.core"><code>Cookie</code></a>.</dd>
</dl>
</li>
</ul>
<a name="hasEntity--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasEntity</h4>
<pre>boolean&nbsp;hasEntity()</pre>
<div class="block">Check if there is a non-empty entity input stream available in the request message.
The method returns <code>true</code> if the entity is present, returns <code>false</code> otherwise.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if there is an entity present in the message, <code>false</code> otherwise.</dd>
</dl>
</li>
</ul>
<a name="getEntityStream--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEntityStream</h4>
<pre>java.io.InputStream&nbsp;getEntityStream()</pre>
<div class="block">Get the entity input stream. The JAX-RS runtime is responsible for closing the input stream.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>entity input stream.</dd>
</dl>
</li>
</ul>
<a name="setEntityStream-java.io.InputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEntityStream</h4>
<pre>void&nbsp;setEntityStream(java.io.InputStream&nbsp;input)</pre>
<div class="block">Set a new entity input stream. The JAX-RS runtime is responsible for closing the input stream.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - new entity input stream.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - in case the method is invoked from a response filter.</dd>
</dl>
</li>
</ul>
<a name="getSecurityContext--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSecurityContext</h4>
<pre><a href="../../../../jakarta/ws/rs/core/SecurityContext.html" title="interface in jakarta.ws.rs.core">SecurityContext</a>&nbsp;getSecurityContext()</pre>
<div class="block">Get the injectable security context information for the current request.
The <a href="../../../../jakarta/ws/rs/core/SecurityContext.html#getUserPrincipal--"><code>SecurityContext.getUserPrincipal()</code></a> must return <code>null</code> if the current request has not been
authenticated.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>injectable request security context information.</dd>
</dl>
</li>
</ul>
<a name="setSecurityContext-jakarta.ws.rs.core.SecurityContext-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSecurityContext</h4>
<pre>void&nbsp;setSecurityContext(<a href="../../../../jakarta/ws/rs/core/SecurityContext.html" title="interface in jakarta.ws.rs.core">SecurityContext</a>&nbsp;context)</pre>
<div class="block">Set a new injectable security context information for the current request.
The <a href="../../../../jakarta/ws/rs/core/SecurityContext.html#getUserPrincipal--"><code>SecurityContext.getUserPrincipal()</code></a> must return <code>null</code> if the current request has not been
authenticated.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - new injectable request security context information.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - in case the method is invoked from a response filter.</dd>
</dl>
</li>
</ul>
<a name="abortWith-jakarta.ws.rs.core.Response-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>abortWith</h4>
<pre>void&nbsp;abortWith(<a href="../../../../jakarta/ws/rs/core/Response.html" title="class in jakarta.ws.rs.core">Response</a>&nbsp;response)</pre>
<div class="block">Abort the filter chain with a response.
This method breaks the filter chain processing and returns the provided response back to the client. The provided
response goes through the chain of applicable response filters.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>response</code> - response to be sent back to the client.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - in case the method is invoked from a response filter.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</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">
<li><a href="../../../../jakarta/ws/rs/container/ConnectionCallback.html" title="interface in jakarta.ws.rs.container"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../jakarta/ws/rs/container/ContainerRequestFilter.html" title="interface in jakarta.ws.rs.container"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?jakarta/ws/rs/container/ContainerRequestContext.html" target="_top">Frames</a></li>
<li><a href="ContainerRequestContext.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.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>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&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 name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>