public class DefaultDatagramChannelConfig extends DefaultChannelConfig implements DatagramChannelConfig
DatagramChannelConfig
implementation.Constructor and Description |
---|
DefaultDatagramChannelConfig(DatagramSocket socket)
Creates a new instance.
|
getBufferFactory, getConnectTimeoutMillis, getPipelineFactory, setBufferFactory, setConnectTimeoutMillis, setOptions, setPipelineFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBufferFactory, getConnectTimeoutMillis, getPipelineFactory, setBufferFactory, setConnectTimeoutMillis, setOptions, setPipelineFactory
public 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 ChannelConfig
setOption
in class DefaultChannelConfig
true
if and only if the property has been setpublic boolean isBroadcast()
DatagramChannelConfig
StandardSocketOptions.SO_BROADCAST
option.isBroadcast
in interface DatagramChannelConfig
public void setBroadcast(boolean broadcast)
DatagramChannelConfig
StandardSocketOptions.SO_BROADCAST
option.setBroadcast
in interface DatagramChannelConfig
public InetAddress getInterface()
DatagramChannelConfig
getInterface
in interface DatagramChannelConfig
public void setInterface(InetAddress interfaceAddress)
DatagramChannelConfig
setInterface
in interface DatagramChannelConfig
public boolean isLoopbackModeDisabled()
DatagramChannelConfig
StandardSocketOptions.IP_MULTICAST_LOOP
option.isLoopbackModeDisabled
in interface DatagramChannelConfig
public void setLoopbackModeDisabled(boolean loopbackModeDisabled)
DatagramChannelConfig
StandardSocketOptions.IP_MULTICAST_LOOP
option.setLoopbackModeDisabled
in interface DatagramChannelConfig
loopbackModeDisabled
- true
if and only if the loopback mode has been disabledpublic NetworkInterface getNetworkInterface()
DatagramChannelConfig
StandardSocketOptions.IP_MULTICAST_IF
option.getNetworkInterface
in interface DatagramChannelConfig
public void setNetworkInterface(NetworkInterface networkInterface)
DatagramChannelConfig
StandardSocketOptions.IP_MULTICAST_IF
option.setNetworkInterface
in interface DatagramChannelConfig
public boolean isReuseAddress()
DatagramChannelConfig
StandardSocketOptions.SO_REUSEADDR
option.isReuseAddress
in interface DatagramChannelConfig
public void setReuseAddress(boolean reuseAddress)
DatagramChannelConfig
StandardSocketOptions.SO_REUSEADDR
option.setReuseAddress
in interface DatagramChannelConfig
public int getReceiveBufferSize()
DatagramChannelConfig
StandardSocketOptions.SO_RCVBUF
option.getReceiveBufferSize
in interface DatagramChannelConfig
public void setReceiveBufferSize(int receiveBufferSize)
DatagramChannelConfig
StandardSocketOptions.SO_RCVBUF
option.setReceiveBufferSize
in interface DatagramChannelConfig
public int getSendBufferSize()
DatagramChannelConfig
StandardSocketOptions.SO_SNDBUF
option.getSendBufferSize
in interface DatagramChannelConfig
public void setSendBufferSize(int sendBufferSize)
DatagramChannelConfig
StandardSocketOptions.SO_SNDBUF
option.setSendBufferSize
in interface DatagramChannelConfig
public int getTimeToLive()
DatagramChannelConfig
StandardSocketOptions.IP_MULTICAST_TTL
option.getTimeToLive
in interface DatagramChannelConfig
public void setTimeToLive(int ttl)
DatagramChannelConfig
StandardSocketOptions.IP_MULTICAST_TTL
option.setTimeToLive
in interface DatagramChannelConfig
public int getTrafficClass()
DatagramChannelConfig
StandardSocketOptions.IP_TOS
option.getTrafficClass
in interface DatagramChannelConfig
public void setTrafficClass(int trafficClass)
DatagramChannelConfig
StandardSocketOptions.IP_TOS
option.setTrafficClass
in interface DatagramChannelConfig
public ReceiveBufferSizePredictor getReceiveBufferSizePredictor()
DatagramChannelConfig
ReceiveBufferSizePredictor
which predicts the
number of readable bytes in the socket receive buffer. The default
predictor is FixedReceiveBufferSizePredictor
(768).getReceiveBufferSizePredictor
in interface DatagramChannelConfig
public void setReceiveBufferSizePredictor(ReceiveBufferSizePredictor predictor)
DatagramChannelConfig
ReceiveBufferSizePredictor
which predicts the
number of readable bytes in the socket receive buffer. The default
predictor is FixedReceiveBufferSizePredictor
(768).setReceiveBufferSizePredictor
in interface DatagramChannelConfig
public ReceiveBufferSizePredictorFactory getReceiveBufferSizePredictorFactory()
DatagramChannelConfig
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, DatagramChannelConfig.setReceiveBufferSizePredictor(ReceiveBufferSizePredictor)
will be called with the new predictor. The default factory is
FixedReceiveBufferSizePredictorFactory
(768).getReceiveBufferSizePredictorFactory
in interface DatagramChannelConfig
public void setReceiveBufferSizePredictorFactory(ReceiveBufferSizePredictorFactory predictorFactory)
DatagramChannelConfig
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, DatagramChannelConfig.setReceiveBufferSizePredictor(ReceiveBufferSizePredictor)
will be called with the new predictor. The default factory is
FixedReceiveBufferSizePredictorFactory
(768).setReceiveBufferSizePredictorFactory
in interface DatagramChannelConfig
Copyright © 2008-2013 The Netty Project. All Rights Reserved.