|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.vodafone360.people.engine.BaseEngine
com.vodafone360.people.engine.groups.GroupsEngine
public class GroupsEngine
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.vodafone360.people.engine.BaseEngine |
|---|
BaseEngine.IEngineEventCallback |
| Field Summary | |
|---|---|
private static int |
MAX_DOWN_PAGE_SIZE
Max number of groups to fetch from server in one request. |
private DatabaseHelper |
mDb
|
private int |
mNoOfGroupsFetched
Total number of groups fetched from server. |
private int |
mPageNo
Current page number being fetched. |
| Fields inherited from class com.vodafone360.people.engine.BaseEngine |
|---|
mActiveUiRequest, mCurrentTimeout, mEngineId, mEventCallback |
| Constructor Summary | |
|---|---|
GroupsEngine(Context context,
BaseEngine.IEngineEventCallback eventCallback,
DatabaseHelper db)
|
|
| Method Summary | |
|---|---|
void |
addUiGetGroupsRequest()
Adds a request to get groups from the backend that are associated with the server contacts. |
long |
getNextRunTime()
Return the absolute time in milliseconds when the engine needs to run (based on System.currentTimeMillis). |
void |
onCreate()
This will be called immediately after creation. |
void |
onDestroy()
This will be called just before the engine is shutdown. |
protected void |
onRequestComplete()
This function must be implemented in the derived engine implementation. |
protected void |
onTimeoutEvent()
The derived engine implementation must call the processTimeout() function (normally from within the run() implementation), otherwise this will not be called. |
protected void |
processCommsResponse(ResponseQueue.Response resp)
The derived engine implementation must call the processCommsInQueue() function (normally from within the run() implementation), otherwise this will not be called. |
protected void |
processUiRequest(ServiceUiRequest requestId,
java.lang.Object data)
The derived engine implementation must call the processUiQueue() function (normally from within the run() implementation), otherwise this will not be called. |
private void |
requestFirstGroupsPage()
Requests the first group page. |
private void |
requestNextGroupsPage()
Requests the next page of groups from the server. |
void |
run()
Do some work but anything that takes longer than 1 second must be broken up. |
| Methods inherited from class com.vodafone360.people.engine.BaseEngine |
|---|
addUiRequestToQueue, clearTimeout, completeUiRequest, completeUiRequest, deactivateEngine, emptyUiRequestQueue, engineId, genericHandleResponseType, getCurrentTimeout, isCommsResponseOutstanding, isDeactivated, isUiRequestOutstanding, onCommsInMessage, onReset, processCommsInQueue, processTimeout, processUiQueue, setReqId, setTimeout |
| 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_DOWN_PAGE_SIZE
private int mPageNo
private int mNoOfGroupsFetched
private DatabaseHelper mDb
| Constructor Detail |
|---|
public GroupsEngine(Context context,
BaseEngine.IEngineEventCallback eventCallback,
DatabaseHelper db)
| Method Detail |
|---|
public long getNextRunTime()
BaseEngine
getNextRunTime in class BaseEnginepublic void onCreate()
BaseEngine
onCreate in class BaseEnginepublic void onDestroy()
BaseEngine
onDestroy in class BaseEngineprotected void onRequestComplete()
BaseEngine
onRequestComplete in class BaseEngineprotected void onTimeoutEvent()
BaseEngine
onTimeoutEvent in class BaseEngineprotected void processCommsResponse(ResponseQueue.Response resp)
BaseEngine
processCommsResponse in class BaseEngineresp - The comms response
protected void processUiRequest(ServiceUiRequest requestId,
java.lang.Object data)
BaseEngine
processUiRequest in class BaseEnginerequestId - The UI request IDdata - Request data (object type is request specific)public void run()
BaseEngine
run in class BaseEnginepublic void addUiGetGroupsRequest()
private void requestFirstGroupsPage()
private void requestNextGroupsPage()
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
JavaDoc