Interface FlowControl.Outbound
- All Superinterfaces:
FlowControl
- Enclosing interface:
FlowControl
Outbound flow control used by HTTP/2 for backpressure.
-
Nested Class Summary
Nested classes/interfaces inherited from interface FlowControl
FlowControl.Inbound, FlowControl.OutboundModifier and TypeInterfaceDescriptionstatic interfaceInbound flow control used by HTTP/2 for backpressure.static interfaceOutbound flow control used by HTTP/2 for backpressure. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FlowControl.OutboundNo-op outbound flow control, used for connection related frames. -
Method Summary
Modifier and TypeMethodDescriptionvoidBlock until a window size update happens.default voidNotify flow control that the connection has closed.cut(Http2FrameData frame) Split frame into frames that can be sent.longincrementStreamWindowSize(int increment) Increment stream window size.intMAX_FRAME_SIZE setting last received from the other side or default.default voidNotify flow control that the stream has closed.Methods inherited from interface FlowControl
decrementWindowSize, getRemainingWindowSize, resetStreamWindowSizeModifier and TypeMethodDescriptionvoiddecrementWindowSize(int decrement) Decrement window size.intRemaining window size in bytes.voidresetStreamWindowSize(int size) Reset stream window size.
-
Field Details
-
NOOP
No-op outbound flow control, used for connection related frames.
-
-
Method Details
-
incrementStreamWindowSize
long incrementStreamWindowSize(int increment) Increment stream window size.- Parameters:
increment- increment in bytes- Returns:
trueif succeeded,falseif timed out
-
cut
Split frame into frames that can be sent.- Parameters:
frame- frame to split- Returns:
- result
-
blockTillUpdate
void blockTillUpdate()Block until a window size update happens. -
connectionClosed
default void connectionClosed()Notify flow control that the connection has closed.Releases threads blocked waiting for a window update.
-
streamClosed
default void streamClosed()Notify flow control that the stream has closed.Releases threads blocked waiting for a window update on this stream without closing the connection flow control.
-
maxFrameSize
int maxFrameSize()MAX_FRAME_SIZE setting last received from the other side or default.- Returns:
- MAX_FRAME_SIZE
-