List of usage examples for com.amazonaws ClientConfiguration withRetryPolicy
public ClientConfiguration withRetryPolicy(RetryPolicy retryPolicy)
From source file:org.finra.herd.dao.helper.AwsHelper.java
License:Apache License
/** * Creates a client configuration object that contains client configuration options such as proxy settings and max retry attempts. * * @param awsParamsDto the AWS related parameters that contain optional proxy information * * @return the client configuration object *///from w w w. ja v a 2 s .c o m public ClientConfiguration getClientConfiguration(AwsParamsDto awsParamsDto) { ClientConfiguration clientConfiguration = new ClientConfiguration(); // Set a retry policy. clientConfiguration.withRetryPolicy(retryPolicyFactory.getRetryPolicy()); // If the proxy hostname and port both are configured, set the HTTP proxy information. if (StringUtils.isNotBlank(awsParamsDto.getHttpProxyHost()) && awsParamsDto.getHttpProxyPort() != null) { clientConfiguration.withProxyHost(awsParamsDto.getHttpProxyHost()) .withProxyPort(awsParamsDto.getHttpProxyPort()); } return clientConfiguration; }