|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vodafone360.people.service.transport.DecoderThread
public class DecoderThread
Responsible for decoding 'raw' Hessian response data. Data is decoded into specific data types and added to the response queue. The Response queue stores request id (except for unsolicited Push msgs) and a source/destination engine to allow appropriate routing.
Nested Class Summary | |
---|---|
static class |
DecoderThread.RawResponse
Container class for raw undecoded response data. |
Field Summary | |
---|---|
private java.util.List<DecoderThread.RawResponse> |
mResponses
|
private ResponseQueue |
mRespQueue
|
private boolean |
mRunning
|
private static java.lang.String |
THREAD_NAME
|
private static long |
THREAD_SLEEP_TIME
|
Constructor Summary | |
---|---|
DecoderThread()
|
Method Summary | |
---|---|
void |
addToDecode(DecoderThread.RawResponse resp)
Add raw response to decoding queue |
boolean |
getIsRunning()
|
void |
handleResponse(byte[] response)
Looks at the response and adds it to the necessary decoder. |
void |
run()
Thread's run function If the decoding queue contains any entries we decode the first response and add the decoded data to the response queue. |
protected void |
startThread()
Start decoder thread |
protected void |
stopThread()
Stop decoder thread |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String THREAD_NAME
private static final long THREAD_SLEEP_TIME
private volatile boolean mRunning
private final java.util.List<DecoderThread.RawResponse> mResponses
private ResponseQueue mRespQueue
Constructor Detail |
---|
public DecoderThread()
Method Detail |
---|
protected void startThread()
protected void stopThread()
public void addToDecode(DecoderThread.RawResponse resp)
resp
- raw datapublic boolean getIsRunning()
public void run()
run
in interface java.lang.Runnable
public void handleResponse(byte[] response) throws java.lang.Exception
Looks at the response and adds it to the necessary decoder.
TODO: this method should be worked on. The decoder should take care of deciding which methods are decoded in which way.
response
- The server response to decode.
java.lang.Exception
- Thrown if the returned status line was null or if the
response was null.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaDoc