| java.lang.Object com.mockrunner.mock.jms.MockConnectionFactory
All known Subclasses: com.mockrunner.mock.jms.MockQueueConnectionFactory, com.mockrunner.mock.jms.MockTopicConnectionFactory,
MockConnectionFactory | public class MockConnectionFactory implements QueueConnectionFactory,TopicConnectionFactory(Code) | | Mock implementation of JMS ConnectionFactory .
Can be used as generic factory for JMS 1.1.
Also implements QueueConnectionFactory and
TopicConnectionFactory and can be used to
create queue and topic connections as well as generic
JMS 1.1 connections. It is recommended to use
com.mockrunner.mock.jms.MockQueueConnectionFactory if you only use queues and
com.mockrunner.mock.jms.MockTopicConnectionFactory if you only use topics.
This implementation is primary for generic JMS 1.1 connections
but can also be used, if a server provides one implementation
for both domains (which is not portable).
|
clearConnections | public void clearConnections()(Code) | | Clears the list of connections
|
createConnection | public Connection createConnection() throws JMSException(Code) | | |
createConnection | public Connection createConnection(String name, String password) throws JMSException(Code) | | |
createQueueConnection | public QueueConnection createQueueConnection() throws JMSException(Code) | | |
createQueueConnection | public QueueConnection createQueueConnection(String name, String password) throws JMSException(Code) | | |
createTopicConnection | public TopicConnection createTopicConnection() throws JMSException(Code) | | |
createTopicConnection | public TopicConnection createTopicConnection(String name, String password) throws JMSException(Code) | | |
exception | protected JMSException exception()(Code) | | |
getConnection | public MockConnection getConnection(int index)(Code) | | Returns the connection with the specified index
or null if no such connection
exists.
Parameters: index - the index the connection |
getLatestConnection | public MockConnection getLatestConnection()(Code) | | Returns the latest created connection
or null if no such connection
exists.
the connection |
setJMSException | public void setJMSException(JMSException exception)(Code) | | Set an exception that will be passed to all
created connections. This can be used to
simulate server errors. Check out
MockConnection.setJMSException for details.
Parameters: exception - the exception |
|
|