Home / Type/ StreamState Type — netty Architecture

StreamState Type — netty Architecture

Architecture documentation for the StreamState type/interface in StreamByteDistributor.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  cb604e93_1d24_547e_9cba_372fcdc984c9["StreamState"]
  ed6553eb_f96d_ef7e_dd46_da04ed6bc35e["StreamByteDistributor.java"]
  cb604e93_1d24_547e_9cba_372fcdc984c9 -->|defined in| ed6553eb_f96d_ef7e_dd46_da04ed6bc35e
  style cb604e93_1d24_547e_9cba_372fcdc984c9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/main/java/io/netty/handler/codec/http2/StreamByteDistributor.java lines 28–57

    interface StreamState {
        /**
         * Gets the stream this state is associated with.
         */
        Http2Stream stream();

        /**
         * Get the amount of bytes this stream has pending to send. The actual amount written must not exceed
         * {@link #windowSize()}!
         * @return The amount of bytes this stream has pending to send.
         * @see Http2CodecUtil#streamableBytes(StreamState)
         */
        long pendingBytes();

        /**
         * Indicates whether or not there are frames pending for this stream.
         */
        boolean hasFrame();

        /**
         * The size (in bytes) of the stream's flow control window. The amount written must not exceed this amount!
         * <p>A {@link StreamByteDistributor} needs to know the stream's window size in order to avoid allocating bytes
         * if the window size is negative. The window size being {@code 0} may also be significant to determine when if
         * an stream has been given a chance to write an empty frame, and also enables optimizations like not writing
         * empty frames in some situations (don't write headers until data can also be written).
         * @return the size of the stream's flow control window.
         * @see Http2CodecUtil#streamableBytes(StreamState)
         */
        int windowSize();
    }

Frequently Asked Questions

What is the StreamState type?
StreamState is a type/interface in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/StreamByteDistributor.java.
Where is StreamState defined?
StreamState is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/StreamByteDistributor.java at line 28.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free