Class AbstractFunction

  • All Implemented Interfaces:
    org.apache.jmeter.functions.Function

    
    public abstract class AbstractFunction
     implements Function
                        

    Provides common methods for all functions

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract String execute(SampleResult previousResult, Sampler currentSampler) N.B.
      String execute()
      abstract void setParameters(Collection<CompoundVariable> parameters) Note: This is always called even if no parameters are provided (versions of JMeter after 2.3.
      abstract String getReferenceKey()
      • Methods inherited from class org.apache.jmeter.functions.Function

        getArgumentDesc
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractFunction

        AbstractFunction()
    • Method Detail

      • execute

         abstract String execute(SampleResult previousResult, Sampler currentSampler)

        N.B. execute() should be synchronized if function is operating with non-thread-safe objects (e.g. operates with files).

        JMeter ensures setParameters() happens-before execute(): setParameters is executed in main thread, and worker threads are started after that.