Package org.jboss.netty.channel.socket
Class DefaultServerSocketChannelConfig
java.lang.Object
org.jboss.netty.channel.DefaultServerChannelConfig
org.jboss.netty.channel.socket.DefaultServerSocketChannelConfig
- All Implemented Interfaces:
ChannelConfig
,ServerSocketChannelConfig
public class DefaultServerSocketChannelConfig
extends DefaultServerChannelConfig
implements ServerSocketChannelConfig
The default
ServerSocketChannelConfig
implementation.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the backlog value to specify when the channel binds to a local address.int
Gets theStandardSocketOptions.SO_RCVBUF
option.boolean
Gets theStandardSocketOptions.SO_REUSEADDR
option.void
setBacklog
(int backlog) Sets the backlog value to specify when the channel binds to a local address.boolean
Sets an individual option.void
setPerformancePreferences
(int connectionTime, int latency, int bandwidth) Sets the performance preferences as specified inServerSocket.setPerformancePreferences(int, int, int)
.void
setReceiveBufferSize
(int receiveBufferSize) Sets theStandardSocketOptions.SO_RCVBUF
option.void
setReuseAddress
(boolean reuseAddress) Sets theStandardSocketOptions.SO_REUSEADDR
option.Methods inherited from class org.jboss.netty.channel.DefaultServerChannelConfig
getBufferFactory, getConnectTimeoutMillis, getPipelineFactory, setBufferFactory, setConnectTimeoutMillis, setOptions, setPipelineFactory
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jboss.netty.channel.ChannelConfig
getBufferFactory, getConnectTimeoutMillis, getPipelineFactory, setBufferFactory, setConnectTimeoutMillis, setOptions, setPipelineFactory
-
Field Details
-
socket
-
backlog
private volatile int backlog
-
-
Constructor Details
-
DefaultServerSocketChannelConfig
Creates a new instance.
-
-
Method Details
-
setOption
Description copied from class:DefaultServerChannelConfig
Sets an individual option. You can override this method to support additional configuration parameters.- Specified by:
setOption
in interfaceChannelConfig
- Overrides:
setOption
in classDefaultServerChannelConfig
- Returns:
true
if and only if the property has been set
-
isReuseAddress
public boolean isReuseAddress()Description copied from interface:ServerSocketChannelConfig
Gets theStandardSocketOptions.SO_REUSEADDR
option.- Specified by:
isReuseAddress
in interfaceServerSocketChannelConfig
-
setReuseAddress
public void setReuseAddress(boolean reuseAddress) Description copied from interface:ServerSocketChannelConfig
Sets theStandardSocketOptions.SO_REUSEADDR
option.- Specified by:
setReuseAddress
in interfaceServerSocketChannelConfig
-
getReceiveBufferSize
public int getReceiveBufferSize()Description copied from interface:ServerSocketChannelConfig
Gets theStandardSocketOptions.SO_RCVBUF
option.- Specified by:
getReceiveBufferSize
in interfaceServerSocketChannelConfig
-
setReceiveBufferSize
public void setReceiveBufferSize(int receiveBufferSize) Description copied from interface:ServerSocketChannelConfig
Sets theStandardSocketOptions.SO_RCVBUF
option.- Specified by:
setReceiveBufferSize
in interfaceServerSocketChannelConfig
-
setPerformancePreferences
public void setPerformancePreferences(int connectionTime, int latency, int bandwidth) Description copied from interface:ServerSocketChannelConfig
Sets the performance preferences as specified inServerSocket.setPerformancePreferences(int, int, int)
.- Specified by:
setPerformancePreferences
in interfaceServerSocketChannelConfig
-
getBacklog
public int getBacklog()Description copied from interface:ServerSocketChannelConfig
Gets the backlog value to specify when the channel binds to a local address.- Specified by:
getBacklog
in interfaceServerSocketChannelConfig
-
setBacklog
public void setBacklog(int backlog) Description copied from interface:ServerSocketChannelConfig
Sets the backlog value to specify when the channel binds to a local address.- Specified by:
setBacklog
in interfaceServerSocketChannelConfig
-