public interface DatagramChannelConfig extends ChannelConfig
ChannelConfig for a DatagramChannel.
ChannelConfig,
DatagramChannelConfig allows the following options in the option map:
| Name | Associated setter method |
|---|---|
"broadcast" | setBroadcast(boolean) |
"interface" | setInterface(InetAddress) |
"loopbackModeDisabled" | setLoopbackModeDisabled(boolean) |
"networkInterface" | setNetworkInterface(NetworkInterface) |
"reuseAddress" | setReuseAddress(boolean) |
"receiveBufferSize" | setReceiveBufferSize(int) |
"receiveBufferSizePredictor" |
setReceiveBufferSizePredictor(ReceiveBufferSizePredictor) |
"receiveBufferSizePredictorFactory" |
setReceiveBufferSizePredictorFactory(ReceiveBufferSizePredictorFactory) |
"sendBufferSize" | setSendBufferSize(int) |
"timeToLive" | setTimeToLive(int) |
"trafficClass" | setTrafficClass(int) |
| Modifier and Type | Method and Description |
|---|---|
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. |
int |
getReceiveBufferSize()
Gets the
StandardSocketOptions.SO_RCVBUF option. |
ReceiveBufferSizePredictor |
getReceiveBufferSizePredictor()
Returns the
ReceiveBufferSizePredictor which predicts the
number of readable bytes in the socket receive buffer. |
ReceiveBufferSizePredictorFactory |
getReceiveBufferSizePredictorFactory()
Returns the
ReceiveBufferSizePredictorFactory which creates a new
ReceiveBufferSizePredictor when a new channel is created and
no ReceiveBufferSizePredictor was set. |
int |
getSendBufferSize()
Gets the
StandardSocketOptions.SO_SNDBUF option. |
int |
getTimeToLive()
Gets the
StandardSocketOptions.IP_MULTICAST_TTL option. |
int |
getTrafficClass()
Gets the
StandardSocketOptions.IP_TOS option. |
boolean |
isBroadcast()
Gets the
StandardSocketOptions.SO_BROADCAST option. |
boolean |
isLoopbackModeDisabled()
Gets the
StandardSocketOptions.IP_MULTICAST_LOOP option. |
boolean |
isReuseAddress()
Gets the
StandardSocketOptions.SO_REUSEADDR option. |
void |
setBroadcast(boolean broadcast)
Sets the
StandardSocketOptions.SO_BROADCAST option. |
void |
setInterface(java.net.InetAddress interfaceAddress)
Sets the address of the network interface used for multicast packets.
|
void |
setLoopbackModeDisabled(boolean loopbackModeDisabled)
Sets the
StandardSocketOptions.IP_MULTICAST_LOOP option. |
void |
setNetworkInterface(java.net.NetworkInterface networkInterface)
Sets the
StandardSocketOptions.IP_MULTICAST_IF option. |
void |
setReceiveBufferSize(int receiveBufferSize)
Sets the
StandardSocketOptions.SO_RCVBUF option. |
void |
setReceiveBufferSizePredictor(ReceiveBufferSizePredictor predictor)
Sets the
ReceiveBufferSizePredictor which predicts the
number of readable bytes in the socket receive buffer. |
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)
Sets the
StandardSocketOptions.SO_REUSEADDR option. |
void |
setSendBufferSize(int sendBufferSize)
Sets the
StandardSocketOptions.SO_SNDBUF option. |
void |
setTimeToLive(int ttl)
Sets the
StandardSocketOptions.IP_MULTICAST_TTL option. |
void |
setTrafficClass(int trafficClass)
Gets the
StandardSocketOptions.IP_TOS option. |
getBufferFactory, getConnectTimeoutMillis, getPipelineFactory, setBufferFactory, setConnectTimeoutMillis, setOption, setOptions, setPipelineFactoryint getSendBufferSize()
StandardSocketOptions.SO_SNDBUF option.void setSendBufferSize(int sendBufferSize)
StandardSocketOptions.SO_SNDBUF option.int getReceiveBufferSize()
StandardSocketOptions.SO_RCVBUF option.void setReceiveBufferSize(int receiveBufferSize)
StandardSocketOptions.SO_RCVBUF option.int getTrafficClass()
StandardSocketOptions.IP_TOS option.void setTrafficClass(int trafficClass)
StandardSocketOptions.IP_TOS option.boolean isReuseAddress()
StandardSocketOptions.SO_REUSEADDR option.void setReuseAddress(boolean reuseAddress)
StandardSocketOptions.SO_REUSEADDR option.boolean isBroadcast()
StandardSocketOptions.SO_BROADCAST option.void setBroadcast(boolean broadcast)
StandardSocketOptions.SO_BROADCAST option.boolean isLoopbackModeDisabled()
StandardSocketOptions.IP_MULTICAST_LOOP option.void setLoopbackModeDisabled(boolean loopbackModeDisabled)
StandardSocketOptions.IP_MULTICAST_LOOP option.loopbackModeDisabled - true if and only if the loopback mode has been disabledint getTimeToLive()
StandardSocketOptions.IP_MULTICAST_TTL option.void setTimeToLive(int ttl)
StandardSocketOptions.IP_MULTICAST_TTL option.java.net.InetAddress getInterface()
void setInterface(java.net.InetAddress interfaceAddress)
java.net.NetworkInterface getNetworkInterface()
StandardSocketOptions.IP_MULTICAST_IF option.void setNetworkInterface(java.net.NetworkInterface networkInterface)
StandardSocketOptions.IP_MULTICAST_IF option.ReceiveBufferSizePredictor getReceiveBufferSizePredictor()
ReceiveBufferSizePredictor which predicts the
number of readable bytes in the socket receive buffer. The default
predictor is FixedReceiveBufferSizePredictor(768).void setReceiveBufferSizePredictor(ReceiveBufferSizePredictor predictor)
ReceiveBufferSizePredictor which predicts the
number of readable bytes in the socket receive buffer. The default
predictor is FixedReceiveBufferSizePredictor(768).ReceiveBufferSizePredictorFactory getReceiveBufferSizePredictorFactory()
ReceiveBufferSizePredictorFactory which creates a new
ReceiveBufferSizePredictor when a new channel is created and
no ReceiveBufferSizePredictor was set. If no predictor was set
for the channel, setReceiveBufferSizePredictor(ReceiveBufferSizePredictor)
will be called with the new predictor. The default factory is
FixedReceiveBufferSizePredictorFactory(768).void setReceiveBufferSizePredictorFactory(ReceiveBufferSizePredictorFactory predictorFactory)
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, setReceiveBufferSizePredictor(ReceiveBufferSizePredictor)
will be called with the new predictor. The default factory is
FixedReceiveBufferSizePredictorFactory(768).