Top Fields Constructors Methods
io.rsocket.util

public Class EmptyPayload

extends Object
implements Payload
Class Inheritance
All Implemented Interfaces
io.rsocket.Payload, io.netty.util.ReferenceCounted
Imports
io.netty.buffer.ByteBuf, .Unpooled, io.rsocket.Payload

Field Summary

Modifier and TypeField and Description
public static final EmptyPayload

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public ByteBuf
data()

Implements io.rsocket.Payload.data.

Returns the Payloads' data without slicing if possible.
public boolean
hasMetadata()

Implements io.rsocket.Payload.hasMetadata.

Returns whether the payload has metadata, useful for tell if metadata is empty or not present.
public ByteBuf
metadata()

Implements io.rsocket.Payload.metadata.

Returns the Payloads' metadata without slicing if possible.
public int
refCnt()

Implements io.netty.util.ReferenceCounted.refCnt.

Returns the reference count of this object.
public boolean
release()

Implements io.netty.util.ReferenceCounted.release.

Decreases the reference count by 1 and deallocates this object if the reference count reaches at 0.
public boolean
release(int decrement)

Implements io.netty.util.ReferenceCounted.release.

Decreases the reference count by the specified decrement and deallocates this object if the reference count reaches at 0.
public EmptyPayload
retain()

Implements io.rsocket.Payload.retain.

Increases the reference count by 1.
public EmptyPayload
retain(int increment)

Implements io.rsocket.Payload.retain.

Increases the reference count by the specified increment.
public ByteBuf
sliceData()

Implements io.rsocket.Payload.sliceData.

Returns the Payload data.
public ByteBuf
sliceMetadata()

Implements io.rsocket.Payload.sliceMetadata.

Returns a slice Payload metadata.
public EmptyPayload
touch()

Implements io.rsocket.Payload.touch.

Records the current access location of this object for debugging purposes.
public EmptyPayload
touch(Object hint)

Implements io.rsocket.Payload.touch.

Records the current access location of this object with an additional arbitrary information for debugging purposes.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final EmptyPayload INSTANCE

Constructor Detail

EmptyPayloadback to summary
private EmptyPayload()

Method Detail

databack to summary
public ByteBuf data()

Implements io.rsocket.Payload.data.

Doc from io.rsocket.Payload.data.

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().

Returns:ByteBuf

data as a bytebuf or slice of the data

Annotations
@Override
hasMetadataback to summary
public boolean hasMetadata()

Implements io.rsocket.Payload.hasMetadata.

Doc from io.rsocket.Payload.hasMetadata.

Returns whether the payload has metadata, useful for tell if metadata is empty or not present.

Returns:boolean

whether payload has non-null (possibly empty) metadata

Annotations
@Override
metadataback to summary
public ByteBuf metadata()

Implements io.rsocket.Payload.metadata.

Doc from io.rsocket.Payload.metadata.

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().

Returns:ByteBuf

metadata as a bytebuf or slice of the metadata

Annotations
@Override
refCntback to summary
public int refCnt()

Implements io.netty.util.ReferenceCounted.refCnt.

Doc from io.netty.util.ReferenceCounted.refCnt.

Returns the reference count of this object. If 0, it means this object has been deallocated.

Annotations
@Override
releaseback to summary
public boolean release()

Implements io.netty.util.ReferenceCounted.release.

Doc from io.netty.util.ReferenceCounted.release.

Decreases the reference count by 1 and deallocates this object if the reference count reaches at 0.

Returns:boolean

true if and only if the reference count became 0 and this object has been deallocated

Annotations
@Override
releaseback to summary
public boolean release(int decrement)

Implements io.netty.util.ReferenceCounted.release.

Doc from io.netty.util.ReferenceCounted.release.

Decreases the reference count by the specified decrement and deallocates this object if the reference count reaches at 0.

Returns:boolean

true if and only if the reference count became 0 and this object has been deallocated

Annotations
@Override
retainback to summary
public EmptyPayload retain()

Implements io.rsocket.Payload.retain.

Doc from io.rsocket.Payload.retain.

Increases the reference count by 1.

Annotations
@Override
retainback to summary
public EmptyPayload retain(int increment)

Implements io.rsocket.Payload.retain.

Doc from io.rsocket.Payload.retain.

Increases the reference count by the specified increment.

Annotations
@Override
sliceDataback to summary
public ByteBuf sliceData()

Implements io.rsocket.Payload.sliceData.

Doc from io.rsocket.Payload.sliceData.

Returns the Payload data. Always non-null.

Returns:ByteBuf

payload data.

Annotations
@Override
sliceMetadataback to summary
public ByteBuf sliceMetadata()

Implements io.rsocket.Payload.sliceMetadata.

Doc from io.rsocket.Payload.sliceMetadata.

Returns a slice Payload metadata. Always non-null, check hasMetadata() to differentiate null from "".

Returns:ByteBuf

payload metadata.

Annotations
@Override
touchback to summary
public EmptyPayload touch()

Implements io.rsocket.Payload.touch.

Doc from io.rsocket.Payload.touch.

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 ResourceLeakDetector. This method is a shortcut to touch(null).

Annotations
@Override
touchback to summary
public EmptyPayload touch(Object hint)

Implements io.rsocket.Payload.touch.

Doc from io.rsocket.Payload.touch.

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 ResourceLeakDetector.

Annotations
@Override