|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xerox.amazonws.common.AWSConnection
com.xerox.amazonws.common.AWSQueryConnection
public class AWSQueryConnection
This class provides an interface with the Amazon SQS service. It provides high level methods for listing and creating message queues.
Field Summary |
---|
Fields inherited from class com.xerox.amazonws.common.AWSConnection |
---|
headers |
Constructor Summary | |
---|---|
AWSQueryConnection(String awsAccessId,
String awsSecretKey,
boolean isSecure,
String server,
int port)
Initializes the queue service with your AWS login information. |
Method Summary | ||
---|---|---|
protected void |
close(org.apache.http.HttpEntity entity)
|
|
protected void |
close(InputStream istream)
|
|
int |
getConnectionManagerTimeout()
|
|
int |
getConnectionTimeout()
|
|
Map<String,List<String>> |
getHeaders()
This method returns the map of headers for this connection |
|
protected org.apache.http.client.HttpClient |
getHttpClient()
|
|
int |
getMaxConnections()
This method returns the number of connections that can be open at once. |
|
int |
getMaxRetries()
This method returns the number of times to retry when a recoverable error occurs. |
|
TimeZone |
getServerTimeZone()
Returns timezone used when creating requests. |
|
int |
getSoTimeout()
|
|
protected String |
getString(org.apache.http.HttpEntity entity)
|
|
protected String |
httpDate(Calendar date)
|
|
|
makeRequest(org.apache.http.client.methods.HttpRequestBase method,
String action,
Map<String,String> params,
Class<T> respType)
Make a http request and process the response. |
|
void |
setConnectionManagerTimeout(int timeout)
|
|
void |
setConnectionTimeout(int timeout)
|
|
void |
setHttpClient(org.apache.http.client.HttpClient hc)
|
|
void |
setMaxConnections(int connections)
This method sets the number of connections that can be open at once. |
|
void |
setMaxRetries(int retries)
This method sets the number of times to retry when a recoverable error occurs. |
|
void |
setProxyValues(String host,
int port)
This method sets the proxy host and port |
|
void |
setProxyValues(String host,
int port,
String user,
String password)
This method sets the proxy host, port, user and password (for authenticating proxies) |
|
void |
setProxyValues(String host,
int port,
String user,
String password,
String domain)
This method sets the proxy host, port, user, password and domain (for NTLM authentication) |
|
void |
setServerTimeZone(TimeZone serverTimeZone)
Allows setting non-standard server timezone. |
|
void |
setSoTimeout(int timeout)
|
|
void |
useSystemProxy()
This method indicates the system properties should be used for proxy settings. |
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 |
---|
public AWSQueryConnection(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 int getMaxConnections()
public void setMaxConnections(int connections)
connections
- the number of connectionspublic int getMaxRetries()
public void setMaxRetries(int retries)
retries
- the number of times to retry on recoverable errorpublic void setProxyValues(String host, int port)
host
- the proxy hostport
- the proxy portpublic void setProxyValues(String host, int port, String user, String password)
host
- the proxy hostport
- the proxy portuser
- the proxy userpassword
- the proxy passwordpublic void setProxyValues(String host, int port, String user, String password, String domain)
host
- the proxy hostport
- the proxy portuser
- the proxy userpassword
- the proxy passworddomain
- the proxy domainpublic void useSystemProxy()
public int getConnectionManagerTimeout()
org.apache.http.params.HttpClientParams.getConnectionManagerTimeout()
public void setConnectionManagerTimeout(int timeout)
connection
- manager timeout in millisecondsorg.apache.http.params.HttpClientParams.getConnectionManagerTimeout()
public int getSoTimeout()
org.apache.http.params.HttpConnectionParams.getSoTimeout()
,
org.apache.http.params.HttpMethodParams.getSoTimeout()
public void setSoTimeout(int timeout)
socket
- timeout in millisecondsorg.apache.http.params.HttpConnectionParams.getSoTimeout()
,
org.apache.http.params.HttpMethodParams.getSoTimeout()
public int getConnectionTimeout()
org.apache.http.params.HttpConnectionParams.getConnectionTimeout()
public void setConnectionTimeout(int timeout)
connection
- timeout in millisecondsorg.apache.http.params.HttpConnectionParams.getConnectionTimeout()
public Map<String,List<String>> getHeaders()
public TimeZone getServerTimeZone()
public void setServerTimeZone(TimeZone serverTimeZone)
serverTimeZone
- new timezone of serverprotected org.apache.http.client.HttpClient getHttpClient()
public void setHttpClient(org.apache.http.client.HttpClient hc)
public <T> T makeRequest(org.apache.http.client.methods.HttpRequestBase method, String action, Map<String,String> params, Class<T> respType) throws org.apache.http.HttpException, IOException, javax.xml.bind.JAXBException, AWSException, SAXException
method
- The HTTP method to use (GET, POST, DELETE, etc)action
- the name of the action for this query requestparams
- map of request paramsrespType
- the class that represents the desired/expected return type
org.apache.http.HttpException
IOException
javax.xml.bind.JAXBException
AWSException
SAXException
protected String getString(org.apache.http.HttpEntity entity)
protected void close(org.apache.http.HttpEntity entity)
protected void close(InputStream istream)
protected String httpDate(Calendar date)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |