Class S3ClientFactory

java.lang.Object
com.netflix.genie.common.internal.aws.s3.S3ClientFactory

public class S3ClientFactory extends Object
An AmazonS3 client factory class. Given AmazonS3URI instances 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

    Modifier and Type
    Method
    Description
    com.amazonaws.services.s3.AmazonS3
    getClient(com.amazonaws.services.s3.AmazonS3URI s3URI)
    Get an AmazonS3 client instance appropriate for the given AmazonS3URI.
    com.amazonaws.services.s3.transfer.TransferManager
    getTransferManager(com.amazonaws.services.s3.AmazonS3URI s3URI)
    Get a TransferManager instance for use with the given s3URI.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • 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 clients
      regionProvider - How this factory should determine the default Regions
      environment - The Spring application Environment
  • Method Details

    • getClient

      public com.amazonaws.services.s3.AmazonS3 getClient(com.amazonaws.services.s3.AmazonS3URI s3URI)
      Get an AmazonS3 client instance appropriate for the given AmazonS3URI.
      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 a TransferManager instance for use with the given s3URI.
      Parameters:
      s3URI - The S3 URI this transfer manager will be interacting with
      Returns:
      An instance of TransferManager backed by an appropriate S3 client for the given URI