|
J2EE1.4 SDK | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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 FilterfilterConfig - 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 Filterchain - 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
ServletExceptionpublic void cacheManagerEnabled()
cacheManagerEnabled in interface CacheManagerListenerpublic void cacheManagerDisabled()
cacheManagerDisabled in interface CacheManagerListenerpublic void destroy()
destroy in interface Filter
|
J2EE1.4 SDK | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 2003 Sun Microsystems, Inc. All rights reserved.