Http2FlowController Type — netty Architecture
Architecture documentation for the Http2FlowController type/interface in Http2FlowController.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 56198f9e_fdd0_57b1_7920_cbb594590259["Http2FlowController"] 3e066405_3010_c18e_8e98_75b2e59f1c1e["Http2FlowController.java"] 56198f9e_fdd0_57b1_7920_cbb594590259 -->|defined in| 3e066405_3010_c18e_8e98_75b2e59f1c1e style 56198f9e_fdd0_57b1_7920_cbb594590259 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FlowController.java lines 22–79
public interface Http2FlowController {
/**
* Set the {@link ChannelHandlerContext} for which to apply flow control on.
* <p>
* This <strong>must</strong> be called to properly initialize the {@link Http2FlowController}.
* Not calling this is considered a programming error.
* @param ctx The {@link ChannelHandlerContext} for which to apply flow control on.
* @throws Http2Exception if any protocol-related error occurred.
*/
void channelHandlerContext(ChannelHandlerContext ctx) throws Http2Exception;
/**
* Sets the connection-wide initial flow control window and updates all stream windows (but not the connection
* stream window) by the delta.
* <p>
* Represents the value for
* <a href="https://tools.ietf.org/html/rfc7540#section-6.5.2">SETTINGS_INITIAL_WINDOW_SIZE</a>. This method should
* only be called by Netty (not users) as a result of a receiving a {@code SETTINGS} frame.
*
* @param newWindowSize the new initial window size.
* @throws Http2Exception thrown if any protocol-related error occurred.
*/
void initialWindowSize(int newWindowSize) throws Http2Exception;
/**
* Gets the connection-wide initial flow control window size that is used as the basis for new stream flow
* control windows.
* <p>
* Represents the value for
* <a href="https://tools.ietf.org/html/rfc7540#section-6.5.2">SETTINGS_INITIAL_WINDOW_SIZE</a>. The initial value
* returned by this method must be {@link Http2CodecUtil#DEFAULT_WINDOW_SIZE}.
*/
int initialWindowSize();
/**
* Get the portion of the flow control window for the given stream that is currently available for sending/receiving
* frames which are subject to flow control. This quantity is measured in number of bytes.
*/
int windowSize(Http2Stream stream);
/**
* Increments the size of the stream's flow control window by the given delta.
* <p>
* In the case of a {@link Http2RemoteFlowController} this is called upon receipt of a
* {@code WINDOW_UPDATE} frame from the remote endpoint to mirror the changes to the window
* size.
* <p>
* For a {@link Http2LocalFlowController} this can be called to request the expansion of the
* window size published by this endpoint. It is up to the implementation, however, as to when a
* {@code WINDOW_UPDATE} is actually sent.
*
* @param stream The subject stream. Use {@link Http2Connection#connectionStream()} for
* requesting the size of the connection window.
* @param delta the change in size of the flow control window.
* @throws Http2Exception thrown if a protocol-related error occurred.
*/
void incrementWindowSize(Http2Stream stream, int delta) throws Http2Exception;
}
Source
Frequently Asked Questions
What is the Http2FlowController type?
Http2FlowController is a type/interface in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FlowController.java.
Where is Http2FlowController defined?
Http2FlowController is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FlowController.java at line 22.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free