All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.www.http.HttpCacheControl

java.lang.Object
   |
   +----w3c.www.http.BasicValue
           |
           +----w3c.www.http.HttpCacheControl

public class HttpCacheControl
extends BasicValue
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.


Constructor Index

 o HttpCacheControl()
Create a new empty cache control object descriptor.

Method Index

 o addNoCache(String)
Add the given header name to the no-cache directive.
 o checkMustRevalidate()
Is the must-revalidate flag set ?
 o checkNoStore()
Is the no-store flag set ?
 o checkNoTransform()
Is the no-transform flag set ?
 o checkOnlyIfCached()
Is the on-if-cached flag value set ?
 o checkProxyRevalidate()
Is the proxy-revalidate flag set ?
 o checkPublic()
Is the public flag set ?
 o getMaxAge()
Get the max-age value defined by this cache control policy.
 o getMaxStale()
Get the max-stale value defined by this control object.
 o getMinFresh()
Get the min-fresh directive value.
 o getNoCache()
Get and test the no-cache directive setting.
 o getPrivate()
Check and get the private value.
 o getValue()
HeaderValue implementation - Get this header value.
 o parse()
Parse this header value into its various components.
 o setMaxAge(int)
Set the max-age directive for this cache control.
 o setMaxStale(int)
Set the max-stale directive value.
 o setMinFresh(int)
Set the minfresh directive value.
 o setMustRevalidate(boolean)
Set the must-revalidate directive.
 o setNoCache()
Set the no-cache directive globally.
 o setNoCache(String[])
Set the no cache directive to the given list of fields.
 o setNoStore(boolean)
Set the no-store flag.
 o setNoTransform(boolean)
Set the no-transform directive.
 o setOnlyIfCached(boolean)
Set the only-if-cached directive.
 o setPrivate(String[])
Set the private directive value.
 o setProxyRevalidate(boolean)
Set the proxy-revalidate directive.
 o setPublic(boolean)
Set the public directive.
 o unsetNoCache()
Unset the no-cache directive.
 o unsetPrivate()
Unset the private directive.
 o updateByteValue()
Recompute the byte value for this header.

Constructors

 o HttpCacheControl
 public HttpCacheControl()
Create a new empty cache control object descriptor. The value will be provided through parsing.

Methods

 o updateByteValue
 protected void updateByteValue()
Recompute the byte value for this header.

Overrides:
updateByteValue in class BasicValue
 o parse
 protected void parse() throws HttpParserException
Parse this header value into its various components.

Overrides:
parse in class BasicValue
 o getValue
 public Object getValue()
HeaderValue implementation - Get this header value.

Returns:
Itself !
Overrides:
getValue in class BasicValue
 o getNoCache
 public String[] getNoCache()
Get and test the no-cache directive setting.

Returns:
A field-list as an array of String, or null if the directive is undefined.
 o setNoCache
 public void setNoCache(String fields[])
Set the no cache directive to the given list of fields.

Parameters:
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.
 o setNoCache
 public void setNoCache()
Set the no-cache directive globally.

 o addNoCache
 public void addNoCache(String name)
Add the given header name to the no-cache directive.

Parameters:
name - The header name to add.
 o unsetNoCache
 public void unsetNoCache()
Unset the no-cache directive.

 o checkNoStore
 public boolean checkNoStore()
Is the no-store flag set ?

Returns:
A boolean.
 o setNoStore
 public void setNoStore(boolean onoff)
Set the no-store flag.

Parameters:
onoff - The value for the no-store directive.
 o getMaxAge
 public final int getMaxAge()
Get the max-age value defined by this cache control policy.

Returns:
The max-age value, or -1 if undefined.
 o setMaxAge
 public void setMaxAge(int age)
Set the max-age directive for this cache control.

Parameters:
age - The max allowed age for the cache control policy, or -1 to reset value.
 o getMaxStale
 public int getMaxStale()
Get the max-stale value defined by this control object.

Returns:
The max-stale value, or -1 if undefined.
 o setMaxStale
 public void setMaxStale(int stale)
Set the max-stale directive value.

Parameters:
stale - The max-stale value, or -1 to reset value.
 o getMinFresh
 public int getMinFresh()
Get the min-fresh directive value.

Parameters:
def - The default value to reurn if undefined.
 o setMinFresh
 public void setMinFresh(int fresh)
Set the minfresh directive value.

Parameters:
fresh - The new minfresh value, or -1 to reset value.
 o checkOnlyIfCached
 public boolean checkOnlyIfCached()
Is the on-if-cached flag value set ?

Returns:
A boolean.
 o setOnlyIfCached
 public void setOnlyIfCached(boolean onoff)
Set the only-if-cached directive.

Parameters:
onoff - The boolean value for the directive.
 o checkPublic
 public boolean checkPublic()
Is the public flag set ?

Returns:
A boolean.
 o setPublic
 public void setPublic(boolean onoff)
Set the public directive.

Parameters:
onoff - The public directive value.
 o getPrivate
 public String[] getPrivate()
Check and get the private value.

Parameters:
def - The default value if undefined.
Returns:
A list of field-names, as a String array, or the provided default value otherwise.
 o setPrivate
 public void setPrivate(String priv[])
Set the private directive value.

Parameters:
priv - The list of field-names as a String array.
 o unsetPrivate
 public void unsetPrivate()
Unset the private directive.

 o checkNoTransform
 public boolean checkNoTransform()
Is the no-transform flag set ?

Returns:
A boolean.
 o setNoTransform
 public void setNoTransform(boolean onoff)
Set the no-transform directive.

Parameters:
onoff - The new boolean value for the no-transform directive.
 o checkMustRevalidate
 public boolean checkMustRevalidate()
Is the must-revalidate flag set ?

Returns:
A boolean.
 o setMustRevalidate
 public void setMustRevalidate(boolean onoff)
Set the must-revalidate directive.

Parameters:
onoff - The new value for the must-revalidate directive.
 o checkProxyRevalidate
 public boolean checkProxyRevalidate()
Is the proxy-revalidate flag set ?

Returns:
A boolean.
 o setProxyRevalidate
 public void setProxyRevalidate(boolean onoff)
Set the proxy-revalidate directive.

Parameters:
onoff - The new proxy-revalidate value.

All Packages  Class Hierarchy  This Package  Previous  Next  Index