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