Package org.apache.mina.transport.socket
Interface DatagramSessionConfig
-
- All Superinterfaces:
IoSessionConfig
- All Known Implementing Classes:
AbstractDatagramSessionConfig,DefaultDatagramSessionConfig,NioDatagramSessionConfig
public interface DatagramSessionConfig extends IoSessionConfig
AnIoSessionConfigfor datagram transport type.- Author:
- Apache MINA Project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetReceiveBufferSize()intgetSendBufferSize()intgetTrafficClass()booleanisBroadcast()booleanisCloseOnPortUnreachable()If method returns true, it means session should be closed when aPortUnreachableExceptionoccurs.booleanisReuseAddress()voidsetBroadcast(boolean broadcast)voidsetCloseOnPortUnreachable(boolean closeOnPortUnreachable)Sets if the session should be closed if anPortUnreachableExceptionoccurs.voidsetReceiveBufferSize(int receiveBufferSize)voidsetReuseAddress(boolean reuseAddress)voidsetSendBufferSize(int sendBufferSize)voidsetTrafficClass(int trafficClass)-
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, setAll, setBothIdleTime, setIdleTime, setMaxReadBufferSize, setMinReadBufferSize, setReadBufferSize, setReaderIdleTime, setThroughputCalculationInterval, setUseReadOperation, setWriterIdleTime, setWriteTimeout
-
-
-
-
Method Detail
-
isBroadcast
boolean isBroadcast()
- Returns:
trueif SO_BROADCAST is enabled.- See Also:
DatagramSocket.getBroadcast()
-
setBroadcast
void setBroadcast(boolean broadcast)
- Parameters:
broadcast- Tells if SO_BROACAST is enabled or not- See Also:
DatagramSocket.setBroadcast(boolean)
-
isReuseAddress
boolean isReuseAddress()
- Returns:
trueif SO_REUSEADDR is enabled.- See Also:
DatagramSocket.getReuseAddress()
-
setReuseAddress
void setReuseAddress(boolean reuseAddress)
- Parameters:
reuseAddress- Tells if SO_REUSEADDR is enabled or disabled- See Also:
DatagramSocket.setReuseAddress(boolean)
-
getReceiveBufferSize
int getReceiveBufferSize()
- Returns:
- the size of the receive buffer
- See Also:
DatagramSocket.getReceiveBufferSize()
-
setReceiveBufferSize
void setReceiveBufferSize(int receiveBufferSize)
- Parameters:
receiveBufferSize- The size of the receive buffer- See Also:
DatagramSocket.setReceiveBufferSize(int)
-
getSendBufferSize
int getSendBufferSize()
- Returns:
- the size of the send buffer
- See Also:
DatagramSocket.getSendBufferSize()
-
setSendBufferSize
void setSendBufferSize(int sendBufferSize)
- Parameters:
sendBufferSize- The size of the send buffer- See Also:
DatagramSocket.setSendBufferSize(int)
-
getTrafficClass
int getTrafficClass()
- Returns:
- the traffic class
- See Also:
DatagramSocket.getTrafficClass()
-
setTrafficClass
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)
-
isCloseOnPortUnreachable
boolean isCloseOnPortUnreachable()
If method returns true, it means session should be closed when aPortUnreachableExceptionoccurs.- Returns:
- Tells if we should close if the port is unreachable
-
setCloseOnPortUnreachable
void setCloseOnPortUnreachable(boolean closeOnPortUnreachable)
Sets if the session should be closed if anPortUnreachableExceptionoccurs.- Parameters:
closeOnPortUnreachable-trueif we should close if the port is unreachable
-
-