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 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 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.

reconnectAttempts

int reconnectAttempts()
Maximum reconnection attempts that will run in the interval defined by reconnectInSeconds()

Returns:
the number of maximum reconnection attempts

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.

binary

boolean binary()
Return true if binary data, instead of String/Text message, are sent back by the server. Default is false.

Returns:
true if binary data,


Copyright © 2014. All Rights Reserved.