Package io.netty.handler.codec.http2
Class DefaultHttp2HeadersEncoder
- java.lang.Object
-
- io.netty.handler.codec.http2.DefaultHttp2HeadersEncoder
-
- All Implemented Interfaces:
Http2HeadersEncoder,Http2HeadersEncoder.Configuration,java.io.Closeable,java.lang.AutoCloseable
public class DefaultHttp2HeadersEncoder extends java.lang.Object implements Http2HeadersEncoder, Http2HeadersEncoder.Configuration, java.io.Closeable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.handler.codec.http2.Http2HeadersEncoder
Http2HeadersEncoder.Configuration, Http2HeadersEncoder.SensitivityDetector
-
-
Field Summary
-
Fields inherited from interface io.netty.handler.codec.http2.Http2HeadersEncoder
ALWAYS_SENSITIVE, NEVER_SENSITIVE
-
-
Constructor Summary
Constructors Constructor Description DefaultHttp2HeadersEncoder()DefaultHttp2HeadersEncoder(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the encoder and release all its associated data.Http2HeadersEncoder.Configurationconfiguration()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.longmaxHeaderListSize()Represents the value for SETTINGS_MAX_HEADER_LIST_SIZE.voidmaxHeaderListSize(long max)Represents the value for SETTINGS_MAX_HEADER_LIST_SIZE.longmaxHeaderTableSize()Represents the value for SETTINGS_HEADER_TABLE_SIZE.voidmaxHeaderTableSize(long max)Represents the value for SETTINGS_HEADER_TABLE_SIZE.
-
-
-
Constructor Detail
-
DefaultHttp2HeadersEncoder
public DefaultHttp2HeadersEncoder()
-
DefaultHttp2HeadersEncoder
public DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector)
-
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 Detail
-
encodeHeaders
public void encodeHeaders(int streamId, Http2Headers headers, ByteBuf buffer) throws Http2ExceptionDescription 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
public void maxHeaderTableSize(long max) throws Http2ExceptionDescription 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
public void maxHeaderListSize(long max) throws Http2ExceptionDescription 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
public Http2HeadersEncoder.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 interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
-