Interface Http2RemoteFlowController

    • Method Detail

      • addFlowControlled

        void addFlowControlled​(Http2Stream stream,
                               Http2RemoteFlowController.FlowControlled payload)
        Queues a payload for transmission to the remote endpoint. There is no guarantee as to when the data will be written or how it will be assigned to frames. before sending.

        Writes do not actually occur until writePendingBytes() is called.

        stream - the subject stream. Must not be the connection stream object.
        payload - payload to write subject to flow-control accounting and ordering rules.
      • writePendingBytes

        void writePendingBytes()
                        throws Http2Exception
        Write all data pending in the flow controller up to the flow-control limits.
        Http2Exception - throws if a protocol-related error occurred.
      • listener

        void listener​(Http2RemoteFlowController.Listener listener)
        Set the active listener on the flow-controller.
        listener - to notify when the a write occurs, can be null.
      • isWritable

        boolean isWritable​(Http2Stream stream)
        Determine if the stream has bytes remaining for use in the flow control window.

        Note that this method respects channel writability. The channel must be writable for this method to return true.

        stream - The stream to test.
        true if the stream has bytes remaining for use in the flow control window and the channel is writable, false otherwise.
      • updateDependencyTree

        void updateDependencyTree​(int childStreamId,
                                  int parentStreamId,
                                  short weight,
                                  boolean exclusive)
        Explicitly update the dependency tree. This method is called independently of stream state changes.
        childStreamId - The stream identifier associated with the child stream.
        parentStreamId - The stream identifier associated with the parent stream. May be 0, to make childStreamId and immediate child of the connection.
        weight - The weight which is used relative to other child streams for parentStreamId. This value must be between 1 and 256 (inclusive).
        exclusive - If childStreamId should be the exclusive dependency of parentStreamId.