public class SocketConfig extends AbstractConfig
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
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 © 2017. All rights reserved.