SyncStreamObserver

Observer for all operations on a SyncStream. You should create your own subclass of StreamObserver and override functions you are interested in. Observer will receive callbacks for all operations on a SyncStream. To distinguish parallel streams of local operations your application could use local flow identifier. Callbacks in the observer will be called from a background thread. You will need to repost your work to UI thread if you do any UI-related operations in the callback.

Constructors

Link copied to clipboard
constructor()
Keep default constructor, you don't need to override it.

Functions

Link copied to clipboard
open fun dispose()
Link copied to clipboard
open fun onErrorOccurred(error: ErrorInfo)
This callback is invoked when a SyncStream operation has encountered a error in local request.
Link copied to clipboard
This callback is invoked when SyncStream has successfully published a message.
Link copied to clipboard
open fun onOpened(syncStream: SyncStream)
This callback is invoked when SyncStream object has been initialised and opened locally.
Link copied to clipboard
open fun onRemoved(context: EventContext)
This callback is invoked when the SyncStream has been removed.