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
public final class DefaultHttp2HeadersFrame extends AbstractHttp2StreamFrame implements Http2HeadersFrame
The defaultHttp2HeadersFrameimplementation.
-
-
Constructor Summary
Constructors Constructor Description DefaultHttp2HeadersFrame(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Returnstrueifohas equalstreamto this object.inthashCode()Http2Headersheaders()A complete header list.booleanisEndStream()Returnstrueif the END_STREAM flag is set.java.lang.Stringname()Returns the name of the HTTP/2 frame e.g.intpadding()Frame padding to use.DefaultHttp2HeadersFramestream(Http2FrameStream stream)Set theHttp2FrameStreamobject for this frame.java.lang.StringtoString()-
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
-
-
-
-
Constructor Detail
-
DefaultHttp2HeadersFrame
public DefaultHttp2HeadersFrame(Http2Headers headers)
Equivalent tonew DefaultHttp2HeadersFrame(headers, false).- Parameters:
headers- the non-nullheaders to send
-
DefaultHttp2HeadersFrame
public DefaultHttp2HeadersFrame(Http2Headers headers, boolean endStream)
Equivalent tonew DefaultHttp2HeadersFrame(headers, endStream, 0).- Parameters:
headers- the non-nullheaders to send
-
DefaultHttp2HeadersFrame
public DefaultHttp2HeadersFrame(Http2Headers headers, boolean endStream, int padding)
Construct a new headers message.- Parameters:
headers- the non-nullheaders 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 Detail
-
stream
public DefaultHttp2HeadersFrame stream(Http2FrameStream stream)
Description copied from interface:Http2StreamFrameSet theHttp2FrameStreamobject for this frame.- Specified by:
streamin interfaceHttp2StreamFrame- Overrides:
streamin classAbstractHttp2StreamFrame
-
name
public java.lang.String name()
Description copied from interface:Http2FrameReturns the name of the HTTP/2 frame e.g. DATA, GOAWAY, etc.- Specified by:
namein interfaceHttp2Frame
-
headers
public Http2Headers headers()
Description copied from interface:Http2HeadersFrameA complete header list. CONTINUATION frames are automatically handled.- Specified by:
headersin interfaceHttp2HeadersFrame
-
isEndStream
public boolean isEndStream()
Description copied from interface:Http2HeadersFrameReturnstrueif the END_STREAM flag is set.- Specified by:
isEndStreamin interfaceHttp2HeadersFrame
-
padding
public int padding()
Description copied from interface:Http2HeadersFrameFrame padding to use. Must be non-negative and less than 256.- Specified by:
paddingin interfaceHttp2HeadersFrame
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
Description copied from class:AbstractHttp2StreamFrameReturnstrueifohas equalstreamto this object.- Overrides:
equalsin classAbstractHttp2StreamFrame
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractHttp2StreamFrame
-
-