org.apache.jmeter.visualizers.backend

## Class BackendListenerContext

- java.lang.Object
- - org.apache.jmeter.visualizers.backend.BackendListenerContext

-     public class BackendListenerContext
      extends java.lang.Object

  BackendListenerContext is used to provide context information to a BackendListenerClient implementation. This currently consists of the initialization parameters which were specified in the GUI.
  Since:
    2.13

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BackendListenerContext(Arguments args)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `containsParameter(java.lang.String name)` Determine whether or not a value has been specified for the parameter with this name.
    `boolean` | `getBooleanParameter(java.lang.String name, boolean defaultValue)`
    `int` | `getIntParameter(java.lang.String name)` Get the value of a specified parameter as an integer.
    `int` | `getIntParameter(java.lang.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.
    `long` | `getLongParameter(java.lang.String name)` Get the value of a specified parameter as a long.
    `long` | `getLongParameter(java.lang.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.
    `java.lang.String` | `getParameter(java.lang.String name)` Get the value of a specific parameter as a String, or null if the value was not specified.
    `java.lang.String` | `getParameter(java.lang.String name, java.lang.String defaultValue)` Get the value of a specified parameter as a String, or return the specified default value if the value was not specified.
    `java.util.Iterator<java.lang.String>` | `getParameterNamesIterator()` Get an iterator of the parameter names.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BackendListenerContext

          public BackendListenerContext(Arguments args)

      Parameters:
        `args` - the initialization parameters.

  - ### Method Detail

    - #### containsParameter

          public boolean containsParameter(java.lang.String name)

      Determine whether or not a value has been specified for the parameter with this name.
      Parameters:
        `name` - the name of the parameter to test
      Returns:
        true if the parameter value has been specified, false otherwise.

    - #### getParameterNamesIterator

          public java.util.Iterator<java.lang.String> getParameterNamesIterator()

      Get an iterator of the parameter names. Each entry in the Iterator is a String.
      Returns:
        an Iterator of Strings listing the names of the parameters which have been specified for this test.

    - #### getParameter

          public java.lang.String getParameter(java.lang.String name)

      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
      Returns:
        the value of the parameter, or null if the value was not specified

    - #### getParameter

          public java.lang.String getParameter(java.lang.String name,
                                               java.lang.String defaultValue)

      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
        `defaultValue` - the default value to return if the value of this parameter was not specified
      Returns:
        the value of the parameter, or the default value if the parameter was not specified

    - #### getIntParameter

          public int getIntParameter(java.lang.String name)

      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
      Returns:
        the value of the parameter
      Throws:
        `java.lang.IllegalArgumentException` - if no value defined
        `java.lang.NumberFormatException` - if the parameter is not specified or is not an integer
      See Also:
        `Integer.decode(java.lang.String)`

    - #### getIntParameter

          public int getIntParameter(java.lang.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().
      Parameters:
        `name` - the name of the parameter whose value should be retrieved
        `defaultValue` - the default value to return if the value of this parameter was not specified
      Returns:
        the value of the parameter, or the default value if the parameter was not specified
      See Also:
        `Integer.decode(java.lang.String)`

    - #### getLongParameter

          public long getLongParameter(java.lang.String name)

      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
      Returns:
        the value of the parameter
      Throws:
        `java.lang.NumberFormatException` - if the parameter is not specified or is not a long
      See Also:
        `Long.decode(String)`

    - #### getLongParameter

          public long getLongParameter(java.lang.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().
      Parameters:
        `name` - the name of the parameter whose value should be retrieved
        `defaultValue` - the default value to return if the value of this parameter was not specified
      Returns:
        the value of the parameter, or the default value if the parameter was not specified
      See Also:
        `Long.decode(String)`

    - #### getBooleanParameter

          public boolean getBooleanParameter(java.lang.String name,
                                             boolean defaultValue)

      Parameters:
        `name` - Parameter name
        `defaultValue` - Default value used if name is not in params
      Returns:
        boolean

Copyright © 1998-2018 Apache Software Foundation. All Rights Reserved.