Package org.apache.mina.transport.socket
Interface DatagramSessionConfig
-
- All Superinterfaces:
IoSessionConfig
- All Known Implementing Classes:
AbstractDatagramSessionConfig
,DefaultDatagramSessionConfig
public interface DatagramSessionConfig extends IoSessionConfig
AnIoSessionConfig
for datagram transport type.- Author:
- Apache MINA Project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getReceiveBufferSize()
int
getSendBufferSize()
int
getTrafficClass()
boolean
isBroadcast()
boolean
isCloseOnPortUnreachable()
If method returns true, it means session should be closed when aPortUnreachableException
occurs.boolean
isReuseAddress()
void
setBroadcast(boolean broadcast)
void
setCloseOnPortUnreachable(boolean closeOnPortUnreachable)
Sets if the session should be closed if anPortUnreachableException
occurs.void
setReceiveBufferSize(int receiveBufferSize)
void
setReuseAddress(boolean reuseAddress)
void
setSendBufferSize(int sendBufferSize)
void
setTrafficClass(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:
true
if 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:
true
if 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 aPortUnreachableException
occurs.- Returns:
- Tells if we should close if the port is unreachable
-
setCloseOnPortUnreachable
void setCloseOnPortUnreachable(boolean closeOnPortUnreachable)
Sets if the session should be closed if anPortUnreachableException
occurs.- Parameters:
closeOnPortUnreachable
-true
if we should close if the port is unreachable
-
-