|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.ws.rs.core.CacheControl
public class CacheControl
An abstraction for the value of a HTTP Cache-Control response header.
Constructor Summary | |
---|---|
CacheControl()
Create a new instance of CacheControl. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Compares obj 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 _private)
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()
Convert the cache control to a string suitable for use as the value of the corresponding HTTP header. |
static CacheControl |
valueOf(java.lang.String value)
Creates a new instance of CacheControl by parsing the supplied string. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CacheControl()
Method Detail |
---|
public static CacheControl valueOf(java.lang.String value) throws java.lang.IllegalArgumentException
value
- the cache control string
java.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 _private)
_private
- 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()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to compare to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |