|
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.threads.AbstractThreadGroup
public abstract class AbstractThreadGroup
ThreadGroup holds the settings for a JMeter thread group. This class is intended to be ThreadSafe.
Field Summary | |
---|---|
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 |
static String |
ON_SAMPLE_ERROR_STOPTEST_NOW
Stop test NOW (all threads) if sampler error occurs |
static String |
ON_SAMPLE_ERROR_STOPTHREAD
Stop current thread if sampler error occurs |
Fields inherited from interface org.apache.jmeter.testelement.TestElement |
---|
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS |
Constructor Summary | |
---|---|
AbstractThreadGroup()
|
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)
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()
|
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 |
Methods inherited from interface org.apache.jmeter.threads.JMeterThreadMonitor |
---|
threadFinished |
Field Detail |
---|
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
Constructor Detail |
---|
public AbstractThreadGroup()
Method Detail |
---|
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
public void addIterationListener(LoopIterationListener lis)
addIterationListener
in interface Controller
public 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()
|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |