Class GzipHandler
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.util.component.ContainerLifeCycle
-
- org.eclipse.jetty.server.handler.AbstractHandler
-
- org.eclipse.jetty.server.handler.AbstractHandlerContainer
-
- org.eclipse.jetty.server.handler.HandlerWrapper
-
- org.eclipse.jetty.server.handler.gzip.GzipHandler
-
- All Implemented Interfaces:
Handler
,GzipFactory
,HandlerContainer
,Container
,Destroyable
,Dumpable
,Dumpable.DumpableContainer
,LifeCycle
@Deprecated(since="2021-05-27") public class GzipHandler extends HandlerWrapper implements GzipFactory
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.A Handler that can dynamically GZIP uncompress requests, and compress responses.The GzipHandler can be applied to the entire server (a
gzip.mod
is included in thejetty-home
) or it may be applied to individual contexts.Both Request uncompress and Response compress are gated by a configurable
DispatcherType
check on the GzipHandler. (This is similar in behavior to aFilter
configuration you would find in a Servlet Descriptor file (WEB-INF/web.xml
)
(Default:DispatcherType.REQUEST
).Requests with a
Content-Encoding
header with the valuegzip
will be uncompressed by aGzipHttpInputInterceptor
for any API that usesServletRequest.getInputStream()
orServletRequest.getReader()
.Response compression has a number of checks before GzipHandler will perform compression.
-
Does the request contain a
Accept-Encoding
header that specifiesgzip
value? -
Is the
HttpServletRequest.getMethod()
allowed by the configured HTTP Method Filter.
(Default:GET
) -
Is the incoming Path allowed by the configured Path Specs filters?
(Default: all paths are allowed) -
Is the Request User-Agent allowed by the configured User-Agent filters?
(Default: MSIE 6 is excluded) -
Is the Response
Content-Length
header present, and does its value meet the minimum gzip size requirements (default 32 bytes)? -
Is the Request
Accept
header present and does it contain the requiredgzip
value?
When you encounter a configurable filter in the GzipHandler (method, paths, user-agent, mime-types, etc) that has both Included and Excluded values, note that the Included values always win over the Excluded values.
Important note about Default Values: It is important to note that the GzipHandler will automatically configure itself from the MimeType present on the Server, System, and Contexts and the ultimate set of default values for the various filters (paths, methods, mime-types, etc) can be influenced by the available mime types to work with.
ETag (or Entity Tag) information: any Request headers for
If-None-Match
orIf-Match
will be evaluated by the GzipHandler to determine if it was involved in compression of the response earlier. This is usually present as a--gzip
suffix on the ETag that the Client User-Agent is tracking and handed to the Jetty server. The special--gzip
suffix on the ETag is how GzipHandler knows that the content passed through itself, and this suffix will be stripped from the Request header values before the request is sent onwards to the specific webapp / servlet endpoint for handling. If a ETag is present in the Response headers, and GzipHandler is compressing the contents, it will add the--gzip
suffix before the Response headers are committed and sent to the User Agent. Note that the suffix used is determined byCompressedContentFormat.ETAG_SEPARATOR
This implementation relies on an Jetty internal
HttpOutput.Interceptor
mechanism to allow for effective and efficient compression of the response on all Output API usages:-
ServletOutputStream
- Obtained fromServletResponse.getOutputStream()
using the traditional Blocking I/O techniques -
WriteListener
- Provided toServletOutputStream.setWriteListener(javax.servlet.WriteListener)
using the new (since Servlet 3.1) Async I/O techniques -
PrintWriter
- Obtained fromServletResponse.getWriter()
using Blocking I/O techniques
Historically the compression of responses were accomplished via Servlet Filters (eg:
GzipFilter
) and usage ofHttpServletResponseWrapper
. Since the introduction of Async I/O in Servlet 3.1, this older form of Gzip support in web applications has been problematic and bug ridden.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jetty.server.handler.AbstractHandler
AbstractHandler.ErrorDispatchHandler
-
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener, Container.Listener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
-
Field Summary
Fields Modifier and Type Field Description static int
BREAK_EVEN_GZIP_SIZE
Deprecated.static int
DEFAULT_MIN_GZIP_SIZE
Deprecated.static java.lang.String
DEFLATE
Deprecated.static java.lang.String
GZIP
Deprecated.static java.lang.String
GZIP_HANDLER_ETAGS
Deprecated.
-
Constructor Summary
Constructors Constructor Description GzipHandler()
Deprecated.Instantiates a new GzipHandler.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addExcludedAgentPatterns(java.lang.String... patterns)
Deprecated.Add excluded to the User-Agent filtering.void
addExcludedMethods(java.lang.String... methods)
Deprecated.Add excluded to the HTTP methods filtering.void
addExcludedMimeTypes(java.lang.String... types)
Deprecated.Adds excluded MIME types for response filtering.void
addExcludedPaths(java.lang.String... pathspecs)
Deprecated.Adds excluded Path Specs for request filtering.void
addIncludedAgentPatterns(java.lang.String... patterns)
Deprecated.Adds included User-Agents for filtering.void
addIncludedMethods(java.lang.String... methods)
Deprecated.Adds included HTTP Methods (eg: POST, PATCH, DELETE) for filtering.void
addIncludedMimeTypes(java.lang.String... types)
Deprecated.Add included MIME types for response filteringvoid
addIncludedPaths(java.lang.String... pathspecs)
Deprecated.Add included Path Specs for filtering.boolean
getCheckGzExists()
Deprecated.feature will be removed in Jetty 10.x, with no replacement.int
getCompressionLevel()
Deprecated.java.util.zip.Deflater
getDeflater(Request request, long contentLength)
Deprecated.int
getDeflaterPoolCapacity()
Deprecated.Gets the maximum number of Deflaters that the DeflaterPool can hold.java.util.EnumSet<DispatcherType>
getDispatcherTypes()
Deprecated.Get the Set ofDispatcherType
that this Filter will operate on.java.lang.String[]
getExcludedAgentPatterns()
Deprecated.Get the current filter list of excluded User-Agent patternsjava.lang.String
getExcludedMethodList()
Deprecated.Get the excluded filter list of HTTP methods in CSV formatjava.lang.String[]
getExcludedMethods()
Deprecated.Get the current filter list of excluded HTTP methodsjava.lang.String[]
getExcludedMimeTypes()
Deprecated.Get the current filter list of excluded MIME typesjava.lang.String[]
getExcludedPaths()
Deprecated.Get the current filter list of excluded Path Specsjava.lang.String[]
getIncludedAgentPatterns()
Deprecated.Get the current filter list of included User-Agent patternsjava.lang.String
getIncludedMethodList()
Deprecated.Get the included filter list of HTTP methods in CSV formatjava.lang.String[]
getIncludedMethods()
Deprecated.Get the current filter list of included HTTP Methodsjava.lang.String[]
getIncludedMimeTypes()
Deprecated.Get the current filter list of included MIME typesjava.lang.String[]
getIncludedPaths()
Deprecated.Get the current filter list of included Path Specsint
getInflateBufferSize()
Deprecated.Get the size (in bytes) of theInflater
buffer used to inflate compressed requests.java.lang.String[]
getMethods()
Deprecated.usegetIncludedMethods()
instead.int
getMinGzipSize()
Deprecated.Get the minimum size, in bytes, that a responseContent-Length
must be before compression will trigger.void
handle(java.lang.String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
Deprecated.Handle a request.boolean
isMimeTypeGzipable(java.lang.String mimetype)
Deprecated.Test if the provided MIME type is allowed based on the MIME type filters.boolean
isSyncFlush()
Deprecated.Is theDeflater
runningDeflater.SYNC_FLUSH
or not.void
recycle(java.util.zip.Deflater deflater)
Deprecated.void
setCheckGzExists(boolean checkGzExists)
Deprecated.feature will be removed in Jetty 10.x, with no replacement.void
setCompressionLevel(int compressionLevel)
Deprecated.Set the Compression level thatDeflater
uses.void
setDeflaterPoolCapacity(int capacity)
Deprecated.Sets the maximum number of Deflaters that the DeflaterPool can hold.void
setDispatcherTypes(java.util.EnumSet<DispatcherType> dispatchers)
Deprecated.Set of supportedDispatcherType
that this filter will operate on.void
setDispatcherTypes(DispatcherType... dispatchers)
Deprecated.Set the list of supportedDispatcherType
that this filter will operate on.void
setExcludedAgentPatterns(java.lang.String... patterns)
Deprecated.Set the excluded filter list of User-Agent patterns (replacing any previously set)void
setExcludedMethodList(java.lang.String csvMethods)
Deprecated.Set the excluded filter list of HTTP Methods (replacing any previously set)void
setExcludedMethods(java.lang.String... methods)
Deprecated.Set the excluded filter list of HTTP methods (replacing any previously set)void
setExcludedMimeTypes(java.lang.String... types)
Deprecated.Set the excluded filter list of MIME types (replacing any previously set)void
setExcludedPaths(java.lang.String... pathspecs)
Deprecated.Set the excluded filter list of Path specs (replacing any previously set)void
setIncludedAgentPatterns(java.lang.String... patterns)
Deprecated.Set the included filter list of User-Agent patterns (replacing any previously set)void
setIncludedMethodList(java.lang.String csvMethods)
Deprecated.Set the included filter list of HTTP Methods (replacing any previously set)void
setIncludedMethods(java.lang.String... methods)
Deprecated.Set the included filter list of HTTP methods (replacing any previously set)void
setIncludedMimeTypes(java.lang.String... types)
Deprecated.Set the included filter list of MIME types (replacing any previously set)void
setIncludedPaths(java.lang.String... pathspecs)
Deprecated.Set the included filter list of Path specs (replacing any previously set)void
setInflateBufferSize(int size)
Deprecated.Set the size (in bytes) of theInflater
buffer used to inflate comrpessed requests.void
setMinGzipSize(int minGzipSize)
Deprecated.Set the minimum response size to trigger dynamic compression.void
setSyncFlush(boolean syncFlush)
Deprecated.Set theDeflater
flush mode to use.java.lang.String
toString()
Deprecated.-
Methods inherited from class org.eclipse.jetty.server.handler.HandlerWrapper
destroy, getHandler, getHandlers, insertHandler, setHandler
-
Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandlerContainer
findContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass, setServer
-
Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandler
getServer
-
Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dump, dump, dumpObject, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, unmanage, updateBean, updateBean, updateBeans
-
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
-
Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
-
-
-
-
Field Detail
-
GZIP_HANDLER_ETAGS
public static final java.lang.String GZIP_HANDLER_ETAGS
Deprecated.- See Also:
- Constant Field Values
-
GZIP
public static final java.lang.String GZIP
Deprecated.- See Also:
- Constant Field Values
-
DEFLATE
public static final java.lang.String DEFLATE
Deprecated.- See Also:
- Constant Field Values
-
DEFAULT_MIN_GZIP_SIZE
public static final int DEFAULT_MIN_GZIP_SIZE
Deprecated.- See Also:
- Constant Field Values
-
BREAK_EVEN_GZIP_SIZE
public static final int BREAK_EVEN_GZIP_SIZE
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
addExcludedAgentPatterns
public void addExcludedAgentPatterns(java.lang.String... patterns)
Deprecated.Add excluded to the User-Agent filtering.- Parameters:
patterns
- Regular expressions matching user agents to exclude- See Also:
addIncludedAgentPatterns(String...)
-
addExcludedMethods
public void addExcludedMethods(java.lang.String... methods)
Deprecated.Add excluded to the HTTP methods filtering.- Parameters:
methods
- The methods to exclude in compression- See Also:
addIncludedMethods(String...)
-
getDispatcherTypes
public java.util.EnumSet<DispatcherType> getDispatcherTypes()
Deprecated.Get the Set ofDispatcherType
that this Filter will operate on.- Returns:
- the set of
DispatcherType
this filter will operate on
-
setDispatcherTypes
public void setDispatcherTypes(java.util.EnumSet<DispatcherType> dispatchers)
Deprecated.Set of supportedDispatcherType
that this filter will operate on.- Parameters:
dispatchers
- the set ofDispatcherType
that this filter will operate on
-
setDispatcherTypes
public void setDispatcherTypes(DispatcherType... dispatchers)
Deprecated.Set the list of supportedDispatcherType
that this filter will operate on.- Parameters:
dispatchers
- the list ofDispatcherType
that this filter will operate on
-
addExcludedMimeTypes
public void addExcludedMimeTypes(java.lang.String... types)
Deprecated.Adds excluded MIME types for response filtering.Deprecation Warning: For backward compatibility the MIME types parameters may be comma separated strings, but this will not be supported in future versions of Jetty.
- Parameters:
types
- The mime types to exclude (without charset or other parameters).- See Also:
addIncludedMimeTypes(String...)
-
addExcludedPaths
public void addExcludedPaths(java.lang.String... pathspecs)
Deprecated.Adds excluded Path Specs for request filtering.There are 2 syntaxes supported, Servlet
url-pattern
based, and Regex based. This means that the initial characters on the path spec line are very strict, and determine the behavior of the path matching.- If the spec starts with
'^'
the spec is assumed to be a regex based path spec and will match with normal Java regex rules. - If the spec starts with
'/'
then spec is assumed to be a Servlet url-pattern rules path spec for either an exact match or prefix based match. - If the spec starts with
'*.'
then spec is assumed to be a Servlet url-pattern rules path spec for a suffix based match. - All other syntaxes are unsupported
Note: inclusion takes precedence over exclude.
- Parameters:
pathspecs
- Path specs (as per servlet spec) to exclude. If a ServletContext is available, the paths are relative to the context path, otherwise they are absolute.
For backward compatibility the pathspecs may be comma separated strings, but this will not be supported in future versions.- See Also:
addIncludedPaths(String...)
- If the spec starts with
-
addIncludedAgentPatterns
public void addIncludedAgentPatterns(java.lang.String... patterns)
Deprecated.Adds included User-Agents for filtering.- Parameters:
patterns
- Regular expressions matching user agents to include- See Also:
addExcludedAgentPatterns(String...)
-
addIncludedMethods
public void addIncludedMethods(java.lang.String... methods)
Deprecated.Adds included HTTP Methods (eg: POST, PATCH, DELETE) for filtering.- Parameters:
methods
- The HTTP methods to include in compression.- See Also:
addExcludedMethods(String...)
-
isSyncFlush
public boolean isSyncFlush()
Deprecated.Is theDeflater
runningDeflater.SYNC_FLUSH
or not.- Returns:
- True if
Deflater.SYNC_FLUSH
is used, elseDeflater.NO_FLUSH
- See Also:
setSyncFlush(boolean)
-
setSyncFlush
public void setSyncFlush(boolean syncFlush)
Deprecated.Set theDeflater
flush mode to use.Deflater.SYNC_FLUSH
should be used if the application wishes to stream the data, but this may hurt compression performance.- Parameters:
syncFlush
- True ifDeflater.SYNC_FLUSH
is used, elseDeflater.NO_FLUSH
- See Also:
isSyncFlush()
-
addIncludedMimeTypes
public void addIncludedMimeTypes(java.lang.String... types)
Deprecated.Add included MIME types for response filtering- Parameters:
types
- The mime types to include (without charset or other parameters) For backward compatibility the mimetypes may be comma separated strings, but this will not be supported in future versions.- See Also:
addExcludedMimeTypes(String...)
-
addIncludedPaths
public void addIncludedPaths(java.lang.String... pathspecs)
Deprecated.Add included Path Specs for filtering.There are 2 syntaxes supported, Servlet
url-pattern
based, and Regex based. This means that the initial characters on the path spec line are very strict, and determine the behavior of the path matching.- If the spec starts with
'^'
the spec is assumed to be a regex based path spec and will match with normal Java regex rules. - If the spec starts with
'/'
then spec is assumed to be a Servlet url-pattern rules path spec for either an exact match or prefix based match. - If the spec starts with
'*.'
then spec is assumed to be a Servlet url-pattern rules path spec for a suffix based match. - All other syntaxes are unsupported
Note: inclusion takes precedence over exclusion.
- Parameters:
pathspecs
- Path specs (as per servlet spec) to include. If a ServletContext is available, the paths are relative to the context path, otherwise they are absolute
- If the spec starts with
-
getCheckGzExists
@Deprecated public boolean getCheckGzExists()
Deprecated.feature will be removed in Jetty 10.x, with no replacement.
-
getCompressionLevel
public int getCompressionLevel()
Deprecated.
-
getDeflater
public java.util.zip.Deflater getDeflater(Request request, long contentLength)
Deprecated.- Specified by:
getDeflater
in interfaceGzipFactory
-
getExcludedAgentPatterns
public java.lang.String[] getExcludedAgentPatterns()
Deprecated.Get the current filter list of excluded User-Agent patterns- Returns:
- the filter list of excluded User-Agent patterns
- See Also:
getIncludedAgentPatterns()
-
getExcludedMethods
public java.lang.String[] getExcludedMethods()
Deprecated.Get the current filter list of excluded HTTP methods- Returns:
- the filter list of excluded HTTP methods
- See Also:
getIncludedMethods()
-
getExcludedMimeTypes
public java.lang.String[] getExcludedMimeTypes()
Deprecated.Get the current filter list of excluded MIME types- Returns:
- the filter list of excluded MIME types
- See Also:
getIncludedMimeTypes()
-
getExcludedPaths
public java.lang.String[] getExcludedPaths()
Deprecated.Get the current filter list of excluded Path Specs- Returns:
- the filter list of excluded Path Specs
- See Also:
getIncludedPaths()
-
getIncludedAgentPatterns
public java.lang.String[] getIncludedAgentPatterns()
Deprecated.Get the current filter list of included User-Agent patterns- Returns:
- the filter list of included User-Agent patterns
- See Also:
getExcludedAgentPatterns()
-
getIncludedMethods
public java.lang.String[] getIncludedMethods()
Deprecated.Get the current filter list of included HTTP Methods- Returns:
- the filter list of included HTTP methods
- See Also:
getExcludedMethods()
-
getIncludedMimeTypes
public java.lang.String[] getIncludedMimeTypes()
Deprecated.Get the current filter list of included MIME types- Returns:
- the filter list of included MIME types
- See Also:
getExcludedMimeTypes()
-
getIncludedPaths
public java.lang.String[] getIncludedPaths()
Deprecated.Get the current filter list of included Path Specs- Returns:
- the filter list of included Path Specs
- See Also:
getExcludedPaths()
-
getMethods
@Deprecated public java.lang.String[] getMethods()
Deprecated.usegetIncludedMethods()
instead. (Will be removed in Jetty 10)Get the current filter list of included HTTP methods- Returns:
- the filter list of included HTTP methods
-
getMinGzipSize
public int getMinGzipSize()
Deprecated.Get the minimum size, in bytes, that a responseContent-Length
must be before compression will trigger.- Returns:
- minimum response size (in bytes) that triggers compression
- See Also:
setMinGzipSize(int)
-
getInflateBufferSize
public int getInflateBufferSize()
Deprecated.Get the size (in bytes) of theInflater
buffer used to inflate compressed requests.- Returns:
- size in bytes of the buffer, or 0 for no inflation.
-
setInflateBufferSize
public void setInflateBufferSize(int size)
Deprecated.Set the size (in bytes) of theInflater
buffer used to inflate comrpessed requests.- Parameters:
size
- size in bytes of the buffer, or 0 for no inflation.
-
handle
public void handle(java.lang.String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException
Deprecated.Description copied from interface:Handler
Handle a request.- Specified by:
handle
in interfaceHandler
- Overrides:
handle
in classHandlerWrapper
- Parameters:
target
- The target of the request - either a URI or a name.baseRequest
- The original unwrapped request object.request
- The request either as theRequest
object or a wrapper of that request. The
method can be used access the Request object if required.HttpConnection.getCurrentConnection()
.getHttpChannel()
.getRequest()
response
- The response as theResponse
object or a wrapper of that request. The
method can be used access the Response object if required.HttpConnection.getCurrentConnection()
.getHttpChannel()
.getResponse()
- Throws:
java.io.IOException
- if unable to handle the request or response processingServletException
- if unable to handle the request or response due to underlying servlet issue
-
isMimeTypeGzipable
public boolean isMimeTypeGzipable(java.lang.String mimetype)
Deprecated.Test if the provided MIME type is allowed based on the MIME type filters.- Specified by:
isMimeTypeGzipable
in interfaceGzipFactory
- Parameters:
mimetype
- the MIME type to test- Returns:
- true if allowed, false otherwise
-
recycle
public void recycle(java.util.zip.Deflater deflater)
Deprecated.- Specified by:
recycle
in interfaceGzipFactory
-
setCheckGzExists
@Deprecated public void setCheckGzExists(boolean checkGzExists)
Deprecated.feature will be removed in Jetty 10.x, with no replacement.Set the Check if*.gz
file for the incoming file exists.- Parameters:
checkGzExists
- whether to check if a static gz file exists for the resource that the DefaultServlet may serve as precompressed.
-
setCompressionLevel
public void setCompressionLevel(int compressionLevel)
Deprecated.Set the Compression level thatDeflater
uses.- Parameters:
compressionLevel
- The compression level to use to initializeDeflater.setLevel(int)
- See Also:
Deflater.setLevel(int)
-
setExcludedAgentPatterns
public void setExcludedAgentPatterns(java.lang.String... patterns)
Deprecated.Set the excluded filter list of User-Agent patterns (replacing any previously set)- Parameters:
patterns
- Regular expressions list matching user agents to exclude- See Also:
setIncludedAgentPatterns(String...)
-
setExcludedMethods
public void setExcludedMethods(java.lang.String... methods)
Deprecated.Set the excluded filter list of HTTP methods (replacing any previously set)- Parameters:
methods
- the HTTP methods to exclude- See Also:
setIncludedMethods(String...)
-
setExcludedMimeTypes
public void setExcludedMimeTypes(java.lang.String... types)
Deprecated.Set the excluded filter list of MIME types (replacing any previously set)- Parameters:
types
- The mime types to exclude (without charset or other parameters)- See Also:
setIncludedMimeTypes(String...)
-
setExcludedPaths
public void setExcludedPaths(java.lang.String... pathspecs)
Deprecated.Set the excluded filter list of Path specs (replacing any previously set)- Parameters:
pathspecs
- Path specs (as per servlet spec) to exclude. If a ServletContext is available, the paths are relative to the context path, otherwise they are absolute.- See Also:
setIncludedPaths(String...)
-
setIncludedAgentPatterns
public void setIncludedAgentPatterns(java.lang.String... patterns)
Deprecated.Set the included filter list of User-Agent patterns (replacing any previously set)- Parameters:
patterns
- Regular expressions matching user agents to include- See Also:
setExcludedAgentPatterns(String...)
-
setIncludedMethods
public void setIncludedMethods(java.lang.String... methods)
Deprecated.Set the included filter list of HTTP methods (replacing any previously set)- Parameters:
methods
- The methods to include in compression- See Also:
setExcludedMethods(String...)
-
setIncludedMimeTypes
public void setIncludedMimeTypes(java.lang.String... types)
Deprecated.Set the included filter list of MIME types (replacing any previously set)- Parameters:
types
- The mime types to include (without charset or other parameters)- See Also:
setExcludedMimeTypes(String...)
-
setIncludedPaths
public void setIncludedPaths(java.lang.String... pathspecs)
Deprecated.Set the included filter list of Path specs (replacing any previously set)- Parameters:
pathspecs
- Path specs (as per servlet spec) to include. If a ServletContext is available, the paths are relative to the context path, otherwise they are absolute- See Also:
setExcludedPaths(String...)
-
setMinGzipSize
public void setMinGzipSize(int minGzipSize)
Deprecated.Set the minimum response size to trigger dynamic compression.Sizes below
BREAK_EVEN_GZIP_SIZE
will result a compressed response that is larger than the original data.- Parameters:
minGzipSize
- minimum response size in bytes (not allowed to be lower thenBREAK_EVEN_GZIP_SIZE
)
-
setIncludedMethodList
public void setIncludedMethodList(java.lang.String csvMethods)
Deprecated.Set the included filter list of HTTP Methods (replacing any previously set)- Parameters:
csvMethods
- the list of methods, CSV format- See Also:
setExcludedMethodList(String)
-
getIncludedMethodList
public java.lang.String getIncludedMethodList()
Deprecated.Get the included filter list of HTTP methods in CSV format- Returns:
- the included filter list of HTTP methods in CSV format
- See Also:
getExcludedMethodList()
-
setExcludedMethodList
public void setExcludedMethodList(java.lang.String csvMethods)
Deprecated.Set the excluded filter list of HTTP Methods (replacing any previously set)- Parameters:
csvMethods
- the list of methods, CSV format- See Also:
setIncludedMethodList(String)
-
getExcludedMethodList
public java.lang.String getExcludedMethodList()
Deprecated.Get the excluded filter list of HTTP methods in CSV format- Returns:
- the excluded filter list of HTTP methods in CSV format
- See Also:
getIncludedMethodList()
-
getDeflaterPoolCapacity
public int getDeflaterPoolCapacity()
Deprecated.Gets the maximum number of Deflaters that the DeflaterPool can hold.- Returns:
- the Deflater pool capacity
-
setDeflaterPoolCapacity
public void setDeflaterPoolCapacity(int capacity)
Deprecated.Sets the maximum number of Deflaters that the DeflaterPool can hold.
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classAbstractLifeCycle
-
-