- All Known Subinterfaces:
WindowSize.Inbound,WindowSize.Outbound
public interface WindowSize
Window size container, used with
FlowControl.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInbound window size container.static interfaceOutbound window size container. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault and smallest possible setting for MAX_FRAME_SIZE (2^14).static final intDefault window size.static final intLargest possible setting for MAX_FRAME_SIZE (2^24-1).static final intMaximal window size. -
Method Summary
Modifier and TypeMethodDescriptionstatic WindowSize.InboundcreateInbound(io.helidon.http.http2.ConnectionFlowControl.Type type, int streamId, int initialWindowSize, int maxFrameSize, BiConsumer<Integer, Http2WindowUpdate> windowUpdateWriter) Create inbound window size container with initial window size set.static WindowSize.InboundcreateInboundNoop(int streamId, BiConsumer<Integer, Http2WindowUpdate> windowUpdateWriter) Create inbound window size container with flow control turned off.static WindowSize.OutboundcreateOutbound(io.helidon.http.http2.ConnectionFlowControl.Type type, int streamId, ConnectionFlowControl connectionFlowControl) Create outbound window size container with initial window size set.intdecrementWindowSize(int decrement) Decrement window size.intRemaining window size.longincrementWindowSize(int increment) Increment window size.voidresetWindowSize(int size) Reset window size.
-
Field Details
-
DEFAULT_WIN_SIZE
static final int DEFAULT_WIN_SIZEDefault window size.- See Also:
-
DEFAULT_MAX_FRAME_SIZE
static final int DEFAULT_MAX_FRAME_SIZEDefault and smallest possible setting for MAX_FRAME_SIZE (2^14).- See Also:
-
MAX_MAX_FRAME_SIZE
static final int MAX_MAX_FRAME_SIZELargest possible setting for MAX_FRAME_SIZE (2^24-1).- See Also:
-
MAX_WIN_SIZE
static final int MAX_WIN_SIZEMaximal window size.- See Also:
-
-
Method Details
-
createInbound
static WindowSize.Inbound createInbound(io.helidon.http.http2.ConnectionFlowControl.Type type, int streamId, int initialWindowSize, int maxFrameSize, BiConsumer<Integer, Http2WindowUpdate> windowUpdateWriter) Create inbound window size container with initial window size set.- Parameters:
type-streamId-initialWindowSize- initial window sizemaxFrameSize- maximal frame sizewindowUpdateWriter- writer method for HTTP/2 WINDOW_UPDATE frame- Returns:
- a new window size container
-
createOutbound
static WindowSize.Outbound createOutbound(io.helidon.http.http2.ConnectionFlowControl.Type type, int streamId, ConnectionFlowControl connectionFlowControl) Create outbound window size container with initial window size set.- Parameters:
type- Server or clientstreamId- stream idconnectionFlowControl- connection flow control- Returns:
- a new window size container
-
createInboundNoop
static WindowSize.Inbound createInboundNoop(int streamId, BiConsumer<Integer, Http2WindowUpdate> windowUpdateWriter) Create inbound window size container with flow control turned off.- Parameters:
streamId- stream id or 0 for connectionwindowUpdateWriter- WINDOW_UPDATE frame writer- Returns:
- a new window size container
-
resetWindowSize
void resetWindowSize(int size) Reset window size.- Parameters:
size- new window size
-
incrementWindowSize
long incrementWindowSize(int increment) Increment window size.- Parameters:
increment- increment- Returns:
- whether the increment succeeded
-
decrementWindowSize
int decrementWindowSize(int decrement) Decrement window size.- Parameters:
decrement- decrement- Returns:
- remaining size
-
getRemainingWindowSize
int getRemainingWindowSize()Remaining window size.- Returns:
- remaining size
-