Interface Http2Connection.Listener

    • Method Detail

      • onStreamAdded

        void onStreamAdded​(Http2Stream stream)
        Notifies the listener that the given stream was added to the connection. This stream may not yet be active (i.e. OPEN or HALF CLOSED).

        If a RuntimeException is thrown it will be logged and not propagated. Throwing from this method is not supported and is considered a programming error.

      • onStreamActive

        void onStreamActive​(Http2Stream stream)
        Notifies the listener that the given stream was made active (i.e. OPEN or HALF CLOSED).

        If a RuntimeException is thrown it will be logged and not propagated. Throwing from this method is not supported and is considered a programming error.

      • onStreamHalfClosed

        void onStreamHalfClosed​(Http2Stream stream)
        Notifies the listener that the given stream has transitioned from OPEN to HALF CLOSED. This method will not be called until a state transition occurs from when onStreamActive(Http2Stream) was called. The stream can be inspected to determine which side is HALF CLOSED.

        If a RuntimeException is thrown it will be logged and not propagated. Throwing from this method is not supported and is considered a programming error.

      • onStreamRemoved

        void onStreamRemoved​(Http2Stream stream)
        Notifies the listener that the given stream has now been removed from the connection and will no longer be returned via Http2Connection.stream(int). The connection may maintain inactive streams for some time before removing them.

        If a RuntimeException is thrown it will be logged and not propagated. Throwing from this method is not supported and is considered a programming error.

      • onGoAwaySent

        void onGoAwaySent​(int lastStreamId,
                          long errorCode,
                          Buffer debugData)
        Called when a GOAWAY frame was sent for the connection.

        If a RuntimeException is thrown it will be logged and not propagated. Throwing from this method is not supported and is considered a programming error.

        Parameters:
        lastStreamId - the last known stream of the remote endpoint.
        errorCode - the error code, if abnormal closure.
        debugData - application-defined debug data.
      • onGoAwayReceived

        void onGoAwayReceived​(int lastStreamId,
                              long errorCode,
                              Buffer debugData)
        Called when a GOAWAY was received from the remote endpoint. This event handler duplicates Http2FrameListener.onGoAwayRead(io.netty5.channel.ChannelHandlerContext, int, long, Buffer) but is added here in order to simplify application logic for handling GOAWAY in a uniform way. An application should generally not handle both events, but if it does this method is called second, after notifying the Http2FrameListener.

        If a RuntimeException is thrown it will be logged and not propagated. Throwing from this method is not supported and is considered a programming error.

        Parameters:
        lastStreamId - the last known stream of the remote endpoint.
        errorCode - the error code, if abnormal closure.
        debugData - application-defined debug data.