Class BootstrapProvider
java.lang.Object
software.amazon.awssdk.http.nio.netty.internal.BootstrapProvider
The primary purpose of this Bootstrap provider is to ensure that all Bootstraps created by it are 'unresolved'
InetSocketAddress. This is to prevent Netty from caching the resolved address of a host and then re-using it in
subsequent connection attempts, and instead deferring to the JVM to handle address resolution and caching.
-
Method Summary
Modifier and TypeMethodDescriptionio.netty.bootstrap.Bootstrap
createBootstrap
(String host, int port, Boolean useNonBlockingDnsResolver) Creates a Bootstrap for a specific host and port with an unresolved InetSocketAddress as the remoteAddress.
-
Method Details
-
createBootstrap
public io.netty.bootstrap.Bootstrap createBootstrap(String host, int port, Boolean useNonBlockingDnsResolver) Creates a Bootstrap for a specific host and port with an unresolved InetSocketAddress as the remoteAddress.- Parameters:
host
- The unresolved remote hostnameport
- The remote portuseNonBlockingDnsResolver
- If true, uses the default non-blocking DNS resolver from Netty. Otherwise, the default JDK blocking DNS resolver will be used.- Returns:
- A newly created Bootstrap using the configuration this provider was initialized with, and having an unresolved remote address.
-