|
SunONE Application Server v8.0 PE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.appserv.web.cache.filter.CachingFilter
Constructor Summary | |
CachingFilter()
|
Method Summary | |
void |
cacheManagerDisabled()
cache manager listener method |
void |
cacheManagerEnabled()
cache manager listener method |
void |
destroy()
Called by the web container to indicate to a filter that it is being taken out of service. |
void |
doFilter(ServletRequest srequest,
ServletResponse sresponse,
FilterChain chain)
The doFilter method of the Filter is called by the container
each time a request/response pair is passed through the chain due
to a client request for a resource at the end of the chain. |
void |
init(FilterConfig filterConfig)
Called by the web container to indicate to a filter that it is being placed into service. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CachingFilter()
Method Detail |
public void init(FilterConfig filterConfig) throws ServletException
init
in interface Filter
filterConfig
- filter config
ServletException
public void doFilter(ServletRequest srequest, ServletResponse sresponse, FilterChain chain) throws java.io.IOException, ServletException
doFilter
method of the Filter is called by the container
each time a request/response pair is passed through the chain due
to a client request for a resource at the end of the chain. The
FilterChain passed in to this method allows the Filter to pass on the
request and response to the next entity in the chain.
doFilter
in interface Filter
chain
- the filter chain to in the request processing
IOException,
- ServletException
- First check if this HTTP method permits caching (using helper)
if not, call the downstream filter and return.
- Otherwise, get the key based on the request (using helper).
- Check if we have a response entry in the cache already.
- If there is entry and is valid, write out the response from that entry.
- create a CachingResponse and CachingOutputStream wrappers and call
the downstream filter
java.io.IOException
ServletException
public void cacheManagerEnabled()
cacheManagerEnabled
in interface CacheManagerListener
public void cacheManagerDisabled()
cacheManagerDisabled
in interface CacheManagerListener
public void destroy()
destroy
in interface Filter
|
SunONE Application Server v8.0 PE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2003 Sun Microsystems, Inc. All rights reserved.