forked from awslabs/amazon-sqs-java-temporary-queues-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AmazonSQSRequester.java
30 lines (23 loc) · 965 Bytes
/
AmazonSQSRequester.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.amazonaws.services.sqs;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import com.amazonaws.services.sqs.AmazonSQS;
import com.amazonaws.services.sqs.model.Message;
import com.amazonaws.services.sqs.model.SendMessageRequest;
public interface AmazonSQSRequester {
AmazonSQS getAmazonSQS();
/**
* Sends a message and waits the given amount of time for
* the response message.
*/
public Message sendMessageAndGetResponse(SendMessageRequest request,
int timeout, TimeUnit unit) throws TimeoutException;
/**
* Sends a message and returns a <tt>CompletableFuture</tt>
* that will be completed with the response message when it arrives.
*/
public CompletableFuture<Message> sendMessageAndGetResponseAsync(SendMessageRequest request,
int timeout, TimeUnit unit);
public void shutdown();
}