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

public final Class DefaultHttp2HeadersFrame

extends AbstractHttp2StreamFrame
implements Http2HeadersFrame
Class Inheritance
All Implemented Interfaces
io.netty.handler.codec.http2.Http2HeadersFrame, io.netty.handler.codec.http2.Http2StreamFrame, io.netty.handler.codec.http2.Http2Frame
Annotations
@UnstableApi
Imports
io.netty.util.internal.StringUtil, .UnstableApi

The default Http2HeadersFrame implementation.

Field Summary

Modifier and TypeField and Description
private final boolean
private final Http2Headers
private final int

Constructor Summary

AccessConstructor and Description
public
DefaultHttp2HeadersFrame(Http2Headers
the non-null headers to send
headers
)

Equivalent to new DefaultHttp2HeadersFrame(headers, false).

public
DefaultHttp2HeadersFrame(Http2Headers
the non-null headers to send
headers
,
boolean endStream)

Equivalent to new DefaultHttp2HeadersFrame(headers, endStream, 0).

public
DefaultHttp2HeadersFrame(Http2Headers
the non-null headers to send
headers
,
boolean
whether these headers should terminate the stream
endStream
,
int
additional bytes that should be added to obscure the true content size. Must be between 0 and 256 (inclusive).
padding
)

Construct a new headers message.

Method Summary

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

Overrides io.netty.handler.codec.http2.AbstractHttp2StreamFrame.equals.

Returns true if o has equal stream to this object.
public int
hashCode()

Overrides io.netty.handler.codec.http2.AbstractHttp2StreamFrame.hashCode.

Returns a hash code value for this object.
public Http2Headers
public boolean
isEndStream()

Implements io.netty.handler.codec.http2.Http2HeadersFrame.isEndStream.

Returns true if the END_STREAM flag is set.
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 int
public DefaultHttp2HeadersFrame
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from io.netty.handler.codec.http2.AbstractHttp2StreamFrame:
stream

Field Detail

endStreamback to summary
private final boolean endStream
headersback to summary
private final Http2Headers headers
paddingback to summary
private final int padding

Constructor Detail

DefaultHttp2HeadersFrameback to summary
public DefaultHttp2HeadersFrame(Http2Headers headers)

Equivalent to new DefaultHttp2HeadersFrame(headers, false).

Parameters
headers:Http2Headers

the non-null headers to send

DefaultHttp2HeadersFrameback to summary
public DefaultHttp2HeadersFrame(Http2Headers headers, boolean endStream)

Equivalent to new DefaultHttp2HeadersFrame(headers, endStream, 0).

Parameters
headers:Http2Headers

the non-null headers to send

DefaultHttp2HeadersFrameback to summary
public DefaultHttp2HeadersFrame(Http2Headers headers, boolean endStream, int padding)

Construct a new headers message.

Parameters
headers:Http2Headers

the non-null headers to send

endStream:boolean

whether these headers should terminate the stream

padding:int

additional bytes that should be added to obscure the true content size. Must be between 0 and 256 (inclusive).

Method Detail

equalsback to summary
public boolean equals(Object o)

Overrides io.netty.handler.codec.http2.AbstractHttp2StreamFrame.equals.

Doc from io.netty.handler.codec.http2.AbstractHttp2StreamFrame.equals.

Returns true if o has equal stream to this object.

Parameters
o:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

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

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides io.netty.handler.codec.http2.AbstractHttp2StreamFrame.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
headersback to summary
public Http2Headers headers()

Implements io.netty.handler.codec.http2.Http2HeadersFrame.headers.

Doc from io.netty.handler.codec.http2.Http2HeadersFrame.headers.

A complete header list. CONTINUATION frames are automatically handled.

Annotations
@Override
isEndStreamback to summary
public boolean isEndStream()

Implements io.netty.handler.codec.http2.Http2HeadersFrame.isEndStream.

Doc from io.netty.handler.codec.http2.Http2HeadersFrame.isEndStream.

Returns true if the END_STREAM flag is set.

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
paddingback to summary
public int padding()

Implements io.netty.handler.codec.http2.Http2HeadersFrame.padding.

Doc from io.netty.handler.codec.http2.Http2HeadersFrame.padding.

Frame padding to use. Must be non-negative and less than 256.

Annotations
@Override
streamback to summary
public DefaultHttp2HeadersFrame stream(Http2FrameStream stream)

Overrides io.netty.handler.codec.http2.AbstractHttp2StreamFrame.stream.

Implements io.netty.handler.codec.http2.Http2StreamFrame.stream.

Doc from io.netty.handler.codec.http2.Http2StreamFrame.stream.

Set the Http2FrameStream object for this frame.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override