com.mockrunner.jms
Class TransmissionManagerWrapper

java.lang.Object
  extended by com.mockrunner.jms.TransmissionManagerWrapper
All Implemented Interfaces:
java.io.Serializable

public class TransmissionManagerWrapper
extends java.lang.Object
implements java.io.Serializable

A wrapper around QueueTransmissionManager and TopicTransmissionManager and GenericTransmissionManager. Can be used to access all senders, publishers, receivers and subscribers transparently.

See Also:
Serialized Form

Constructor Summary
TransmissionManagerWrapper(QueueTransmissionManager queueManager, TopicTransmissionManager topicManager, GenericTransmissionManager genericManager)
           
 
Method Summary
 GenericTransmissionManager getGenericTransmissionManager()
          Returns the underlying GenericTransmissionManager.
 MockMessageConsumer getMessageConsumer(int index)
          Returns the MockMessageConsumer object with the specified index or null, if no such MockMessageConsumer exists.
 java.util.List getMessageConsumerList()
          Returns a list of all consumer objects.
 MockMessageProducer getMessageProducer(int index)
          Returns the MockMessageProducer object with the specified index or null, if no such MockMessageProducer exists.
 java.util.List getMessageProducerList()
          Returns a list of all producer objects.
 MockQueueSender getQueueSender(int index)
          Returns the MockQueueSender object with the specified index or null, if no such MockQueueSender exists.
 java.util.List getQueueSenderList()
          Returns a list of all queue senders, i.e. all producer objects, that are an instance of QueueSender.
 QueueTransmissionManager getQueueTransmissionManager()
          Returns the underlying QueueTransmissionManager.
 MockTopicPublisher getTopicPublisher(int index)
          Returns the MockTopicPublisher object with the specified index or null, if no such MockTopicPublisher exists.
 java.util.List getTopicPublisherList()
          Returns a list of all topic publishers, i.e. all producer objects, that are an instance of TopicPublisher.
 TopicTransmissionManager getTopicTransmissionManager()
          Returns the underlying TopicTransmissionManager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransmissionManagerWrapper

public TransmissionManagerWrapper(QueueTransmissionManager queueManager,
                                  TopicTransmissionManager topicManager,
                                  GenericTransmissionManager genericManager)
Method Detail

getQueueTransmissionManager

public QueueTransmissionManager getQueueTransmissionManager()
Returns the underlying QueueTransmissionManager.

Returns:
the QueueTransmissionManager

getTopicTransmissionManager

public TopicTransmissionManager getTopicTransmissionManager()
Returns the underlying TopicTransmissionManager.

Returns:
the TopicTransmissionManager

getGenericTransmissionManager

public GenericTransmissionManager getGenericTransmissionManager()
Returns the underlying GenericTransmissionManager.

Returns:
the GenericTransmissionManager

getMessageProducer

public MockMessageProducer getMessageProducer(int index)
Returns the MockMessageProducer object with the specified index or null, if no such MockMessageProducer exists.

Parameters:
index - the index
Returns:
the MockMessageProducer object

getMessageProducerList

public java.util.List getMessageProducerList()
Returns a list of all producer objects.

Returns:
the list of MockMessageProducer objects

getQueueSenderList

public java.util.List getQueueSenderList()
Returns a list of all queue senders, i.e. all producer objects, that are an instance of QueueSender. In contrast to QueueTransmissionManager.getQueueSenderList(java.lang.String), this methods also includes the senders that were created without specifying an explicit queue (these senders are collected using GenericTransmissionManager).

Returns:
the list of MockQueueSender objects

getQueueSender

public MockQueueSender getQueueSender(int index)
Returns the MockQueueSender object with the specified index or null, if no such MockQueueSender exists. In contrast to QueueTransmissionManager.getQueueSender(int), this methods also recognizes the senders that were created without specifying an explicit queue (these senders are collected using GenericTransmissionManager).

Parameters:
index - the index
Returns:
the MockQueueSender object

getTopicPublisherList

public java.util.List getTopicPublisherList()
Returns a list of all topic publishers, i.e. all producer objects, that are an instance of TopicPublisher. In contrast to TopicTransmissionManager.getTopicPublisherList(java.lang.String), this methods also includes the publishers that were created without specifying an explicit topic (these publishers are collected using GenericTransmissionManager).

Returns:
the list of MockTopicPublisher objects

getTopicPublisher

public MockTopicPublisher getTopicPublisher(int index)
Returns the MockTopicPublisher object with the specified index or null, if no such MockTopicPublisher exists. In contrast to TopicTransmissionManager.getTopicPublisher(int), this methods also recognizes the publishers that were created without specifying an explicit queue (these publishers are collected using GenericTransmissionManager).

Parameters:
index - the index
Returns:
the MockTopicPublisher object

getMessageConsumer

public MockMessageConsumer getMessageConsumer(int index)
Returns the MockMessageConsumer object with the specified index or null, if no such MockMessageConsumer exists.

Parameters:
index - the index
Returns:
the MockMessageConsumer object

getMessageConsumerList

public java.util.List getMessageConsumerList()
Returns a list of all consumer objects. Includes durable subscribers.

Returns:
the list of MockMessageConsumer objects