@UnstableApi public class DefaultHttp2ConnectionDecoder extends java.lang.Object implements Http2ConnectionDecoder
Http2FrameListener的默认实现
该类将读取HTTP / 2帧并将事件委托给Http2FrameListener
此接口通过Http2LocalFlowController强制执行入站流量控制功能
| Constructor and Description |
|---|
DefaultHttp2ConnectionDecoder(Http2Connection connection, Http2ConnectionEncoder encoder, Http2FrameReader frameReader) |
DefaultHttp2ConnectionDecoder(Http2Connection connection, Http2ConnectionEncoder encoder, Http2FrameReader frameReader, Http2PromisedRequestVerifier requestVerifier) |
| Modifier and Type | Method and Description |
|---|---|
protected long |
calculateMaxHeaderListSizeGoAway(long maxHeaderListSize)
计算应该触发
GO_AWAY字节的阈值,如果一组标题超过了这个数量。
|
void |
close() |
Http2Connection |
connection()
提供对底层连接的直接访问。
|
void |
decodeFrame(ChannelHandlerContext ctx, ByteBuf in, java.util.List<java.lang.Object> out)
由 Http2ConnectionHandler调用以解码来自输入缓冲区的下一帧。
|
Http2LocalFlowController |
flowController()
提供本地流量控制器来管理入站流量。
|
Http2FrameListener |
frameListener()
获取 Http2FrameListener ,帧将被解码时会通知。
|
void |
frameListener(Http2FrameListener listener)
设置 Http2FrameListener将在帧解码时通知。
|
void |
lifecycleManager(Http2LifecycleManager lifecycleManager)
设置生命周期管理器。
|
Http2Settings |
localSettings()
获取HTTP / 2连接的此端点的本地设置。
|
boolean |
prefaceReceived()
指示是否从远程端点接收到第一个初始
SETTINGS帧。
|
public DefaultHttp2ConnectionDecoder(Http2Connection connection, Http2ConnectionEncoder encoder, Http2FrameReader frameReader)
public DefaultHttp2ConnectionDecoder(Http2Connection connection, Http2ConnectionEncoder encoder, Http2FrameReader frameReader, Http2PromisedRequestVerifier requestVerifier)
public void lifecycleManager(Http2LifecycleManager lifecycleManager)
Http2ConnectionDecoder
lifecycleManager在界面
Http2ConnectionDecoder
public Http2Connection connection()
Http2ConnectionDecoder
connection接口
Http2ConnectionDecoder
public final Http2LocalFlowController flowController()
Http2ConnectionDecoder
flowController ,界面
Http2ConnectionDecoder
public void frameListener(Http2FrameListener listener)
Http2ConnectionDecoder
Http2FrameListener ,帧将被解码时会通知。
这必须在解码帧之前设置。
frameListener接口
Http2ConnectionDecoder
public Http2FrameListener frameListener()
Http2ConnectionDecoder复制的描述
Http2FrameListener ,当帧被解码时将被通知。
frameListener接口
Http2ConnectionDecoder
public boolean prefaceReceived()
Http2ConnectionDecoder
SETTINGS帧。
prefaceReceived接口
Http2ConnectionDecoder
public void decodeFrame(ChannelHandlerContext ctx, ByteBuf in, java.util.List<java.lang.Object> out) throws Http2Exception
Http2ConnectionDecoder
Http2ConnectionHandler调用以解码来自输入缓冲区的下一帧。
decodeFrame接口
Http2ConnectionDecoder
Http2Exception
public Http2Settings localSettings()
Http2ConnectionDecoder
localSettings在界面
Http2ConnectionDecoder
public void close()
close在界面
Http2ConnectionDecoder
close在界面
java.io.Closeable
close接口
java.lang.AutoCloseable
protected long calculateMaxHeaderListSizeGoAway(long maxHeaderListSize)
GO_AWAY字节的阈值,如果一组标题超过这个数量。
maxHeaderListSize -
SETTINGS_MAX_HEADER_LIST_SIZE为本地端点。
GO_AWAY 。
Copyright © 2008–2018 The Netty Project. All rights reserved.