public class CacheControl
extends java.lang.Object
| Constructor and Description |
|---|
CacheControl()
Create a new instance of CacheControl.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Compares object argument to this cache control to see if they are the same considering all property values.
|
java.util.Map<java.lang.String,java.lang.String> |
getCacheExtension()
Corresponds to a set of extension cache control directives.
|
int |
getMaxAge()
Corresponds to the max-age cache control directive.
|
java.util.List<java.lang.String> |
getNoCacheFields()
Corresponds to the value of the no-cache cache control directive.
|
java.util.List<java.lang.String> |
getPrivateFields()
Corresponds to the value of the private cache control directive.
|
int |
getSMaxAge()
Corresponds to the s-maxage cache control directive.
|
int |
hashCode()
Generate hash code from cache control properties.
|
boolean |
isMustRevalidate()
Corresponds to the must-revalidate cache control directive.
|
boolean |
isNoCache()
Corresponds to the no-cache cache control directive.
|
boolean |
isNoStore()
Corresponds to the no-store cache control directive.
|
boolean |
isNoTransform()
Corresponds to the no-transform cache control directive.
|
boolean |
isPrivate()
Corresponds to the private cache control directive.
|
boolean |
isProxyRevalidate()
Corresponds to the proxy-revalidate cache control directive.
|
void |
setMaxAge(int maxAge)
Corresponds to the max-age cache control directive.
|
void |
setMustRevalidate(boolean mustRevalidate)
Corresponds to the must-revalidate cache control directive.
|
void |
setNoCache(boolean noCache)
Corresponds to the no-cache cache control directive.
|
void |
setNoStore(boolean noStore)
Corresponds to the no-store cache control directive.
|
void |
setNoTransform(boolean noTransform)
Corresponds to the no-transform cache control directive.
|
void |
setPrivate(boolean flag)
Corresponds to the private cache control directive.
|
void |
setProxyRevalidate(boolean proxyRevalidate)
Corresponds to the must-revalidate cache control directive.
|
void |
setSMaxAge(int smaxAge)
Corresponds to the s-maxage cache control directive.
|
java.lang.String |
toString()
Deprecated.
The format of the toString() method is subject to change in a future version. Please use
RuntimeDelegate.getInstance().createHeaderDelegate(CacheControl.class).toString(value) instead if you rely on the
format of this method.
|
static CacheControl |
valueOf(java.lang.String value)
Deprecated.
This method will be removed in a future version. Please use
RuntimeDelegate.getInstance().createHeaderDelegate(CacheControl.class).fromString(value) instead.
|
public CacheControl()
@Deprecated public static CacheControl valueOf(java.lang.String value)
value - the cache control stringjava.lang.IllegalArgumentException - if the supplied string cannot be parsed or is nullpublic boolean isMustRevalidate()
public void setMustRevalidate(boolean mustRevalidate)
mustRevalidate - true if the must-revalidate cache control directive should be included in the response, false
otherwise.public boolean isProxyRevalidate()
public void setProxyRevalidate(boolean proxyRevalidate)
proxyRevalidate - true if the proxy-revalidate cache control directive should be included in the response, false
otherwise.public int getMaxAge()
public void setMaxAge(int maxAge)
maxAge - the value of the max-age cache control directive, a value of -1 will disable the directive.public int getSMaxAge()
public void setSMaxAge(int smaxAge)
smaxAge - the value of the s-maxage cache control directive, a value of -1 will disable the directive.public java.util.List<java.lang.String> getNoCacheFields()
isNoCache(),
setNoCache(boolean),
HTTP/1.1 section 14.9.1public void setNoCache(boolean noCache)
noCache - true if the no-cache cache control directive should be included in the response, false otherwise.getNoCacheFields(),
HTTP/1.1 section 14.9.1public boolean isNoCache()
getNoCacheFields(),
HTTP/1.1 section 14.9.1public boolean isPrivate()
getPrivateFields(),
HTTP/1.1 section 14.9.1public java.util.List<java.lang.String> getPrivateFields()
isPrivate(),
setPrivate(boolean),
HTTP/1.1 section 14.9.1public void setPrivate(boolean flag)
flag - true if the private cache control directive should be included in the response, false otherwise.getPrivateFields(),
HTTP/1.1 section 14.9.1public boolean isNoTransform()
public void setNoTransform(boolean noTransform)
noTransform - true if the no-transform cache control directive should be included in the response, false
otherwise.public boolean isNoStore()
public void setNoStore(boolean noStore)
noStore - true if the no-store cache control directive should be included in the response, false otherwise.public java.util.Map<java.lang.String,java.lang.String> getCacheExtension()
@Deprecated public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to compare to