Upplication / Amazon-S3-FileSystem-NIO2

An S3 File System Provider for Java 7
MIT License
122 stars 67 forks source link

As a developer i want to use a custom com.amazonaws.services.s3.AmazonS3 so that i can have only one instance of AmazonS3 #14

Open jarnaiz opened 10 years ago

jarnaiz commented 10 years ago

Study if is good to set only one AmazonS3 in a java enterprise application. If the endpoint change the FileSystem fails.

Example of usage

Map<String, Object> env = new HashMap<>();
env.punt("credentials-client", amazonS3);

FileSystems.newFIleSystem(endpointUri, env);
jarnaiz commented 10 years ago

Searching on internet i found:

So i think this feature is good :)

febner commented 6 years ago

There is

public S3FileSystem(S3FileSystemProvider provider, String key, AmazonS3 client, String endpoint)

already right?

IMHO OP can just use that.

sbeimin commented 6 years ago

You can set your own s3fs_amazon_s3_factory in the amazon.properties. In your own implementation extending com.upplication.s3fs.AmazonS3Factory you have control over how the AmazonS3 is instantiated.