com.vodafone360.people.engine.contactsync
Class UpdateNativeContacts

java.lang.Object
  extended by com.vodafone360.people.engine.contactsync.BaseSyncProcessor
      extended by com.vodafone360.people.engine.contactsync.UpdateNativeContacts

public class UpdateNativeContacts
extends BaseSyncProcessor

Processor handling the update of contacts in the Native database based on changes received during sync with People server.


Field Summary
private  NativeExporter mNativeExporter
          The NativeExporter instance that will take care of updating contacts on the native address book.
 
Fields inherited from class com.vodafone360.people.engine.contactsync.BaseSyncProcessor
mCallback, mDb, mFailureList
 
Constructor Summary
UpdateNativeContacts(IContactSyncCallback callback, DatabaseHelper db, ContentResolver cr)
          Processor constructor.
 
Method Summary
protected  void doCancel()
          Can be called anytime when the processor is active, to cancel the sync.
protected  void doStart()
          Implemented by all contact sync processors to initiate the sync.
 void onTimeoutEvent()
          Can be overriden by processors which are interested in timeout events.
 void processCommsResponse(ResponseQueue.Response resp)
          Called when a comms response is received from the server.
 
Methods inherited from class com.vodafone360.people.engine.contactsync.BaseSyncProcessor
cancel, complete, getEngine, markDbChanged, onComplete, setReqId, setSyncStatus, setTimeout, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mNativeExporter

private final NativeExporter mNativeExporter
The NativeExporter instance that will take care of updating contacts on the native address book.

Constructor Detail

UpdateNativeContacts

public UpdateNativeContacts(IContactSyncCallback callback,
                            DatabaseHelper db,
                            ContentResolver cr)
Processor constructor.

Parameters:
callback - Provides access to contact sync engine processor functions.
db - Database for reading contacts for sync and fetching change log
cr - ContentResolver for updating the native database.
Method Detail

doCancel

protected void doCancel()
Description copied from class: BaseSyncProcessor
Can be called anytime when the processor is active, to cancel the sync. Should not complete the sync here because the above method BaseSyncProcessor.cancel() will take care of this.

Specified by:
doCancel in class BaseSyncProcessor
See Also:
BaseSyncProcessor.doCancel()

doStart

protected void doStart()
Description copied from class: BaseSyncProcessor
Implemented by all contact sync processors to initiate the sync. Once called, the processor needs to call the IContactSyncCallback.onProcessorComplete(ServiceStatus, String, Object) method when the sync is finished (the usual way to do this is by calling BaseSyncProcessor.complete(ServiceStatus)).

Specified by:
doStart in class BaseSyncProcessor
See Also:
BaseSyncProcessor.doStart()

processCommsResponse

public void processCommsResponse(ResponseQueue.Response resp)
Description copied from class: BaseSyncProcessor
Called when a comms response is received from the server. This may be a response from a request issued by the processor or a push message.

Specified by:
processCommsResponse in class BaseSyncProcessor
Parameters:
resp - The response data
See Also:
BaseSyncProcessor#processCommsResponse(Response)

onTimeoutEvent

public void onTimeoutEvent()
Description copied from class: BaseSyncProcessor
Can be overriden by processors which are interested in timeout events. A processor will only receive timeout events while it is active.

Overrides:
onTimeoutEvent in class BaseSyncProcessor
See Also:
BaseSyncProcessor.onTimeoutEvent()


JavaDoc