@Immutable public class SocketConfig extends Object implements Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
SocketConfig.Builder |
Modifier and Type | Field and Description |
---|---|
static SocketConfig |
DEFAULT |
Modifier and Type | Method and Description |
---|---|
protected SocketConfig |
clone() |
static SocketConfig.Builder |
copy(SocketConfig config) |
static SocketConfig.Builder |
custom() |
int |
getSoLinger()
Determines the default value of the
SocketOptions.SO_LINGER parameter
for newly created sockets. |
int |
getSoTimeout()
Determines the default socket timeout value for non-blocking I/O operations.
|
boolean |
isSoKeepAlive()
Determines the default value of the
SocketOptions.SO_KEEPALIVE parameter
for newly created sockets. |
boolean |
isSoReuseAddress()
Determines the default value of the
SocketOptions.SO_REUSEADDR parameter
for newly created sockets. |
boolean |
isTcpNoDelay()
Determines the default value of the
SocketOptions.TCP_NODELAY parameter
for newly created sockets. |
String |
toString() |
public static final SocketConfig DEFAULT
public int getSoTimeout()
0
(no timeout)SocketOptions.SO_TIMEOUT
public boolean isSoReuseAddress()
SocketOptions.SO_REUSEADDR
parameter
for newly created sockets.
Default: false
SocketOptions.SO_REUSEADDR
public int getSoLinger()
SocketOptions.SO_LINGER
parameter
for newly created sockets.
Default: -1
SocketOptions.SO_LINGER
public boolean isSoKeepAlive()
SocketOptions.SO_KEEPALIVE
parameter
for newly created sockets.
Default: -1
SocketOptions.SO_KEEPALIVE
public boolean isTcpNoDelay()
SocketOptions.TCP_NODELAY
parameter
for newly created sockets.
Default: false
SocketOptions.TCP_NODELAY
protected SocketConfig clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public static SocketConfig.Builder custom()
public static SocketConfig.Builder copy(SocketConfig config)
Copyright © 2005-2014 The Apache Software Foundation. All Rights Reserved.