Class LoopController

  • All Implemented Interfaces:
    java.io.Serializable , java.lang.Cloneable , org.apache.jmeter.control.Controller , org.apache.jmeter.control.IteratingController , org.apache.jmeter.engine.event.LoopIterationListener , org.apache.jmeter.gui.Searchable , org.apache.jmeter.testelement.TestElement , org.apache.jmeter.threads.TestCompilerHelper

    
    public class LoopController
    extends GenericController implements Serializable, IteratingController, LoopIterationListener
                        

    Class that implements the Loop Controller, ie iterate infinitely or a configured number of times

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      LoopController()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      LoopControllerSchema getSchema()
      PropertiesAccessor<out LoopController, out LoopControllerSchema> getProps() Allows type-safe accessors to the properties of the current element.
      void setLoops(int loops)
      void setLoops(String loopValue)
      int getLoops()
      String getLoopString()
      void setContinueForever(boolean forever) Determines whether the loop will return any samples if it is rerun.
      Sampler next() Determines the next sampler to be processed.
      void triggerEndOfLoop()
      void startNextLoop() Start next iteration
      void breakLoop() Break loop ("break" keyword equivalent)
      void iterationStart(LoopIterationEvent iterEvent) Called when a loop iteration is about to start.
      • Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement

        addTestElement, canRemove, clear, clearTestElementChildren, clone, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
      • Methods inherited from class org.apache.jmeter.control.GenericController

        addIterationListener, addTestElement, addTestElementOnce, initialize, isDone, removeIterationListener, setFirst
      • Methods inherited from class org.apache.jmeter.control.IteratingController

        updateIterationIndex
      • Methods inherited from class org.apache.jmeter.control.Controller

        addIterationListener
      • Methods inherited from class org.apache.jmeter.testelement.TestElement

        addTestElement, canRemove, clear, clearTestElementChildren, clone, get, get, get, get, get, get, get, get, get, getComment, getName, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getProperty, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyOrNull, getProps, getSchema, getString, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, removed, set, setComment, setEnabled, setName, setProperty, setTemporary, traverse
      • Methods inherited from class java.lang.Object

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

      • LoopController

        LoopController()
    • Method Detail

      • getProps

         PropertiesAccessor<out LoopController, out LoopControllerSchema> getProps()

        Allows type-safe accessors to the properties of the current element. Note: when overriding the method, ensure you emit wildcards. For instance: JMeterElementInstance<? extends TestPlanClass> getProps() { return ... }

      • setContinueForever

         void setContinueForever(boolean forever)

        Determines whether the loop will return any samples if it is rerun.

        Parameters:
        forever - true if the loop must be reset after ending a run
      • next

         Sampler next()

        Determines the next sampler to be processed.

        If #isDone() is true, returns null.

        Gets the list element using current pointer. If this is null, calls #nextIsNull().

        If the list element is a , calls #nextIsASampler(Sampler), otherwise calls #nextIsAController(Controller)

        If any of the called methods throws , returns null, otherwise the value obtained above is returned.

      • breakLoop

         void breakLoop()

        Break loop ("break" keyword equivalent)