org.skyscreamer.nevado.jms.connector.typica
Class TypicaSQSConnector

java.lang.Object
  extended by org.skyscreamer.nevado.jms.connector.AbstractSQSConnector
      extended by org.skyscreamer.nevado.jms.connector.typica.TypicaSQSConnector
All Implemented Interfaces:
SQSConnector

public class TypicaSQSConnector
extends AbstractSQSConnector

Connector for SQS-only implementation of the Nevado JMS driver. TODO: Put the check interval and optional back-off strategy into the NevadoDestinations so they can be configured on a per-destination basis.

Author:
Carter Page

Field Summary
protected  com.xerox.amazonws.sns.NotificationService _notficationService
           
protected  com.xerox.amazonws.sqs2.QueueService _queueService
           
 
Fields inherited from class org.skyscreamer.nevado.jms.connector.AbstractSQSConnector
_log, AWS_ERROR_CODE_AUTHENTICATION
 
Constructor Summary
TypicaSQSConnector(String awsAccessKey, String awsSecretKey, boolean isSecure, long receiveCheckIntervalMs)
           
TypicaSQSConnector(String awsAccessKey, String awsSecretKey, String awsSQSEndpoint, String awsSNSEndpoint, boolean isSecure, long receiveCheckIntervalMs)
           
 
Method Summary
 NevadoTopic createTopic(String topicName)
           
 void deleteTopic(NevadoTopic topic)
           
 com.xerox.amazonws.sns.NotificationService getNotficationService()
           
 com.xerox.amazonws.sqs2.QueueService getQueueService()
           
protected  org.skyscreamer.nevado.jms.connector.typica.TypicaSQSQueue getSQSQueueImpl(NevadoQueue queue)
           
protected  String getTopicARN(NevadoTopic topic)
           
protected  javax.jms.JMSException handleAWSException(String message, com.xerox.amazonws.common.AWSException e)
           
 Collection<NevadoQueue> listQueues(String temporaryQueuePrefix)
           
 Collection<NevadoTopic> listTopics()
           
protected  void sendSNSMessage(NevadoTopic topic, String serializedMessage)
           
 String subscribe(NevadoTopic topic, NevadoQueue topicEndpoint)
           
 void test()
          Tests the connection.
 void unsubscribe(NevadoTopic topic)
           
 
Methods inherited from class org.skyscreamer.nevado.jms.connector.AbstractSQSConnector
convertSqsMessage, createQueue, deleteMessage, deleteQueue, deserializeMessage, getPolicy, getSQSQueue, 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

_queueService

protected final com.xerox.amazonws.sqs2.QueueService _queueService

_notficationService

protected final com.xerox.amazonws.sns.NotificationService _notficationService
Constructor Detail

TypicaSQSConnector

public TypicaSQSConnector(String awsAccessKey,
                          String awsSecretKey,
                          boolean isSecure,
                          long receiveCheckIntervalMs)
                   throws javax.jms.JMSException
Throws:
javax.jms.JMSException

TypicaSQSConnector

public TypicaSQSConnector(String awsAccessKey,
                          String awsSecretKey,
                          String awsSQSEndpoint,
                          String awsSNSEndpoint,
                          boolean isSecure,
                          long receiveCheckIntervalMs)
                   throws javax.jms.JMSException
Throws:
javax.jms.JMSException
Method Detail

test

public void test()
          throws javax.jms.JMSException
Tests the connection.

Throws:
javax.jms.JMSException

createTopic

public NevadoTopic createTopic(String topicName)
                        throws javax.jms.JMSException
Throws:
javax.jms.JMSException

deleteTopic

public void deleteTopic(NevadoTopic topic)
                 throws javax.jms.JMSException
Throws:
javax.jms.JMSException

listTopics

public Collection<NevadoTopic> listTopics()
                                   throws javax.jms.JMSException
Throws:
javax.jms.JMSException

listQueues

public Collection<NevadoQueue> listQueues(String temporaryQueuePrefix)
                                   throws javax.jms.JMSException
Throws:
javax.jms.JMSException

subscribe

public String subscribe(NevadoTopic topic,
                        NevadoQueue topicEndpoint)
                 throws javax.jms.JMSException
Throws:
javax.jms.JMSException

unsubscribe

public void unsubscribe(NevadoTopic topic)
                 throws javax.jms.JMSException
Throws:
javax.jms.JMSException

getQueueService

public com.xerox.amazonws.sqs2.QueueService getQueueService()

getNotficationService

public com.xerox.amazonws.sns.NotificationService getNotficationService()

sendSNSMessage

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

getSQSQueueImpl

protected org.skyscreamer.nevado.jms.connector.typica.TypicaSQSQueue getSQSQueueImpl(NevadoQueue queue)
                                                                              throws javax.jms.JMSException
Specified by:
getSQSQueueImpl in class AbstractSQSConnector
Throws:
javax.jms.JMSException

getTopicARN

protected String getTopicARN(NevadoTopic topic)
                      throws javax.jms.JMSException
Throws:
javax.jms.JMSException

handleAWSException

protected javax.jms.JMSException handleAWSException(String message,
                                                    com.xerox.amazonws.common.AWSException e)


Copyright © 2012. All Rights Reserved.