com.atlassian.gzipfilter.selector
Class UserAgentBasedGzipSelectorFactory

java.lang.Object
  extended by com.atlassian.gzipfilter.selector.UserAgentBasedGzipSelectorFactory
All Implemented Interfaces:
GzipCompatibilitySelectorFactory

public class UserAgentBasedGzipSelectorFactory
extends Object
implements GzipCompatibilitySelectorFactory

This factory will lok into user agent header to decide whenever to dogzip compressing or not

By default gzip is on for defaultCompressableMimeTypes mime types and off for noCompressionUserAgents (IE 6 only)

This is adjustable via COMPRESSABLE_MIME_TYPES_PARAM_NAME an NO_COMPRESSION_USER_AGENTS_PARAM_NAME init-params respectively


Field Summary
static String COMPRESSABLE_MIME_TYPES_PARAM_NAME
           
static Set<String> DEFAULT_COMPRESSABLE_MIME_TYPES
           
static String NO_COMPRESSION_USER_AGENTS_PARAM_NAME
           
static String USER_AGENT_HEADER
           
 
Constructor Summary
UserAgentBasedGzipSelectorFactory(javax.servlet.FilterConfig filterConfig)
           
 
Method Summary
 GzipCompatibilitySelector getSelector(javax.servlet.FilterConfig filterConfig, javax.servlet.http.HttpServletRequest request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPRESSABLE_MIME_TYPES_PARAM_NAME

public static final String COMPRESSABLE_MIME_TYPES_PARAM_NAME
See Also:
Constant Field Values

NO_COMPRESSION_USER_AGENTS_PARAM_NAME

public static final String NO_COMPRESSION_USER_AGENTS_PARAM_NAME
See Also:
Constant Field Values

USER_AGENT_HEADER

public static final String USER_AGENT_HEADER
See Also:
Constant Field Values

DEFAULT_COMPRESSABLE_MIME_TYPES

public static final Set<String> DEFAULT_COMPRESSABLE_MIME_TYPES
Constructor Detail

UserAgentBasedGzipSelectorFactory

public UserAgentBasedGzipSelectorFactory(javax.servlet.FilterConfig filterConfig)
Method Detail

getSelector

public GzipCompatibilitySelector getSelector(javax.servlet.FilterConfig filterConfig,
                                             javax.servlet.http.HttpServletRequest request)
Specified by:
getSelector in interface GzipCompatibilitySelectorFactory


Copyright © 2015 Atlassian. All rights reserved.