|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public static interface WebConnectionClient.Environment
Abstraction of everything that depends on the runtime environment, like system clock, threading, or network. Easy to replace with mocks for unit tests.
| Method Summary | |
|---|---|
long |
currentTimeMillis()
Gets the current time in milliseconds |
void |
execute(WebConnectionClient client)
Controls the execution of the client's run-method in an independent thread. |
String |
fetch(String data)
Performs an http request to the server |
void |
sleep(long millis)
Holds the current thread for a certain amount of milliseconds |
| Method Detail |
|---|
String fetch(String data)
data - the data to be transmitted
void execute(WebConnectionClient client)
void sleep(long millis)
throws InterruptedException
InterruptedExceptionlong currentTimeMillis()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||