
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) |
"sendBufferSize" | setSendBufferSize(int) |
"timeToLive" | setTimeToLive(int) |
"trafficClass" | setTrafficClass(int) |
| Modifier and Type | Method and Description |
|---|---|
InetAddress |
getInterface()
Gets the address of the network interface used for multicast packets.
|
NetworkInterface |
getNetworkInterface()
Gets the network interface for outgoing multicast datagrams sent on
the
DatagramChannel. |
int |
getReceiveBufferSize()
Gets the
SO_RCVBUF option. |
ReceiveBufferSizePredictor |
getReceiveBufferSizePredictor()
Returns the
ReceiveBufferSizePredictor which predicts the
number of readable bytes in the socket receive buffer. |
int |
getSendBufferSize()
Gets the
SO_SNDBUF option. |
int |
getTimeToLive()
Gets the default time-to-live for multicast packets sent out on the
socket.
|
int |
getTrafficClass()
Gets the traffic class.
|
boolean |
isBroadcast()
Gets the
SO_BROADCAST option. |
boolean |
isLoopbackModeDisabled()
Gets the setting for local loopback of multicast datagrams.
|
boolean |
isReuseAddress()
Gets the
SO_REUSEADDR option. |
void |
setBroadcast(boolean broadcast)
Sets the
SO_BROADCAST option. |
void |
setInterface(InetAddress interfaceAddress)
Sets the address of the network interface used for multicast packets.
|
void |
setLoopbackModeDisabled(boolean loopbackModeDisabled)
Sets the setting for local loopback of multicast datagrams.
|
void |
setNetworkInterface(NetworkInterface networkInterface)
Sets the network interface for outgoing multicast datagrams sent on
the
DatagramChannel. |
void |
setReceiveBufferSize(int receiveBufferSize)
Gets the
SO_RCVBUF option. |
void |
setReceiveBufferSizePredictor(ReceiveBufferSizePredictor predictor)
Sets the
ReceiveBufferSizePredictor which predicts the
number of readable bytes in the socket receive buffer. |
void |
setReuseAddress(boolean reuseAddress)
Sets the
SO_REUSEADDR option. |
void |
setSendBufferSize(int sendBufferSize)
Sets the
SO_SNDBUF option. |
void |
setTimeToLive(int ttl)
Sets the default time-to-live for multicast packets sent out on the
DatagramChannel in order to control the scope of the multicasts. |
void |
setTrafficClass(int trafficClass)
Sets the traffic class as specified in
DatagramSocket.setTrafficClass(int). |
getBufferFactory, getConnectTimeoutMillis, getPipelineFactory, getWriteTimeoutMillis, setBufferFactory, setConnectTimeoutMillis, setOption, setOptions, setPipelineFactory, setWriteTimeoutMillisint getSendBufferSize()
SO_SNDBUF option.void setSendBufferSize(int sendBufferSize)
SO_SNDBUF option.int getReceiveBufferSize()
SO_RCVBUF option.void setReceiveBufferSize(int receiveBufferSize)
SO_RCVBUF option.int getTrafficClass()
void setTrafficClass(int trafficClass)
DatagramSocket.setTrafficClass(int).boolean isReuseAddress()
SO_REUSEADDR option.void setReuseAddress(boolean reuseAddress)
SO_REUSEADDR option.boolean isBroadcast()
SO_BROADCAST option.void setBroadcast(boolean broadcast)
SO_BROADCAST option.boolean isLoopbackModeDisabled()
true if and only if the loopback mode has been disabledvoid setLoopbackModeDisabled(boolean loopbackModeDisabled)
loopbackModeDisabled - true if and only if the loopback mode has been disabledint getTimeToLive()
void setTimeToLive(int ttl)
DatagramChannel in order to control the scope of the multicasts.InetAddress getInterface()
void setInterface(InetAddress interfaceAddress)
NetworkInterface getNetworkInterface()
DatagramChannel.void setNetworkInterface(NetworkInterface networkInterface)
DatagramChannel.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).Copyright © 2008-2013 JBoss, by Red Hat. All Rights Reserved.