org.apache.activemq.tool
Class ProducerTool

java.lang.Object
  extended by org.apache.activemq.tool.ToolSupport
      extended by org.apache.activemq.tool.ProducerTool
Direct Known Subclasses:
JndiProducerTool

public class ProducerTool
extends ToolSupport

A simple tool for publishing messages

Version:
$Revision$

Field Summary
protected  int messageCount
           
protected  int messageSize
           
protected  long sleepTime
           
protected  boolean verbose
           
 
Fields inherited from class org.apache.activemq.tool.ToolSupport
ackMode, clientID, consumerName, destination, durable, pwd, subject, topic, transacted, url, user
 
Constructor Summary
ProducerTool()
           
 
Method Summary
protected  javax.jms.MessageProducer createProducer(javax.jms.Session session)
           
static void main(java.lang.String[] args)
           
 void run()
           
protected static void runTool(java.lang.String[] args, ProducerTool tool)
           
protected  void sendLoop(javax.jms.Session session, javax.jms.MessageProducer producer)
           
 
Methods inherited from class org.apache.activemq.tool.ToolSupport
close, createConnection, createSession, dumpStats
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messageCount

protected int messageCount

sleepTime

protected long sleepTime

verbose

protected boolean verbose

messageSize

protected int messageSize
Constructor Detail

ProducerTool

public ProducerTool()
Method Detail

main

public static void main(java.lang.String[] args)

runTool

protected static void runTool(java.lang.String[] args,
                              ProducerTool tool)

run

public void run()

createProducer

protected javax.jms.MessageProducer createProducer(javax.jms.Session session)
                                            throws javax.jms.JMSException
Throws:
javax.jms.JMSException

sendLoop

protected void sendLoop(javax.jms.Session session,
                        javax.jms.MessageProducer producer)
                 throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2011 Apache Software Foundation. All Rights Reserved.