org.rutil.loadtest
Class LoadGenerator

java.lang.Object
  extended by org.rutil.loadtest.LoadGenerator
Direct Known Subclasses:
RequestBoundLoadGenerator, ThreadBoundLoadGenerator

public abstract class LoadGenerator
extends java.lang.Object

A skeleton load generator that notifies the statshandler on start and finish.

Author:
mohan
See Also:
TestRunner, StatsHandler

Field Summary
protected  long durationInSecs
           
protected  java.lang.String name
           
protected  StatsHandler statsHandler
           
protected  TestRunner testRunner
           
 
Constructor Summary
protected LoadGenerator()
           
  LoadGenerator(java.lang.String name, TestRunner testRunner)
           
 
Method Summary
protected abstract  Stats doStart()
           
 long getDurationInSecs()
           
 java.lang.String getName()
           
 StatsHandler getStatsHandler()
           
 TestRunner getTestRunner()
           
 boolean isEnabled()
           
 void setDurationInSecs(long durationInSecs)
           
 void setEnabled(boolean enabled)
           
 void setStatsHandler(StatsHandler statsHandler)
           
 Stats start()
           
protected  StatsHandler statsHandler()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

durationInSecs

protected long durationInSecs

name

protected java.lang.String name

testRunner

protected TestRunner testRunner

statsHandler

protected StatsHandler statsHandler
Constructor Detail

LoadGenerator

protected LoadGenerator()

LoadGenerator

public LoadGenerator(java.lang.String name,
                     TestRunner testRunner)
Method Detail

getName

public java.lang.String getName()

getTestRunner

public TestRunner getTestRunner()

isEnabled

public boolean isEnabled()

setEnabled

public void setEnabled(boolean enabled)

getDurationInSecs

public long getDurationInSecs()

setDurationInSecs

public void setDurationInSecs(long durationInSecs)

getStatsHandler

public StatsHandler getStatsHandler()

setStatsHandler

public void setStatsHandler(StatsHandler statsHandler)

statsHandler

protected StatsHandler statsHandler()

start

public Stats start()

doStart

protected abstract Stats doStart()