com.vodafone360.people.engine.contactsync
Interface IContactSyncCallback

All Known Implementing Classes:
ContactSyncEngine

public interface IContactSyncCallback

Observer interface used within Contact sync engine to allow processor to report status back to the main Contact sync engine.


Method Summary
 BaseEngine getEngine()
          Called by processor to fetch the contact sync engine (needed for sending requests to the server).
 void onDatabaseChanged()
          Called by processor when a change is made to the local database.
 void onProcessorComplete(ServiceStatus status, java.lang.String failureList, java.lang.Object data)
          Called by processor when it has finished running.
 void setActiveRequestId(int reqId)
          Used when a processor sends a request to the server to notify the BaseEngine class of the request ID.
 void setSyncStatus(SyncStatus syncStatus)
          Used by processors to provide an indication of their current progress.
 void setTimeout(long timeout)
          Used by processors to set a timeout.
 

Method Detail

onProcessorComplete

void onProcessorComplete(ServiceStatus status,
                         java.lang.String failureList,
                         java.lang.Object data)
Called by processor when it has finished running.

Parameters:
status - SUCCESS or an error code from the processor
failureList - A description of any errors that occurred during the sync or an empty string.
data - Allows processors to send custom data to the contact sync engine.

onDatabaseChanged

void onDatabaseChanged()
Called by processor when a change is made to the local database.


getEngine

BaseEngine getEngine()
Called by processor to fetch the contact sync engine (needed for sending requests to the server).

Returns:
The contact sync engine reference.

setTimeout

void setTimeout(long timeout)
Used by processors to set a timeout. The BaseSyncProcessor.onTimeoutEvent() function will be called by the contact sync engine when the timeout event occurs.

Parameters:
timeout - Timeout based on current time in milliseconds.

setSyncStatus

void setSyncStatus(SyncStatus syncStatus)
Used by processors to provide an indication of their current progress.

Parameters:
SyncStatus - Status of the processor, must not be NULL.
Throws:
java.security.InvalidParameterException - when SyncStatus is NULL.

setActiveRequestId

void setActiveRequestId(int reqId)
Used when a processor sends a request to the server to notify the BaseEngine class of the request ID. If used, the BaseEngine will only send responses which match the request.

Parameters:
reqId - Request ID received from one of the API functions.


JavaDoc