Package io.ably.lib.liveobjects.message
Interface ObjectData
public interface ObjectData
Represents a value in an object on a channel. A value is either a reference to another
object (
getObjectId()) or exactly one of the primitive payloads
(getString(), getNumber(), getBoolean(),
getBytes(), getJson()).
Spec: OD1
-
Method Summary
Modifier and TypeMethodDescription@Nullable BooleanReturns the boolean value.byte @Nullable []getBytes()Returns the binary value.@Nullable com.google.gson.JsonElementgetJson()Returns the JSON object or array value.@Nullable DoubleReturns the numeric value.@Nullable StringReturns a reference to another object, used to support composable object structures.@Nullable StringReturns the string value.
-
Method Details
-
getObjectId
Returns a reference to another object, used to support composable object structures.Spec: OD2a
- Returns:
- the referenced object id, or
nullif this value is a primitive
-
getString
Returns the string value.Spec: OD2f
- Returns:
- the string value, or
nullif not applicable
-
getNumber
Returns the numeric value.Spec: OD2e
- Returns:
- the numeric value, or
nullif not applicable
-
getBoolean
Returns the boolean value.Spec: OD2c
- Returns:
- the boolean value, or
nullif not applicable
-
getBytes
byte @Nullable [] getBytes()Returns the binary value. The returned array is the underlying message payload and is not defensively copied; callers must treat it as read-only.Spec: OD2d
- Returns:
- the binary value, or
nullif not applicable
-
getJson
@Nullable @Nullable com.google.gson.JsonElement getJson()Returns the JSON object or array value.Spec: OD2g
- Returns:
- the JSON value, or
nullif not applicable
-