public class DefaultOptions extends Object implements Options
Options
Modifier and Type | Field and Description |
---|---|
protected OptionsBuilder |
b |
Constructor and Description |
---|
DefaultOptions(OptionsBuilder b) |
Modifier and Type | Method and Description |
---|---|
boolean |
binary()
Return true if binary data, instead of String/Text message, are sent back by the server.
|
boolean |
reconnect()
Reconnect after a network failure or when the server close the connection.
|
int |
reconnectAttempts()
Maximum reconnection attempts that will run in the interval defined by
#reconnectInSeconds |
int |
reconnectTimeoutInMilliseconds()
The delay, in milliseconds, before reconnecting.
|
int |
requestTimeoutInSeconds()
The time, in seconds to wait before closing the connection.
|
com.ning.http.client.AsyncHttpClient |
runtime()
The
AsyncHttpClient used to communicate with server. |
void |
runtime(com.ning.http.client.AsyncHttpClient client)
Set the
AsyncHttpClient . |
boolean |
runtimeShared()
Return true is the
AsyncHttpClient is shared between Socket . |
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. |
protected final OptionsBuilder b
public DefaultOptions(OptionsBuilder b)
public boolean reconnect()
public int reconnectTimeoutInMilliseconds()
reconnectTimeoutInMilliseconds
in interface Options
public int reconnectAttempts()
#reconnectInSeconds
reconnectAttempts
in interface Options
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.waitBeforeUnlocking
in interface Options
public com.ning.http.client.AsyncHttpClient runtime()
AsyncHttpClient
used to communicate with server.public void runtime(com.ning.http.client.AsyncHttpClient client)
Options
AsyncHttpClient
.public boolean runtimeShared()
AsyncHttpClient
is shared between Socket
. Default is false. You need to invoke Options.runtime(com.ning.http.client.AsyncHttpClient)
to make
it shared.runtimeShared
in interface Options
AsyncHttpClient
public int requestTimeoutInSeconds()
requestTimeoutInSeconds
in interface Options
Copyright © 2015. All Rights Reserved.