You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

647 lines
39 KiB

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_80) on Wed Nov 30 19:45:05 CET 2022 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>HttpCacheEntry (Apache HttpComponents Client 4.5.14 API)</title>
<meta name="date" content="2022-11-30">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="HttpCacheEntry (Apache HttpComponents Client 4.5.14 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><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="class-use/HttpCacheEntry.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">
<ul class="navList">
<li><a href="../../../../../org/apache/http/client/cache/HttpCacheContext.html" title="class in org.apache.http.client.cache"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/http/client/cache/HttpCacheEntrySerializationException.html" title="class in org.apache.http.client.cache"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/http/client/cache/HttpCacheEntry.html" target="_top">Frames</a></li>
<li><a href="HttpCacheEntry.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All 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><a href="#constructor_summary">Constr</a>&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><a href="#constructor_detail">Constr</a>&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">org.apache.http.client.cache</div>
<h2 title="Class HttpCacheEntry" class="title">Class HttpCacheEntry</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.http.client.cache.HttpCacheEntry</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></dd>
</dl>
<hr>
<br>
<pre>@Contract(threading=IMMUTABLE)
public class <span class="strong">HttpCacheEntry</span>
extends <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="https://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></pre>
<div class="block">Structure used to store an <code>HttpResponse</code> in a cache.
Some entries can optionally depend on system resources that may require
explicit deallocation. In such a case <a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html#getResource()"><code>getResource()</code></a> should return
a non null instance of <a href="../../../../../org/apache/http/client/cache/Resource.html" title="interface in org.apache.http.client.cache"><code>Resource</code></a> that must be deallocated by calling
<a href="../../../../../org/apache/http/client/cache/Resource.html#dispose()"><code>Resource.dispose()</code></a> method when no longer used.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>4.1</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../serialized-form.html#org.apache.http.client.cache.HttpCacheEntry">Serialized Form</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html#HttpCacheEntry(java.util.Date,%20java.util.Date,%20org.apache.http.StatusLine,%20org.apache.http.Header[],%20org.apache.http.client.cache.Resource)">HttpCacheEntry</a></strong>(<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;requestDate,
<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;responseDate,
org.apache.http.StatusLine&nbsp;statusLine,
org.apache.http.Header[]&nbsp;responseHeaders,
<a href="../../../../../org/apache/http/client/cache/Resource.html" title="interface in org.apache.http.client.cache">Resource</a>&nbsp;resource)</code>
<div class="block">Create a new <a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html" title="class in org.apache.http.client.cache"><code>HttpCacheEntry</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html#HttpCacheEntry(java.util.Date,%20java.util.Date,%20org.apache.http.StatusLine,%20org.apache.http.Header[],%20org.apache.http.client.cache.Resource,%20java.util.Map)">HttpCacheEntry</a></strong>(<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;requestDate,
<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;responseDate,
org.apache.http.StatusLine&nbsp;statusLine,
org.apache.http.Header[]&nbsp;responseHeaders,
<a href="../../../../../org/apache/http/client/cache/Resource.html" title="interface in org.apache.http.client.cache">Resource</a>&nbsp;resource,
<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;variantMap)</code>
<div class="block">Create a new <a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html" title="class in org.apache.http.client.cache"><code>HttpCacheEntry</code></a> with variants.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html#HttpCacheEntry(java.util.Date,%20java.util.Date,%20org.apache.http.StatusLine,%20org.apache.http.Header[],%20org.apache.http.client.cache.Resource,%20java.util.Map,%20java.lang.String)">HttpCacheEntry</a></strong>(<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;requestDate,
<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;responseDate,
org.apache.http.StatusLine&nbsp;statusLine,
org.apache.http.Header[]&nbsp;responseHeaders,
<a href="../../../../../org/apache/http/client/cache/Resource.html" title="interface in org.apache.http.client.cache">Resource</a>&nbsp;resource,
<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;variantMap,
<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;requestMethod)</code>
<div class="block">Create a new <a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html" title="class in org.apache.http.client.cache"><code>HttpCacheEntry</code></a> with variants.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html#HttpCacheEntry(java.util.Date,%20java.util.Date,%20org.apache.http.StatusLine,%20org.apache.http.Header[],%20org.apache.http.client.cache.Resource,%20java.lang.String)">HttpCacheEntry</a></strong>(<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;requestDate,
<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;responseDate,
org.apache.http.StatusLine&nbsp;statusLine,
org.apache.http.Header[]&nbsp;responseHeaders,
<a href="../../../../../org/apache/http/client/cache/Resource.html" title="interface in org.apache.http.client.cache">Resource</a>&nbsp;resource,
<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;requestMethod)</code>
<div class="block">Create a new <a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html" title="class in org.apache.http.client.cache"><code>HttpCacheEntry</code></a>.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>org.apache.http.Header[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html#getAllHeaders()">getAllHeaders</a></strong>()</code>
<div class="block">Returns all the headers that were on the origin response.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html#getDate()">getDate</a></strong>()</code>
<div class="block">Gets the Date value of the "Date" header or null if the header is missing or cannot be
parsed.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>org.apache.http.Header</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html#getFirstHeader(java.lang.String)">getFirstHeader</a></strong>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</code>
<div class="block">Returns the first header from the origin response with the given
name.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>org.apache.http.Header[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html#getHeaders(java.lang.String)">getHeaders</a></strong>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</code>
<div class="block">Gets all the headers with the given name that were on the origin
response.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>org.apache.http.ProtocolVersion</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html#getProtocolVersion()">getProtocolVersion</a></strong>()</code>
<div class="block">Returns the <code>ProtocolVersion</code> from the origin
<code>HttpResponse</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html#getReasonPhrase()">getReasonPhrase</a></strong>()</code>
<div class="block">Gets the reason phrase from the origin
<code>HttpResponse</code>, for example, "Not Modified".</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html#getRequestDate()">getRequestDate</a></strong>()</code>
<div class="block">Returns the time the associated origin request was initiated by the
caching module.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html#getRequestMethod()">getRequestMethod</a></strong>()</code>
<div class="block">Returns the HTTP request method that was used to create the cached
response entry.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/http/client/cache/Resource.html" title="interface in org.apache.http.client.cache">Resource</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html#getResource()">getResource</a></strong>()</code>
<div class="block">Returns the <a href="../../../../../org/apache/http/client/cache/Resource.html" title="interface in org.apache.http.client.cache"><code>Resource</code></a> containing the origin response body.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html#getResponseDate()">getResponseDate</a></strong>()</code>
<div class="block">Returns the time the origin response was received by the caching module.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html#getStatusCode()">getStatusCode</a></strong>()</code>
<div class="block">Returns the HTTP response code from the origin
<code>HttpResponse</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>org.apache.http.StatusLine</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html#getStatusLine()">getStatusLine</a></strong>()</code>
<div class="block">Returns the <code>StatusLine</code> from the origin
<code>HttpResponse</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html#getVariantMap()">getVariantMap</a></strong>()</code>
<div class="block">Returns an index about where in the cache different variants for
a given resource are stored.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html#hasVariants()">hasVariants</a></strong>()</code>
<div class="block">Indicates whether the origin response indicated the associated
resource had variants (i.e.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html#toString()">toString</a></strong>()</code>
<div class="block">Provides a string representation of this instance suitable for
human consumption.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="HttpCacheEntry(java.util.Date, java.util.Date, org.apache.http.StatusLine, org.apache.http.Header[], org.apache.http.client.cache.Resource, java.util.Map, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HttpCacheEntry</h4>
<pre>public&nbsp;HttpCacheEntry(<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;requestDate,
<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;responseDate,
org.apache.http.StatusLine&nbsp;statusLine,
org.apache.http.Header[]&nbsp;responseHeaders,
<a href="../../../../../org/apache/http/client/cache/Resource.html" title="interface in org.apache.http.client.cache">Resource</a>&nbsp;resource,
<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;variantMap,
<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;requestMethod)</pre>
<div class="block">Create a new <a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html" title="class in org.apache.http.client.cache"><code>HttpCacheEntry</code></a> with variants.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>requestDate</code> - Date/time when the request was made (Used for age
calculations)</dd><dd><code>responseDate</code> - Date/time that the response came back (Used for age
calculations)</dd><dd><code>statusLine</code> - HTTP status line from origin response</dd><dd><code>responseHeaders</code> - Header[] from original HTTP Response</dd><dd><code>resource</code> - representing origin response body</dd><dd><code>variantMap</code> - describing cache entries that are variants
of this parent entry; this maps a "variant key" (derived
from the varying request headers) to a "cache key" (where
in the cache storage the particular variant is located)</dd><dd><code>requestMethod</code> - HTTP method used when the request was made</dd></dl>
</li>
</ul>
<a name="HttpCacheEntry(java.util.Date, java.util.Date, org.apache.http.StatusLine, org.apache.http.Header[], org.apache.http.client.cache.Resource, java.util.Map)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HttpCacheEntry</h4>
<pre>public&nbsp;HttpCacheEntry(<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;requestDate,
<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;responseDate,
org.apache.http.StatusLine&nbsp;statusLine,
org.apache.http.Header[]&nbsp;responseHeaders,
<a href="../../../../../org/apache/http/client/cache/Resource.html" title="interface in org.apache.http.client.cache">Resource</a>&nbsp;resource,
<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;variantMap)</pre>
<div class="block">Create a new <a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html" title="class in org.apache.http.client.cache"><code>HttpCacheEntry</code></a> with variants.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>requestDate</code> - Date/time when the request was made (Used for age
calculations)</dd><dd><code>responseDate</code> - Date/time that the response came back (Used for age
calculations)</dd><dd><code>statusLine</code> - HTTP status line from origin response</dd><dd><code>responseHeaders</code> - Header[] from original HTTP Response</dd><dd><code>resource</code> - representing origin response body</dd><dd><code>variantMap</code> - describing cache entries that are variants
of this parent entry; this maps a "variant key" (derived
from the varying request headers) to a "cache key" (where
in the cache storage the particular variant is located)</dd></dl>
</li>
</ul>
<a name="HttpCacheEntry(java.util.Date, java.util.Date, org.apache.http.StatusLine, org.apache.http.Header[], org.apache.http.client.cache.Resource)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HttpCacheEntry</h4>
<pre>public&nbsp;HttpCacheEntry(<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;requestDate,
<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;responseDate,
org.apache.http.StatusLine&nbsp;statusLine,
org.apache.http.Header[]&nbsp;responseHeaders,
<a href="../../../../../org/apache/http/client/cache/Resource.html" title="interface in org.apache.http.client.cache">Resource</a>&nbsp;resource)</pre>
<div class="block">Create a new <a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html" title="class in org.apache.http.client.cache"><code>HttpCacheEntry</code></a>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>requestDate</code> - Date/time when the request was made (Used for age
calculations)</dd><dd><code>responseDate</code> - Date/time that the response came back (Used for age
calculations)</dd><dd><code>statusLine</code> - HTTP status line from origin response</dd><dd><code>responseHeaders</code> - Header[] from original HTTP Response</dd><dd><code>resource</code> - representing origin response body</dd></dl>
</li>
</ul>
<a name="HttpCacheEntry(java.util.Date, java.util.Date, org.apache.http.StatusLine, org.apache.http.Header[], org.apache.http.client.cache.Resource, java.lang.String)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>HttpCacheEntry</h4>
<pre>public&nbsp;HttpCacheEntry(<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;requestDate,
<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;responseDate,
org.apache.http.StatusLine&nbsp;statusLine,
org.apache.http.Header[]&nbsp;responseHeaders,
<a href="../../../../../org/apache/http/client/cache/Resource.html" title="interface in org.apache.http.client.cache">Resource</a>&nbsp;resource,
<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;requestMethod)</pre>
<div class="block">Create a new <a href="../../../../../org/apache/http/client/cache/HttpCacheEntry.html" title="class in org.apache.http.client.cache"><code>HttpCacheEntry</code></a>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>requestDate</code> - Date/time when the request was made (Used for age
calculations)</dd><dd><code>responseDate</code> - Date/time that the response came back (Used for age
calculations)</dd><dd><code>statusLine</code> - HTTP status line from origin response</dd><dd><code>responseHeaders</code> - Header[] from original HTTP Response</dd><dd><code>resource</code> - representing origin response body</dd><dd><code>requestMethod</code> - HTTP method used when the request was made</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getStatusLine()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStatusLine</h4>
<pre>public&nbsp;org.apache.http.StatusLine&nbsp;getStatusLine()</pre>
<div class="block">Returns the <code>StatusLine</code> from the origin
<code>HttpResponse</code>.</div>
</li>
</ul>
<a name="getProtocolVersion()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getProtocolVersion</h4>
<pre>public&nbsp;org.apache.http.ProtocolVersion&nbsp;getProtocolVersion()</pre>
<div class="block">Returns the <code>ProtocolVersion</code> from the origin
<code>HttpResponse</code>.</div>
</li>
</ul>
<a name="getReasonPhrase()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReasonPhrase</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getReasonPhrase()</pre>
<div class="block">Gets the reason phrase from the origin
<code>HttpResponse</code>, for example, "Not Modified".</div>
</li>
</ul>
<a name="getStatusCode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStatusCode</h4>
<pre>public&nbsp;int&nbsp;getStatusCode()</pre>
<div class="block">Returns the HTTP response code from the origin
<code>HttpResponse</code>.</div>
</li>
</ul>
<a name="getRequestDate()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRequestDate</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;getRequestDate()</pre>
<div class="block">Returns the time the associated origin request was initiated by the
caching module.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util"><code>Date</code></a></dd></dl>
</li>
</ul>
<a name="getResponseDate()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getResponseDate</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;getResponseDate()</pre>
<div class="block">Returns the time the origin response was received by the caching module.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util"><code>Date</code></a></dd></dl>
</li>
</ul>
<a name="getAllHeaders()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAllHeaders</h4>
<pre>public&nbsp;org.apache.http.Header[]&nbsp;getAllHeaders()</pre>
<div class="block">Returns all the headers that were on the origin response.</div>
</li>
</ul>
<a name="getFirstHeader(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFirstHeader</h4>
<pre>public&nbsp;org.apache.http.Header&nbsp;getFirstHeader(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</pre>
<div class="block">Returns the first header from the origin response with the given
name.</div>
</li>
</ul>
<a name="getHeaders(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHeaders</h4>
<pre>public&nbsp;org.apache.http.Header[]&nbsp;getHeaders(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</pre>
<div class="block">Gets all the headers with the given name that were on the origin
response.</div>
</li>
</ul>
<a name="getDate()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDate</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;getDate()</pre>
<div class="block">Gets the Date value of the "Date" header or null if the header is missing or cannot be
parsed.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>4.3</dd></dl>
</li>
</ul>
<a name="getResource()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getResource</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/http/client/cache/Resource.html" title="interface in org.apache.http.client.cache">Resource</a>&nbsp;getResource()</pre>
<div class="block">Returns the <a href="../../../../../org/apache/http/client/cache/Resource.html" title="interface in org.apache.http.client.cache"><code>Resource</code></a> containing the origin response body.</div>
</li>
</ul>
<a name="hasVariants()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasVariants</h4>
<pre>public&nbsp;boolean&nbsp;hasVariants()</pre>
<div class="block">Indicates whether the origin response indicated the associated
resource had variants (i.e. that the Vary header was set on the
origin response).</div>
<dl><dt><span class="strong">Returns:</span></dt><dd><code>true</code> if this cached response was a variant</dd></dl>
</li>
</ul>
<a name="getVariantMap()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getVariantMap</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;getVariantMap()</pre>
<div class="block">Returns an index about where in the cache different variants for
a given resource are stored. This maps "variant keys" to "cache keys",
where the variant key is derived from the varying request headers,
and the cache key is the location in the
<a href="../../../../../org/apache/http/client/cache/HttpCacheStorage.html" title="interface in org.apache.http.client.cache"><code>HttpCacheStorage</code></a> where that
particular variant is stored. The first variant returned is used as
the "parent" entry to hold this index of the other variants.</div>
</li>
</ul>
<a name="getRequestMethod()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRequestMethod</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getRequestMethod()</pre>
<div class="block">Returns the HTTP request method that was used to create the cached
response entry.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>4.4</dd></dl>
</li>
</ul>
<a name="toString()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString()</pre>
<div class="block">Provides a string representation of this instance suitable for
human consumption.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></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><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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="class-use/HttpCacheEntry.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">
<ul class="navList">
<li><a href="../../../../../org/apache/http/client/cache/HttpCacheContext.html" title="class in org.apache.http.client.cache"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/http/client/cache/HttpCacheEntrySerializationException.html" title="class in org.apache.http.client.cache"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/http/client/cache/HttpCacheEntry.html" target="_top">Frames</a></li>
<li><a href="HttpCacheEntry.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All 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><a href="#constructor_summary">Constr</a>&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><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 1999&#x2013;2022 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>