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

public Class Http2FrameCodecBuilder

extends AbstractHttp2ConnectionHandlerBuilder<Http2FrameCodec, Http2FrameCodecBuilder>
Class Inheritance
Annotations
@UnstableApi
Imports
io.netty5.util.internal.UnstableApi

Builder for the Http2FrameCodec.

Field Summary

Modifier and TypeField and Description
private Http2FrameWriter

Constructor Summary

AccessConstructor and Description
protected
Http2FrameCodecBuilder()

Allows overriding behavior of existing builder.

pack-priv
Http2FrameCodecBuilder(boolean server)

Method Summary

Modifier and TypeMethod and Description
public Http2FrameCodecBuilder
autoAckPingFrame(boolean autoAckPingFrame)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.autoAckPingFrame.

Determine if PING frame should automatically be acknowledged or not.
public Http2FrameCodecBuilder
autoAckSettingsFrame(boolean autoAckSettings)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.autoAckSettingsFrame.

Determine if settings frame should automatically be acknowledged and applied.
public Http2FrameCodec
protected Http2FrameCodec
build(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder, Http2Settings initialSettings)

Implements abstract io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.build.

Implement this method to create a new Http2ConnectionHandler or its subtype instance.
public int
decoderEnforceMaxConsecutiveEmptyDataFrames()

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.decoderEnforceMaxConsecutiveEmptyDataFrames.

Returns the maximum number of consecutive empty DATA frames (without end_of_stream flag) that are allowed before the connection is closed.
public Http2FrameCodecBuilder
decoderEnforceMaxConsecutiveEmptyDataFrames(int maxConsecutiveEmptyFrames)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.decoderEnforceMaxConsecutiveEmptyDataFrames.

Sets the maximum number of consecutive empty DATA frames (without end_of_stream flag) that are allowed before the connection is closed.
public Http2FrameCodecBuilder
decoupleCloseAndGoAway(boolean
true to make Channel#close() directly close the underlying transport, and not attempt graceful closure via GOAWAY.
decoupleCloseAndGoAway
)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.decoupleCloseAndGoAway.

Determine if the Channel#close() should be coupled with goaway and graceful close.
public boolean
encoderEnforceMaxConcurrentStreams()

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.encoderEnforceMaxConcurrentStreams.

Returns if the encoder should queue frames if the maximum number of concurrent streams would otherwise be exceeded.
public Http2FrameCodecBuilder
encoderEnforceMaxConcurrentStreams(boolean encoderEnforceMaxConcurrentStreams)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.encoderEnforceMaxConcurrentStreams.

Sets if the encoder should queue frames if the maximum number of concurrent streams would otherwise be exceeded.
public int
encoderEnforceMaxQueuedControlFrames()

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.encoderEnforceMaxQueuedControlFrames.

Returns the maximum number of queued control frames that are allowed before the connection is closed.
public Http2FrameCodecBuilder
encoderEnforceMaxQueuedControlFrames(int maxQueuedControlFrames)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.encoderEnforceMaxQueuedControlFrames.

Sets the maximum number of queued control frames that are allowed before the connection is closed.
public Http2FrameCodecBuilder
public Http2FrameCodecBuilder
flushPreface(boolean
true to automatically flush, false otherwise.
flushPreface
)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.flushPreface.

Determine if the Preface should be automatically flushed when the Channel becomes active or not.
public static Http2FrameCodecBuilder
forClient()

Creates a builder for an HTTP/2 client.

public static Http2FrameCodecBuilder
forServer()

Creates a builder for an HTTP/2 server.

public Http2FrameLogger
frameLogger()

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.frameLogger.

Returns the logger that is used for the encoder and decoder.
public Http2FrameCodecBuilder
frameLogger(Http2FrameLogger frameLogger)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.frameLogger.

Sets the logger that is used for the encoder and decoder.
pack-priv Http2FrameCodecBuilder
public long
public Http2FrameCodecBuilder
gracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.gracefulShutdownTimeoutMillis.

