Package io.netty.handler.codec.http2
Class DefaultHttp2HeadersFrame
java.lang.Object
io.netty.handler.codec.http2.AbstractHttp2StreamFrame
io.netty.handler.codec.http2.DefaultHttp2HeadersFrame
- All Implemented Interfaces:
Http2Frame
,Http2HeadersFrame
,Http2StreamFrame
@UnstableApi
public final class DefaultHttp2HeadersFrame
extends AbstractHttp2StreamFrame
implements Http2HeadersFrame
The default
Http2HeadersFrame
implementation.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean
private final Http2Headers
private final int
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultHttp2HeadersFrame
(Http2Headers headers) Equivalent tonew DefaultHttp2HeadersFrame(headers, false)
.DefaultHttp2HeadersFrame
(Http2Headers headers, boolean endStream) Equivalent tonew DefaultHttp2HeadersFrame(headers, endStream, 0)
.DefaultHttp2HeadersFrame
(Http2Headers headers, boolean endStream, int padding) Construct a new headers message. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
ifo
has equalstream
to this object.int
hashCode()
headers()
A complete header list.boolean
Returnstrue
if the END_STREAM flag is set.name()
Returns the name of the HTTP/2 frame e.g.int
padding()
Frame padding to use.stream
(Http2FrameStream stream) Set theHttp2FrameStream
object for this frame.toString()
Methods inherited from class io.netty.handler.codec.http2.AbstractHttp2StreamFrame
stream
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.netty.handler.codec.http2.Http2StreamFrame
stream
-
Field Details
-
headers
-
endStream
private final boolean endStream -
padding
private final int padding
-
-
Constructor Details
-
DefaultHttp2HeadersFrame
Equivalent tonew DefaultHttp2HeadersFrame(headers, false)
.- Parameters:
headers
- the non-null
headers to send
-
DefaultHttp2HeadersFrame
Equivalent tonew DefaultHttp2HeadersFrame(headers, endStream, 0)
.- Parameters:
headers
- the non-null
headers to send
-
DefaultHttp2HeadersFrame
Construct a new headers message.- Parameters:
headers
- the non-null
headers to sendendStream
- whether these headers should terminate the streampadding
- additional bytes that should be added to obscure the true content size. Must be between 0 and 256 (inclusive).
-
-
Method Details
-
stream
Description copied from interface:Http2StreamFrame
Set theHttp2FrameStream
object for this frame.- Specified by:
stream
in interfaceHttp2StreamFrame
- Overrides:
stream
in classAbstractHttp2StreamFrame
-
name
Description copied from interface:Http2Frame
Returns the name of the HTTP/2 frame e.g. DATA, GOAWAY, etc.- Specified by:
name
in interfaceHttp2Frame
-
headers
Description copied from interface:Http2HeadersFrame
A complete header list. CONTINUATION frames are automatically handled.- Specified by:
headers
in interfaceHttp2HeadersFrame
-
isEndStream
public boolean isEndStream()Description copied from interface:Http2HeadersFrame
Returnstrue
if the END_STREAM flag is set.- Specified by:
isEndStream
in interfaceHttp2HeadersFrame
-
padding
public int padding()Description copied from interface:Http2HeadersFrame
Frame padding to use. Must be non-negative and less than 256.- Specified by:
padding
in interfaceHttp2HeadersFrame
-
toString
-
equals
Description copied from class:AbstractHttp2StreamFrame
Returnstrue
ifo
has equalstream
to this object.- Overrides:
equals
in classAbstractHttp2StreamFrame
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractHttp2StreamFrame
-