Top Description Methods
io.netty5.handler.codec.http2

public Interface Http2FlowController

Known Direct Subinterfaces
io.netty5.handler.codec.http2.Http2LocalFlowController, io.netty5.handler.codec.http2.Http2RemoteFlowController
Annotations
@UnstableApi
Imports
io.netty5.channel.ChannelHandlerContext, io.netty5.util.internal.UnstableApi

Base interface for all HTTP/2 flow controllers.

Method Summary

Modifier and TypeMethod and Description
public void
channelHandlerContext(ChannelHandlerContext
The ChannelHandlerContext for which to apply flow control on.
ctx
)

Set the ChannelHandlerContext for which to apply flow control on.

public void
incrementWindowSize(Http2Stream
The subject stream. Use Http2Connection#connectionStream() for requesting the size of the connection window.
stream
,
int
the change in size of the flow control window.
delta
)

Increments the size of the stream's flow control window by the given delta.

public void
initialWindowSize(int
the new initial window size.
newWindowSize
)

Sets the connection-wide initial flow control window and updates all stream windows (but not the connection stream window) by the delta.

public int
initialWindowSize()

Gets the connection-wide initial flow control window size that is used as the basis for new stream flow control windows.

public int
windowSize(Http2Stream stream)

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.

Method Detail

channelHandlerContextback to summary
public void channelHandlerContext(ChannelHandlerContext ctx) throws Http2Exception

Set the ChannelHandlerContext for which to apply flow control on.

This must be called to properly initialize the Http2FlowController. Not calling this is considered a programming error.

Parameters
ctx:ChannelHandlerContext

The ChannelHandlerContext for which to apply flow control on.

Exceptions
Http2Exception:
if any protocol-related error occurred.
incrementWindowSizeback to summary
public void incrementWindowSize(Http2Stream stream, int delta) throws Http2Exception

Increments the size of the stream's flow control window by the given delta.

In the case of a Http2RemoteFlowController this is called upon receipt of a WINDOW_UPDATE frame from the remote endpoint to mirror the changes to the window size.

For a 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 WINDOW_UPDATE is actually sent.

Parameters
stream:Http2Stream

The subject stream. Use Http2Connection#connectionStream() for requesting the size of the connection window.

delta:int

the change in size of the flow control window.

Exceptions
Http2Exception:
thrown if a protocol-related error occurred.
initialWindowSizeback to summary
public void initialWindowSize(int newWindowSize) throws Http2Exception

Sets the connection-wide initial flow control window and updates all stream windows (but not the connection stream window) by the delta.

Represents the value for SETTINGS_INITIAL_WINDOW_SIZE. This method should only be called by Netty (not users) as a result of a receiving a SETTINGS frame.

Parameters
newWindowSize:int

the new initial window size.

Exceptions
Http2Exception:
thrown if any protocol-related error occurred.
initialWindowSizeback to summary
public int initialWindowSize()

Gets the connection-wide initial flow control window size that is used as the basis for new stream flow control windows.

Represents the value for SETTINGS_INITIAL_WINDOW_SIZE. The initial value returned by this method must be Http2CodecUtil#DEFAULT_WINDOW_SIZE.

windowSizeback to summary
public int windowSize(Http2Stream stream)

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.