public class TransportOptions extends Object implements Cloneable
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_CONNECT_TIMEOUT |
static int |
DEFAULT_RECEIVE_BUFFER_SIZE |
static int |
DEFAULT_SEND_BUFFER_SIZE |
static int |
DEFAULT_SO_LINGER |
static int |
DEFAULT_SO_TIMEOUT |
static boolean |
DEFAULT_TCP_KEEP_ALIVE |
static boolean |
DEFAULT_TCP_NO_DELAY |
static int |
DEFAULT_TCP_PORT |
static int |
DEFAULT_TRAFFIC_CLASS |
static TransportOptions |
INSTANCE |
Constructor and Description |
---|
TransportOptions() |
Modifier and Type | Method and Description |
---|---|
TransportOptions |
clone() |
protected TransportOptions |
copyOptions(TransportOptions copy) |
int |
getConnectTimeout() |
int |
getDefaultTcpPort() |
int |
getReceiveBufferSize() |
int |
getSendBufferSize() |
int |
getSoLinger() |
int |
getSoTimeout() |
int |
getTrafficClass() |
boolean |
isSSL() |
boolean |
isTcpKeepAlive() |
boolean |
isTcpNoDelay() |
void |
setConnectTimeout(int connectTimeout) |
void |
setDefaultTcpPort(int defaultTcpPort) |
void |
setReceiveBufferSize(int receiveBufferSize)
Sets the receive buffer size in bytes, the value must be greater than zero
or an
IllegalArgumentException will be thrown. |
void |
setSendBufferSize(int sendBufferSize)
Sets the send buffer size in bytes, the value must be greater than zero
or an
IllegalArgumentException will be thrown. |
void |
setSoLinger(int soLinger) |
void |
setSoTimeout(int soTimeout) |
void |
setTcpKeepAlive(boolean keepAlive) |
void |
setTcpNoDelay(boolean tcpNoDelay) |
void |
setTrafficClass(int trafficClass)
Sets the traffic class value used by the TCP connection, valid
range is between 0 and 255.
|
public static final int DEFAULT_SEND_BUFFER_SIZE
public static final int DEFAULT_RECEIVE_BUFFER_SIZE
public static final int DEFAULT_TRAFFIC_CLASS
public static final boolean DEFAULT_TCP_NO_DELAY
public static final boolean DEFAULT_TCP_KEEP_ALIVE
public static final int DEFAULT_SO_LINGER
public static final int DEFAULT_SO_TIMEOUT
public static final int DEFAULT_CONNECT_TIMEOUT
public static final int DEFAULT_TCP_PORT
public static final TransportOptions INSTANCE
public int getSendBufferSize()
public void setSendBufferSize(int sendBufferSize)
IllegalArgumentException
will be thrown.sendBufferSize
- the new send buffer size for the TCP Transport.IllegalArgumentException
- if the value given is not in the valid range.public int getReceiveBufferSize()
public void setReceiveBufferSize(int receiveBufferSize)
IllegalArgumentException
will be thrown.receiveBufferSize
- the new receive buffer size for the TCP Transport.IllegalArgumentException
- if the value given is not in the valid range.public int getTrafficClass()
public void setTrafficClass(int trafficClass)
trafficClass
- the new traffic class value.IllegalArgumentException
- if the value given is not in the valid range.public int getSoTimeout()
public void setSoTimeout(int soTimeout)
public boolean isTcpNoDelay()
public void setTcpNoDelay(boolean tcpNoDelay)
public int getSoLinger()
public void setSoLinger(int soLinger)
public boolean isTcpKeepAlive()
public void setTcpKeepAlive(boolean keepAlive)
public int getConnectTimeout()
public void setConnectTimeout(int connectTimeout)
public int getDefaultTcpPort()
public void setDefaultTcpPort(int defaultTcpPort)
public TransportOptions clone()
public boolean isSSL()
protected TransportOptions copyOptions(TransportOptions copy)
Copyright © 2013–2016 The Apache Software Foundation. All rights reserved.