org.apache.hc.client5.http.impl.nio

## Class MultihomeConnectionInitiator

- java.lang.Object
- - org.apache.hc.client5.http.impl.nio.MultihomeConnectionInitiator

All Implemented Interfaces:
  org.apache.hc.core5.reactor.ConnectionInitiator

    @Contract(threading=SAFE_CONDITIONAL)
    public final class MultihomeConnectionInitiator
    extends Object
    implements org.apache.hc.core5.reactor.ConnectionInitiator

Multi-home DNS aware implementation of `ConnectionInitiator`.

Since:
  5.0

### Constructor Summary

Constructors
Constructor and Description
`MultihomeConnectionInitiator(org.apache.hc.core5.reactor.ConnectionInitiator connectionInitiator, DnsResolver dnsResolver)`

### Method Summary

All Methods Instance Methods Concrete Methods
`Future<org.apache.hc.core5.reactor.IOSession>` `connect(org.apache.hc.core5.net.NamedEndpoint remoteEndpoint, SocketAddress remoteAddress, SocketAddress localAddress, org.apache.hc.core5.util.Timeout connectTimeout, Object attachment, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.IOSession> callback)`
`Future<org.apache.hc.core5.reactor.IOSession>` `connect(org.apache.hc.core5.net.NamedEndpoint remoteEndpoint, SocketAddress localAddress, org.apache.hc.core5.util.Timeout connectTimeout, Object attachment, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.IOSession> callback)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### MultihomeConnectionInitiator

    public MultihomeConnectionInitiator(org.apache.hc.core5.reactor.ConnectionInitiator connectionInitiator,
                                        DnsResolver dnsResolver)

### Method Detail

#### connect

    public Future<org.apache.hc.core5.reactor.IOSession> connect(org.apache.hc.core5.net.NamedEndpoint remoteEndpoint,
                                                                 SocketAddress remoteAddress,
                                                                 SocketAddress localAddress,
                                                                 org.apache.hc.core5.util.Timeout connectTimeout,
                                                                 Object attachment,
                                                                 org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.IOSession> callback)

Specified by:
  `connect` in interface `org.apache.hc.core5.reactor.ConnectionInitiator`

#### connect

    public Future<org.apache.hc.core5.reactor.IOSession> connect(org.apache.hc.core5.net.NamedEndpoint remoteEndpoint,
                                                                 SocketAddress localAddress,
                                                                 org.apache.hc.core5.util.Timeout connectTimeout,
                                                                 Object attachment,
                                                                 org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.IOSession> callback)