@UnstableApi public class DefaultHttp2HeadersEncoder extends java.lang.Object implements Http2HeadersEncoder, Http2HeadersEncoder.Configuration
Http2HeadersEncoder.Configuration, Http2HeadersEncoder.SensitivityDetector
Modifier and Type | Field and Description |
---|---|
private HpackEncoder |
hpackEncoder |
private Http2HeadersEncoder.SensitivityDetector |
sensitivityDetector |
private ByteBuf |
tableSizeChangeOutput |
ALWAYS_SENSITIVE, NEVER_SENSITIVE
Constructor and Description |
---|
DefaultHttp2HeadersEncoder() |
DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector) |
DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector,
boolean ignoreMaxHeaderListSize) |
DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector,
boolean ignoreMaxHeaderListSize,
int dynamicTableArraySizeHint) |
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.
|
Modifier and Type | Method and Description |
---|---|
Http2HeadersEncoder.Configuration |
configuration()
Get the
Http2HeadersEncoder.Configuration for this Http2HeadersEncoder |
void |
encodeHeaders(int streamId,
Http2Headers headers,
ByteBuf buffer)
Encodes the given headers and writes the output headers block to the given output buffer.
|
long |
maxHeaderListSize()
Represents the value for
SETTINGS_MAX_HEADER_LIST_SIZE.
|
void |
maxHeaderListSize(long max)
Represents the value for
SETTINGS_MAX_HEADER_LIST_SIZE.
|
long |
maxHeaderTableSize()
Represents the value for
SETTINGS_HEADER_TABLE_SIZE.
|
void |
maxHeaderTableSize(long max)
Represents the value for
SETTINGS_HEADER_TABLE_SIZE.
|
private final HpackEncoder hpackEncoder
private final Http2HeadersEncoder.SensitivityDetector sensitivityDetector
private final ByteBuf tableSizeChangeOutput
public DefaultHttp2HeadersEncoder()
public DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector)
public DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector, boolean ignoreMaxHeaderListSize)
public DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector, boolean ignoreMaxHeaderListSize, int dynamicTableArraySizeHint)
DefaultHttp2HeadersEncoder(Http2HeadersEncoder.SensitivityDetector sensitivityDetector, HpackEncoder hpackEncoder)
public void encodeHeaders(int streamId, Http2Headers headers, ByteBuf buffer) throws Http2Exception
Http2HeadersEncoder
encodeHeaders
in interface Http2HeadersEncoder
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.Http2Exception
public void maxHeaderTableSize(long max) throws Http2Exception
Http2HeadersEncoder.Configuration
SETTINGS
frame.maxHeaderTableSize
in interface Http2HeadersEncoder.Configuration
Http2Exception
public long maxHeaderTableSize()
Http2HeadersEncoder.Configuration
Http2CodecUtil.DEFAULT_HEADER_TABLE_SIZE
.maxHeaderTableSize
in interface Http2HeadersEncoder.Configuration
public void maxHeaderListSize(long max) throws Http2Exception
Http2HeadersEncoder.Configuration
SETTINGS
frame.maxHeaderListSize
in interface Http2HeadersEncoder.Configuration
Http2Exception
public long maxHeaderListSize()
Http2HeadersEncoder.Configuration
maxHeaderListSize
in interface Http2HeadersEncoder.Configuration
public Http2HeadersEncoder.Configuration configuration()
Http2HeadersEncoder
Http2HeadersEncoder.Configuration
for this Http2HeadersEncoder
configuration
in interface Http2HeadersEncoder