Sets the graceful shutdown timeout of the Http2Connection in milliseconds.
public Http2HeadersEncoder.SensitivityDetector
public Http2FrameCodecBuilder
public Http2FrameCodecBuilder
initialHuffmanDecodeCapacity(int initialHuffmanDecodeCapacity)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.initialHuffmanDecodeCapacity.

Deprecated
Does nothing, do not call.
public Http2Settings
initialSettings()

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.initialSettings.

Sets the Http2Settings to use for the initial connection settings exchange.
public Http2FrameCodecBuilder
initialSettings(Http2Settings settings)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.initialSettings.

Sets the Http2Settings to use for the initial connection settings exchange.
public boolean
isServer()

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.isServer.

Returns if build() will to create a Http2Connection in server mode (true) or client mode (false).
public boolean
public int
maxReservedStreams()

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.maxReservedStreams.

Get the maximum number of streams which can be in the reserved state at any given time.
public Http2FrameCodecBuilder
maxReservedStreams(int maxReservedStreams)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.maxReservedStreams.

Set the maximum number of streams which can be in the reserved state at any given time.
public Http2FrameCodecBuilder
validateHeaders(boolean validateHeaders)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.validateHeaders.

Sets if HTTP headers should be validated according to RFC 7540, 8.1.2.6.
Inherited from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder:
codecconnectionconnectiondecoderdecoupleCloseAndGoAwayencoderflushPrefaceframeListenerframeListenerisAutoAckPingFrameisAutoAckSettingsFramepromisedRequestVerifierpromisedRequestVerifierselfserver

Field Detail

frameWriterback to summary
private Http2FrameWriter frameWriter

Constructor Detail

Http2FrameCodecBuilderback to summary
protected Http2FrameCodecBuilder()

Allows overriding behavior of existing builder.

Users of this constructor are responsible for invoking server(boolean) method or overriding isServer() method to give the builder information if the Http2Connection(s) it creates are in server or client mode.

See Also
AbstractHttp2ConnectionHandlerBuilder
Http2FrameCodecBuilderback to summary
pack-priv Http2FrameCodecBuilder(boolean server)

Method Detail

autoAckPingFrameback to summary
public Http2FrameCodecBuilder autoAckPingFrame(boolean autoAckPingFrame)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.autoAckPingFrame.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.autoAckPingFrame.

Determine if PING frame should automatically be acknowledged or not.

Returns:Http2FrameCodecBuilder

this.

Annotations
@Override
autoAckSettingsFrameback to summary
public Http2FrameCodecBuilder autoAckSettingsFrame(boolean autoAckSettings)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.autoAckSettingsFrame.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.autoAckSettingsFrame.

Determine if settings frame should automatically be acknowledged and applied.

Returns:Http2FrameCodecBuilder

this.

Annotations
@Override
buildback to summary
public Http2FrameCodec build()

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.build.

Build a Http2FrameCodec object.

Annotations
@Override
buildback to summary
protected Http2FrameCodec build(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder, Http2Settings initialSettings)

Implements abstract io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.build.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.build.

Implement this method to create a new Http2ConnectionHandler or its subtype instance.

The return of this method will be subject to the following:

Annotations
@Override
decoderEnforceMaxConsecutiveEmptyDataFramesback to summary
public int decoderEnforceMaxConsecutiveEmptyDataFrames()

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.decoderEnforceMaxConsecutiveEmptyDataFrames.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.decoderEnforceMaxConsecutiveEmptyDataFrames.

Returns the maximum number of consecutive empty DATA frames (without end_of_stream flag) that are allowed before the connection is closed. This allows to protected against the remote peer flooding us with such frames and so use up a lot of CPU. There is no valid use-case for empty DATA frames without end_of_stream flag. 0 means no protection is in place.

Annotations
@Override
decoderEnforceMaxConsecutiveEmptyDataFramesback to summary
public Http2FrameCodecBuilder decoderEnforceMaxConsecutiveEmptyDataFrames(int maxConsecutiveEmptyFrames)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.decoderEnforceMaxConsecutiveEmptyDataFrames.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.decoderEnforceMaxConsecutiveEmptyDataFrames.

