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 Type
    Method
    Description
    @Nullable Boolean
    Returns the boolean value.
    byte @Nullable []
    Returns the binary value.
    @Nullable com.google.gson.JsonElement
    Returns the JSON object or array value.
    @Nullable Double
    Returns the numeric value.
    @Nullable String
    Returns a reference to another object, used to support composable object structures.
    @Nullable String
    Returns the string value.
  • Method Details

    • getObjectId

      @Nullable @Nullable String getObjectId()
      Returns a reference to another object, used to support composable object structures.

      Spec: OD2a

      Returns:
      the referenced object id, or null if this value is a primitive
    • getString

      @Nullable @Nullable String getString()
      Returns the string value.

      Spec: OD2f

      Returns:
      the string value, or null if not applicable
    • getNumber

      @Nullable @Nullable Double getNumber()
      Returns the numeric value.

      Spec: OD2e

      Returns:
      the numeric value, or null if not applicable
    • getBoolean

      @Nullable @Nullable Boolean getBoolean()
      Returns the boolean value.

      Spec: OD2c

      Returns:
      the boolean value, or null if 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 null if not applicable
    • getJson

      @Nullable @Nullable com.google.gson.JsonElement getJson()
      Returns the JSON object or array value.

      Spec: OD2g

      Returns:
      the JSON value, or null if not applicable