public final class StreamIdFrame extends Object
Disposable.Composite, Disposable.SwapFRAME_TYPE_SHIFT| Modifier and Type | Method and Description |
|---|---|
static StreamIdFrame |
createStreamIdFrame(ByteBuf byteBuf)
Creates the frame with a stream id.
|
static StreamIdFrame |
createStreamIdFrame(ByteBufAllocator byteBufAllocator,
int streamId,
Frame frame)
Creates the frame with a stream id.
|
void |
dispose() |
boolean |
equals(Object o) |
FrameType |
getFrameType()
Returns the
FrameType. |
int |
getStreamId()
Returns the stream id.
|
ByteBuf |
getUnsafeFrame()
Returns the frame directly.
|
ByteBuf |
getUnsafeFrameWithoutStreamId()
Returns the frame without stream id directly.
|
int |
hashCode() |
<T> T |
mapFrameWithoutStreamId(Function<ByteBuf,T> function)
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitconsumeFrame, mapFrameisDisposedpublic static StreamIdFrame createStreamIdFrame(ByteBuf byteBuf)
byteBuf - the ByteBuf representing the frameNullPointerException - if byteBuf is nullpublic static StreamIdFrame createStreamIdFrame(ByteBufAllocator byteBufAllocator, int streamId, Frame frame)
byteBufAllocator - the ByteBufAllocator to usestreamId - the stream idframe - the frame to prepend the stream id toNullPointerException - if byteBufAllocator or frame is nullpublic int getStreamId()
public ByteBuf getUnsafeFrameWithoutStreamId()
Note: this frame without stream id will be outside of the Frame's lifecycle
and may be released at any time. It is highly recommended that you ByteBuf.retain() the
frame without stream id if you store it.
mapFrameWithoutStreamId(Function)public <T> T mapFrameWithoutStreamId(Function<ByteBuf,T> function)
T - the different typefunction - the function to transform the Frame without the stream id as a ByteBuf to a different typeFrame without the stream id as a ByteBuf mapped to a different typeNullPointerException - if function is nullpublic final void dispose()
dispose in interface Disposablepublic FrameType getFrameType()
FrameFrameType.getFrameType in interface FrameFrameTypepublic final ByteBuf getUnsafeFrame()
FrameNote: this frame will be outside of the Frame's lifecycle and may be released
at any time. It is highly recommended that you ByteBuf.retain() the frame if you store
it.
getUnsafeFrame in interface FrameFrame.consumeFrame(Consumer),
Frame.mapFrame(Function)