com.mockrunner.mock.jms
Class MockQueueConnectionFactory

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

public class MockQueueConnectionFactory
extends MockConnectionFactory

Mock implementation of JMS QueueConnectionFactory.

See Also:
Serialized Form

Constructor Summary
MockQueueConnectionFactory(DestinationManager destinationManager, ConfigurationManager configurationManager)
           
 
Method Summary
 javax.jms.Connection createConnection()
           
 javax.jms.Connection createConnection(java.lang.String name, java.lang.String password)
           
 MockQueueConnection getLatestQueueConnection()
          Returns the latest created connection or null if no such connection exists.
 MockQueueConnection getQueueConnection(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

MockQueueConnectionFactory

public MockQueueConnectionFactory(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

getQueueConnection

public MockQueueConnection getQueueConnection(int index)
Returns the connection with the specified index or null if no such connection exists.

Parameters:
index - the index
Returns:
the connection

getLatestQueueConnection

public MockQueueConnection getLatestQueueConnection()
Returns the latest created connection or null if no such connection exists.

Returns:
the connection