public final class CacheDirective extends Parameter
Constructor and Description |
---|
CacheDirective(java.lang.String name)
Constructor for directives with no value.
|
CacheDirective(java.lang.String name,
java.lang.String value)
Constructor for directives with a value.
|
CacheDirective(java.lang.String name,
java.lang.String value,
boolean digit)
Constructor for directives with a value.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isDigit()
Returns true if the directive contains a digit value.
|
static CacheDirective |
maxAge(int maxAge)
Creates a "max-age" directive.
|
static CacheDirective |
maxStale()
Creates a "max-stale" directive.
|
static CacheDirective |
maxStale(int maxStale)
Creates a "max-stale" directive.
|
static CacheDirective |
minFresh(int minFresh)
Creates a "min-fresh" directive.
|
static CacheDirective |
mustRevalidate()
Creates a "must-revalidate" directive.
|
static CacheDirective |
noCache()
Creates a "no-cache" directive.
|
static CacheDirective |
noCache(java.util.List<java.lang.String> fieldNames)
Creates a "no-cache" directive.
|
static CacheDirective |
noCache(java.lang.String fieldName)
Creates a "no-cache" directive.
|
static CacheDirective |
noStore()
Creates a "no-store" directive.
|
static CacheDirective |
noTransform()
Creates a "no-transform" directive.
|
static CacheDirective |
onlyIfCached()
Creates a "onlyIfCached" directive.
|
static CacheDirective |
privateInfo()
Creates a "private" directive.
|
static CacheDirective |
privateInfo(java.util.List<java.lang.String> fieldNames)
Creates a "private" directive.
|
static CacheDirective |
privateInfo(java.lang.String fieldName)
Creates a "private" directive.
|
static CacheDirective |
proxyMustRevalidate()
Creates a "proxy-revalidate" directive.
|
static CacheDirective |
publicInfo()
Creates a "public" directive.
|
void |
setDigit(boolean digit)
Indicates if the directive is a digit value.
|
static CacheDirective |
sharedMaxAge(int sharedMaxAge)
Creates a "s-maxage" directive.
|
compareTo, create, encode, encode, getName, getValue, setName, setValue
public CacheDirective(java.lang.String name)
name
- The directive name.public CacheDirective(java.lang.String name, java.lang.String value)
name
- The directive name.value
- The directive value.public CacheDirective(java.lang.String name, java.lang.String value, boolean digit)
name
- The directive name.value
- The directive value.digit
- The kind of value (true for a digit value, false otherwise).public static CacheDirective maxAge(int maxAge)
maxAge
- Maximum age in seconds.public static CacheDirective maxStale()
public static CacheDirective maxStale(int maxStale)
maxStale
- Maximum stale age in seconds.public static CacheDirective minFresh(int minFresh)
minFresh
- Minimum freshness lifetime in seconds.public static CacheDirective mustRevalidate()
public static CacheDirective noCache()
public static CacheDirective noCache(java.util.List<java.lang.String> fieldNames)
fieldNames
- Field names, typically a HTTP header name, that must not be
sent by caches.public static CacheDirective noCache(java.lang.String fieldName)
fieldName
- A field name, typically a HTTP header name, that must not be
sent by caches.public static CacheDirective noStore()
public static CacheDirective noTransform()
public static CacheDirective onlyIfCached()
public static CacheDirective privateInfo()
public static CacheDirective privateInfo(java.util.List<java.lang.String> fieldNames)
fieldNames
- Field names, typically a HTTP header name, that must be
private.public static CacheDirective privateInfo(java.lang.String fieldName)
fieldName
- A field name, typically a HTTP header name, that is private.public static CacheDirective proxyMustRevalidate()
public static CacheDirective publicInfo()
public static CacheDirective sharedMaxAge(int sharedMaxAge)
sharedMaxAge
- Maximum age in seconds.public boolean isDigit()
public void setDigit(boolean digit)
digit
- True if the directive contains a digit value.Copyright © 2005-2012. All Rights Reserved.