public class SwitchController
extends org.apache.jmeter.control.GenericController
implements java.io.Serializable
Implements a controller which selects at most one of its children based on the condition value, which may be a number or a string.
For numeric input, the controller processes the appropriate child, where the numbering starts from 0. If the number is out of range, then the first (0th) child is selected. If the condition is the empty string, then it is assumed to be 0.
For non-empty non-numeric input, the child is selected by name. This may be the name of the controller or a sampler. If the string does not match any of the names, then the controller with the name "default" (any case) is processed. If there is no default entry, then unlike the numeric case, no child is selected.
| Constructor and Description |
|---|
SwitchController() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getSelection() |
protected void |
incrementCurrent()
incrementCurrent is called when the current child (whether sampler or controller)
has been processed.
|
org.apache.jmeter.samplers.Sampler |
next() |
void |
setSelection(java.lang.String inputValue) |
addIterationListener, addTestElement, addTestElementOnce, currentReturnedNull, fireIterationStart, fireIterEvents, getCurrentElement, getIterCount, getSubControllers, incrementIterCount, initialize, initializeSubControllers, isDone, isFirst, nextIsAController, nextIsASampler, nextIsNull, readResolve, reInitialize, removeCurrentElement, removeIterationListener, resetCurrent, resetIterCount, setCurrentElement, setDone, setFirst, triggerEndOfLoopaddPropertiesValues, addProperty, addProperty, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, 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, traversePropertyfinalize, getClass, notify, notifyAll, toString, wait, wait, waitcanRemove, clear, clearTestElementChildren, clone, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removed, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traversepublic org.apache.jmeter.samplers.Sampler next()
next in interface org.apache.jmeter.control.Controllernext in class org.apache.jmeter.control.GenericControllerprotected void incrementCurrent()
Setting it to int.max marks the controller as having processed all its children. Thus the controller processes one child per iteration.
incrementCurrent in class org.apache.jmeter.control.GenericControllerpublic void setSelection(java.lang.String inputValue)
public java.lang.String getSelection()
Copyright © 1998-2018 Apache Software Foundation. All Rights Reserved.