blob: 28f4719ad42e279ff68ade9bf0e1ed1782647e73 [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>ContainerResponseContext</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="ContainerResponseContext";
}
}
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,"i25":6,"i26":6,"i27":6,"i28":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="../../../../javax/ws/rs/container/ContainerRequestFilter.html" title="interface in javax.ws.rs.container"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../javax/ws/rs/container/ContainerResponseFilter.html" title="interface in javax.ws.rs.container"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?javax/ws/rs/container/ContainerResponseContext.html" target="_top">Frames</a></li>
<li><a href="ContainerResponseContext.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">javax.ws.rs.container</div>
<h2 title="Interface ContainerResponseContext" class="title">Interface ContainerResponseContext</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public interface <span class="typeNameLabel">ContainerResponseContext</span></pre>
<div class="block">Container response filter context.
A mutable class that provides response-specific information for the filter,
such as message headers, message entity or request-scoped properties.
The exposed setters allow modification of the exposed response-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>java.util.Set&lt;java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getAllowedMethods--">getAllowedMethods</a></span>()</code>
<div class="block">Get the allowed HTTP methods from the Allow HTTP header.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>java.util.Map&lt;java.lang.String,<a href="../../../../javax/ws/rs/core/NewCookie.html" title="class in javax.ws.rs.core">NewCookie</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getCookies--">getCookies</a></span>()</code>
<div class="block">Get any new cookies set on the response message.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>java.util.Date</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getDate--">getDate</a></span>()</code>
<div class="block">Get message date.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getEntity--">getEntity</a></span>()</code>
<div class="block">Get the message entity Java instance.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>java.lang.annotation.Annotation[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getEntityAnnotations--">getEntityAnnotations</a></span>()</code>
<div class="block">Get the annotations attached to the entity instance.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>java.lang.Class&lt;?&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getEntityClass--">getEntityClass</a></span>()</code>
<div class="block">Get the raw entity type information.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>java.io.OutputStream</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getEntityStream--">getEntityStream</a></span>()</code>
<div class="block">Get the entity output stream.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="../../../../javax/ws/rs/core/EntityTag.html" title="class in javax.ws.rs.core">EntityTag</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getEntityTag--">getEntityTag</a></span>()</code>
<div class="block">Get the entity tag.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>java.lang.reflect.Type</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getEntityType--">getEntityType</a></span>()</code>
<div class="block">Get the generic entity type information.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="../../../../javax/ws/rs/core/MultivaluedMap.html" title="interface in javax.ws.rs.core">MultivaluedMap</a>&lt;java.lang.String,java.lang.Object&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getHeaders--">getHeaders</a></span>()</code>
<div class="block">Get the mutable response headers multivalued map.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.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="i11" class="rowColor">
<td class="colFirst"><code>java.util.Locale</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getLanguage--">getLanguage</a></span>()</code>
<div class="block">Get the language of the entity.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>java.util.Date</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getLastModified--">getLastModified</a></span>()</code>
<div class="block">Get the last modified date.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getLength--">getLength</a></span>()</code>
<div class="block">Get Content-Length value.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="../../../../javax/ws/rs/core/Link.html" title="class in javax.ws.rs.core">Link</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getLink-java.lang.String-">getLink</a></span>(java.lang.String&nbsp;relation)</code>
<div class="block">Get the link for the relation.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="../../../../javax/ws/rs/core/Link.Builder.html" title="interface in javax.ws.rs.core">Link.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getLinkBuilder-java.lang.String-">getLinkBuilder</a></span>(java.lang.String&nbsp;relation)</code>
<div class="block">Convenience method that returns a <a href="../../../../javax/ws/rs/core/Link.Builder.html" title="interface in javax.ws.rs.core"><code>Link.Builder</code></a>
for the relation.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>java.util.Set&lt;<a href="../../../../javax/ws/rs/core/Link.html" title="class in javax.ws.rs.core">Link</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getLinks--">getLinks</a></span>()</code>
<div class="block">Get the links attached to the message as header.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>java.net.URI</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getLocation--">getLocation</a></span>()</code>
<div class="block">Get the location.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code><a href="../../../../javax/ws/rs/core/MediaType.html" title="class in javax.ws.rs.core">MediaType</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getMediaType--">getMediaType</a></span>()</code>
<div class="block">Get the media type of the entity.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getStatus--">getStatus</a></span>()</code>
<div class="block">Get the status code associated with the response.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code><a href="../../../../javax/ws/rs/core/Response.StatusType.html" title="interface in javax.ws.rs.core">Response.StatusType</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getStatusInfo--">getStatusInfo</a></span>()</code>
<div class="block">Get the complete status information associated with the response.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code><a href="../../../../javax/ws/rs/core/MultivaluedMap.html" title="interface in javax.ws.rs.core">MultivaluedMap</a>&lt;java.lang.String,java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getStringHeaders--">getStringHeaders</a></span>()</code>
<div class="block">Get a string view of header values associated with the message.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#hasEntity--">hasEntity</a></span>()</code>
<div class="block">Check if there is an entity available in the response.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#hasLink-java.lang.String-">hasLink</a></span>(java.lang.String&nbsp;relation)</code>
<div class="block">Check if link for relation exists.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#setEntity-java.lang.Object-">setEntity</a></span>(java.lang.Object&nbsp;entity)</code>
<div class="block">Set a new message entity.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#setEntity-java.lang.Object-java.lang.annotation.Annotation:A-javax.ws.rs.core.MediaType-">setEntity</a></span>(java.lang.Object&nbsp;entity,
java.lang.annotation.Annotation[]&nbsp;annotations,
<a href="../../../../javax/ws/rs/core/MediaType.html" title="class in javax.ws.rs.core">MediaType</a>&nbsp;mediaType)</code>
<div class="block">Set a new message entity, including the attached annotations and the media type.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#setEntityStream-java.io.OutputStream-">setEntityStream</a></span>(java.io.OutputStream&nbsp;outputStream)</code>
<div class="block">Set a new entity output stream.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#setStatus-int-">setStatus</a></span>(int&nbsp;code)</code>
<div class="block">Set a new response status code.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#setStatusInfo-javax.ws.rs.core.Response.StatusType-">setStatusInfo</a></span>(<a href="../../../../javax/ws/rs/core/Response.StatusType.html" title="interface in javax.ws.rs.core">Response.StatusType</a>&nbsp;statusInfo)</code>
<div class="block">Set the complete status information (status code and reason phrase) associated
with the response.</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="getStatus--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStatus</h4>
<pre>int&nbsp;getStatus()</pre>
<div class="block">Get the status code associated with the response.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the response status code or -1 if the status was not set.</dd>
</dl>
</li>
</ul>
<a name="setStatus-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setStatus</h4>
<pre>void&nbsp;setStatus(int&nbsp;code)</pre>
<div class="block">Set a new response status code.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>code</code> - new status code.</dd>
</dl>
</li>
</ul>
<a name="getStatusInfo--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStatusInfo</h4>
<pre><a href="../../../../javax/ws/rs/core/Response.StatusType.html" title="interface in javax.ws.rs.core">Response.StatusType</a>&nbsp;getStatusInfo()</pre>
<div class="block">Get the complete status information associated with the response.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the response status information or <code>null</code> if the status was
not set.</dd>
</dl>
</li>
</ul>
<a name="setStatusInfo-javax.ws.rs.core.Response.StatusType-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setStatusInfo</h4>
<pre>void&nbsp;setStatusInfo(<a href="../../../../javax/ws/rs/core/Response.StatusType.html" title="interface in javax.ws.rs.core">Response.StatusType</a>&nbsp;statusInfo)</pre>
<div class="block">Set the complete status information (status code and reason phrase) associated
with the response.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>statusInfo</code> - the response status information.</dd>
</dl>
</li>
</ul>
<a name="getHeaders--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHeaders</h4>
<pre><a href="../../../../javax/ws/rs/core/MultivaluedMap.html" title="interface in javax.ws.rs.core">MultivaluedMap</a>&lt;java.lang.String,java.lang.Object&gt;&nbsp;getHeaders()</pre>
<div class="block">Get the mutable response headers multivalued map.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>mutable multivalued map of response headers.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getStringHeaders--"><code>getStringHeaders()</code></a>,
<a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getHeaderString-java.lang.String-"><code>getHeaderString(String)</code></a></dd>
</dl>
</li>
</ul>
<a name="getStringHeaders--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStringHeaders</h4>
<pre><a href="../../../../javax/ws/rs/core/MultivaluedMap.html" title="interface in javax.ws.rs.core">MultivaluedMap</a>&lt;java.lang.String,java.lang.String&gt;&nbsp;getStringHeaders()</pre>
<div class="block">Get a string view of header values associated with the message.
Changes in the underlying <a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getHeaders--"><code>headers map</code></a> are reflected
in this view.
<p>
The method converts the non-string header values to strings using a
<a href="../../../../javax/ws/rs/ext/RuntimeDelegate.HeaderDelegate.html" title="interface in javax.ws.rs.ext"><code>RuntimeDelegate.HeaderDelegate</code></a> if one is available via
<a href="../../../../javax/ws/rs/ext/RuntimeDelegate.html#createHeaderDelegate-java.lang.Class-"><code>RuntimeDelegate.createHeaderDelegate(java.lang.Class)</code></a> for the
class of the value or using the values <code>toString</code> method if a header delegate is
not available.
</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>response headers as a string view of header values.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getHeaders--"><code>getHeaders()</code></a>,
<a href="../../../../javax/ws/rs/container/ContainerResponseContext.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.
Each single header value is converted to String using a
<a href="../../../../javax/ws/rs/ext/RuntimeDelegate.HeaderDelegate.html" title="interface in javax.ws.rs.ext"><code>RuntimeDelegate.HeaderDelegate</code></a> if one is available
via <a href="../../../../javax/ws/rs/ext/RuntimeDelegate.html#createHeaderDelegate-java.lang.Class-"><code>RuntimeDelegate.createHeaderDelegate(java.lang.Class)</code></a>
for the header value class or using its <code>toString</code> method if a header
delegate is not available.</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="../../../../javax/ws/rs/container/ContainerResponseContext.html#getHeaders--"><code>getHeaders()</code></a>,
<a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getStringHeaders--"><code>getStringHeaders()</code></a></dd>
</dl>
</li>
</ul>
<a name="getAllowedMethods--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAllowedMethods</h4>
<pre>java.util.Set&lt;java.lang.String&gt;&nbsp;getAllowedMethods()</pre>
<div class="block">Get the allowed HTTP methods from the Allow HTTP header.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the allowed HTTP methods, all methods will returned as upper case
strings.</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 -1.</dd>
</dl>
</li>
</ul>
<a name="getMediaType--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMediaType</h4>
<pre><a href="../../../../javax/ws/rs/core/MediaType.html" title="class in javax.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
response entity).</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="../../../../javax/ws/rs/core/NewCookie.html" title="class in javax.ws.rs.core">NewCookie</a>&gt;&nbsp;getCookies()</pre>
<div class="block">Get any new cookies set on the response message.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a read-only map of cookie name (String) to a <a href="../../../../javax/ws/rs/core/NewCookie.html" title="class in javax.ws.rs.core"><code>new cookie</code></a>.</dd>
</dl>
</li>
</ul>
<a name="getEntityTag--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEntityTag</h4>
<pre><a href="../../../../javax/ws/rs/core/EntityTag.html" title="class in javax.ws.rs.core">EntityTag</a>&nbsp;getEntityTag()</pre>
<div class="block">Get the entity tag.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the entity tag, otherwise <code>null</code> if not present.</dd>
</dl>
</li>
</ul>
<a name="getLastModified--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLastModified</h4>
<pre>java.util.Date&nbsp;getLastModified()</pre>
<div class="block">Get the last modified date.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the last modified date, otherwise <code>null</code> if not present.</dd>
</dl>
</li>
</ul>
<a name="getLocation--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocation</h4>
<pre>java.net.URI&nbsp;getLocation()</pre>
<div class="block">Get the location.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the location URI, otherwise <code>null</code> if not present.</dd>
</dl>
</li>
</ul>
<a name="getLinks--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLinks</h4>
<pre>java.util.Set&lt;<a href="../../../../javax/ws/rs/core/Link.html" title="class in javax.ws.rs.core">Link</a>&gt;&nbsp;getLinks()</pre>
<div class="block">Get the links attached to the message as header.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>links, may return empty <code>Set</code> if no links are present. Never
returns <code>null</code>.</dd>
</dl>
</li>
</ul>
<a name="hasLink-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasLink</h4>
<pre>boolean&nbsp;hasLink(java.lang.String&nbsp;relation)</pre>
<div class="block">Check if link for relation exists.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>relation</code> - link relation.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the for the relation link exists, <code>false</code>
otherwise.</dd>
</dl>
</li>
</ul>
<a name="getLink-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLink</h4>
<pre><a href="../../../../javax/ws/rs/core/Link.html" title="class in javax.ws.rs.core">Link</a>&nbsp;getLink(java.lang.String&nbsp;relation)</pre>
<div class="block">Get the link for the relation.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>relation</code> - link relation.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the link for the relation, otherwise <code>null</code> if not present.</dd>
</dl>
</li>
</ul>
<a name="getLinkBuilder-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLinkBuilder</h4>
<pre><a href="../../../../javax/ws/rs/core/Link.Builder.html" title="interface in javax.ws.rs.core">Link.Builder</a>&nbsp;getLinkBuilder(java.lang.String&nbsp;relation)</pre>
<div class="block">Convenience method that returns a <a href="../../../../javax/ws/rs/core/Link.Builder.html" title="interface in javax.ws.rs.core"><code>Link.Builder</code></a>
for the relation.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>relation</code> - link relation.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the link builder for the relation, otherwise <code>null</code> if not
present.</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 an entity available in the response.
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="getEntity--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEntity</h4>
<pre>java.lang.Object&nbsp;getEntity()</pre>
<div class="block">Get the message entity Java instance.
Returns <code>null</code> if the message does not contain an entity.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the message entity or <code>null</code> if message does not contain an
entity body.</dd>
</dl>
</li>
</ul>
<a name="getEntityClass--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEntityClass</h4>
<pre>java.lang.Class&lt;?&gt;&nbsp;getEntityClass()</pre>
<div class="block">Get the raw entity type information.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>raw entity type.</dd>
</dl>
</li>
</ul>
<a name="getEntityType--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEntityType</h4>
<pre>java.lang.reflect.Type&nbsp;getEntityType()</pre>
<div class="block">Get the generic entity type information.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>declared generic entity type.</dd>
</dl>
</li>
</ul>
<a name="setEntity-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEntity</h4>
<pre>void&nbsp;setEntity(java.lang.Object&nbsp;entity)</pre>
<div class="block">Set a new message entity. The existing entity <a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getEntityAnnotations--"><code>annotations</code></a>
and <a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#getMediaType--"><code>media type</code></a> are preserved.
<p>
It is the callers responsibility to wrap the actual entity with
<a href="../../../../javax/ws/rs/core/GenericEntity.html" title="class in javax.ws.rs.core"><code>GenericEntity</code></a> if preservation of its generic
type is required.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>entity</code> - entity object.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#setEntity-java.lang.Object-java.lang.annotation.Annotation:A-javax.ws.rs.core.MediaType-"><code>setEntity(Object, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType)</code></a>,
<a href="../../../../javax/ws/rs/ext/MessageBodyWriter.html" title="interface in javax.ws.rs.ext"><code>MessageBodyWriter</code></a></dd>
</dl>
</li>
</ul>
<a name="setEntity-java.lang.Object-java.lang.annotation.Annotation:A-javax.ws.rs.core.MediaType-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEntity</h4>
<pre>void&nbsp;setEntity(java.lang.Object&nbsp;entity,
java.lang.annotation.Annotation[]&nbsp;annotations,
<a href="../../../../javax/ws/rs/core/MediaType.html" title="class in javax.ws.rs.core">MediaType</a>&nbsp;mediaType)</pre>
<div class="block">Set a new message entity, including the attached annotations and the media type.
<p>
It is the callers responsibility to wrap the actual entity with
<a href="../../../../javax/ws/rs/core/GenericEntity.html" title="class in javax.ws.rs.core"><code>GenericEntity</code></a> if preservation of its generic
type is required.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>entity</code> - entity object.</dd>
<dd><code>annotations</code> - annotations attached to the entity instance.</dd>
<dd><code>mediaType</code> - entity media type.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../javax/ws/rs/container/ContainerResponseContext.html#setEntity-java.lang.Object-"><code>setEntity(Object)</code></a>,
<a href="../../../../javax/ws/rs/ext/MessageBodyWriter.html" title="interface in javax.ws.rs.ext"><code>MessageBodyWriter</code></a></dd>
</dl>
</li>
</ul>
<a name="getEntityAnnotations--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEntityAnnotations</h4>
<pre>java.lang.annotation.Annotation[]&nbsp;getEntityAnnotations()</pre>
<div class="block">Get the annotations attached to the entity instance.
<p>
Note that the returned annotations array contains only those annotations
explicitly attached to entity instance (such as the ones attached using
<a href="../../../../javax/ws/rs/core/Response.ResponseBuilder.html#entity-java.lang.Object-java.lang.annotation.Annotation:A-"><code>Response.ResponseBuilder.entity(Object, java.lang.annotation.Annotation[])</code></a> method
as well as the ones attached to the resource method that has returned the response).
The entity instance annotations array does not include annotations declared on the entity
implementation class or its ancestors.
</p>
<p>
Note that container response filters invoked earlier in the filter chain may modify the entity annotations value,
in which case this getter method would return the last annotations value set by a container response filter invoked
earlier in the filter chain.
</p>
<p>
For example:
</p>
<pre>
&#64;Path("my-resource")
public class MyResource {
private final Annotations[] extras = ... ;
&#64;GET
&#64;Custom
public String getAnnotatedMe() {
return Response.ok().entity("Annotated me", extras).build();
}
...
}
</pre>
<p>
The container response context for a response returned from the <code>getMe()</code> method above would contain all
the annotations declared on the <code>getAnnotatedMe()</code> method (<code>@GET</code>, <code>@Custom</code>) as well as all
the annotations from the <code>extras</code> field, provided this value has not been replaced by any container response filter
invoked earlier.
</p>
<p>
Similarly:
</p>
<pre>
&#64;Custom
public class AnnotatedMe { ... }
&#64;Path("my-resource")
public class MyResource {
private final Annotations[] extras = ... ;
&#64;GET
public AnnotatedMe getMe() {
return Response.ok().entity(new AnnotatedMe(), extras).build();
}
...
}
</pre>
<p>
Provided that the value has not been replaced by any container response filter invoked earlier,
the container response context for a response returned from the <code>getMe()</code> method above would contain all
the annotations on the <code>getMe()</code> method (<code>@GET</code>) as well as all the annotations from the
<code>extras</code> field. It would however not contain any annotations declared on the <code>AnnotatedMe</code> class.
</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>annotations attached to the entity instance.</dd>
</dl>
</li>
</ul>
<a name="getEntityStream--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEntityStream</h4>
<pre>java.io.OutputStream&nbsp;getEntityStream()</pre>
<div class="block">Get the entity output stream. The runtime is responsible for
closing the output stream.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>entity output stream.</dd>
</dl>
</li>
</ul>
<a name="setEntityStream-java.io.OutputStream-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>setEntityStream</h4>
<pre>void&nbsp;setEntityStream(java.io.OutputStream&nbsp;outputStream)</pre>
<div class="block">Set a new entity output stream. The runtime is responsible for
closing the output stream.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>outputStream</code> - new entity output stream.</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="../../../../javax/ws/rs/container/ContainerRequestFilter.html" title="interface in javax.ws.rs.container"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../javax/ws/rs/container/ContainerResponseFilter.html" title="interface in javax.ws.rs.container"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?javax/ws/rs/container/ContainerResponseContext.html" target="_top">Frames</a></li>
<li><a href="ContainerResponseContext.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>