Issue 73: added interface for Maps

git-svn-id: http://jclouds.googlecode.com/svn/trunk@1830 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
adrian.f.cole 2009-07-22 11:03:04 +00:00
parent 4bb2a86e74
commit d01b0606c8
2 changed files with 24 additions and 8 deletions

View File

@ -24,6 +24,7 @@
package org.jclouds.aws.s3;
import org.jclouds.cloud.CloudContext;
import org.jclouds.objectstore.ObjectStoreContext;
/**
* Represents an authenticated context to S3.
@ -38,14 +39,7 @@ import org.jclouds.cloud.CloudContext;
* @author Adrian Cole
*
*/
public interface S3Context extends CloudContext<S3Connection> {
/**
* Creates a <code>Map<String,InputStream></code> view of the specified bucket.
*
* @param bucket
*/
S3InputStreamMap createInputStreamMap(String bucket);
public interface S3Context extends CloudContext<S3Connection>, ObjectStoreContext<S3InputStreamMap> {
/**
* Creates a <code>Map<String,S3Object></code> view of the specified bucket.

View File

@ -0,0 +1,22 @@
package org.jclouds.objectstore;
import java.io.InputStream;
import java.util.Map;
/**
* Represents a cloud that has object storage functionality.
*
*
* @author Adrian Cole
*
*/
public interface ObjectStoreContext<M extends Map<String, InputStream>> {
/**
* Creates a <code>Map<String,InputStream></code> view of the specified namespace.
*
* @param namespace
*/
M createInputStreamMap(String namespace);
}