com.mockobjects.jms

## Class MockMessageConsumer

- java.lang.Object
- - com.mockobjects.MockObject
  - - com.mockobjects.jms.MockMessageConsumer

All Implemented Interfaces:
  Verifiable

Direct Known Subclasses:
  MockQueueReceiver, MockTopicSubscriber

    public class MockMessageConsumer
    extends MockObject

### Constructor Summary

Constructors
Constructor and Description
`MockMessageConsumer()`

### Method Summary

Methods
`void` `close()`
`MessageListener` `getMessageListener()`
`java.lang.String` `getMessageSelector()`
`Message` `receive()`
`Message` `receive(long timeout)`
`Message` `receiveNoWait()`
`void` `setExpectedCloseCalls(int callCount)`
`void` `setExpectedMessageListener(MessageListener messageListener)`
`void` `setExpectedReceiveCalls(int callCount)`
`void` `setExpectedTimeout(long timeout)`
`void` `setMessageListener(MessageListener messageListener)`
`void` `setupExpiresOnTimeout(boolean expiresOnTimeout)`
`void` `setupReceivedMessage(Message message)`
`void` `setupThrowException(JMSException e)`

### Methods inherited from class com.mockobjects.MockObject

`notImplemented, notYetImplemented, verify`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### MockMessageConsumer

    public MockMessageConsumer()

### Method Detail

#### setExpectedMessageListener

    public void setExpectedMessageListener(MessageListener messageListener)

#### close

    public void close()
               throws JMSException

Throws:
  `JMSException`

#### getMessageListener

    public MessageListener getMessageListener()
                                       throws JMSException

Throws:
  `JMSException`

#### getMessageSelector

    public java.lang.String getMessageSelector()
                                        throws JMSException

Throws:
  `JMSException`

#### receive

    public Message receive()
                    throws JMSException

Throws:
  `JMSException`

#### receive

    public Message receive(long timeout)
                    throws JMSException

Throws:
  `JMSException`

#### setExpectedTimeout

    public void setExpectedTimeout(long timeout)

#### receiveNoWait

    public Message receiveNoWait()
                          throws JMSException

Throws:
  `JMSException`

#### setExpectedCloseCalls

    public void setExpectedCloseCalls(int callCount)

#### setExpectedReceiveCalls

    public void setExpectedReceiveCalls(int callCount)

#### setupReceivedMessage

    public void setupReceivedMessage(Message message)

#### setupExpiresOnTimeout

    public void setupExpiresOnTimeout(boolean expiresOnTimeout)

#### setupThrowException

    public void setupThrowException(JMSException e)

#### setMessageListener

    public void setMessageListener(MessageListener messageListener)
                            throws JMSException

Throws:
  `JMSException`