|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vodafone360.people.service.transport.tcp.ConnectionTester
public class ConnectionTester
Field Summary | |
---|---|
private static int |
MAX_TEST_RESPONSE_WAIT_TIME_MILLIS
We wait at least 59 seconds for a response from the server. |
private java.io.DataInputStream |
mIs
|
private java.io.OutputStream |
mOs
|
Constructor Summary | |
---|---|
ConnectionTester(java.io.InputStream is,
java.io.OutputStream os)
|
Method Summary | |
---|---|
private byte[] |
getConnectionTestHessianPayload()
Returns a byte-array containing the data needed for sending a connection test to the RPG. |
private boolean |
receiveTestResponse()
Attempts to read any valid RPG response (even if it is not the requested TCP test response) |
boolean |
runTest()
Starts a test by sending a test message to the RPG, which the RPG should reply to. |
private boolean |
sendTestMessage()
Attempts to send a TCP test message (type 101) to the RPG. |
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_TEST_RESPONSE_WAIT_TIME_MILLIS
private java.io.DataInputStream mIs
private java.io.OutputStream mOs
Constructor Detail |
---|
public ConnectionTester(java.io.InputStream is, java.io.OutputStream os)
Method Detail |
---|
public boolean runTest()
private boolean sendTestMessage()
private boolean receiveTestResponse()
private byte[] getConnectionTestHessianPayload() throws java.io.IOException
java.io.IOException
- If there was an exception serializing the hash map to
a hessian byte array.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaDoc