Top Description Fields Constructors Methods
io.netty.handler.codec.http2

public final Class DefaultHttp2GoAwayFrame

extends DefaultByteBufHolder
implements Http2GoAwayFrame
Class Inheritance
All Implemented Interfaces
io.netty.handler.codec.http2.Http2GoAwayFrame, io.netty.buffer.ByteBufHolder, io.netty.util.ReferenceCounted, io.netty.handler.codec.http2.Http2Frame
Annotations
@UnstableApi
Static Imports
io.netty.util.internal.ObjectUtil.checkPositiveOrZero

The default Http2GoAwayFrame implementation.

Field Summary

Modifier and TypeField and Description
private final long
private int
private final int

Constructor Summary

AccessConstructor and Description
public
DefaultHttp2GoAwayFrame(Http2Error
non-null reason for the go away
error
)

Equivalent to new DefaultHttp2GoAwayFrame(error.code()).

public
DefaultHttp2GoAwayFrame(long
reason for the go away
errorCode
)

Equivalent to new DefaultHttp2GoAwayFrame(content, Unpooled.EMPTY_BUFFER).

public
DefaultHttp2GoAwayFrame(Http2Error
non-null reason for the go away
error
,
ByteBuf
non-null debug data
content
)

public
DefaultHttp2GoAwayFrame(long
reason for the go away
errorCode
,
ByteBuf
non-null debug data
content
)

Construct a new GOAWAY message.

pack-priv
DefaultHttp2GoAwayFrame(int lastStreamId, long errorCode, ByteBuf content)

Construct a new GOAWAY message.

Method Summary

Modifier and TypeMethod and Description
public Http2GoAwayFrame
public Http2GoAwayFrame
public boolean
equals(Object
the reference object with which to compare.
o
)

Overrides io.netty.buffer.DefaultByteBufHolder.equals.

This implementation of the equals operation is restricted to work only with instances of the same class.
public long
errorCode()

Implements io.netty.handler.codec.http2.Http2GoAwayFrame.errorCode.

The reason for beginning closure of the connection.
public int
extraStreamIds()

Implements io.netty.handler.codec.http2.Http2GoAwayFrame.extraStreamIds.

The number of IDs to reserve for the receiver to use while GOAWAY is in transit.
public int
hashCode()

Overrides io.netty.buffer.DefaultByteBufHolder.hashCode.

Returns a hash code value for this object.
public int
lastStreamId()

Implements io.netty.handler.codec.http2.Http2GoAwayFrame.lastStreamId.

Returns the last stream identifier if set, or -1 else.
public String
name()

Implements io.netty.handler.codec.http2.Http2Frame.name.

Returns the name of the HTTP/2 frame e.g. DATA, GOAWAY, etc.
public Http2GoAwayFrame
public Http2GoAwayFrame
public Http2GoAwayFrame
retain(int increment)

Overrides io.netty.buffer.DefaultByteBufHolder.retain.

Implements io.netty.handler.codec.http2.Http2GoAwayFrame.retain, io.netty.buffer.ByteBufHolder.retain.

Increases the reference count by the specified increment.
public Http2GoAwayFrame
public Http2GoAwayFrame
setExtraStreamIds(int extraStreamIds)

Implements io.netty.handler.codec.http2.Http2GoAwayFrame.setExtraStreamIds.

Sets the number of IDs to reserve for the receiver to use while GOAWAY is in transit.
public String
toString()

Overrides io.netty.buffer.DefaultByteBufHolder.toString.

Returns a string representation of the object.
public Http2GoAwayFrame
touch()

Overrides io.netty.buffer.DefaultByteBufHolder.touch.

Implements io.netty.handler.codec.http2.Http2GoAwayFrame.touch, io.netty.buffer.ByteBufHolder.touch.

Records the current access location of this object for debugging purposes.
public Http2GoAwayFrame
touch(Object hint)

Overrides io.netty.buffer.DefaultByteBufHolder.touch.

Implements io.netty.handler.codec.http2.Http2GoAwayFrame.touch, io.netty.buffer.ByteBufHolder.touch.

Records the current access location of this object with an additional arbitrary information for debugging purposes.
Inherited from io.netty.buffer.DefaultByteBufHolder:
contentcontentToStringrefCntreleaserelease

Field Detail

errorCodeback to summary
private final long errorCode
extraStreamIdsback to summary
private int extraStreamIds
lastStreamIdback to summary
private final int lastStreamId

Constructor Detail

DefaultHttp2GoAwayFrameback to summary
public DefaultHttp2GoAwayFrame(Http2Error error)

Equivalent to new DefaultHttp2GoAwayFrame(error.code()).

Parameters
error:Http2Error

non-null reason for the go away

DefaultHttp2GoAwayFrameback to summary
public DefaultHttp2GoAwayFrame(long errorCode)

Equivalent to new DefaultHttp2GoAwayFrame(content, Unpooled.EMPTY_BUFFER).

Parameters
errorCode:long

reason for the go away

DefaultHttp2GoAwayFrameback to summary
public DefaultHttp2GoAwayFrame(Http2Error error, ByteBuf content)
Parameters
error:Http2Error

non-null reason for the go away

content:ByteBuf

non-null debug data

DefaultHttp2GoAwayFrameback to summary
public DefaultHttp2GoAwayFrame(long errorCode, ByteBuf content)

Construct a new GOAWAY message.

Parameters
errorCode:long

reason for the go away

content:ByteBuf

non-null debug data

