com.mockrunner.mock.jms
Class MockTopicConnectionFactory

java.lang.Object
  extended bycom.mockrunner.mock.jms.MockConnectionFactory
      extended bycom.mockrunner.mock.jms.MockTopicConnectionFactory
All Implemented Interfaces:
javax.jms.ConnectionFactory, javax.jms.QueueConnectionFactory, javax.jms.TopicConnectionFactory

public class MockTopicConnectionFactory
extends MockConnectionFactory

Mock implementation of JMS TopicConnectionFactory.


Constructor Summary
MockTopicConnectionFactory(DestinationManager destinationManager, ConfigurationManager configurationManager)
           
 
Method Summary
 javax.jms.Connection createConnection()
           
 javax.jms.Connection createConnection(java.lang.String name, java.lang.String password)
           
 MockTopicConnection getLatestTopicConnection()
          Returns the latest created connection resp.
 MockTopicConnection getTopicConnection(int index)
          Returns the connection with the specified index resp.
 
Methods inherited from class com.mockrunner.mock.jms.MockConnectionFactory
clearConnections, configurationManager, connections, createQueueConnection, createQueueConnection, createTopicConnection, createTopicConnection, destinationManager, exception, getConnection, getLatestConnection, setJMSException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockTopicConnectionFactory

public MockTopicConnectionFactory(DestinationManager destinationManager,
                                  ConfigurationManager configurationManager)
Method Detail

createConnection

public javax.jms.Connection createConnection()
                                      throws javax.jms.JMSException
Specified by:
createConnection in interface javax.jms.ConnectionFactory
Overrides:
createConnection in class MockConnectionFactory
Throws:
javax.jms.JMSException

createConnection

public javax.jms.Connection createConnection(java.lang.String name,
                                             java.lang.String password)
                                      throws javax.jms.JMSException
Specified by:
createConnection in interface javax.jms.ConnectionFactory
Overrides:
createConnection in class MockConnectionFactory
Throws:
javax.jms.JMSException

getTopicConnection

public MockTopicConnection getTopicConnection(int index)
Returns the connection with the specified index resp. null if no such connection exists.

Parameters:
index - the index
Returns:
the connection

getLatestTopicConnection

public MockTopicConnection getLatestTopicConnection()
Returns the latest created connection resp. null if no such connection exists.

Returns:
the connection