private SdkAsyncHttpService createAsyncHttpService()

in iep-spring-aws2/src/main/java/com/netflix/iep/aws2/AwsClientFactory.java [259:279]


  private SdkAsyncHttpService createAsyncHttpService(Config clientConfig) {
    if (clientConfig.hasPath("async-http-impl")) {
      String clsName = clientConfig.getString("async-http-impl");
      try {
        Class<?> clientClass = Class.forName(clsName);
        return (SdkAsyncHttpService) clientClass.getConstructor().newInstance();
      } catch (Exception e) {
        throw new RuntimeException("failed to create instance of " + clsName, e);
      }
    } else {
      Iterator<SdkAsyncHttpService> services = ServiceLoader
          .load(SdkAsyncHttpService.class)
          .iterator();
      if (services.hasNext()) {
        return services.next();
      } else {
        throw new IllegalStateException("could not find SdkAsyncHttpService on classpath, " +
            "set `async-http-impl` to specify the implementation to use");
      }
    }
  }