com.xerox.amazonws.common
Class AWSAuthConnection

java.lang.Object
  extended by com.xerox.amazonws.common.AWSConnection
      extended by com.xerox.amazonws.common.AWSAuthConnection

public class AWSAuthConnection
extends AWSConnection

This class provides an interface with the Amazon SQS service. It provides high level methods for listing and creating message queues. Http authentication code borrowed from Amazon S3 AWSAuthConnection code (see amazon copyright below).

Author:
D. Kavanagh, developer@dotech.com

Field Summary
 
Fields inherited from class com.xerox.amazonws.common.AWSConnection
headers
 
Constructor Summary
AWSAuthConnection(String awsAccessId, String awsSecretKey, boolean isSecure, String server, int port)
          Initializes the queue service with your AWS login information.
 
Method Summary
protected  HttpURLConnection makeRequest(String method, String resource, Map headers)
          Make a new HttpURLConnection.
 
Methods inherited from class com.xerox.amazonws.common.AWSConnection
encode, encode, getAlgorithm, getAwsAccessKeyId, getPort, getResourcePrefix, getSecretAccessKey, getServer, getSignatureVersion, getUrl, isSecure, makeURL, setResourcePrefix, setServer, setSignatureVersion, urlencode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AWSAuthConnection

public AWSAuthConnection(String awsAccessId,
                         String awsSecretKey,
                         boolean isSecure,
                         String server,
                         int port)
Initializes the queue service with your AWS login information.

Parameters:
awsAccessId - The your user key into AWS
awsSecretKey - The secret string used to generate signatures for authentication.
isSecure - True if the data should be encrypted on the wire on the way to or from SQS.
server - Which host to connect to. Usually, this will be s3.amazonaws.com
port - Which port to use.
Method Detail

makeRequest

protected HttpURLConnection makeRequest(String method,
                                        String resource,
                                        Map headers)
                                 throws MalformedURLException,
                                        IOException
Make a new HttpURLConnection.

Parameters:
method - The HTTP method to use (GET, PUT, DELETE)
resource - The resource name (bucketName + "/" + key).
headers - A Map of String to List of Strings representing the http headers to pass (can be null).
Throws:
MalformedURLException
IOException