public class DefaultServerSocketChannelConfig extends DefaultChannelConfig implements ServerSocketChannelConfig
ServerSocketChannelConfig implementation.| Constructor and Description |
|---|
DefaultServerSocketChannelConfig(ServerSocket socket)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getBacklog()
Gets the backlog value to specify when the channel binds to a local
address.
|
<T> T |
getOption(ChannelOption<T> option)
Return the value of the given
ChannelOption |
Map<ChannelOption<?>,Object> |
getOptions()
Return all set
ChannelOption's. |
int |
getReceiveBufferSize()
Gets the
StandardSocketOptions.SO_RCVBUF option. |
boolean |
isReuseAddress()
Gets the
StandardSocketOptions.SO_REUSEADDR option. |
void |
setBacklog(int backlog)
Sets the backlog value to specify when the channel binds to a local
address.
|
<T> boolean |
setOption(ChannelOption<T> option,
T value)
Sets a configuration property with the specified name and value.
|
void |
setPerformancePreferences(int connectionTime,
int latency,
int bandwidth)
Sets the performance preferences as specified in
ServerSocket.setPerformancePreferences(int, int, int). |
void |
setReceiveBufferSize(int receiveBufferSize)
Gets the
StandardSocketOptions.SO_SNDBUF option. |
void |
setReuseAddress(boolean reuseAddress)
Sets the
StandardSocketOptions.SO_REUSEADDR option. |
getConnectTimeoutMillis, getOptions, getWriteSpinCount, setConnectTimeoutMillis, setOptions, setWriteSpinCount, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConnectTimeoutMillis, getWriteSpinCount, setConnectTimeoutMillis, setOptions, setWriteSpinCountpublic DefaultServerSocketChannelConfig(ServerSocket socket)
public Map<ChannelOption<?>,Object> getOptions()
ChannelConfigChannelOption's.getOptions in interface ChannelConfiggetOptions in class DefaultChannelConfigpublic <T> T getOption(ChannelOption<T> option)
ChannelConfigChannelOptiongetOption in interface ChannelConfiggetOption in class DefaultChannelConfigpublic <T> boolean setOption(ChannelOption<T> option, T 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 ChannelConfigsetOption in class DefaultChannelConfigtrue if and only if the property has been setpublic boolean isReuseAddress()
ServerSocketChannelConfigStandardSocketOptions.SO_REUSEADDR option.isReuseAddress in interface ServerSocketChannelConfigpublic void setReuseAddress(boolean reuseAddress)
ServerSocketChannelConfigStandardSocketOptions.SO_REUSEADDR option.setReuseAddress in interface ServerSocketChannelConfigpublic int getReceiveBufferSize()
ServerSocketChannelConfigStandardSocketOptions.SO_RCVBUF option.getReceiveBufferSize in interface ServerSocketChannelConfigpublic void setReceiveBufferSize(int receiveBufferSize)
ServerSocketChannelConfigStandardSocketOptions.SO_SNDBUF option.setReceiveBufferSize in interface ServerSocketChannelConfigpublic void setPerformancePreferences(int connectionTime,
int latency,
int bandwidth)
ServerSocketChannelConfigServerSocket.setPerformancePreferences(int, int, int).setPerformancePreferences in interface ServerSocketChannelConfigpublic int getBacklog()
ServerSocketChannelConfiggetBacklog in interface ServerSocketChannelConfigpublic void setBacklog(int backlog)
ServerSocketChannelConfigsetBacklog in interface ServerSocketChannelConfigCopyright © 2008-2012 The Netty Project. All Rights Reserved.