org.atmosphere.wasync
Class Options.OptionsBuilder
java.lang.Object
org.atmosphere.wasync.Options.OptionsBuilder
- Enclosing class:
- Options
public static final class Options.OptionsBuilder
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
waitBeforeUnlocking
public long waitBeforeUnlocking
Options.OptionsBuilder
public Options.OptionsBuilder()
registerTransport
public Options.OptionsBuilder registerTransport(Transport transport)
- Register a new
Transport implementation. Register a transport only if you are planning to use
a different transport than the supported one.
- Parameters:
transport - Transport
- Returns:
- this
reconnect
public Options.OptionsBuilder reconnect(boolean reconnect)
- Automatically reconnect in case the connection get closed. Default is true
- Parameters:
reconnect - reconnect in case the connection get closed. Default is true
- Returns:
- this
pauseBeforeReconnectInSeconds
public Options.OptionsBuilder pauseBeforeReconnectInSeconds(int reconnectInSecond)
- The time in second, before the reconnection occurs. Default is 1 second
- Parameters:
reconnectInSecond - time in second, before the reconnection occurs. Default is 1 second
- Returns:
- this
waitBeforeUnlocking
public Options.OptionsBuilder 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. By defaul the library will wait for 2500 milliseconds before
considering the connection established.
- Parameters:
waitBeforeUnlocking - the time in millisecond
- Returns:
- this
build
public Options build()
Copyright © 2012. All Rights Reserved.