Package org.apache.mina.transport.socket
Class DefaultDatagramSessionConfig
- java.lang.Object
-
- org.apache.mina.core.session.AbstractIoSessionConfig
-
- org.apache.mina.transport.socket.AbstractDatagramSessionConfig
-
- org.apache.mina.transport.socket.DefaultDatagramSessionConfig
-
- All Implemented Interfaces:
IoSessionConfig,DatagramSessionConfig
public class DefaultDatagramSessionConfig extends AbstractDatagramSessionConfig
A default implementation ofDatagramSessionConfig.- Author:
- Apache MINA Project
-
-
Constructor Summary
Constructors Constructor Description DefaultDatagramSessionConfig()Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetReceiveBufferSize()intgetSendBufferSize()intgetTrafficClass()booleanisBroadcast()protected booleanisBroadcastChanged()protected booleanisReceiveBufferSizeChanged()booleanisReuseAddress()protected booleanisReuseAddressChanged()protected booleanisSendBufferSizeChanged()protected booleanisTrafficClassChanged()voidsetBroadcast(boolean broadcast)voidsetReceiveBufferSize(int receiveBufferSize)voidsetReuseAddress(boolean reuseAddress)voidsetSendBufferSize(int sendBufferSize)voidsetTrafficClass(int trafficClass)-
Methods inherited from class org.apache.mina.transport.socket.AbstractDatagramSessionConfig
isCloseOnPortUnreachable, setAll, setCloseOnPortUnreachable
-
Methods inherited from class org.apache.mina.core.session.AbstractIoSessionConfig
getBothIdleTime, getBothIdleTimeInMillis, getIdleTime, getIdleTimeInMillis, getMaxReadBufferSize, getMinReadBufferSize, getReadBufferSize, getReaderIdleTime, getReaderIdleTimeInMillis, getThroughputCalculationInterval, getThroughputCalculationIntervalInMillis, getWriterIdleTime, getWriterIdleTimeInMillis, getWriteTimeout, getWriteTimeoutInMillis, isUseReadOperation, setBothIdleTime, setIdleTime, setMaxReadBufferSize, setMinReadBufferSize, setReadBufferSize, setReaderIdleTime, setThroughputCalculationInterval, setUseReadOperation, setWriterIdleTime, setWriteTimeout
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.mina.core.session.IoSessionConfig
getBothIdleTime, getBothIdleTimeInMillis, getIdleTime, getIdleTimeInMillis, getMaxReadBufferSize, getMinReadBufferSize, getReadBufferSize, getReaderIdleTime, getReaderIdleTimeInMillis, getThroughputCalculationInterval, getThroughputCalculationIntervalInMillis, getWriterIdleTime, getWriterIdleTimeInMillis, getWriteTimeout, getWriteTimeoutInMillis, isUseReadOperation, setBothIdleTime, setIdleTime, setMaxReadBufferSize, setMinReadBufferSize, setReadBufferSize, setReaderIdleTime, setThroughputCalculationInterval, setUseReadOperation, setWriterIdleTime, setWriteTimeout
-
-
-
-
Method Detail
-
isBroadcast
public boolean isBroadcast()
- Returns:
- true if SO_BROADCAST is enabled.
- See Also:
DatagramSocket.getBroadcast()
-
setBroadcast
public void setBroadcast(boolean broadcast)
- Parameters:
broadcast- Tells if SO_BROACAST is enabled or not- See Also:
DatagramSocket.setBroadcast(boolean)
-
isReuseAddress
public boolean isReuseAddress()
- Returns:
- true if SO_REUSEADDR is enabled.
- See Also:
DatagramSocket.getReuseAddress()
-
setReuseAddress
public void setReuseAddress(boolean reuseAddress)
- Parameters:
reuseAddress- Tells if SO_REUSEADDR is enabled or disabled- See Also:
DatagramSocket.setReuseAddress(boolean)
-
getReceiveBufferSize
public int getReceiveBufferSize()
- Returns:
- the size of the receive buffer
- See Also:
DatagramSocket.getReceiveBufferSize()
-
setReceiveBufferSize
public void setReceiveBufferSize(int receiveBufferSize)
- Parameters:
receiveBufferSize- The size of the receive buffer- See Also:
DatagramSocket.setReceiveBufferSize(int)
-
getSendBufferSize
public int getSendBufferSize()
- Returns:
- the size of the send buffer
- See Also:
DatagramSocket.getSendBufferSize()
-
setSendBufferSize
public void setSendBufferSize(int sendBufferSize)
- Parameters:
sendBufferSize- The size of the send buffer- See Also:
DatagramSocket.setSendBufferSize(int)
-
getTrafficClass
public int getTrafficClass()
- Returns:
- the traffic class
- See Also:
DatagramSocket.getTrafficClass()
-
setTrafficClass
public void setTrafficClass(int trafficClass)
- Parameters:
trafficClass- The traffic class to set, one of IPTOS_LOWCOST (0x02) IPTOS_RELIABILITY (0x04), IPTOS_THROUGHPUT (0x08) or IPTOS_LOWDELAY (0x10)- See Also:
DatagramSocket.setTrafficClass(int)
-
isBroadcastChanged
protected boolean isBroadcastChanged()
- Overrides:
isBroadcastChangedin classAbstractDatagramSessionConfig- Returns:
- true if and only if the broadcast property has been changed by its setter method. The system call related with the property is made only when this method returns true. By default, this method always returns true to simplify implementation of subclasses, but overriding the default behavior is always encouraged.
-
isReceiveBufferSizeChanged
protected boolean isReceiveBufferSizeChanged()
- Overrides:
isReceiveBufferSizeChangedin classAbstractDatagramSessionConfig- Returns:
- true if and only if the receiveBufferSize property has been changed by its setter method. The system call related with the property is made only when this method returns true. By default, this method always returns true to simplify implementation of subclasses, but overriding the default behavior is always encouraged.
-
isReuseAddressChanged
protected boolean isReuseAddressChanged()
- Overrides:
isReuseAddressChangedin classAbstractDatagramSessionConfig- Returns:
- true if and only if the reuseAddress property has been changed by its setter method. The system call related with the property is made only when this method returns true. By default, this method always returns true to simplify implementation of subclasses, but overriding the default behavior is always encouraged.
-
isSendBufferSizeChanged
protected boolean isSendBufferSizeChanged()
- Overrides:
isSendBufferSizeChangedin classAbstractDatagramSessionConfig- Returns:
- true if and only if the sendBufferSize property has been changed by its setter method. The system call related with the property is made only when this method returns true. By default, this method always returns true to simplify implementation of subclasses, but overriding the default behavior is always encouraged.
-
isTrafficClassChanged
protected boolean isTrafficClassChanged()
- Overrides:
isTrafficClassChangedin classAbstractDatagramSessionConfig- Returns:
- true if and only if the trafficClass property has been changed by its setter method. The system call related with the property is made only when this method returns true. By default, this method always returns true to simplify implementation of subclasses, but overriding the default behavior is always encouraged.
-
-