Class DefaultHttp2LocalFlowController.AutoRefillState
java.lang.Object
io.netty.handler.codec.http2.DefaultHttp2LocalFlowController.DefaultState
io.netty.handler.codec.http2.DefaultHttp2LocalFlowController.AutoRefillState
- All Implemented Interfaces:
DefaultHttp2LocalFlowController.FlowState
- Enclosing class:
DefaultHttp2LocalFlowController
private final class DefaultHttp2LocalFlowController.AutoRefillState
extends DefaultHttp2LocalFlowController.DefaultState
Flow control state that does autorefill of the flow control window when the data is
received.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanconsumeBytes(int numBytes) Indicates that the application has consumednumBytesfrom the connection or stream and is ready to receive more data.voidreceiveFlowControlledFrame(int dataLength) A flow control event has occurred and we should decrement the amount of available bytes for this stream.Methods inherited from class DefaultHttp2LocalFlowController.DefaultState
endOfStream, incrementFlowControlWindows, incrementInitialStreamWindow, initialWindowSize, unconsumedBytes, window, windowSize, windowUpdateRatio, windowUpdateRatio, writeWindowUpdateIfNeededMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
AutoRefillState
AutoRefillState(Http2Stream stream, int initialWindowSize)
-
-
Method Details
-
receiveFlowControlledFrame
Description copied from interface:DefaultHttp2LocalFlowController.FlowStateA flow control event has occurred and we should decrement the amount of available bytes for this stream.- Specified by:
receiveFlowControlledFramein interfaceDefaultHttp2LocalFlowController.FlowState- Overrides:
receiveFlowControlledFramein classDefaultHttp2LocalFlowController.DefaultState- 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.
-
consumeBytes
Description copied from interface:DefaultHttp2LocalFlowController.FlowStateIndicates that the application has consumednumBytesfrom the connection or stream and is ready to receive more data.- Specified by:
consumeBytesin interfaceDefaultHttp2LocalFlowController.FlowState- Overrides:
consumeBytesin classDefaultHttp2LocalFlowController.DefaultState- Parameters:
numBytes- the number of bytes to be returned to the flow control window.- Returns:
- true if
WINDOW_UPDATEwas written, false otherwise. - Throws:
Http2Exception
-