Package org.apache.jmeter.control
Class SwitchController
-
- All Implemented Interfaces:
-
java.io.Serializable,java.lang.Cloneable,org.apache.jmeter.control.Controller,org.apache.jmeter.gui.Searchable,org.apache.jmeter.testelement.TestElement,org.apache.jmeter.threads.TestCompilerHelper
public class SwitchController extends GenericController implements 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.
-
-
Field Summary
Fields Modifier and Type Field Description public transient JMeterContextthreadContextpublic transient StringthreadNamepublic final static TestElement.CompanionCompanionpublic final static StringNAMEpublic final static StringGUI_CLASSpublic final static StringENABLEDpublic final static StringTEST_CLASSpublic final static StringCOMMENTS
-
Constructor Summary
Constructors Constructor Description SwitchController()
-
Method Summary
Modifier and Type Method Description Samplernext()voidsetSelection(String inputValue)StringgetSelection()-
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
canRemove, clear, clearTestElementChildren, clone, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse -
Methods inherited from class org.apache.jmeter.control.GenericController
addIterationListener, addTestElement, addTestElementOnce, getProps, getSchema, initialize, isDone, removeIterationListener, setFirst, triggerEndOfLoop -
Methods inherited from class org.apache.jmeter.testelement.TestElement
get, get, get, get, get, get, get, get, get, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getProps, getSchema, getString, removed, set -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
next
Sampler next()
-
setSelection
void setSelection(String inputValue)
-
getSelection
String getSelection()
-
-
-
-