private final class DefaultHttp2LocalFlowController.AutoRefillState extends DefaultHttp2LocalFlowController.DefaultState
Constructor and Description |
---|
AutoRefillState(Http2Stream stream,
int initialWindowSize) |
Modifier and Type | Method and Description |
---|---|
boolean |
consumeBytes(int numBytes)
Indicates that the application has consumed
numBytes 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.
|
endOfStream, incrementFlowControlWindows, incrementInitialStreamWindow, initialWindowSize, unconsumedBytes, window, windowSize, windowUpdateRatio, windowUpdateRatio, writeWindowUpdateIfNeeded
public AutoRefillState(Http2Stream stream, int initialWindowSize)
public void receiveFlowControlledFrame(int dataLength) throws Http2Exception
DefaultHttp2LocalFlowController.FlowState
receiveFlowControlledFrame
in interface DefaultHttp2LocalFlowController.FlowState
receiveFlowControlledFrame
in class DefaultHttp2LocalFlowController.DefaultState
dataLength
- The amount of data to for which this stream is no longer eligible to use for flow control.Http2Exception
- If too much data is used relative to how much is available.public boolean consumeBytes(int numBytes) throws Http2Exception
DefaultHttp2LocalFlowController.FlowState
numBytes
from the connection or stream and is
ready to receive more data.consumeBytes
in interface DefaultHttp2LocalFlowController.FlowState
consumeBytes
in class DefaultHttp2LocalFlowController.DefaultState
numBytes
- the number of bytes to be returned to the flow control window.WINDOW_UPDATE
was written, false otherwise.Http2Exception