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 TypeMethodDescriptionbooleanconsumeBytes(int numBytes) Indicates that the application has consumednumBytesfrom the connection or stream and is ready to receive more data.voidendOfStream(boolean endOfStream) voidincrementFlowControlWindows(int delta) Increment the windows which are used to determine many bytes have been processed.voidincrementInitialStreamWindow(int delta) Increment the initial window size for this stream.intvoidreceiveFlowControlledFrame(int dataLength) A flow control event has occurred and we should decrement the amount of available bytes for this stream.intvoidwindow(int initialWindowSize) intfloatvoidwindowUpdateRatio(float ratio) booleanUpdates 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_UPDATEwas written, false otherwise. - Throws:
Http2Exception
-
consumeBytes
Indicates that the application has consumednumBytesfrom 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_UPDATEwas 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)
-