-
public interface ObjectsStateChange
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceObjectsStateChange.ListenerInterface for receiving notifications about Objects synchronization state changes.
Implement this interface and register it with an ObjectsStateEmitter to be notifiedwhen synchronization state transitions occur.
-
Method Summary
Modifier and Type Method Description abstract ObjectsSubscriptionon(@NotNull() ObjectsStateEvent event, @NotNull() ObjectsStateChange.Listener listener)Subscribes to a specific Objects synchronization state event. abstract voidoff(@NotNull() ObjectsStateChange.Listener listener)Unsubscribes the specified listener from all synchronization state events. abstract voidoffAll()Unsubscribes all listeners from all synchronization state events. -
-
Method Detail
-
on
@NonBlocking() abstract ObjectsSubscription on(@NotNull() ObjectsStateEvent event, @NotNull() ObjectsStateChange.Listener listener)
Subscribes to a specific Objects synchronization state event.
This method registers the provided listener to be notified when the specifiedsynchronization state event occurs. The returned subscription can be used tounsubscribe later when the notifications are no longer needed.
- Parameters:
event- the synchronization state event to subscribe to (SYNCING or SYNCED)listener- the listener that will be called when the event occurs
-
off
@NonBlocking() abstract void off(@NotNull() ObjectsStateChange.Listener listener)
Unsubscribes the specified listener from all synchronization state events.
After calling this method, the provided listener will no longer receiveany synchronization state event notifications.
- Parameters:
listener- the listener to unregister from all events
-
offAll
@NonBlocking() abstract void offAll()
Unsubscribes all listeners from all synchronization state events.
After calling this method, no listeners will receive any synchronizationstate event notifications until new listeners are registered.
-
-
-
-