List of usage examples for com.amazonaws ClientConfiguration setProxyWorkstation
public void setProxyWorkstation(String proxyWorkstation)
From source file:org.geowebcache.s3.S3BlobStoreInfo.java
License:Open Source License
/** @return {@link AmazonS3Client} constructed from this {@link S3BlobStoreInfo}. */ public AmazonS3Client buildClient() { ClientConfiguration clientConfig = new ClientConfiguration(); if (null != useHTTPS) { clientConfig.setProtocol(useHTTPS ? Protocol.HTTPS : Protocol.HTTP); }/*ww w .j a v a2s .c om*/ if (null != maxConnections && maxConnections > 0) { clientConfig.setMaxConnections(maxConnections); } clientConfig.setProxyDomain(proxyDomain); clientConfig.setProxyWorkstation(proxyWorkstation); clientConfig.setProxyHost(proxyHost); if (null != proxyPort) { clientConfig.setProxyPort(proxyPort); } clientConfig.setProxyUsername(proxyUsername); clientConfig.setProxyPassword(proxyPassword); if (null != useGzip) { clientConfig.setUseGzip(useGzip); } log.debug("Initializing AWS S3 connection"); AmazonS3Client client = new AmazonS3Client(getCredentialsProvider(), clientConfig); if (endpoint != null && !"".equals(endpoint)) { S3ClientOptions s3ClientOptions = new S3ClientOptions(); s3ClientOptions.setPathStyleAccess(true); client.setS3ClientOptions(s3ClientOptions); client.setEndpoint(endpoint); } if (!client.doesBucketExist(bucket)) { client.createBucket(bucket); } return client; }