]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
doc: Added Java example for setting protocol to HTTP.
authorJohn Wilkins <john.wilkins@inktank.com>
Fri, 31 May 2013 18:15:20 +0000 (11:15 -0700)
committerJohn Wilkins <john.wilkins@inktank.com>
Fri, 31 May 2013 18:15:20 +0000 (11:15 -0700)
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc/radosgw/s3/java.rst

index 0bcd8724a5dfa7a367135243bb3fc09d2c5c63f6..468bf2f1740db155403d5887fb9ba5bde3047aec 100644 (file)
@@ -28,6 +28,31 @@ classes to be imported:
        import com.amazonaws.services.s3.model.S3ObjectSummary;
 
 
+If you are just testing the Ceph Object Storage services, consider
+using HTTP protocol instead of HTTPS protocol. 
+
+First, import the ``ClientConfiguration`` and ``Protocol`` classes. 
+
+.. code-block:: java
+
+       import com.amazonaws.ClientConfiguration;
+       import com.amazonaws.Protocol;
+
+
+Then, define the client configuration, and add the client configuration
+as an argument for the S3 client.
+
+.. code-block:: java
+
+       AWSCredentials credentials = new BasicAWSCredentials(accessKey, secretKey);
+                               
+       ClientConfiguration clientConfig = new ClientConfiguration();
+       clientConfig.setProtocol(Protocol.HTTP);
+                       
+       AmazonS3 conn = new AmazonS3Client(credentials, clientConfig);
+       conn.setEndpoint("endpoint.com");
+
+
 Creating a Connection
 ---------------------