org.apache.droids.delay
Class RandomDelayTimer

java.lang.Object
  extended by org.apache.droids.delay.RandomDelayTimer
All Implemented Interfaces:
DelayTimer
Direct Known Subclasses:
GaussianRandomDelayTimer

public class RandomDelayTimer
extends java.lang.Object
implements DelayTimer


Field Summary
protected  int delaySpread
           
protected  int minimumDelay
           
protected  java.util.Random random
           
 
Constructor Summary
RandomDelayTimer()
           
RandomDelayTimer(int min, int range)
           
 
Method Summary
 long getDelayMillis()
          Returns the value of the delay between request.
 int getDelaySpread()
           
 int getMinimumDelay()
           
 void setDelaySpread(int delayRange)
           
 void setMinimumDelay(int minimumDelay)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

random

protected final java.util.Random random

minimumDelay

protected int minimumDelay

delaySpread

protected int delaySpread
Constructor Detail

RandomDelayTimer

public RandomDelayTimer()

RandomDelayTimer

public RandomDelayTimer(int min,
                        int range)
Method Detail

getDelayMillis

public long getDelayMillis()
Description copied from interface: DelayTimer
Returns the value of the delay between request.

Specified by:
getDelayMillis in interface DelayTimer
Returns:
the configured value of the delay

getMinimumDelay

public int getMinimumDelay()

setMinimumDelay

public void setMinimumDelay(int minimumDelay)

getDelaySpread

public int getDelaySpread()

setDelaySpread

public void setDelaySpread(int delayRange)


Copyright © 2007-2009. All Rights Reserved.