Class CompoundVariable
-
- All Implemented Interfaces:
-
org.apache.jmeter.functions.Function
public class CompoundVariable implements Function
CompoundFunction.
-
-
Field Summary
Fields Modifier and Type Field Description public String
rawParameters
-
Constructor Summary
Constructors Constructor Description CompoundVariable()
CompoundVariable(String parameters)
-
Method Summary
Modifier and Type Method Description String
getRawParameters()
Allows the retrieval of the original String prior to it being compiled. String
execute()
String
execute(SampleResult previousResult, Sampler currentSampler)
Given the previous SampleResult and the current Sampler, return a string to use as a replacement value for the function call. CompoundVariable
getFunction()
List<String>
getArgumentDesc()
Return a list of strings briefly describing each parameter your function takes. void
clear()
void
setParameters(String parameters)
static Class<out Function>
getFunctionClass(String className)
static Array<String>
getFunctionNames()
boolean
hasFunction()
String
getReferenceKey()
Return the name of your function. void
setParameters(Collection<CompoundVariable> parameters)
A collection of the parameters used to configure your function. -
-
Constructor Detail
-
CompoundVariable
CompoundVariable()
-
CompoundVariable
CompoundVariable(String parameters)
-
-
Method Detail
-
getRawParameters
String getRawParameters()
Allows the retrieval of the original String prior to it being compiled.
- Returns:
String
-
execute
String execute(SampleResult previousResult, Sampler currentSampler)
Given the previous SampleResult and the current Sampler, return a string to use as a replacement value for the function call. Assume "setParameter" was previously called.
This method must be thread-safe - multiple threads will be using the same object.
-
getFunction
CompoundVariable getFunction()
-
getArgumentDesc
List<String> getArgumentDesc()
Return a list of strings briefly describing each parameter your function takes. Please use JMeterUtils.getResString(resource_name) to grab a resource string. Otherwise, your help text will be difficult to internationalize. This list is not optional. If you don't wish to write help, you must at least return a List containing the correct number of blank strings, one for each argument.
-
clear
void clear()
-
setParameters
void setParameters(String parameters)
-
getFunctionClass
static Class<out Function> getFunctionClass(String className)
-
getFunctionNames
static Array<String> getFunctionNames()
-
hasFunction
boolean hasFunction()
-
getReferenceKey
String getReferenceKey()
Return the name of your function. Convention is to prepend "__" to the name (ie "__regexFunction")
-
setParameters
void setParameters(Collection<CompoundVariable> parameters)
A collection of the parameters used to configure your function. Each parameter is a CompoundVariable and can be resolved by calling the execute() method of the CompoundVariable (which should be done at execution.)
-
-
-
-