Package org.apache.hc.core5.http.io
Class SocketConfig.Builder
java.lang.Object
org.apache.hc.core5.http.io.SocketConfig.Builder
- Enclosing class:
SocketConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate intprivate intprivate SocketAddressprivate booleanprivate TimeValueprivate booleanprivate Timeoutprivate boolean -
Constructor Summary
Constructors -
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.setTcpNoDelay(boolean tcpNoDelay) Determines the default value of theSocketOptions.TCP_NODELAYparameter for newly created sockets.
-
Field Details
-
soTimeout
-
soReuseAddress
private boolean soReuseAddress -
soLinger
-
soKeepAlive
private boolean soKeepAlive -
tcpNoDelay
private boolean tcpNoDelay -
sndBufSize
private int sndBufSize -
rcvBufSize
private int rcvBufSize -
backlogSize
private int backlogSize -
socksProxyAddress
-
-
Constructor Details
-
Builder
Builder()
-
-
Method Details
-
setSoTimeout
- See Also:
-
setSoTimeout
Determines the default socket timeout value for blocking I/O operations.Default: 3 minutes
- Returns:
- the default socket timeout value for blocking I/O operations.
- See Also:
-
setSoReuseAddress
Determines the default value of theSocketOptions.SO_REUSEADDRparameter for newly created sockets.Default:
false- Returns:
- the default value of the
SocketOptions.SO_REUSEADDRparameter. - See Also:
-
setSoLinger
- See Also:
-
setSoLinger
Determines the default value of theSocketOptions.SO_LINGERparameter for newly created sockets.Default:
-1- Returns:
- the default value of the
SocketOptions.SO_LINGERparameter. - See Also:
-
setSoKeepAlive
Determines the default value of theSocketOptions.SO_KEEPALIVEparameter for newly created sockets.Default:
false- Returns:
- the default value of the
SocketOptions.SO_KEEPALIVEparameter. - See Also:
-
setTcpNoDelay
Determines the default value of theSocketOptions.TCP_NODELAYparameter for newly created sockets.Default:
false- Returns:
- the default value of the
SocketOptions.TCP_NODELAYparameter. - See Also:
-
setSndBufSize
Determines the default value of theSocketOptions.SO_SNDBUFparameter for newly created sockets.Default:
0(system default)- Returns:
- the default value of the
SocketOptions.SO_SNDBUFparameter. - Since:
- 4.4
- See Also:
-
setRcvBufSize
Determines the default value of theSocketOptions.SO_RCVBUFparameter for newly created sockets.Default:
0(system default)- Returns:
- the default value of the
SocketOptions.SO_RCVBUFparameter. - 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:
- the maximum queue length for incoming connection indications
- Since:
- 4.4
-
setSocksProxyAddress
The address of the SOCKS proxy to use. -
build
-