Class CompressFilterSettings


  • @ThreadSafe
    public final class CompressFilterSettings
    extends Object
    Contains the settings for the CompressFilter class.
    Author:
    Philip Helger
    • Method Detail

      • isFilterLoaded

        public static boolean isFilterLoaded()
        Returns:
        true if the filter is loaded, false if not
      • markFilterLoaded

        public static void markFilterLoaded()
        Mark the filter as loaded.
      • isResponseCompressionEnabled

        public static boolean isResponseCompressionEnabled()
        Returns:
        true if overall compression is enabled, false if not
      • setResponseCompressionEnabled

        @Nonnull
        public static com.helger.commons.state.EChange setResponseCompressionEnabled​(boolean bResponseCompressionEnabled)
        Enable or disable the overall compression.
        Parameters:
        bResponseCompressionEnabled - true to enable it, false to disable it
        Returns:
        EChange
      • isResponseGzipEnabled

        public static boolean isResponseGzipEnabled()
        Returns:
        true if GZip compression is enabled, false if not
      • setResponseGzipEnabled

        @Nonnull
        public static com.helger.commons.state.EChange setResponseGzipEnabled​(boolean bResponseGzipEnabled)
        Enable or disable Gzip compression. This only has an effect if isResponseCompressionEnabled() is true
        Parameters:
        bResponseGzipEnabled - true to enable it, false to disable it
        Returns:
        EChange
      • isResponseDeflateEnabled

        public static boolean isResponseDeflateEnabled()
        Returns:
        true if Deflate compression is enabled, false if not
      • setResponseDeflateEnabled

        @Nonnull
        public static com.helger.commons.state.EChange setResponseDeflateEnabled​(boolean bResponseDeflateEnabled)
        Enable or disable Deflate compression. This only has an effect if isResponseCompressionEnabled() is true
        Parameters:
        bResponseDeflateEnabled - true to enable it, false to disable it
        Returns:
        EChange
      • setAll

        @Nonnull
        public static com.helger.commons.state.EChange setAll​(boolean bResponseCompressionEnabled,
                                                              boolean bResponseGzipEnabled,
                                                              boolean bResponseDeflateEnabled)
        Set all parameters at once as an atomic transaction
        Parameters:
        bResponseCompressionEnabled - true to overall enable the usage
        bResponseGzipEnabled - true to enable GZip if compression is enabled
        bResponseDeflateEnabled - true to enable Deflate if compression is enabled
        Returns:
        EChange
      • isDebugModeEnabled

        public static boolean isDebugModeEnabled()
        Returns:
        true if debugMode is enabled, false if not
      • setDebugModeEnabled

        @Nonnull
        public static com.helger.commons.state.EChange setDebugModeEnabled​(boolean bDebugModeEnabled)
        Enable or disable debug mode
        Parameters:
        bDebugModeEnabled - true to enable it, false to disable it
        Returns:
        EChange