public class MockQueueReceiver extends MockMessageConsumer implements javax.jms.QueueReceiver
QueueReceiver.| Constructor and Description |
|---|
MockQueueReceiver(MockConnection connection,
MockQueueSession session,
MockQueue queue) |
MockQueueReceiver(MockConnection connection,
MockSession session,
MockQueue queue,
String messageSelector) |
| Modifier and Type | Method and Description |
|---|---|
javax.jms.Queue |
getQueue() |
javax.jms.Message |
receiveNoWait() |
protected void |
waitOnMessage(long timeout)
wait until:
* a message is ready
* the timeout elapses
* some other event happens (@see Object.wait)
if the timeout is 0, the function will not timeout.
|
canConsume, close, getConnection, getMessageFilter, getMessageListener, getMessageSelector, isClosed, receive, receive, receiveMessage, setMessageListenerpublic MockQueueReceiver(MockConnection connection, MockQueueSession session, MockQueue queue)
public MockQueueReceiver(MockConnection connection, MockSession session, MockQueue queue, String messageSelector)
public javax.jms.Queue getQueue()
throws javax.jms.JMSException
getQueue in interface javax.jms.QueueReceiverjavax.jms.JMSExceptionpublic javax.jms.Message receiveNoWait()
throws javax.jms.JMSException
receiveNoWait in interface javax.jms.MessageConsumerjavax.jms.JMSExceptionprotected void waitOnMessage(long timeout)
MockMessageConsumerwaitOnMessage in class MockMessageConsumertimeout - - max milliseconds to wait.Copyright © 2003–2020. All rights reserved.