public class SocketOptionBuilder extends Object
Client Option
object as builder pattern.
Finally, you can get option object with call build()
method.Modifier | Constructor and Description |
---|---|
protected |
SocketOptionBuilder()
Construct new builder with default preferences.
|
protected |
SocketOptionBuilder(IO.Options options)
Construct this builder from specified option object.
|
protected SocketOptionBuilder()
protected SocketOptionBuilder(IO.Options options)
build()
method
is not equals with given option.
In other words, builder creates new option object
and copy all preferences from given option.options
- option object which to copy preferences. Null-ok.public static SocketOptionBuilder builder()
builder(IO.Options)
public static SocketOptionBuilder builder(IO.Options options)
build()
method
is not equals with given option.
In other words, builder creates new option object
and copy all preferences from given option.options
- option object which to copy preferencespublic SocketOptionBuilder setForceNew(boolean forceNew)
public SocketOptionBuilder setMultiplex(boolean multiplex)
public SocketOptionBuilder setReconnection(boolean reconnection)
public SocketOptionBuilder setReconnectionAttempts(int reconnectionAttempts)
public SocketOptionBuilder setReconnectionDelay(long reconnectionDelay)
public SocketOptionBuilder setReconnectionDelayMax(long reconnectionDelayMax)
public SocketOptionBuilder setRandomizationFactor(double randomizationFactor)
public SocketOptionBuilder setTimeout(long timeout)
public SocketOptionBuilder setTransports(String[] transports)
public SocketOptionBuilder setUpgrade(boolean upgrade)
public SocketOptionBuilder setRememberUpgrade(boolean rememberUpgrade)
public SocketOptionBuilder setHost(String host)
public SocketOptionBuilder setHostname(String hostname)
public SocketOptionBuilder setPort(int port)
public SocketOptionBuilder setPolicyPort(int policyPort)
public SocketOptionBuilder setQuery(String query)
public SocketOptionBuilder setSecure(boolean secure)
public SocketOptionBuilder setPath(String path)
public SocketOptionBuilder setAuth(Map<String,String> auth)
public SocketOptionBuilder setExtraHeaders(Map<String,List<String>> extraHeaders)
public IO.Options build()
IO.Options
object
from this builder.Copyright © 2022. All rights reserved.