public static class SocketConfig.Builder extends Object
| Modifier and Type | Method and Description | 
|---|---|
| SocketConfig | build() | 
| SocketConfig.Builder | setBacklogSize(int backlogSize)Determines the maximum queue length for incoming connection indications
 (a request to connect) also known as server socket backlog. | 
| SocketConfig.Builder | setRcvBufSize(int rcvBufSize)Determines the default value of the  SocketOptions.SO_RCVBUFparameter
 for newly created sockets. | 
| SocketConfig.Builder | setSndBufSize(int sndBufSize)Determines the default value of the  SocketOptions.SO_SNDBUFparameter
 for newly created sockets. | 
| SocketConfig.Builder | setSocksProxyAddress(SocketAddress socksProxyAddress)The address of the SOCKS proxy to use. | 
| SocketConfig.Builder | setSoKeepAlive(boolean soKeepAlive)Determines the default value of the  SocketOptions.SO_KEEPALIVEparameter
 for newly created sockets. | 
| SocketConfig.Builder | setSoLinger(int soLinger,
           TimeUnit timeUnit) | 
| SocketConfig.Builder | setSoLinger(TimeValue soLinger)Determines the default value of the  SocketOptions.SO_LINGERparameter
 for newly created sockets. | 
| SocketConfig.Builder | setSoReuseAddress(boolean soReuseAddress)Determines the default value of the  SocketOptions.SO_REUSEADDRparameter
 for newly created sockets. | 
| SocketConfig.Builder | setSoTimeout(int soTimeout,
            TimeUnit timeUnit) | 
| SocketConfig.Builder | setSoTimeout(Timeout soTimeout)Determines the default socket timeout value for blocking I/O operations. | 
| SocketConfig.Builder | setTcpKeepCount(int tcpKeepCount)Determines the maximum number of keepalive probes TCP should send before dropping the connection. | 
| SocketConfig.Builder | setTcpKeepIdle(int tcpKeepIdle)Determines the time (in seconds) the connection needs to remain idle before TCP starts
 sending keepalive probes. | 
| SocketConfig.Builder | setTcpKeepInterval(int tcpKeepInterval)Determines the time (in seconds) between individual keepalive probes. | 
| SocketConfig.Builder | setTcpNoDelay(boolean tcpNoDelay)Determines the default value of the  SocketOptions.TCP_NODELAYparameter
 for newly created sockets. | 
public SocketConfig.Builder setSoTimeout(int soTimeout, TimeUnit timeUnit)
setSoTimeout(Timeout)public SocketConfig.Builder setSoTimeout(Timeout soTimeout)
Default: 3 minutes
SocketOptions.SO_TIMEOUTpublic SocketConfig.Builder setSoReuseAddress(boolean soReuseAddress)
SocketOptions.SO_REUSEADDR parameter
 for newly created sockets.
 
 Default: false
 
SocketOptions.SO_REUSEADDRpublic SocketConfig.Builder setSoLinger(int soLinger, TimeUnit timeUnit)
setSoLinger(TimeValue)public SocketConfig.Builder setSoLinger(TimeValue soLinger)
SocketOptions.SO_LINGER parameter
 for newly created sockets.
 
 Default: -1
 
SocketOptions.SO_LINGERpublic SocketConfig.Builder setSoKeepAlive(boolean soKeepAlive)
SocketOptions.SO_KEEPALIVE parameter
 for newly created sockets.
 
 Default: false
 
SocketOptions.SO_KEEPALIVEpublic SocketConfig.Builder setTcpNoDelay(boolean tcpNoDelay)
SocketOptions.TCP_NODELAY parameter
 for newly created sockets.
 
 Default: false
 
SocketOptions.TCP_NODELAYpublic SocketConfig.Builder setSndBufSize(int sndBufSize)
SocketOptions.SO_SNDBUF parameter
 for newly created sockets.
 
 Default: 0 (system default)
 
SocketOptions.SO_SNDBUFpublic SocketConfig.Builder setRcvBufSize(int rcvBufSize)
SocketOptions.SO_RCVBUF parameter
 for newly created sockets.
 
 Default: 0 (system default)
 
SocketOptions.SO_RCVBUFpublic SocketConfig.Builder setBacklogSize(int backlogSize)
 Default: 0 (system default)
 
public SocketConfig.Builder setTcpKeepIdle(int tcpKeepIdle)
 Default: -1 (system default)
 
public SocketConfig.Builder setTcpKeepInterval(int tcpKeepInterval)
 Default: -1 (system default)
 
public SocketConfig.Builder setTcpKeepCount(int tcpKeepCount)
 Default: -1 (system default)
 
public SocketConfig.Builder setSocksProxyAddress(SocketAddress socksProxyAddress)
public SocketConfig build()
Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.