S3ProxyConstants.PROPERTY_FORCE_MULTI_PART_UPLOAD);
Optional<String> virtualHost = Optional.fromNullable(
properties.getProperty(
S3ProxyConstants.PROPERTY_VIRTUAL_HOST));
ContextBuilder builder = ContextBuilder
.newBuilder(provider)
.credentials(identity, credential)
.modules(ImmutableList.<Module>of(new SLF4JLoggingModule()))
.overrides(properties);
if (endpoint != null) {
builder = builder.endpoint(endpoint);
}
BlobStoreContext context = builder.build(BlobStoreContext.class);
URI s3ProxyEndpoint = new URI(s3ProxyEndpointString);
S3Proxy s3Proxy = new S3Proxy(context.getBlobStore(), s3ProxyEndpoint,
localIdentity, localCredential, keyStorePath,
keyStorePassword,
"true".equalsIgnoreCase(forceMultiPartUpload), virtualHost);