|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
SyncBoInDelta is used to apply SyncBo delta data from backend to
client. The SyncBoInDelta could may be a delta data from
either the backend or other devices, or a response to the previously
uploaded SyncBoOutDelta from the client, which can be distinguisehd
by the SyncReply information included within the SyncBoInDelta.
SmartSync uses Notifier/Observer design pattern for applications to access
inbox and outbox. By using the InboxNotifier with SyncBoInDeltaObserver,
applications has a read-access to the SyncBoInDelta instance passed during
the notification.
Example:
To check if a error has occured.
Class MySynBoInDelta implements SyncBoInDeltaObserver{
// Return the SyncBo desc which the application should monitor
public SyncBoDescriptor[] observeSyncBoTypes(){
SyncBoDescriptor[] syncDescs = new SyncBoDescriptor[1];
syncDescs[0]= syncBoDesc2Observe;
}
//Implement the action
public SyncBoInDelta receivedSyncBoInDelta(SyncBoInDelta syncBoInDelta){
if(syncBoInDelta.getSyncReply().getType()==SyncReplyType.ERROR){
// error recovery
}
}
}
// Register the observer.
SmartSyncRuntime.getInboxNotifier().registerSyncBoInDeltaObserver(MySynBoInDelta);
SyncReply,
InboxNotifier,
SyncBoInDeltaObserver,
SyncBoChange| Method Summary | |
java.lang.String |
getPostStateId()
Returns the postStateId attribute of the SyncBoInDelta. |
SyncReply |
getSyncReply()
Returns the SyncReply info of the SyncBoInDelta. |
java.lang.String |
getTimeStamp()
Gets the TimeStamp attribute. |
| Methods inherited from interface com.sap.ip.me.api.smartsync.SyncBoChange |
getAction, getRowChanges, getSyncBoDescriptor, getSyncKey |
| Method Detail |
public SyncReply getSyncReply()
SyncReplypublic java.lang.String getTimeStamp()
getTimeStamp in interface SyncBoChangepublic java.lang.String getPostStateId()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||