com.mockrunner.mock.jms
Class JMSMockObjectFactory

java.lang.Object
  extended by com.mockrunner.mock.jms.JMSMockObjectFactory

public class JMSMockObjectFactory
extends java.lang.Object

Used to create all types of JMS mock objects. Maintains the necessary dependencies between the mock objects. If you use the mock objects returned by this factory in your tests you can be sure that they are all up to date. If you are using JNDI for obtaining the connection factories you have to bind them to the mock JNDI context with EJBTestModule.bindToContext(java.lang.String, java.lang.Object).


Constructor Summary
JMSMockObjectFactory()
          Creates a new set of mock objects.
 
Method Summary
 MockConnectionFactory createMockConnectionFactory()
          Creates the MockConnectionFactory using new.
 MockQueueConnectionFactory createMockQueueConnectionFactory()
          Creates the MockQueueConnectionFactory using new.
 MockTopicConnectionFactory createMockTopicConnectionFactory()
          Creates the MockTopicConnectionFactory using new.
 ConfigurationManager getConfigurationManager()
          Returns the ConfigurationManager.
 DestinationManager getDestinationManager()
          Returns the DestinationManager.
 MockConnectionFactory getMockConnectionFactory()
          Returns the MockConnectionFactory.
 MockQueueConnectionFactory getMockQueueConnectionFactory()
          Returns the MockQueueConnectionFactory.
 MockTopicConnectionFactory getMockTopicConnectionFactory()
          Returns the MockTopicConnectionFactory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMSMockObjectFactory

public JMSMockObjectFactory()
Creates a new set of mock objects.

Method Detail

createMockConnectionFactory

public MockConnectionFactory createMockConnectionFactory()
Creates the MockConnectionFactory using new. This method can be overridden to return a subclass of MockConnectionFactory.

Returns:
the MockConnectionFactory

createMockTopicConnectionFactory

public MockTopicConnectionFactory createMockTopicConnectionFactory()
Creates the MockTopicConnectionFactory using new. This method can be overridden to return a subclass of MockTopicConnectionFactory.

Returns:
the MockTopicConnectionFactory

createMockQueueConnectionFactory

public MockQueueConnectionFactory createMockQueueConnectionFactory()
Creates the MockQueueConnectionFactory using new. This method can be overridden to return a subclass of MockQueueConnectionFactory.

Returns:
the MockQueueConnectionFactory

getConfigurationManager

public ConfigurationManager getConfigurationManager()
Returns the ConfigurationManager.

Returns:
the ConfigurationManager

getDestinationManager

public DestinationManager getDestinationManager()
Returns the DestinationManager.

Returns:
the DestinationManager

getMockQueueConnectionFactory

public MockQueueConnectionFactory getMockQueueConnectionFactory()
Returns the MockQueueConnectionFactory.

Returns:
the MockQueueConnectionFactory

getMockTopicConnectionFactory

public MockTopicConnectionFactory getMockTopicConnectionFactory()
Returns the MockTopicConnectionFactory.

Returns:
the MockTopicConnectionFactory

getMockConnectionFactory

public MockConnectionFactory getMockConnectionFactory()
Returns the MockConnectionFactory.

Returns:
the MockConnectionFactory