|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MessageApi
Provides access to SQS via their REST API.
MessageAsyncApi| Method Summary | |
|---|---|
BatchResult<String> |
changeVisibility(Iterable<String> receiptHandles,
int visibilityTimeout)
Same as changeVisibility(Map, int), except that we generate
numeric ids starting with 1 |
BatchResult<? extends MessageIdAndMD5> |
changeVisibility(Map<String,Integer> receiptHandleVisibilityTimeout)
Same as changeVisibility(Table), except that we generate numeric
ids starting with 1 |
BatchResult<String> |
changeVisibility(Map<String,String> idReceiptHandle,
int visibilityTimeout)
Currently, you can send up to 10 changeVisibility(java.lang.String, int) requests. |
void |
changeVisibility(String receiptHandle,
int visibilityTimeout)
The ChangeMessageVisibility action changes the visibility timeout of a specified message in a queue to a new value. |
BatchResult<String> |
changeVisibility(com.google.common.collect.Table<String,String,Integer> idReceiptHandleVisibilityTimeout)
Currently, you can send up to 10 changeVisibility(java.lang.String, int) requests. |
BatchResult<String> |
delete(Iterable<String> receiptHandles)
Same as delete(Map), except that we generate numeric ids starting
with 1 |
BatchResult<String> |
delete(Map<String,String> idReceiptHandle)
Currently, you can send up to 10 delete(java.lang.String) requests. |
void |
delete(String receiptHandle)
The DeleteMessage action deletes the specified message from the specified queue. |
Message |
receive()
The ReceiveMessage action retrieves one or more messages from the specified queue. |
com.google.common.collect.FluentIterable<Message> |
receive(int max)
same as #receive(URI) except you can receive multiple messages. |
com.google.common.collect.FluentIterable<Message> |
receive(int max,
ReceiveMessageOptions options)
same as #receive(URI, int) except you can provide options like
VisibilityTimeout parameter in your request, which will be applied to the
messages that SQS returns in the response. |
Message |
receive(ReceiveMessageOptions options)
same as #receive(URI) except you can provide options like
VisibilityTimeout parameter in your request, which will be applied to the
messages that SQS returns in the response. |
BatchResult<? extends MessageIdAndMD5> |
send(Iterable<String> messageBodies)
Same as send(Map), except that we generate numeric ids starting
with 1 |
BatchResult<? extends MessageIdAndMD5> |
send(Map<String,String> idMessageBody)
The SendMessageBatch action delivers up to ten messages to the specified queue. |
MessageIdAndMD5 |
send(String message)
The SendMessage action delivers a message to the specified queue. |
MessageIdAndMD5 |
send(String message,
SendMessageOptions options)
same as #sendMessage(URI, String) except you can control options
such as delay seconds. |
BatchResult<? extends MessageIdAndMD5> |
sendWithDelay(Iterable<String> messageBodies,
int delaySeconds)
Same as sendWithDelay(Map, int), except that we generate numeric
ids starting with 1 |
BatchResult<? extends MessageIdAndMD5> |
sendWithDelay(Map<String,String> idMessageBody,
int delaySeconds)
Same as send(Map) except you set a delay for all messages in the
request |
BatchResult<? extends MessageIdAndMD5> |
sendWithDelays(Map<String,Integer> messageBodyDelaySeconds)
Same as sendWithDelays(Table), except that we generate numeric
ids starting with 1 |
BatchResult<? extends MessageIdAndMD5> |
sendWithDelays(com.google.common.collect.Table<String,String,Integer> idMessageBodyDelaySeconds)
Same as send(Map) except you can set a delay for each message in
the request. |
| Method Detail |
|---|
void delete(String receiptHandle)
queue - the queue the message is inreceiptHandle - The receipt handle associated with the message you want to
delete.BatchResult<String> delete(Map<String,String> idReceiptHandle)
delete(java.lang.String) requests.
BatchResultresults = api.delete(ImmutableMap. builder() .put("id1", "handle1") .put("id2", "handle2") .build()); if (results.keySet().equals(ImmutableSet.of("id", "id2")) // all ok else results.getErrors();
idReceiptHandle - id for correlating the result to receipt handle
delete(String)BatchResult<String> delete(Iterable<String> receiptHandles)
delete(Map), except that we generate numeric ids starting
with 1
receiptHandles - receipt handles to deletedelete(Map)
void changeVisibility(String receiptHandle,
int visibilityTimeout)
queue - the queue the message is inreceiptHandle - The receipt handle associated with the message whose visibility
timeout you want to change. This parameter is returned by the
ReceiveMessage action.visibilityTimeout - The new value for the message's visibility timeout (in seconds)
from 0 to 43200 (maximum 12 hours)BatchResult<String> changeVisibility(com.google.common.collect.Table<String,String,Integer> idReceiptHandleVisibilityTimeout)
changeVisibility(java.lang.String, int) requests.
action. BatchResultresults = api.changeVisibility(ImmutableTable. builder() .put("id1", "handle1", 45) .put("id2", "handle2", 10) .build()); if (results.keySet().equals(ImmutableSet.of("id", "id2")) // all ok else results.getErrors();
idReceiptHandleVisibilityTimeout - id for correlating the result, receipt handle, and visibility
timeout
changeVisibility(String, int)BatchResult<? extends MessageIdAndMD5> changeVisibility(Map<String,Integer> receiptHandleVisibilityTimeout)
changeVisibility(Table), except that we generate numeric
ids starting with 1
receiptHandleVisibilityTimeout - receipt handle to visibility timeoutchangeVisibility(Table)
BatchResult<String> changeVisibility(Map<String,String> idReceiptHandle,
int visibilityTimeout)
changeVisibility(java.lang.String, int) requests.
action. BatchResultresults = api.changeVisibility(ImmutableMap. builder() .put("id1", "handle1") .put("id2", "handle2") .build(), 45); if (results.keySet().equals(ImmutableSet.of("id", "id2")) // all ok else results.getErrors();
idReceiptHandle - id for correlating the result to receipt handlevisibilityTimeout - The new value for the message's visibility timeout (in seconds).
changeVisibility(String, int)
BatchResult<String> changeVisibility(Iterable<String> receiptHandles,
int visibilityTimeout)
changeVisibility(Map, int), except that we generate
numeric ids starting with 1
receiptHandles - receipt handles to change visibilitychangeVisibility(Map, int)MessageIdAndMD5 send(String message)
#x9 | #xA | #xD | [#x20 to #xD7FF] | [#xE000 to #xFFFD] | [#x10000 to #x10FFFF]
queue - queue you want to send tomessage - Type: String maximum 64 KB in size. For a list of allowed
characters, see the preceding important note.
BatchResult<? extends MessageIdAndMD5> sendWithDelays(com.google.common.collect.Table<String,String,Integer> idMessageBodyDelaySeconds)
send(Map) except you can set a delay for each message in
the request.
BatchResult extends MessageIdAndMD5> results = api.sendWithDelays(ImmutableTable.builder() .put("id1", "test message one", 1) .put("id2", "test message two", 10) .build()); if (results.keySet().equals(ImmutableSet.of("id", "id2")) // all ok else results.getErrors();
idMessageBodyDelaySeconds - id for correlating the result, message body, and delay seconds
send(String, SendMessageOptions)BatchResult<? extends MessageIdAndMD5> sendWithDelays(Map<String,Integer> messageBodyDelaySeconds)
sendWithDelays(Table), except that we generate numeric
ids starting with 1
messageBodyDelaySeconds - message body to the delay desiredsendWithDelays(Table)
BatchResult<? extends MessageIdAndMD5> sendWithDelay(Map<String,String> idMessageBody,
int delaySeconds)
send(Map) except you set a delay for all messages in the
request
delaySeconds - The number of seconds to delay a specific message. Messages with
a positive DelaySeconds value become available for processing
after the delay time is finished.send(String, SendMessageOptions)
BatchResult<? extends MessageIdAndMD5> sendWithDelay(Iterable<String> messageBodies,
int delaySeconds)
sendWithDelay(Map, int), except that we generate numeric
ids starting with 1
messageBodies - message bodies to sendsendWithDelay(Map, int)BatchResult<? extends MessageIdAndMD5> send(Map<String,String> idMessageBody)
send(java.lang.String) requests.
action. BatchResult extends MessageIdAndMD5> results = api.send(ImmutableMap.builder() .put("id1", "test message one") .put("id2", "test message two") .build()); if (results.keySet().equals(ImmutableSet.of("id", "id2")) // all ok else results.getErrors();
idMessageBody - id for correlating the result to message body
send(String)BatchResult<? extends MessageIdAndMD5> send(Iterable<String> messageBodies)
send(Map), except that we generate numeric ids starting
with 1
messageBodies - message bodies to sendsend(Map)
MessageIdAndMD5 send(String message,
SendMessageOptions options)
#sendMessage(URI, String) except you can control options
such as delay seconds.
options - options such as delay seconds#sendMessage(URI, String)Message receive()
queue - from where you are receiving messages
Message receive(ReceiveMessageOptions options)
#receive(URI) except you can provide options like
VisibilityTimeout parameter in your request, which will be applied to the
messages that SQS returns in the response. If you do not include the
parameter, the overall visibility timeout for the queue is used for the
returned messages.
options - options such as VisibilityTimeout#receive(URI)com.google.common.collect.FluentIterable<Message> receive(int max)
#receive(URI) except you can receive multiple messages.
max - maximum messages to receive, current limit is 10#receive(URI)
com.google.common.collect.FluentIterable<Message> receive(int max,
ReceiveMessageOptions options)
#receive(URI, int) except you can provide options like
VisibilityTimeout parameter in your request, which will be applied to the
messages that SQS returns in the response. If you do not include the
parameter, the overall visibility timeout for the queue is used for the
returned messages.
options - options such as VisibilityTimeout#receive(URI, int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||