|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xerox.amazonws.common.AWSConnection
public abstract class AWSConnection
This class provides common code to the query and rest connection classes
Field Summary | |
---|---|
protected Map<String,List<String>> |
headers
|
Constructor Summary | |
---|---|
AWSConnection(String awsAccessId,
String awsSecretKey,
boolean isSecure,
String server,
int port)
Initializes the queue service with your AWS login information. |
Method Summary | |
---|---|
protected String |
encode(String awsSecretKey,
String canonicalString,
boolean urlencode)
Calculate the HMAC/SHA1 on a string. |
protected String |
encode(String awsSecretKey,
String canonicalString,
boolean urlencode,
String algorithm)
|
protected String |
getAlgorithm()
|
String |
getAwsAccessKeyId()
|
int |
getPort()
|
String |
getResourcePrefix()
|
String |
getSecretAccessKey()
|
String |
getServer()
|
int |
getSignatureVersion()
This method returns the signature version |
URL |
getUrl()
This method provides the URL for the queue service based on initialization. |
boolean |
isSecure()
|
protected URL |
makeURL(String resource)
Create a new URL object for a given resource. |
void |
setResourcePrefix(String prefix)
|
void |
setServer(String server)
|
void |
setSignatureVersion(int version)
This method sets the signature version used to sign requests (0, 1 or 2). |
protected String |
urlencode(String unencoded)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Map<String,List<String>> headers
Constructor Detail |
---|
public AWSConnection(String awsAccessId, String awsSecretKey, boolean isSecure, String server, int port)
awsAccessId
- The your user key into AWSawsSecretKey
- 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.port
- Which port to use.Method Detail |
---|
public URL getUrl()
public String getAwsAccessKeyId()
public String getSecretAccessKey()
public boolean isSecure()
public String getServer()
public void setServer(String server)
public int getPort()
public String getResourcePrefix()
public void setResourcePrefix(String prefix)
public int getSignatureVersion()
public void setSignatureVersion(int version)
version
- signature versionprotected URL makeURL(String resource) throws MalformedURLException
resource
- The resource name (bucketName + "/" + key).
MalformedURLException
protected String encode(String awsSecretKey, String canonicalString, boolean urlencode)
awsSecretKey
- passcode to sign it withcanonicalString
- data to sign
NoSuchAlgorithmException
- If the algorithm does not exist. Unlikely
InvalidKeyException
- If the key is invalid.protected String encode(String awsSecretKey, String canonicalString, boolean urlencode, String algorithm)
protected String getAlgorithm()
protected String urlencode(String unencoded)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |