Apache JMeter
2.0.1.20050615

org.apache.jmeter.control
Class GenericController

java.lang.Object
  extended byorg.apache.jmeter.testelement.AbstractTestElement
      extended byorg.apache.jmeter.control.GenericController
All Implemented Interfaces:
Cloneable, Controller, Serializable, TestElement
Direct Known Subclasses:
ForeachController, IfController, InterleaveControl, LoopController, ModuleController, OnceOnlyController, ProxyControl, RandomOrderController, RecordingController, RunTime, ThroughputController, TransactionController, WhileController

public class GenericController
extends AbstractTestElement
implements Controller, Serializable

Version:
$Revision: 1.23.2.1 $
Author:
Michael Stover, Thad Smith
See Also:
Serialized Form

Nested Class Summary
static class GenericController.Test
           
 
Field Summary
protected  int current
           
protected  LinkedList iterationListeners
           
protected  List subControllersAndSamplers
           
 
Fields inherited from interface org.apache.jmeter.testelement.TestElement
ENABLED, GUI_CLASS, NAME, TEST_CLASS
 
Constructor Summary
GenericController()
          Creates a Generic Controller
 
Method Summary
 void addIterationListener(LoopIterationListener lis)
          Controllers have to notify listeners of when they begin an iteration through their sub-elements.
 void addTestElement(TestElement child)
           
protected  void currentReturnedNull(Controller c)
           
protected  void fireIterationStart()
           
protected  void fireIterEvents()
           
protected  TestElement getCurrentElement()
           
protected  int getIterCount()
           
protected  List getSubControllers()
          Gets the SubControllers attribute of the GenericController object
protected  void incrementCurrent()
           
protected  void incrementIterCount()
           
 void initialize()
          Called to initialize a controller at the beginning of a test iteration.
 boolean isDone()
          Indicates whether the Controller is done delivering Samplers for the rest of the test.
protected  boolean isFirst()
           
 Sampler next()
          Delivers the next Sampler.
protected  Sampler nextIsAController(Controller controller)
           
protected  Sampler nextIsASampler(Sampler element)
           
protected  Sampler nextIsNull()
           
protected  void reInitialize()
           
protected  void removeCurrentElement()
           
protected  void resetCurrent()
           
protected  void resetIterCount()
           
protected  void setCurrentElement(TestElement currentElement)
           
protected  void setDone(boolean done)
           
 void setFirst(boolean b)
           
 
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addProperty, canRemove, clear, clearTemporary, clone, emptyTemporary, equals, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getThreadContext, getThreadName, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setName, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, threadFinished, threadStarted, traverse, traverseCollection, traverseMap, traverseProperty
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.jmeter.testelement.TestElement
canRemove, clear, clone, getProperty, getPropertyAsBoolean, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getThreadContext, getThreadName, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, threadFinished, threadStarted, traverse
 

Field Detail

iterationListeners

protected LinkedList iterationListeners

subControllersAndSamplers

protected List subControllersAndSamplers

current

protected int current
Constructor Detail

GenericController

public GenericController()
Creates a Generic Controller

Method Detail

initialize

public void initialize()
Description copied from interface: Controller
Called to initialize a controller at the beginning of a test iteration.

Specified by:
initialize in interface Controller

reInitialize

protected void reInitialize()

next

public Sampler next()
Description copied from interface: Controller
Delivers the next Sampler.

Specified by:
next in interface Controller
Returns:
org.apache.jmeter.samplers.Sampler
See Also:
Controller.next()

isDone

public boolean isDone()
Description copied from interface: Controller
Indicates whether the Controller is done delivering Samplers for the rest of the test.

Specified by:
isDone in interface Controller
Returns:
boolean
See Also:
Controller.isDone()

setDone

protected void setDone(boolean done)

isFirst

protected boolean isFirst()

setFirst

public void setFirst(boolean b)

nextIsAController

protected Sampler nextIsAController(Controller controller)
                             throws NextIsNullException
Throws:
NextIsNullException

nextIsASampler

protected Sampler nextIsASampler(Sampler element)
                          throws NextIsNullException
Throws:
NextIsNullException

nextIsNull

protected Sampler nextIsNull()
                      throws NextIsNullException
Overrides:
nextIsNull in class AbstractTestElement
Throws:
NextIsNullException

currentReturnedNull

protected void currentReturnedNull(Controller c)

getSubControllers

protected List getSubControllers()
Gets the SubControllers attribute of the GenericController object

Returns:
the SubControllers value

setCurrentElement

protected void setCurrentElement(TestElement currentElement)
                          throws NextIsNullException
Throws:
NextIsNullException

getCurrentElement

protected TestElement getCurrentElement()
                                 throws NextIsNullException
Throws:
NextIsNullException

removeCurrentElement

protected void removeCurrentElement()

incrementCurrent

protected void incrementCurrent()

resetCurrent

protected void resetCurrent()

addTestElement

public void addTestElement(TestElement child)
Specified by:
addTestElement in interface TestElement
Overrides:
addTestElement in class AbstractTestElement

addIterationListener

public void addIterationListener(LoopIterationListener lis)
Description copied from interface: Controller
Controllers have to notify listeners of when they begin an iteration through their sub-elements.

Specified by:
addIterationListener in interface Controller

fireIterEvents

protected void fireIterEvents()

fireIterationStart

protected void fireIterationStart()

getIterCount

protected int getIterCount()

incrementIterCount

protected void incrementIterCount()

resetIterCount

protected void resetIterCount()

Apache JMeter
2.0.1.20050615

Copyright © 1998-2005 Apache Software Foundation. All Rights Reserved.