Class DefaultClientConnectionOperator

java.lang.Object
org.apache.http.impl.conn.DefaultClientConnectionOperator
All Implemented Interfaces:
ClientConnectionOperator

@Deprecated @Contract(threading=SAFE_CONDITIONAL) public class DefaultClientConnectionOperator extends Object implements ClientConnectionOperator
Deprecated.
Default implementation of a ClientConnectionOperator. It uses a SchemeRegistry to look up SchemeSocketFactory objects.

This connection operator is multihome network aware and will attempt to retry failed connects against all known IP addresses sequentially until the connect is successful or all known addresses fail to respond. Please note the same CoreConnectionPNames.CONNECTION_TIMEOUT value will be used for each connection attempt, so in the worst case the total elapsed time before timeout can be CONNECTION_TIMEOUT * n where n is the number of IP addresses of the given host. One can disable multihome support by overriding the resolveHostname(String) method and returning only one IP address for the given host name.

The following parameters can be used to customize the behavior of this class:

Since:
4.0
  • Constructor Details

    • DefaultClientConnectionOperator

      public DefaultClientConnectionOperator(SchemeRegistry schemes)
      Deprecated.
      Creates a new client connection operator for the given scheme registry.
      Parameters:
      schemes - the scheme registry
      Since:
      4.2
    • DefaultClientConnectionOperator

      public DefaultClientConnectionOperator(SchemeRegistry schemes, DnsResolver dnsResolver)
      Deprecated.
      Creates a new client connection operator for the given scheme registry and the given custom DNS lookup mechanism.
      Parameters:
      schemes - the scheme registry
      dnsResolver - the custom DNS lookup mechanism
  • Method Details