|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.appenginefan.toolkit.common.WebConnectionClient
public class WebConnectionClient
A client than can connect to a WebConnection. WebConnection objects can be used in App Engine applications to replace socket-based services. This class can be used as basis of communicating with such an end point on the web.
| Nested Class Summary | |
|---|---|
static interface |
WebConnectionClient.Environment
Abstraction of everything that depends on the runtime environment, like system clock, threading, or network. |
static interface |
WebConnectionClient.Receiver
Represents the receiving end of the communication |
| Constructor Summary | |
|---|---|
WebConnectionClient(URL url,
int silencePeriodInMillis,
int maxMessages)
Constructor. |
|
WebConnectionClient(WebConnectionClient.Environment env,
int silencePeriodInMillis,
int maxMessages)
Constructor |
|
| Method Summary | |
|---|---|
void |
close()
Signals a running executing thread to cease its work. |
void |
open(WebConnectionClient.Receiver receiver)
Starts a thread (through the executor) that connects to the server on a regular base |
void |
send(String message)
Enqueues an object for transmission. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WebConnectionClient(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
public WebConnectionClient(WebConnectionClient.Environment env,
int silencePeriodInMillis,
int maxMessages)
env - the Environment that this client runs insilencePeriodInMillis - 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 void close()
public void open(WebConnectionClient.Receiver receiver)
public void send(String message)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||