Class CompressionConfig

java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.compression.server.CompressionConfig
All Implemented Interfaces:
org.eclipse.jetty.util.component.LifeCycle

@ManagedObject("Compression Configuration") public class CompressionConfig extends org.eclipse.jetty.util.component.AbstractLifeCycle

Configuration for a specific compression behavior per matching path from the CompressionHandler.

Configuration is split between compression (of responses) and decompression (of requests).

  • Method Details

    • builder

      public static CompressionConfig.Builder builder()
      Returns:
      a new CompressionConfig.Builder to configure a CompressionConfig instance
    • getCompressExcludeEncodings

      @ManagedAttribute("Encodings that disable response compression") public Set<String> getCompressExcludeEncodings()
      Returns:
      the encodings that disable response compression
      See Also:
    • getCompressExcludeMethods

      @ManagedAttribute("HTTP methods that disable response compression") public Set<String> getCompressExcludeMethods()
      Returns:
      the HTTP methods that disable response compression
      See Also:
    • getCompressExcludeMimeTypes

      @ManagedAttribute("MIME types that disable response compression") public Set<String> getCompressExcludeMimeTypes()
      Returns:
      the MIME types that disable response compression
      See Also:
    • getCompressExcludePaths

      @ManagedAttribute("Path specs that exclude response compression") public Set<String> getCompressExcludePaths()
      Returns:
      the path specs that exclude response compression
      See Also:
    • getCompressIncludeEncodings

      @ManagedAttribute("Encodings that enable response compression") public Set<String> getCompressIncludeEncodings()
      Returns:
      the encodings that enable response compression
      See Also:
    • getCompressIncludeMethods

      @ManagedAttribute("HTTP methods that enable response compression") public Set<String> getCompressIncludeMethods()
      Returns:
      HTTP methods that enable response compression
      See Also:
    • getCompressIncludeMimeTypes

      @ManagedAttribute("MIME types that enable response compression") public Set<String> getCompressIncludeMimeTypes()
      Returns:
      the MIME types that enable response compression
      See Also:
    • getCompressIncludePaths

      @ManagedAttribute("Path specs that enable response compression") public Set<String> getCompressIncludePaths()
      Returns:
      the path specs that enable response compression
      See Also:
    • getCompressPreferredEncodings

      @ManagedAttribute("Encodings for response compression in preferred order") public List<String> getCompressPreferredEncodings()
      Returns:
      the encodings for response compression in preferred order
    • getDecompressExcludeMethods

      @ManagedAttribute("HTTP methods that disable request decompression") public Set<String> getDecompressExcludeMethods()
      Returns:
      the HTTP methods that disable request decompression
      See Also:
    • getDecompressExcludePaths

      @ManagedAttribute("Path specs that disable request decompression") public Set<String> getDecompressExcludePaths()
      Returns:
      the path specs that disable request decompression
      See Also:
    • getDecompressIncludeMethods

      @ManagedAttribute("HTTP methods that enable request decompression") public Set<String> getDecompressIncludeMethods()
      Returns:
      the HTTP methods that enable request decompression
      See Also:
    • getDecompressIncludePaths

      @ManagedAttribute("Path specs that enable request decompression") public Set<String> getDecompressIncludePaths()
      Returns:
      the path specs that enable request decompression
      See Also:
    • isCompressMethodSupported

      public boolean isCompressMethodSupported(String method)
    • isCompressMimeTypeSupported

      public boolean isCompressMimeTypeSupported(String mimeType)
    • isDecompressMethodSupported

      public boolean isDecompressMethodSupported(String method)
    • isDecompressMimeTypeSupported

      public boolean isDecompressMimeTypeSupported(String mimeType)