org.atmosphere.wasync
Interface Options

All Known Implementing Classes:
DefaultOptions, SerializedOptions

public interface Options

Configure the underlying WebSocket/HTTP client.

Author:
Jeanfrancois Arcand

Method Summary
 boolean reconnect()
          Reconnect after a network failure or when the server close the connection.
 int reconnectInSeconds()
          The delay, in second, 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.
 

Method Detail

transport

Transport transport()
The used Transport

Returns:
Transport

reconnect

boolean reconnect()
Reconnect after a network failure or when the server close the connection.

Returns:
reconnect

reconnectInSeconds

int reconnectInSeconds()
The delay, in second, before reconnecting.

Returns:
The delay, in second, before reconnecting.

waitBeforeUnlocking

long waitBeforeUnlocking()
When using long-polling and the 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.

Returns:
the delay before considering the long-polling connection has been fully processed

runtime

com.ning.http.client.AsyncHttpClient runtime()
The AsyncHttpClient used to communicate with server.

Returns:
AsyncHttpClient used to communicate with server.

runtime

void runtime(com.ning.http.client.AsyncHttpClient client)
Set the AsyncHttpClient.

Parameters:
client - the AsyncHttpClient

runtimeShared

boolean runtimeShared()
Return true is the AsyncHttpClient is shared between Socket. Default is false. You need to invoke runtime(com.ning.http.client.AsyncHttpClient) to make it shared.

Returns:
true is the AsyncHttpClient

requestTimeoutInSeconds

int requestTimeoutInSeconds()
The time, in seconds to wait before closing the connection.

Returns:
The time, in seconds to wait before closing the connection.


Copyright © 2013. All Rights Reserved.