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