Class ConnectionFlowControl

java.lang.Object
io.helidon.http.http2.ConnectionFlowControl

public class ConnectionFlowControl extends Object
HTTP/2 Flow control for connection.
  • Method Details

    • serverBuilder

      Create connection HTTP/2 flow-control for server side.
      Parameters:
      windowUpdateWriter - method called for sending WINDOW_UPDATE frames to the client.
      Returns:
      Connection HTTP/2 flow-control
    • clientBuilder

      Create connection HTTP/2 flow-control for client side.
      Parameters:
      windowUpdateWriter - method called for sending WINDOW_UPDATE frames to the server.
      Returns:
      Connection HTTP/2 flow-control
    • createStreamFlowControl

      public StreamFlowControl createStreamFlowControl(int streamId, int outboundInitialWindowSize, int outboundMaxFrameSize)
      Create stream specific inbound and outbound flow control.
      Parameters:
      streamId - stream id
      outboundInitialWindowSize - initial window size for inbound flow control.
      outboundMaxFrameSize - max frame size for inbound flow control.
      Returns:
      stream flow control
    • incrementOutboundConnectionWindowSize

      public long incrementOutboundConnectionWindowSize(int increment)
      Increment outbound connection flow control window, called when WINDOW_UPDATE is received.
      Parameters:
      increment - number of bytes other side has requested on top of actual demand
      Returns:
      outbound window size after increment
    • decrementInboundConnectionWindowSize

      public long decrementInboundConnectionWindowSize(int decrement)
      Decrement inbound connection flow control window, called when DATA frame is received.
      Parameters:
      decrement - received DATA frame size in bytes
      Returns:
      inbound window size after decrement
    • resetMaxFrameSize

      public void resetMaxFrameSize(int maxFrameSize)
      Reset MAX_FRAME_SIZE for all streams, existing and future ones.
      Parameters:
      maxFrameSize - to split data frames according to when larger
    • resetInitialWindowSize

      public void resetInitialWindowSize(int initialWindowSize)
      Reset an initial window size value for outbound flow control windows of a new streams. Don't forget to call stream.flowControl().outbound().resetStreamWindowSize(...) for each stream to align window size of existing streams.
      Parameters:
      initialWindowSize - INIT_WINDOW_SIZE received
    • outbound

      public WindowSize.Outbound outbound()
      Connection outbound flow control window, decrements when DATA are sent and increments when WINDOW_UPDATE or INIT_WINDOW_SIZE is received. Blocks sending when window is depleted.
      Returns:
      connection outbound flow control window