
public class DefaultDatagramChannelConfig extends DefaultChannelConfig implements DatagramChannelConfig
DatagramChannelConfig implementation.| Constructor and Description |
|---|
DefaultDatagramChannelConfig(DatagramSocket socket)
Creates a new instance.
|
| 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. |
boolean |
setOption(String key,
Object value)
Sets a configuration property with the specified name and value.
|
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, setOptions, setPipelineFactory, setWriteTimeoutMillisclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBufferFactory, getConnectTimeoutMillis, getPipelineFactory, getWriteTimeoutMillis, setBufferFactory, setConnectTimeoutMillis, setOptions, setPipelineFactory, setWriteTimeoutMillispublic DefaultDatagramChannelConfig(DatagramSocket socket)
public boolean setOption(String key, 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;
}
setOption in interface ChannelConfigsetOption in class DefaultChannelConfigtrue if and only if the property has been setpublic boolean isBroadcast()
DatagramChannelConfigSO_BROADCAST option.isBroadcast in interface DatagramChannelConfigpublic void setBroadcast(boolean broadcast)
DatagramChannelConfigSO_BROADCAST option.setBroadcast in interface DatagramChannelConfigpublic InetAddress getInterface()
DatagramChannelConfiggetInterface in interface DatagramChannelConfigpublic void setInterface(InetAddress interfaceAddress)
DatagramChannelConfigsetInterface in interface DatagramChannelConfigpublic boolean isLoopbackModeDisabled()
DatagramChannelConfigisLoopbackModeDisabled in interface DatagramChannelConfigtrue if and only if the loopback mode has been disabledpublic void setLoopbackModeDisabled(boolean loopbackModeDisabled)
DatagramChannelConfigsetLoopbackModeDisabled in interface DatagramChannelConfigloopbackModeDisabled - true if and only if the loopback mode has been disabledpublic NetworkInterface getNetworkInterface()
DatagramChannelConfigDatagramChannel.getNetworkInterface in interface DatagramChannelConfigpublic void setNetworkInterface(NetworkInterface networkInterface)
DatagramChannelConfigDatagramChannel.setNetworkInterface in interface DatagramChannelConfigpublic boolean isReuseAddress()
DatagramChannelConfigSO_REUSEADDR option.isReuseAddress in interface DatagramChannelConfigpublic void setReuseAddress(boolean reuseAddress)
DatagramChannelConfigSO_REUSEADDR option.setReuseAddress in interface DatagramChannelConfigpublic int getReceiveBufferSize()
DatagramChannelConfigSO_RCVBUF option.getReceiveBufferSize in interface DatagramChannelConfigpublic void setReceiveBufferSize(int receiveBufferSize)
DatagramChannelConfigSO_RCVBUF option.setReceiveBufferSize in interface DatagramChannelConfigpublic int getSendBufferSize()
DatagramChannelConfigSO_SNDBUF option.getSendBufferSize in interface DatagramChannelConfigpublic void setSendBufferSize(int sendBufferSize)
DatagramChannelConfigSO_SNDBUF option.setSendBufferSize in interface DatagramChannelConfigpublic int getTimeToLive()
DatagramChannelConfiggetTimeToLive in interface DatagramChannelConfigpublic void setTimeToLive(int ttl)
DatagramChannelConfigDatagramChannel in order to control the scope of the multicasts.setTimeToLive in interface DatagramChannelConfigpublic int getTrafficClass()
DatagramChannelConfiggetTrafficClass in interface DatagramChannelConfigpublic void setTrafficClass(int trafficClass)
DatagramChannelConfigDatagramSocket.setTrafficClass(int).setTrafficClass in interface DatagramChannelConfigpublic ReceiveBufferSizePredictor getReceiveBufferSizePredictor()
DatagramChannelConfigReceiveBufferSizePredictor which predicts the
number of readable bytes in the socket receive buffer. The default
predictor is FixedReceiveBufferSizePredictor(768).getReceiveBufferSizePredictor in interface DatagramChannelConfigpublic void setReceiveBufferSizePredictor(ReceiveBufferSizePredictor predictor)
DatagramChannelConfigReceiveBufferSizePredictor which predicts the
number of readable bytes in the socket receive buffer. The default
predictor is FixedReceiveBufferSizePredictor(768).setReceiveBufferSizePredictor in interface DatagramChannelConfigCopyright © 2008-2013 JBoss, by Red Hat. All Rights Reserved.