public final class Http2ConnectionHandlerBuilder extends AbstractHttp2ConnectionHandlerBuilder<Http2ConnectionHandler,Http2ConnectionHandlerBuilder>
Http2ConnectionHandler objects.| Constructor and Description |
|---|
Http2ConnectionHandlerBuilder() |
| Modifier and Type | Method and Description |
|---|---|
Http2ConnectionHandler |
build()
Create a new
Http2ConnectionHandler. |
protected Http2ConnectionHandler |
build(Http2ConnectionDecoder decoder,
Http2ConnectionEncoder encoder,
Http2Settings initialSettings)
Implement this method to create a new
Http2ConnectionHandler or its subtype instance. |
Http2ConnectionHandlerBuilder |
codec(Http2ConnectionDecoder decoder,
Http2ConnectionEncoder encoder)
Sets the
Http2ConnectionDecoder and Http2ConnectionEncoder to use. |
Http2ConnectionHandlerBuilder |
connection(Http2Connection connection)
Sets the
Http2Connection to use. |
int |
decoderEnforceMaxConsecutiveEmptyDataFrames()
Returns the maximum number of consecutive empty DATA frames (without end_of_stream flag) that are allowed before
the connection is closed.
|
Http2ConnectionHandlerBuilder |
decoderEnforceMaxConsecutiveEmptyDataFrames(int maxConsecutiveEmptyFrames)
Sets the maximum number of consecutive empty DATA frames (without end_of_stream flag) that are allowed before
the connection is closed.
|
Http2ConnectionHandlerBuilder |
decoderEnforceMaxRstFramesPerWindow(int maxRstFramesPerWindow,
int secondsPerWindow)
Sets the maximum number RST frames that are allowed per window before
the connection is closed.
|
Http2ConnectionHandlerBuilder |
decoupleCloseAndGoAway(boolean decoupleCloseAndGoAway)
Determine if the
ChannelOutboundInvoker.close() should be coupled with goaway and graceful close. |
Http2ConnectionHandlerBuilder |
encoderEnforceMaxConcurrentStreams(boolean encoderEnforceMaxConcurrentStreams)
Sets if the encoder should queue frames if the maximum number of concurrent streams
would otherwise be exceeded.
|
Http2ConnectionHandlerBuilder |
encoderEnforceMaxRstFramesPerWindow(int maxRstFramesPerWindow,
int secondsPerWindow)
Sets the maximum number RST frames that are allowed per window before
the connection is closed.
|
Http2ConnectionHandlerBuilder |
encoderIgnoreMaxHeaderListSize(boolean encoderIgnoreMaxHeaderListSize)
Sets if the SETTINGS_MAX_HEADER_LIST_SIZE
should be ignored when encoding headers.
|
Http2ConnectionHandlerBuilder |
flushPreface(boolean flushPreface)
|
Http2ConnectionHandlerBuilder |
frameListener(Http2FrameListener frameListener)
Sets the listener of inbound frames.
|
Http2ConnectionHandlerBuilder |
frameLogger(Http2FrameLogger frameLogger)
Sets the logger that is used for the encoder and decoder.
|
Http2ConnectionHandlerBuilder |
gracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis)
Sets the graceful shutdown timeout of the
Http2Connection in milliseconds. |
Http2ConnectionHandlerBuilder |
headerSensitivityDetector(Http2HeadersEncoder.SensitivityDetector headerSensitivityDetector)
Sets the
Http2HeadersEncoder.SensitivityDetector to use. |
Http2ConnectionHandlerBuilder |
initialHuffmanDecodeCapacity(int initialHuffmanDecodeCapacity)
Deprecated.
|
Http2Settings |
initialSettings()
Sets the
Http2Settings to use for the initial connection settings exchange. |
Http2ConnectionHandlerBuilder |
initialSettings(Http2Settings settings)
Sets the
Http2Settings to use for the initial connection settings exchange. |
Http2ConnectionHandlerBuilder |
maxReservedStreams(int maxReservedStreams)
Set the maximum number of streams which can be in the reserved state at any given time.
|
Http2ConnectionHandlerBuilder |
server(boolean isServer)
Sets if
AbstractHttp2ConnectionHandlerBuilder.build() will to create a Http2Connection in server mode (true)
or client mode (false). |
Http2ConnectionHandlerBuilder |
validateHeaders(boolean validateHeaders)
Sets if HTTP headers should be validated according to
RFC 7540, 8.1.2.6.
|
autoAckPingFrame, autoAckSettingsFrame, connection, decoder, decoupleCloseAndGoAway, encoder, encoderEnforceMaxConcurrentStreams, encoderEnforceMaxQueuedControlFrames, encoderEnforceMaxQueuedControlFrames, flushPreface, frameListener, frameLogger, gracefulShutdownTimeoutMillis, headerSensitivityDetector, isAutoAckPingFrame, isAutoAckSettingsFrame, isServer, isValidateHeaders, maxReservedStreams, promisedRequestVerifier, promisedRequestVerifier, selfpublic Http2ConnectionHandlerBuilder validateHeaders(boolean validateHeaders)
AbstractHttp2ConnectionHandlerBuilderpublic Http2ConnectionHandlerBuilder initialSettings(Http2Settings settings)
AbstractHttp2ConnectionHandlerBuilderHttp2Settings to use for the initial connection settings exchange.public Http2Settings initialSettings()
AbstractHttp2ConnectionHandlerBuilderHttp2Settings to use for the initial connection settings exchange.public Http2ConnectionHandlerBuilder frameListener(Http2FrameListener frameListener)
AbstractHttp2ConnectionHandlerBuildernull.public Http2ConnectionHandlerBuilder gracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis)
AbstractHttp2ConnectionHandlerBuilderHttp2Connection in milliseconds.public Http2ConnectionHandlerBuilder server(boolean isServer)
AbstractHttp2ConnectionHandlerBuilderAbstractHttp2ConnectionHandlerBuilder.build() will to create a Http2Connection in server mode (true)
or client mode (false).server in class AbstractHttp2ConnectionHandlerBuilder<Http2ConnectionHandler,Http2ConnectionHandlerBuilder>public Http2ConnectionHandlerBuilder connection(Http2Connection connection)
AbstractHttp2ConnectionHandlerBuilderHttp2Connection to use.public Http2ConnectionHandlerBuilder maxReservedStreams(int maxReservedStreams)
AbstractHttp2ConnectionHandlerBuilderpublic Http2ConnectionHandlerBuilder codec(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder)
AbstractHttp2ConnectionHandlerBuilderHttp2ConnectionDecoder and Http2ConnectionEncoder to use.codec in class AbstractHttp2ConnectionHandlerBuilder<Http2ConnectionHandler,Http2ConnectionHandlerBuilder>public Http2ConnectionHandlerBuilder frameLogger(Http2FrameLogger frameLogger)
AbstractHttp2ConnectionHandlerBuilderpublic Http2ConnectionHandlerBuilder encoderEnforceMaxConcurrentStreams(boolean encoderEnforceMaxConcurrentStreams)
AbstractHttp2ConnectionHandlerBuilderpublic Http2ConnectionHandlerBuilder encoderIgnoreMaxHeaderListSize(boolean encoderIgnoreMaxHeaderListSize)
AbstractHttp2ConnectionHandlerBuilderencoderIgnoreMaxHeaderListSize in class AbstractHttp2ConnectionHandlerBuilder<Http2ConnectionHandler,Http2ConnectionHandlerBuilder>encoderIgnoreMaxHeaderListSize - true to ignore
SETTINGS_MAX_HEADER_LIST_SIZE.public Http2ConnectionHandlerBuilder headerSensitivityDetector(Http2HeadersEncoder.SensitivityDetector headerSensitivityDetector)
AbstractHttp2ConnectionHandlerBuilderHttp2HeadersEncoder.SensitivityDetector to use.@Deprecated public Http2ConnectionHandlerBuilder initialHuffmanDecodeCapacity(int initialHuffmanDecodeCapacity)
AbstractHttp2ConnectionHandlerBuilderpublic Http2ConnectionHandlerBuilder decoupleCloseAndGoAway(boolean decoupleCloseAndGoAway)
AbstractHttp2ConnectionHandlerBuilderChannelOutboundInvoker.close() should be coupled with goaway and graceful close.decoupleCloseAndGoAway in class AbstractHttp2ConnectionHandlerBuilder<Http2ConnectionHandler,Http2ConnectionHandlerBuilder>decoupleCloseAndGoAway - true to make ChannelOutboundInvoker.close() directly close the underlying
transport, and not attempt graceful closure via GOAWAY.this.public Http2ConnectionHandlerBuilder flushPreface(boolean flushPreface)
AbstractHttp2ConnectionHandlerBuilderChannel 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.
flushPreface in class AbstractHttp2ConnectionHandlerBuilder<Http2ConnectionHandler,Http2ConnectionHandlerBuilder>flushPreface - true to automatically flush, false otherwise.this.public int decoderEnforceMaxConsecutiveEmptyDataFrames()
AbstractHttp2ConnectionHandlerBuilder0 means no protection is in place.public Http2ConnectionHandlerBuilder decoderEnforceMaxConsecutiveEmptyDataFrames(int maxConsecutiveEmptyFrames)
AbstractHttp2ConnectionHandlerBuilder0 means no protection should be applied.public Http2ConnectionHandlerBuilder decoderEnforceMaxRstFramesPerWindow(int maxRstFramesPerWindow, int secondsPerWindow)
AbstractHttp2ConnectionHandlerBuilder0 for any of the parameters means no protection should be applied.public Http2ConnectionHandlerBuilder encoderEnforceMaxRstFramesPerWindow(int maxRstFramesPerWindow, int secondsPerWindow)
AbstractHttp2ConnectionHandlerBuilder0 for any of the parameters means no protection should be applied.public Http2ConnectionHandler build()
AbstractHttp2ConnectionHandlerBuilderHttp2ConnectionHandler.build in class AbstractHttp2ConnectionHandlerBuilder<Http2ConnectionHandler,Http2ConnectionHandlerBuilder>protected Http2ConnectionHandler build(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder, Http2Settings initialSettings)
AbstractHttp2ConnectionHandlerBuilderHttp2ConnectionHandler or its subtype instance.
The return of this method will be subject to the following:
AbstractHttp2ConnectionHandlerBuilder.frameListener(Http2FrameListener) will be set if not already set in the decoderAbstractHttp2ConnectionHandlerBuilder.gracefulShutdownTimeoutMillis(long) will always be setbuild in class AbstractHttp2ConnectionHandlerBuilder<Http2ConnectionHandler,Http2ConnectionHandlerBuilder>Copyright © 2008–2025 The Netty Project. All rights reserved.