public class JavaSamplerContext extends Object
Constructor and Description |
---|
JavaSamplerContext(Arguments args)
Create a new JavaSampler with the specified initialization parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsParameter(String name)
Determine whether or not a value has been specified for the parameter
with this name.
|
int |
getIntParameter(String name)
Get the value of a specified parameter as an integer.
|
int |
getIntParameter(String name,
int defaultValue)
Get the value of a specified parameter as an integer, or return the
specified default value if the value was not specified or is not an
integer.
|
JMeterContext |
getJMeterContext() |
Properties |
getJMeterProperties() |
JMeterVariables |
getJMeterVariables() |
long |
getLongParameter(String name)
Get the value of a specified parameter as a long.
|
long |
getLongParameter(String name,
long defaultValue)
Get the value of a specified parameter as along, or return the specified
default value if the value was not specified or is not a long.
|
String |
getParameter(String name)
Get the value of a specific parameter as a String, or null if the value
was not specified.
|
String |
getParameter(String name,
String defaultValue)
Get the value of a specified parameter as a String, or return the
specified default value if the value was not specified.
|
Iterator<String> |
getParameterNamesIterator()
Get an iterator of the parameter names.
|
public JavaSamplerContext(Arguments args)
args
- the initialization parameters.public boolean containsParameter(String name)
name
- the name of the parameter to testpublic Iterator<String> getParameterNamesIterator()
public String getParameter(String name)
name
- the name of the parameter whose value should be retrievedpublic String getParameter(String name, String defaultValue)
name
- the name of the parameter whose value should be retrieveddefaultValue
- the default value to return if the value of this parameter was
not specifiedpublic int getIntParameter(String name) throws NumberFormatException
name
- the name of the parameter whose value should be retrievedNumberFormatException
- if the parameter is not specified or is not an integerInteger.decode(java.lang.String)
public int getIntParameter(String name, int defaultValue)
name
- the name of the parameter whose value should be retrieveddefaultValue
- the default value to return if the value of this parameter was
not specifiedInteger.decode(java.lang.String)
public long getLongParameter(String name) throws NumberFormatException
name
- the name of the parameter whose value should be retrievedNumberFormatException
- if the parameter is not specified or is not a longLong.decode(String)
public long getLongParameter(String name, long defaultValue)
name
- the name of the parameter whose value should be retrieveddefaultValue
- the default value to return if the value of this parameter was
not specifiedLong.decode(String)
public JMeterContext getJMeterContext()
JMeterContext
public final JMeterVariables getJMeterVariables()
JMeterVariables
public final Properties getJMeterProperties()
Properties
JMeter propertiesCopyright © 1998-2019 Apache Software Foundation. All Rights Reserved.