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 Connection
connection
protected MessageConsumer
consumer
protected long
counter
protected boolean
inOrder
protected boolean
isParent
-
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 boolean
isInOrder()
boolean
isParent()
void
onMessage(Message msg)
Message
receive()
Message
receive(long wait)
void
setAsParent(boolean isParent)
void
shutDown()
void
start()
void
stop()
-
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:
onMessage
in interfaceMessageListener
- Overrides:
onMessage
in classMemMessageIdList
-
isInOrder
public boolean isInOrder()
-
setAsParent
public void setAsParent(boolean isParent)
-
isParent
public boolean isParent()
-
-