public final class ExtensionFrame extends Object
EXT frame.Disposable.Composite, Disposable.SwapFRAME_TYPE_SHIFT| Modifier and Type | Method and Description |
|---|---|
static ExtensionFrame |
createExtensionFrame(ByteBuf byteBuf)
Creates the
EXT frame. |
static ExtensionFrame |
createExtensionFrame(ByteBufAllocator byteBufAllocator,
boolean ignore,
int extendedType,
ByteBuf metadata,
ByteBuf data)
Creates the
EXT frame. |
static ExtensionFrame |
createExtensionFrame(ByteBufAllocator byteBufAllocator,
boolean ignore,
int extendedType,
String metadata,
String data)
Creates the
EXT frame. |
void |
dispose() |
boolean |
equals(Object o) |
int |
getExtendedType()
Returns the extended type.
|
FrameType |
getFrameType()
Returns the
FrameType. |
ByteBuf |
getUnsafeData()
Returns the data directly.
|
ByteBuf |
getUnsafeFrame()
Returns the frame directly.
|
ByteBuf |
getUnsafeMetadata()
Returns the metadata directly.
|
int |
hashCode() |
boolean |
isIgnoreFlagSet()
Returns whether the Ignore flag is set.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetMetadataAsUtf8, getMetadataLength, getUnsafeMetadataAsUtf8, getUnsafeMetadataLength, mapMetadatagetDataAsUtf8, getDataLength, mapDataconsumeFrame, getFrameType, getUnsafeFrame, mapFramedispose, isDisposedpublic static ExtensionFrame createExtensionFrame(ByteBuf byteBuf)
EXT frame.byteBuf - the ByteBuf representing the frameEXT frame.NullPointerException - if byteBuf is nullpublic static ExtensionFrame createExtensionFrame(ByteBufAllocator byteBufAllocator, boolean ignore, int extendedType, @Nullable String metadata, @Nullable String data)
EXT frame.byteBufAllocator - the ByteBufAllocator to useignore - whether to set the Ignore flagextendedType - the type of the extended framemetadata - the metadatadata - the dataEXT frameNullPointerException - if byteBufAllocator is nullpublic static ExtensionFrame createExtensionFrame(ByteBufAllocator byteBufAllocator, boolean ignore, int extendedType, @Nullable ByteBuf metadata, @Nullable ByteBuf data)
EXT frame.byteBufAllocator - the ByteBufAllocator to useignore - whether to set the Ignore flagextendedType - the type of the extended framemetadata - the metadatadata - the dataEXT frameNullPointerException - if byteBufAllocator is nullpublic int getExtendedType()
public ByteBuf getUnsafeData()
DataFrameNote: this data will be outside of the Frame's lifecycle and may be released
at any time. It is highly recommended that you ByteBuf.retain() the data if you store
it.
DataFrame.getDataAsUtf8(),
DataFrame.mapData(Function)@Nullable public ByteBuf getUnsafeMetadata()
MetadataFramenull.
Note: this metadata will be outside of the Frame's lifecycle and may be
released at any time. It is highly recommended that you ByteBuf.retain() the metadata
if you store it.
null if the Metadata flag is not setMetadataFrame.getMetadataAsUtf8(),
MetadataFrame.mapMetadata(Function)public boolean isIgnoreFlagSet()
public 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)