in iep-spring-aws2/src/main/java/com/netflix/iep/aws2/AwsClientFactory.java [192:222]
AttributeMap getSdkHttpConfigurationOptions(Config clientConfig) {
Map<AttributeMap.Key<?>, Object> configuration = new HashMap<>();
if(clientConfig.hasPath("http-configuration")) {
Config httpConfig = clientConfig.getConfig("http-configuration");
if (httpConfig.hasPath("read-timeout"))
configuration.put(SdkHttpConfigurationOption.READ_TIMEOUT, httpConfig.getDuration("read-timeout"));
if (httpConfig.hasPath("write-timeout"))
configuration.put(SdkHttpConfigurationOption.WRITE_TIMEOUT, httpConfig.getDuration("write-timeout"));
if (httpConfig.hasPath("connection-timeout"))
configuration.put(SdkHttpConfigurationOption.CONNECTION_TIMEOUT, httpConfig.getDuration("connection-timeout"));
if (httpConfig.hasPath("connection-acquire-timeout"))
configuration.put(SdkHttpConfigurationOption.CONNECTION_ACQUIRE_TIMEOUT, httpConfig.getDuration("connection-acquire-timeout"));
if (httpConfig.hasPath("connection-max-idle-timeout"))
configuration.put(SdkHttpConfigurationOption.CONNECTION_MAX_IDLE_TIMEOUT, httpConfig.getDuration("connection-max-idle-timeout"));
if (httpConfig.hasPath("connection-time-to-live"))
configuration.put(SdkHttpConfigurationOption.CONNECTION_TIME_TO_LIVE, httpConfig.getDuration("connection-time-to-live"));
if (httpConfig.hasPath("max-connections"))
configuration.put(SdkHttpConfigurationOption.MAX_CONNECTIONS, httpConfig.getInt("max-connections"));
if (httpConfig.hasPath("max-pending-connection-acquires"))
configuration.put(SdkHttpConfigurationOption.MAX_PENDING_CONNECTION_ACQUIRES, httpConfig.getInt("max-pending-connection-acquires"));
if (httpConfig.hasPath("reap-idle-connections"))
configuration.put(SdkHttpConfigurationOption.REAP_IDLE_CONNECTIONS, httpConfig.getBoolean("reap-idle-connections"));
if (httpConfig.hasPath("tcp-keepalive"))
configuration.put(SdkHttpConfigurationOption.TCP_KEEPALIVE, httpConfig.getBoolean("tcp-keepalive"));
if (httpConfig.hasPath("trust-all-certificates"))
configuration.put(SdkHttpConfigurationOption.TRUST_ALL_CERTIFICATES, httpConfig.getBoolean("trust-all-certificates"));
}
return AttributeMap.builder().putAll(configuration).build();
}