org.skyscreamer.nevado.jms.connector.mock
Class MockSQSConnector

java.lang.Object
  extended by org.skyscreamer.nevado.jms.connector.AbstractSQSConnector
      extended by org.skyscreamer.nevado.jms.connector.mock.MockSQSConnector
All Implemented Interfaces:
ResettableMock, SQSConnector

public class MockSQSConnector
extends AbstractSQSConnector
implements ResettableMock

Mock SQSConnector to test functionality without having to connect to AWS.

Author:
Carter Page

Field Summary
static String MESSAGE_ATTRIBUTE_RECEIVE_COUNT
           
 
Fields inherited from class org.skyscreamer.nevado.jms.connector.AbstractSQSConnector
_log, AWS_ERROR_CODE_AUTHENTICATION
 
Constructor Summary
MockSQSConnector()
           
MockSQSConnector(long receiveCheckIntervalMs)
           
 
Method Summary
protected  NevadoMessage convertSqsMessage(NevadoDestination destination, SQSMessage sqsMessage, boolean readOnly)
           
 NevadoTopic createTopic(String topicName)
           
 void deleteTopic(NevadoTopic topic)
           
protected  MockSQSQueue getSQSQueueImpl(NevadoQueue queue)
           
 Collection<NevadoQueue> listQueues(String temporaryQueuePrefix)
           
 Collection<NevadoTopic> listTopics()
           
protected  void removeQueue(NevadoQueue queue)
           
 void reset()
           
protected  void sendSNSMessage(NevadoTopic topic, String body)
           
 String subscribe(NevadoTopic topic, NevadoQueue topicEndpoint)
           
 void test()
           
 void unsubscribe(NevadoTopic topic)
           
 
Methods inherited from class org.skyscreamer.nevado.jms.connector.AbstractSQSConnector
createQueue, deleteMessage, deleteQueue, deserializeMessage, getPolicy, getSQSQueue, isAsync, receiveMessage, receiveSQSMessage, resetMessage, sendMessage, sendMessages, sendSQSMessage, serializeMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGE_ATTRIBUTE_RECEIVE_COUNT

public static final String MESSAGE_ATTRIBUTE_RECEIVE_COUNT
See Also:
Constant Field Values
Constructor Detail

MockSQSConnector

public MockSQSConnector()

MockSQSConnector

public MockSQSConnector(long receiveCheckIntervalMs)
Method Detail

sendSNSMessage

protected void sendSNSMessage(NevadoTopic topic,
                              String body)
                       throws javax.jms.JMSException
Specified by:
sendSNSMessage in class AbstractSQSConnector
Throws:
javax.jms.JMSException

getSQSQueueImpl

protected MockSQSQueue getSQSQueueImpl(NevadoQueue queue)
                                throws javax.jms.JMSException
Specified by:
getSQSQueueImpl in class AbstractSQSConnector
Throws:
javax.jms.JMSException

test

public void test()
          throws javax.jms.JMSException
Specified by:
test in interface SQSConnector
Throws:
javax.jms.JMSException

listQueues

public Collection<NevadoQueue> listQueues(String temporaryQueuePrefix)
                                   throws javax.jms.JMSException
Specified by:
listQueues in interface SQSConnector
Throws:
javax.jms.JMSException

createTopic

public NevadoTopic createTopic(String topicName)
                        throws javax.jms.JMSException
Specified by:
createTopic in interface SQSConnector
Throws:
javax.jms.JMSException

deleteTopic

public void deleteTopic(NevadoTopic topic)
                 throws javax.jms.JMSException
Specified by:
deleteTopic in interface SQSConnector
Throws:
javax.jms.JMSException

listTopics

public Collection<NevadoTopic> listTopics()
                                   throws javax.jms.JMSException
Specified by:
listTopics in interface SQSConnector
Throws:
javax.jms.JMSException

subscribe

public String subscribe(NevadoTopic topic,
                        NevadoQueue topicEndpoint)
                 throws javax.jms.JMSException
Specified by:
subscribe in interface SQSConnector
Throws:
javax.jms.JMSException

unsubscribe

public void unsubscribe(NevadoTopic topic)
                 throws javax.jms.JMSException
Specified by:
unsubscribe in interface SQSConnector
Throws:
javax.jms.JMSException

reset

public void reset()
Specified by:
reset in interface ResettableMock

convertSqsMessage

protected NevadoMessage convertSqsMessage(NevadoDestination destination,
                                          SQSMessage sqsMessage,
                                          boolean readOnly)
                                   throws javax.jms.JMSException
Overrides:
convertSqsMessage in class AbstractSQSConnector
Throws:
javax.jms.JMSException

removeQueue

protected void removeQueue(NevadoQueue queue)


Copyright © 2014. All Rights Reserved.