com.mockrunner.jms
Class GenericTransmissionManager

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

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

This class is used to create generic producers that are not associated with a destination. If you create a MessageProducer with a null destination, this class is used to create a MessageProducer which is not associated with any destination. If the session used to create the producer is a QueueSession, you'll get a QueueSender. For a TopicSession, you'll get a TopicPublisher. For a generic session, you'll get a generic instance of MessageProducer.

See Also:
Serialized Form

Constructor Summary
GenericTransmissionManager(MockConnection connection, MockSession session)
           
 
Method Summary
 void closeAll()
          Closes all producers.
 void closeAllMessageProducers()
          Closes all producers.
 MockMessageProducer createMessageProducer()
          Creates a new MessageProducer.
 MockQueueSender createQueueSender()
          Creates a new QueueSender.
 MockTopicPublisher createTopicPublisher()
          Creates a new TopicPublisher.
 MockMessageProducer getMessageProducer(int index)
          Returns a MessageProducer by its index or null, if no such MessageProducer is present.
 java.util.List getMessageProducerList()
          Returns the list of all MessageProducer objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericTransmissionManager

public GenericTransmissionManager(MockConnection connection,
                                  MockSession session)
Method Detail

closeAll

public void closeAll()
Closes all producers.


closeAllMessageProducers

public void closeAllMessageProducers()
Closes all producers.


createMessageProducer

public MockMessageProducer createMessageProducer()
Creates a new MessageProducer.

Returns:
the created MessageProducer

createQueueSender

public MockQueueSender createQueueSender()
Creates a new QueueSender.

Returns:
the created QueueSender

createTopicPublisher

public MockTopicPublisher createTopicPublisher()
Creates a new TopicPublisher.

Returns:
the created TopicPublisher

getMessageProducer

public MockMessageProducer getMessageProducer(int index)
Returns a MessageProducer by its index or null, if no such MessageProducer is present.

Parameters:
index - the index of the MessageProducer
Returns:
the MessageProducer

getMessageProducerList

public java.util.List getMessageProducerList()
Returns the list of all MessageProducer objects.

Returns:
the list of MessageProducer objects