public class DefaultSocketChannelConfig extends DefaultChannelConfig implements SocketChannelConfig
SocketChannelConfig
implementation.Constructor and Description |
---|
DefaultSocketChannelConfig(Socket socket)
Creates a new instance.
|
getBufferFactory, getConnectTimeoutMillis, getPipelineFactory, setBufferFactory, setConnectTimeoutMillis, setOptions, setPipelineFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBufferFactory, getConnectTimeoutMillis, getPipelineFactory, setBufferFactory, setConnectTimeoutMillis, setOptions, setPipelineFactory
public DefaultSocketChannelConfig(Socket socket)
public boolean setOption(String key, Object value)
ChannelConfig
public boolean setOption(String name, Object value) { if (super.setOption(name, value)) { return true; } if (name.equals("additionalOption")) { .... return true; } return false; }
setOption
in interface ChannelConfig
setOption
in class DefaultChannelConfig
true
if and only if the property has been setpublic int getReceiveBufferSize()
SocketChannelConfig
StandardSocketOptions.SO_RCVBUF
option.getReceiveBufferSize
in interface SocketChannelConfig
public int getSendBufferSize()
SocketChannelConfig
StandardSocketOptions.SO_SNDBUF
option.getSendBufferSize
in interface SocketChannelConfig
public int getSoLinger()
SocketChannelConfig
StandardSocketOptions.SO_LINGER
option.getSoLinger
in interface SocketChannelConfig
public int getTrafficClass()
SocketChannelConfig
StandardSocketOptions.IP_TOS
option.getTrafficClass
in interface SocketChannelConfig
public boolean isKeepAlive()
SocketChannelConfig
StandardSocketOptions.SO_KEEPALIVE
option.isKeepAlive
in interface SocketChannelConfig
public boolean isReuseAddress()
SocketChannelConfig
StandardSocketOptions.SO_REUSEADDR
option.isReuseAddress
in interface SocketChannelConfig
public boolean isTcpNoDelay()
SocketChannelConfig
StandardSocketOptions.TCP_NODELAY
option.isTcpNoDelay
in interface SocketChannelConfig
public void setKeepAlive(boolean keepAlive)
SocketChannelConfig
StandardSocketOptions.SO_KEEPALIVE
option.setKeepAlive
in interface SocketChannelConfig
public void setPerformancePreferences(int connectionTime, int latency, int bandwidth)
SocketChannelConfig
Socket.setPerformancePreferences(int, int, int)
.setPerformancePreferences
in interface SocketChannelConfig
public void setReceiveBufferSize(int receiveBufferSize)
SocketChannelConfig
StandardSocketOptions.SO_RCVBUF
option.setReceiveBufferSize
in interface SocketChannelConfig
public void setReuseAddress(boolean reuseAddress)
SocketChannelConfig
StandardSocketOptions.SO_REUSEADDR
option.setReuseAddress
in interface SocketChannelConfig
public void setSendBufferSize(int sendBufferSize)
SocketChannelConfig
StandardSocketOptions.SO_SNDBUF
option.setSendBufferSize
in interface SocketChannelConfig
public void setSoLinger(int soLinger)
SocketChannelConfig
StandardSocketOptions.SO_LINGER
option.setSoLinger
in interface SocketChannelConfig
public void setTcpNoDelay(boolean tcpNoDelay)
SocketChannelConfig
StandardSocketOptions.TCP_NODELAY
option.setTcpNoDelay
in interface SocketChannelConfig
public void setTrafficClass(int trafficClass)
SocketChannelConfig
StandardSocketOptions.IP_TOS
option.setTrafficClass
in interface SocketChannelConfig
Copyright © 2008-2014 The Netty Project. All Rights Reserved.