Package io.netty.handler.codec.http2
Interface DefaultHttp2LocalFlowController.FlowState
- All Known Implementing Classes:
DefaultHttp2LocalFlowController.AutoRefillState
,DefaultHttp2LocalFlowController.DefaultState
- Enclosing class:
DefaultHttp2LocalFlowController
private static interface DefaultHttp2LocalFlowController.FlowState
An abstraction which provides specific extensions used by local flow control.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
consumeBytes
(int numBytes) Indicates that the application has consumednumBytes
from the connection or stream and is ready to receive more data.void
endOfStream
(boolean endOfStream) void
incrementFlowControlWindows
(int delta) Increment the windows which are used to determine many bytes have been processed.void
incrementInitialStreamWindow
(int delta) Increment the initial window size for this stream.int
void
receiveFlowControlledFrame
(int dataLength) A flow control event has occurred and we should decrement the amount of available bytes for this stream.int
void
window
(int initialWindowSize) int
float
void
windowUpdateRatio
(float ratio) boolean
Updates the flow control window for this stream if it is appropriate.
-
Method Details
-
windowSize
int windowSize() -
initialWindowSize
int initialWindowSize() -
window
void window(int initialWindowSize) -
incrementInitialStreamWindow
void incrementInitialStreamWindow(int delta) Increment the initial window size for this stream.- Parameters:
delta
- The amount to increase the initial window size by.
-
writeWindowUpdateIfNeeded
Updates the flow control window for this stream if it is appropriate.- Returns:
- true if
WINDOW_UPDATE
was written, false otherwise. - Throws:
Http2Exception
-
consumeBytes
Indicates that the application has consumednumBytes
from the connection or stream and is ready to receive more data.- Parameters:
numBytes
- the number of bytes to be returned to the flow control window.- Returns:
- true if
WINDOW_UPDATE
was written, false otherwise. - Throws:
Http2Exception
-
unconsumedBytes
int unconsumedBytes() -
windowUpdateRatio
float windowUpdateRatio() -
windowUpdateRatio
void windowUpdateRatio(float ratio) -
receiveFlowControlledFrame
A flow control event has occurred and we should decrement the amount of available bytes for this stream.- Parameters:
dataLength
- The amount of data to for which this stream is no longer eligible to use for flow control.- Throws:
Http2Exception
- If too much data is used relative to how much is available.
-
incrementFlowControlWindows
Increment the windows which are used to determine many bytes have been processed.- Parameters:
delta
- The amount to increment the window by.- Throws:
Http2Exception
- if integer overflow occurs on the window.
-
endOfStream
void endOfStream(boolean endOfStream)
-