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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetReceiveBufferSize()Get the size of the receive bufferintgetSendBufferSize()Get the size of the send bufferintgetTrafficClass()Get the traffic classbooleanisBroadcast()Tell if SO_BROADCAST is enabledbooleanisCloseOnPortUnreachable()Tells if we should close if the port is unreachable If method returns true, it means session should be closed when aPortUnreachableExceptionoccurs.booleanisReuseAddress()Tells if SO_REUSEADDR is enabledvoidsetBroadcast(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()
Tell if SO_BROADCAST is enabled- 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()
Tells if SO_REUSEADDR is enabled- 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()
Get the size of the receive buffer- 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()
Get the size of the send buffer- 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()
Get the traffic class- 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()
Tells if we should close if the port is unreachable 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
-
-