Class DefaultHttp2GoAwayFrame

    • Constructor Detail

      • DefaultHttp2GoAwayFrame

        public DefaultHttp2GoAwayFrame​(Http2Error error)
        Equivalent to new DefaultHttp2GoAwayFrame(error.code()).
        Parameters:
        error - non-null reason for the go away
      • DefaultHttp2GoAwayFrame

        public DefaultHttp2GoAwayFrame​(long errorCode)
        Equivalent to new DefaultHttp2GoAwayFrame(content, Unpooled.EMPTY_BUFFER).
        Parameters:
        errorCode - reason for the go away
      • DefaultHttp2GoAwayFrame

        public DefaultHttp2GoAwayFrame​(Http2Error error,
                                       Send<Buffer> content)
        Parameters:
        error - non-null reason for the go away
        content - non-null debug data
      • DefaultHttp2GoAwayFrame

        public DefaultHttp2GoAwayFrame​(long errorCode,
                                       Send<Buffer> content)
        Construct a new GOAWAY message.
        Parameters:
        errorCode - reason for the go away
        content - non-null debug data
    • Method Detail

      • name

        public String name()
        Description copied from interface: Http2Frame
        Returns the name of the HTTP/2 frame e.g. DATA, GOAWAY, etc.
        Specified by:
        name in interface Http2Frame
      • errorCode

        public long errorCode()
        Description copied from interface: Http2GoAwayFrame
        The reason for beginning closure of the connection. Represented as an HTTP/2 error code.
        Specified by:
        errorCode in interface Http2GoAwayFrame
      • extraStreamIds

        public int extraStreamIds()
        Description copied from interface: Http2GoAwayFrame
        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.
        Specified by:
        extraStreamIds in interface Http2GoAwayFrame
      • content

        public Buffer content()
        Description copied from interface: Http2GoAwayFrame
        Optional debugging information describing cause the GOAWAY. Will not be null, but may be empty.
        Specified by:
        content in interface Http2GoAwayFrame
      • touch

        public Http2GoAwayFrame touch​(Object hint)
        Description copied from interface: Resource
        Record the current access location for debugging purposes. This information may be included if the resource throws a life-cycle related exception, or if it leaks. If this resource has already been closed, then this method has no effect.
        Specified by:
        touch in interface Resource<Http2GoAwayFrame>
        Overrides:
        touch in class BufferHolder<Http2GoAwayFrame>
        Parameters:
        hint - An optional hint about this access and its context. May be null.
        Returns:
        This resource instance.
      • equals

        public boolean equals​(Object o)
        Description copied from class: BufferHolder
        This implementation of the equals operation is restricted to work only with instances of the same class. The reason for that is that Netty library already has a number of classes that extend BufferHolder and override equals method with an additional comparison logic, and we need the symmetric property of the equals operation to be preserved.
        Overrides:
        equals in class BufferHolder<Http2GoAwayFrame>
        Parameters:
        o - The reference object with which to compare.
        Returns:
        true if this object is the same as the obj argument; false otherwise.