public abstract class SyncDocumentObserver
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 |
|---|
SyncDocumentObserver()
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 SyncDocument operation has encountered an error.
|
void |
onOpened(SyncDocument doc)
This callback is invoked when SyncDocument object has been initialised and opened locally.
|
void |
onRemoved(EventContext context,
org.json.JSONObject previousData)
This callback is invoked when entire SyncDocument has been removed by a local request.
|
void |
onUpdated(EventContext context,
org.json.JSONObject data,
org.json.JSONObject previousData)
This callback is invoked when a SyncDocument has been modified by a local request.
|
public SyncDocumentObserver()
public void onOpened(SyncDocument doc)
doc - SyncDocument object that has been opened. This parameter you should take and use as
your initialised instance of a document.public void onRemoved(EventContext context, org.json.JSONObject previousData)
context - Context indicating if change was local or remote.previousData - Previous contents of the document.public void onUpdated(EventContext context, org.json.JSONObject data, org.json.JSONObject previousData)
context - Context indicating if change was local or remote.data - New contents of the document.previousData - Previous contents of the document.public void onErrorOccurred(ErrorInfo error)
error - Error description.public void dispose()