Package 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
Description
`MockMessageConsumer()`

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
`MessageListener`
`getMessageListener()`
`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 Details

### MockMessageConsumer

public MockMessageConsumer()

## Method Details

### setExpectedMessageListener

public void setExpectedMessageListener(MessageListener messageListener)

### close

public void close() throws JMSException

Throws:
  `JMSException`

### getMessageListener

public MessageListener getMessageListener() throws JMSException

Throws:
  `JMSException`

### getMessageSelector

public 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`