@ComponentProfile(summary="Connection for supporting connectivity to Amazon S3", tag="connections,amazon,s3", recommended=S3Service.class) public class AmazonS3Connection extends com.adaptris.aws.AWSConnection implements ClientWrapper
This class directly exposes almost all the getter and setters that are available in ClientConfiguration
via the
AWSConnection.getClientConfiguration()
property for maximum flexibility in configuration.
The key from the client-configuration
element should match the name of the underlying ClientConfiguration property;
so if you wanted to control the user-agent you would do :
<client-configuration>
<key-value-pair>
<key>UserAgent</key>
<value>My User Agent</value>
</key-value-pair>
</client-configuration>
In the adapter configuration file this class is aliased as amazon-s3-connection which is the preferred alternative to the fully qualified classname when building your configuration.
log
Constructor and Description |
---|
AmazonS3Connection() |
Modifier and Type | Method and Description |
---|---|
com.amazonaws.services.s3.AmazonS3Client |
amazonClient() |
protected void |
closeConnection() |
protected com.amazonaws.services.s3.AmazonS3ClientBuilder |
createBuilder() |
java.lang.Boolean |
getForcePathStyleAccess()
Configures the client to use path-style access for all requests.
|
protected void |
initConnection() |
protected void |
prepareConnection() |
void |
setForcePathStyleAccess(java.lang.Boolean forcePathStyleAccess)
Configures the client to use path-style access for all requests.
|
protected static void |
shutdownQuietly(com.amazonaws.services.s3.AmazonS3Client client) |
protected static void |
shutdownQuietly(com.amazonaws.services.s3.transfer.TransferManager tm) |
protected void |
startConnection() |
protected void |
stopConnection() |
com.amazonaws.services.s3.transfer.TransferManager |
transferManager() |
clientConfiguration, credentialsProvider, endpointBuilder, getClientConfiguration, getCredentials, getCustomEndpoint, getRegion, getRetryPolicy, retryPolicy, setClientConfiguration, setCredentials, setCustomEndpoint, setRegion, setRetryPolicy, withClientConfiguration, withCredentialsProviderBuilder, withCustomEndpoint, withRegion, withRetryPolicy
addExceptionListener, addMessageConsumer, addMessageProducer, changeState, cloneForTesting, close, connectionErrorHandler, getConnectionErrorHandler, getUniqueId, getWorkersFirstOnShutdown, init, prepare, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, retrieveConnection, retrieveExceptionListeners, retrieveMessageConsumers, retrieveMessageProducers, setConnectionErrorHandler, setUniqueId, setWorkersFirstOnShutdown, start, stop, workersFirstOnShutdown
protected void prepareConnection() throws CoreException
prepareConnection
in class AdaptrisConnectionImp
CoreException
protected void initConnection() throws CoreException
initConnection
in class AdaptrisConnectionImp
CoreException
protected com.amazonaws.services.s3.AmazonS3ClientBuilder createBuilder() throws CoreException
CoreException
protected void startConnection() throws CoreException
startConnection
in class AdaptrisConnectionImp
CoreException
protected void stopConnection()
stopConnection
in class AdaptrisConnectionImp
protected void closeConnection()
closeConnection
in class AdaptrisConnectionImp
protected static void shutdownQuietly(com.amazonaws.services.s3.transfer.TransferManager tm)
protected static void shutdownQuietly(com.amazonaws.services.s3.AmazonS3Client client)
public com.amazonaws.services.s3.AmazonS3Client amazonClient()
amazonClient
in interface ClientWrapper
public com.amazonaws.services.s3.transfer.TransferManager transferManager()
transferManager
in interface ClientWrapper
public java.lang.Boolean getForcePathStyleAccess()
The default behaviour is to detect which access style to use based on the configured endpoint (an IP will result in path-style access) and the bucket being accessed (some buckets are not valid DNS names). Setting this flag will result in path-style access being used for all requests.
public void setForcePathStyleAccess(java.lang.Boolean forcePathStyleAccess)
The default behaviour is to detect which access style to use based on the configured endpoint (an IP will result in path-style access) and the bucket being accessed (some buckets are not valid DNS names). Setting this flag will result in path-style access being used for all requests.