@UnstableApi public final class DefaultHttp2GoAwayFrame extends DefaultByteBufHolder implements Http2GoAwayFrame
Http2GoAwayFrame implementation.| 构造器和说明 |
|---|
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.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Http2GoAwayFrame |
copy()
Creates a deep copy of this
ByteBufHolder. |
Http2GoAwayFrame |
duplicate()
Duplicates this
ByteBufHolder. |
boolean |
equals(java.lang.Object o)
This implementation of the
equals operation is restricted to
work only with instances of the same class. |
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. |
java.lang.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.
|
java.lang.String |
toString() |
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.
|
content, contentToString, refCnt, release, releasecontentrefCnt, release, releasepublic 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 java.lang.String name()
Http2Framename 在接口中 Http2Framepublic long errorCode()
Http2GoAwayFrameerrorCode 在接口中 Http2GoAwayFramepublic int extraStreamIds()
Http2GoAwayFrameextraStreamIds 在接口中 Http2GoAwayFramepublic Http2GoAwayFrame setExtraStreamIds(int extraStreamIds)
Http2GoAwayFramesetExtraStreamIds 在接口中 Http2GoAwayFramethisHttp2GoAwayFrame.extraStreamIds()public int lastStreamId()
Http2GoAwayFrame-1 else.lastStreamId 在接口中 Http2GoAwayFramepublic Http2GoAwayFrame copy()
DefaultByteBufHolderByteBufHolder.
This method calls replace(content().copy()) by default.
copy 在接口中 ByteBufHoldercopy 在接口中 Http2GoAwayFramecopy 在类中 DefaultByteBufHolderpublic Http2GoAwayFrame duplicate()
DefaultByteBufHolderByteBufHolder. Be aware that this will not automatically call ByteBufHolder.retain().
This method calls replace(content().duplicate()) by default.
duplicate 在接口中 ByteBufHolderduplicate 在接口中 Http2GoAwayFrameduplicate 在类中 DefaultByteBufHolderpublic Http2GoAwayFrame retainedDuplicate()
DefaultByteBufHolderByteBufHolder. This method returns a retained duplicate unlike ByteBufHolder.duplicate().
This method calls replace(content().retainedDuplicate()) by default.
retainedDuplicate 在接口中 ByteBufHolderretainedDuplicate 在接口中 Http2GoAwayFrameretainedDuplicate 在类中 DefaultByteBufHolderByteBuf.retainedDuplicate()public Http2GoAwayFrame replace(ByteBuf content)
DefaultByteBufHolderByteBufHolder 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 在接口中 ByteBufHolderreplace 在接口中 Http2GoAwayFramereplace 在类中 DefaultByteBufHolderpublic Http2GoAwayFrame retain()
ReferenceCounted1.retain 在接口中 ByteBufHolderretain 在接口中 Http2GoAwayFrameretain 在接口中 ReferenceCountedretain 在类中 DefaultByteBufHolderpublic Http2GoAwayFrame retain(int increment)
ReferenceCountedincrement.retain 在接口中 ByteBufHolderretain 在接口中 Http2GoAwayFrameretain 在接口中 ReferenceCountedretain 在类中 DefaultByteBufHolderpublic Http2GoAwayFrame touch()
ReferenceCountedResourceLeakDetector. This method is a shortcut to touch(null).touch 在接口中 ByteBufHoldertouch 在接口中 Http2GoAwayFrametouch 在接口中 ReferenceCountedtouch 在类中 DefaultByteBufHolderpublic Http2GoAwayFrame touch(java.lang.Object hint)
ReferenceCountedResourceLeakDetector.touch 在接口中 ByteBufHoldertouch 在接口中 Http2GoAwayFrametouch 在接口中 ReferenceCountedtouch 在类中 DefaultByteBufHolderpublic boolean equals(java.lang.Object o)
DefaultByteBufHolderequals 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 DefaultByteBufHolder and
override equals method with an additional comparison logic and we
need the symmetric property of the equals operation to be preserved.equals 在类中 DefaultByteBufHoldero - the reference object with which to compare.true if this object is the same as the obj
argument; false otherwise.public int hashCode()
hashCode 在类中 DefaultByteBufHolderpublic java.lang.String toString()
toString 在类中 DefaultByteBufHolder