com.mockrunner.mock.jms
Class MockQueueConnectionFactory
java.lang.Object
com.mockrunner.mock.jms.MockConnectionFactory
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
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 |
MockQueueConnectionFactory
public MockQueueConnectionFactory(DestinationManager destinationManager,
ConfigurationManager configurationManager)
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