public class SocketConfig extends AbstractConfig
Modifier and Type | Field and Description |
---|---|
private Boolean |
keepAlive
Keep alive.
|
private Boolean |
oobInline
OOB Inline.
|
private Integer |
receiveBufferSize
Receive buffer size.
|
private Boolean |
reuseAddress
Reuse address.
|
private Integer |
sendBufferSize
Send buffer size.
|
private Integer |
soLinger
SO Linger.
|
private Integer |
soTimeout
SO Timeout.
|
private Boolean |
tcpNoDelay
TCP No Delay.
|
private Integer |
trafficClass
Traffic Class.
|
logger
Constructor and Description |
---|
SocketConfig() |
Modifier and Type | Method and Description |
---|---|
void |
configureSocket(Socket socket)
Applies this configuration to the supplied socket.
|
Boolean |
getKeepAlive()
|
Boolean |
getOOBInline()
|
Integer |
getReceiveBufferSize()
|
Boolean |
getReuseAddress()
|
Integer |
getSendBufferSize()
|
Integer |
getSoLinger()
See
Socket.getSoLinger() . |
Integer |
getSoTimeout()
|
Boolean |
getTcpNoDelay()
|
Integer |
getTrafficClass()
|
boolean |
isEmpty()
Returns whether this socket config contains any configuration data.
|
void |
setKeepAlive(boolean b)
|
void |
setOOBInline(boolean b)
|
void |
setReceiveBufferSize(int i)
|
void |
setReuseAddress(boolean b)
|
void |
setSendBufferSize(int i)
|
void |
setSoLinger(int i)
|
void |
setSoTimeout(int i)
|
void |
setTcpNoDelay(boolean b)
|
void |
setTrafficClass(int i)
|
String |
toString() |
checkImmutable, checkStringInput, makeImmutable
private Boolean keepAlive
private Boolean oobInline
private Integer receiveBufferSize
private Integer sendBufferSize
private Boolean reuseAddress
private Integer soLinger
private Integer soTimeout
private Boolean tcpNoDelay
private Integer trafficClass
public boolean isEmpty()
public Boolean getKeepAlive()
public void setKeepAlive(boolean b)
b
- keep alivepublic Boolean getOOBInline()
public void setOOBInline(boolean b)
b
- OOB in linepublic Integer getReceiveBufferSize()
public void setReceiveBufferSize(int i)
i
- receive buffer sizepublic Integer getSendBufferSize()
public void setSendBufferSize(int i)
i
- send buffer sizepublic Boolean getReuseAddress()
public void setReuseAddress(boolean b)
b
- reuse addresspublic Integer getSoLinger()
Socket.getSoLinger()
.public void setSoLinger(int i)
i
- SO lingerpublic Integer getSoTimeout()
public void setSoTimeout(int i)
i
- SO timeoutpublic Boolean getTcpNoDelay()
public void setTcpNoDelay(boolean b)
b
- tcp no delaypublic Integer getTrafficClass()
public void setTrafficClass(int i)
i
- traffic classpublic void configureSocket(Socket socket) throws SocketException
socket
- to set properties onSocketException
- if an error occurs invoking a socket setterCopyright © 2003-2019 Virginia Tech. All Rights Reserved.