org.apache.activemq.benchmark
Class BenchmarkSupport

java.lang.Object
  extended by org.apache.activemq.benchmark.BenchmarkSupport
Direct Known Subclasses:
Consumer, Producer

public class BenchmarkSupport
extends Object

Abstract base class for some simple benchmark tools

Version:
$Revision$
Author:
James Strachan

Field Summary
protected  int batch
           
protected  int connectionCount
           
protected  Destination destination
           
protected  String[] subjects
           
 
Constructor Summary
BenchmarkSupport()
           
 
Method Summary
protected  void addResource(Object resource)
           
protected  String asMemoryString(long value)
           
protected  void count(int count)
           
protected  Destination createDestination(Session session, String subject)
           
protected  ActiveMQConnectionFactory createFactory()
           
protected  Session createSession()
           
 int getConnectionCount()
           
 int getCounter()
           
 ActiveMQConnectionFactory getFactory()
           
 String getUrl()
           
 boolean isDurable()
           
 boolean isTopic()
           
protected static boolean parseBoolean(String text)
           
protected  int resetCount()
           
 void setConnectionCount(int connectionCount)
           
 void setDurable(boolean durable)
           
 void setFactory(ActiveMQConnectionFactory factory)
           
 void setSubject(String subject)
           
 void setTimerLoop(boolean timerLoop)
           
 void setTopic(boolean topic)
           
 void setUrl(String url)
           
 void start()
           
protected  void timerLoop()
           
protected  boolean useTimerLoop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connectionCount

protected int connectionCount

batch

protected int batch

destination

protected Destination destination

subjects

protected String[] subjects
Constructor Detail

BenchmarkSupport

public BenchmarkSupport()
Method Detail

start

public void start()

getUrl

public String getUrl()

setUrl

public void setUrl(String url)

isTopic

public boolean isTopic()

setTopic

public void setTopic(boolean topic)

getFactory

public ActiveMQConnectionFactory getFactory()

setFactory

public void setFactory(ActiveMQConnectionFactory factory)

setSubject

public void setSubject(String subject)

isDurable

public boolean isDurable()

setDurable

public void setDurable(boolean durable)

getConnectionCount

public int getConnectionCount()

setConnectionCount

public void setConnectionCount(int connectionCount)

createSession

protected Session createSession()
                         throws JMSException
Throws:
JMSException

createFactory

protected ActiveMQConnectionFactory createFactory()

count

protected void count(int count)

resetCount

protected int resetCount()

timerLoop

protected void timerLoop()

asMemoryString

protected String asMemoryString(long value)

useTimerLoop

protected boolean useTimerLoop()

createDestination

protected Destination createDestination(Session session,
                                        String subject)
                                 throws JMSException
Throws:
JMSException

addResource

protected void addResource(Object resource)

getCounter

public int getCounter()

setTimerLoop

public void setTimerLoop(boolean timerLoop)

parseBoolean

protected static boolean parseBoolean(String text)


Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.