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