Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tapestry5.internal.services
Class ResponseCompressionAnalyzerImpl

    java.lang.Object
      org.apache.tapestry5.internal.services.ResponseCompressionAnalyzerImpl

All Implemented Interfaces:
  ResponseCompressionAnalyzer

    public class ResponseCompressionAnalyzerImpl

extends java.lang.Object
implements ResponseCompressionAnalyzer

Constructor Summary
`ResponseCompressionAnalyzerImpl(javax.servlet.http.HttpServletRequest request, CompressionAnalyzer analyzer, java.util.Collection<java.lang.String> configuration, boolean gzipCompressionEnabled)`

Method Summary
`boolean` | `isCompressable(java.lang.String contentType)` Checks to see if the indicated content type is compressable.
`boolean` | `isGZipSupported()` Checks the Accept-Encoding request header for a "gzip" token.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ResponseCompressionAnalyzerImpl

    public ResponseCompressionAnalyzerImpl(javax.servlet.http.HttpServletRequest request,
                                           CompressionAnalyzer analyzer,
                                           @Deprecated
                                           java.util.Collection<java.lang.String> configuration,
                                           @Symbol(value="tapestry.gzip-compression-enabled")
                                           boolean gzipCompressionEnabled)

Method Detail

### isGZipSupported

    public boolean isGZipSupported()

  Description copied from interface: `ResponseCompressionAnalyzer`
  Checks the Accept-Encoding request header for a "gzip" token. Ensures that the protocol is not "HTTP/1.0", which does not correctly support GZip encoding (in older Internet Explorer browsers).

  Specified by:
    `isGZipSupported` in interface `ResponseCompressionAnalyzer`
  Returns:
    true if gzip is supported by client

### isCompressable

    public boolean isCompressable(java.lang.String contentType)

  Description copied from interface: `ResponseCompressionAnalyzer`
  Checks to see if the indicated content type is compressable. Many formats are already compressed; pushing them through a GZip filter consumes cycles and makes them larger.

  Contribute content type strings to the service's configuration to mark them as not compressable.

  Specified by:
    `isCompressable` in interface `ResponseCompressionAnalyzer`
  Parameters:
    `contentType` - the mime type of the content, such as "text/html" or "image/jpeg".
  Returns:
    true if compression is worthwhile

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.