|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.w3c.www.http.BasicValue org.w3c.www.http.HttpCacheControl
public class HttpCacheControl
The parsed cache-control directive of HTTP/1.1 This object gives access to the parsed value of the cache-control directive of HTTP/1.1, as defined in section 14.9 of the specification.
Field Summary |
---|
Fields inherited from class org.w3c.www.http.BasicValue |
---|
isValid, raw, rlen, roff |
Constructor Summary | |
---|---|
HttpCacheControl()
Create a new empty cache control object descriptor. |
Method Summary | |
---|---|
void |
addNoCache(java.lang.String name)
Add the given header name to the no-cache directive. |
boolean |
checkMustRevalidate()
Is the must-revalidate flag set ? |
boolean |
checkNoStore()
Is the no-store flag set ? |
boolean |
checkNoTransform()
Is the no-transform flag set ? |
boolean |
checkOnlyIfCached()
Is the on-if-cached flag value set ? |
boolean |
checkProxyRevalidate()
Is the proxy-revalidate flag set ? |
boolean |
checkPublic()
Is the public flag set ? |
int |
getMaxAge()
Get the max-age value defined by this cache control policy. |
int |
getMaxStale()
Get the max-stale value defined by this control object. |
int |
getMinFresh()
Get the min-fresh directive value. |
java.lang.String[] |
getNoCache()
Get and test the no-cache directive setting. |
java.lang.String[] |
getPrivate()
Check and get the private value. |
int |
getSMaxAge()
Get the s-maxage value defined by this cache control policy. |
java.lang.Object |
getValue()
HeaderValue implementation - Get this header value. |
protected void |
parse()
parse. |
void |
setMaxAge(int age)
Set the max-age directive for this cache control. |
void |
setMaxStale(int stale)
Set the max-stale directive value. |
void |
setMinFresh(int fresh)
Set the minfresh directive value. |
void |
setMustRevalidate(boolean onoff)
Set the must-revalidate directive. |
void |
setNoCache()
Set the no-cache directive globally. |
void |
setNoCache(java.lang.String[] fields)
Set the no cache directive to the given list of fields. |
void |
setNoStore(boolean onoff)
Set the no-store flag. |
void |
setNoTransform(boolean onoff)
Set the no-transform directive. |
void |
setOnlyIfCached(boolean onoff)
Set the only-if-cached directive. |
void |
setPrivate(java.lang.String[] priv)
Set the private directive value. |
void |
setProxyRevalidate(boolean onoff)
Set the proxy-revalidate directive. |
void |
setPublic(boolean onoff)
Set the public directive. |
void |
setSMaxAge(int age)
Set the s_maxage directive for this cache control. |
void |
unsetNoCache()
Unset the no-cache directive. |
void |
unsetPrivate()
Unset the private directive. |
protected void |
updateByteValue()
Recompute the byte value for this header. |
Methods inherited from class org.w3c.www.http.BasicValue |
---|
addBytes, appendValue, checkByteValue, clone, emit, error, invalidateByteValue, setBytes, setString, toExternalForm, toString, validate |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HttpCacheControl()
Method Detail |
---|
protected void updateByteValue()
updateByteValue
in class BasicValue
protected void parse() throws HttpParserException
parse
in class BasicValue
HttpParserException
- if parsing failed.public java.lang.Object getValue()
getValue
in interface HeaderValue
getValue
in class BasicValue
public java.lang.String[] getNoCache()
public void setNoCache(java.lang.String[] fields)
fields
- The fields to set in the no-cache directive, encoded
as a String array (whose length can be 0), or
null to reset the value.public void setNoCache()
no-cache
directive globally.
public void addNoCache(java.lang.String name)
no-cache
directive.
name
- The header name to add.public void unsetNoCache()
no-cache
directive.
public boolean checkNoStore()
public void setNoStore(boolean onoff)
no-store
flag.
onoff
- The value for the no-store directive.public final int getMaxAge()
public void setMaxAge(int age)
age
- The max allowed age for the cache control policy, or
-1 to reset value.public final int getSMaxAge()
public void setSMaxAge(int age)
age
- The max allowed age for the cache control policy, or
-1 to reset value.public int getMaxStale()
public void setMaxStale(int stale)
stale
- The max-stale value, or -1 to reset value.public int getMinFresh()
def
- The default value to reurn if undefined.public void setMinFresh(int fresh)
fresh
- The new minfresh value, or -1 to reset
value.public boolean checkOnlyIfCached()
public void setOnlyIfCached(boolean onoff)
onoff
- The boolean value for the directive.public boolean checkPublic()
public void setPublic(boolean onoff)
onoff
- The public directive value.public java.lang.String[] getPrivate()
def
- The default value if undefined.
public void setPrivate(java.lang.String[] priv)
priv
- The list of field-names as a String array.public void unsetPrivate()
private
directive.
public boolean checkNoTransform()
public void setNoTransform(boolean onoff)
onoff
- The new boolean value for the no-transform directive.public boolean checkMustRevalidate()
public void setMustRevalidate(boolean onoff)
onoff
- The new value for the must-revalidate directive.public boolean checkProxyRevalidate()
public void setProxyRevalidate(boolean onoff)
onoff
- The new proxy-revalidate value.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |