com.github.smokestack.jms
Class MockMessageConsumer

java.lang.Object
  extended by com.github.smokestack.jms.MockMessageConsumer
All Implemented Interfaces:
MessageConsumer
Direct Known Subclasses:
MockTopicSubscriber

public class MockMessageConsumer
extends Object
implements MessageConsumer

Author:
gliptak

Nested Class Summary
static class MockMessageConsumer.MessageConsumerState
           
 
Field Summary
protected  Destination destination
           
protected  MessageListener messageListener
           
protected  String messageSelector
           
protected  MockMessageConsumer.MessageConsumerState mockState
           
protected  boolean NoLocal
           
 
Constructor Summary
MockMessageConsumer(Destination destination)
           
MockMessageConsumer(Destination destination, String messageSelector)
           
MockMessageConsumer(Destination destination, String messageSelector, boolean NoLocal)
           
 
Method Summary
 void _close()
           
 MessageListener _getMessageListener()
           
 String _getMessageSelector()
           
 Message _receive()
           
 Message _receive(long timeout)
           
 Message _receiveNoWait()
           
 void _setMessageListener(MessageListener messageListener)
           
 void close()
           
 MessageListener getMessageListener()
           
 String getMessageSelector()
           
 MockMessageConsumer.MessageConsumerState getMockState()
           
 Message receive()
           
 Message receive(long timeout)
           
 Message receiveNoWait()
           
 void setMessageListener(MessageListener messageListener)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

destination

protected Destination destination

mockState

protected MockMessageConsumer.MessageConsumerState mockState

messageSelector

protected String messageSelector

messageListener

protected MessageListener messageListener

NoLocal

protected boolean NoLocal
Constructor Detail

MockMessageConsumer

public MockMessageConsumer(Destination destination)

MockMessageConsumer

public MockMessageConsumer(Destination destination,
                           String messageSelector)

MockMessageConsumer

public MockMessageConsumer(Destination destination,
                           String messageSelector,
                           boolean NoLocal)
Method Detail

close

public void close()
           throws JMSException
Specified by:
close in interface MessageConsumer
Throws:
JMSException

_close

public void _close()
            throws JMSException
Throws:
JMSException

getMessageListener

public MessageListener getMessageListener()
                                   throws JMSException
Specified by:
getMessageListener in interface MessageConsumer
Throws:
JMSException

_getMessageListener

public MessageListener _getMessageListener()
                                    throws JMSException
Throws:
JMSException

getMessageSelector

public String getMessageSelector()
                          throws JMSException
Specified by:
getMessageSelector in interface MessageConsumer
Throws:
JMSException

_getMessageSelector

public String _getMessageSelector()
                           throws JMSException
Throws:
JMSException

receive

public Message receive()
                throws JMSException
Specified by:
receive in interface MessageConsumer
Throws:
JMSException

_receive

public Message _receive()
                 throws JMSException
Throws:
JMSException

receive

public Message receive(long timeout)
                throws JMSException
Specified by:
receive in interface MessageConsumer
Throws:
JMSException

_receive

public Message _receive(long timeout)
                 throws JMSException
Throws:
JMSException

receiveNoWait

public Message receiveNoWait()
                      throws JMSException
Specified by:
receiveNoWait in interface MessageConsumer
Throws:
JMSException

_receiveNoWait

public Message _receiveNoWait()
                       throws JMSException
Throws:
JMSException

setMessageListener

public void setMessageListener(MessageListener messageListener)
                        throws JMSException
Specified by:
setMessageListener in interface MessageConsumer
Throws:
JMSException

_setMessageListener

public void _setMessageListener(MessageListener messageListener)
                         throws JMSException
Throws:
JMSException

getMockState

public MockMessageConsumer.MessageConsumerState getMockState()
Returns:
the mockState

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2010 Smokestack. All Rights Reserved.