Example usage for com.amazonaws ClientConfiguration withProxyUsername

List of usage examples for com.amazonaws ClientConfiguration withProxyUsername

Introduction

In this page you can find the example usage for com.amazonaws ClientConfiguration withProxyUsername.

Prototype

public ClientConfiguration withProxyUsername(String proxyUsername) 

Source Link

Document

Sets the optional proxy user name and returns the updated ClientConfiguration object.

Usage

From source file:com.noctarius.hazelcast.aws.HazelcastAwsDiscoveryStrategy.java

License:Open Source License

private void configureProxy(ClientConfiguration configuration) {
    String proxyHost = getOrNull(AwsProperties.PROXY_HOST);
    if (proxyHost == null) {
        return;/*from  w w  w  . j a  v a 2  s.com*/
    }

    int proxyPort = getOrDefault(AwsProperties.PROXY_PORT, 80);
    String proxyUsername = getOrNull(AwsProperties.PROXY_USERNAME);
    String proxyPassword = getOrNull(AwsProperties.PROXY_PASSWORD);

    configuration.withProxyHost(proxyHost).setProxyPort(proxyPort);
    configuration.withProxyUsername(proxyUsername);
    configuration.withProxyPassword(proxyPassword);
}