org.eclipse.jetty.servlets
Class IncludableGzipFilter

java.lang.Object
  extended by org.eclipse.jetty.servlets.UserAgentFilter
      extended by org.eclipse.jetty.servlets.GzipFilter
          extended by org.eclipse.jetty.servlets.IncludableGzipFilter
All Implemented Interfaces:
Filter

public class IncludableGzipFilter
extends GzipFilter

Includable GZip Filter. This extension to the GzipFilter that uses Jetty features to allow headers to be set during calls to RequestDispatcher.include(javax.servlet.ServletRequest, javax.servlet.ServletResponse). This allows the gzip filter to function correct during includes and to make a decision to gzip or not at the time the buffer fills and on the basis of all response headers. If the init parameter "uncheckedPrintWriter" is set to "true", then the PrintWriter used by the wrapped getWriter will be UncheckedPrintWriter.


Nested Class Summary
 class IncludableGzipFilter.IncludableGzipStream
           
 class IncludableGzipFilter.IncludableResponseWrapper
           
 
Field Summary
 
Fields inherited from class org.eclipse.jetty.servlets.GzipFilter
_bufferSize, _excluded, _mimeTypes, _minGzipSize
 
Constructor Summary
IncludableGzipFilter()
           
 
Method Summary
 void init(FilterConfig filterConfig)
           
protected  GzipResponseWrapper newGzipResponseWrapper(HttpServletRequest request, HttpServletResponse response)
          Allows derived implementations to replace ResponseWrapper implementation.
protected  PrintWriter newWriter(OutputStream out, String encoding)
          Allows derived implementations to replace PrintWriter implementation.
 
Methods inherited from class org.eclipse.jetty.servlets.GzipFilter
destroy, doFilter
 
Methods inherited from class org.eclipse.jetty.servlets.UserAgentFilter
getUserAgent, getUserAgent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IncludableGzipFilter

public IncludableGzipFilter()
Method Detail

init

public void init(FilterConfig filterConfig)
          throws ServletException
Specified by:
init in interface Filter
Overrides:
init in class GzipFilter
Throws:
ServletException
See Also:
UserAgentFilter.init(javax.servlet.FilterConfig)

newGzipResponseWrapper

protected GzipResponseWrapper newGzipResponseWrapper(HttpServletRequest request,
                                                     HttpServletResponse response)
Description copied from class: GzipFilter
Allows derived implementations to replace ResponseWrapper implementation.

Overrides:
newGzipResponseWrapper in class GzipFilter
Parameters:
request - the request
response - the response
Returns:
the gzip response wrapper

newWriter

protected PrintWriter newWriter(OutputStream out,
                                String encoding)
                         throws UnsupportedEncodingException
Description copied from class: GzipFilter
Allows derived implementations to replace PrintWriter implementation.

Overrides:
newWriter in class GzipFilter
Parameters:
out - the out
encoding - the encoding
Returns:
the prints the writer
Throws:
UnsupportedEncodingException


Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.