Interface WindowSize

All Known Subinterfaces:
WindowSize.Inbound, WindowSize.Outbound

public interface WindowSize
Window size container, used with FlowControl.
  • Field Details

    • DEFAULT_WIN_SIZE

      static final int DEFAULT_WIN_SIZE
      Default window size.
      See Also:
    • DEFAULT_MAX_FRAME_SIZE

      static final int DEFAULT_MAX_FRAME_SIZE
      Default and smallest possible setting for MAX_FRAME_SIZE (2^14).
      See Also:
    • MAX_MAX_FRAME_SIZE

      static final int MAX_MAX_FRAME_SIZE
      Largest possible setting for MAX_FRAME_SIZE (2^24-1).
      See Also:
    • MAX_WIN_SIZE

      static final int MAX_WIN_SIZE
      Maximal 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 size
      maxFrameSize - maximal frame size
      windowUpdateWriter - 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 client
      streamId - stream id
      connectionFlowControl - 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 connection
      windowUpdateWriter - 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