Module io.netty.codec.http2
Package io.netty5.handler.codec.http2
Class HttpToHttp2ConnectionHandlerBuilder
- java.lang.Object
-
- io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler,HttpToHttp2ConnectionHandlerBuilder>
-
- io.netty5.handler.codec.http2.HttpToHttp2ConnectionHandlerBuilder
-
@UnstableApi public final class HttpToHttp2ConnectionHandlerBuilder extends AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler,HttpToHttp2ConnectionHandlerBuilder>
Builder which buildsHttpToHttp2ConnectionHandlerobjects.
-
-
Constructor Summary
Constructors Constructor Description HttpToHttp2ConnectionHandlerBuilder()
-
Method Summary
-
Methods inherited from class io.netty5.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder
autoAckPingFrame, autoAckSettingsFrame, connection, decoder, decoderEnforceMaxConsecutiveEmptyDataFrames, decoderEnforceMaxConsecutiveEmptyDataFrames, decoupleCloseAndGoAway, encoder, encoderEnforceMaxConcurrentStreams, encoderEnforceMaxQueuedControlFrames, encoderEnforceMaxQueuedControlFrames, encoderIgnoreMaxHeaderListSize, flushPreface, frameListener, frameLogger, gracefulShutdownTimeoutMillis, headerSensitivityDetector, initialSettings, isAutoAckPingFrame, isAutoAckSettingsFrame, isServer, isValidateHeaders, maxReservedStreams, maxReservedStreams, promisedRequestVerifier, promisedRequestVerifier, self
-
-
-
-
Method Detail
-
validateHeaders
public HttpToHttp2ConnectionHandlerBuilder validateHeaders(boolean validateHeaders)
Description copied from class:AbstractHttp2ConnectionHandlerBuilderSets if HTTP headers should be validated according to RFC 7540, 8.1.2.6.
-
initialSettings
public HttpToHttp2ConnectionHandlerBuilder initialSettings(Http2Settings settings)
Description copied from class:AbstractHttp2ConnectionHandlerBuilderSets theHttp2Settingsto use for the initial connection settings exchange.
-
frameListener
public HttpToHttp2ConnectionHandlerBuilder frameListener(Http2FrameListener frameListener)
Description copied from class:AbstractHttp2ConnectionHandlerBuilderSets the listener of inbound frames. This listener will only be set if the decoder's listener isnull.
-
gracefulShutdownTimeoutMillis
public HttpToHttp2ConnectionHandlerBuilder gracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis)
Description copied from class:AbstractHttp2ConnectionHandlerBuilderSets the graceful shutdown timeout of theHttp2Connectionin milliseconds.
-
server
public HttpToHttp2ConnectionHandlerBuilder server(boolean isServer)
Description copied from class:AbstractHttp2ConnectionHandlerBuilderSets ifAbstractHttp2ConnectionHandlerBuilder.build()will to create aHttp2Connectionin server mode (true) or client mode (false).
-
connection
public HttpToHttp2ConnectionHandlerBuilder connection(Http2Connection connection)
Description copied from class:AbstractHttp2ConnectionHandlerBuilderSets theHttp2Connectionto use.
-
codec
public HttpToHttp2ConnectionHandlerBuilder codec(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder)
Description copied from class:AbstractHttp2ConnectionHandlerBuilderSets theHttp2ConnectionDecoderandHttp2ConnectionEncoderto use.
-
frameLogger
public HttpToHttp2ConnectionHandlerBuilder frameLogger(Http2FrameLogger frameLogger)
Description copied from class:AbstractHttp2ConnectionHandlerBuilderSets the logger that is used for the encoder and decoder.
-
encoderEnforceMaxConcurrentStreams
public HttpToHttp2ConnectionHandlerBuilder encoderEnforceMaxConcurrentStreams(boolean encoderEnforceMaxConcurrentStreams)
Description copied from class:AbstractHttp2ConnectionHandlerBuilderSets if the encoder should queue frames if the maximum number of concurrent streams would otherwise be exceeded.
-
headerSensitivityDetector
public HttpToHttp2ConnectionHandlerBuilder headerSensitivityDetector(Http2HeadersEncoder.SensitivityDetector headerSensitivityDetector)
Description copied from class:AbstractHttp2ConnectionHandlerBuilderSets theHttp2HeadersEncoder.SensitivityDetectorto use.
-
initialHuffmanDecodeCapacity
@Deprecated public HttpToHttp2ConnectionHandlerBuilder initialHuffmanDecodeCapacity(int initialHuffmanDecodeCapacity)
Deprecated.Description copied from class:AbstractHttp2ConnectionHandlerBuilderDoes nothing, do not call.
-
decoupleCloseAndGoAway
public HttpToHttp2ConnectionHandlerBuilder decoupleCloseAndGoAway(boolean decoupleCloseAndGoAway)
Description copied from class:AbstractHttp2ConnectionHandlerBuilderDetermine if theChannel.close()should be coupled with goaway and graceful close.- Overrides:
decoupleCloseAndGoAwayin classAbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler,HttpToHttp2ConnectionHandlerBuilder>- Parameters:
decoupleCloseAndGoAway-trueto makeChannel.close()directly close the underlying transport, and not attempt graceful closure via GOAWAY.- Returns:
this.
-
flushPreface
public HttpToHttp2ConnectionHandlerBuilder flushPreface(boolean flushPreface)
Description copied from class:AbstractHttp2ConnectionHandlerBuilderDetermine if the Preface should be automatically flushed when theChannelbecomes 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.
- Overrides:
flushPrefacein classAbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler,HttpToHttp2ConnectionHandlerBuilder>- Parameters:
flushPreface-trueto automatically flush,false otherwise.- Returns:
this.- See Also:
- HTTP/2 Connection Preface
-
httpScheme
public HttpToHttp2ConnectionHandlerBuilder httpScheme(HttpScheme httpScheme)
AddschemeinHttp2Headersif not already present.- Parameters:
httpScheme-HttpSchemetype- Returns:
this.
-
build
public HttpToHttp2ConnectionHandler build()
Description copied from class:AbstractHttp2ConnectionHandlerBuilderCreate a newHttp2ConnectionHandler.
-
build
protected HttpToHttp2ConnectionHandler build(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder, Http2Settings initialSettings)
Description copied from class:AbstractHttp2ConnectionHandlerBuilderImplement this method to create a newHttp2ConnectionHandleror 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 set
- Specified by:
buildin classAbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler,HttpToHttp2ConnectionHandlerBuilder>
-
-