com.mockrunner.mock.jms
Class MockTopicConnectionFactory

java.lang.Object
  extended by com.mockrunner.mock.jms.MockConnectionFactory
      extended by com.mockrunner.mock.jms.MockTopicConnectionFactory
All Implemented Interfaces:
java.io.Serializable, javax.jms.ConnectionFactory, javax.jms.QueueConnectionFactory, javax.jms.TopicConnectionFactory

public class MockTopicConnectionFactory
extends MockConnectionFactory

Mock implementation of JMS TopicConnectionFactory.

See Also:
Serialized Form

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 or null if no such connection exists.
 MockTopicConnection getTopicConnection(int index)
          Returns the connection with the specified index or null if no such connection exists.
 
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 or null if no such connection exists.

Parameters:
index - the index
Returns:
the connection

getLatestTopicConnection

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

Returns:
the connection