blob: c64df93a0680fab2595897bd2051e01f6d866cf0 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (12) on Mon Aug 12 13:20:58 GMT 2019 -->
<title>ContainerResponseContext (jakarta.ws.rs-api 2.1.6 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2019-08-12">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ContainerResponseContext (jakarta.ws.rs-api 2.1.6 API)";
}
}
catch(err) {
}
//-->
var data = {"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";
var pathtoroot = "../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ContainerResponseContext.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<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>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">javax.ws.rs.container</a></div>
<h2 title="Interface ContainerResponseContext" class="title">Interface ContainerResponseContext</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<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>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Marek Potociar</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<div class="memberSummary">
<div role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="memberSummary_tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="activeTableTab">All Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="tableTab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t3" class="tableTab" onclick="show(4);">Abstract Methods</button></div>
<div id="memberSummary_tabpanel" role="tabpanel">
<table aria-labelledby="t0">
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor" id="i0">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAllowedMethods()">getAllowedMethods</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the allowed HTTP methods from the Allow HTTP header.</div>
</td>
</tr>
<tr class="rowColor" id="i1">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="../core/NewCookie.html" title="class in javax.ws.rs.core">NewCookie</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCookies()">getCookies</a></span>()</code></th>
<td class="colLast">
<div class="block">Get any new cookies set on the response message.</div>
</td>
</tr>
<tr class="altColor" id="i2">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util" class="externalLink">Date</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDate()">getDate</a></span>()</code></th>
<td class="colLast">
<div class="block">Get message date.</div>
</td>
</tr>
<tr class="rowColor" id="i3">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getEntity()">getEntity</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the message entity Java instance.</div>
</td>
</tr>
<tr class="altColor" id="i4">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation" class="externalLink">Annotation</a>[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getEntityAnnotations()">getEntityAnnotations</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the annotations attached to the entity instance.</div>
</td>
</tr>
<tr class="rowColor" id="i5">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;?&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getEntityClass()">getEntityClass</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the raw entity type information.</div>
</td>
</tr>
<tr class="altColor" id="i6">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">OutputStream</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getEntityStream()">getEntityStream</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the entity output stream.</div>
</td>
</tr>
<tr class="rowColor" id="i7">
<td class="colFirst"><code><a href="../core/EntityTag.html" title="class in javax.ws.rs.core">EntityTag</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getEntityTag()">getEntityTag</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the entity tag.</div>
</td>
</tr>
<tr class="altColor" id="i8">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getEntityType()">getEntityType</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the generic entity type information.</div>
</td>
</tr>
<tr class="rowColor" id="i9">
<td class="colFirst"><code><a href="../core/MultivaluedMap.html" title="interface in javax.ws.rs.core">MultivaluedMap</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getHeaders()">getHeaders</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the mutable response headers multivalued map.</div>
</td>
</tr>
<tr class="altColor" id="i10">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getHeaderString(java.lang.String)">getHeaderString</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;name)</code></th>
<td class="colLast">
<div class="block">Get a message header as a single string value.</div>
</td>
</tr>
<tr class="rowColor" id="i11">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink">Locale</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLanguage()">getLanguage</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the language of the entity.</div>
</td>
</tr>
<tr class="altColor" id="i12">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util" class="externalLink">Date</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLastModified()">getLastModified</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the last modified date.</div>
</td>
</tr>
<tr class="rowColor" id="i13">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLength()">getLength</a></span>()</code></th>
<td class="colLast">
<div class="block">Get Content-Length value.</div>
</td>
</tr>
<tr class="altColor" id="i14">
<td class="colFirst"><code><a href="../core/Link.html" title="class in javax.ws.rs.core">Link</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLink(java.lang.String)">getLink</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;relation)</code></th>
<td class="colLast">
<div class="block">Get the link for the relation.</div>
</td>
</tr>
<tr class="rowColor" id="i15">
<td class="colFirst"><code><a href="../core/Link.Builder.html" title="interface in javax.ws.rs.core">Link.Builder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLinkBuilder(java.lang.String)">getLinkBuilder</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;relation)</code></th>
<td class="colLast">
<div class="block">Convenience method that returns a <a href="../core/Link.Builder.html" title="interface in javax.ws.rs.core"><code>Link.Builder</code></a>
for the relation.</div>
</td>
</tr>
<tr class="altColor" id="i16">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="../core/Link.html" title="class in javax.ws.rs.core">Link</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLinks()">getLinks</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the links attached to the message as header.</div>
</td>
</tr>
<tr class="rowColor" id="i17">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net" class="externalLink">URI</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLocation()">getLocation</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the location.</div>
</td>
</tr>
<tr class="altColor" id="i18">
<td class="colFirst"><code><a href="../core/MediaType.html" title="class in javax.ws.rs.core">MediaType</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMediaType()">getMediaType</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the media type of the entity.</div>
</td>
</tr>
<tr class="rowColor" id="i19">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getStatus()">getStatus</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the status code associated with the response.</div>
</td>
</tr>
<tr class="altColor" id="i20">
<td class="colFirst"><code><a href="../core/Response.StatusType.html" title="interface in javax.ws.rs.core">Response.StatusType</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getStatusInfo()">getStatusInfo</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the complete status information associated with the response.</div>
</td>
</tr>
<tr class="rowColor" id="i21">
<td class="colFirst"><code><a href="../core/MultivaluedMap.html" title="interface in javax.ws.rs.core">MultivaluedMap</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getStringHeaders()">getStringHeaders</a></span>()</code></th>
<td class="colLast">
<div class="block">Get a string view of header values associated with the message.</div>
</td>
</tr>
<tr class="altColor" id="i22">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasEntity()">hasEntity</a></span>()</code></th>
<td class="colLast">
<div class="block">Check if there is an entity available in the response.</div>
</td>
</tr>
<tr class="rowColor" id="i23">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasLink(java.lang.String)">hasLink</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;relation)</code></th>
<td class="colLast">
<div class="block">Check if link for relation exists.</div>
</td>
</tr>
<tr class="altColor" id="i24">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setEntity(java.lang.Object)">setEntity</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;entity)</code></th>
<td class="colLast">
<div class="block">Set a new message entity.</div>
</td>
</tr>
<tr class="rowColor" id="i25">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setEntity(java.lang.Object,java.lang.annotation.Annotation%5B%5D,javax.ws.rs.core.MediaType)">setEntity</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;entity,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation" class="externalLink">Annotation</a>[]&nbsp;annotations,
<a href="../core/MediaType.html" title="class in javax.ws.rs.core">MediaType</a>&nbsp;mediaType)</code></th>
<td class="colLast">
<div class="block">Set a new message entity, including the attached annotations and the media type.</div>
</td>
</tr>
<tr class="altColor" id="i26">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setEntityStream(java.io.OutputStream)">setEntityStream</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">OutputStream</a>&nbsp;outputStream)</code></th>
<td class="colLast">
<div class="block">Set a new entity output stream.</div>
</td>
</tr>
<tr class="rowColor" id="i27">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setStatus(int)">setStatus</a></span>&#8203;(int&nbsp;code)</code></th>
<td class="colLast">
<div class="block">Set a new response status code.</div>
</td>
</tr>
<tr class="altColor" id="i28">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setStatusInfo(javax.ws.rs.core.Response.StatusType)">setStatusInfo</a></span>&#8203;(<a href="../core/Response.StatusType.html" title="interface in javax.ws.rs.core">Response.StatusType</a>&nbsp;statusInfo)</code></th>
<td class="colLast">
<div class="block">Set the complete status information (status code and reason phrase) associated
with the response.</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="getStatus()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStatus</h4>
<pre class="methodSignature">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 id="setStatus(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setStatus</h4>
<pre class="methodSignature">void&nbsp;setStatus&#8203;(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 id="getStatusInfo()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStatusInfo</h4>
<pre class="methodSignature"><a href="../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 id="setStatusInfo(javax.ws.rs.core.Response.StatusType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setStatusInfo</h4>
<pre class="methodSignature">void&nbsp;setStatusInfo&#8203;(<a href="../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 id="getHeaders()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHeaders</h4>
<pre class="methodSignature"><a href="../core/MultivaluedMap.html" title="interface in javax.ws.rs.core">MultivaluedMap</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&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="#getStringHeaders()"><code>getStringHeaders()</code></a>,
<a href="#getHeaderString(java.lang.String)"><code>getHeaderString(String)</code></a></dd>
</dl>
</li>
</ul>
<a id="getStringHeaders()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStringHeaders</h4>
<pre class="methodSignature"><a href="../core/MultivaluedMap.html" title="interface in javax.ws.rs.core">MultivaluedMap</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&gt;&nbsp;getStringHeaders()</pre>
<div class="block">Get a string view of header values associated with the message.
Changes in the underlying <a href="#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="../ext/RuntimeDelegate.HeaderDelegate.html" title="interface in javax.ws.rs.ext"><code>RuntimeDelegate.HeaderDelegate</code></a> if one is available via
<a href="../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="#getHeaders()"><code>getHeaders()</code></a>,
<a href="#getHeaderString(java.lang.String)"><code>getHeaderString(String)</code></a></dd>
</dl>
</li>
</ul>
<a id="getHeaderString(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHeaderString</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;getHeaderString&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&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="../ext/RuntimeDelegate.HeaderDelegate.html" title="interface in javax.ws.rs.ext"><code>RuntimeDelegate.HeaderDelegate</code></a> if one is available
via <a href="../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="#getHeaders()"><code>getHeaders()</code></a>,
<a href="#getStringHeaders()"><code>getStringHeaders()</code></a></dd>
</dl>
</li>
</ul>
<a id="getAllowedMethods()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAllowedMethods</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&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 id="getDate()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDate</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util" class="externalLink">Date</a>&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 id="getLanguage()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLanguage</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink">Locale</a>&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 id="getLength()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLength</h4>
<pre class="methodSignature">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 id="getMediaType()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMediaType</h4>
<pre class="methodSignature"><a href="../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 id="getCookies()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCookies</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="../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="../core/NewCookie.html" title="class in javax.ws.rs.core"><code>new cookie</code></a>.</dd>
</dl>
</li>
</ul>
<a id="getEntityTag()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEntityTag</h4>
<pre class="methodSignature"><a href="../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 id="getLastModified()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLastModified</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util" class="externalLink">Date</a>&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 id="getLocation()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocation</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net" class="externalLink">URI</a>&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 id="getLinks()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLinks</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="../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 <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Set</code></a> if no links are present. Never
returns <code>null</code>.</dd>
</dl>
</li>
</ul>
<a id="hasLink(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasLink</h4>
<pre class="methodSignature">boolean&nbsp;hasLink&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&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 id="getLink(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLink</h4>
<pre class="methodSignature"><a href="../core/Link.html" title="class in javax.ws.rs.core">Link</a>&nbsp;getLink&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&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 id="getLinkBuilder(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLinkBuilder</h4>
<pre class="methodSignature"><a href="../core/Link.Builder.html" title="interface in javax.ws.rs.core">Link.Builder</a>&nbsp;getLinkBuilder&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;relation)</pre>
<div class="block">Convenience method that returns a <a href="../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 id="hasEntity()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasEntity</h4>
<pre class="methodSignature">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 id="getEntity()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEntity</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&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 id="getEntityClass()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEntityClass</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&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 id="getEntityType()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEntityType</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&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 id="setEntity(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEntity</h4>
<pre class="methodSignature">void&nbsp;setEntity&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;entity)</pre>
<div class="block">Set a new message entity. The existing entity <a href="#getEntityAnnotations()"><code>annotations</code></a>
and <a href="#getMediaType()"><code>media type</code></a> are preserved.
<p>
It is the callers responsibility to wrap the actual entity with
<a href="../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="#setEntity(java.lang.Object,java.lang.annotation.Annotation%5B%5D,javax.ws.rs.core.MediaType)"><code>setEntity(Object, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType)</code></a>,
<a href="../ext/MessageBodyWriter.html" title="interface in javax.ws.rs.ext"><code>MessageBodyWriter</code></a></dd>
</dl>
</li>
</ul>
<a id="setEntity(java.lang.Object,java.lang.annotation.Annotation[],javax.ws.rs.core.MediaType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEntity</h4>
<pre class="methodSignature">void&nbsp;setEntity&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;entity,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation" class="externalLink">Annotation</a>[]&nbsp;annotations,
<a href="../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="../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="#setEntity(java.lang.Object)"><code>setEntity(Object)</code></a>,
<a href="../ext/MessageBodyWriter.html" title="interface in javax.ws.rs.ext"><code>MessageBodyWriter</code></a></dd>
</dl>
</li>
</ul>
<a id="getEntityAnnotations()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEntityAnnotations</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation" class="externalLink">Annotation</a>[]&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="../core/Response.ResponseBuilder.html#entity(java.lang.Object,java.lang.annotation.Annotation%5B%5D)"><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 id="getEntityStream()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEntityStream</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">OutputStream</a>&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 id="setEntityStream(java.io.OutputStream)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>setEntityStream</h4>
<pre class="methodSignature">void&nbsp;setEntityStream&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">OutputStream</a>&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>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ContainerResponseContext.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<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>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright (c) 2019 Eclipse Foundation. Licensed under <a href="resources/EFSL.html">Eclipse Foundation Specification License</a>.</small></p>
</footer>
</body>
</html>