public abstract class SyncStreamObserver
extends java.lang.Object
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.| Constructor and Description |
|---|
SyncStreamObserver()
Keep default constructor, you don't need to override it.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
void |
onErrorOccurred(ErrorInfo error)
This callback is invoked when a SyncStream operation has encountered a error in local request.
|
void |
onMessagePublished(EventContext context,
SyncStream.Message message)
This callback is invoked when SyncStream has successfully published a message.
|
void |
onOpened(SyncStream syncStream)
This callback is invoked when SyncStream object has been initialised and opened locally.
|
void |
onRemoved(EventContext context)
This callback is invoked when the SyncStream has been removed.
|
public SyncStreamObserver()
public void onOpened(SyncStream syncStream)
syncStream - SyncStream object that has been opened. This parameter you should take and use as
your initialised instance of a stream.public void onRemoved(EventContext context)
context - Context indicating if change was local or remote.public void onMessagePublished(EventContext context, SyncStream.Message message)
context - Context indicating if change was local or remote.message - Snapshot of the received message.public void onErrorOccurred(ErrorInfo error)
error - Error description.public void dispose()