Created
September 23, 2016 13:55
-
-
Save sumew/a9a3ea79a9d7edc97fe5f2528ec8611a 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!"); | |
return Try.of(() -> new URI(proxy)) | |
.map(uri -> new ClientConfiguration() | |
.withProxyHost(uri.getHost()) | |
.withProxyPort(uri.getPort())).getOrElseThrow(throwable -> | |
new S3StorageException("Unable to create client, proxy not available", throwable)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment