Class HttpClientUtils


  • @Deprecated
    public class HttpClientUtils
    extends java.lang.Object
    Deprecated.
    As of 6.3 (Package Version 5.7.0), with no replacement.
    Utility methods for the Apache HTTPClient.
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static void allowSelfSigned​(org.apache.commons.httpclient.HttpClient httpClient, java.lang.String host, int port)
      Deprecated.
      Allows self signed certificates for HTTPS connections with the given host and port.
      static org.apache.commons.httpclient.HttpClient newMultiThreaded()
      Deprecated.
      Creates a new thread-safe HTTPClient.
      static org.apache.commons.httpclient.HttpClient newMultiThreaded​(int connectionTimeout, int maxConnections)
      Deprecated.
      Creates a new thread-safe HTTPClient.
      static org.apache.commons.httpclient.HttpClient newMultiThreaded​(int connectionTimeout, int maxConnections, boolean staleConnectionCheck, int soLinger)
      Deprecated.
      Creates a new thread-safe HTTPClient.
      static void shutdown​(org.apache.commons.httpclient.HttpClient httpClient)
      Deprecated.
      Shuts down the HttpConnectionManager in a separate thread.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_CONNECTION_TIMEOUT

        public static final int DEFAULT_CONNECTION_TIMEOUT
        Deprecated.
        See Also:
        Constant Field Values
      • DEFAULT_MAX_CONNECTIONS

        public static final int DEFAULT_MAX_CONNECTIONS
        Deprecated.
        See Also:
        Constant Field Values
      • DEFAULT_STALE_CONNECTION_CHECK

        public static final boolean DEFAULT_STALE_CONNECTION_CHECK
        Deprecated.
        See Also:
        Constant Field Values
      • DEFAULT_SO_LINGER

        public static final int DEFAULT_SO_LINGER
        Deprecated.
        See Also:
        Constant Field Values
    • Method Detail

      • newMultiThreaded

        public static org.apache.commons.httpclient.HttpClient newMultiThreaded()
        Deprecated.
        Creates a new thread-safe HTTPClient.
        Returns:
        the new thread-safe HttpClient
      • newMultiThreaded

        public static org.apache.commons.httpclient.HttpClient newMultiThreaded​(int connectionTimeout,
                                                                                int maxConnections)
        Deprecated.
        Creates a new thread-safe HTTPClient.
        Parameters:
        connectionTimeout - connection timeout in milliseconds
        maxConnections - max concurrent connections
        Returns:
        the new thread-safe HttpClient
      • newMultiThreaded

        public static org.apache.commons.httpclient.HttpClient newMultiThreaded​(int connectionTimeout,
                                                                                int maxConnections,
                                                                                boolean staleConnectionCheck,
                                                                                int soLinger)
        Deprecated.
        Creates a new thread-safe HTTPClient.
        Parameters:
        connectionTimeout - connection timeout in milliseconds
        maxConnections - max concurrent connections
        staleConnectionCheck - if reused connections should be checked before using (recommended)
        soLinger - timeout before connection is closed forcefully (0 recommended, otherwise the timeout is awaited when a broken connection is tried to be reused)
        Returns:
        the new thread-safe HttpClient
      • allowSelfSigned

        public static void allowSelfSigned​(org.apache.commons.httpclient.HttpClient httpClient,
                                           java.lang.String host,
                                           int port)
        Deprecated.
        Allows self signed certificates for HTTPS connections with the given host and port.
        Parameters:
        httpClient - httpClient
        host - host
        port - port
      • shutdown

        public static void shutdown​(org.apache.commons.httpclient.HttpClient httpClient)
        Deprecated.
        Shuts down the HttpConnectionManager in a separate thread.
        Parameters:
        httpClient - httpClient