org.activemq.benchmark
Class BenchmarkSupport

java.lang.Object
  extended by org.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  boolean embeddedBroker
           
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  org.activemq.ActiveMQConnectionFactory createFactory()
           
protected  Session createSession()
           
 int getConnectionCount()
           
 org.activemq.ActiveMQConnectionFactory getFactory()
           
 String getUrl()
           
 boolean isDurable()
           
 boolean isEmbeddedBroker()
           
 boolean isTopic()
           
protected static boolean parseBoolean(String text)
           
protected  int resetCount()
           
 void setConnectionCount(int connectionCount)
           
 void setDurable(boolean durable)
           
 void setEmbeddedBroker(boolean embeddedBroker)
           
 void setFactory(org.activemq.ActiveMQConnectionFactory factory)
           
 void setSubject(String subject)
           
 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

embeddedBroker

protected boolean embeddedBroker

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 org.activemq.ActiveMQConnectionFactory getFactory()

setFactory

public void setFactory(org.activemq.ActiveMQConnectionFactory factory)

setSubject

public void setSubject(String subject)

isDurable

public boolean isDurable()

setDurable

public void setDurable(boolean durable)

isEmbeddedBroker

public boolean isEmbeddedBroker()

setEmbeddedBroker

public void setEmbeddedBroker(boolean embeddedBroker)

getConnectionCount

public int getConnectionCount()

setConnectionCount

public void setConnectionCount(int connectionCount)

createSession

protected Session createSession()
                         throws JMSException
Throws:
JMSException

createFactory

protected org.activemq.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)

parseBoolean

protected static boolean parseBoolean(String text)


Copyright © 2004-2010 Protique, Ltd.. All Rights Reserved.