org.apache.jmeter.functions
Class IterationCounter
java.lang.Object
org.apache.jmeter.functions.AbstractFunction
org.apache.jmeter.functions.IterationCounter
- All Implemented Interfaces:
- Function, Serializable
- public class IterationCounter
- extends AbstractFunction
- implements Serializable
- See Also:
- Serialized Form
IterationCounter
public IterationCounter()
clone
public Object clone()
throws CloneNotSupportedException
- Throws:
CloneNotSupportedException
execute
public String execute(SampleResult previousResult,
Sampler currentSampler)
throws InvalidVariableException
- Description copied from interface:
Function
- 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
- Specified by:
execute
in class AbstractFunction
- Throws:
InvalidVariableException
- See Also:
Function.execute(SampleResult, Sampler)
setParameters
public void setParameters(Collection parameters)
throws InvalidVariableException
- Description copied from interface:
Function
- 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
- Specified by:
setParameters
in class AbstractFunction
- Throws:
InvalidVariableException
- See Also:
Note: This may not be called (e.g. if no parameters are provided)
getReferenceKey
public String getReferenceKey()
- Description copied from interface:
Function
- Return the name of your function. Convention is to prepend "__" to the
name (ie "__regexFunction")
- Specified by:
getReferenceKey
in interface Function
- Specified by:
getReferenceKey
in class AbstractFunction
- See Also:
Function.getReferenceKey()
getArgumentDesc
public List getArgumentDesc()
- Description copied from interface:
Function
- 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. Add your strings to all
org.apache.jmeter.resources.*.properties files. Do not worry about
translating - that's someone else's responsibility.
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
Copyright © 1998-2007 Apache Software Foundation. All Rights Reserved.