org.apache.activemq.tool
Class JmsProducerClient

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

public class JmsProducerClient
extends AbstractJmsMeasurableClient


Field Summary
protected  JmsProducerProperties client
           
protected  javax.jms.MessageProducer jmsProducer
           
protected  javax.jms.TextMessage jmsTextMessage
           
 
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
JmsProducerClient(javax.jms.ConnectionFactory factory)
           
JmsProducerClient(JmsProducerProperties clientProps, javax.jms.ConnectionFactory factory)
           
 
Method Summary
protected  java.lang.String buildText(java.lang.String text, int size)
           
 javax.jms.MessageProducer createJmsProducer()
           
 javax.jms.MessageProducer createJmsProducer(javax.jms.Destination dest)
           
 javax.jms.TextMessage createJmsTextMessage()
           
 javax.jms.TextMessage createJmsTextMessage(int size)
           
 javax.jms.TextMessage createJmsTextMessage(java.lang.String text)
           
 JmsClientProperties getClient()
           
 javax.jms.MessageProducer getJmsProducer()
           
 javax.jms.TextMessage getJmsTextMessage()
           
 void sendCountBasedMessages(long messageCount)
           
 void sendMessages()
           
 void sendMessages(int destCount)
           
 void sendMessages(int destIndex, int destCount)
           
 void sendTimeBasedMessages(long duration)
           
 void setClient(JmsClientProperties clientProps)
           
 
Methods inherited from class org.apache.activemq.tool.AbstractJmsMeasurableClient
getThroughput, incThroughput, incThroughput, reset, setThroughput
 
Methods inherited from class org.apache.activemq.tool.AbstractJmsClient
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

client

protected JmsProducerProperties client

jmsProducer

protected javax.jms.MessageProducer jmsProducer

jmsTextMessage

protected javax.jms.TextMessage jmsTextMessage
Constructor Detail

JmsProducerClient

public JmsProducerClient(javax.jms.ConnectionFactory factory)

JmsProducerClient

public JmsProducerClient(JmsProducerProperties clientProps,
                         javax.jms.ConnectionFactory factory)
Method Detail

sendMessages

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

sendMessages

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

sendMessages

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

sendCountBasedMessages

public void sendCountBasedMessages(long messageCount)
                            throws javax.jms.JMSException
Throws:
javax.jms.JMSException

sendTimeBasedMessages

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

createJmsProducer

public javax.jms.MessageProducer createJmsProducer()
                                            throws javax.jms.JMSException
Throws:
javax.jms.JMSException

createJmsProducer

public javax.jms.MessageProducer createJmsProducer(javax.jms.Destination dest)
                                            throws javax.jms.JMSException
Throws:
javax.jms.JMSException

getJmsProducer

public javax.jms.MessageProducer getJmsProducer()

createJmsTextMessage

public javax.jms.TextMessage createJmsTextMessage()
                                           throws javax.jms.JMSException
Throws:
javax.jms.JMSException

createJmsTextMessage

public javax.jms.TextMessage createJmsTextMessage(int size)
                                           throws javax.jms.JMSException
Throws:
javax.jms.JMSException

createJmsTextMessage

public javax.jms.TextMessage createJmsTextMessage(java.lang.String text)
                                           throws javax.jms.JMSException
Throws:
javax.jms.JMSException

getJmsTextMessage

public javax.jms.TextMessage getJmsTextMessage()

getClient

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

setClient

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

buildText

protected java.lang.String buildText(java.lang.String text,
                                     int size)


Copyright © 2010 Apache Software Foundation. All Rights Reserved.