|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Object org.jboss.netty.channel.DefaultChannelConfig org.jboss.netty.channel.socket.DefaultDatagramChannelConfig
public class DefaultDatagramChannelConfig
构造方法摘要 | |
---|---|
DefaultDatagramChannelConfig(java.net.DatagramSocket socket)
创建一个实例. |
方法摘要 | |
---|---|
java.net.InetAddress |
getInterface()
获取多播数据包的网络接口地址. |
java.net.NetworkInterface |
getNetworkInterface()
获取 DatagramChannel 发送的外发多播数据包的网络接口. |
int |
getReceiveBufferSize()
返回 SO_RCVBUF 属性. |
ReceiveBufferSizePredictor |
getReceiveBufferSizePredictor()
返回预测套接字接收缓冲可读字节的 ReceiveBufferSizePredictor .默认预测机是
FixedReceiveBufferSizePredictor (768). |
ReceiveBufferSizePredictorFactory |
getReceiveBufferSizePredictorFactory()
返回当新channel被创建并且 ReceiveBufferSizePredictor 没有设置时用于创建
ReceiveBufferSizePredictor 的
ReceiveBufferSizePredictorFactory .If no predictor was set for the
channel,
DatagramChannelConfig.setReceiveBufferSizePredictor(ReceiveBufferSizePredictor) will
be called with the new predictor. |
int |
getSendBufferSize()
返回 SO_SNDBUF 属性. |
int |
getTimeToLive()
获取发送到 DatagramChannel 的多播数据包的默认生存时间. |
int |
getTrafficClass()
返回traffic类. |
boolean |
isBroadcast()
返回 SO_BROADCAST 属性. |
boolean |
isLoopbackModeDisabled()
判断是否为多播数据报设置了本地回路. |
boolean |
isReuseAddress()
返回 SO_REUSEADDR 属性. |
void |
setBroadcast(boolean broadcast)
设置 SO_BROADCAST 属性. |
void |
setInterface(java.net.InetAddress interfaceAddress)
设置多播数据包使用的网络接口地址. |
void |
setLoopbackModeDisabled(boolean loopbackModeDisabled)
设置多播数据报的本地回路. |
void |
setNetworkInterface(java.net.NetworkInterface networkInterface)
设置 DatagramChannel 发送的外发多播数据包的网络接口. |
boolean |
setOption(java.lang.String key,
java.lang.Object value)
使用指定的name和value设置配置属性.要正确重写该方法,你必须调用父类: public boolean setOption(String name, Object value) { if (super.setOption(name, value)) { return true; } if (name.equals("additionalOption")) { .... |
void |
setReceiveBufferSize(int receiveBufferSize)
返回 SO_RCVBUF 属性. |
void |
setReceiveBufferSizePredictor(ReceiveBufferSizePredictor predictor)
设置预测套接字接收缓冲可读字节的 ReceiveBufferSizePredictor . |
void |
setReceiveBufferSizePredictorFactory(ReceiveBufferSizePredictorFactory predictorFactory)
Sets the ReceiveBufferSizePredictor which creates a new
ReceiveBufferSizePredictor when a new channel is created and no
ReceiveBufferSizePredictor was set. |
void |
setReuseAddress(boolean reuseAddress)
设置 SO_REUSEADDR 属性. |
void |
setSendBufferSize(int sendBufferSize)
设置 SO_SNDBUF 属性. |
void |
setTimeToLive(int ttl)
设置 DatagramChannel 发送出去的多播数据包的默认生存时间,以便控制多播的范围. |
void |
setTrafficClass(int trafficClass)
如 DatagramSocket.setTrafficClass(int) 一样设置traffic类. |
从类 org.jboss.netty.channel.DefaultChannelConfig 继承的方法 |
---|
getBufferFactory, getConnectTimeoutMillis, getPipelineFactory, setBufferFactory, setConnectTimeoutMillis, setOptions, setPipelineFactory |
从类 java.lang.Object 继承的方法 |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
从接口 org.jboss.netty.channel.ChannelConfig 继承的方法 |
---|
getBufferFactory, getConnectTimeoutMillis, getPipelineFactory, setBufferFactory, setConnectTimeoutMillis, setOptions, setPipelineFactory |
构造方法详细信息 |
---|
public DefaultDatagramChannelConfig(java.net.DatagramSocket socket)
方法详细信息 |
---|
public boolean setOption(java.lang.String key, java.lang.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; }
ChannelConfig
中的 setOption
DefaultChannelConfig
中的 setOption
public boolean isBroadcast()
DatagramChannelConfig
复制的描述SO_BROADCAST
属性.
DatagramChannelConfig
中的 isBroadcast
public void setBroadcast(boolean broadcast)
DatagramChannelConfig
复制的描述SO_BROADCAST
属性.
DatagramChannelConfig
中的 setBroadcast
public java.net.InetAddress getInterface()
DatagramChannelConfig
复制的描述
DatagramChannelConfig
中的 getInterface
public void setInterface(java.net.InetAddress interfaceAddress)
DatagramChannelConfig
复制的描述
DatagramChannelConfig
中的 setInterface
public boolean isLoopbackModeDisabled()
DatagramChannelConfig
复制的描述
DatagramChannelConfig
中的 isLoopbackModeDisabled
true
public void setLoopbackModeDisabled(boolean loopbackModeDisabled)
DatagramChannelConfig
复制的描述
DatagramChannelConfig
中的 setLoopbackModeDisabled
loopbackModeDisabled
- true
为禁止回路public java.net.NetworkInterface getNetworkInterface()
DatagramChannelConfig
复制的描述DatagramChannel
发送的外发多播数据包的网络接口.
DatagramChannelConfig
中的 getNetworkInterface
public void setNetworkInterface(java.net.NetworkInterface networkInterface)
DatagramChannelConfig
复制的描述DatagramChannel
发送的外发多播数据包的网络接口.
DatagramChannelConfig
中的 setNetworkInterface
public boolean isReuseAddress()
DatagramChannelConfig
复制的描述SO_REUSEADDR
属性.
DatagramChannelConfig
中的 isReuseAddress
public void setReuseAddress(boolean reuseAddress)
DatagramChannelConfig
复制的描述SO_REUSEADDR
属性.
DatagramChannelConfig
中的 setReuseAddress
public int getReceiveBufferSize()
DatagramChannelConfig
复制的描述SO_RCVBUF
属性.
DatagramChannelConfig
中的 getReceiveBufferSize
public void setReceiveBufferSize(int receiveBufferSize)
DatagramChannelConfig
复制的描述SO_RCVBUF
属性.
DatagramChannelConfig
中的 setReceiveBufferSize
public int getSendBufferSize()
DatagramChannelConfig
复制的描述SO_SNDBUF
属性.
DatagramChannelConfig
中的 getSendBufferSize
public void setSendBufferSize(int sendBufferSize)
DatagramChannelConfig
复制的描述SO_SNDBUF
属性.
DatagramChannelConfig
中的 setSendBufferSize
public int getTimeToLive()
DatagramChannelConfig
复制的描述DatagramChannel
的多播数据包的默认生存时间.
DatagramChannelConfig
中的 getTimeToLive
public void setTimeToLive(int ttl)
DatagramChannelConfig
复制的描述DatagramChannel
发送出去的多播数据包的默认生存时间,以便控制多播的范围.
DatagramChannelConfig
中的 setTimeToLive
public int getTrafficClass()
DatagramChannelConfig
复制的描述
DatagramChannelConfig
中的 getTrafficClass
public void setTrafficClass(int trafficClass)
DatagramChannelConfig
复制的描述DatagramSocket.setTrafficClass(int)
一样设置traffic类.
DatagramChannelConfig
中的 setTrafficClass
public ReceiveBufferSizePredictor getReceiveBufferSizePredictor()
DatagramChannelConfig
复制的描述ReceiveBufferSizePredictor
.默认预测机是
FixedReceiveBufferSizePredictor
(768).
DatagramChannelConfig
中的 getReceiveBufferSizePredictor
public void setReceiveBufferSizePredictor(ReceiveBufferSizePredictor predictor)
DatagramChannelConfig
复制的描述ReceiveBufferSizePredictor
. 默认预测机是
FixedReceiveBufferSizePredictor
(768).
DatagramChannelConfig
中的 setReceiveBufferSizePredictor
public ReceiveBufferSizePredictorFactory getReceiveBufferSizePredictorFactory()
DatagramChannelConfig
复制的描述ReceiveBufferSizePredictor
没有设置时用于创建
ReceiveBufferSizePredictor
的
ReceiveBufferSizePredictorFactory
.If no predictor was set for the
channel,
DatagramChannelConfig.setReceiveBufferSizePredictor(ReceiveBufferSizePredictor)
will
be called with the new predictor. The default factory is
FixedReceiveBufferSizePredictorFactory
(768).
DatagramChannelConfig
中的 getReceiveBufferSizePredictorFactory
public void setReceiveBufferSizePredictorFactory(ReceiveBufferSizePredictorFactory predictorFactory)
DatagramChannelConfig
复制的描述ReceiveBufferSizePredictor
which creates a new
ReceiveBufferSizePredictor
when a new channel is created and no
ReceiveBufferSizePredictor
was set. If no predictor was set for
the channel,
DatagramChannelConfig.setReceiveBufferSizePredictor(ReceiveBufferSizePredictor)
will
be called with the new predictor. The default factory is
FixedReceiveBufferSizePredictorFactory
(768).
DatagramChannelConfig
中的 setReceiveBufferSizePredictorFactory
|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |