| java.lang.Object org.apache.jmeter.protocol.java.sampler.JavaSamplerContext
JavaSamplerContext | public class JavaSamplerContext (Code) | | JavaSamplerContext is used to provide context information to a
JavaSamplerClient implementation. This currently consists of the
initialization parameters which were specified in the GUI. Additional data
may be accessible through JavaSamplerContext in the future.
author: Jeremy Arnold version: $Revision: 493789 $ |
Method Summary | |
public boolean | containsParameter(String name) Determine whether or not a value has been specified for the parameter
with this name. | public int | getIntParameter(String name) Get the value of a specified parameter as an integer. | public 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. | public long | getLongParameter(String name) Get the value of a specified parameter as a long. | public 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. | public String | getParameter(String name) Get the value of a specific parameter as a String, or null if the value
was not specified. | public 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. | public Iterator | getParameterNamesIterator() Get an iterator of the parameter names. |
JavaSamplerContext | public JavaSamplerContext(Arguments args)(Code) | | Create a new JavaSampler with the specified initialization parameters.
Parameters: args - the initialization parameters. |
containsParameter | public boolean containsParameter(String name)(Code) | | Determine whether or not a value has been specified for the parameter
with this name.
Parameters: name - the name of the parameter to test true if the parameter value has been specified, false otherwise. |
getIntParameter | public int getIntParameter(String name) throws NumberFormatException(Code) | | Get the value of a specified parameter as an integer. An exception will
be thrown if the parameter is not specified or if it is not an integer.
The value may be specified in decimal, hexadecimal, or octal, as defined
by Integer.decode().
Parameters: name - the name of the parameter whose value should be retrieved the value of the parameter throws: NumberFormatException - if the parameter is not specified or is not an integer See Also: java.lang.Integer.decode(java.lang.String) |
getIntParameter | public int getIntParameter(String name, int defaultValue)(Code) | | 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. A warning will be logged if the value is not an integer. The
value may be specified in decimal, hexadecimal, or octal, as defined by
Integer.decode().
Parameters: name - the name of the parameter whose value should be retrieved Parameters: defaultValue - the default value to return if the value of this parameter wasnot specified the value of the parameter, or the default value if the parameterwas not specified See Also: java.lang.Integer.decode(java.lang.String) |
getLongParameter | public long getLongParameter(String name) throws NumberFormatException(Code) | | Get the value of a specified parameter as a long. An exception will be
thrown if the parameter is not specified or if it is not a long. The
value may be specified in decimal, hexadecimal, or octal, as defined by
Long.decode().
Parameters: name - the name of the parameter whose value should be retrieved the value of the parameter throws: NumberFormatException - if the parameter is not specified or is not a long See Also: Long.decode(String) |
getLongParameter | public long getLongParameter(String name, long defaultValue)(Code) | | 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. A warning
will be logged if the value is not a long. The value may be specified in
decimal, hexadecimal, or octal, as defined by Long.decode().
Parameters: name - the name of the parameter whose value should be retrieved Parameters: defaultValue - the default value to return if the value of this parameter wasnot specified the value of the parameter, or the default value if the parameterwas not specified See Also: Long.decode(String) |
getParameter | public String getParameter(String name)(Code) | | Get the value of a specific parameter as a String, or null if the value
was not specified.
Parameters: name - the name of the parameter whose value should be retrieved the value of the parameter, or null if the value was notspecified |
getParameter | public String getParameter(String name, String defaultValue)(Code) | | Get the value of a specified parameter as a String, or return the
specified default value if the value was not specified.
Parameters: name - the name of the parameter whose value should be retrieved Parameters: defaultValue - the default value to return if the value of this parameter wasnot specified the value of the parameter, or the default value if the parameterwas not specified |
getParameterNamesIterator | public Iterator getParameterNamesIterator()(Code) | | Get an iterator of the parameter names. Each entry in the Iterator is a
String.
an Iterator of Strings listing the names of the parameters whichhave been specified for this test. |
|
|