Package com.github.fmjsjx.libnetty.http
Class HttpContentCompressorFactory
java.lang.Object
com.github.fmjsjx.libnetty.http.HttpContentCompressorFactory
Deprecated.
A factory to create
HttpContentCompressors.- Since:
- 1.1
- See Also:
-
HttpContentCompressor
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Creates a new factory with the default compression level (6), default window size (15), default memory level (8) and default content size threshold (1024).HttpContentCompressorFactory(int compressionLevel) Deprecated.Creates a new factory with the specified compression level, default window size (15), default memory level (8) and default content size threshold (1024).HttpContentCompressorFactory(int compressionLevel, int windowBits, int memLevel) Deprecated.Creates a new factory with the specified compression level, window size, memory level and default content size threshold (1024).HttpContentCompressorFactory(int compressionLevel, int windowBits, int memLevel, int contentSizeThreshold) Deprecated.Creates a new factory with the specified compression level, window size, memory level and content size threshold. -
Method Summary
Modifier and TypeMethodDescriptionstatic final HttpContentCompressorFactory.Builderbuilder()Deprecated.Creates a newHttpContentCompressorFactory.Builder.intDeprecated.Returns the compression level.intDeprecated.Returns the content size threshold.io.netty.handler.codec.http.HttpContentCompressorcreate()Deprecated.Creates a newHttpContentCompressorwith the current settings.static final Consumer<HttpContentCompressorFactory.Builder>Deprecated.Returns an apply action that just create builder with default settings but do nothing.intmemLevel()Deprecated.Returns the memory level.toString()Deprecated.intDeprecated.Returns the window size.
-
Constructor Details
-
HttpContentCompressorFactory
public HttpContentCompressorFactory()Deprecated.Creates a new factory with the default compression level (6), default window size (15), default memory level (8) and default content size threshold (1024). -
HttpContentCompressorFactory
public HttpContentCompressorFactory(int compressionLevel) Deprecated.Creates a new factory with the specified compression level, default window size (15), default memory level (8) and default content size threshold (1024).- Parameters:
compressionLevel-1yields the fastest compression and9yields the best compression.0means no compression. The default compression level is6
-
HttpContentCompressorFactory
public HttpContentCompressorFactory(int compressionLevel, int windowBits, int memLevel) Deprecated.Creates a new factory with the specified compression level, window size, memory level and default content size threshold (1024).- Parameters:
compressionLevel-1yields the fastest compression and9yields the best compression.0means no compression. The default compression level is6windowBits- The base two logarithm of the size of the history buffer. The value should be in the range9to15inclusive. Larger values result in better compression at the expense of memory usage. The default value is15memLevel- How much memory should be allocated for the internal compression state.1uses minimum memory and9uses maximum memory. Larger values result in better and faster compression at the expense of memory usage. The default value is8
-
HttpContentCompressorFactory
public HttpContentCompressorFactory(int compressionLevel, int windowBits, int memLevel, int contentSizeThreshold) Deprecated.Creates a new factory with the specified compression level, window size, memory level and content size threshold.- Parameters:
compressionLevel-1yields the fastest compression and9yields the best compression.0means no compression. The default compression level is6windowBits- The base two logarithm of the size of the history buffer. The value should be in the range9to15inclusive. Larger values result in better compression at the expense of memory usage. The default value is15memLevel- How much memory should be allocated for the internal compression state.1uses minimum memory and9uses maximum memory. Larger values result in better and faster compression at the expense of memory usage. The default value is8contentSizeThreshold- The response body is compressed when the size of the response body exceeds the threshold. The value should be a non negative number.0will enable compression for all responses. The default value is1024
-
-
Method Details
-
defaultSettings
Deprecated.Returns an apply action that just create builder with default settings but do nothing.- Returns:
- a
Consumer<HttpContentCompressorFactory.Builder>
-
builder
Deprecated.Creates a newHttpContentCompressorFactory.Builder.- Returns:
- a
HttpContentCompressorFactory.Builder
-
compressionLevel
public int compressionLevel()Deprecated.Returns the compression level.- Returns:
- the compression level
-
windowBits
public int windowBits()Deprecated.Returns the window size.- Returns:
- the window size
-
memLevel
public int memLevel()Deprecated.Returns the memory level.- Returns:
- the memory level
-
contentSizeThreshold
public int contentSizeThreshold()Deprecated.Returns the content size threshold.- Returns:
- the content size threshold
-
create
public io.netty.handler.codec.http.HttpContentCompressor create()Deprecated.Creates a newHttpContentCompressorwith the current settings.- Returns:
- a
HttpContentCompressor
-
toString
Deprecated.
-
DefaultHttpContentCompressorProviderinstead