Sets the maximum number of consecutive empty DATA frames (without end_of_stream flag) that are allowed before the connection is closed. This allows to protected against the remote peer flooding us with such frames and so use up a lot of CPU. There is no valid use-case for empty DATA frames without end_of_stream flag. 0 means no protection should be applied.

Annotations
@Override
decoupleCloseAndGoAwayback to summary
public Http2FrameCodecBuilder decoupleCloseAndGoAway(boolean decoupleCloseAndGoAway)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.decoupleCloseAndGoAway.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.decoupleCloseAndGoAway.

Determine if the Channel#close() should be coupled with goaway and graceful close.

Parameters
decoupleCloseAndGoAway:boolean

true to make Channel#close() directly close the underlying transport, and not attempt graceful closure via GOAWAY.

Returns:Http2FrameCodecBuilder

this.

Annotations
@Override
encoderEnforceMaxConcurrentStreamsback to summary
public boolean encoderEnforceMaxConcurrentStreams()

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.encoderEnforceMaxConcurrentStreams.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.encoderEnforceMaxConcurrentStreams.

Returns if the encoder should queue frames if the maximum number of concurrent streams would otherwise be exceeded.

Annotations
@Override
encoderEnforceMaxConcurrentStreamsback to summary
public Http2FrameCodecBuilder encoderEnforceMaxConcurrentStreams(boolean encoderEnforceMaxConcurrentStreams)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.encoderEnforceMaxConcurrentStreams.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.encoderEnforceMaxConcurrentStreams.

Sets if the encoder should queue frames if the maximum number of concurrent streams would otherwise be exceeded.

Annotations
@Override
encoderEnforceMaxQueuedControlFramesback to summary
public int encoderEnforceMaxQueuedControlFrames()

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.encoderEnforceMaxQueuedControlFrames.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.encoderEnforceMaxQueuedControlFrames.

Returns the maximum number of queued control frames that are allowed before the connection is closed. This allows to protected against various attacks that can lead to high CPU / memory usage if the remote-peer floods us with frames that would have us produce control frames, but stops to read from the underlying socket. 0 means no protection is in place.

Annotations
@Override
encoderEnforceMaxQueuedControlFramesback to summary
public Http2FrameCodecBuilder encoderEnforceMaxQueuedControlFrames(int maxQueuedControlFrames)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.encoderEnforceMaxQueuedControlFrames.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.encoderEnforceMaxQueuedControlFrames.

Sets the maximum number of queued control frames that are allowed before the connection is closed. This allows to protected against various attacks that can lead to high CPU / memory usage if the remote-peer floods us with frames that would have us produce control frames, but stops to read from the underlying socket. 0 means no protection should be applied.

Annotations
@Override
encoderIgnoreMaxHeaderListSizeback to summary
public Http2FrameCodecBuilder encoderIgnoreMaxHeaderListSize(boolean ignoreMaxHeaderListSize)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.encoderIgnoreMaxHeaderListSize.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.encoderIgnoreMaxHeaderListSize.

Sets if the SETTINGS_MAX_HEADER_LIST_SIZE should be ignored when encoding headers.

Parameters
ignoreMaxHeaderListSize:boolean

true to ignore SETTINGS_MAX_HEADER_LIST_SIZE.

Returns:Http2FrameCodecBuilder

this.

Annotations
@Override
flushPrefaceback to summary
public Http2FrameCodecBuilder flushPreface(boolean flushPreface)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.flushPreface.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.flushPreface.

Determine if the Preface should be automatically flushed when the Channel becomes active or not.

Client may choose to opt-out from this automatic behavior and manage flush manually if it's ready to send request frames immediately after the preface. It may help to avoid unnecessary latency.

Parameters
flushPreface:boolean

true to automatically flush, false otherwise.

Returns:Http2FrameCodecBuilder

this.

Annotations
@Override
forClientback to summary
public static Http2FrameCodecBuilder forClient()

Creates a builder for an HTTP/2 client.

forServerback to summary
public static Http2FrameCodecBuilder forServer()

