| java.lang.Object compressionFilters.CompressionFilter
CompressionFilter | public class CompressionFilter implements Filter(Code) | | Implementation of javax.servlet.Filter used to compress
the ServletResponse if it is bigger than a threshold.
author: Amy Roh author: Dmitri Valdin version: $Revision: 1.2 $, $Date: 2004/03/18 16:40:33 $ |
Method Summary | |
public void | destroy() Take this filter out of service. | public void | doFilter(ServletRequest request, ServletResponse response, 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.
The FilterChain passed into this method allows the Filter to pass on the
request and response to the next entity in the chain.
This method first examines the request to check whether the client support
compression. | public FilterConfig | getFilterConfig() | public void | init(FilterConfig filterConfig) Place this filter into service. | public void | setFilterConfig(FilterConfig filterConfig) Set filter config
This function is equivalent to init. |
compressionThreshold | protected int compressionThreshold(Code) | | The threshold number to compress
|
destroy | public void destroy()(Code) | | Take this filter out of service.
|
doFilter | public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException(Code) | | 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.
The FilterChain passed into this method allows the Filter to pass on the
request and response to the next entity in the chain.
This method first examines the request to check whether the client support
compression.
It simply just pass the request and response if there is no support for
compression.
If the compression support is available, it creates a
CompressionServletResponseWrapper object which compresses the content and
modifies the header if the content length is big enough.
It then invokes the next entity in the chain using the FilterChain object
(chain.doFilter() ),
|
getFilterConfig | public FilterConfig getFilterConfig()(Code) | | Return filter config
Required by Weblogic 6.1
|
init | public void init(FilterConfig filterConfig)(Code) | | Place this filter into service.
Parameters: filterConfig - The filter configuration object |
setFilterConfig | public void setFilterConfig(FilterConfig filterConfig)(Code) | | Set filter config
This function is equivalent to init. Required by Weblogic 6.1
Parameters: filterConfig - The filter configuration object |
|
|