Class DittoPresenceObserver
java.lang.Object
com.ditto.java.DittoPresenceObserver
- All Implemented Interfaces:
Closeable,AutoCloseable
A token representing an active presence graph observation.
This observer is returned by DittoPresence.observe(DittoPresence.PresenceGraphChangedListener)
when you register a listener for presence graph changes. Call close() to stop observing
and unsubscribe the handler.
This class implements Closeable, allowing it to be used with try-with-resources
statements for automatic cleanup.
- See Also:
-
Method Summary
-
Method Details
-
close
Stops observing presence graph changes and unsubscribes the listener.
After calling this method, the associated listener will no longer receive presence graph change notifications. This method is idempotent and can be called multiple times safely.
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException- if an I/O error occurs during cleanup.
-
hashCode
-
equals
-