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, getCounter, getFactory, getUrl, isDurable, isTopic, parseBoolean, resetCount, setConnectionCount, setDurable, setFactory, setSubject, setTimerLoop, 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(String[] args)
run
public void run()
throws Exception
- Throws:
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 Exception
- Throws:
Exception
getMessage
protected String getMessage()
publish
protected void publish(String text,
String subject)
throws JMSException
- Throws:
JMSException
publishLoop
protected void publishLoop(Session session,
MessageProducer publisher,
String text)
throws JMSException
- Throws:
JMSException
loadFile
protected String loadFile(String file)
throws IOException
- Throws:
IOException
getLoops
public int getLoops()
setLoops
public void setLoops(int loops)
Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.