org.apache.tapestry5.internal.services

## Class ResponseCompressionAnalyzerImpl

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

- All Implemented Interfaces:
    ResponseCompressionAnalyzer

      public class ResponseCompressionAnalyzerImpl
      extends Object
      implements ResponseCompressionAnalyzer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResponseCompressionAnalyzerImpl(HttpServletRequest request, boolean gzipCompressionEnabled, CompressionAnalyzer compressionAnalyzer)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isGZipEnabled(ContentType contentType)` Uses `CompressionAnalyzer` to determine if the content is compressable, but only if the request indicates the client supports compression.
    `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(HttpServletRequest request,
                                         @Symbol(value="tapestry.gzip-compression-enabled")
                                         boolean gzipCompressionEnabled,
                                         CompressionAnalyzer compressionAnalyzer)

  - ### 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

    - #### isGZipEnabled

          public boolean isGZipEnabled(ContentType contentType)

      Description copied from interface: `ResponseCompressionAnalyzer`
      Uses `CompressionAnalyzer` to determine if the content is compressable, but only if the request indicates the client supports compression.
      Specified by:
        `isGZipEnabled` in interface `ResponseCompressionAnalyzer`
      Returns:
        true if the content can be compressed for the current request

${project.version} - Copyright © 2003-2014 The Apache Software Foundation.