org.apache.activemq.tool
Class MemConsumer

java.lang.Object
  extended by org.apache.activemq.tool.MemMessageIdList
      extended by org.apache.activemq.tool.MemConsumer
All Implemented Interfaces:
MessageListener

public class MemConsumer
extends MemMessageIdList
implements MessageListener


Field Summary
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
MemConsumer()
           
MemConsumer(ConnectionFactory fac, Destination dest)
           
MemConsumer(ConnectionFactory fac, Destination dest, String consumerName)
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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 interface MessageListener
Overrides:
onMessage in class MemMessageIdList

isInOrder

public boolean isInOrder()

setAsParent

public void setAsParent(boolean isParent)

isParent

public boolean isParent()


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.