Package io.netty.handler.codec.http2
Interface Http2GoAwayFrame
-
- All Superinterfaces:
ByteBufHolder
,Http2Frame
,ReferenceCounted
- All Known Implementing Classes:
DefaultHttp2GoAwayFrame
public interface Http2GoAwayFrame extends Http2Frame, ByteBufHolder
HTTP/2 GOAWAY frame.The last stream identifier must not be set by the application, but instead the relative
extraStreamIds()
should be used. ThelastStreamId()
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 ByteBuf
content()
Optional debugging information describing cause the GOAWAY.Http2GoAwayFrame
copy()
Creates a deep copy of thisByteBufHolder
.Http2GoAwayFrame
duplicate()
Duplicates thisByteBufHolder
.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
replace(ByteBuf content)
Returns a newByteBufHolder
which contains the specifiedcontent
.Http2GoAwayFrame
retain()
Increases the reference count by1
.Http2GoAwayFrame
retain(int increment)
Increases the reference count by the specifiedincrement
.Http2GoAwayFrame
retainedDuplicate()
Duplicates thisByteBufHolder
.Http2GoAwayFrame
setExtraStreamIds(int extraStreamIds)
Sets the number of IDs to reserve for the receiver to use while GOAWAY is in transit.Http2GoAwayFrame
touch()
Records the current access location of this object for debugging purposes.Http2GoAwayFrame
touch(java.lang.Object hint)
Records the current access location of this object with an additional arbitrary information for debugging purposes.-
Methods inherited from interface io.netty.handler.codec.http2.Http2Frame
name
-
Methods inherited from interface io.netty.util.ReferenceCounted
refCnt, release, release
-
-
-
-
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
ByteBuf content()
Optional debugging information describing cause the GOAWAY. Will not benull
, but may be empty.- Specified by:
content
in interfaceByteBufHolder
-
copy
Http2GoAwayFrame copy()
Description copied from interface:ByteBufHolder
Creates a deep copy of thisByteBufHolder
.- Specified by:
copy
in interfaceByteBufHolder
-
duplicate
Http2GoAwayFrame duplicate()
Description copied from interface:ByteBufHolder
Duplicates thisByteBufHolder
. Be aware that this will not automatically callByteBufHolder.retain()
.- Specified by:
duplicate
in interfaceByteBufHolder
-
retainedDuplicate
Http2GoAwayFrame retainedDuplicate()
Description copied from interface:ByteBufHolder
Duplicates thisByteBufHolder
. This method returns a retained duplicate unlikeByteBufHolder.duplicate()
.- Specified by:
retainedDuplicate
in interfaceByteBufHolder
- See Also:
ByteBuf.retainedDuplicate()
-
replace
Http2GoAwayFrame replace(ByteBuf content)
Description copied from interface:ByteBufHolder
Returns a newByteBufHolder
which contains the specifiedcontent
.- Specified by:
replace
in interfaceByteBufHolder
-
retain
Http2GoAwayFrame retain()
Description copied from interface:ReferenceCounted
Increases the reference count by1
.- Specified by:
retain
in interfaceByteBufHolder
- Specified by:
retain
in interfaceReferenceCounted
-
retain
Http2GoAwayFrame retain(int increment)
Description copied from interface:ReferenceCounted
Increases the reference count by the specifiedincrement
.- Specified by:
retain
in interfaceByteBufHolder
- Specified by:
retain
in interfaceReferenceCounted
-
touch
Http2GoAwayFrame touch()
Description copied from interface:ReferenceCounted
Records the current access location of this object for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you viaResourceLeakDetector
. This method is a shortcut totouch(null)
.- Specified by:
touch
in interfaceByteBufHolder
- Specified by:
touch
in interfaceReferenceCounted
-
touch
Http2GoAwayFrame touch(java.lang.Object hint)
Description copied from interface:ReferenceCounted
Records the current access location of this object with an additional arbitrary information for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you viaResourceLeakDetector
.- Specified by:
touch
in interfaceByteBufHolder
- Specified by:
touch
in interfaceReferenceCounted
-
-