Class ParamMask
java.lang.Object
org.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.protocol.http.modifier.ParamMask
- All Implemented Interfaces:
Serializable, Cloneable, Searchable, TestElement
This object defines with what a parameter has its value replaced, and the
policies for how that value changes. Used in
ParamModifier.- Version:
- $Revision: 1639483 $
- See Also:
-
Field Summary
Fields inherited from interface TestElement
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongAccessor method, returns the number by which the parameter value is incremented between loops.longAccessor method, returns the lowest possible value that thelongportion of the parameter value may be.Returns the current value, prefixed and suffixed, as a string, then increments it.Accessor method to return theStringthat will be prefixed to thelongvalue.Accessor method to return theStringthat will be suffixed to thelongvalue.longAccessor method, returns the highest possible value that thelongportion of the parameter value may be.voidThis method determines the policy of what value to start (and re-start) at.voidsetFieldName(String fieldName) voidsetIncrement(long incr) Sets the number by which the parameter value is incremented between loops.voidsetLowerBound(long val) Sets the lowest possible value that thelongportion of the parameter value may be.voidSets the prefix for thelongvalue.voidSets the suffix for thelongvalue.voidsetUpperBound(long val) Sets the highest possible value that thelongportion of the parameter value may be.voidsetValue(long val) Set the current value of thelongportion of the parameter value to replace.toString()For debugging purposes.Methods inherited from class AbstractTestElement
addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty
-
Constructor Details
-
ParamMask
public ParamMask()Default constructor.
-
-
Method Details
-
setPrefix
Sets the prefix for thelongvalue. The prefix, the value and the suffix are concatenated to give the parameter value. This allows a wider range of posibilities for the parameter values.- Parameters:
prefix- a string to prefix to the parameter value
-
setValue
public void setValue(long val) Set the current value of thelongportion of the parameter value to replace. This is usually not used, as the methodresetValue()is used to define a policy for the starting value.- Parameters:
val- the new parameter value
-
setFieldName
-
setLowerBound
public void setLowerBound(long val) Sets the lowest possible value that thelongportion of the parameter value may be.- Parameters:
val- the new lowest possible parameter value
-
setUpperBound
public void setUpperBound(long val) Sets the highest possible value that thelongportion of the parameter value may be.- Parameters:
val- the new highest possible parameter value
-
setIncrement
public void setIncrement(long incr) Sets the number by which the parameter value is incremented between loops.- Parameters:
incr- the new increment for the parameter value
-
setSuffix
Sets the suffix for thelongvalue. The prefix, the value and the suffix are concatenated to give the parameter value. This allows a wider range of posibilities for the parameter values.- Parameters:
suffix- a string to suffix to the parameter value
-
getPrefix
Accessor method to return theStringthat will be prefixed to thelongvalue.- Returns:
- the parameter value prefix
-
getLowerBound
public long getLowerBound()Accessor method, returns the lowest possible value that thelongportion of the parameter value may be.- Returns:
- the lower bound of the possible values
-
getUpperBound
public long getUpperBound()Accessor method, returns the highest possible value that thelongportion of the parameter value may be.- Returns:
- the higher bound of the possible values
-
getIncrement
public long getIncrement()Accessor method, returns the number by which the parameter value is incremented between loops.- Returns:
- the increment
-
getSuffix
Accessor method to return theStringthat will be suffixed to thelongvalue.- Returns:
- the parameter value suffix
-
getNextValue
Returns the current value, prefixed and suffixed, as a string, then increments it. If the incremented value is above the upper bound, the value is reset to the lower bound.
This method determines the policy of what happens when an upper bound is reached/surpassed.
- Returns:
- a
Stringrepresenting the currentlongvalue
-
resetValue
public void resetValue()This method determines the policy of what value to start (and re-start) at. -
getFieldName
-
toString
-