-
Notifications
You must be signed in to change notification settings - Fork 28
/
AmazonSQSRequester.java
30 lines (23 loc) · 1.05 KB
/
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 software.amazon.awssdk.services.sqs.SqsClient;
import software.amazon.awssdk.services.sqs.model.Message;
import software.amazon.awssdk.services.sqs.model.SendMessageRequest;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
public interface AmazonSQSRequester {
SqsClient 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();
}