public interface Payload extends ReferenceCounted
Frame.| Modifier and Type | Method and Description |
|---|---|
default ByteBuffer |
getData() |
default String |
getDataUtf8() |
default ByteBuffer |
getMetadata() |
default String |
getMetadataUtf8() |
boolean |
hasMetadata()
Returns whether the payload has metadata, useful for tell if metadata is empty or not present.
|
Payload |
retain()
Increases the reference count by
1. |
Payload |
retain(int increment)
Increases the reference count by the specified
increment. |
ByteBuf |
sliceData()
Returns the Payload data.
|
ByteBuf |
sliceMetadata()
Returns the Payload metadata.
|
Payload |
touch()
Records the current access location of this object for debugging purposes.
|
Payload |
touch(Object hint)
Records the current access location of this object with an additional arbitrary information for
debugging purposes.
|
refCnt, release, releaseboolean hasMetadata()
ByteBuf sliceMetadata()
hasMetadata() to differentiate
null from "".ByteBuf sliceData()
Payload retain()
1.retain in interface ReferenceCountedPayload retain(int increment)
increment.retain in interface ReferenceCountedPayload touch()
ResourceLeakDetector. This method is a shortcut to touch(null).touch in interface ReferenceCountedPayload touch(Object hint)
ResourceLeakDetector.touch in interface ReferenceCounteddefault ByteBuffer getMetadata()
default ByteBuffer getData()
default String getMetadataUtf8()
default String getDataUtf8()