Package com.helger.servlet.response.gzip
Class CompressFilterSettings
- java.lang.Object
-
- com.helger.servlet.response.gzip.CompressFilterSettings
-
@ThreadSafe public final class CompressFilterSettings extends Object
Contains the settings for the CompressFilter class.- Author:
- Philip Helger
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisDebugModeEnabled()static booleanisFilterLoaded()static booleanisResponseCompressionEnabled()static booleanisResponseDeflateEnabled()static booleanisResponseGzipEnabled()static voidmarkFilterLoaded()Mark the filter as loaded.static com.helger.commons.state.EChangesetAll(boolean bResponseCompressionEnabled, boolean bResponseGzipEnabled, boolean bResponseDeflateEnabled)Set all parameters at once as an atomic transactionstatic com.helger.commons.state.EChangesetDebugModeEnabled(boolean bDebugModeEnabled)Enable or disable debug modestatic com.helger.commons.state.EChangesetResponseCompressionEnabled(boolean bResponseCompressionEnabled)Enable or disable the overall compression.static com.helger.commons.state.EChangesetResponseDeflateEnabled(boolean bResponseDeflateEnabled)Enable or disable Deflate compression.static com.helger.commons.state.EChangesetResponseGzipEnabled(boolean bResponseGzipEnabled)Enable or disable Gzip compression.
-
-
-
Method Detail
-
isFilterLoaded
public static boolean isFilterLoaded()
- Returns:
trueif the filter is loaded,falseif not
-
markFilterLoaded
public static void markFilterLoaded()
Mark the filter as loaded.
-
isResponseCompressionEnabled
public static boolean isResponseCompressionEnabled()
- Returns:
trueif overall compression is enabled,falseif not
-
setResponseCompressionEnabled
@Nonnull public static com.helger.commons.state.EChange setResponseCompressionEnabled(boolean bResponseCompressionEnabled)
Enable or disable the overall compression.- Parameters:
bResponseCompressionEnabled-trueto enable it,falseto disable it- Returns:
EChange
-
isResponseGzipEnabled
public static boolean isResponseGzipEnabled()
- Returns:
trueif GZip compression is enabled,falseif not
-
setResponseGzipEnabled
@Nonnull public static com.helger.commons.state.EChange setResponseGzipEnabled(boolean bResponseGzipEnabled)
Enable or disable Gzip compression. This only has an effect ifisResponseCompressionEnabled()istrue- Parameters:
bResponseGzipEnabled-trueto enable it,falseto disable it- Returns:
EChange
-
isResponseDeflateEnabled
public static boolean isResponseDeflateEnabled()
- Returns:
trueif Deflate compression is enabled,falseif not
-
setResponseDeflateEnabled
@Nonnull public static com.helger.commons.state.EChange setResponseDeflateEnabled(boolean bResponseDeflateEnabled)
Enable or disable Deflate compression. This only has an effect ifisResponseCompressionEnabled()istrue- Parameters:
bResponseDeflateEnabled-trueto enable it,falseto 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-trueto overall enable the usagebResponseGzipEnabled-trueto enable GZip if compression is enabledbResponseDeflateEnabled-trueto enable Deflate if compression is enabled- Returns:
EChange
-
isDebugModeEnabled
public static boolean isDebugModeEnabled()
- Returns:
trueif debugMode is enabled,falseif not
-
setDebugModeEnabled
@Nonnull public static com.helger.commons.state.EChange setDebugModeEnabled(boolean bDebugModeEnabled)
Enable or disable debug mode- Parameters:
bDebugModeEnabled-trueto enable it,falseto disable it- Returns:
EChange
-
-