@UnstableApi public final class InboundHttp2ToHttpAdapterBuilder extends AbstractInboundHttp2ToHttpAdapterBuilder<InboundHttp2ToHttpAdapter,InboundHttp2ToHttpAdapterBuilder>
Constructor and Description |
---|
InboundHttp2ToHttpAdapterBuilder(Http2Connection connection)
为指定的 Http2Connection 创建一个新的InboundHttp2ToHttpAdapter 构建器。
|
Modifier and Type | Method and Description |
---|---|
InboundHttp2ToHttpAdapter |
build()
使用此构建器的当前设置构建/创建一个新的 InboundHttp2ToHttpAdapter 实例。
|
protected InboundHttp2ToHttpAdapter |
build(Http2Connection connection, int maxContentLength, boolean validateHttpHeaders, boolean propagateSettings)
用指定的属性创建一个新的 InboundHttp2ToHttpAdapter 。
|
InboundHttp2ToHttpAdapterBuilder |
maxContentLength(int maxContentLength)
指定消息内容的最大长度。
|
InboundHttp2ToHttpAdapterBuilder |
propagateSettings(boolean propagate)
指定是否应该沿通道管道传播读取设置帧。
|
InboundHttp2ToHttpAdapterBuilder |
validateHttpHeaders(boolean validate)
指定是否应执行HTTP头的验证。
|
connection, isPropagateSettings, isValidateHttpHeaders, maxContentLength, self
public InboundHttp2ToHttpAdapterBuilder(Http2Connection connection)
Http2Connection
创建一个新的InboundHttp2ToHttpAdapter
构建器。
connection
- 将为当前连接提供连接通知事件的对象
public InboundHttp2ToHttpAdapterBuilder maxContentLength(int maxContentLength)
maxContentLength
在课堂
AbstractInboundHttp2ToHttpAdapterBuilder<InboundHttp2ToHttpAdapter,InboundHttp2ToHttpAdapterBuilder>
maxContentLength
- 邮件内容的最大长度。
如果消息内容的长度超过此值,则会引发TooLongFrameException
AbstractInboundHttp2ToHttpAdapterBuilder
建设者为InboundHttp2ToHttpAdapter
public InboundHttp2ToHttpAdapterBuilder validateHttpHeaders(boolean validate)
validateHttpHeaders
在课堂
AbstractInboundHttp2ToHttpAdapterBuilder<InboundHttp2ToHttpAdapter,InboundHttp2ToHttpAdapterBuilder>
validate
-
true
验证http-codec中的HTTP标头 false
不要验证http-codec中的HTTP标头 AbstractInboundHttp2ToHttpAdapterBuilder
建设者为InboundHttp2ToHttpAdapter
public InboundHttp2ToHttpAdapterBuilder propagateSettings(boolean propagate)
propagateSettings
class
AbstractInboundHttp2ToHttpAdapterBuilder<InboundHttp2ToHttpAdapter,InboundHttp2ToHttpAdapterBuilder>
propagate
- 如果true
读取设置将沿管道传递。
这对于需要在收到设置之前不需要发送数据的客户端会很有用。
AbstractInboundHttp2ToHttpAdapterBuilder
建设者为InboundHttp2ToHttpAdapter
public InboundHttp2ToHttpAdapter build()
InboundHttp2ToHttpAdapter
实例。
protected InboundHttp2ToHttpAdapter build(Http2Connection connection, int maxContentLength, boolean validateHttpHeaders, boolean propagateSettings) throws java.lang.Exception
InboundHttp2ToHttpAdapter
。
build
在课堂
AbstractInboundHttp2ToHttpAdapterBuilder<InboundHttp2ToHttpAdapter,InboundHttp2ToHttpAdapterBuilder>
java.lang.Exception
Copyright © 2008–2018 The Netty Project. All rights reserved.