Package org.apache.jmeter.threads
Class SamplePackage
- java.lang.Object
-
- org.apache.jmeter.threads.SamplePackage
-
public class SamplePackage extends Object
Packages methods related to sample handling.
A SamplePackage contains all elements associated to a Sampler:- SampleListener(s)
- Timer(s)
- Assertion(s)
- PreProcessor(s)
- PostProcessor(s)
- ConfigTestElement(s)
- Controller(s)
-
-
Constructor Summary
Constructors Constructor Description SamplePackage(List<ConfigTestElement> configs, List<SampleListener> listeners, List<Timer> timers, List<Assertion> assertions, List<PostProcessor> postProcessors, List<PreProcessor> preProcessors, List<Controller> controllers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAssertion(Assertion asser)Add AssertionvoidaddPostProcessor(PostProcessor ex)Add Post processorvoidaddPreProcessor(PreProcessor pre)Add Pre processorvoidaddSampleListener(SampleListener listener)Add Sample ListenervoidaddTimer(Timer timer)Add TimerList<Assertion>getAssertions()List<ConfigTestElement>getConfigs()Returns the configs.List<PostProcessor>getPostProcessors()List<PreProcessor>getPreProcessors()Returns the preProcessors.List<SampleListener>getSampleListeners()SamplergetSampler()List<Timer>getTimers()voidrecoverRunningVersion()Recover each member of SamplePackage to the state before the call of setRunningVersion(true)voidsetRunningVersion(boolean running)Make the SamplePackage the running version, or make it no longer the running version.voidsetSampler(Sampler s)
-
-
-
Constructor Detail
-
SamplePackage
public SamplePackage(List<ConfigTestElement> configs, List<SampleListener> listeners, List<Timer> timers, List<Assertion> assertions, List<PostProcessor> postProcessors, List<PreProcessor> preProcessors, List<Controller> controllers)
-
-
Method Detail
-
setRunningVersion
public void setRunningVersion(boolean running)
Make the SamplePackage the running version, or make it no longer the running version. This tells to each element of the SamplePackage that it's current state must be retrievable by a call to recoverRunningVersion().- Parameters:
running- boolean- See Also:
TestElement.setRunningVersion(boolean)
-
recoverRunningVersion
public void recoverRunningVersion()
Recover each member of SamplePackage to the state before the call of setRunningVersion(true)- See Also:
TestElement.recoverRunningVersion()
-
getSampleListeners
public List<SampleListener> getSampleListeners()
- Returns:
- List of
SampleListeners
-
addSampleListener
public void addSampleListener(SampleListener listener)
Add Sample Listener- Parameters:
listener-SampleListener
-
addPostProcessor
public void addPostProcessor(PostProcessor ex)
Add Post processor- Parameters:
ex-PostProcessor
-
addPreProcessor
public void addPreProcessor(PreProcessor pre)
Add Pre processor- Parameters:
pre-PreProcessor
-
getPostProcessors
public List<PostProcessor> getPostProcessors()
- Returns:
- List of
PostProcessors
-
getPreProcessors
public List<PreProcessor> getPreProcessors()
Returns the preProcessors.- Returns:
- List of
PreProcessor
-
getConfigs
public List<ConfigTestElement> getConfigs()
Returns the configs.- Returns:
- List of
ConfigTestElement
-
-