public abstract class AbstractThreadGroup extends AbstractTestElement implements Serializable, Controller, JMeterThreadMonitor, TestCompilerHelper
Modifier and Type | Field and Description |
---|---|
static String |
MAIN_CONTROLLER |
static String |
NUM_THREADS
Number of threads in the thread group
|
static String |
ON_SAMPLE_ERROR
Action to be taken when a Sampler error occurs
|
static String |
ON_SAMPLE_ERROR_CONTINUE
Continue, i.e. ignore sampler errors
|
static String |
ON_SAMPLE_ERROR_START_NEXT_LOOP
Start next loop for current thread if sampler error occurs
|
static String |
ON_SAMPLE_ERROR_STOPTEST
Stop test (all threads) if sampler error occurs, the entire test is stopped at the end of any current samples
|
static String |
ON_SAMPLE_ERROR_STOPTEST_NOW
Stop test NOW (all threads) if sampler error occurs, the entire test is stopped abruptly.
|
static String |
ON_SAMPLE_ERROR_STOPTHREAD
Stop current thread if sampler error occurs
|
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS
Constructor and Description |
---|
AbstractThreadGroup() |
Modifier and Type | Method and Description |
---|---|
void |
addIterationListener(LoopIterationListener lis)
Controllers have to notify listeners of when they begin an iteration
through their sub-elements.
|
void |
addTestElement(TestElement child)
Add a test element.
|
boolean |
addTestElementOnce(TestElement child)
Add child test element only if it has not already been added.
|
int |
getNumberOfThreads()
Get the number of active threads
|
int |
getNumThreads()
Get the number of threads.
|
boolean |
getOnErrorStartNextLoop()
Check if a sampler error should cause thread to start next loop.
|
boolean |
getOnErrorStopTest()
Check if a sampler error should cause test to stop.
|
boolean |
getOnErrorStopTestNow()
Check if a sampler error should cause test to stop now.
|
boolean |
getOnErrorStopThread()
Check if a sampler error should cause thread to stop.
|
Controller |
getSamplerController()
Get the sampler controller.
|
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.
|
Sampler |
next()
Delivers the next Sampler or null
|
abstract int |
numberOfActiveThreads() |
void |
removeIterationListener(LoopIterationListener iterationListener)
Unregister IterationListener
|
void |
setNumThreads(int numThreads)
Set the total number of threads to start
|
void |
setSamplerController(LoopController c)
Set the sampler controller.
|
abstract void |
start(int groupCount,
ListenerNotifier notifier,
ListedHashTree threadGroupTree,
StandardJMeterEngine engine) |
void |
startNextLoop()
Start next iteration after an error
|
abstract void |
stop() |
abstract boolean |
stopThread(String threadName,
boolean now) |
abstract void |
tellThreadsToStop() |
void |
triggerEndOfLoop()
NOOP
|
abstract boolean |
verifyThreadsStopped() |
abstract void |
waitThreadsStopped() |
addPropertiesValues, 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, traverseProperty
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
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, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
threadFinished
public static final String ON_SAMPLE_ERROR
public static final String ON_SAMPLE_ERROR_CONTINUE
public static final String ON_SAMPLE_ERROR_START_NEXT_LOOP
public static final String ON_SAMPLE_ERROR_STOPTHREAD
public static final String ON_SAMPLE_ERROR_STOPTEST
public static final String ON_SAMPLE_ERROR_STOPTEST_NOW
public static final String NUM_THREADS
public static final String MAIN_CONTROLLER
public boolean isDone()
isDone
in interface Controller
public Sampler next()
next
in interface Controller
public Controller getSamplerController()
public void setSamplerController(LoopController c)
c
- the sampler controller.public void addTestElement(TestElement child)
addTestElement
in interface TestElement
addTestElement
in class AbstractTestElement
child
- the test element to add.public final boolean addTestElementOnce(TestElement child)
Only for use by TestCompiler.
addTestElementOnce
in interface TestCompilerHelper
child
- the TestElement
to be addedtrue
if the child was addedpublic void addIterationListener(LoopIterationListener lis)
addIterationListener
in interface Controller
lis
- The LoopIterationListener
to addpublic void removeIterationListener(LoopIterationListener iterationListener)
removeIterationListener
in interface Controller
iterationListener
- LoopIterationListener
public void initialize()
initialize
in interface Controller
public void startNextLoop()
public void triggerEndOfLoop()
triggerEndOfLoop
in interface Controller
public void setNumThreads(int numThreads)
numThreads
- the number of threads.public int getNumberOfThreads()
public int getNumThreads()
public boolean getOnErrorStartNextLoop()
public boolean getOnErrorStopThread()
public boolean getOnErrorStopTest()
public boolean getOnErrorStopTestNow()
public abstract boolean stopThread(String threadName, boolean now)
public abstract int numberOfActiveThreads()
public abstract void start(int groupCount, ListenerNotifier notifier, ListedHashTree threadGroupTree, StandardJMeterEngine engine)
public abstract boolean verifyThreadsStopped()
public abstract void waitThreadsStopped()
public abstract void tellThreadsToStop()
public abstract void stop()
Copyright © 1998-2016 Apache Software Foundation. All Rights Reserved.