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, setWriteSpinCount
getAllocator, getConnectTimeoutMillis, getMaxMessagesPerRead, getMessageSizeEstimator, getOptions, getRecvByteBufAllocator, getWriteBufferHighWaterMark, getWriteBufferLowWaterMark, getWriteSpinCount, isAutoClose, isAutoRead, setOptions, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAllocator, getConnectTimeoutMillis, getMaxMessagesPerRead, getMessageSizeEstimator, getRecvByteBufAllocator, getWriteBufferHighWaterMark, getWriteBufferLowWaterMark, getWriteSpinCount, isAutoClose, isAutoRead, setOptions
private 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()
DatagramChannelConfig
StandardSocketOptions.IP_MULTICAST_TTL
option.getTimeToLive
in interface DatagramChannelConfig
getTimeToLive
in class DefaultDatagramChannelConfig
public DatagramChannelConfig setTimeToLive(int ttl)
DatagramChannelConfig
StandardSocketOptions.IP_MULTICAST_TTL
option.setTimeToLive
in interface DatagramChannelConfig
setTimeToLive
in class DefaultDatagramChannelConfig
public java.net.InetAddress getInterface()
DatagramChannelConfig
getInterface
in interface DatagramChannelConfig
getInterface
in class DefaultDatagramChannelConfig
public DatagramChannelConfig setInterface(java.net.InetAddress interfaceAddress)
DatagramChannelConfig
setInterface
in interface DatagramChannelConfig
setInterface
in class DefaultDatagramChannelConfig
public java.net.NetworkInterface getNetworkInterface()
DatagramChannelConfig
StandardSocketOptions.IP_MULTICAST_IF
option.getNetworkInterface
in interface DatagramChannelConfig
getNetworkInterface
in class DefaultDatagramChannelConfig
public DatagramChannelConfig setNetworkInterface(java.net.NetworkInterface networkInterface)
DatagramChannelConfig
StandardSocketOptions.IP_MULTICAST_IF
option.setNetworkInterface
in interface DatagramChannelConfig
setNetworkInterface
in class DefaultDatagramChannelConfig
public boolean isLoopbackModeDisabled()
DatagramChannelConfig
StandardSocketOptions.IP_MULTICAST_LOOP
option.isLoopbackModeDisabled
in interface DatagramChannelConfig
isLoopbackModeDisabled
in class DefaultDatagramChannelConfig
true
if and only if the loopback mode has been disabledpublic DatagramChannelConfig setLoopbackModeDisabled(boolean loopbackModeDisabled)
DatagramChannelConfig
StandardSocketOptions.IP_MULTICAST_LOOP
option.setLoopbackModeDisabled
in interface DatagramChannelConfig
setLoopbackModeDisabled
in class DefaultDatagramChannelConfig
loopbackModeDisabled
- true
if and only if the loopback mode has been disabledpublic DatagramChannelConfig setAutoRead(boolean autoRead)
ChannelConfig
ChannelHandlerContext.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 ChannelConfig
setAutoRead
in interface DatagramChannelConfig
setAutoRead
in class DefaultDatagramChannelConfig
protected void autoReadCleared()
DefaultChannelConfig
DefaultChannelConfig.setAutoRead(boolean)
is called with false
and DefaultChannelConfig.isAutoRead()
was
true
before.autoReadCleared
in class DefaultChannelConfig
private java.lang.Object getOption0(java.lang.Object option)
private void setOption0(java.lang.Object option, java.lang.Object value)