public class SqsListenerImpl extends java.lang.Object implements SqsListener
MessageHandler implementation.SqsFactory,
SqsListenerHealthCheck| Constructor and Description |
|---|
SqsListenerImpl(com.amazonaws.services.sqs.AmazonSQS sqs,
java.lang.String sqsListenQueueUrl,
java.util.Set<MessageHandler> handlers) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getQueueUrl() |
boolean |
isHealthy()
Health check of the associated SQS queue.
|
void |
start() |
void |
stop() |
@Inject
public SqsListenerImpl(com.amazonaws.services.sqs.AmazonSQS sqs,
java.lang.String sqsListenQueueUrl,
java.util.Set<MessageHandler> handlers)
sqs - Managed AmazonSQS instance that this listener will use
to connect to its queue.sqsListenQueueUrl - URL of the queue where this instance will listen to (
Named sqsListenQueueUrl).handlers - All handlers will be called for every message that this
instance receives.public void start()
throws java.lang.Exception
start in interface io.dropwizard.lifecycle.Managedjava.lang.Exceptionpublic void stop()
throws java.lang.Exception
stop in interface io.dropwizard.lifecycle.Managedjava.lang.Exceptionpublic boolean isHealthy()
SqsListenerisHealthy in interface SqsListenerpublic java.lang.String getQueueUrl()
getQueueUrl in interface SqsListener