Module io.netty.codec.http2
Package io.netty5.handler.codec.http2
Interface StreamByteDistributor.StreamState
-
- Enclosing interface:
- StreamByteDistributor
public static interface StreamByteDistributor.StreamState
State information for the stream, indicating the number of bytes that are currently streamable. This is provided to theStreamByteDistributor.updateStreamableBytes(StreamState)
method.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
hasFrame()
Indicates whether or not there are frames pending for this stream.long
pendingBytes()
Get the amount of bytes this stream has pending to send.Http2Stream
stream()
Gets the stream this state is associated with.int
windowSize()
The size (in bytes) of the stream's flow control window.
-
-
-
Method Detail
-
stream
Http2Stream stream()
Gets the stream this state is associated with.
-
pendingBytes
long pendingBytes()
Get the amount of bytes this stream has pending to send. The actual amount written must not exceedwindowSize()
!- Returns:
- The amount of bytes this stream has pending to send.
- See Also:
Http2CodecUtil.streamableBytes(StreamState)
-
hasFrame
boolean hasFrame()
Indicates whether or not there are frames pending for this stream.
-
windowSize
int windowSize()
The size (in bytes) of the stream's flow control window. The amount written must not exceed this amount!A
StreamByteDistributor
needs to know the stream's window size in order to avoid allocating bytes if the window size is negative. The window size being0
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).- Returns:
- the size of the stream's flow control window.
- See Also:
Http2CodecUtil.streamableBytes(StreamState)
-
-