Class NioSocketSession.SessionConfigImpl

All Implemented Interfaces:
IoSessionConfig, SocketSessionConfig
Enclosing class:
NioSocketSession

private class NioSocketSession.SessionConfigImpl extends AbstractSocketSessionConfig
A private class storing a copy of the IoService configuration when the IoSession is created. That allows the session to have its own configuration setting, over the IoService default one.
  • Constructor Details

    • SessionConfigImpl

      private SessionConfigImpl()
  • Method Details

    • isKeepAlive

      public boolean isKeepAlive()
      Returns:
      true if SO_KEEPALIVE is enabled.
      See Also:
    • setKeepAlive

      public void setKeepAlive(boolean on)
      Parameters:
      on - if SO_KEEPALIVE is to be enabled
      See Also:
    • isOobInline

      public boolean isOobInline()
      Returns:
      true if SO_OOBINLINE is enabled.
      See Also:
    • setOobInline

      public void setOobInline(boolean on)
      Parameters:
      on - if SO_OOBINLINE is to be enabled
      See Also:
    • isReuseAddress

      public boolean isReuseAddress()
      Returns:
      true if SO_REUSEADDR is enabled.
      See Also:
    • setReuseAddress

      public void setReuseAddress(boolean on)
      Parameters:
      on - Tells if SO_REUSEADDR is enabled or disabled
      See Also:
    • getSoLinger

      public int getSoLinger()
      Please note that enabling SO_LINGER in Java NIO can result in platform-dependent behavior and unexpected blocking of I/O thread.
      Returns:
      The value for SO_LINGER
      See Also:
    • setSoLinger

      public void setSoLinger(int linger)
      Please note that enabling SO_LINGER in Java NIO can result in platform-dependent behavior and unexpected blocking of I/O thread.
      Parameters:
      linger - Please specify a negative value to disable SO_LINGER.
      See Also:
    • isTcpNoDelay

      public boolean isTcpNoDelay()
      Returns:
      true if TCP_NODELAY is enabled.
      See Also:
    • setTcpNoDelay

      public void setTcpNoDelay(boolean on)
      Parameters:
      on - true if TCP_NODELAY is to be enabled
      See Also:
    • getTrafficClass

      public int getTrafficClass()
      Returns:
      the traffic class
      See Also:
    • setTrafficClass

      public void setTrafficClass(int tc)
      Parameters:
      tc - The traffic class to set, one of IPTOS_LOWCOST (0x02) IPTOS_RELIABILITY (0x04), IPTOS_THROUGHPUT (0x08) or IPTOS_LOWDELAY (0x10)
      See Also:
    • getSendBufferSize

      public int getSendBufferSize()
      Returns:
      the size of the send buffer
      See Also:
    • setSendBufferSize

      public void setSendBufferSize(int size)
      Parameters:
      size - The size of the send buffer
      See Also:
    • getReceiveBufferSize

      public int getReceiveBufferSize()
      Returns:
      the size of the receive buffer
      See Also:
    • setReceiveBufferSize

      public void setReceiveBufferSize(int size)
      Parameters:
      size - The size of the receive buffer
      See Also: