|
Apache JMeter | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jmeter.functions.AbstractFunction
Provides common methods for all functions
Constructor Summary | |
AbstractFunction()
|
Method Summary | |
protected void |
checkMinParameterCount(Collection parameters,
int minimum)
Utility method to check parameter counts. |
protected void |
checkParameterCount(Collection parameters,
int count)
Utility method to check parameter counts. |
protected void |
checkParameterCount(Collection parameters,
int min,
int max)
Utility method to check parameter counts. |
String |
execute()
|
abstract String |
execute(SampleResult previousResult,
Sampler currentSampler)
N.B. setParameters() and execute() are called from different threads, so both must be synchronized unless there are no parameters to save |
abstract String |
getReferenceKey()
Return the name of your function. |
protected JMeterVariables |
getVariables()
|
abstract void |
setParameters(Collection parameters)
N.B. setParameters() and execute() are called from different threads, so both must be synchronized unless there are no parameters to save |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.jmeter.functions.Function |
getArgumentDesc |
Constructor Detail |
public AbstractFunction()
Method Detail |
public abstract String execute(SampleResult previousResult, Sampler currentSampler) throws InvalidVariableException
N.B. setParameters() and execute() are called from different threads, so both must be synchronized unless there are no parameters to save
execute
in interface Function
InvalidVariableException
Function.execute(SampleResult, Sampler)
public String execute() throws InvalidVariableException
InvalidVariableException
public abstract void setParameters(Collection parameters) throws InvalidVariableException
N.B. setParameters() and execute() are called from different threads, so both must be synchronized unless there are no parameters to save
setParameters
in interface Function
parameters
-
InvalidVariableException
Note: This is always called even if no parameters are provided
(versions of JMeter after 2.3.1)
public abstract String getReferenceKey()
Function
getReferenceKey
in interface Function
Function.getReferenceKey()
protected JMeterVariables getVariables()
protected void checkParameterCount(Collection parameters, int min, int max) throws InvalidVariableException
parameters
- collection of parametersmin
- minimum number of parameters allowedmax
- maximum number of parameters allowed
InvalidVariableException
- if the number of parameters is incorrectprotected void checkParameterCount(Collection parameters, int count) throws InvalidVariableException
parameters
- collection of parameterscount
- number of parameters expected
InvalidVariableException
- if the number of parameters is incorrectprotected void checkMinParameterCount(Collection parameters, int minimum) throws InvalidVariableException
parameters
- collection of parametersminimum
- number of parameters expected
InvalidVariableException
- if the number of parameters is incorrect
|
Apache JMeter | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |