org.apache.jmeter.functions

Class Random

Implemented Interfaces:
Function

public class Random
extends AbstractFunction

Provides a Random function which returns a random long integer between a min (first argument) and a max (second argument).

Constructor Summary

Random()
No-arg constructor.

Method Summary

String
execute(SampleResult previousResult, Sampler currentSampler)
Execute the function.
List
getArgumentDesc()
Get the description of this function.
String
getReferenceKey()
Get the invocation key for this function.
void
setParameters(Collection parameters)
Set the parameters for the function.

Methods inherited from class org.apache.jmeter.functions.AbstractFunction

checkMinParameterCount, checkParameterCount, checkParameterCount, execute, execute, getReferenceKey, getVariables, setParameters

Constructor Details

Random

public Random()
No-arg constructor.

Method Details

execute

public String execute(SampleResult previousResult,
                      Sampler currentSampler)
            throws InvalidVariableException
Execute the function.
Specified by:
execute in interface Function
Overrides:
execute in interface AbstractFunction

getArgumentDesc

public List getArgumentDesc()
Get the description of this function.
Specified by:
getArgumentDesc in interface Function

getReferenceKey

public String getReferenceKey()
Get the invocation key for this function.
Specified by:
getReferenceKey in interface Function
Overrides:
getReferenceKey in interface AbstractFunction

setParameters

public void setParameters(Collection parameters)
            throws InvalidVariableException
Set the parameters for the function.
Specified by:
setParameters in interface Function
Overrides:
setParameters in interface AbstractFunction

Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.