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
AChannelConfig
for aDatagramChannel
.Available options
In addition to the options provided byChannelConfig
,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)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.net.InetAddress
getInterface()
Gets the address of the network interface used for multicast packets.java.net.NetworkInterface
getNetworkInterface()
Gets theStandardSocketOptions.IP_MULTICAST_IF
option.int
getReceiveBufferSize()
Gets theStandardSocketOptions.SO_RCVBUF
option.ReceiveBufferSizePredictor
getReceiveBufferSizePredictor()
Returns theReceiveBufferSizePredictor
which predicts the number of readable bytes in the socket receive buffer.ReceiveBufferSizePredictorFactory
getReceiveBufferSizePredictorFactory()
Returns theReceiveBufferSizePredictorFactory
which creates a newReceiveBufferSizePredictor
when a new channel is created and noReceiveBufferSizePredictor
was set.int
getSendBufferSize()
Gets theStandardSocketOptions.SO_SNDBUF
option.int
getTimeToLive()
Gets theStandardSocketOptions.IP_MULTICAST_TTL
option.int
getTrafficClass()
Gets theStandardSocketOptions.IP_TOS
option.boolean
isBroadcast()
Gets theStandardSocketOptions.SO_BROADCAST
option.boolean
isLoopbackModeDisabled()
Gets theStandardSocketOptions.IP_MULTICAST_LOOP
option.boolean
isReuseAddress()
Gets theStandardSocketOptions.SO_REUSEADDR
option.void
setBroadcast(boolean broadcast)
Sets theStandardSocketOptions.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 theStandardSocketOptions.IP_MULTICAST_LOOP
option.void
setNetworkInterface(java.net.NetworkInterface networkInterface)
Sets theStandardSocketOptions.IP_MULTICAST_IF
option.void
setReceiveBufferSize(int receiveBufferSize)
Sets theStandardSocketOptions.SO_RCVBUF
option.void
setReceiveBufferSizePredictor(ReceiveBufferSizePredictor predictor)
Sets theReceiveBufferSizePredictor
which predicts the number of readable bytes in the socket receive buffer.void
setReceiveBufferSizePredictorFactory(ReceiveBufferSizePredictorFactory predictorFactory)
Sets theReceiveBufferSizePredictor
which creates a newReceiveBufferSizePredictor
when a new channel is created and noReceiveBufferSizePredictor
was set.void
setReuseAddress(boolean reuseAddress)
Sets theStandardSocketOptions.SO_REUSEADDR
option.void
setSendBufferSize(int sendBufferSize)
Sets theStandardSocketOptions.SO_SNDBUF
option.void
setTimeToLive(int ttl)
Sets theStandardSocketOptions.IP_MULTICAST_TTL
option.void
setTrafficClass(int trafficClass)
Gets theStandardSocketOptions.IP_TOS
option.-
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_SNDBUF
option.
-
setSendBufferSize
void setSendBufferSize(int sendBufferSize)
Sets theStandardSocketOptions.SO_SNDBUF
option.
-
getReceiveBufferSize
int getReceiveBufferSize()
Gets theStandardSocketOptions.SO_RCVBUF
option.
-
setReceiveBufferSize
void setReceiveBufferSize(int receiveBufferSize)
Sets theStandardSocketOptions.SO_RCVBUF
option.
-
getTrafficClass
int getTrafficClass()
Gets theStandardSocketOptions.IP_TOS
option.
-
setTrafficClass
void setTrafficClass(int trafficClass)
Gets theStandardSocketOptions.IP_TOS
option.
-
isReuseAddress
boolean isReuseAddress()
Gets theStandardSocketOptions.SO_REUSEADDR
option.
-
setReuseAddress
void setReuseAddress(boolean reuseAddress)
Sets theStandardSocketOptions.SO_REUSEADDR
option.
-
isBroadcast
boolean isBroadcast()
Gets theStandardSocketOptions.SO_BROADCAST
option.
-
setBroadcast
void setBroadcast(boolean broadcast)
Sets theStandardSocketOptions.SO_BROADCAST
option.
-
isLoopbackModeDisabled
boolean isLoopbackModeDisabled()
Gets theStandardSocketOptions.IP_MULTICAST_LOOP
option.
-
setLoopbackModeDisabled
void setLoopbackModeDisabled(boolean loopbackModeDisabled)
Sets theStandardSocketOptions.IP_MULTICAST_LOOP
option.- Parameters:
loopbackModeDisabled
-true
if and only if the loopback mode has been disabled
-
getTimeToLive
int getTimeToLive()
Gets theStandardSocketOptions.IP_MULTICAST_TTL
option.
-
setTimeToLive
void setTimeToLive(int ttl)
Sets theStandardSocketOptions.IP_MULTICAST_TTL
option.
-
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_IF
option.
-
setNetworkInterface
void setNetworkInterface(java.net.NetworkInterface networkInterface)
Sets theStandardSocketOptions.IP_MULTICAST_IF
option.
-
getReceiveBufferSizePredictor
ReceiveBufferSizePredictor getReceiveBufferSizePredictor()
Returns theReceiveBufferSizePredictor
which predicts the number of readable bytes in the socket receive buffer. The default predictor isFixedReceiveBufferSizePredictor
(768).
-
setReceiveBufferSizePredictor
void setReceiveBufferSizePredictor(ReceiveBufferSizePredictor predictor)
Sets theReceiveBufferSizePredictor
which predicts the number of readable bytes in the socket receive buffer. The default predictor isFixedReceiveBufferSizePredictor
(768).
-
getReceiveBufferSizePredictorFactory
ReceiveBufferSizePredictorFactory getReceiveBufferSizePredictorFactory()
Returns theReceiveBufferSizePredictorFactory
which creates a newReceiveBufferSizePredictor
when a new channel is created and noReceiveBufferSizePredictor
was 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 theReceiveBufferSizePredictor
which creates a newReceiveBufferSizePredictor
when a new channel is created and noReceiveBufferSizePredictor
was set. If no predictor was set for the channel,setReceiveBufferSizePredictor(ReceiveBufferSizePredictor)
will be called with the new predictor. The default factory isFixedReceiveBufferSizePredictorFactory
(768).
-
-