@Experimental public abstract class AbstractSyncListener extends java.lang.Object implements SyncListener
SyncListener with empty implementations of all interface methods.
This is helpful if you only want to override some methods.| Constructor and Description |
|---|
AbstractSyncListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
onDisconnected()
Called when the client is disconnected from the sync server, e.g.
|
void |
onLoggedIn()
Called on a successful login.
|
void |
onLoginFailed(long syncLoginCode)
Called on a login failure.
|
void |
onSyncChanges(SyncChange[] syncChanges)
Called each time when data from sync was applied locally.
|
void |
onUpdatesCompleted()
Called each time a sync was "completed", in the sense that the client caught up with the current server state.
|
public void onLoggedIn()
SyncLoginListenerAt this point the connection to the sync destination was established and entered an operational state, in which data can be sent both ways.
onLoggedIn in interface SyncLoginListenerpublic void onLoginFailed(long syncLoginCode)
SyncLoginListenerSyncLoginCodes, but never SyncLoginCodes.OK.onLoginFailed in interface SyncLoginListenerpublic void onUpdatesCompleted()
SyncCompletedListeneronUpdatesCompleted in interface SyncCompletedListenerpublic void onSyncChanges(SyncChange[] syncChanges)
SyncChangeListeneronSyncChanges in interface SyncChangeListenersyncChanges - This contains the entity type (schema) ID, the removed IDs and the put IDs for that entity.public void onDisconnected()
SyncConnectionListener
Depending on the configuration, the sync client typically tries to reconnect automatically,
triggering a SyncLoginListener again.
onDisconnected in interface SyncConnectionListener