org.apache.jmeter.engine.util

Class CompoundVariable

Implemented Interfaces:
Function

public class CompoundVariable
extends Object
implements Function

CompoundFunction.

Constructor Summary

CompoundVariable()
CompoundVariable(String parameters)

Method Summary

void
clear()
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.
List
getArgumentDesc()
Return a list of strings briefly describing each parameter your function takes.
CompoundVariable
getFunction()
String
getRawParameters()
Allows the retrieval of the original String prior to it being compiled.
String
getReferenceKey()
boolean
hasFunction()
void
setParameters(Collection parameters)
A collection of the parameters used to configure your function.
void
setParameters(String parameters)

Constructor Details

CompoundVariable

public CompoundVariable()

CompoundVariable

public CompoundVariable(String parameters)

Method Details

clear

public void clear()

execute

public String execute()

execute

public 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 threadsafe - multiple threads will be using the same object.
Specified by:
execute in interface Function

getArgumentDesc

public List 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.
Specified by:
getArgumentDesc in interface Function

getFunction

public CompoundVariable getFunction()

getRawParameters

public String getRawParameters()
Allows the retrieval of the original String prior to it being compiled.
Returns:
String

getReferenceKey

public String getReferenceKey()
Specified by:
getReferenceKey in interface Function

hasFunction

public boolean hasFunction()

setParameters

public void setParameters(Collection parameters)
            throws InvalidVariableException
A collection of the parameters used to configure your function. Each parameter is a CompoundFunction and can be resolved by calling the execute() method of the CompoundFunction (which should be done at execution.)
Specified by:
setParameters in interface Function
Parameters:
parameters -

setParameters

public void setParameters(String parameters)
            throws InvalidVariableException

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