Package io.netty.handler.codec.http2
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 Constructor Description AutoRefillState(Http2Stream stream, int initialWindowSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
consumeBytes(int numBytes)
Indicates that the application has consumednumBytes
from the connection or stream and is ready to receive more data.void
receiveFlowControlledFrame(int dataLength)
A flow control event has occurred and we should decrement the amount of available bytes for this stream.-
Methods inherited from class io.netty.handler.codec.http2.DefaultHttp2LocalFlowController.DefaultState
endOfStream, incrementFlowControlWindows, incrementInitialStreamWindow, initialWindowSize, unconsumedBytes, window, windowSize, windowUpdateRatio, windowUpdateRatio, writeWindowUpdateIfNeeded
-
-
-
-
Constructor Detail
-
AutoRefillState
AutoRefillState(Http2Stream stream, int initialWindowSize)
-
-
Method Detail
-
receiveFlowControlledFrame
public void receiveFlowControlledFrame(int dataLength) throws Http2Exception
Description copied from interface:DefaultHttp2LocalFlowController.FlowState
A flow control event has occurred and we should decrement the amount of available bytes for this stream.- Specified by:
receiveFlowControlledFrame
in interfaceDefaultHttp2LocalFlowController.FlowState
- Overrides:
receiveFlowControlledFrame
in 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
public boolean consumeBytes(int numBytes) throws Http2Exception
Description copied from interface:DefaultHttp2LocalFlowController.FlowState
Indicates that the application has consumednumBytes
from the connection or stream and is ready to receive more data.- Specified by:
consumeBytes
in interfaceDefaultHttp2LocalFlowController.FlowState
- Overrides:
consumeBytes
in classDefaultHttp2LocalFlowController.DefaultState
- 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
-
-