Top Description Methods
io.netty5.handler.codec.http2

public Interface Http2GoAwayFrame

extends Http2Frame, Resource<Http2GoAwayFrame>
Known Direct Implementers
io.netty5.handler.codec.http2.DefaultHttp2GoAwayFrame
Annotations
@UnstableApi
Imports
io.netty5.buffer.Buffer, io.netty5.util.Resource, io.netty5.util.internal.UnstableApi

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

Modifier and TypeMethod and Description
public Buffer
content()

Optional debugging information describing cause the GOAWAY.

public Http2GoAwayFrame

Returns:

A copy of this GOAWAY frame.
copy
()

Produce a copy of this GOAWAY frame, which contain a copy of the frame contents.

public long
errorCode()

The reason for beginning closure of the connection.

public int
extraStreamIds()

The number of IDs to reserve for the receiver to use while GOAWAY is in transit.

public int
lastStreamId()

Returns the last stream identifier if set, or -1 else.

public Http2GoAwayFrame

Returns:

this
setExtraStreamIds
(int extraStreamIds)

Sets the number of IDs to reserve for the receiver to use while GOAWAY is in transit.

Inherited from io.netty5.handler.codec.http2.Http2Frame:
name
Inherited from io.netty5.util.Resource:
closedisposeisAccessibleisAccessiblesendtouchtouch

Method Detail

contentback to summary
public Buffer content()

Optional debugging information describing cause the GOAWAY. Will not be null, but may be empty.

copyback to summary
public Http2GoAwayFrame copy()

Produce a copy of this GOAWAY frame, which contain a copy of the frame contents.

Returns:Http2GoAwayFrame

A copy of this GOAWAY frame.

errorCodeback to summary
public long errorCode()

The reason for beginning closure of the connection. Represented as an HTTP/2 error code.

extraStreamIdsback to summary
public 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.

lastStreamIdback to summary
public int lastStreamId()

Returns the last stream identifier if set, or -1 else.

setExtraStreamIdsback to summary
public Http2GoAwayFrame setExtraStreamIds(int extraStreamIds)

Sets the number of IDs to reserve for the receiver to use while GOAWAY is in transit.

Returns:Http2GoAwayFrame

this

See Also
extraStreamIds