Package org.apache.jmeter.control
Class InterleaveControl
java.lang.Object
org.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.control.GenericController
org.apache.jmeter.control.InterleaveControl
- All Implemented Interfaces:
- Serializable,- Cloneable,- Controller,- Searchable,- org.apache.jmeter.testelement.TestElement,- TestCompilerHelper
- Direct Known Subclasses:
- RandomController
Alternate among each of the children controllers or samplers for each loop iteration
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.jmeter.testelement.TestElementorg.apache.jmeter.testelement.TestElement.Companion
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final intFields inherited from class org.apache.jmeter.control.GenericControllercurrent, subControllersAndSamplersFields inherited from interface org.apache.jmeter.testelement.TestElementCOMMENTS, Companion, ENABLED, GUI_CLASS, NAME, TEST_CLASS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidIf the controller is done, remove it from the list, otherwise increment to next entry in list.booleanintgetStyle()protected voidIncrements the current pointer; called by currentReturnedNull to move the controller on to its next child.voidCalled to initialize a controller at the beginning of a test iteration.protected booleannext()Determines the next sampler to be processed.protected SamplernextIsAController(Controller controller) Called byGenericController.next()if the element is a Controller, and returns the next sampler from the controller.protected SamplernextIsASampler(Sampler element) Increment the current pointer and return the element.protected SamplerIf the current is null, reset and continue searching.voidResets the controller (called after execution of last child of controller): resetCurrent() (i.e.protected voidsetCurrentElement(org.apache.jmeter.testelement.TestElement currentElement) Empty implementation - does nothing.voidsetInterleaveAccrossThreads(boolean accrossThreads) protected voidsetSkipNext(boolean skipNext) voidsetStyle(int style) Methods inherited from class org.apache.jmeter.control.GenericControlleraddIterationListener, addTestElement, addTestElementOnce, fireIterationStart, fireIterEvents, getCurrentElement, getIterCount, getProps, getSchema, getSubControllers, incrementIterCount, initializeSubControllers, isDone, isFirst, readResolve, removeCurrentElement, removeIterationListener, resetCurrent, resetIterCount, setDone, setFirst, triggerEndOfLoopMethods inherited from class org.apache.jmeter.testelement.AbstractTestElementaddPropertiesValues, addProperty, addProperty, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traversePropertyMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.jmeter.testelement.TestElementcanRemove, clear, clearTestElementChildren, clone, get, get, get, get, get, get, get, get, get, getComment, getName, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getPropertyOrNull, getString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removed, removeProperty, removeProperty, set, set, set, set, set, set, set, set, set, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
- 
Field Details- 
IGNORE_SUB_CONTROLLERSpublic static final int IGNORE_SUB_CONTROLLERS- See Also:
 
- 
USE_SUB_CONTROLLERSpublic static final int USE_SUB_CONTROLLERS- See Also:
 
 
- 
- 
Constructor Details- 
InterleaveControlpublic InterleaveControl()Constructor for the InterleaveControl object
 
- 
- 
Method Details- 
reInitializepublic void reInitialize()Resets the controller (called after execution of last child of controller):- resetCurrent() (i.e. current=0)
- increment iteration count
- sets first=true
- recoverRunningVersion() to set the controller back to the initial state
 - Overrides:
- reInitializein class- GenericController
 
- 
setStylepublic void setStyle(int style) 
- 
getStylepublic int getStyle()
- 
setInterleaveAccrossThreadspublic void setInterleaveAccrossThreads(boolean accrossThreads) 
- 
getInterleaveAccrossThreadspublic boolean getInterleaveAccrossThreads()
- 
nextDetermines the next sampler to be processed. If GenericController.isDone()istrue, returns null.Gets the list element using current pointer. If this is null, callsGenericController.nextIsNull().If the list element is a Sampler, callsGenericController.nextIsASampler(Sampler), otherwise callsGenericController.nextIsAController(Controller)If any of the called methods throws NextIsNullException, returnsnull, otherwise the value obtained above is returned.- Specified by:
- nextin interface- Controller
- Overrides:
- nextin class- GenericController
- Returns:
- the next sampler or null
 
- 
nextIsAControllerCalled byGenericController.next()if the element is a Controller, and returns the next sampler from the controller. If this isnull, then updates the current pointer and makes recursive call toGenericController.next().- Overrides:
- nextIsAControllerin class- GenericController
- Parameters:
- controller- the current next element
- Returns:
- the next sampler
- Throws:
- NextIsNullException- when the end of the list has already been reached
 
- 
nextIsASamplerIncrement the current pointer and return the element. Called byGenericController.next()if the element is a sampler. (May be overridden by sub-classes).- Overrides:
- nextIsASamplerin class- GenericController
- Parameters:
- element- the current next element
- Returns:
- input element
- Throws:
- NextIsNullException- when the end of the list has already been reached
 
- 
nextIsNullIf the current is null, reset and continue searching. The searchStart attribute will break us off when we start a repeat.Called by GenericController.next()whenGenericController.getCurrentElement()returnsnull. Reinitialises the controller.- Overrides:
- nextIsNullin class- GenericController
- Returns:
- null (always, for this class)
 
- 
setCurrentElementprotected void setCurrentElement(org.apache.jmeter.testelement.TestElement currentElement) throws NextIsNullException Empty implementation - does nothing.- Overrides:
- setCurrentElementin class- GenericController
- Parameters:
- currentElement- the current element
- Throws:
- NextIsNullException- when the list has been completed already
 
- 
currentReturnedNullIf the controller is done, remove it from the list, otherwise increment to next entry in list.- Overrides:
- currentReturnedNullin class- GenericController
- Parameters:
- c- controller
 
- 
isSkipNextprotected boolean isSkipNext()
- 
setSkipNextprotected void setSkipNext(boolean skipNext) 
- 
incrementCurrentprotected void incrementCurrent()Increments the current pointer; called by currentReturnedNull to move the controller on to its next child.- Overrides:
- incrementCurrentin class- GenericController
 
- 
initializepublic void initialize()Description copied from interface:ControllerCalled to initialize a controller at the beginning of a test iteration.- Specified by:
- initializein interface- Controller
- Overrides:
- initializein class- GenericController
- See Also:
 
 
-