|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.appenginefan.toolkit.common.ClientSocketSubstitute
public class ClientSocketSubstitute
A client-side subsitute for the common pattern of the blocking while(true) readline(); pattern
| Constructor Summary | |
|---|---|
ClientSocketSubstitute(URL url,
int silencePeriodInMillis,
int maxMessages)
Constructor. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the fake socket |
void |
println(String snippet)
Sends a snippet of data to the server. |
String |
readLine()
Gets the next line from the server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClientSocketSubstitute(URL url,
int silencePeriodInMillis,
int maxMessages)
url - the URL to connect tosilencePeriodInMillis - the time the thread should wait between each http callmaxMessages - the maximum amount of messages that should be transported in one http request| Method Detail |
|---|
public String readLine()
public void println(String snippet)
public void close()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||