Package com.sun.appserv.web.cache.filter
Class CachingFilter
- java.lang.Object
-
- com.sun.appserv.web.cache.filter.CachingFilter
-
- All Implemented Interfaces:
CacheManagerListener
,jakarta.servlet.Filter
public class CachingFilter extends Object implements jakarta.servlet.Filter, CacheManagerListener
-
-
Constructor Summary
Constructors Constructor Description CachingFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cacheManagerDisabled()
cache manager listener methodvoid
cacheManagerEnabled()
cache manager listener methodvoid
destroy()
Called by the web container to indicate to a filter that it is being taken out of service.void
doFilter(jakarta.servlet.ServletRequest srequest, jakarta.servlet.ServletResponse sresponse, jakarta.servlet.FilterChain chain)
ThedoFilter
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(jakarta.servlet.FilterConfig filterConfig)
Called by the web container to indicate to a filter that it is being placed into service.
-
-
-
Method Detail
-
init
public void init(jakarta.servlet.FilterConfig filterConfig) throws jakarta.servlet.ServletException
Called by the web container to indicate to a filter that it is being placed into service. The servlet container calls the init method exactly once after instantiating the filter. The init method must complete successfully before the filter is asked to do any filtering work.- Specified by:
init
in interfacejakarta.servlet.Filter
- Parameters:
filterConfig
- filter config- Throws:
jakarta.servlet.ServletException
-
doFilter
public void doFilter(jakarta.servlet.ServletRequest srequest, jakarta.servlet.ServletResponse sresponse, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException
ThedoFilter
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.- Specified by:
doFilter
in interfacejakarta.servlet.Filter
- Parameters:
srequest
- the runtime requestsresponse
- the runtime responsechain
- the filter chain to in the request processing- Throws:
IOException
jakarta.servlet.ServletException
-
cacheManagerEnabled
public void cacheManagerEnabled()
cache manager listener method- Specified by:
cacheManagerEnabled
in interfaceCacheManagerListener
-
cacheManagerDisabled
public void cacheManagerDisabled()
cache manager listener method- Specified by:
cacheManagerDisabled
in interfaceCacheManagerListener
-
destroy
public void destroy()
Called by the web container to indicate to a filter that it is being taken out of service. This method is only called once all threads within the filter's doFilter method have exited or after a timeout period has passed. After the web container calls this method, it will not call the doFilter method again on this instance of the filter.- Specified by:
destroy
in interfacejakarta.servlet.Filter
-
-