genericcontroller.html
来自「测试工具jmeter可用来进行性能测试」· HTML 代码 · 共 978 行 · 第 1/4 页
HTML
978 行
<DD>Called to initialize a controller at the beginning of a test iteration.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/jmeter/control/Controller.html#initialize()">initialize</A></CODE> in interface <CODE><A HREF="../../../../org/apache/jmeter/control/Controller.html" title="interface in org.apache.jmeter.control">Controller</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="reInitialize()"><!-- --></A><H3>
reInitialize</H3>
<PRE>
protected void <B>reInitialize</B>()</PRE>
<DL>
<DD>Resets the controller:
<ul>
<li>resetCurrent() (i.e. current=0)</li>
<li>increment iteration count</li>
<li>sets first=true</li>
<li>recoverRunningVersion() to set the controller back to the initial state</li>
</ul>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="next()"><!-- --></A><H3>
next</H3>
<PRE>
public <A HREF="../../../../org/apache/jmeter/samplers/Sampler.html" title="interface in org.apache.jmeter.samplers">Sampler</A> <B>next</B>()</PRE>
<DL>
<DD><p>
Determines the next sampler to be processed.
</p>
<p>
If isDone, returns null.
</p>
<p>
Gets the list element using current pointer.
If this is null, calls <A HREF="../../../../org/apache/jmeter/control/GenericController.html#nextIsNull()"><CODE>nextIsNull()</CODE></A>.
</p>
<p>
If the list element is a sampler, calls <A HREF="../../../../org/apache/jmeter/control/GenericController.html#nextIsASampler(org.apache.jmeter.samplers.Sampler)"><CODE>nextIsASampler(Sampler)</CODE></A>,
otherwise calls <A HREF="../../../../org/apache/jmeter/control/GenericController.html#nextIsAController(org.apache.jmeter.control.Controller)"><CODE>nextIsAController(Controller)</CODE></A>
</p>
<p>
If any of the called methods throws NextIsNullException, returns null,
otherwise the value obtained above is returned.
</p>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/jmeter/control/Controller.html#next()">next</A></CODE> in interface <CODE><A HREF="../../../../org/apache/jmeter/control/Controller.html" title="interface in org.apache.jmeter.control">Controller</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the next sampler or null</DL>
</DD>
</DL>
<HR>
<A NAME="isDone()"><!-- --></A><H3>
isDone</H3>
<PRE>
public boolean <B>isDone</B>()</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/jmeter/control/Controller.html" title="interface in org.apache.jmeter.control">Controller</A></CODE></B></DD>
<DD>Indicates whether the Controller is done delivering Samplers for the rest
of the test.
When the top-level controller returns true to JMeterThread,
the thread is complete.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/jmeter/control/Controller.html#isDone()">isDone</A></CODE> in interface <CODE><A HREF="../../../../org/apache/jmeter/control/Controller.html" title="interface in org.apache.jmeter.control">Controller</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>boolean<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/jmeter/control/Controller.html#isDone()"><CODE>Controller.isDone()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setDone(boolean)"><!-- --></A><H3>
setDone</H3>
<PRE>
protected void <B>setDone</B>(boolean done)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="isFirst()"><!-- --></A><H3>
isFirst</H3>
<PRE>
protected boolean <B>isFirst</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setFirst(boolean)"><!-- --></A><H3>
setFirst</H3>
<PRE>
public void <B>setFirst</B>(boolean b)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="nextIsAController(org.apache.jmeter.control.Controller)"><!-- --></A><H3>
nextIsAController</H3>
<PRE>
protected <A HREF="../../../../org/apache/jmeter/samplers/Sampler.html" title="interface in org.apache.jmeter.samplers">Sampler</A> <B>nextIsAController</B>(<A HREF="../../../../org/apache/jmeter/control/Controller.html" title="interface in org.apache.jmeter.control">Controller</A> controller)
throws <A HREF="../../../../org/apache/jmeter/control/NextIsNullException.html" title="class in org.apache.jmeter.control">NextIsNullException</A></PRE>
<DL>
<DD>Called by next() if the element is a Controller,
and returns the next sampler from the controller.
If this is null, then updates the current pointer and makes recursive call to next().
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>controller</CODE> -
<DT><B>Returns:</B><DD>the next sampler
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/jmeter/control/NextIsNullException.html" title="class in org.apache.jmeter.control">NextIsNullException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="nextIsASampler(org.apache.jmeter.samplers.Sampler)"><!-- --></A><H3>
nextIsASampler</H3>
<PRE>
protected <A HREF="../../../../org/apache/jmeter/samplers/Sampler.html" title="interface in org.apache.jmeter.samplers">Sampler</A> <B>nextIsASampler</B>(<A HREF="../../../../org/apache/jmeter/samplers/Sampler.html" title="interface in org.apache.jmeter.samplers">Sampler</A> element)
throws <A HREF="../../../../org/apache/jmeter/control/NextIsNullException.html" title="class in org.apache.jmeter.control">NextIsNullException</A></PRE>
<DL>
<DD>Increment the current pointer and return the element.
Called by next() if the element is a sampler.
(May be overriden by sub-classes).
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>element</CODE> -
<DT><B>Returns:</B><DD>input element
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/jmeter/control/NextIsNullException.html" title="class in org.apache.jmeter.control">NextIsNullException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="nextIsNull()"><!-- --></A><H3>
nextIsNull</H3>
<PRE>
protected <A HREF="../../../../org/apache/jmeter/samplers/Sampler.html" title="interface in org.apache.jmeter.samplers">Sampler</A> <B>nextIsNull</B>()
throws <A HREF="../../../../org/apache/jmeter/control/NextIsNullException.html" title="class in org.apache.jmeter.control">NextIsNullException</A></PRE>
<DL>
<DD>Called by next() when getCurrentElement() returns null.
Reinitialises the controller.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>null (always, for this class)
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/jmeter/control/NextIsNullException.html" title="class in org.apache.jmeter.control">NextIsNullException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="currentReturnedNull(org.apache.jmeter.control.Controller)"><!-- --></A><H3>
currentReturnedNull</H3>
<PRE>
protected void <B>currentReturnedNull</B>(<A HREF="../../../../org/apache/jmeter/control/Controller.html" title="interface in org.apache.jmeter.control">Controller</A> c)</PRE>
<DL>
<DD>If the controller is done, remove it from the list,
otherwise increment to next entry in list.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>c</CODE> - controller</DL>
</DD>
</DL>
<HR>
<A NAME="getSubControllers()"><!-- --></A><H3>
getSubControllers</H3>
<PRE>
protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/List.html" title="class or interface in java.util">List</A> <B>getSubControllers</B>()</PRE>
<DL>
<DD>Gets the SubControllers attribute of the GenericController object
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the SubControllers value</DL>
</DD>
</DL>
<HR>
<A NAME="setCurrentElement(org.apache.jmeter.testelement.TestElement)"><!-- --></A><H3>
setCurrentElement</H3>
<PRE>
protected void <B>setCurrentElement</B>(<A HREF="../../../../org/apache/jmeter/testelement/TestElement.html" title="interface in org.apache.jmeter.testelement">TestElement</A> currentElement)
throws <A HREF="../../../../org/apache/jmeter/control/NextIsNullException.html" title="class in org.apache.jmeter.control">NextIsNullException</A></PRE>
<DL>
<DD>Empty implementation - does nothing.
<P>
<DD><DL>
</DL>
</DD>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?