public final class KeepaliveFrame extends Object
KEEPALIVE frame.Disposable.Composite, Disposable.SwapFRAME_TYPE_SHIFT| Modifier and Type | Method and Description |
|---|---|
static KeepaliveFrame |
createKeepaliveFrame(ByteBuf byteBuf)
Creates the
KEEPALIVE frame. |
static KeepaliveFrame |
createKeepaliveFrame(ByteBufAllocator byteBufAllocator,
boolean respond,
long lastReceivedPosition,
ByteBuf data)
Creates the
KEEPALIVE frame. |
void |
dispose() |
boolean |
equals(Object o) |
FrameType |
getFrameType()
Returns the
FrameType. |
long |
getLastReceivedPosition()
Returns the last received position.
|
ByteBuf |
getUnsafeData()
Returns the data directly.
|
ByteBuf |
getUnsafeFrame()
Returns the frame directly.
|
int |
hashCode() |
boolean |
isRespondFlagSet()
Returns whether the respond flag is set.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetDataAsUtf8, getDataLength, mapDataconsumeFrame, getFrameType, getUnsafeFrame, mapFramedispose, isDisposedpublic static KeepaliveFrame createKeepaliveFrame(ByteBuf byteBuf)
KEEPALIVE frame.byteBuf - the ByteBuf representing the frameKEEPALIVE frame.NullPointerException - if byteBuf is nullpublic static KeepaliveFrame createKeepaliveFrame(ByteBufAllocator byteBufAllocator, boolean respond, long lastReceivedPosition, @Nullable ByteBuf data)
KEEPALIVE frame.byteBufAllocator - the ByteBufAllocator to userespond - whether to set the Respond flaglastReceivedPosition - the last received positiondata - the frame dataKEEPALIVE frameNullPointerException - if byteBufAllocator is nullpublic long getLastReceivedPosition()
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 boolean isRespondFlagSet()
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)