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:
javax.jms.MessageListener

public class MemConsumer
extends MemMessageIdList
implements javax.jms.MessageListener

Version:
$Revision: 1.3 $

Field Summary
protected  javax.jms.Connection connection
           
protected  javax.jms.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(javax.jms.ConnectionFactory fac, javax.jms.Destination dest)
           
MemConsumer(javax.jms.ConnectionFactory fac, javax.jms.Destination dest, java.lang.String consumerName)
           
 
Method Summary
 boolean isInOrder()
           
 boolean isParent()
           
 void onMessage(javax.jms.Message msg)
           
 javax.jms.Message receive()
           
 javax.jms.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 javax.jms.Connection connection

consumer

protected javax.jms.MessageConsumer consumer

counter

protected long counter

isParent

protected boolean isParent

inOrder

protected boolean inOrder
Constructor Detail

MemConsumer

public MemConsumer()

MemConsumer

public MemConsumer(javax.jms.ConnectionFactory fac,
                   javax.jms.Destination dest,
                   java.lang.String consumerName)
            throws javax.jms.JMSException
Throws:
javax.jms.JMSException

MemConsumer

public MemConsumer(javax.jms.ConnectionFactory fac,
                   javax.jms.Destination dest)
            throws javax.jms.JMSException
Throws:
javax.jms.JMSException
Method Detail

start

public void start()
           throws javax.jms.JMSException
Throws:
javax.jms.JMSException

stop

public void stop()
          throws javax.jms.JMSException
Throws:
javax.jms.JMSException

shutDown

public void shutDown()
              throws javax.jms.JMSException
Throws:
javax.jms.JMSException

receive

public javax.jms.Message receive()
                          throws javax.jms.JMSException
Throws:
javax.jms.JMSException

receive

public javax.jms.Message receive(long wait)
                          throws javax.jms.JMSException
Throws:
javax.jms.JMSException

onMessage

public void onMessage(javax.jms.Message msg)
Specified by:
onMessage in interface javax.jms.MessageListener
Overrides:
onMessage in class MemMessageIdList

isInOrder

public boolean isInOrder()

setAsParent

public void setAsParent(boolean isParent)

isParent

public boolean isParent()


Copyright © 2010 Apache Software Foundation. All Rights Reserved.