public abstract class AbstractSQSConnector extends Object implements SQSConnector
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
_log |
protected static String |
AWS_ERROR_CODE_AUTHENTICATION |
Modifier | Constructor and Description |
---|---|
protected |
AbstractSQSConnector(long receiveCheckIntervalMs) |
protected |
AbstractSQSConnector(long receiveCheckIntervalMs,
boolean isAsync) |
Modifier and Type | Method and Description |
---|---|
protected NevadoMessage |
convertSqsMessage(NevadoDestination destination,
SQSMessage sqsMessage,
boolean readOnly) |
NevadoQueue |
createQueue(String queueName)
Create a queue
|
void |
deleteMessage(NevadoMessage message) |
void |
deleteQueue(NevadoQueue queue) |
protected NevadoMessage |
deserializeMessage(String serializedMessage)
Deserializes the body of an SQS message into a NevadoMessage object.
|
protected String |
getPolicy(String snsArn,
String sqsArn)
Creates the policy for a sqs subscription to sns
|
protected SQSQueue |
getSQSQueue(NevadoDestination destination) |
protected abstract SQSQueue |
getSQSQueueImpl(NevadoQueue queue) |
boolean |
isAsync() |
NevadoMessage |
receiveMessage(NevadoConnection connection,
NevadoDestination destination,
long timeoutMs) |
protected SQSMessage |
receiveSQSMessage(NevadoConnection connection,
NevadoDestination destination,
long timeoutMs,
long startTimeMs,
SQSQueue sqsQueue) |
void |
resetMessage(NevadoMessage message) |
void |
sendMessage(NevadoDestination destination,
NevadoMessage message) |
void |
sendMessages(NevadoDestination destination,
List<NevadoMessage> outgoingMessages) |
protected abstract void |
sendSNSMessage(NevadoTopic topic,
String serializedMessage) |
protected String |
sendSQSMessage(NevadoQueue queue,
String serializedMessage) |
protected String |
serializeMessage(NevadoMessage message)
Serialize a NevadoMessage object into the body of an SQS message into a bae64 string.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createTopic, deleteTopic, listQueues, listTopics, subscribe, test, unsubscribe
protected static final String AWS_ERROR_CODE_AUTHENTICATION
protected final org.apache.commons.logging.Log _log
protected AbstractSQSConnector(long receiveCheckIntervalMs)
protected AbstractSQSConnector(long receiveCheckIntervalMs, boolean isAsync)
public boolean isAsync()
public void sendMessage(NevadoDestination destination, NevadoMessage message) throws javax.jms.JMSException
sendMessage
in interface SQSConnector
javax.jms.JMSException
public void sendMessages(NevadoDestination destination, List<NevadoMessage> outgoingMessages) throws javax.jms.JMSException
sendMessages
in interface SQSConnector
javax.jms.JMSException
public NevadoMessage receiveMessage(NevadoConnection connection, NevadoDestination destination, long timeoutMs) throws javax.jms.JMSException, InterruptedException
receiveMessage
in interface SQSConnector
javax.jms.JMSException
InterruptedException
public void deleteMessage(NevadoMessage message) throws javax.jms.JMSException
deleteMessage
in interface SQSConnector
javax.jms.JMSException
public void resetMessage(NevadoMessage message) throws javax.jms.JMSException
resetMessage
in interface SQSConnector
javax.jms.JMSException
public NevadoQueue createQueue(String queueName) throws javax.jms.JMSException
createQueue
in interface SQSConnector
queueName
- Name of queue to createjavax.jms.JMSException
public void deleteQueue(NevadoQueue queue) throws javax.jms.JMSException
deleteQueue
in interface SQSConnector
javax.jms.JMSException
protected abstract void sendSNSMessage(NevadoTopic topic, String serializedMessage) throws javax.jms.JMSException
javax.jms.JMSException
protected SQSQueue getSQSQueue(NevadoDestination destination) throws javax.jms.JMSException
javax.jms.JMSException
protected abstract SQSQueue getSQSQueueImpl(NevadoQueue queue) throws javax.jms.JMSException
javax.jms.JMSException
protected SQSMessage receiveSQSMessage(NevadoConnection connection, NevadoDestination destination, long timeoutMs, long startTimeMs, SQSQueue sqsQueue) throws javax.jms.JMSException, InterruptedException
javax.jms.JMSException
InterruptedException
protected String sendSQSMessage(NevadoQueue queue, String serializedMessage) throws javax.jms.JMSException
javax.jms.JMSException
protected NevadoMessage convertSqsMessage(NevadoDestination destination, SQSMessage sqsMessage, boolean readOnly) throws javax.jms.JMSException
javax.jms.JMSException
protected String serializeMessage(NevadoMessage message) throws javax.jms.JMSException
message
- A NevadoMessage objectjavax.jms.JMSException
- Unable to serialize the messageprotected NevadoMessage deserializeMessage(String serializedMessage) throws javax.jms.JMSException
serializedMessage
- String-serialized NevadoMessagejavax.jms.JMSException
- Unable to deserializeFromString a single NevadoMessage object from the sourceCopyright © 2014. All Rights Reserved.