org.apache.activemq.benchmark
Class Producer
java.lang.Object
org.apache.activemq.benchmark.BenchmarkSupport
org.apache.activemq.benchmark.Producer
- Direct Known Subclasses:
- ProducerConsumer
public class Producer
- extends BenchmarkSupport
- Version:
- $Revision$
- Author:
- James Strachan
Methods inherited from class org.apache.activemq.benchmark.BenchmarkSupport |
addResource, asMemoryString, count, createDestination, createFactory, createSession, getConnectionCount, getFactory, getUrl, isDurable, isTopic, parseBoolean, resetCount, setConnectionCount, setDurable, setFactory, setSubject, setTopic, setUrl, start, timerLoop, useTimerLoop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Producer
public Producer()
main
public static void main(java.lang.String[] args)
run
public void run()
throws java.lang.Exception
- Throws:
java.lang.Exception
getMessageSize
public int getMessageSize()
setMessageSize
public void setMessageSize(int messageSize)
getLoopSize
public int getLoopSize()
setLoopSize
public void setLoopSize(int loopSize)
publish
protected void publish()
throws java.lang.Exception
- Throws:
java.lang.Exception
getMessage
protected java.lang.String getMessage()
publish
protected void publish(java.lang.String text,
java.lang.String subject)
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
publishLoop
protected void publishLoop(javax.jms.Session session,
javax.jms.MessageProducer publisher,
java.lang.String text)
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
loadFile
protected java.lang.String loadFile(java.lang.String file)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2010 Apache Software Foundation. All Rights Reserved.