public final class ErrorFrame extends Object
ERROR frame.Disposable.Composite, Disposable.SwapFRAME_TYPE_SHIFT| Modifier and Type | Method and Description |
|---|---|
static ErrorFrame |
createErrorFrame(ByteBuf byteBuf)
Creates the
ERROR frame. |
static ErrorFrame |
createErrorFrame(ByteBufAllocator byteBufAllocator,
int errorCode,
ByteBuf data)
Creates the
ERROR frame. |
static ErrorFrame |
createErrorFrame(ByteBufAllocator byteBufAllocator,
int errorCode,
String data)
Creates the
ERROR frame. |
void |
dispose() |
boolean |
equals(Object o) |
int |
getErrorCode()
Returns the error code.
|
FrameType |
getFrameType()
Returns the
FrameType. |
ByteBuf |
getUnsafeData()
Returns the data directly.
|
ByteBuf |
getUnsafeFrame()
Returns the frame directly.
|
int |
hashCode() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetDataAsUtf8, getDataLength, mapDataconsumeFrame, getFrameType, getUnsafeFrame, mapFramedispose, isDisposedpublic static ErrorFrame createErrorFrame(ByteBuf byteBuf)
ERROR frame.byteBuf - the ByteBuf representing the frameERROR frame.NullPointerException - if byteBuf is nullpublic static ErrorFrame createErrorFrame(ByteBufAllocator byteBufAllocator, int errorCode, @Nullable String data)
ERROR frame.byteBufAllocator - the ByteBufAllocator to useerrorCode - the error codedata - the error dataERROR frameNullPointerException - if byteBufAllocator is nullpublic static ErrorFrame createErrorFrame(ByteBufAllocator byteBufAllocator, int errorCode, @Nullable ByteBuf data)
ERROR frame.byteBufAllocator - the ByteBufAllocator to useerrorCode - the error codedata - the error dataERROR frameNullPointerException - if byteBufAllocator is nullpublic int getErrorCode()
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)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)