Class BootstrapProvider

java.lang.Object
software.amazon.awssdk.http.nio.netty.internal.BootstrapProvider

public class BootstrapProvider extends Object
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 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 hostname
      port - The remote port
      useNonBlockingDnsResolver - 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.