@Immutable public class SocketSettings extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
SocketSettings.Builder
A builder for an instance of
SocketSettings . |
Modifier and Type | Field and Description |
---|---|
private long |
connectTimeoutMS |
private boolean |
keepAlive |
private long |
readTimeoutMS |
private int |
receiveBufferSize |
private int |
sendBufferSize |
Constructor and Description |
---|
SocketSettings(SocketSettings.Builder builder) |
Modifier and Type | Method and Description |
---|---|
static SocketSettings.Builder |
builder()
Gets a builder for an instance of
SocketSettings . |
boolean |
equals(java.lang.Object o) |
int |
getConnectTimeout(java.util.concurrent.TimeUnit timeUnit)
Gets the timeout for socket connect.
|
int |
getReadTimeout(java.util.concurrent.TimeUnit timeUnit)
Gets the timeout for socket reads.
|
int |
getReceiveBufferSize()
Gets the receive buffer size.
|
int |
getSendBufferSize()
Gets the send buffer size.
|
int |
hashCode() |
boolean |
isKeepAlive()
Deprecated.
configuring keep-alive has been deprecated. It now defaults to true and disabling it is not recommended.
|
java.lang.String |
toString() |
private final long connectTimeoutMS
private final long readTimeoutMS
private final boolean keepAlive
private final int receiveBufferSize
private final int sendBufferSize
SocketSettings(SocketSettings.Builder builder)
public static SocketSettings.Builder builder()
SocketSettings
.public int getConnectTimeout(java.util.concurrent.TimeUnit timeUnit)
timeUnit
- the time unit to get the timeout inpublic int getReadTimeout(java.util.concurrent.TimeUnit timeUnit)
timeUnit
- the time unit to get the timeout in@Deprecated public boolean isKeepAlive()
public int getReceiveBufferSize()
public int getSendBufferSize()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object