Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.activemq.benchmark
Class Producer  view Producer download Producer.java

java.lang.Object
  extended byorg.activemq.benchmark.BenchmarkSupport
      extended byorg.activemq.benchmark.Producer
Direct Known Subclasses:
ProducerConsumer

public class Producer
extends BenchmarkSupport

Version:
$Revision$

Field Summary
(package private)  int loops
           
(package private)  int loopSize
           
private  int messageSize
           
 
Fields inherited from class org.activemq.benchmark.BenchmarkSupport
batch, connectionCount, destination, embeddedBroker, subjects
 
Constructor Summary
Producer()
           
 
Method Summary
 int getLoopSize()
           
protected  java.lang.String getMessage()
           
 int getMessageSize()
           
protected  java.lang.String loadFile(java.lang.String file)
           
static void main(java.lang.String[] args)
           
protected  void publish()
           
protected  void publish(java.lang.String text, java.lang.String subject)
           
protected  void publishLoop(javax.jms.Session session, javax.jms.MessageProducer publisher, java.lang.String text)
           
 void run()
           
 void setLoopSize(int loopSize)
           
 void setMessageSize(int messageSize)
           
 
Methods inherited from class org.activemq.benchmark.BenchmarkSupport
addResource, asMemoryString, count, createDestination, createFactory, createSession, getConnectionCount, getFactory, getUrl, isDurable, isEmbeddedBroker, isTopic, parseBoolean, resetCount, setConnectionCount, setDurable, setEmbeddedBroker, 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
 

Field Detail

loops

int loops

loopSize

int loopSize

messageSize

private int messageSize
Constructor Detail

Producer

public Producer()
Method Detail

main

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

run

public void run()
         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

getMessage

protected java.lang.String getMessage()

publish

protected void publish(java.lang.String text,
                       java.lang.String subject)
                throws javax.jms.JMSException

publishLoop

protected void publishLoop(javax.jms.Session session,
                           javax.jms.MessageProducer publisher,
                           java.lang.String text)
                    throws javax.jms.JMSException

loadFile

protected java.lang.String loadFile(java.lang.String file)
                             throws java.io.IOException