|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object compressionFilters.CompressionFilter
Implementation of javax.servlet.Filter
used to compress
the ServletResponse if it is bigger than a threshold.
Field Summary | |
protected int |
compressionThreshold
The threshold number to compress |
Constructor Summary | |
CompressionFilter()
|
Method Summary | |
void |
destroy()
Take this filter out of service. |
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.
|
FilterConfig |
getFilterConfig()
Return filter config Required by Weblogic 6.1 |
void |
init(FilterConfig filterConfig)
Place this filter into service. |
void |
setFilterConfig(FilterConfig filterConfig)
Set filter config This function is equivalent to init. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int compressionThreshold
Constructor Detail |
public CompressionFilter()
Method Detail |
public void init(FilterConfig filterConfig)
init
in interface Filter
filterConfig
- The filter configuration objectpublic void destroy()
destroy
in interface Filter
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws 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 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()
),
doFilter
in interface Filter
IOException
ServletException
public void setFilterConfig(FilterConfig filterConfig)
filterConfig
- The filter configuration objectpublic FilterConfig getFilterConfig()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |