Home » jakarta-jmeter-2.3.4_src » org.apache.jmeter.protocol.java.sampler » [javadoc | source]
org.apache.jmeter.protocol.java.sampler
public class: JavaSamplerContext [javadoc | source]
java.lang.Object
   org.apache.jmeter.protocol.java.sampler.JavaSamplerContext
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.
Constructor:
 public JavaSamplerContext(Arguments args) 
    Create a new JavaSampler with the specified initialization parameters.
    Parameters:
    args - the initialization parameters.
Method from org.apache.jmeter.protocol.java.sampler.JavaSamplerContext Summary:
containsParameter,   getIntParameter,   getIntParameter,   getLongParameter,   getLongParameter,   getParameter,   getParameter,   getParameterNamesIterator
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.jmeter.protocol.java.sampler.JavaSamplerContext Detail:
 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) throws NumberFormatException 
    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().
 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. 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().
 public long getLongParameter(String name) throws NumberFormatException 
    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().
 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. 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().
 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. Each entry in the Iterator is a String.