Class NioSocketSession.SessionConfigImpl

    • Constructor Detail

      • SessionConfigImpl

        private SessionConfigImpl()
    • Method Detail

      • isKeepAlive

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

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

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

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

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

        public void setReuseAddress​(boolean on)
        Parameters:
        on - Tells if SO_REUSEADDR is enabled or disabled
        See Also:
        Socket.setReuseAddress(boolean)
      • 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:
        Socket.getSoLinger(), Sun Bug Database
      • 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:
        Socket.setSoLinger(boolean, int), Sun Bug Database
      • isTcpNoDelay

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

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

        public int getTrafficClass()
        Returns:
        the traffic class
        See Also:
        Socket.getTrafficClass()
      • 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:
        Socket.setTrafficClass(int)
      • getSendBufferSize

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

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

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

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