@Contract(threading=IMMUTABLE)
class CacheKeyGenerator
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static java.net.URI |
BASE_URI |
| Constructor and Description |
|---|
CacheKeyGenerator() |
| Modifier and Type | Method and Description |
|---|---|
private int |
canonicalizePort(int port,
java.lang.String protocol) |
java.lang.String |
canonicalizeUri(java.lang.String uri) |
protected java.lang.String |
getFullHeaderValue(org.apache.http.Header[] headers) |
java.lang.String |
getURI(org.apache.http.HttpHost host,
org.apache.http.HttpRequest req)
For a given
HttpHost and HttpRequest get a URI from the
pair that I can use as an identifier KEY into my HttpCache |
java.lang.String |
getVariantKey(org.apache.http.HttpRequest req,
HttpCacheEntry entry)
Compute a "variant key" from the headers of a given request that are
covered by the Vary header of a given cache entry.
|
java.lang.String |
getVariantURI(org.apache.http.HttpHost host,
org.apache.http.HttpRequest req,
HttpCacheEntry entry)
For a given
HttpHost and HttpRequest if the request has a
VARY header - I need to get an additional URI from the pair of host and
request so that I can also store the variant into my HttpCache. |
private boolean |
isRelativeRequest(org.apache.http.HttpRequest req) |
public java.lang.String getURI(org.apache.http.HttpHost host,
org.apache.http.HttpRequest req)
HttpHost and HttpRequest get a URI from the
pair that I can use as an identifier KEY into my HttpCachehost - The host for this requestreq - the HttpRequestpublic java.lang.String canonicalizeUri(java.lang.String uri)
private int canonicalizePort(int port,
java.lang.String protocol)
private boolean isRelativeRequest(org.apache.http.HttpRequest req)
protected java.lang.String getFullHeaderValue(org.apache.http.Header[] headers)
public java.lang.String getVariantURI(org.apache.http.HttpHost host,
org.apache.http.HttpRequest req,
HttpCacheEntry entry)
HttpHost and HttpRequest if the request has a
VARY header - I need to get an additional URI from the pair of host and
request so that I can also store the variant into my HttpCache.host - The host for this requestreq - the HttpRequestentry - the parent entry used to track the variantspublic java.lang.String getVariantKey(org.apache.http.HttpRequest req,
HttpCacheEntry entry)
req - originating requestentry - cache entry in question that has variantsString variant key