class NioDatagramChannelConfig extends DefaultDatagramChannelConfig
NioDatagramChannelConfig implementation.| Modifier and Type | Field and Description |
|---|---|
private static java.lang.reflect.Method |
GET_OPTION |
private static java.lang.Object |
IP_MULTICAST_IF |
private static java.lang.Object |
IP_MULTICAST_LOOP |
private static java.lang.Object |
IP_MULTICAST_TTL |
private java.nio.channels.DatagramChannel |
javaChannel |
private static java.lang.reflect.Method |
SET_OPTION |
channel| Constructor and Description |
|---|
NioDatagramChannelConfig(NioDatagramChannel channel,
java.nio.channels.DatagramChannel javaChannel) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
autoReadCleared()
Is called once
DefaultChannelConfig.setAutoRead(boolean) is called with false and DefaultChannelConfig.isAutoRead() was
true before. |
java.net.InetAddress |
getInterface()
Gets the address of the network interface used for multicast packets.
|
java.net.NetworkInterface |
getNetworkInterface()
Gets the
StandardSocketOptions.IP_MULTICAST_IF option. |
private java.lang.Object |
getOption0(java.lang.Object option) |
int |
getTimeToLive()
Gets the
StandardSocketOptions.IP_MULTICAST_TTL option. |
boolean |
isLoopbackModeDisabled()
Gets the
StandardSocketOptions.IP_MULTICAST_LOOP option. |
DatagramChannelConfig |
setAutoRead(boolean autoRead)
Sets if
ChannelHandlerContext.read() will be invoked automatically so that a user application doesn't
need to call it at all. |
DatagramChannelConfig |
setInterface(java.net.InetAddress interfaceAddress)
Sets the address of the network interface used for multicast packets.
|
DatagramChannelConfig |
setLoopbackModeDisabled(boolean loopbackModeDisabled)
Sets the
StandardSocketOptions.IP_MULTICAST_LOOP option. |
DatagramChannelConfig |
setNetworkInterface(java.net.NetworkInterface networkInterface)
Sets the
StandardSocketOptions.IP_MULTICAST_IF option. |
private void |
setOption0(java.lang.Object option,
java.lang.Object value) |
DatagramChannelConfig |
setTimeToLive(int ttl)
Sets the
StandardSocketOptions.IP_MULTICAST_TTL option. |
getOption, getOptions, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isBroadcast, isReuseAddress, setAllocator, setAutoClose, setBroadcast, setConnectTimeoutMillis, setMaxMessagesPerRead, setMessageSizeEstimator, setOption, setReceiveBufferSize, setRecvByteBufAllocator, setReuseAddress, setSendBufferSize, setTrafficClass, setWriteBufferHighWaterMark, setWriteBufferLowWaterMark, setWriteBufferWaterMark, setWriteSpinCountgetAllocator, getConnectTimeoutMillis, getMaxMessagesPerRead, getMessageSizeEstimator, getOptions, getRecvByteBufAllocator, getWriteBufferHighWaterMark, getWriteBufferLowWaterMark, getWriteBufferWaterMark, getWriteSpinCount, isAutoClose, isAutoRead, setOptions, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAllocator, getConnectTimeoutMillis, getMaxMessagesPerRead, getMessageSizeEstimator, getRecvByteBufAllocator, getWriteBufferHighWaterMark, getWriteBufferLowWaterMark, getWriteBufferWaterMark, getWriteSpinCount, isAutoClose, isAutoRead, setOptionsprivate static final java.lang.Object IP_MULTICAST_TTL
private static final java.lang.Object IP_MULTICAST_IF
private static final java.lang.Object IP_MULTICAST_LOOP
private static final java.lang.reflect.Method GET_OPTION
private static final java.lang.reflect.Method SET_OPTION
private final java.nio.channels.DatagramChannel javaChannel
NioDatagramChannelConfig(NioDatagramChannel channel, java.nio.channels.DatagramChannel javaChannel)
public int getTimeToLive()
DatagramChannelConfigStandardSocketOptions.IP_MULTICAST_TTL option.getTimeToLive in interface DatagramChannelConfiggetTimeToLive in class DefaultDatagramChannelConfigpublic DatagramChannelConfig setTimeToLive(int ttl)
DatagramChannelConfigStandardSocketOptions.IP_MULTICAST_TTL option.setTimeToLive in interface DatagramChannelConfigsetTimeToLive in class DefaultDatagramChannelConfigpublic java.net.InetAddress getInterface()
DatagramChannelConfiggetInterface in interface DatagramChannelConfiggetInterface in class DefaultDatagramChannelConfigpublic DatagramChannelConfig setInterface(java.net.InetAddress interfaceAddress)
DatagramChannelConfigsetInterface in interface DatagramChannelConfigsetInterface in class DefaultDatagramChannelConfigpublic java.net.NetworkInterface getNetworkInterface()
DatagramChannelConfigStandardSocketOptions.IP_MULTICAST_IF option.getNetworkInterface in interface DatagramChannelConfiggetNetworkInterface in class DefaultDatagramChannelConfigpublic DatagramChannelConfig setNetworkInterface(java.net.NetworkInterface networkInterface)
DatagramChannelConfigStandardSocketOptions.IP_MULTICAST_IF option.setNetworkInterface in interface DatagramChannelConfigsetNetworkInterface in class DefaultDatagramChannelConfigpublic boolean isLoopbackModeDisabled()
DatagramChannelConfigStandardSocketOptions.IP_MULTICAST_LOOP option.isLoopbackModeDisabled in interface DatagramChannelConfigisLoopbackModeDisabled in class DefaultDatagramChannelConfigtrue if and only if the loopback mode has been disabledpublic DatagramChannelConfig setLoopbackModeDisabled(boolean loopbackModeDisabled)
DatagramChannelConfigStandardSocketOptions.IP_MULTICAST_LOOP option.setLoopbackModeDisabled in interface DatagramChannelConfigsetLoopbackModeDisabled in class DefaultDatagramChannelConfigloopbackModeDisabled - true if and only if the loopback mode has been disabledpublic DatagramChannelConfig setAutoRead(boolean autoRead)
ChannelConfigChannelHandlerContext.read() will be invoked automatically so that a user application doesn't
need to call it at all. The default value is true.setAutoRead in interface ChannelConfigsetAutoRead in interface DatagramChannelConfigsetAutoRead in class DefaultDatagramChannelConfigprotected void autoReadCleared()
DefaultChannelConfigDefaultChannelConfig.setAutoRead(boolean) is called with false and DefaultChannelConfig.isAutoRead() was
true before.autoReadCleared in class DefaultChannelConfigprivate java.lang.Object getOption0(java.lang.Object option)
private void setOption0(java.lang.Object option,
java.lang.Object value)