com.mockrunner.mock.jms
Class MockQueue

java.lang.Object
  extended by com.mockrunner.mock.jms.MockDestination
      extended by com.mockrunner.mock.jms.MockQueue
All Implemented Interfaces:
java.io.Serializable, javax.jms.Destination, javax.jms.Queue
Direct Known Subclasses:
MockTemporaryQueue

public class MockQueue
extends MockDestination
implements javax.jms.Queue

Mock implementation of JMS Queue.

See Also:
Serialized Form

Constructor Summary
MockQueue(java.lang.String name)
           
 
Method Summary
 void addMessage(javax.jms.Message message)
          Adds a message to this Queue that will be propagated to the corresponding receiver.
 java.lang.String getQueueName()
           
 
Methods inherited from class com.mockrunner.mock.jms.MockDestination
acknowledgeMessage, addCurrentMessage, addReceivedMessage, addSession, clear, getCurrentMessageList, getMatchingMessage, getMessage, getReceivedMessageList, isEmpty, loadMessage, removeSession, reset, sessionSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jms.Queue
toString
 

Constructor Detail

MockQueue

public MockQueue(java.lang.String name)
Method Detail

getQueueName

public java.lang.String getQueueName()
                              throws javax.jms.JMSException
Specified by:
getQueueName in interface javax.jms.Queue
Throws:
javax.jms.JMSException

addMessage

public void addMessage(javax.jms.Message message)
                throws javax.jms.JMSException
Adds a message to this Queue that will be propagated to the corresponding receiver. Only one receiver will get the message. The order is not predictable.

Specified by:
addMessage in class MockDestination
Parameters:
message - the message
Throws:
javax.jms.JMSException