Summary
jclouds-s3's goal is to be straight-forward and infrastructure friendly. By straight-forward, it presents a Map-like interface to S3. By infrastructure-friendly, it works well in restricted environments and also can take advantage of less restricted ones.
Easy interface
S3Context context = S3ContextFactory.createS3Context(accesskeyid, secretkey);
S3Bucket bucket = new S3Bucket();
bucket.setName("adrian");
Map map = context.createInputStreamMap(bucket);
// do work
context.close();
Support for Google App Engine
Google App Engine for Java restricts things like spawning threads and making network connections. JClouds provides a connection module that works in GAE (jclouds-gae).
- here is no api change, only a slight difference in how you create your context
S3Context context = S3ContextFactory.createS3Context(accesskeyid, secretkey,
new URLFetchServiceClientModule());More Power?
jclouds-s3 can be configured with a server-grade module (jclouds-s3nio) that takes advantage of thread pools and non-blocking io. Use this module if you are not using Google App Engine and you need more power.
- Again, it is really easy to configure this:
S3Context context = S3ContextFactory.createS3Context(accesskeyid, secretkey,
new S3HttpNioConnectionPoolClientModule());