com.mockrunner.mock.jms
Class MockTopicConnectionFactory
java.lang.Object
com.mockrunner.mock.jms.MockConnectionFactory
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
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 |
MockTopicConnectionFactory
public MockTopicConnectionFactory(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
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