Package io.netty.handler.codec.http2
Class DefaultHttp2HeadersEncoder
- java.lang.Object
-
- io.netty.handler.codec.http2.DefaultHttp2HeadersEncoder
-
- All Implemented Interfaces:
Http2HeadersEncoder,Http2HeadersEncoder.Configuration
@UnstableApi public class DefaultHttp2HeadersEncoder extends java.lang.Object implements Http2HeadersEncoder, Http2HeadersEncoder.Configuration
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.handler.codec.http2.Http2HeadersEncoder
Http2HeadersEncoder.Configuration, Http2HeadersEncoder.SensitivityDetector
-
-
Field Summary
Fields Modifier and Type Field Description private HpackEncoderhpackEncoderprivate Http2HeadersEncoder.SensitivityDetectorsensitivityDetectorprivate ByteBuftableSizeChangeOutput-
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)DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector, HpackEncoder hpackEncoder)Exposed Used for testing only! Default values used in the initial settings frame are overridden intentionally for testing but violate the RFC if used outside the scope of testing.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Field Detail
-
hpackEncoder
private final HpackEncoder hpackEncoder
-
sensitivityDetector
private final Http2HeadersEncoder.SensitivityDetector sensitivityDetector
-
tableSizeChangeOutput
private final ByteBuf tableSizeChangeOutput
-
-
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)
-
DefaultHttp2HeadersEncoder
DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector, HpackEncoder hpackEncoder)
Exposed Used for testing only! Default values used in the initial settings frame are overridden intentionally for testing but violate the RFC if used outside the scope of testing.
-
-
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
-
-