Package org.apache.activemq.tool
Class MemConsumer
- java.lang.Object
-
- org.apache.activemq.tool.MemMessageIdList
-
- org.apache.activemq.tool.MemConsumer
-
- All Implemented Interfaces:
MessageListener
public class MemConsumer extends MemMessageIdList implements MessageListener
-
-
Field Summary
Fields Modifier and Type Field Description protected Connectionconnectionprotected MessageConsumerconsumerprotected longcounterprotected booleaninOrderprotected booleanisParent-
Fields inherited from class org.apache.activemq.tool.MemMessageIdList
LOG
-
-
Constructor Summary
Constructors Constructor Description MemConsumer()MemConsumer(ConnectionFactory fac, Destination dest)MemConsumer(ConnectionFactory fac, Destination dest, String consumerName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisInOrder()booleanisParent()voidonMessage(Message msg)Messagereceive()Messagereceive(long wait)voidsetAsParent(boolean isParent)voidshutDown()voidstart()voidstop()-
Methods inherited from class org.apache.activemq.tool.MemMessageIdList
equals, flushMessages, getMessageCount, getMessageIds, getParent, hashCode, hasReceivedMessage, hasReceivedMessages, isVerbose, setParent, setVerbose, toString, waitForMessagesToArrive
-
-
-
-
Field Detail
-
connection
protected Connection connection
-
consumer
protected MessageConsumer consumer
-
counter
protected long counter
-
isParent
protected boolean isParent
-
inOrder
protected boolean inOrder
-
-
Constructor Detail
-
MemConsumer
public MemConsumer()
-
MemConsumer
public MemConsumer(ConnectionFactory fac, Destination dest, String consumerName) throws JMSException
- Throws:
JMSException
-
MemConsumer
public MemConsumer(ConnectionFactory fac, Destination dest) throws JMSException
- Throws:
JMSException
-
-
Method Detail
-
start
public void start() throws JMSException- Throws:
JMSException
-
stop
public void stop() throws JMSException- Throws:
JMSException
-
shutDown
public void shutDown() throws JMSException- Throws:
JMSException
-
receive
public Message receive() throws JMSException
- Throws:
JMSException
-
receive
public Message receive(long wait) throws JMSException
- Throws:
JMSException
-
onMessage
public void onMessage(Message msg)
- Specified by:
onMessagein interfaceMessageListener- Overrides:
onMessagein classMemMessageIdList
-
isInOrder
public boolean isInOrder()
-
setAsParent
public void setAsParent(boolean isParent)
-
isParent
public boolean isParent()
-
-