Interface Http2GoAwayFrame

  • All Superinterfaces:
    AutoCloseable, Http2Frame, io.netty5.util.Resource<Http2GoAwayFrame>
    All Known Implementing Classes:
    DefaultHttp2GoAwayFrame

    @UnstableApi
    public interface Http2GoAwayFrame
    extends Http2Frame, io.netty5.util.Resource<Http2GoAwayFrame>
    HTTP/2 GOAWAY frame.

    The last stream identifier must not be set by the application, but instead the relative extraStreamIds() should be used. The lastStreamId() will only be set for incoming GOAWAY frames by the HTTP/2 codec.

    Graceful shutdown as described in the HTTP/2 spec can be accomplished by calling #setExtraStreamIds(Integer.MAX_VALUE).

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      io.netty5.buffer.Buffer content()
      Optional debugging information describing cause the GOAWAY.
      Http2GoAwayFrame copy()
      Produce a copy of this GOAWAY frame, which contain a copy of the frame contents.
      long errorCode()
      The reason for beginning closure of the connection.
      int extraStreamIds()
      The number of IDs to reserve for the receiver to use while GOAWAY is in transit.
      int lastStreamId()
      Returns the last stream identifier if set, or -1 else.
      Http2GoAwayFrame setExtraStreamIds​(int extraStreamIds)
      Sets the number of IDs to reserve for the receiver to use while GOAWAY is in transit.
      • Methods inherited from interface io.netty5.handler.codec.http2.Http2Frame

        name
      • Methods inherited from interface io.netty5.util.Resource

        close, isAccessible, send, touch
    • Method Detail

      • errorCode

        long errorCode()
        The reason for beginning closure of the connection. Represented as an HTTP/2 error code.
      • extraStreamIds

        int extraStreamIds()
        The number of IDs to reserve for the receiver to use while GOAWAY is in transit. This allows for new streams currently en route to still be created, up to a point, which allows for very graceful shutdown of both sides.
      • setExtraStreamIds

        Http2GoAwayFrame setExtraStreamIds​(int extraStreamIds)
        Sets the number of IDs to reserve for the receiver to use while GOAWAY is in transit.
        Returns:
        this
        See Also:
        extraStreamIds()
      • lastStreamId

        int lastStreamId()
        Returns the last stream identifier if set, or -1 else.
      • content

        io.netty5.buffer.Buffer content()
        Optional debugging information describing cause the GOAWAY. Will not be null, but may be empty.
      • copy

        Http2GoAwayFrame copy()
        Produce a copy of this GOAWAY frame, which contain a copy of the frame contents.
        Returns:
        A copy of this GOAWAY frame.