Created
September 23, 2016 13:55
-
-
Save sumew/a31ba39e6f183f8c29e3346c32e8921a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private ClientConfiguration getClientConfigueration() { | |
Assert.notNull(proxy, "Proxy address not found!"); | |
String host; | |
int port; | |
try { | |
URI uri = new URI(proxy); | |
host = uri.getHost(); | |
port = uri.getPort(); | |
} catch (URISyntaxException e) { | |
logger.error("Error creating client", e); | |
throw new S3StorageException("Unable to create client, proxy not available", e); | |
} | |
ClientConfiguration clientConfiguration = new ClientConfiguration() | |
.withProxyHost(host) | |
.withProxyPort(port); | |
return clientConfiguration; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment