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 int
private int
private int
private SocketAddress
private boolean
private TimeValue
private boolean
private Timeout
private 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_RCVBUF
parameter for newly created sockets.setSndBufSize
(int sndBufSize) Determines the default value of theSocketOptions.SO_SNDBUF
parameter 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_KEEPALIVE
parameter for newly created sockets.setSoLinger
(int soLinger, TimeUnit timeUnit) setSoLinger
(TimeValue soLinger) Determines the default value of theSocketOptions.SO_LINGER
parameter for newly created sockets.setSoReuseAddress
(boolean soReuseAddress) Determines the default value of theSocketOptions.SO_REUSEADDR
parameter 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_NODELAY
parameter 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_REUSEADDR
parameter for newly created sockets.Default:
false
- Returns:
- the default value of the
SocketOptions.SO_REUSEADDR
parameter. - See Also:
-
setSoLinger
- See Also:
-
setSoLinger
Determines the default value of theSocketOptions.SO_LINGER
parameter for newly created sockets.Default:
-1
- Returns:
- the default value of the
SocketOptions.SO_LINGER
parameter. - See Also:
-
setSoKeepAlive
Determines the default value of theSocketOptions.SO_KEEPALIVE
parameter for newly created sockets.Default:
false
- Returns:
- the default value of the
SocketOptions.SO_KEEPALIVE
parameter. - See Also:
-
setTcpNoDelay
Determines the default value of theSocketOptions.TCP_NODELAY
parameter for newly created sockets.Default:
false
- Returns:
- the default value of the
SocketOptions.TCP_NODELAY
parameter. - See Also:
-
setSndBufSize
Determines the default value of theSocketOptions.SO_SNDBUF
parameter for newly created sockets.Default:
0
(system default)- Returns:
- the default value of the
SocketOptions.SO_SNDBUF
parameter. - Since:
- 4.4
- See Also:
-
setRcvBufSize
Determines the default value of theSocketOptions.SO_RCVBUF
parameter for newly created sockets.Default:
0
(system default)- Returns:
- the default value of the
SocketOptions.SO_RCVBUF
parameter. - 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
-