Http2RemoteFlowController Type — netty Architecture
Architecture documentation for the Http2RemoteFlowController type/interface in Http2RemoteFlowController.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD f4873498_9e6e_70b4_6548_256e659f5e02["Http2RemoteFlowController"] 5592a3f9_f077_ed48_924c_83efa5f7a53b["Http2RemoteFlowController.java"] f4873498_9e6e_70b4_6548_256e659f5e02 -->|defined in| 5592a3f9_f077_ed48_924c_83efa5f7a53b style f4873498_9e6e_70b4_6548_256e659f5e02 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/main/java/io/netty/handler/codec/http2/Http2RemoteFlowController.java lines 23–168
public interface Http2RemoteFlowController extends Http2FlowController {
/**
* Get the {@link ChannelHandlerContext} for which to apply flow control on.
* <p>
* This is intended for us by {@link FlowControlled} implementations only. Use with caution.
* @return The {@link ChannelHandlerContext} for which to apply flow control on.
*/
ChannelHandlerContext channelHandlerContext();
/**
* 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.
* <p>
* Writes do not actually occur until {@link #writePendingBytes()} is called.
*
* @param stream the subject stream. Must not be the connection stream object.
* @param payload payload to write subject to flow-control accounting and ordering rules.
*/
void addFlowControlled(Http2Stream stream, FlowControlled payload);
/**
* Determine if {@code stream} has any {@link FlowControlled} frames currently queued.
* @param stream the stream to check if it has flow controlled frames.
* @return {@code true} if {@code stream} has any {@link FlowControlled} frames currently queued.
*/
boolean hasFlowControlled(Http2Stream stream);
/**
* Write all data pending in the flow controller up to the flow-control limits.
*
* @throws Http2Exception throws if a protocol-related error occurred.
*/
void writePendingBytes() throws Http2Exception;
/**
* Set the active listener on the flow-controller.
*
* @param listener to notify when the a write occurs, can be {@code null}.
*/
void listener(Listener listener);
/**
* Determine if the {@code stream} has bytes remaining for use in the flow control window.
* <p>
* Note that this method respects channel writability. The channel must be writable for this method to
* return {@code true}.
*
* @param stream The stream to test.
* @return {@code true} if the {@code stream} has bytes remaining for use in the flow control window and the
* channel is writable, {@code false} otherwise.
*/
boolean isWritable(Http2Stream stream);
/**
* Notification that the writability of {@link #channelHandlerContext()} has changed.
* @throws Http2Exception If any writes occur as a result of this call and encounter errors.
*/
void channelWritabilityChanged() throws Http2Exception;
/**
* Explicitly update the dependency tree. This method is called independently of stream state changes.
* @param childStreamId The stream identifier associated with the child stream.
* @param parentStreamId The stream identifier associated with the parent stream. May be {@code 0},
* to make {@code childStreamId} and immediate child of the connection.
* @param weight The weight which is used relative to other child streams for {@code parentStreamId}. This value
* must be between 1 and 256 (inclusive).
* @param exclusive If {@code childStreamId} should be the exclusive dependency of {@code parentStreamId}.
*/
void updateDependencyTree(int childStreamId, int parentStreamId, short weight, boolean exclusive);
/**
* Implementations of this interface are used to progressively write chunks of the underlying
* payload to the stream. A payload is considered to be fully written if {@link #write} has
* been called at least once and it's {@link #size} is now zero.
*/
interface FlowControlled {
/**
* The size of the payload in terms of bytes applied to the flow-control window.
* Some payloads like {@code HEADER} frames have no cost against flow control and would
* return 0 for this value even though they produce a non-zero number of bytes on
Source
Frequently Asked Questions
What is the Http2RemoteFlowController type?
Http2RemoteFlowController is a type/interface in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2RemoteFlowController.java.
Where is Http2RemoteFlowController defined?
Http2RemoteFlowController is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2RemoteFlowController.java at line 23.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free