@UnstableApi public interface Http2RemoteFlowController extends Http2FlowController
Http2FlowController用于控制出站帧DATA到远程端点的流量。
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Http2RemoteFlowController.FlowControlled
这个接口的实现用来渐进地将底层载荷的块写入流中。
|
static interface |
Http2RemoteFlowController.Listener
监听器对每个流写入的流控字节数。
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFlowControlled(Http2Stream stream, Http2RemoteFlowController.FlowControlled payload)
排队有效载荷以传输到远程端点。
|
ChannelHandlerContext |
channelHandlerContext()
获取应用流量控制的 ChannelHandlerContext 。
|
void |
channelWritabilityChanged()
通知
channelHandlerContext()的可写性已更改。
|
boolean |
hasFlowControlled(Http2Stream stream)
确定 stream是否有任何Http2RemoteFlowController.FlowControlled当前正在排队的帧。
|
boolean |
isWritable(Http2Stream stream)
确定
stream是否剩余字节用于流量控制窗口。
|
void |
listener(Http2RemoteFlowController.Listener listener)
在流量控制器上设置活动监听器。
|
void |
updateDependencyTree(int childStreamId, int parentStreamId, short weight, boolean exclusive)
显式更新依赖关系树。
|
void |
writePendingBytes()
将流量控制器中待处理的所有数据写入流量控制限制。
|
channelHandlerContext, incrementWindowSize, initialWindowSize, initialWindowSize, windowSizeChannelHandlerContext channelHandlerContext()
ChannelHandlerContext 。
这仅适用于Http2RemoteFlowController.FlowControlled实现。 谨慎使用。
ChannelHandlerContext 。
void addFlowControlled(Http2Stream stream, Http2RemoteFlowController.FlowControlled payload)
stream - 主题流。
一定不能是连接流对象。
payload - 按流量控制会计和订购规则编写的有效负载。
boolean hasFlowControlled(Http2Stream stream)
stream是否有任何Http2RemoteFlowController.FlowControlled当前排队的帧。
stream - 检查流是否有流量控制帧的流。
true如果stream有任何Http2RemoteFlowController.FlowControlled帧当前排队。
void writePendingBytes()
throws Http2Exception
Http2Exception - 如果发生协议相关错误则抛出。
void listener(Http2RemoteFlowController.Listener listener)
listener - 通知何时写入发生,可以是
null 。
boolean isWritable(Http2Stream stream)
stream是否剩余字节用于流量控制窗口。
请注意,此方法尊重通道可写性。 该通道必须可写入此方法才能返回true 。
stream - 要测试的流。
true如果
stream剩余的字节用于流控制窗口并且通道可写,则
false否则为
false 。
void channelWritabilityChanged()
throws Http2Exception
channelHandlerContext()的可写性已更改。
Http2Exception - 如果由于此调用而发生任何写入并遇到错误。
void updateDependencyTree(int childStreamId,
int parentStreamId,
short weight,
boolean exclusive)
childStreamId - 与子流相关联的流标识符。
parentStreamId - 与父流关联的流标识符。
可能是0 ,使childStreamId和直接子连接。
weight - 用于parentStreamId相对于其他子流的parentStreamId 。
该值必须介于1和256(含)之间。
exclusive - 如果
childStreamId应该是
childStreamId的唯一依赖
parentStreamId 。
Copyright © 2008–2018 The Netty Project. All rights reserved.