@UnstableApi public final class DefaultHttp2GoAwayFrame extends DefaultByteBufHolder implements Http2GoAwayFrame
Http2GoAwayFrame
implementation.Constructor and Description |
---|
DefaultHttp2GoAwayFrame(Http2Error error)
Equivalent to
new DefaultHttp2GoAwayFrame(error.code()) . |
DefaultHttp2GoAwayFrame(Http2Error error,
ByteBuf content) |
DefaultHttp2GoAwayFrame(long errorCode)
Equivalent to
new DefaultHttp2GoAwayFrame(content, Unpooled.EMPTY_BUFFER) . |
DefaultHttp2GoAwayFrame(long errorCode,
ByteBuf content)
Construct a new GOAWAY message.
|
Modifier and Type | Method and Description |
---|---|
Http2GoAwayFrame |
copy()
Creates a deep copy of this
ByteBufHolder . |
Http2GoAwayFrame |
duplicate()
Duplicates this
ByteBufHolder . |
boolean |
equals(Object o) |
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 |
hashCode() |
int |
lastStreamId()
Returns the last stream identifier if set, or
-1 else. |
String |
name()
Returns the name of the HTTP/2 frame e.g.
|
Http2GoAwayFrame |
replace(ByteBuf content)
Returns a new
ByteBufHolder which contains the specified content . |
Http2GoAwayFrame |
retain()
Increases the reference count by
1 . |
Http2GoAwayFrame |
retain(int increment)
Increases the reference count by the specified
increment . |
Http2GoAwayFrame |
retainedDuplicate()
Duplicates this
ByteBufHolder . |
Http2GoAwayFrame |
setExtraStreamIds(int extraStreamIds)
Sets the number of IDs to reserve for the receiver to use while GOAWAY is in transit.
|
String |
toString() |
Http2GoAwayFrame |
touch()
Records the current access location of this object for debugging purposes.
|
Http2GoAwayFrame |
touch(Object hint)
Records the current access location of this object with an additional arbitrary information for debugging
purposes.
|
content, contentToString, refCnt, release, release
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
content
refCnt, release, release
public DefaultHttp2GoAwayFrame(Http2Error error)
new DefaultHttp2GoAwayFrame(error.code())
.error
- non-null
reason for the go awaypublic DefaultHttp2GoAwayFrame(long errorCode)
new DefaultHttp2GoAwayFrame(content, Unpooled.EMPTY_BUFFER)
.errorCode
- reason for the go awaypublic DefaultHttp2GoAwayFrame(Http2Error error, ByteBuf content)
error
- non-null
reason for the go awaycontent
- non-null
debug datapublic DefaultHttp2GoAwayFrame(long errorCode, ByteBuf content)
errorCode
- reason for the go awaycontent
- non-null
debug datapublic String name()
Http2Frame
name
in interface Http2Frame
public long errorCode()
Http2GoAwayFrame
errorCode
in interface Http2GoAwayFrame
public int extraStreamIds()
Http2GoAwayFrame
extraStreamIds
in interface Http2GoAwayFrame
public Http2GoAwayFrame setExtraStreamIds(int extraStreamIds)
Http2GoAwayFrame
setExtraStreamIds
in interface Http2GoAwayFrame
this
Http2GoAwayFrame.extraStreamIds()
public int lastStreamId()
Http2GoAwayFrame
-1
else.lastStreamId
in interface Http2GoAwayFrame
public Http2GoAwayFrame copy()
DefaultByteBufHolder
ByteBufHolder
.
This method calls replace(content().copy())
by default.
copy
in interface ByteBufHolder
copy
in interface Http2GoAwayFrame
copy
in class DefaultByteBufHolder
public Http2GoAwayFrame duplicate()
DefaultByteBufHolder
ByteBufHolder
. Be aware that this will not automatically call ByteBufHolder.retain()
.
This method calls replace(content().duplicate())
by default.
duplicate
in interface ByteBufHolder
duplicate
in interface Http2GoAwayFrame
duplicate
in class DefaultByteBufHolder
public Http2GoAwayFrame retainedDuplicate()
DefaultByteBufHolder
ByteBufHolder
. This method returns a retained duplicate unlike ByteBufHolder.duplicate()
.
This method calls replace(content().retainedDuplicate())
by default.
retainedDuplicate
in interface ByteBufHolder
retainedDuplicate
in interface Http2GoAwayFrame
retainedDuplicate
in class DefaultByteBufHolder
ByteBuf.retainedDuplicate()
public Http2GoAwayFrame replace(ByteBuf content)
DefaultByteBufHolder
ByteBufHolder
which contains the specified content
.
Override this method to return a new instance of this object whose content is set to the specified
content
. The default implementation of DefaultByteBufHolder.copy()
, DefaultByteBufHolder.duplicate()
and
DefaultByteBufHolder.retainedDuplicate()
invokes this method to create a copy.
replace
in interface ByteBufHolder
replace
in interface Http2GoAwayFrame
replace
in class DefaultByteBufHolder
public Http2GoAwayFrame retain()
ReferenceCounted
1
.retain
in interface ByteBufHolder
retain
in interface Http2GoAwayFrame
retain
in interface ReferenceCounted
retain
in class DefaultByteBufHolder
public Http2GoAwayFrame retain(int increment)
ReferenceCounted
increment
.retain
in interface ByteBufHolder
retain
in interface Http2GoAwayFrame
retain
in interface ReferenceCounted
retain
in class DefaultByteBufHolder
public Http2GoAwayFrame touch()
ReferenceCounted
ResourceLeakDetector
. This method is a shortcut to touch(null)
.touch
in interface ByteBufHolder
touch
in interface Http2GoAwayFrame
touch
in interface ReferenceCounted
touch
in class DefaultByteBufHolder
public Http2GoAwayFrame touch(Object hint)
ReferenceCounted
ResourceLeakDetector
.touch
in interface ByteBufHolder
touch
in interface Http2GoAwayFrame
touch
in interface ReferenceCounted
touch
in class DefaultByteBufHolder
public boolean equals(Object o)
equals
in class DefaultByteBufHolder
public int hashCode()
hashCode
in class DefaultByteBufHolder
public String toString()
toString
in class DefaultByteBufHolder
Copyright © 2008–2017 The Netty Project. All rights reserved.