Class S3ClientFactory
- java.lang.Object
-
- com.netflix.genie.common.internal.aws.s3.S3ClientFactory
-
public class S3ClientFactory extends java.lang.ObjectAnAmazonS3client factory class. GivenAmazonS3URIinstances and the configuration of the system this factory is expected to return a valid client instance for the S3 URI which can then be used to access that URI.- Since:
- 4.0.0
-
-
Constructor Summary
Constructors Constructor Description S3ClientFactory(com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider, com.amazonaws.regions.AwsRegionProvider regionProvider, org.springframework.core.env.Environment environment)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.amazonaws.services.s3.AmazonS3getClient(com.amazonaws.services.s3.AmazonS3URI s3URI)Get anAmazonS3client instance appropriate for the givenAmazonS3URI.com.amazonaws.services.s3.transfer.TransferManagergetTransferManager(com.amazonaws.services.s3.AmazonS3URI s3URI)Get aTransferManagerinstance for use with the givens3URI.
-
-
-
Constructor Detail
-
S3ClientFactory
public S3ClientFactory(com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider, com.amazonaws.regions.AwsRegionProvider regionProvider, org.springframework.core.env.Environment environment)Constructor.- Parameters:
awsCredentialsProvider- The base AWS credentials provider to use for the generated S3 clientsregionProvider- How this factory should determine the defaultRegionsenvironment- The Spring applicationEnvironment
-
-
Method Detail
-
getClient
public com.amazonaws.services.s3.AmazonS3 getClient(com.amazonaws.services.s3.AmazonS3URI s3URI)
Get anAmazonS3client instance appropriate for the givenAmazonS3URI.- Parameters:
s3URI- The URI of the S3 resource this client is expected to access.- Returns:
- A S3 client instance which should be used to access the S3 resource
-
getTransferManager
public com.amazonaws.services.s3.transfer.TransferManager getTransferManager(com.amazonaws.services.s3.AmazonS3URI s3URI)
Get aTransferManagerinstance for use with the givens3URI.- Parameters:
s3URI- The S3 URI this transfer manager will be interacting with- Returns:
- An instance of
TransferManagerbacked by an appropriate S3 client for the given URI
-
-