|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xerox.amazonws.sqs2.SQSUtils
public class SQSUtils
This class provides helper methods to interact with the Amazon Simple Queue Service.
Constructor Summary | |
---|---|
SQSUtils()
|
Method Summary | |
---|---|
static MessageQueue |
connectToQueue(String queueName,
String accessKey,
String secretKey)
Returns a message queue for a given name, credentials. |
static MessageQueue |
connectToQueue(String serverName,
String queueName,
String accessKey,
String secretKey)
Returns a message queue for a given name, credentials. |
static MessageQueue |
getMessageQueue(QueueService service,
String msgQueueName)
Deprecated. This method was for compatibility with the old AWS SQS client (@see getQueueOrElse) |
static MessageQueue |
getQueueOrElse(QueueService qs,
String queueName)
This method will block until the requested message queue is fetched or created. |
static QueueService |
getQueueService(String accessKey,
String secretKey,
String serverName)
Create a QueueService object for a given URL. |
static void |
sendMessageForSure(MessageQueue queue,
String message)
This method will block until the message has been sent. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SQSUtils()
Method Detail |
---|
public static MessageQueue connectToQueue(String queueName, String accessKey, String secretKey) throws SQSException
queueName
- name of the queue to connect toaccessKey
- AWS access idsecretKey
- AWS secret key
SQSException
public static MessageQueue connectToQueue(String serverName, String queueName, String accessKey, String secretKey) throws SQSException
serverName
- name of the host to usequeueName
- name of the queue to connect toaccessKey
- AWS access idsecretKey
- AWS secret key
SQSException
public static QueueService getQueueService(String accessKey, String secretKey, String serverName) throws SQSException
accessKey
- AWS access idsecretKey
- AWS secret keyserverName
- name of the host to use
SQSException
public static MessageQueue getMessageQueue(QueueService service, String msgQueueName) throws SQSException
service
- the queue service we're usingmsgQueueName
- the name of the message queue to find, or create
SQSException
public static MessageQueue getQueueOrElse(QueueService qs, String queueName)
qs
- the queue service we're usingqueueName
- the name of the queue to find or create
public static void sendMessageForSure(MessageQueue queue, String message)
queue
- the queue the message is sent tomessage
- the message to send
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |