|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.atmosphere.wasync.OptionsBuilder<T>
T - public abstract class OptionsBuilder<T extends OptionsBuilder<T>>
Base class for building Options
| Field Summary | |
|---|---|
protected Class<T> |
derived
|
| Constructor Summary | |
|---|---|
protected |
OptionsBuilder(Class<T> derived)
|
| Method Summary | |
|---|---|
abstract Options |
build()
Build an Options |
T |
pauseBeforeReconnectInSeconds(int reconnectInSecond)
The time in second, before the reconnection occurs. |
boolean |
reconnect()
Reconnect after a network failure or when the server close the connection. |
T |
reconnect(boolean reconnect)
Automatically reconnect in case the connection get closed. |
int |
reconnectInSeconds()
The delay, in second, before reconnecting. |
T |
registerTransport(Transport transport)
Register a new Transport implementation. |
int |
requestTimeoutInSeconds()
The time, in seconds to wait before closing the connection. |
T |
requestTimeoutInSeconds(int requestTimeout)
The time, in seconds, the connection will stay open when waiting for new messages. |
com.ning.http.client.AsyncHttpClient |
runtime()
The AsyncHttpClient used to communicate with server. |
T |
runtime(com.ning.http.client.AsyncHttpClient client)
Allow an application that want to share AsyncHttpClient or configure it before it gets used
by the library. |
T |
runtime(com.ning.http.client.AsyncHttpClient client,
boolean runtimeShared)
Allow an application that want to share AsyncHttpClient or configure it before it gets used
by the library. |
boolean |
runtimeShared()
Return true is the AsyncHttpClient is shared between Socket. |
T |
runtimeShared(boolean runtimeShared)
Set to true if your AsyncHttpClient is shared between clients. |
Transport |
transport()
The used Transport |
long |
waitBeforeUnlocking()
When using long-polling and the Request, the delay before considering the long-polling connection has been fully processed by the server. |
T |
waitBeforeUnlocking(long waitBeforeUnlocking)
For streaming and long-polling, the server may not send the headers so the client never knows if the connection succeeded or not. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Class<T extends OptionsBuilder<T>> derived
| Constructor Detail |
|---|
protected OptionsBuilder(Class<T> derived)
| Method Detail |
|---|
public T requestTimeoutInSeconds(int requestTimeout)
public T registerTransport(Transport transport)
Transport implementation. Register a transport only if you are planning to use
a different transport than the supported one.
transport - Transport
public T reconnect(boolean reconnect)
reconnect - reconnect in case the connection get closed. Default is true
public T pauseBeforeReconnectInSeconds(int reconnectInSecond)
reconnectInSecond - time in second, before the reconnection occurs. Default is 1 second
public T waitBeforeUnlocking(long waitBeforeUnlocking)
waitBeforeUnlocking - the time in millisecond
public T runtimeShared(boolean runtimeShared)
runtimeShared - true if your AsyncHttpClient is shared between clients.
public T runtime(com.ning.http.client.AsyncHttpClient client)
AsyncHttpClient or configure it before it gets used
by the library.
client -
public T runtime(com.ning.http.client.AsyncHttpClient client,
boolean runtimeShared)
AsyncHttpClient or configure it before it gets used
by the library.
client - runtimeShared - to true if the runtime is shared between clients. If shared, the asyncHttpClient.close()
must be invoked by the application itself.
public abstract Options build()
Options
Optionspublic Transport transport()
Transport
Transportpublic boolean reconnect()
public int reconnectInSeconds()
public long waitBeforeUnlocking()
Request, the delay before considering the long-polling connection has been fully processed by the server. If you use
the AtmosphereClient, the server will send some handshake so this value is not needed.
public com.ning.http.client.AsyncHttpClient runtime()
AsyncHttpClient used to communicate with server.
AsyncHttpClient used to communicate with server.public boolean runtimeShared()
AsyncHttpClient is shared between Socket. Default is false. You need to invoke runtime(com.ning.http.client.AsyncHttpClient) to make
it shared.
AsyncHttpClientpublic int requestTimeoutInSeconds()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||