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  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(ConnectionFactory factory)
           
JmsConsumerClient(JmsConsumerProperties clientProps, ConnectionFactory factory)
           
 
Method Summary
 MessageConsumer createJmsConsumer()
           
 MessageConsumer createJmsConsumer(Destination dest)
           
 MessageConsumer createJmsConsumer(Destination dest, String selector, boolean noLocal)
           
 JmsClientProperties getClient()
           
 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 MessageConsumer jmsConsumer

client

protected JmsConsumerProperties client
Constructor Detail

JmsConsumerClient

public JmsConsumerClient(ConnectionFactory factory)

JmsConsumerClient

public JmsConsumerClient(JmsConsumerProperties clientProps,
                         ConnectionFactory factory)
Method Detail

receiveMessages

public void receiveMessages()
                     throws JMSException
Throws:
JMSException

receiveMessages

public void receiveMessages(int destCount)
                     throws JMSException
Throws:
JMSException

receiveMessages

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

receiveSyncTimeBasedMessages

public void receiveSyncTimeBasedMessages(long duration)
                                  throws JMSException
Throws:
JMSException

receiveSyncCountBasedMessages

public void receiveSyncCountBasedMessages(long count)
                                   throws JMSException
Throws:
JMSException

receiveAsyncTimeBasedMessages

public void receiveAsyncTimeBasedMessages(long duration)
                                   throws JMSException
Throws:
JMSException

receiveAsyncCountBasedMessages

public void receiveAsyncCountBasedMessages(long count)
                                    throws JMSException
Throws:
JMSException

createJmsConsumer

public MessageConsumer createJmsConsumer()
                                  throws JMSException
Throws:
JMSException

createJmsConsumer

public MessageConsumer createJmsConsumer(Destination dest)
                                  throws JMSException
Throws:
JMSException

createJmsConsumer

public MessageConsumer createJmsConsumer(Destination dest,
                                         String selector,
                                         boolean noLocal)
                                  throws JMSException
Throws:
JMSException

getJmsConsumer

public 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-2013 The Apache Software Foundation. All Rights Reserved.