org.apache.mina.transport.socket
Class DefaultSocketSessionConfig

java.lang.Object
  extended by org.apache.mina.core.session.AbstractIoSessionConfig
      extended by org.apache.mina.transport.socket.AbstractSocketSessionConfig
          extended by org.apache.mina.transport.socket.DefaultSocketSessionConfig
All Implemented Interfaces:
IoSessionConfig, SocketSessionConfig

public class DefaultSocketSessionConfig
extends AbstractSocketSessionConfig

A default implementation of SocketSessionConfig.

Version:
$Rev: 678335 $, $Date: 2008-07-21 03:25:08 +0200 (lun, 21 jui 2008) $
Author:
The Apache MINA Project (dev@mina.apache.org)

Constructor Summary
DefaultSocketSessionConfig()
          Creates a new instance.
 
Method Summary
 int getReceiveBufferSize()
           
 int getSendBufferSize()
           
 int getSoLinger()
          Please note that enabling SO_LINGER in Java NIO can result in platform-dependent behavior and unexpected blocking of I/O thread.
 int getTrafficClass()
           
 void init(IoService parent)
           
static boolean isGetTrafficClassAvailable()
           
 boolean isKeepAlive()
           
protected  boolean isKeepAliveChanged()
          Returns true if and only if the keepAlive property has been changed by its setter method.
 boolean isOobInline()
           
protected  boolean isOobInlineChanged()
          Returns true if and only if the oobInline property has been changed by its setter method.
protected  boolean isReceiveBufferSizeChanged()
          Returns true if and only if the receiveBufferSize property has been changed by its setter method.
 boolean isReuseAddress()
           
protected  boolean isReuseAddressChanged()
          Returns true if and only if the reuseAddress property has been changed by its setter method.
protected  boolean isSendBufferSizeChanged()
          Returns true if and only if the sendBufferSize property has been changed by its setter method.
static boolean isSetReceiveBufferSizeAvailable()
           
static boolean isSetSendBufferSizeAvailable()
           
static boolean isSetTrafficClassAvailable()
           
protected  boolean isSoLingerChanged()
          Returns true if and only if the soLinger property has been changed by its setter method.
 boolean isTcpNoDelay()
           
protected  boolean isTcpNoDelayChanged()
          Returns true if and only if the tcpNoDelay property has been changed by its setter method.
protected  boolean isTrafficClassChanged()
          Returns true if and only if the trafficClass property has been changed by its setter method.
 void setKeepAlive(boolean keepAlive)
           
 void setOobInline(boolean oobInline)
           
 void setReceiveBufferSize(int receiveBufferSize)
           
 void setReuseAddress(boolean reuseAddress)
           
 void setSendBufferSize(int sendBufferSize)
           
 void setSoLinger(int soLinger)
          Please note that enabling SO_LINGER in Java NIO can result in platform-dependent behavior and unexpected blocking of I/O thread.
 void setTcpNoDelay(boolean tcpNoDelay)
           
 void setTrafficClass(int trafficClass)
           
 
Methods inherited from class org.apache.mina.transport.socket.AbstractSocketSessionConfig
doSetAll
 
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, setAll, 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, setAll, setBothIdleTime, setIdleTime, setMaxReadBufferSize, setMinReadBufferSize, setReadBufferSize, setReaderIdleTime, setThroughputCalculationInterval, setUseReadOperation, setWriterIdleTime, setWriteTimeout
 

Constructor Detail

DefaultSocketSessionConfig

public DefaultSocketSessionConfig()
Creates a new instance.

Method Detail

isSetReceiveBufferSizeAvailable

public static boolean isSetReceiveBufferSizeAvailable()

isSetSendBufferSizeAvailable

public static boolean isSetSendBufferSizeAvailable()

isGetTrafficClassAvailable

public static boolean isGetTrafficClassAvailable()

isSetTrafficClassAvailable

public static boolean isSetTrafficClassAvailable()

init

public void init(IoService parent)

isReuseAddress

public boolean isReuseAddress()
See Also:
Socket.getReuseAddress()

