Document Listener
- Kotlin
- Java
SyncDocument is an interface that defines the callback function called when an event occurs.
Summary
| Public methods | |
|---|---|
| Unit | Handle when the data changes |
| Unit | Handle when a data synchronization error occurs |
Public methods
onDocumentChanged()
fun onDocumentChanged(document: SyncDocument, fromRemote: Boolean)
This is called when data changes occur, including data of child nodes.
| Parameters | |
|---|---|
| SyncDocument | The SyncDocument object that the event occurred on |
Boolean | Whether there was a remote change |
onDocumentError()
fun onDocumentError(document: SyncDocument, e: SyncError)
This is called when data changes occur, including data of child nodes.
| Parameters | |
|---|---|
| SyncDocument | The SyncDocument object where the error occurred |
| SyncError | Detailed error description associated with SyncError |
SyncDocument is an interface defining the callback function that is called when events related to it occur.
Summary
| Public methods | |
|---|---|
| void | Handle when data changes |
| void | Handle when a data synchronization error occurs |
Public methods
onDocumentChanged()
void onDocumentChanged(@NonNull SyncDocument document, boolean fromRemote)
It is called when data changes, including data of child nodes.
| Parameters | |
|---|---|
| SyncDocument | The SyncDocument object where the event occurs |
boolean | Whether the change is remote |
onDocumentError()
void onDocumentError(@NonNull SyncDocument document, @NonNull SyncError e)
It is called when data changes, including data of child nodes.
| Parameters | |
|---|---|
| SyncDocument | The SyncDocument object where the error occurs |
| SyncError | Detailed error information described in SyncError |
| Parameters | |
|---|---|
| SyncDocument | SyncDocument |