Class DefaultHttp2HeadersEncoder
java.lang.Object
io.netty.handler.codec.http2.DefaultHttp2HeadersEncoder
- All Implemented Interfaces:
Http2HeadersEncoder, Http2HeadersEncoder.Configuration, Closeable, AutoCloseable
public class DefaultHttp2HeadersEncoder
extends Object
implements Http2HeadersEncoder, Http2HeadersEncoder.Configuration, Closeable
-
Nested Class Summary
Nested classes/interfaces inherited from interface Http2HeadersEncoder
Http2HeadersEncoder.Configuration, Http2HeadersEncoder.SensitivityDetector -
Field Summary
Fields inherited from interface Http2HeadersEncoder
ALWAYS_SENSITIVE, NEVER_SENSITIVE -
Constructor Summary
ConstructorsConstructorDescriptionDefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector) DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector, boolean ignoreMaxHeaderListSize) DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector, boolean ignoreMaxHeaderListSize, int dynamicTableArraySizeHint) DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector, boolean ignoreMaxHeaderListSize, int dynamicTableArraySizeHint, int huffCodeThreshold) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the encoder and release all its associated data.Get theHttp2HeadersEncoder.Configurationfor thisHttp2HeadersEncodervoidencodeHeaders(int streamId, Http2Headers headers, ByteBuf buffer) Encodes the given headers and writes the output headers block to the given output buffer.longRepresents the value for SETTINGS_MAX_HEADER_LIST_SIZE.voidmaxHeaderListSize(long max) Represents the value for SETTINGS_MAX_HEADER_LIST_SIZE.longRepresents the value for SETTINGS_HEADER_TABLE_SIZE.voidmaxHeaderTableSize(long max) Represents the value for SETTINGS_HEADER_TABLE_SIZE.
-
Constructor Details
-
DefaultHttp2HeadersEncoder
public DefaultHttp2HeadersEncoder() -
DefaultHttp2HeadersEncoder
-
DefaultHttp2HeadersEncoder
public DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector, boolean ignoreMaxHeaderListSize) -
DefaultHttp2HeadersEncoder
public DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector, boolean ignoreMaxHeaderListSize, int dynamicTableArraySizeHint) -
DefaultHttp2HeadersEncoder
public DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector, boolean ignoreMaxHeaderListSize, int dynamicTableArraySizeHint, int huffCodeThreshold)
-
-
Method Details
-
encodeHeaders
Description copied from interface:Http2HeadersEncoderEncodes the given headers and writes the output headers block to the given output buffer.- Specified by:
encodeHeadersin interfaceHttp2HeadersEncoder- Parameters:
streamId- the identifier of the stream for which the headers are encoded.headers- the headers to be encoded.buffer- the buffer to receive the encoded headers.- Throws:
Http2Exception
-
maxHeaderTableSize
Description copied from interface:Http2HeadersEncoder.ConfigurationRepresents the value for SETTINGS_HEADER_TABLE_SIZE. This method should only be called by Netty (not users) as a result of a receiving aSETTINGSframe.- Specified by:
maxHeaderTableSizein interfaceHttp2HeadersEncoder.Configuration- Throws:
Http2Exception
-
maxHeaderTableSize
public long maxHeaderTableSize()Description copied from interface:Http2HeadersEncoder.ConfigurationRepresents the value for SETTINGS_HEADER_TABLE_SIZE. The initial value returned by this method must beHttp2CodecUtil.DEFAULT_HEADER_TABLE_SIZE.- Specified by:
maxHeaderTableSizein interfaceHttp2HeadersEncoder.Configuration
-
maxHeaderListSize
Description copied from interface:Http2HeadersEncoder.ConfigurationRepresents the value for SETTINGS_MAX_HEADER_LIST_SIZE. This method should only be called by Netty (not users) as a result of a receiving aSETTINGSframe.- Specified by:
maxHeaderListSizein interfaceHttp2HeadersEncoder.Configuration- Throws:
Http2Exception
-
maxHeaderListSize
public long maxHeaderListSize()Description copied from interface:Http2HeadersEncoder.ConfigurationRepresents the value for SETTINGS_MAX_HEADER_LIST_SIZE.- Specified by:
maxHeaderListSizein interfaceHttp2HeadersEncoder.Configuration
-
configuration
Description copied from interface:Http2HeadersEncoderGet theHttp2HeadersEncoder.Configurationfor thisHttp2HeadersEncoder- Specified by:
configurationin interfaceHttp2HeadersEncoder
-
close
public void close()Close the encoder and release all its associated data.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-