|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vodafone360.people.service.io.ResponseQueue
public class ResponseQueue
Queue of responses received from server. These may be either responses to requests issued by the People client or unsolicited ('Push') messages. The content of these Responses will have already been decoded by the DecoderThread and converted to data-types understood by the People Client.
Nested Class Summary | |
---|---|
static class |
ResponseQueue.Response
Class encapsulating a decoded response from the server A Response contains; a request id which should match a request id from a request issued by the People Client (responses to non-RPG requests or non-solicited messages will not have a request id), the request data, a list of decoded BaseDataTypes generated from the response content and an engine id informing the framework which engine the response should be routed to. |
private static class |
ResponseQueue.ResponseQueueHolder
Use Initialization on demand holder pattern |
Field Summary | |
---|---|
private EngineManager |
mEngMgr
The engine manager holding the various engines to cross check where responses belong to. |
private java.util.List<ResponseQueue.Response> |
mResponses
The list of responses held by this queue. |
Constructor Summary | |
---|---|
protected |
ResponseQueue()
Protected constructor to highlight the singleton nature of this class. |
Method Summary | |
---|---|
void |
addToResponseQueue(java.lang.Integer reqId,
java.util.List<BaseDataType> data,
EngineManager.EngineId source)
Adds a response item to the queue. |
static ResponseQueue |
getInstance()
Gets an instance of the ResponseQueue as part of the singleton pattern. |
ResponseQueue.Response |
getNextResponse(EngineManager.EngineId source)
Retrieves the next response in the list if there is one. |
private int |
responseCount()
Get number of items currently in the response queue. |
protected boolean |
responseExists(int reqId)
Test if we have response for the specified request id. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final java.util.List<ResponseQueue.Response> mResponses
private EngineManager mEngMgr
Constructor Detail |
---|
protected ResponseQueue()
Method Detail |
---|
public static ResponseQueue getInstance()
public void addToResponseQueue(java.lang.Integer reqId, java.util.List<BaseDataType> data, EngineManager.EngineId source)
reqId
- The request ID to add the response for.data
- The response data to add to the queue.source
- The corresponding engine that fired off the request for the
response.public ResponseQueue.Response getNextResponse(EngineManager.EngineId source)
source
- The originating engine id that requested this response.
private int responseCount()
protected boolean responseExists(int reqId)
reqId
- Request ID.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaDoc