|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<CacheMode>
org.torweg.pulse.service.request.CacheMode
public enum CacheMode
sets the cache level for a response sent back via HTTP.
setResponseHeaders(HttpServletResponse), setResponseHeaders(ServiceRequest)| Enum Constant Summary | |
|---|---|
INTELLICACHE
used in conjunction with IntelliCache;
allows private caching, forces contents to be checked for changes upon
each request. |
|
NONE
disallow caching. |
|
PRIVATE
allow caching in the browser (default max-age set to 1 day). |
|
PUBLIC
allow caching by both browsers and proxies (default max-age set to 1 day). |
|
| Method Summary | |
|---|---|
int |
getMaxAgeInSeconds()
returns the max-age in seconds for the cached item to be valid. |
abstract void |
setResponseHeaders(javax.servlet.http.HttpServletResponse response)
adds the response headers for the CacheMode. |
void |
setResponseHeaders(ServiceRequest request)
adds the response headers for the CacheMode. |
static CacheMode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static CacheMode[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final CacheMode NONE
Cache-Control: private, no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0
Pragma: no-cache
public static final CacheMode INTELLICACHE
IntelliCache;
allows private caching, forces contents to be checked for changes upon
each request.
Cache-Control: private, must-revalidate, post-check=0, pre-check=0
public static final CacheMode PRIVATE
Cache-Control: private, max-age={given max-age}, post-check={2/3 of given max-age}, pre-check={given max-age}
public static final CacheMode PUBLIC
Cache-Control: public, max-age={given max-age}
| Method Detail |
|---|
public static final CacheMode[] values()
for(CacheMode c : CacheMode.values())
System.out.println(c);
public static CacheMode valueOf(java.lang.String name)
name - the name of the enum constant to be returned.
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified namepublic final int getMaxAgeInSeconds()
public final void setResponseHeaders(ServiceRequest request)
CacheMode.
request - the current ServiceRequestpublic abstract void setResponseHeaders(javax.servlet.http.HttpServletResponse response)
CacheMode.
This method is implemented by the individual Enum values.
response - the HttpServletResponse
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||