Base class for building
- Jeanfrancois Arcand
The time, in seconds, the connection will stay open when waiting for new messages. This can be seen as the idle time.
Register a new
implementation. Register a transport only if you are planning to use
a different transport than the supported one.
Automatically reconnect in case the connection get closed. Default is true
reconnect reconnect in case the connection get closed. Default is true
The time in second, before the reconnection occurs. Default is 1 second
reconnectInSecond time in second, before the reconnection occurs. Default is 1 second
For streaming and long-polling, the server may not send the headers so the client never knows
if the connection succeeded or not. By default the library will wait for 2500 milliseconds before
considering the connection established.
waitBeforeUnlocking the time in millisecond
Set to true if your AsyncHttpClient is shared between clients.
by the library.
runtimeShared true if your AsyncHttpClient is shared between clients.
Allow an application that want to share
or configure it before it gets used
by the library.
runtimeShared to true if the runtime is shared between clients. If shared, the asyncHttpClient.close()
must be invoked by the application itself.
public abstract U build();
Reconnect after a network failure or when the server close the connection.
The delay, in second, before reconnecting.
- The delay, in second, before reconnecting.
The delay before considering the http connection has been fully processed by the server. By default, the library will wait 2 seconds before allowing the
to send message. Server side framework that aren't sending any data when suspending a connection may not be ready to fullfil request, hence some data may be lost.
Framework like Atmosphere, Socket.io, Cometd do send some "handshake data" allow the fire operation to be available fast without loosing ant data.
The time, in seconds to wait before closing the connection.
- The time, in seconds to wait before closing the connection.