Interface RealtimeObject
- All Superinterfaces:
ObjectStateChange
- All Known Implementing Classes:
RealtimeObject.Unavailable
LiveMapPathObject and, via ObjectStateChange, lets callers observe
synchronization state transitions for the channel's objects.
Implementations of this interface must be thread-safe as they may be accessed from multiple threads concurrently.
Spec: RTO23
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classNull-Object guard forRealtimeObject, used as the value ofchannel.objectwhen the LiveObjects plugin is not installed.Nested classes/interfaces inherited from interface io.ably.lib.liveobjects.state.ObjectStateChange
ObjectStateChange.Listener -
Method Summary
Modifier and TypeMethodDescription@NotNull CompletableFuture<LiveMapPathObject>get()Retrieves aLiveMapPathObjectrooted at the channel's rootLiveMap.Methods inherited from interface io.ably.lib.liveobjects.state.ObjectStateChange
off, offAll, on
-
Method Details
-
get
Retrieves aLiveMapPathObjectrooted at the channel's rootLiveMap. The returned object has an empty path and resolves to the rootLiveMap; use its navigation methods to address nested values within the objects graph.When called without a type variable, we return a default root type which is based on the globally defined interface for the Objects feature. A user can provide an explicit type to set the type structure on this particular channel. This is useful when working with multiple channels with different underlying data structures.
This operation requires the
OBJECT_SUBSCRIBEchannel mode. It implicitly attaches the channel if it is not already attached; the returned future completes once the objects synchronization state has transitioned toSYNCED, and completes exceptionally with anAblyExceptionif synchronization fails.Spec: RTO23, RTO23f (typed SDKs return a
LiveMapPathObject)- Returns:
- a future that completes with the root
LiveMapPathObjectfor this channel's objects graph.
-