@UnstableApi public final class Http2ConnectionHandlerBuilder extends AbstractHttp2ConnectionHandlerBuilder<Http2ConnectionHandler,Http2ConnectionHandlerBuilder>
Http2ConnectionHandler
对象的生成器。
Constructor and Description |
---|
Http2ConnectionHandlerBuilder() |
connection, decoder, encoder, encoderEnforceMaxConcurrentStreams, frameListener, frameLogger, gracefulShutdownTimeoutMillis, headerSensitivityDetector, initialSettings, isServer, isValidateHeaders, maxReservedStreams, self
public Http2ConnectionHandlerBuilder validateHeaders(boolean validateHeaders)
public Http2ConnectionHandlerBuilder initialSettings(Http2Settings settings)
Http2Settings
用于初始连接设置交换。
public Http2ConnectionHandlerBuilder frameListener(Http2FrameListener frameListener)
null
时才会被设置。
public Http2ConnectionHandlerBuilder gracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis)
Http2Connection
的正常关闭超时。
public Http2ConnectionHandlerBuilder server(boolean isServer)
AbstractHttp2ConnectionHandlerBuilder.build()
将创建一个Http2Connection
服务器模式( true
)或客户端模式( false
)。
public Http2ConnectionHandlerBuilder connection(Http2Connection connection)
Http2Connection
。
public Http2ConnectionHandlerBuilder maxReservedStreams(int maxReservedStreams)
public Http2ConnectionHandlerBuilder codec(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder)
public Http2ConnectionHandlerBuilder frameLogger(Http2FrameLogger frameLogger)
public Http2ConnectionHandlerBuilder encoderEnforceMaxConcurrentStreams(boolean encoderEnforceMaxConcurrentStreams)
public Http2ConnectionHandlerBuilder encoderIgnoreMaxHeaderListSize(boolean encoderIgnoreMaxHeaderListSize)
encoderIgnoreMaxHeaderListSize
AbstractHttp2ConnectionHandlerBuilder<Http2ConnectionHandler,Http2ConnectionHandlerBuilder>
encoderIgnoreMaxHeaderListSize
-
true
忽略
SETTINGS_MAX_HEADER_LIST_SIZE 。
public Http2ConnectionHandlerBuilder headerSensitivityDetector(Http2HeadersEncoder.SensitivityDetector headerSensitivityDetector)
public Http2ConnectionHandlerBuilder initialHuffmanDecodeCapacity(int initialHuffmanDecodeCapacity)
initialHuffmanDecodeCapacity
AbstractHttp2ConnectionHandlerBuilder<Http2ConnectionHandler,Http2ConnectionHandlerBuilder>
initialHuffmanDecodeCapacity
- 在HPACK huffman解码期间使用的中间缓冲区的初始大小。
public Http2ConnectionHandler build()
Http2ConnectionHandler
。
protected Http2ConnectionHandler build(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder, Http2Settings initialSettings)
Http2ConnectionHandler
或其子类型实例。
此方法的返回将受到以下限制:
Copyright © 2008–2018 The Netty Project. All rights reserved.