DefaultHttp2GoAwayFrameback to summary
pack-priv DefaultHttp2GoAwayFrame(int lastStreamId, long errorCode, ByteBuf content)

Construct a new GOAWAY message. This constructor is for internal use only. A user should not have to specify a specific last stream identifier, but use setExtraStreamIds(int) instead.

Method Detail

copyback to summary
public Http2GoAwayFrame copy()

Overrides io.netty.buffer.DefaultByteBufHolder.copy.

Implements io.netty.handler.codec.http2.Http2GoAwayFrame.copy, io.netty.buffer.ByteBufHolder.copy.

Doc from io.netty.buffer.ByteBufHolder.copy.

Creates a deep copy of this ByteBufHolder.

Annotations
@Override
duplicateback to summary
public Http2GoAwayFrame duplicate()

Overrides io.netty.buffer.DefaultByteBufHolder.duplicate.

Implements io.netty.handler.codec.http2.Http2GoAwayFrame.duplicate, io.netty.buffer.ByteBufHolder.duplicate.

Doc from io.netty.buffer.ByteBufHolder.duplicate.

Duplicates this ByteBufHolder. Be aware that this will not automatically call retain().

Annotations
@Override
equalsback to summary
public boolean equals(Object o)

Overrides io.netty.buffer.DefaultByteBufHolder.equals.

Doc from io.netty.buffer.DefaultByteBufHolder.equals.

This implementation of the equals 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.

Parameters
o:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
errorCodeback to summary
public long errorCode()

Implements io.netty.handler.codec.http2.Http2GoAwayFrame.errorCode.

Doc from io.netty.handler.codec.http2.Http2GoAwayFrame.errorCode.

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

Annotations
@Override
extraStreamIdsback to summary
public int extraStreamIds()

Implements io.netty.handler.codec.http2.Http2GoAwayFrame.extraStreamIds.

Doc from io.netty.handler.codec.http2.Http2GoAwayFrame.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.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides io.netty.buffer.DefaultByteBufHolder.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
lastStreamIdback to summary
public int lastStreamId()

Implements io.netty.handler.codec.http2.Http2GoAwayFrame.lastStreamId.

Doc from io.netty.handler.codec.http2.Http2GoAwayFrame.lastStreamId.

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

Annotations
@Override
nameback to summary
public String name()

Implements io.netty.handler.codec.http2.Http2Frame.name.

Doc from io.netty.handler.codec.http2.Http2Frame.name.

Returns the name of the HTTP/2 frame e.g. DATA, GOAWAY, etc.

Annotations
@Override
replaceback to summary
public Http2GoAwayFrame replace(ByteBuf content)

Overrides io.netty.buffer.DefaultByteBufHolder.replace.

Implements io.netty.handler.codec.http2.Http2GoAwayFrame.replace, io.netty.buffer.ByteBufHolder.replace.

Doc from io.netty.buffer.ByteBufHolder.replace.

Returns a new ByteBufHolder which contains the specified content.

Annotations
@Override
retainback to summary
public Http2GoAwayFrame retain()

Overrides io.netty.buffer.DefaultByteBufHolder.retain.

Implements io.netty.handler.codec.http2.Http2GoAwayFrame.retain, io.netty.buffer.ByteBufHolder.retain.

Doc from io.netty.util.ReferenceCounted.retain.

Increases the reference count by 1.

Annotations
@Override
retainback to summary
public Http2GoAwayFrame retain(int increment)

Overrides io.netty.buffer.DefaultByteBufHolder.retain.

Implements io.netty.handler.codec.http2.Http2GoAwayFrame.retain, io.netty.buffer.ByteBufHolder.retain.

Doc from io.netty.util.ReferenceCounted.retain.

Increases the reference count by the specified increment.

Annotations
@Override
retainedDuplicateback to summary
public Http2GoAwayFrame retainedDuplicate()

Overrides io.netty.buffer.DefaultByteBufHolder.retainedDuplicate.

Implements io.netty.handler.codec.http2.Http2GoAwayFrame.retainedDuplicate, io.netty.buffer.ByteBufHolder.retainedDuplicate.

Doc from io.netty.buffer.ByteBufHolder.retainedDuplicate.

Duplicates this ByteBufHolder. This method returns a retained duplicate unlike duplicate().

Annotations
@Override
setExtraStreamIdsback to summary
public Http2GoAwayFrame setExtraStreamIds(int extraStreamIds)

Implements io.netty.handler.codec.http2.Http2GoAwayFrame.setExtraStreamIds.

Doc from io.netty.handler.codec.http2.Http2GoAwayFrame.setExtraStreamIds.

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

Returns:Http2GoAwayFrame

this

Annotations
@Override
toStringback to summary
public String toString()

Overrides io.netty.buffer.DefaultByteBufHolder.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override
touchback to summary
public Http2GoAwayFrame touch()

Overrides io.netty.buffer.DefaultByteBufHolder.touch.

Implements io.netty.handler.codec.http2.Http2GoAwayFrame.touch, io.netty.buffer.ByteBufHolder.touch.

Doc from io.netty.util.ReferenceCounted.touch.

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 via ResourceLeakDetector. This method is a shortcut to touch(null).

Annotations
@Override
touchback to summary
public Http2GoAwayFrame touch(Object hint)

Overrides io.netty.buffer.DefaultByteBufHolder.touch.

Implements io.netty.handler.codec.http2.Http2GoAwayFrame.touch, io.netty.buffer.ByteBufHolder.touch.

Doc from io.netty.util.ReferenceCounted.touch.

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 via ResourceLeakDetector.

Annotations
@Override