Package org.apache.hc.core5.http.io
Class SocketConfig.Builder
java.lang.Object
org.apache.hc.core5.http.io.SocketConfig.Builder
- Enclosing class:
SocketConfig
-
Method Summary
Modifier and TypeMethodDescriptionbuild()setBacklogSize(int backlogSize) Determines the maximum queue length for incoming connection indications (a request to connect) also known as server socket backlog.setRcvBufSize(int rcvBufSize) Determines the default value of theSocketOptions.SO_RCVBUFparameter for newly created sockets.setSndBufSize(int sndBufSize) Determines the default value of theSocketOptions.SO_SNDBUFparameter for newly created sockets.setSocksProxyAddress(SocketAddress socksProxyAddress) The address of the SOCKS proxy to use.setSoKeepAlive(boolean soKeepAlive) Determines the default value of theSocketOptions.SO_KEEPALIVEparameter for newly created sockets.setSoLinger(int soLinger, TimeUnit timeUnit) setSoLinger(TimeValue soLinger) Determines the default value of theSocketOptions.SO_LINGERparameter for newly created sockets.setSoReuseAddress(boolean soReuseAddress) Determines the default value of theSocketOptions.SO_REUSEADDRparameter for newly created sockets.setSoTimeout(int soTimeout, TimeUnit timeUnit) setSoTimeout(Timeout soTimeout) Determines the default socket timeout value for blocking I/O operations.setTcpKeepCount(int tcpKeepCount) Determines the maximum number of keepalive probes TCP should send before dropping the connection.setTcpKeepIdle(int tcpKeepIdle) Determines the time (in seconds) the connection needs to remain idle before TCP starts sending keepalive probes.setTcpKeepInterval(int tcpKeepInterval) Determines the time (in seconds) between individual keepalive probes.setTcpNoDelay(boolean tcpNoDelay) Determines the default value of theSocketOptions.TCP_NODELAYparameter for newly created sockets.
-
Method Details
-
setSoTimeout
- Returns:
- this instance.
- See Also:
-
setSoTimeout
Determines the default socket timeout value for blocking I/O operations.Default: 3 minutes
- Returns:
- this instance.
- See Also:
-
setSoReuseAddress
Determines the default value of theSocketOptions.SO_REUSEADDRparameter for newly created sockets.Default:
false- Returns:
- this instance.
- See Also:
-
setSoLinger
- Returns:
- this instance.
- See Also:
-
setSoLinger
Determines the default value of theSocketOptions.SO_LINGERparameter for newly created sockets.Default:
-1- Returns:
- this instance.
- See Also:
-
setSoKeepAlive
Determines the default value of theSocketOptions.SO_KEEPALIVEparameter for newly created sockets.Default:
true- Returns:
- this instance.
- See Also:
-
setTcpNoDelay
Determines the default value of theSocketOptions.TCP_NODELAYparameter for newly created sockets.Default:
false- Returns:
- this instance.
- See Also:
-
setSndBufSize
Determines the default value of theSocketOptions.SO_SNDBUFparameter for newly created sockets.Default:
0(system default)- Returns:
- this instance.
- Since:
- 4.4
- See Also:
-
setRcvBufSize
Determines the default value of theSocketOptions.SO_RCVBUFparameter for newly created sockets.Default:
0(system default)- Returns:
- this instance.
- Since:
- 4.4
- See Also:
-
setBacklogSize
Determines the maximum queue length for incoming connection indications (a request to connect) also known as server socket backlog.Default:
0(system default)- Returns:
- this instance.
- Since:
- 4.4
-
setTcpKeepIdle
Determines the time (in seconds) the connection needs to remain idle before TCP starts sending keepalive probes.Default:
5- Returns:
- this instance.
- Since:
- 5.3
-
setTcpKeepInterval
Determines the time (in seconds) between individual keepalive probes.Default:
5- Returns:
- this instance.
- Since:
- 5.3
-
setTcpKeepCount
Determines the maximum number of keepalive probes TCP should send before dropping the connection.Default:
3- Returns:
- this instance.
- Since:
- 5.3
-
setSocksProxyAddress
The address of the SOCKS proxy to use.- Returns:
- this instance.
-
build
-