Http2FlowController for controlling the flow of outbound DATA frames to the remote
endpoint.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | Http2RemoteFlowController.FlowControlled
Implementations of this interface are used to progressively write chunks of the underlying payload to the stream. |
| public static interface | Http2RemoteFlowController.Listener
Listener to the number of flow-controlled bytes written per stream. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addFlowControlled(Http2Stream
the subject stream. Must not be the connection stream object. stream, Http2RemoteFlowController.payload to write subject to flow-control accounting and ordering rules. payloadQueues a payload for transmission to the remote endpoint. |
| public ChannelHandlerContext | Returns: TheChannelHandlerContext for which to apply flow control on.Get the |
| public void | channelWritabilityChanged()
Notification that the writability of |
| public boolean | hasFlowControlled(Http2Stream
the stream to check if it has flow controlled frames. stream)Determine if |
| public boolean | Returns: true if the stream has bytes remaining for use in the flow control window and the
channel is writable, false otherwise.The stream to test. stream)Determine if the |
| public void | listener(Http2RemoteFlowController.
to notify when the a write occurs, can be listenernull.Set the active listener on the flow-controller. |
| public void | updateDependencyTree(int
The stream identifier associated with the child stream. childStreamId, int The stream identifier associated with the parent stream. May be parentStreamId, short 0,
to make childStreamId and immediate child of the connection.The weight which is used relative to other child streams for weight, boolean parentStreamId. This value
must be between 1 and 256 (inclusive).If exclusive)childStreamId should be the exclusive dependency of parentStreamId.Explicitly update the dependency tree. |
| public void |
| addFlowControlled | back to summary |
|---|---|
| public void addFlowControlled(Http2Stream stream, Http2RemoteFlowController. Queues a payload for transmission to the remote endpoint. There is no guarantee as to when the data will be written or how it will be assigned to frames. before sending.
Writes do not actually occur until
| |
| channelHandlerContext | back to summary |
|---|---|
| public ChannelHandlerContext channelHandlerContext() Get the
This is intended for us by
| |
| channelWritabilityChanged | back to summary |
|---|---|
| public void channelWritabilityChanged() throws Http2Exception Notification that the writability of
| |
| hasFlowControlled | back to summary |
|---|---|
| public boolean hasFlowControlled(Http2Stream stream) Determine if
| |
| isWritable | back to summary |
|---|---|
| public boolean isWritable(Http2Stream stream) Determine if the
Note that this method respects channel writability. The channel must be writable for this method to
return
| |
| listener | back to summary |
|---|---|
| public void listener(Http2RemoteFlowController. Set the active listener on the flow-controller.
| |
| updateDependencyTree | back to summary |
|---|---|
| public void updateDependencyTree(int childStreamId, int parentStreamId, short weight, boolean exclusive) Explicitly update the dependency tree. This method is called independently of stream state changes.
| |
| writePendingBytes | back to summary |
|---|---|
| public void writePendingBytes() throws Http2Exception Write all data pending in the flow controller up to the flow-control limits.
| |
write has
been called at least once and it's size is now zero.
| Modifier and Type | Method and Description |
|---|---|
| public void | error(ChannelHandlerContext
The context to use if any communication needs to occur as a result of the error.
This may be ctx, Throwable null if an exception occurs when the connection has not been established yet.of the error. cause)Called to indicate that an error occurred before this object could be completely written. |
| public boolean | Returns: true if next was successfully merged and does not need to be enqueued,
false otherwise.Merge the contents of the |
| public int | |
| public void | write(ChannelHandlerContext
The context to use for writing. ctx, int an upper bound on the number of bytes the payload can write at this time. allowedBytes)Writes up to |
| public void |
| error | back to summary |
|---|---|
| public void error(ChannelHandlerContext ctx, Throwable cause) Called to indicate that an error occurred before this object could be completely written.
The
| |
| merge | back to summary |
|---|---|
| public boolean merge(ChannelHandlerContext ctx, Http2RemoteFlowController. Merge the contents of the
| |
| size | back to summary |
|---|---|
| public int size() The size of the payload in terms of bytes applied to the flow-control window.
Some payloads like | |
| write | back to summary |
|---|---|
| public void write(ChannelHandlerContext ctx, int allowedBytes) Writes up to
When an exception is thrown the
| |
| writeComplete | back to summary |
|---|---|
| public void writeComplete() Called after this object has been successfully written.
The | |
| Modifier and Type | Method and Description |
|---|---|
| public void | writabilityChanged(Http2Stream
The stream which writability has changed for. stream)Notification that |
| writabilityChanged | back to summary |
|---|---|
| public void writabilityChanged(Http2Stream stream) Notification that This method should not throw. Any thrown exceptions are considered a programming error and are ignored.
| |