Payload. This implementation is not thread-safe, and hence
any method can not be invoked concurrently.
| Modifier and Type | Field and Description |
|---|---|
| private final ByteBuffer | |
| public static final ByteBuffer | |
| private final ByteBuffer |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Payload | Returns: a payload.the data of the payload. data)Static factory method for a text payload. |
| public static Payload | Returns: a payload.the data of the payload. data, CharSequence the metadata for the payload. metadata)Static factory method for a text payload. |
| public static Payload | |
| public static Payload | |
| public static Payload | |
| public static Payload | |
| public static Payload | |
| public static Payload | |
| public static Payload | |
| public static Payload | |
| public static Payload | |
| public ByteBuf | |
| public ByteBuffer | |
| public ByteBuffer | |
| public boolean | hasMetadata()
Implements io. |
| public ByteBuf | metadata()
Implements io. |
| public int | refCnt()
Implements io. |
| public boolean | release()
Implements io. 1 and deallocates this object if the reference count reaches at
0.
|
| public boolean | release(int decrement)
Implements io. decrement and deallocates this object if the reference
count reaches at 0.
|
| public DefaultPayload | |
| public DefaultPayload | retain(int increment)
Implements io. increment.
|
| public ByteBuf | |
| public ByteBuf | |
| private static byte[] | |
| public DefaultPayload | touch()
Implements io. |
| public DefaultPayload | touch(Object hint)
Implements io. |
| data | back to summary |
|---|---|
| private final ByteBuffer data | |
| EMPTY_BUFFER | back to summary |
|---|---|
| public static final ByteBuffer EMPTY_BUFFER | |
| metadata | back to summary |
|---|---|
| private final ByteBuffer metadata | |
| DefaultPayload | back to summary |
|---|---|
| private DefaultPayload(ByteBuffer data, ByteBuffer metadata) | |
| create | back to summary |
|---|---|
| public static Payload create(CharSequence data) Static factory method for a text payload. Mainly looks better than "new DefaultPayload(data)"
| |
| create | back to summary |
|---|---|
| public static Payload create(CharSequence data, CharSequence metadata) Static factory method for a text payload. Mainly looks better than "new DefaultPayload(data, metadata)"
| |
| create | back to summary |
|---|---|
| public static Payload create(CharSequence data, Charset dataCharset) | |
| create | back to summary |
|---|---|
| public static Payload create(CharSequence data, Charset dataCharset, CharSequence metadata, Charset metadataCharset) | |
| create | back to summary |
|---|---|
| public static Payload create(byte[] data) | |
| create | back to summary |
|---|---|
| public static Payload create(byte[] data, byte[] metadata) | |
| create | back to summary |
|---|---|
| public static Payload create(ByteBuffer data) | |
| create | back to summary |
|---|---|
| public static Payload create(ByteBuffer data, ByteBuffer metadata) | |
| create | back to summary |
|---|---|
| public static Payload create(ByteBuf data) | |
| create | back to summary |
|---|---|
| public static Payload create(ByteBuf data, ByteBuf metadata) | |
| create | back to summary |
|---|---|
| public static Payload create(Payload payload) | |
| data | back to summary |
|---|---|
| public ByteBuf data() Implements io. Doc from io. Returns the Payloads' data without slicing if possible. This is not safe and editing this could effect the payload. It is recommended to call sliceData(). | |
| getData | back to summary |
|---|---|
| public ByteBuffer getData() Overrides default io.
| |
| getMetadata | back to summary |
|---|---|
| public ByteBuffer getMetadata() Overrides default io.
| |
| hasMetadata | back to summary |
|---|---|
| public boolean hasMetadata() Implements io. Doc from io. Returns whether the payload has metadata, useful for tell if metadata is empty or not present.
| |
| metadata | back to summary |
|---|---|
| public ByteBuf metadata() Implements io. Doc from io. Returns the Payloads' metadata without slicing if possible. This is not safe and editing this could effect the payload. It is recommended to call sliceMetadata(). | |
| refCnt | back to summary |
|---|---|
| public int refCnt() Implements io. Doc from io. Returns the reference count of this object. If
| |
| release | back to summary |
|---|---|
| public boolean release() Implements io. Doc from io. Decreases the reference count by
| |
| release | back to summary |
|---|---|
| public boolean release(int decrement) Implements io. Doc from io. Decreases the reference count by the specified
| |
| retain | back to summary |
|---|---|
| public DefaultPayload retain() Implements io. Doc from io. Increases the reference count by
| |
| retain | back to summary |
|---|---|
| public DefaultPayload retain(int increment) Implements io. Doc from io. Increases the reference count by the specified
| |
| sliceData | back to summary |
|---|---|
| public ByteBuf sliceData() Implements io. Doc from io. Returns the Payload data. Always non-null. | |
| sliceMetadata | back to summary |
|---|---|
| public ByteBuf sliceMetadata() Implements io. Doc from io. Returns a slice Payload metadata. Always non-null, check | |
| toBytes | back to summary |
|---|---|
| private static byte[] toBytes(ByteBuf byteBuf) | |
| touch | back to summary |
|---|---|
| public DefaultPayload touch() Implements io. Doc from io. Records the current access location of this object for debugging purposes. If this object is
determined to be leaked, the information recorded by this operation will be provided to you via
| |
| touch | back to summary |
|---|---|
| public DefaultPayload touch(Object hint) Implements io. Doc from io. Records the current access location of this object with an additional arbitrary information for
debugging purposes. If this object is determined to be leaked, the information recorded by this
operation will be provided to you via
| |