org.apache.activemq.tool
Class JmsConsumerClient

java.lang.Object
  extended by org.apache.activemq.tool.AbstractJmsClient
      extended by org.apache.activemq.tool.AbstractJmsMeasurableClient
          extended by org.apache.activemq.tool.JmsConsumerClient
All Implemented Interfaces:
MeasurableClient

public class JmsConsumerClient
extends AbstractJmsMeasurableClient


Field Summary
protected  JmsConsumerProperties client
           
protected  javax.jms.MessageConsumer jmsConsumer
           
 
Fields inherited from class org.apache.activemq.tool.AbstractJmsMeasurableClient
throughput
 
Fields inherited from class org.apache.activemq.tool.AbstractJmsClient
clientName, destCount, destIndex, factory, jmsConnection, jmsSession
 
Constructor Summary
JmsConsumerClient(javax.jms.ConnectionFactory factory)
           
JmsConsumerClient(JmsConsumerProperties clientProps, javax.jms.ConnectionFactory factory)
           
 
Method Summary
 javax.jms.MessageConsumer createJmsConsumer()
           
 javax.jms.MessageConsumer createJmsConsumer(javax.jms.Destination dest)
           
 javax.jms.MessageConsumer createJmsConsumer(javax.jms.Destination dest, java.lang.String selector, boolean noLocal)
           
 JmsClientProperties getClient()
           
 javax.jms.MessageConsumer getJmsConsumer()
           
 void receiveAsyncCountBasedMessages(long count)
           
 void receiveAsyncTimeBasedMessages(long duration)
           
 void receiveMessages()
           
 void receiveMessages(int destCount)
           
 void receiveMessages(int destIndex, int destCount)
           
 void receiveSyncCountBasedMessages(long count)
           
 void receiveSyncTimeBasedMessages(long duration)
           
 void setClient(JmsClientProperties clientProps)
           
protected  void sleep()
          A way to throttle the consumer.
 
Methods inherited from class org.apache.activemq.tool.AbstractJmsMeasurableClient
getThroughput, incThroughput, incThroughput, reset, setThroughput
 
Methods inherited from class org.apache.activemq.tool.AbstractJmsClient
commitTxIfNecessary, createCompositeDestination, createCompositeDestination, createDestination, createDestination, getClientName, getConnection, getDestCount, getDestIndex, getFactory, getSession, setClientName, setDestCount, setDestIndex, setFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.activemq.tool.sampler.MeasurableClient
getClientName
 

Field Detail

jmsConsumer

protected javax.jms.MessageConsumer jmsConsumer

client

protected JmsConsumerProperties client
Constructor Detail

JmsConsumerClient

public JmsConsumerClient(javax.jms.ConnectionFactory factory)

JmsConsumerClient

public JmsConsumerClient(JmsConsumerProperties clientProps,
                         javax.jms.ConnectionFactory factory)
Method Detail

receiveMessages

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

receiveMessages

public void receiveMessages(int destCount)
                     throws javax.jms.JMSException
Throws:
javax.jms.JMSException

receiveMessages

public void receiveMessages(int destIndex,
                            int destCount)
                     throws javax.jms.JMSException
Throws:
javax.jms.JMSException

receiveSyncTimeBasedMessages

public void receiveSyncTimeBasedMessages(long duration)
                                  throws javax.jms.JMSException
Throws:
javax.jms.JMSException

receiveSyncCountBasedMessages

public void receiveSyncCountBasedMessages(long count)
                                   throws javax.jms.JMSException
Throws:
javax.jms.JMSException

receiveAsyncTimeBasedMessages

public void receiveAsyncTimeBasedMessages(long duration)
                                   throws javax.jms.JMSException
Throws:
javax.jms.JMSException

receiveAsyncCountBasedMessages

public void receiveAsyncCountBasedMessages(long count)
                                    throws javax.jms.JMSException
Throws:
javax.jms.JMSException

createJmsConsumer

public javax.jms.MessageConsumer createJmsConsumer()
                                            throws javax.jms.JMSException
Throws:
javax.jms.JMSException

createJmsConsumer

public javax.jms.MessageConsumer createJmsConsumer(javax.jms.Destination dest)
                                            throws javax.jms.JMSException
Throws:
javax.jms.JMSException

createJmsConsumer

public javax.jms.MessageConsumer createJmsConsumer(javax.jms.Destination dest,
                                                   java.lang.String selector,
                                                   boolean noLocal)
                                            throws javax.jms.JMSException
Throws:
javax.jms.JMSException

getJmsConsumer

public javax.jms.MessageConsumer getJmsConsumer()

getClient

public JmsClientProperties getClient()
Specified by:
getClient in class AbstractJmsClient

setClient

public void setClient(JmsClientProperties clientProps)
Specified by:
setClient in class AbstractJmsClient

sleep

protected void sleep()
A way to throttle the consumer. Time to sleep is configured via recvDelay property.



Copyright © 2005-2011 FuseSource, Corp.. All Rights Reserved.