Creates a builder for an HTTP/2 server.

frameLoggerback to summary
public Http2FrameLogger frameLogger()

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.frameLogger.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.frameLogger.

Returns the logger that is used for the encoder and decoder.

Returns:Http2FrameLogger

Http2FrameLogger if set, or null if not set.

Annotations
@Override
frameLoggerback to summary
public Http2FrameCodecBuilder frameLogger(Http2FrameLogger frameLogger)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.frameLogger.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.frameLogger.

Sets the logger that is used for the encoder and decoder.

Annotations
@Override
frameWriterback to summary
pack-priv Http2FrameCodecBuilder frameWriter(Http2FrameWriter frameWriter)
gracefulShutdownTimeoutMillisback to summary
public long gracefulShutdownTimeoutMillis()

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.gracefulShutdownTimeoutMillis.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.gracefulShutdownTimeoutMillis.

Returns the graceful shutdown timeout of the Http2Connection in milliseconds. Returns -1 if the timeout is indefinite.

Annotations
@Override
gracefulShutdownTimeoutMillisback to summary
public Http2FrameCodecBuilder gracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.gracefulShutdownTimeoutMillis.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.gracefulShutdownTimeoutMillis.

Sets the graceful shutdown timeout of the Http2Connection in milliseconds.

Annotations
@Override
headerSensitivityDetectorback to summary
public Http2HeadersEncoder.SensitivityDetector headerSensitivityDetector()

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.headerSensitivityDetector.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.headerSensitivityDetector.

Returns the SensitivityDetector to use.

Annotations
@Override
headerSensitivityDetectorback to summary
public Http2FrameCodecBuilder headerSensitivityDetector(Http2HeadersEncoder.SensitivityDetector headerSensitivityDetector)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.headerSensitivityDetector.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.headerSensitivityDetector.

Sets the SensitivityDetector to use.

Annotations
@Override
initialHuffmanDecodeCapacityback to summary
public Http2FrameCodecBuilder initialHuffmanDecodeCapacity(int initialHuffmanDecodeCapacity)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.initialHuffmanDecodeCapacity.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.initialHuffmanDecodeCapacity.

Deprecated

Does nothing, do not call.

Annotations
@Override
@Deprecated
initialSettingsback to summary
public Http2Settings initialSettings()

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.initialSettings.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.initialSettings.

Sets the Http2Settings to use for the initial connection settings exchange.

Annotations
@Override
initialSettingsback to summary
public Http2FrameCodecBuilder initialSettings(Http2Settings settings)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.initialSettings.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.initialSettings.

Sets the Http2Settings to use for the initial connection settings exchange.

Annotations
@Override
isServerback to summary
public boolean isServer()

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.isServer.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.isServer.

Returns if build() will to create a Http2Connection in server mode (true) or client mode (false).

Annotations
@Override
isValidateHeadersback to summary
public boolean isValidateHeaders()

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.isValidateHeaders.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.isValidateHeaders.

Returns if HTTP headers should be validated according to RFC 7540, 8.1.2.6.

Annotations
@Override
maxReservedStreamsback to summary
public int maxReservedStreams()

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.maxReservedStreams.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.maxReservedStreams.

Get the maximum number of streams which can be in the reserved state at any given time.

By default this value will be ignored on the server for local endpoint. This is because the RFC provides no way to explicitly communicate a limit to how many states can be in the reserved state, and instead relies on the peer to send RST_STREAM frames when they will be rejected.

Annotations
@Override
maxReservedStreamsback to summary
public Http2FrameCodecBuilder maxReservedStreams(int maxReservedStreams)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.maxReservedStreams.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.maxReservedStreams.

Set the maximum number of streams which can be in the reserved state at any given time.

Annotations
@Override
validateHeadersback to summary
public Http2FrameCodecBuilder validateHeaders(boolean validateHeaders)

Overrides io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.validateHeaders.

Doc from io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder.validateHeaders.

Sets if HTTP headers should be validated according to RFC 7540, 8.1.2.6.

Annotations
@Override