|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.netty.channel.socket.DefaultSocketChannelConfig
public class DefaultSocketChannelConfig
The default SocketChannelConfig
implementation.
Constructor Summary | |
---|---|
DefaultSocketChannelConfig(Socket socket)
Creates a new instance. |
Method Summary | |
---|---|
int |
getConnectTimeoutMillis()
Returns the connect timeout of the channel in milliseconds. |
ChannelPipelineFactory |
getPipelineFactory()
Returns the ChannelPipelineFactory which will be used when
a child channel is created. |
int |
getReceiveBufferSize()
Gets the SO_RCVBUF option. |
int |
getSendBufferSize()
Gets the SO_SNDBUF option. |
int |
getSoLinger()
Gets the SO_LINGER option. |
int |
getTrafficClass()
Gets the traffic class. |
int |
getWriteTimeoutMillis()
Returns the write timeout of the channel in milliseconds. |
boolean |
isKeepAlive()
Gets the SO_KEEPALIVE option. |
boolean |
isReuseAddress()
Gets the SO_REUSEADDR option. |
boolean |
isTcpNoDelay()
Gets the SO_TCPNODELAY option. |
void |
setConnectTimeoutMillis(int connectTimeoutMillis)
Sets the connect timeout of the channel in milliseconds. |
void |
setKeepAlive(boolean keepAlive)
Sets the SO_KEEPALIVE option. |
protected boolean |
setOption(String key,
Object value)
Sets an individual option. |
void |
setOptions(Map<String,Object> options)
Sets the configuration properties from the specified Map . |
void |
setPerformancePreferences(int connectionTime,
int latency,
int bandwidth)
Sets the performance preferences as specified in Socket.setPerformancePreferences(int, int, int) . |
void |
setPipelineFactory(ChannelPipelineFactory pipelineFactory)
Sets the ChannelPipelineFactory which will be used when
a child channel is created. |
void |
setReceiveBufferSize(int receiveBufferSize)
Gets the SO_RCVBUF option. |
void |
setReuseAddress(boolean reuseAddress)
Sets the SO_REUSEADDR option. |
void |
setSendBufferSize(int sendBufferSize)
Sets the SO_SNDBUF option. |
void |
setSoLinger(int soLinger)
Sets the SO_LINGER option. |
void |
setTcpNoDelay(boolean tcpNoDelay)
Sets the SO_TCPNODELAY option. |
void |
setTrafficClass(int trafficClass)
Sets the traffic class as specified in Socket.setTrafficClass(int) . |
void |
setWriteTimeoutMillis(int writeTimeoutMillis)
Sets the write timeout of the channel in milliseconds. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultSocketChannelConfig(Socket socket)
Method Detail |
---|
public void setOptions(Map<String,Object> options)
ChannelConfig
Map
.
setOptions
in interface ChannelConfig
protected boolean setOption(String key, Object value)
public int getReceiveBufferSize()
SocketChannelConfig
SO_RCVBUF
option.
getReceiveBufferSize
in interface SocketChannelConfig
public int getSendBufferSize()
SocketChannelConfig
SO_SNDBUF
option.
getSendBufferSize
in interface SocketChannelConfig
public int getSoLinger()
SocketChannelConfig
SO_LINGER
option.
getSoLinger
in interface SocketChannelConfig
public int getTrafficClass()
SocketChannelConfig
getTrafficClass
in interface SocketChannelConfig
public boolean isKeepAlive()
SocketChannelConfig
SO_KEEPALIVE
option.
isKeepAlive
in interface SocketChannelConfig
public boolean isReuseAddress()
SocketChannelConfig
SO_REUSEADDR
option.
isReuseAddress
in interface SocketChannelConfig
public boolean isTcpNoDelay()
SocketChannelConfig
SO_TCPNODELAY
option.
isTcpNoDelay
in interface SocketChannelConfig
public void setKeepAlive(boolean keepAlive)
SocketChannelConfig
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
SO_RCVBUF
option.
setReceiveBufferSize
in interface SocketChannelConfig
public void setReuseAddress(boolean reuseAddress)
SocketChannelConfig
SO_REUSEADDR
option.
setReuseAddress
in interface SocketChannelConfig
public void setSendBufferSize(int sendBufferSize)
SocketChannelConfig
SO_SNDBUF
option.
setSendBufferSize
in interface SocketChannelConfig
public void setSoLinger(int soLinger)
SocketChannelConfig
SO_LINGER
option.
setSoLinger
in interface SocketChannelConfig
public void setTcpNoDelay(boolean tcpNoDelay)
SocketChannelConfig
SO_TCPNODELAY
option.
setTcpNoDelay
in interface SocketChannelConfig
public void setTrafficClass(int trafficClass)
SocketChannelConfig
Socket.setTrafficClass(int)
.
setTrafficClass
in interface SocketChannelConfig
public int getConnectTimeoutMillis()
ChannelConfig
Channel
does not support connect operation, this property is not
used at all, and therefore will be ignored.
getConnectTimeoutMillis
in interface ChannelConfig
0
if disabled.public ChannelPipelineFactory getPipelineFactory()
ChannelConfig
ChannelPipelineFactory
which will be used when
a child channel is created. If the Channel
does not create
a child channel, this property is not used at all, and therefore will
be ignored.
getPipelineFactory
in interface ChannelConfig
public int getWriteTimeoutMillis()
ChannelConfig
IOException
will be raised. If the Channel
does not
support write operation, this property is not used at all, and therefore
will be ignored.
getWriteTimeoutMillis
in interface ChannelConfig
0
if disabled.public void setConnectTimeoutMillis(int connectTimeoutMillis)
ChannelConfig
Channel
does not support connect operation, this property is not
used at all, and therefore will be ignored.
setConnectTimeoutMillis
in interface ChannelConfig
connectTimeoutMillis
- the connect timeout in milliseconds.
0
to disable.public void setPipelineFactory(ChannelPipelineFactory pipelineFactory)
ChannelConfig
ChannelPipelineFactory
which will be used when
a child channel is created. If the Channel
does not create
a child channel, this property is not used at all, and therefore will
be ignored.
setPipelineFactory
in interface ChannelConfig
public void setWriteTimeoutMillis(int writeTimeoutMillis)
ChannelConfig
IOException
will be raised. If the Channel
does not
support write operation, this property is not used at all, and therefore
will be ignored.
setWriteTimeoutMillis
in interface ChannelConfig
writeTimeoutMillis
- the write timeout in milliseconds.
0
to disable.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |