|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.vodafone360.people.engine.contactsync.BaseSyncProcessor
com.vodafone360.people.engine.contactsync.DownloadServerThumbnails_old
public class DownloadServerThumbnails_old
Handles download of Contact thumbnails from the People server. Thumbnails are downloaded via RPG external requests. Each contact retrieved from the server has a URL path to its thumbnail if one exists - an RPG external request is created for each thumbnail specifying the URL for the thumbnail. Internally the People client associates downloaded thumbnails with contacts via the local contact id.
| Field Summary | |
|---|---|
private static int |
MAX_THUMBS_FETCHED_PER_PAGE
Number of thumbnails to fetch in a single RPG request batch |
private int |
mBatchNoOfThumbs
Total no of thumbnails requested in the current batch |
private int |
mBatchThumbsReceived
Number of thumbnails received so far in the current batch |
private java.util.Map<java.lang.Integer,java.lang.Long> |
mContIds
Maps request IDs to local contact IDs so that when a response is received we can link the response with a contact. |
private int |
mThumbnailsFetchedCount
Number of thumbnails fetched so far. |
private int |
mTotalThumbnailsToFetch
Total number of thumbnails we need to fetch (mainly used for monitoring progress) |
| Fields inherited from class com.vodafone360.people.engine.contactsync.BaseSyncProcessor |
|---|
mCallback, mDb, mFailureList |
| Constructor Summary | |
|---|---|
DownloadServerThumbnails_old(IContactSyncCallback callback,
DatabaseHelper db,
Context context)
Processor constructer. |
|
| Method Summary | |
|---|---|
protected void |
doCancel()
Called by framework when the contact sync is cancelled. |
protected void |
doStart()
Called by framework to start the processor running. |
private void |
fetchNextPage()
Sends next batch of thumbnail requests to the server. |
private void |
increaseCount()
|
void |
processCommsResponse(ResponseQueue.Response resp)
Called by framework when a response to one of the thumbnail requests is received. |
| Methods inherited from class com.vodafone360.people.engine.contactsync.BaseSyncProcessor |
|---|
cancel, complete, getEngine, markDbChanged, onComplete, onTimeoutEvent, setReqId, setSyncStatus, setTimeout, start |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int MAX_THUMBS_FETCHED_PER_PAGE
private int mTotalThumbnailsToFetch
private int mThumbnailsFetchedCount
private int mBatchNoOfThumbs
private int mBatchThumbsReceived
private final java.util.Map<java.lang.Integer,java.lang.Long> mContIds
| Constructor Detail |
|---|
public DownloadServerThumbnails_old(IContactSyncCallback callback,
DatabaseHelper db,
Context context)
callback - Provides access to the contact sync engine processor
methods.db - Database for finding contacts that require thumbanils and
updating thumbnail state flag for each contact.context - Context for file operations| Method Detail |
|---|
protected void doStart()
doStart in class BaseSyncProcessorprotected void doCancel()
doCancel in class BaseSyncProcessorprivate void fetchNextPage()
public void processCommsResponse(ResponseQueue.Response resp)
processCommsResponse in class BaseSyncProcessorresp - The response dataprivate void increaseCount()
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
JavaDoc