public abstract class MessageHandler
extends java.lang.Object
SqsListenerImpl.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTR_MESSAGE_TYPE
Message attribute name that identifies the message type.
|
| Modifier | Constructor and Description |
|---|---|
protected |
MessageHandler(java.lang.String messageType)
Implementors are strongly encouraged to call this constructor with a
fixed value from their constructor(s).
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canHandle(com.amazonaws.services.sqs.model.Message message)
Determines whether the supplied messages can be handled by this handler.
|
abstract void |
handle(com.amazonaws.services.sqs.model.Message message)
Implementations of this method must be able to handle messages of the
type that was supplied to the constructor.
|
public static final java.lang.String ATTR_MESSAGE_TYPE
protected MessageHandler(java.lang.String messageType)
messageType - Identifies the type of messages that this handler will handle.public boolean canHandle(com.amazonaws.services.sqs.model.Message message)
message - The message to test.public abstract void handle(com.amazonaws.services.sqs.model.Message message)
message - The message to be handled.