setReuseAddress

public void setReuseAddress(boolean reuseAddress)
See Also:
Socket.setReuseAddress(boolean)

getReceiveBufferSize

public int getReceiveBufferSize()
See Also:
Socket.getReceiveBufferSize()

setReceiveBufferSize

public void setReceiveBufferSize(int receiveBufferSize)
See Also:
Socket.setReceiveBufferSize(int)

getSendBufferSize

public int getSendBufferSize()
See Also:
Socket.getSendBufferSize()

setSendBufferSize

public void setSendBufferSize(int sendBufferSize)
See Also:
Socket.setSendBufferSize(int)

getTrafficClass

public int getTrafficClass()
See Also:
Socket.getTrafficClass()

setTrafficClass

public void setTrafficClass(int trafficClass)
See Also:
Socket.setTrafficClass(int)

isKeepAlive

public boolean isKeepAlive()
See Also:
Socket.getKeepAlive()

setKeepAlive

public void setKeepAlive(boolean keepAlive)
See Also:
Socket.setKeepAlive(boolean)

isOobInline

public boolean isOobInline()
See Also:
Socket.getOOBInline()

setOobInline

public void setOobInline(boolean oobInline)
See Also:
Socket.setOOBInline(boolean)

getSoLinger

public int getSoLinger()
Description copied from interface: SocketSessionConfig
Please note that enabling SO_LINGER in Java NIO can result in platform-dependent behavior and unexpected blocking of I/O thread.

See Also:
Socket.getSoLinger(), Sun Bug Database

setSoLinger

public void setSoLinger(int soLinger)
Description copied from interface: SocketSessionConfig
Please note that enabling SO_LINGER in Java NIO can result in platform-dependent behavior and unexpected blocking of I/O thread.

Parameters:
soLinger - Please specify a negative value to disable SO_LINGER.
See Also:
Socket.setSoLinger(boolean, int), Sun Bug Database

isTcpNoDelay

public boolean isTcpNoDelay()
See Also:
Socket.getTcpNoDelay()

setTcpNoDelay

public void setTcpNoDelay(boolean tcpNoDelay)
See Also:
Socket.setTcpNoDelay(boolean)

isKeepAliveChanged

protected boolean isKeepAliveChanged()
Description copied from class: AbstractSocketSessionConfig
Returns true if and only if the keepAlive 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.

Overrides:
isKeepAliveChanged in class AbstractSocketSessionConfig

isOobInlineChanged

protected boolean isOobInlineChanged()
Description copied from class: AbstractSocketSessionConfig
Returns true if and only if the oobInline 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.

Overrides:
isOobInlineChanged in class AbstractSocketSessionConfig

isReceiveBufferSizeChanged

protected boolean isReceiveBufferSizeChanged()
Description copied from class: AbstractSocketSessionConfig
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.

Overrides:
isReceiveBufferSizeChanged in class AbstractSocketSessionConfig

isReuseAddressChanged

protected boolean isReuseAddressChanged()
Description copied from class: AbstractSocketSessionConfig
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.

Overrides:
isReuseAddressChanged in class AbstractSocketSessionConfig

isSendBufferSizeChanged

protected boolean isSendBufferSizeChanged()
Description copied from class: AbstractSocketSessionConfig
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.

Overrides:
isSendBufferSizeChanged in class AbstractSocketSessionConfig

isSoLingerChanged

protected boolean isSoLingerChanged()
Description copied from class: AbstractSocketSessionConfig
Returns true if and only if the soLinger 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.

Overrides:
isSoLingerChanged in class AbstractSocketSessionConfig

isTcpNoDelayChanged

protected boolean isTcpNoDelayChanged()
Description copied from class: AbstractSocketSessionConfig
Returns true if and only if the tcpNoDelay 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.

Overrides:
isTcpNoDelayChanged in class AbstractSocketSessionConfig

isTrafficClassChanged

protected boolean isTrafficClassChanged()
Description copied from class: AbstractSocketSessionConfig
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.

Overrides:
isTrafficClassChanged in class AbstractSocketSessionConfig


Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.