com.planetj.servlet.filter.compression
Class CompressingFilterContext
java.lang.Object
com.planetj.servlet.filter.compression.CompressingFilterContext
final class CompressingFilterContext
- extends java.lang.Object
Encapsulates the CompressingFilter
environment, including configuration and runtime statistics. This object
may be conveniently passed around in the code to make this information available.
- Author:
- Sean Owen, Peter Bryant
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DEFAULT_COMPRESSION_THRESHOLD
private static final int DEFAULT_COMPRESSION_THRESHOLD
- See Also:
- Constant Field Values
debug
private final boolean debug
logger
private final CompressingFilterLoggerImpl logger
compressionThreshold
private final int compressionThreshold
servletContext
private final javax.servlet.ServletContext servletContext
stats
private final CompressingFilterStats stats
includeContentTypes
private final boolean includeContentTypes
contentTypes
private final java.util.Collection<java.lang.String> contentTypes
includePathPatterns
private final boolean includePathPatterns
pathPatterns
private final java.util.Collection<java.util.regex.Pattern> pathPatterns
includeUserAgentPatterns
private final boolean includeUserAgentPatterns
userAgentPatterns
private final java.util.Collection<java.util.regex.Pattern> userAgentPatterns
CompressingFilterContext
CompressingFilterContext(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
- Throws:
javax.servlet.ServletException
isDebug
boolean isDebug()
getLogger
@NotNull
CompressingFilterLoggerImpl getLogger()
getCompressionThreshold
int getCompressionThreshold()
getStats
@NotNull
CompressingFilterStats getStats()
isStatsEnabled
boolean isStatsEnabled()
isIncludeContentTypes
boolean isIncludeContentTypes()
getContentTypes
@NotNull
java.util.Collection<java.lang.String> getContentTypes()
isIncludePathPatterns
boolean isIncludePathPatterns()
getPathPatterns
@NotNull
java.lang.Iterable<java.util.regex.Pattern> getPathPatterns()
isIncludeUserAgentPatterns
boolean isIncludeUserAgentPatterns()
getUserAgentPatterns
@NotNull
java.lang.Iterable<java.util.regex.Pattern> getUserAgentPatterns()
toString
@NotNull
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
ensureStatsInContext
private void ensureStatsInContext()
readBooleanValue
private static boolean readBooleanValue(javax.servlet.FilterConfig filterConfig,
java.lang.String parameter)
readCompressionThresholdValue
private static int readCompressionThresholdValue(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
- Throws:
javax.servlet.ServletException
parseContentTypes
@NotNull
private static java.util.Collection<java.lang.String> parseContentTypes(java.lang.String contentTypesString)
parsePatterns
@NotNull
private static java.util.Collection<java.util.regex.Pattern> parsePatterns(java.lang.String patternsString)