|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jmeter.testelement.AbstractTestElement org.apache.jmeter.control.GenericController org.apache.jmeter.control.SwitchController
public class SwitchController
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 inherited from class org.apache.jmeter.control.GenericController |
---|
current, subControllersAndSamplers |
Fields inherited from interface org.apache.jmeter.testelement.TestElement |
---|
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS |
Constructor Summary | |
---|---|
SwitchController()
|
Method Summary | |
---|---|
String |
getSelection()
|
protected void |
incrementCurrent()
incrementCurrent is called when the current child (whether sampler or controller) has been processed. |
Sampler |
next()
Determines the next sampler to be processed. |
void |
setSelection(String inputValue)
|
Methods inherited from class org.apache.jmeter.control.GenericController |
---|
addIterationListener, addTestElement, addTestElementOnce, currentReturnedNull, fireIterationStart, fireIterEvents, getCurrentElement, getIterCount, getSubControllers, incrementIterCount, initialize, isDone, isFirst, nextIsAController, nextIsASampler, nextIsNull, reInitialize, reInitializeSubController, removeCurrentElement, removeIterationListener, resetCurrent, resetIterCount, setCurrentElement, setDone, setFirst, triggerEndOfLoop |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.jmeter.testelement.TestElement |
---|
canRemove, clear, clearTestElementChildren, clone, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse |
Constructor Detail |
---|
public SwitchController()
Method Detail |
---|
public Sampler next()
GenericController
Determines the next sampler to be processed.
If isDone, returns null.
Gets the list element using current pointer.
If this is null, calls GenericController.nextIsNull()
.
If the list element is a sampler, calls GenericController.nextIsASampler(Sampler)
,
otherwise calls GenericController.nextIsAController(Controller)
If any of the called methods throws NextIsNullException, returns null, otherwise the value obtained above is returned.
next
in interface Controller
next
in class GenericController
protected void incrementCurrent()
Setting it to int.max marks the controller as having processed all its children. Thus the controller processes one child per iteration.
Increments the current pointer; called by currentReturnedNull to move the controller on to its next child.
incrementCurrent
in class GenericController
public void setSelection(String inputValue)
public String getSelection()
|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |