Top Fields Constructors Methods
io.netty5.handler.codec.http2

public Class DefaultHttp2HeadersEncoder

extends Object
implements Http2HeadersEncoder, Configuration
Class Inheritance
All Implemented Interfaces
io.netty5.handler.codec.http2.Http2HeadersEncoder.Configuration, io.netty5.handler.codec.http2.Http2HeadersEncoder, java.lang.AutoCloseable
Annotations
@UnstableApi
Imports
io.netty5.buffer.Buffer, .BufferAllocator, io.netty5.handler.codec.http2.headers.Http2Headers, io.netty5.util.internal.UnstableApi

Field Summary

Modifier and TypeField and Description
private final HpackEncoder
private final Http2HeadersEncoder.SensitivityDetector
private final Buffer

Constructor Summary

AccessConstructor and Description
public
public
public
DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector, boolean ignoreMaxHeaderListSize)

public
DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector, boolean ignoreMaxHeaderListSize, int dynamicTableArraySizeHint)

public
DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector, boolean ignoreMaxHeaderListSize, int dynamicTableArraySizeHint, int huffCodeThreshold)

pack-priv
DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector, HpackEncoder hpackEncoder)

Exposed Used for testing only!

Method Summary

Modifier and TypeMethod and Description
public void
close()

Overrides default io.netty5.handler.codec.http2.Http2HeadersEncoder.close.

Close the encoder and release all its associated data.
public Http2HeadersEncoder.Configuration
public void
encodeHeaders(int
the identifier of the stream for which the headers are encoded.
streamId
,
Http2Headers
the headers to be encoded.
headers
,
Buffer
the buffer to receive the encoded headers.
buffer
)

Implements io.netty5.handler.codec.http2.Http2HeadersEncoder.encodeHeaders.

Encodes the given headers and writes the output headers block to the given output buffer.
public void
public long
public void
public long
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

hpackEncoderback to summary
private final HpackEncoder hpackEncoder
sensitivityDetectorback to summary
private final Http2HeadersEncoder.SensitivityDetector sensitivityDetector
tableSizeChangeOutputback to summary
private final Buffer tableSizeChangeOutput

Constructor Detail

DefaultHttp2HeadersEncoderback to summary
public DefaultHttp2HeadersEncoder()
DefaultHttp2HeadersEncoderback to summary
public DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector)
DefaultHttp2HeadersEncoderback to summary
public DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector, boolean ignoreMaxHeaderListSize)
DefaultHttp2HeadersEncoderback to summary
public DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector, boolean ignoreMaxHeaderListSize, int dynamicTableArraySizeHint)
DefaultHttp2HeadersEncoderback to summary
public DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector, boolean ignoreMaxHeaderListSize, int dynamicTableArraySizeHint, int huffCodeThreshold)
DefaultHttp2HeadersEncoderback to summary
pack-priv 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

closeback to summary
public void close()

Overrides default io.netty5.handler.codec.http2.Http2HeadersEncoder.close.

Doc from io.netty5.handler.codec.http2.Http2HeadersEncoder.close.

Close the encoder and release all its associated data. By default, this default method does nothing, but if needed, concrete encoders may override this method in order to clean up any resources when closed.

Annotations
@Override
configurationback to summary
public Http2HeadersEncoder.Configuration configuration()

Implements io.netty5.handler.codec.http2.Http2HeadersEncoder.configuration.

Doc from io.netty5.handler.codec.http2.Http2HeadersEncoder.configuration.

Get the Configuration for this Http2HeadersEncoder

Annotations
@Override
encodeHeadersback to summary
public void encodeHeaders(int streamId, Http2Headers headers, Buffer buffer) throws Http2Exception

Implements io.netty5.handler.codec.http2.Http2HeadersEncoder.encodeHeaders.

Doc from io.netty5.handler.codec.http2.Http2HeadersEncoder.encodeHeaders.

Encodes the given headers and writes the output headers block to the given output buffer.

Parameters
streamId:int

the identifier of the stream for which the headers are encoded.

headers:Http2Headers

the headers to be encoded.

buffer:Buffer

the buffer to receive the encoded headers.

Annotations
@Override
maxHeaderListSizeback to summary
public void maxHeaderListSize(long max) throws Http2Exception

Implements io.netty5.handler.codec.http2.Http2HeadersEncoder.Configuration.maxHeaderListSize.

Doc from io.netty5.handler.codec.http2.Http2HeadersEncoder.Configuration.maxHeaderListSize.

Represents the value for SETTINGS_MAX_HEADER_LIST_SIZE. This method should only be called by Netty (not users) as a result of a receiving a SETTINGS frame.

Annotations
@Override
maxHeaderListSizeback to summary
public long maxHeaderListSize()

Implements io.netty5.handler.codec.http2.Http2HeadersEncoder.Configuration.maxHeaderListSize.

Doc from io.netty5.handler.codec.http2.Http2HeadersEncoder.Configuration.maxHeaderListSize.

Represents the value for SETTINGS_MAX_HEADER_LIST_SIZE.

Annotations
@Override
maxHeaderTableSizeback to summary
public void maxHeaderTableSize(long max) throws Http2Exception

Implements io.netty5.handler.codec.http2.Http2HeadersEncoder.Configuration.maxHeaderTableSize.

Doc from io.netty5.handler.codec.http2.Http2HeadersEncoder.Configuration.maxHeaderTableSize.

Represents the value for SETTINGS_HEADER_TABLE_SIZE. This method should only be called by Netty (not users) as a result of a receiving a SETTINGS frame.

Annotations
@Override
maxHeaderTableSizeback to summary
public long maxHeaderTableSize()

Implements io.netty5.handler.codec.http2.Http2HeadersEncoder.Configuration.maxHeaderTableSize.

Doc from io.netty5.handler.codec.http2.Http2HeadersEncoder.Configuration.maxHeaderTableSize.

Represents the value for SETTINGS_HEADER_TABLE_SIZE. The initial value returned by this method must be Http2CodecUtil#DEFAULT_HEADER_TABLE_SIZE.

Annotations
@Override