Package org.jboss.netty.channel.socket
Interface DatagramChannelConfig
-
- All Superinterfaces:
ChannelConfig
- All Known Subinterfaces:
NioDatagramChannelConfig
- All Known Implementing Classes:
DefaultDatagramChannelConfig,DefaultNioDatagramChannelConfig
public interface DatagramChannelConfig extends ChannelConfig
AChannelConfigfor aDatagramChannel.Available options
In addition to the options provided byChannelConfig,DatagramChannelConfigallows 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)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.net.InetAddressgetInterface()Gets the address of the network interface used for multicast packets.java.net.NetworkInterfacegetNetworkInterface()Gets theStandardSocketOptions.IP_MULTICAST_IFoption.intgetReceiveBufferSize()Gets theStandardSocketOptions.SO_RCVBUFoption.ReceiveBufferSizePredictorgetReceiveBufferSizePredictor()Returns theReceiveBufferSizePredictorwhich predicts the number of readable bytes in the socket receive buffer.ReceiveBufferSizePredictorFactorygetReceiveBufferSizePredictorFactory()Returns theReceiveBufferSizePredictorFactorywhich creates a newReceiveBufferSizePredictorwhen a new channel is created and noReceiveBufferSizePredictorwas set.intgetSendBufferSize()Gets theStandardSocketOptions.SO_SNDBUFoption.intgetTimeToLive()Gets theStandardSocketOptions.IP_MULTICAST_TTLoption.intgetTrafficClass()Gets theStandardSocketOptions.IP_TOSoption.booleanisBroadcast()Gets theStandardSocketOptions.SO_BROADCASToption.booleanisLoopbackModeDisabled()Gets theStandardSocketOptions.IP_MULTICAST_LOOPoption.booleanisReuseAddress()Gets theStandardSocketOptions.SO_REUSEADDRoption.voidsetBroadcast(boolean broadcast)Sets theStandardSocketOptions.SO_BROADCASToption.voidsetInterface(java.net.InetAddress interfaceAddress)Sets the address of the network interface used for multicast packets.voidsetLoopbackModeDisabled(boolean loopbackModeDisabled)Sets theStandardSocketOptions.IP_MULTICAST_LOOPoption.voidsetNetworkInterface(java.net.NetworkInterface networkInterface)Sets theStandardSocketOptions.IP_MULTICAST_IFoption.voidsetReceiveBufferSize(int receiveBufferSize)Sets theStandardSocketOptions.SO_RCVBUFoption.voidsetReceiveBufferSizePredictor(ReceiveBufferSizePredictor predictor)Sets theReceiveBufferSizePredictorwhich predicts the number of readable bytes in the socket receive buffer.voidsetReceiveBufferSizePredictorFactory(ReceiveBufferSizePredictorFactory predictorFactory)Sets theReceiveBufferSizePredictorwhich creates a newReceiveBufferSizePredictorwhen a new channel is created and noReceiveBufferSizePredictorwas set.voidsetReuseAddress(boolean reuseAddress)Sets theStandardSocketOptions.SO_REUSEADDRoption.voidsetSendBufferSize(int sendBufferSize)Sets theStandardSocketOptions.SO_SNDBUFoption.voidsetTimeToLive(int ttl)Sets theStandardSocketOptions.IP_MULTICAST_TTLoption.voidsetTrafficClass(int trafficClass)Gets theStandardSocketOptions.IP_TOSoption.-
Methods inherited from interface org.jboss.netty.channel.ChannelConfig
getBufferFactory, getConnectTimeoutMillis, getPipelineFactory, setBufferFactory, setConnectTimeoutMillis, setOption, setOptions, setPipelineFactory
-
-
-
-
Method Detail
-
getSendBufferSize
int getSendBufferSize()
Gets theStandardSocketOptions.SO_SNDBUFoption.
-
setSendBufferSize
void setSendBufferSize(int sendBufferSize)
Sets theStandardSocketOptions.SO_SNDBUFoption.
-
getReceiveBufferSize
int getReceiveBufferSize()
Gets theStandardSocketOptions.SO_RCVBUFoption.
-
setReceiveBufferSize
void setReceiveBufferSize(int receiveBufferSize)
Sets theStandardSocketOptions.SO_RCVBUFoption.
-
getTrafficClass
int getTrafficClass()
Gets theStandardSocketOptions.IP_TOSoption.
-
setTrafficClass
void setTrafficClass(int trafficClass)
Gets theStandardSocketOptions.IP_TOSoption.
-
isReuseAddress
boolean isReuseAddress()
Gets theStandardSocketOptions.SO_REUSEADDRoption.
-
setReuseAddress
void setReuseAddress(boolean reuseAddress)
Sets theStandardSocketOptions.SO_REUSEADDRoption.
-
isBroadcast
boolean isBroadcast()
Gets theStandardSocketOptions.SO_BROADCASToption.
-
setBroadcast
void setBroadcast(boolean broadcast)
Sets theStandardSocketOptions.SO_BROADCASToption.
-
isLoopbackModeDisabled
boolean isLoopbackModeDisabled()
Gets theStandardSocketOptions.IP_MULTICAST_LOOPoption.
-
setLoopbackModeDisabled
void setLoopbackModeDisabled(boolean loopbackModeDisabled)
Sets theStandardSocketOptions.IP_MULTICAST_LOOPoption.- Parameters:
loopbackModeDisabled-trueif and only if the loopback mode has been disabled
-
getTimeToLive
int getTimeToLive()
Gets theStandardSocketOptions.IP_MULTICAST_TTLoption.
-
setTimeToLive
void setTimeToLive(int ttl)
Sets theStandardSocketOptions.IP_MULTICAST_TTLoption.
-
getInterface
java.net.InetAddress getInterface()
Gets the address of the network interface used for multicast packets.
-
setInterface
void setInterface(java.net.InetAddress interfaceAddress)
Sets the address of the network interface used for multicast packets.
-
getNetworkInterface
java.net.NetworkInterface getNetworkInterface()
Gets theStandardSocketOptions.IP_MULTICAST_IFoption.
-
setNetworkInterface
void setNetworkInterface(java.net.NetworkInterface networkInterface)
Sets theStandardSocketOptions.IP_MULTICAST_IFoption.
-
getReceiveBufferSizePredictor
ReceiveBufferSizePredictor getReceiveBufferSizePredictor()
Returns theReceiveBufferSizePredictorwhich predicts the number of readable bytes in the socket receive buffer. The default predictor isFixedReceiveBufferSizePredictor(768).
-
setReceiveBufferSizePredictor
void setReceiveBufferSizePredictor(ReceiveBufferSizePredictor predictor)
Sets theReceiveBufferSizePredictorwhich predicts the number of readable bytes in the socket receive buffer. The default predictor isFixedReceiveBufferSizePredictor(768).
-
getReceiveBufferSizePredictorFactory
ReceiveBufferSizePredictorFactory getReceiveBufferSizePredictorFactory()
Returns theReceiveBufferSizePredictorFactorywhich creates a newReceiveBufferSizePredictorwhen a new channel is created and noReceiveBufferSizePredictorwas set. If no predictor was set for the channel,setReceiveBufferSizePredictor(ReceiveBufferSizePredictor)will be called with the new predictor. The default factory isFixedReceiveBufferSizePredictorFactory(768).
-
setReceiveBufferSizePredictorFactory
void setReceiveBufferSizePredictorFactory(ReceiveBufferSizePredictorFactory predictorFactory)
Sets theReceiveBufferSizePredictorwhich creates a newReceiveBufferSizePredictorwhen a new channel is created and noReceiveBufferSizePredictorwas set. If no predictor was set for the channel,setReceiveBufferSizePredictor(ReceiveBufferSizePredictor)will be called with the new predictor. The default factory isFixedReceiveBufferSizePredictorFactory(768).
-
-