@UnstableApi public class Http2FrameCodecBuilder extends AbstractHttp2ConnectionHandlerBuilder<Http2FrameCodec,Http2FrameCodecBuilder>
Http2FrameCodec
建造者 。
codec, connection, connection, decoder, encoder, frameListener, frameListener, self, server
public static Http2FrameCodecBuilder forClient()
public static Http2FrameCodecBuilder forServer()
public Http2Settings initialSettings()
Http2Settings
用于初始连接设置交换。
public Http2FrameCodecBuilder initialSettings(Http2Settings settings)
Http2Settings
用于初始连接设置交换。
public long gracefulShutdownTimeoutMillis()
Http2Connection
的正常关闭超时。
如果超时是无限的,则返回-1。
public Http2FrameCodecBuilder gracefulShutdownTimeoutMillis(long gracefulShutdownTimeoutMillis)
Http2Connection
的正常关闭超时。
public boolean isServer()
AbstractHttp2ConnectionHandlerBuilder.build()
将在服务器模式( true
)或客户端模式( false
)下创建Http2Connection
,则返回。
public int maxReservedStreams()
默认情况下,该值将在本地端点的服务器上被忽略。 这是因为RFC没有提供明确的通信限制,即有多少状态可以处于保留状态,而是依赖于对等方在发送RST_STREAM帧时被拒绝。
public Http2FrameCodecBuilder maxReservedStreams(int maxReservedStreams)
public boolean isValidateHeaders()
public Http2FrameCodecBuilder validateHeaders(boolean validateHeaders)
public Http2FrameLogger frameLogger()
frameLogger
AbstractHttp2ConnectionHandlerBuilder<Http2FrameCodec,Http2FrameCodecBuilder>
Http2FrameLogger
如果设置,或null
如果未设置。
public Http2FrameCodecBuilder frameLogger(Http2FrameLogger frameLogger)
public boolean encoderEnforceMaxConcurrentStreams()
public Http2FrameCodecBuilder encoderEnforceMaxConcurrentStreams(boolean encoderEnforceMaxConcurrentStreams)
public Http2HeadersEncoder.SensitivityDetector headerSensitivityDetector()
public Http2FrameCodecBuilder headerSensitivityDetector(Http2HeadersEncoder.SensitivityDetector headerSensitivityDetector)
public Http2FrameCodecBuilder encoderIgnoreMaxHeaderListSize(boolean ignoreMaxHeaderListSize)
encoderIgnoreMaxHeaderListSize
在课堂上
AbstractHttp2ConnectionHandlerBuilder<Http2FrameCodec,Http2FrameCodecBuilder>
ignoreMaxHeaderListSize
-
true
忽略
SETTINGS_MAX_HEADER_LIST_SIZE 。
public Http2FrameCodecBuilder initialHuffmanDecodeCapacity(int initialHuffmanDecodeCapacity)
initialHuffmanDecodeCapacity
在课堂上
AbstractHttp2ConnectionHandlerBuilder<Http2FrameCodec,Http2FrameCodecBuilder>
initialHuffmanDecodeCapacity
- 在HPACK huffman解码期间使用的中间缓冲区的初始大小。
public Http2FrameCodec build()
Http2FrameCodec
对象。
protected Http2FrameCodec build(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder, Http2Settings initialSettings)
Http2ConnectionHandler
或其子类型实例。
此方法的返回将受到以下限制:
build
in class
AbstractHttp2ConnectionHandlerBuilder<Http2FrameCodec,Http2FrameCodecBuilder>
Copyright © 2008–2018 The Netty Project. All rights reserved.