- java.lang.Object
-
- io.netty5.buffer.api.BufferHolder<Http2UnknownFrame>
-
- io.netty5.handler.codec.http2.DefaultHttp2UnknownFrame
-
- All Implemented Interfaces:
Http2Frame,Http2StreamFrame,Http2UnknownFrame,Resource<Http2UnknownFrame>,AutoCloseable
@UnstableApi public final class DefaultHttp2UnknownFrame extends BufferHolder<Http2UnknownFrame> implements Http2UnknownFrame
-
-
Constructor Summary
Constructors Constructor Description DefaultHttp2UnknownFrame(byte frameType, Http2Flags flags)DefaultHttp2UnknownFrame(byte frameType, Http2Flags flags, Buffer data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Buffercontent()Get the data content associated with this unknown frame.DefaultHttp2UnknownFramecopy()Create a copy of this unknown frame, which in turn contain a copy of the frame contents.booleanequals(Object o)This implementation of theequalsoperation is restricted to work only with instances of the same class.Http2Flagsflags()Get theHttp2Flagsset on this unknown frame.byteframeType()Get the raw frame type.inthashCode()Stringname()Returns the name of the HTTP/2 frame e.g.protected DefaultHttp2UnknownFramereceive(Buffer buf)Called when a sentBufferHolderis received by the recipient.Http2FrameStreamstream()Returns theHttp2FrameStreamobject for this frame, ornullif the frame has yet to be associated with a stream.DefaultHttp2UnknownFramestream(Http2FrameStream stream)Set theHttp2FrameStreamobject for this frame.StringtoString()-
Methods inherited from class io.netty5.buffer.api.BufferHolder
close, getBuffer, getBufferVolatile, isAccessible, replaceBuffer, replaceBufferVolatile, send, touch
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.netty5.util.Resource
close, isAccessible, send, touch
-
-
-
-
Constructor Detail
-
DefaultHttp2UnknownFrame
public DefaultHttp2UnknownFrame(byte frameType, Http2Flags flags)
-
DefaultHttp2UnknownFrame
public DefaultHttp2UnknownFrame(byte frameType, Http2Flags flags, Buffer data)
-
-
Method Detail
-
content
public Buffer content()
Description copied from interface:Http2UnknownFrameGet the data content associated with this unknown frame.The buffer will be empty if there is no data with this unknown frame.
- Specified by:
contentin interfaceHttp2UnknownFrame- Returns:
- The contents of this unknown frame.
-
stream
public Http2FrameStream stream()
Description copied from interface:Http2StreamFrameReturns theHttp2FrameStreamobject for this frame, ornullif the frame has yet to be associated with a stream.- Specified by:
streamin interfaceHttp2StreamFrame- Specified by:
streamin interfaceHttp2UnknownFrame
-
stream
public DefaultHttp2UnknownFrame stream(Http2FrameStream stream)
Description copied from interface:Http2StreamFrameSet theHttp2FrameStreamobject for this frame.- Specified by:
streamin interfaceHttp2StreamFrame- Specified by:
streamin interfaceHttp2UnknownFrame
-
frameType
public byte frameType()
Description copied from interface:Http2UnknownFrameGet the raw frame type. This is the type value that wasn't recognized and caused this to be captured as an unknown frame.- Specified by:
frameTypein interfaceHttp2UnknownFrame- Returns:
- The raw frame type.
-
flags
public Http2Flags flags()
Description copied from interface:Http2UnknownFrameGet theHttp2Flagsset on this unknown frame.- Specified by:
flagsin interfaceHttp2UnknownFrame- Returns:
- The flags set on this frame.
-
name
public String name()
Description copied from interface:Http2FrameReturns the name of the HTTP/2 frame e.g. DATA, GOAWAY, etc.- Specified by:
namein interfaceHttp2Frame
-
copy
public DefaultHttp2UnknownFrame copy()
Description copied from interface:Http2UnknownFrameCreate a copy of this unknown frame, which in turn contain a copy of the frame contents.- Specified by:
copyin interfaceHttp2UnknownFrame- Returns:
- A copy of this unknown frame.
-
receive
protected DefaultHttp2UnknownFrame receive(Buffer buf)
Description copied from class:BufferHolderCalled when a sentBufferHolderis received by the recipient. TheBufferHoldershould return a new concrete instance, that wraps the givenBufferobject.- Specified by:
receivein classBufferHolder<Http2UnknownFrame>- Parameters:
buf- TheBufferthat is received by the recipient, and needs to be wrapped in a newBufferHolderinstance.- Returns:
- A new buffer holder instance, containing the given buffer.
-
equals
public boolean equals(Object o)
Description copied from class:BufferHolderThis implementation of theequalsoperation 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 extendBufferHolderand overrideequalsmethod with an additional comparison logic, and we need the symmetric property of theequalsoperation to be preserved.- Overrides:
equalsin classBufferHolder<Http2UnknownFrame>- Parameters:
o- The reference object with which to compare.- Returns:
trueif this object is the same as the obj argument;falseotherwise.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classBufferHolder<Http2UnknownFrame>
-
-