Class HttpConnectionParams

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, HttpParams
    Direct Known Subclasses:
    HttpConnectionManagerParams

    @Deprecated
    public class HttpConnectionParams
    extends DefaultHttpParams
    Deprecated.
    Jakarta Commons HttpClient 3.x is deprecated in the Jenkins project. It is not recommended to use it in any new code. Instead, use HTTP client API plugins as a dependency in your code. E.g. Apache HttpComponents Client API 4.x Plugin or Async HTTP Client Plugin.
    This class represents a collection of HTTP protocol parameters applicable to HTTP connections. Protocol parameters may be linked together to form a hierarchy. If a particular parameter value has not been explicitly defined in the collection itself, its value will be drawn from the parent collection of parameters.
    Since:
    3.0
    See Also:
    Serialized Form
    • Field Detail

      • SO_TIMEOUT

        public static final java.lang.String SO_TIMEOUT
        Deprecated.
        Defines the default socket timeout (SO_TIMEOUT) in milliseconds which is the timeout for waiting for data. A timeout value of zero is interpreted as an infinite timeout. This value is used when no socket timeout is set in the HTTP method parameters.

        This parameter expects a value of type Integer.

        See Also:
        SocketOptions.SO_TIMEOUT, Constant Field Values
      • TCP_NODELAY

        public static final java.lang.String TCP_NODELAY
        Deprecated.
        Determines whether Nagle's algorithm is to be used. The Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent. When applications wish to decrease network latency and increase performance, they can disable Nagle's algorithm (that is enable TCP_NODELAY). Data will be sent earlier, at the cost of an increase in bandwidth consumption.

        This parameter expects a value of type Boolean.

        See Also:
        SocketOptions.TCP_NODELAY, Constant Field Values
      • SO_SNDBUF

        public static final java.lang.String SO_SNDBUF
        Deprecated.
        Determines a hint the size of the underlying buffers used by the platform for outgoing network I/O. This value is a suggestion to the kernel from the application about the size of buffers to use for the data to be sent over the socket.

        This parameter expects a value of type Integer.

        See Also:
        SocketOptions.SO_SNDBUF, Constant Field Values
      • SO_RCVBUF

        public static final java.lang.String SO_RCVBUF
        Deprecated.
        Determines a hint the size of the underlying buffers used by the platform for incoming network I/O. This value is a suggestion to the kernel from the application about the size of buffers to use for the data to be received over the socket.

        This parameter expects a value of type Integer.

        See Also:
        SocketOptions.SO_RCVBUF, Constant Field Values
      • SO_LINGER

        public static final java.lang.String SO_LINGER
        Deprecated.
        Sets SO_LINGER with the specified linger time in seconds. The maximum timeout value is platform specific. Value 0 implies that the option is disabled. Value -1 implies that the JRE default is used. The setting only affects socket close.

        This parameter expects a value of type Integer.

        See Also:
        SocketOptions.SO_LINGER, Constant Field Values
      • CONNECTION_TIMEOUT

        public static final java.lang.String CONNECTION_TIMEOUT
        Deprecated.
        Determines the timeout until a connection is etablished. A value of zero means the timeout is not used. The default value is zero.

        This parameter expects a value of type Integer.

        See Also:
        Constant Field Values
      • STALE_CONNECTION_CHECK

        public static final java.lang.String STALE_CONNECTION_CHECK
        Deprecated.
        Determines whether stale connection check is to be used. Disabling stale connection check may result in slight performance improvement at the risk of getting an I/O error when executing a request over a connection that has been closed at the server side.

        This parameter expects a value of type Boolean.

        See Also:
        Constant Field Values
    • Constructor Detail

      • HttpConnectionParams

        public HttpConnectionParams()
        Deprecated.
        Creates a new collection of parameters with the collection returned by DefaultHttpParams.getDefaultParams() as a parent. The collection will defer to its parent for a default value if a particular parameter is not explicitly set in the collection itself.
        See Also:
        DefaultHttpParams.getDefaultParams()
    • Method Detail

      • getSoTimeout

        public int getSoTimeout()
        Deprecated.
        Returns the default socket timeout (SO_TIMEOUT) in milliseconds which is the timeout for waiting for data. A timeout value of zero is interpreted as an infinite timeout. This value is used when no socket timeout is set in the HTTP method parameters.
        Returns:
        timeout in milliseconds
      • setSoTimeout

        public void setSoTimeout​(int timeout)
        Deprecated.
        Sets the default socket timeout (SO_TIMEOUT) in milliseconds which is the timeout for waiting for data. A timeout value of zero is interpreted as an infinite timeout. This value is used when no socket timeout is set in the HTTP method parameters.
        Parameters:
        timeout - Timeout in milliseconds
      • setTcpNoDelay

        public void setTcpNoDelay​(boolean value)
        Deprecated.
        Determines whether Nagle's algorithm is to be used. The Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent. When applications wish to decrease network latency and increase performance, they can disable Nagle's algorithm (that is enable TCP_NODELAY). Data will be sent earlier, at the cost of an increase in bandwidth consumption.
        Parameters:
        value - true if the Nagle's algorithm is to NOT be used (that is enable TCP_NODELAY), false otherwise.
      • getTcpNoDelay

        public boolean getTcpNoDelay()
        Deprecated.
        Tests if Nagle's algorithm is to be used.
        Returns:
        true if the Nagle's algorithm is to NOT be used (that is enable TCP_NODELAY), false otherwise.
      • getSendBufferSize

        public int getSendBufferSize()
        Deprecated.
        Returns a hint the size of the underlying buffers used by the platform for outgoing network I/O. This value is a suggestion to the kernel from the application about the size of buffers to use for the data to be sent over the socket.
        Returns:
        the hint size of the send buffer
      • setSendBufferSize

        public void setSendBufferSize​(int size)
        Deprecated.
        Sets a hint the size of the underlying buffers used by the platform for outgoing network I/O. This value is a suggestion to the kernel from the application about the size of buffers to use for the data to be sent over the socket.
        Parameters:
        size - the hint size of the send buffer
      • getReceiveBufferSize

        public int getReceiveBufferSize()
        Deprecated.
        Returns a hint the size of the underlying buffers used by the platform for incoming network I/O. This value is a suggestion to the kernel from the application about the size of buffers to use for the data to be received over the socket.
        Returns:
        the hint size of the send buffer
      • setReceiveBufferSize

        public void setReceiveBufferSize​(int size)
        Deprecated.
        Sets a hint the size of the underlying buffers used by the platform for incoming network I/O. This value is a suggestion to the kernel from the application about the size of buffers to use for the data to be received over the socket.
        Parameters:
        size - the hint size of the send buffer
      • getLinger

        public int getLinger()
        Deprecated.
        Returns linger-on-close timeout. Value 0 implies that the option is disabled. Value -1 implies that the JRE default is used.
        Returns:
        the linger-on-close timeout
      • setLinger

        public void setLinger​(int value)
        Deprecated.
        Returns linger-on-close timeout. This option disables/enables immediate return from a close() of a TCP Socket. Enabling this option with a non-zero Integer timeout means that a close() will block pending the transmission and acknowledgement of all data written to the peer, at which point the socket is closed gracefully. Value 0 implies that the option is disabled. Value -1 implies that the JRE default is used.
        Parameters:
        value - the linger-on-close timeout
      • getConnectionTimeout

        public int getConnectionTimeout()
        Deprecated.
        Returns the timeout until a connection is etablished. A value of zero means the timeout is not used. The default value is zero.
        Returns:
        timeout in milliseconds.
      • setConnectionTimeout

        public void setConnectionTimeout​(int timeout)
        Deprecated.
        Sets the timeout until a connection is etablished. A value of zero means the timeout is not used. The default value is zero.
        Parameters:
        timeout - Timeout in milliseconds.
      • isStaleCheckingEnabled

        public boolean isStaleCheckingEnabled()
        Deprecated.
        Tests whether stale connection check is to be used. Disabling stale connection check may result in slight performance improvement at the risk of getting an I/O error when executing a request over a connection that has been closed at the server side.
        Returns:
        true if stale connection check is to be used, false otherwise.
      • setStaleCheckingEnabled

        public void setStaleCheckingEnabled​(boolean value)
        Deprecated.
        Defines whether stale connection check is to be used. Disabling stale connection check may result in slight performance improvement at the risk of getting an I/O error when executing a request over a connection that has been closed at the server side.
        Parameters:
        value - true if stale connection check is to be used, false otherwise.