Class DefaultSocketChannelConfig
java.lang.Object
org.jboss.netty.channel.DefaultChannelConfig
org.jboss.netty.channel.socket.DefaultSocketChannelConfig
- All Implemented Interfaces:
ChannelConfig, SocketChannelConfig
- Direct Known Subclasses:
DefaultNioSocketChannelConfig
The default
SocketChannelConfig implementation.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGets theStandardSocketOptions.SO_RCVBUFoption.intGets theStandardSocketOptions.SO_SNDBUFoption.intGets theStandardSocketOptions.SO_LINGERoption.intGets theStandardSocketOptions.IP_TOSoption.booleanGets theStandardSocketOptions.SO_KEEPALIVEoption.booleanGets theStandardSocketOptions.SO_REUSEADDRoption.booleanGets theStandardSocketOptions.TCP_NODELAYoption.voidsetKeepAlive(boolean keepAlive) Sets theStandardSocketOptions.SO_KEEPALIVEoption.booleanSets a configuration property with the specified name and value.voidsetPerformancePreferences(int connectionTime, int latency, int bandwidth) Sets the performance preferences as specified inSocket.setPerformancePreferences(int, int, int).voidsetReceiveBufferSize(int receiveBufferSize) Sets theStandardSocketOptions.SO_RCVBUFoption.voidsetReuseAddress(boolean reuseAddress) Sets theStandardSocketOptions.SO_REUSEADDRoption.voidsetSendBufferSize(int sendBufferSize) Sets theStandardSocketOptions.SO_SNDBUFoption.voidsetSoLinger(int soLinger) Sets theStandardSocketOptions.SO_LINGERoption.voidsetTcpNoDelay(boolean tcpNoDelay) Sets theStandardSocketOptions.TCP_NODELAYoption.voidsetTrafficClass(int trafficClass) Sets theStandardSocketOptions.IP_TOSoption.Methods inherited from class DefaultChannelConfig
getBufferFactory, getConnectTimeoutMillis, getPipelineFactory, setBufferFactory, setConnectTimeoutMillis, setOptions, setPipelineFactoryMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ChannelConfig
getBufferFactory, getConnectTimeoutMillis, getPipelineFactory, setBufferFactory, setConnectTimeoutMillis, setOptions, setPipelineFactory
-
Field Details
-
socket
-
-
Constructor Details
-
DefaultSocketChannelConfig
Creates a new instance.
-
-
Method Details
-
setOption
Description copied from interface:ChannelConfigSets a configuration property with the specified name and value. To override this method properly, you must call the super class:public boolean setOption(String name, Object value) { if (super.setOption(name, value)) { return true; } if (name.equals("additionalOption")) { .... return true; } return false; }- Specified by:
setOptionin interfaceChannelConfig- Overrides:
setOptionin classDefaultChannelConfig- Returns:
trueif and only if the property has been set
-
getReceiveBufferSize
public int getReceiveBufferSize()Description copied from interface:SocketChannelConfigGets theStandardSocketOptions.SO_RCVBUFoption.- Specified by:
getReceiveBufferSizein interfaceSocketChannelConfig
-
getSendBufferSize
public int getSendBufferSize()Description copied from interface:SocketChannelConfigGets theStandardSocketOptions.SO_SNDBUFoption.- Specified by:
getSendBufferSizein interfaceSocketChannelConfig
-
getSoLinger
public int getSoLinger()Description copied from interface:SocketChannelConfigGets theStandardSocketOptions.SO_LINGERoption.- Specified by:
getSoLingerin interfaceSocketChannelConfig
-
getTrafficClass
public int getTrafficClass()Description copied from interface:SocketChannelConfigGets theStandardSocketOptions.IP_TOSoption.- Specified by:
getTrafficClassin interfaceSocketChannelConfig
-
isKeepAlive
public boolean isKeepAlive()Description copied from interface:SocketChannelConfigGets theStandardSocketOptions.SO_KEEPALIVEoption.- Specified by:
isKeepAlivein interfaceSocketChannelConfig
-
isReuseAddress
public boolean isReuseAddress()Description copied from interface:SocketChannelConfigGets theStandardSocketOptions.SO_REUSEADDRoption.- Specified by:
isReuseAddressin interfaceSocketChannelConfig
-
isTcpNoDelay
public boolean isTcpNoDelay()Description copied from interface:SocketChannelConfigGets theStandardSocketOptions.TCP_NODELAYoption.- Specified by:
isTcpNoDelayin interfaceSocketChannelConfig
-
setKeepAlive
public void setKeepAlive(boolean keepAlive) Description copied from interface:SocketChannelConfigSets theStandardSocketOptions.SO_KEEPALIVEoption.- Specified by:
setKeepAlivein interfaceSocketChannelConfig
-
setPerformancePreferences
public void setPerformancePreferences(int connectionTime, int latency, int bandwidth) Description copied from interface:SocketChannelConfigSets the performance preferences as specified inSocket.setPerformancePreferences(int, int, int).- Specified by:
setPerformancePreferencesin interfaceSocketChannelConfig
-
setReceiveBufferSize
public void setReceiveBufferSize(int receiveBufferSize) Description copied from interface:SocketChannelConfigSets theStandardSocketOptions.SO_RCVBUFoption.- Specified by:
setReceiveBufferSizein interfaceSocketChannelConfig
-
setReuseAddress
public void setReuseAddress(boolean reuseAddress) Description copied from interface:SocketChannelConfigSets theStandardSocketOptions.SO_REUSEADDRoption.- Specified by:
setReuseAddressin interfaceSocketChannelConfig
-
setSendBufferSize
public void setSendBufferSize(int sendBufferSize) Description copied from interface:SocketChannelConfigSets theStandardSocketOptions.SO_SNDBUFoption.- Specified by:
setSendBufferSizein interfaceSocketChannelConfig
-
setSoLinger
public void setSoLinger(int soLinger) Description copied from interface:SocketChannelConfigSets theStandardSocketOptions.SO_LINGERoption.- Specified by:
setSoLingerin interfaceSocketChannelConfig
-
setTcpNoDelay
public void setTcpNoDelay(boolean tcpNoDelay) Description copied from interface:SocketChannelConfigSets theStandardSocketOptions.TCP_NODELAYoption.- Specified by:
setTcpNoDelayin interfaceSocketChannelConfig
-
setTrafficClass
public void setTrafficClass(int trafficClass) Description copied from interface:SocketChannelConfigSets theStandardSocketOptions.IP_TOSoption.- Specified by:
setTrafficClassin interfaceSocketChannelConfig
-