com.ibm.as400.access

Class SocketProperties

  • java.lang.Object
    • com.ibm.as400.access.SocketProperties
  • All Implemented Interfaces:
    java.io.Serializable


    public class SocketProperties
    extends java.lang.Object
    implements java.io.Serializable
    The SocketProperties class represents a set of socket options the IBM Toolbox for Java will set on its client side sockets. Setting the values on this object will not change any existing connection to the system. The values retrieved from this object reflect only the values set into this object, not the properties of any actual connection to the system.

    Socket properties are described in the javadoc for the JDK's java.net.Socket class. See the JDK documentation for further details.

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      SocketProperties() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object other)
      Indicates whether some other object is "equal to" this one.
      int getLoginTimeout()
      Indicates the value to which the login timeout socket option is set in milliseconds.
      int getReceiveBufferSize()
      Indicates the value to which the SO_RCVBUF socket option is set.
      int getSendBufferSize()
      Indicates the value to which the SO_SNDBUF socket option is set.
      int getSoLinger()
      Indicates the value to which the SO_LINGER socket option is set.
      int getSoTimeout()
      Indicates the value to which the SO_TIMEOUT socket option is set.
      int hashCode()
      Returns a hash code value for the object.
      boolean isKeepAlive()
      Indicates the value to which the SO_KEEPALIVE socket option is set.
      boolean isKeepAliveSet()
      Indicates if the value of the SO_KEEPALIVE socket option will be set.
      boolean isLoginTimeoutSet()
      Indicates if the value of the login timeout socket option will be set.
      boolean isReceiveBufferSizeSet()
      Indicates if the value of the SO_RCVBUF socket option will be set.
      boolean isSendBufferSizeSet()
      Indicates if the value of the SO_SNDBUF socket option will be set.
      boolean isSoLingerSet()
      Indicates if the value of the SO_LINGER socket option will be set.
      boolean isSoTimeoutSet()
      Indicates if the value of the SO_TIMEOUT socket option will be set.
      boolean isTcpNoDelay()
      Indicates the value to which the TCP_NODELAY socket option is set.
      boolean isTcpNoDelaySet()
      Indicates if the value of the TCP_NODELAY socket option will be set.
      void setKeepAlive(boolean keepAlive)
      Indicates the value to which the SO_KEEPALIVE socket option should be set.
      void setLoginTimeout(int loginTimeout)
      Indicates the value to for timeout when creating a new socket connection in milliseconds.
      void setReceiveBufferSize(int receiveBufferSize)
      Indicates the value to which the SO_RCVBUF socket option should be set.
      void setSendBufferSize(int sendBufferSize)
      Indicates the value to which the SO_SNDBUF socket option should be set.
      void setSoLinger(int soLinger)
      Indicates the value to which the SO_LINGER socket option should be set.
      void setSoTimeout(int soTimeout)
      Indicates the value to which the SO_TIMEOUT socket option should be set.
      void setTcpNoDelay(boolean tcpNoDelay)
      Indicates the value to which the TCP_NODELAY socket option should be set.
      void unsetKeepAlive()
      Indicates that the value of the SO_KEEPALIVE socket option should not be set.
      void unsetReceiveBufferSize()
      Indicates that the value of the SO_RCVBUF socket option should not be set.
      void unsetSendBufferSize()
      Indicates that the value of the SO_SNDBUF socket option should not be set.
      void unsetSoLinger()
      Indicates that the value of the SO_LINGER socket option should not be set.
      void unsetSoTimeout()
      Indicates that the value of the SO_TIMEOUT socket option should not be set.
      void unsetTcpNoDelay()
      Indicates that the value of the TCP_NODELAY socket option should not be set.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SocketProperties

        public SocketProperties()
    • Method Detail

      • equals

        public boolean equals(java.lang.Object other)
        Indicates whether some other object is "equal to" this one. SocketProperties objects are considered equal if all of their property values match.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this object is equals the obj argument; false otherwise.
      • hashCode

        public int hashCode()
        Returns a hash code value for the object.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        A hash code value for this object.
      • getReceiveBufferSize

        public int getReceiveBufferSize()
        Indicates the value to which the SO_RCVBUF socket option is set.
        Returns:
        The value of SO_RCVBUF, in bytes.
      • getSendBufferSize

        public int getSendBufferSize()
        Indicates the value to which the SO_SNDBUF socket option is set.
        Returns:
        The value of SO_SNDBUF, in bytes.
      • getSoLinger

        public int getSoLinger()
        Indicates the value to which the SO_LINGER socket option is set.
        Returns:
        The value of SO_LINGER, in seconds.
      • getLoginTimeout

        public int getLoginTimeout()
        Indicates the value to which the login timeout socket option is set in milliseconds.
        Returns:
        The value in milliseconds.
      • getSoTimeout

        public int getSoTimeout()
        Indicates the value to which the SO_TIMEOUT socket option is set.
        Returns:
        The value of SO_TIMEOUT, in milliseconds.
      • isKeepAlive

        public boolean isKeepAlive()
        Indicates the value to which the SO_KEEPALIVE socket option is set.
        Returns:
        true if SO_KEEPALIVE is set; false otherwise.
      • isKeepAliveSet

        public boolean isKeepAliveSet()
        Indicates if the value of the SO_KEEPALIVE socket option will be set.
        Returns:
        true if SO_KEEPALIVE will be set; false otherwise.
      • isReceiveBufferSizeSet

        public boolean isReceiveBufferSizeSet()
        Indicates if the value of the SO_RCVBUF socket option will be set.
        Returns:
        true if SO_RCVBUF will be set; false otherwise.
      • isSendBufferSizeSet

        public boolean isSendBufferSizeSet()
        Indicates if the value of the SO_SNDBUF socket option will be set.
        Returns:
        true if SO_SNDBUF will be set; false otherwise.
      • isSoLingerSet

        public boolean isSoLingerSet()
        Indicates if the value of the SO_LINGER socket option will be set.
        Returns:
        true if SO_LINGER will be set; false otherwise.
      • isLoginTimeoutSet

        public boolean isLoginTimeoutSet()
        Indicates if the value of the login timeout socket option will be set.
        Returns:
        true if login timeout will be set; false otherwise.
      • isSoTimeoutSet

        public boolean isSoTimeoutSet()
        Indicates if the value of the SO_TIMEOUT socket option will be set.
        Returns:
        true if SO_TIMEOUT will be set; false otherwise.
      • isTcpNoDelay

        public boolean isTcpNoDelay()
        Indicates the value to which the TCP_NODELAY socket option is set.
        Returns:
        true if TCP_NODELAY is set; false otherwise.
      • isTcpNoDelaySet

        public boolean isTcpNoDelaySet()
        Indicates if the value of the TCP_NODELAY socket option will be set.
        Returns:
        true if TCP_NODELAY will be set; false otherwise.
      • setKeepAlive

        public void setKeepAlive(boolean keepAlive)
        Indicates the value to which the SO_KEEPALIVE socket option should be set.
        Parameters:
        keepAlive - true to set SO_KEEPALIVE; false otherwise.
      • setLoginTimeout

        public void setLoginTimeout(int loginTimeout)
        Indicates the value to for timeout when creating a new socket connection in milliseconds.
        Parameters:
        loginTimeout - The value in milliseconds.
      • setReceiveBufferSize

        public void setReceiveBufferSize(int receiveBufferSize)
        Indicates the value to which the SO_RCVBUF socket option should be set.
        Parameters:
        receiveBufferSize - The value to set SO_RCVBUF, in bytes.
      • setSendBufferSize

        public void setSendBufferSize(int sendBufferSize)
        Indicates the value to which the SO_SNDBUF socket option should be set.
        Parameters:
        sendBufferSize - The value to set SO_SNDBUF, in bytes.
      • setSoLinger

        public void setSoLinger(int soLinger)
        Indicates the value to which the SO_LINGER socket option should be set.
        Parameters:
        soLinger - The value to set SO_LINGER, in seconds.
      • setSoTimeout

        public void setSoTimeout(int soTimeout)
        Indicates the value to which the SO_TIMEOUT socket option should be set.
        Parameters:
        soTimeout - The value to set SO_TIMEOUT, in milliseconds.
      • setTcpNoDelay

        public void setTcpNoDelay(boolean tcpNoDelay)
        Indicates the value to which the TCP_NODELAY socket option should be set.
        Parameters:
        tcpNoDelay - true to set TCP_NODELAY; false otherwise.
      • unsetKeepAlive

        public void unsetKeepAlive()
        Indicates that the value of the SO_KEEPALIVE socket option should not be set.
      • unsetReceiveBufferSize

        public void unsetReceiveBufferSize()
        Indicates that the value of the SO_RCVBUF socket option should not be set.
      • unsetSendBufferSize

        public void unsetSendBufferSize()
        Indicates that the value of the SO_SNDBUF socket option should not be set.
      • unsetSoLinger

        public void unsetSoLinger()
        Indicates that the value of the SO_LINGER socket option should not be set.
      • unsetSoTimeout

        public void unsetSoTimeout()
        Indicates that the value of the SO_TIMEOUT socket option should not be set.
      • unsetTcpNoDelay

        public void unsetTcpNoDelay()
        Indicates that the value of the TCP_NODELAY socket option should not be set.