Package io.netty.handler.codec.http2
Class DefaultHttp2GoAwayFrame
- java.lang.Object
-
- io.netty.buffer.DefaultByteBufHolder
-
- io.netty.handler.codec.http2.DefaultHttp2GoAwayFrame
-
- All Implemented Interfaces:
io.netty.buffer.ByteBufHolder,Http2Frame,Http2GoAwayFrame,io.netty.util.ReferenceCounted
public final class DefaultHttp2GoAwayFrame extends io.netty.buffer.DefaultByteBufHolder implements Http2GoAwayFrame
The defaultHttp2GoAwayFrameimplementation.
-
-
Constructor Summary
Constructors Constructor Description DefaultHttp2GoAwayFrame(long errorCode)Equivalent tonew DefaultHttp2GoAwayFrame(content, Unpooled.EMPTY_BUFFER).DefaultHttp2GoAwayFrame(long errorCode, io.netty.buffer.ByteBuf content)Construct a new GOAWAY message.DefaultHttp2GoAwayFrame(Http2Error error)Equivalent tonew DefaultHttp2GoAwayFrame(error.code()).DefaultHttp2GoAwayFrame(Http2Error error, io.netty.buffer.ByteBuf content)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Http2GoAwayFramecopy()Http2GoAwayFrameduplicate()booleanequals(Object o)longerrorCode()The reason for beginning closure of the connection.intextraStreamIds()The number of IDs to reserve for the receiver to use while GOAWAY is in transit.inthashCode()intlastStreamId()Returns the last stream identifier if set, or-1else.Stringname()Returns the name of the HTTP/2 frame e.g.Http2GoAwayFramereplace(io.netty.buffer.ByteBuf content)Http2GoAwayFrameretain()Http2GoAwayFrameretain(int increment)Http2GoAwayFrameretainedDuplicate()Http2GoAwayFramesetExtraStreamIds(int extraStreamIds)Sets the number of IDs to reserve for the receiver to use while GOAWAY is in transit.StringtoString()Http2GoAwayFrametouch()Http2GoAwayFrametouch(Object hint)-
Methods inherited from class io.netty.buffer.DefaultByteBufHolder
content, contentToString, refCnt, release, release
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.netty.handler.codec.http2.Http2GoAwayFrame
content
-
-
-
-
Constructor Detail
-
DefaultHttp2GoAwayFrame
public DefaultHttp2GoAwayFrame(Http2Error error)
Equivalent tonew DefaultHttp2GoAwayFrame(error.code()).- Parameters:
error- non-nullreason for the go away
-
DefaultHttp2GoAwayFrame
public DefaultHttp2GoAwayFrame(long errorCode)
Equivalent tonew DefaultHttp2GoAwayFrame(content, Unpooled.EMPTY_BUFFER).- Parameters:
errorCode- reason for the go away
-
DefaultHttp2GoAwayFrame
public DefaultHttp2GoAwayFrame(Http2Error error, io.netty.buffer.ByteBuf content)
- Parameters:
error- non-nullreason for the go awaycontent- non-nulldebug data
-
DefaultHttp2GoAwayFrame
public DefaultHttp2GoAwayFrame(long errorCode, io.netty.buffer.ByteBuf content)Construct a new GOAWAY message.- Parameters:
errorCode- reason for the go awaycontent- non-nulldebug data
-
-
Method Detail
-
name
public String name()
Description copied from interface:Http2FrameReturns the name of the HTTP/2 frame e.g. DATA, GOAWAY, etc.- Specified by:
namein interfaceHttp2Frame
-
errorCode
public long errorCode()
Description copied from interface:Http2GoAwayFrameThe reason for beginning closure of the connection. Represented as an HTTP/2 error code.- Specified by:
errorCodein interfaceHttp2GoAwayFrame
-
extraStreamIds
public int extraStreamIds()
Description copied from interface:Http2GoAwayFrameThe 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:
extraStreamIdsin interfaceHttp2GoAwayFrame
-
setExtraStreamIds
public Http2GoAwayFrame setExtraStreamIds(int extraStreamIds)
Description copied from interface:Http2GoAwayFrameSets the number of IDs to reserve for the receiver to use while GOAWAY is in transit.- Specified by:
setExtraStreamIdsin interfaceHttp2GoAwayFrame- Returns:
this- See Also:
Http2GoAwayFrame.extraStreamIds()
-
lastStreamId
public int lastStreamId()
Description copied from interface:Http2GoAwayFrameReturns the last stream identifier if set, or-1else.- Specified by:
lastStreamIdin interfaceHttp2GoAwayFrame
-
copy
public Http2GoAwayFrame copy()
- Specified by:
copyin interfaceio.netty.buffer.ByteBufHolder- Specified by:
copyin interfaceHttp2GoAwayFrame- Overrides:
copyin classio.netty.buffer.DefaultByteBufHolder
-
duplicate
public Http2GoAwayFrame duplicate()
- Specified by:
duplicatein interfaceio.netty.buffer.ByteBufHolder- Specified by:
duplicatein interfaceHttp2GoAwayFrame- Overrides:
duplicatein classio.netty.buffer.DefaultByteBufHolder
-
retainedDuplicate
public Http2GoAwayFrame retainedDuplicate()
- Specified by:
retainedDuplicatein interfaceio.netty.buffer.ByteBufHolder- Specified by:
retainedDuplicatein interfaceHttp2GoAwayFrame- Overrides:
retainedDuplicatein classio.netty.buffer.DefaultByteBufHolder
-
replace
public Http2GoAwayFrame replace(io.netty.buffer.ByteBuf content)
- Specified by:
replacein interfaceio.netty.buffer.ByteBufHolder- Specified by:
replacein interfaceHttp2GoAwayFrame- Overrides:
replacein classio.netty.buffer.DefaultByteBufHolder
-
retain
public Http2GoAwayFrame retain()
- Specified by:
retainin interfaceio.netty.buffer.ByteBufHolder- Specified by:
retainin interfaceHttp2GoAwayFrame- Specified by:
retainin interfaceio.netty.util.ReferenceCounted- Overrides:
retainin classio.netty.buffer.DefaultByteBufHolder
-
retain
public Http2GoAwayFrame retain(int increment)
- Specified by:
retainin interfaceio.netty.buffer.ByteBufHolder- Specified by:
retainin interfaceHttp2GoAwayFrame- Specified by:
retainin interfaceio.netty.util.ReferenceCounted- Overrides:
retainin classio.netty.buffer.DefaultByteBufHolder
-
touch
public Http2GoAwayFrame touch()
- Specified by:
touchin interfaceio.netty.buffer.ByteBufHolder- Specified by:
touchin interfaceHttp2GoAwayFrame- Specified by:
touchin interfaceio.netty.util.ReferenceCounted- Overrides:
touchin classio.netty.buffer.DefaultByteBufHolder
-
touch
public Http2GoAwayFrame touch(Object hint)
- Specified by:
touchin interfaceio.netty.buffer.ByteBufHolder- Specified by:
touchin interfaceHttp2GoAwayFrame- Specified by:
touchin interfaceio.netty.util.ReferenceCounted- Overrides:
touchin classio.netty.buffer.DefaultByteBufHolder
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classio.netty.buffer.DefaultByteBufHolder
-
hashCode
public int hashCode()
- Overrides:
hashCodein classio.netty.buffer.DefaultByteBufHolder
-
toString
public String toString()
- Overrides:
toStringin classio.netty.buffer.DefaultByteBufHolder
-
-