@UnstableApi public final class HttpToHttp2ConnectionHandlerBuilder extends AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler,HttpToHttp2ConnectionHandlerBuilder>
HttpToHttp2ConnectionHandler
objects.构造器和说明 |
---|
HttpToHttp2ConnectionHandlerBuilder() |
autoAckPingFrame, autoAckSettingsFrame, connection, decoder, decoderEnforceMaxConsecutiveEmptyDataFrames, decoderEnforceMaxConsecutiveEmptyDataFrames, decoderEnforceMaxRstFramesPerWindow, decoupleCloseAndGoAway, encoder, encoderEnforceMaxConcurrentStreams, encoderEnforceMaxQueuedControlFrames, encoderEnforceMaxQueuedControlFrames, encoderIgnoreMaxHeaderListSize, flushPreface, frameListener, frameLogger, gracefulShutdownTimeoutMillis, headerSensitivityDetector, initialSettings, isAutoAckPingFrame, isAutoAckSettingsFrame, isServer, isValidateHeaders, maxReservedStreams, maxReservedStreams, promisedRequestVerifier, promisedRequestVerifier, self
public HttpToHttp2ConnectionHandlerBuilder validateHeaders(boolean validateHeaders)
public HttpToHttp2ConnectionHandlerBuilder initialSettings(Http2Settings settings)
Http2Settings
to use for the initial connection settings exchange.public HttpToHttp2ConnectionHandlerBuilder frameListener(Http2FrameListener frameListener)
null
.public HttpToHttp2ConnectionHandlerBuilder gracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis)
Http2Connection
in milliseconds.public HttpToHttp2ConnectionHandlerBuilder server(boolean isServer)
AbstractHttp2ConnectionHandlerBuilder.build()
will to create a Http2Connection
in server mode (true
)
or client mode (false
).public HttpToHttp2ConnectionHandlerBuilder connection(Http2Connection connection)
Http2Connection
to use.public HttpToHttp2ConnectionHandlerBuilder codec(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder)
Http2ConnectionDecoder
and Http2ConnectionEncoder
to use.public HttpToHttp2ConnectionHandlerBuilder frameLogger(Http2FrameLogger frameLogger)
public HttpToHttp2ConnectionHandlerBuilder encoderEnforceMaxConcurrentStreams(boolean encoderEnforceMaxConcurrentStreams)
public HttpToHttp2ConnectionHandlerBuilder headerSensitivityDetector(Http2HeadersEncoder.SensitivityDetector headerSensitivityDetector)
Http2HeadersEncoder.SensitivityDetector
to use.@Deprecated public HttpToHttp2ConnectionHandlerBuilder initialHuffmanDecodeCapacity(int initialHuffmanDecodeCapacity)
public HttpToHttp2ConnectionHandlerBuilder decoupleCloseAndGoAway(boolean decoupleCloseAndGoAway)
ChannelOutboundInvoker.close()
should be coupled with goaway and graceful close.decoupleCloseAndGoAway
在类中 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)
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.
flushPreface
在类中 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()
Http2ConnectionHandler
.protected HttpToHttp2ConnectionHandler build(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder, Http2Settings initialSettings)
Http2ConnectionHandler
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 set