Class AmazonS3Connection
- All Implemented Interfaces:
com.adaptris.aws.AWSCredentialsProviderBuilder.BuilderConfig,ClientWrapper,AdaptrisComponent,AdaptrisConnection,ComponentLifecycle,ComponentLifecycleExtension,StateManagedComponent
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.
-
Field Summary
Fields inherited from class com.adaptris.core.AdaptrisConnectionImp
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.amazonaws.services.s3.AmazonS3Clientprotected voidprotected com.amazonaws.services.s3.AmazonS3ClientBuilderConfigures the client to use path-style access for all requests.protected voidprotected voidvoidsetForcePathStyleAccess(Boolean forcePathStyleAccess) Configures the client to use path-style access for all requests.protected static voidshutdownQuietly(com.amazonaws.services.s3.AmazonS3Client client) protected static voidshutdownQuietly(com.amazonaws.services.s3.transfer.TransferManager tm) protected voidprotected voidcom.amazonaws.services.s3.transfer.TransferManagerMethods inherited from class com.adaptris.aws.AWSConnection
clientConfiguration, credentialsProvider, endpointBuilder, getClientConfiguration, getCredentials, getCustomEndpoint, getRegion, getRetryPolicy, retryPolicy, setClientConfiguration, setCredentials, setCustomEndpoint, setRegion, setRetryPolicy, withClientConfiguration, withCredentialsProviderBuilder, withCustomEndpoint, withRegion, withRetryPolicyMethods inherited from class com.adaptris.core.AdaptrisConnectionImp
addExceptionListener, addMessageConsumer, addMessageProducer, changeState, cloneForTesting, close, connectionErrorHandler, connectionStateHandler, getConnectionErrorHandler, getConnectionStateHandler, getRuntimeComponent, getUniqueId, getWorkersFirstOnShutdown, init, prepare, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, retrieveConnection, retrieveExceptionListeners, retrieveMessageConsumers, retrieveMessageProducers, setConnectionErrorHandler, setConnectionStateHandler, setRuntimeComponent, setUniqueId, setWorkersFirstOnShutdown, start, stop, workersFirstOnShutdown
-
Constructor Details
-
AmazonS3Connection
public AmazonS3Connection()
-
-
Method Details
-
prepareConnection
- Specified by:
prepareConnectionin classAdaptrisConnectionImp- Throws:
CoreException
-
initConnection
- Specified by:
initConnectionin classAdaptrisConnectionImp- Throws:
CoreException
-
createBuilder
- Throws:
CoreException
-
startConnection
- Specified by:
startConnectionin classAdaptrisConnectionImp- Throws:
CoreException
-
stopConnection
protected void stopConnection()- Specified by:
stopConnectionin classAdaptrisConnectionImp
-
closeConnection
protected void closeConnection()- Specified by:
closeConnectionin classAdaptrisConnectionImp
-
shutdownQuietly
protected static void shutdownQuietly(com.amazonaws.services.s3.transfer.TransferManager tm) -
shutdownQuietly
protected static void shutdownQuietly(com.amazonaws.services.s3.AmazonS3Client client) -
amazonClient
public com.amazonaws.services.s3.AmazonS3Client amazonClient()- Specified by:
amazonClientin interfaceClientWrapper
-
transferManager
public com.amazonaws.services.s3.transfer.TransferManager transferManager()- Specified by:
transferManagerin interfaceClientWrapper
-
getForcePathStyleAccess
Configures the client to use path-style access for all requests.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.
-
setForcePathStyleAccess
Configures the client to use path-style access for all requests.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.
-