Class AbstractCustomSampler

java.lang.Object
com.xceptance.xlt.api.engine.AbstractCustomSampler

public abstract class AbstractCustomSampler extends Object
The AbstractCustomSampler provides the common functionality of custom samplers.
  • Constructor Details

    • AbstractCustomSampler

      public AbstractCustomSampler()
  • Method Details

    • initialize

      public void initialize()
      Executed once at the start of the sampler.
    • execute

      public abstract double execute()
      Execute the sampler.
    • shutdown

      public void shutdown()
      Executed once when the sampler get shut down.
    • setInterval

      public void setInterval(long interval)
      Set the execution interval.
      Parameters:
      interval - positive interval value in milliseconds (0 or higher)
      See Also:
    • setInterval

      public void setInterval(String interval)
      Set the execution interval. If using the convenience approach to set time periods (for example with "3h 5m 7s") in XLT the resulting number of milliseconds is computed internally.
      Parameters:
      interval - the milliseconds as in setInterval(long) or a time period as with the convenient way
    • getInterval

      public long getInterval()
      Get the execution interval.
      Returns:
      the execution interval
    • setName

      public void setName(String name)
      Set the sampler name. Setting the name after the sampler has started will have no effect.
      Parameters:
      name - sampler name
    • getName

      public String getName()
      Get the sampler name.
      Returns:
      sampler name
    • getProperties

      public Properties getProperties()
      Get properties of this sampler.
      Returns:
      all properties
    • setProperties

      public void setProperties(Properties properties)
      Set properties of this sampler.
      Parameters:
      properties - properties for that sampler