Interface SamplerCreator
- All Known Implementing Classes:
AbstractSamplerCreator
,DefaultSamplerCreator
public interface SamplerCreator
Factory of sampler
-
Method Summary
Modifier and TypeMethodDescriptioncreateAndPopulateSampler
(HttpRequestHdr request, Map<String, String> pageEncodings, Map<String, String> formEncodings) List<org.apache.jmeter.testelement.TestElement>
createChildren
(HTTPSamplerBase sampler, SampleResult result) Create sampler children.createSampler
(HttpRequestHdr request, Map<String, String> pageEncodings, Map<String, String> formEncodings) Create HTTPSamplerBaseString[]
void
populateSampler
(HTTPSamplerBase sampler, HttpRequestHdr request, Map<String, String> pageEncodings, Map<String, String> formEncodings) Populate sampler from requestvoid
postProcessSampler
(HTTPSamplerBase sampler, SampleResult result) Post process sampler Called after samplingdefault void
setCounter
(int value) Set the counter for this implementation.
-
Method Details
-
getManagedContentTypes
String[] getManagedContentTypes()- Returns:
- String[] array of Content types managed by Factory
-
createSampler
HTTPSamplerBase createSampler(HttpRequestHdr request, Map<String, String> pageEncodings, Map<String, String> formEncodings) Create HTTPSamplerBase- Parameters:
request
-HttpRequestHdr
pageEncodings
- Map of page encodingsformEncodings
- Map of form encodings- Returns:
HTTPSamplerBase
-
populateSampler
void populateSampler(HTTPSamplerBase sampler, HttpRequestHdr request, Map<String, String> pageEncodings, Map<String, throws ExceptionString> formEncodings) Populate sampler from request- Parameters:
sampler
-HTTPSamplerBase
request
-HttpRequestHdr
pageEncodings
- Map of page encodingsformEncodings
- Map of form encodings- Throws:
Exception
- when something fails
-
postProcessSampler
Post process sampler Called after sampling- Parameters:
sampler
- HTTPSamplerBaseresult
- SampleResult- Since:
- 2.9
-
createAndPopulateSampler
HTTPSamplerBase createAndPopulateSampler(HttpRequestHdr request, Map<String, String> pageEncodings, Map<String, throws ExceptionString> formEncodings) Default implementation calls:- Parameters:
request
-HttpRequestHdr
pageEncodings
- Map of page encodingsformEncodings
- Map of form encodings- Returns:
HTTPSamplerBase
- Throws:
Exception
- when something fails- Since:
- 2.9
-
createChildren
List<org.apache.jmeter.testelement.TestElement> createChildren(HTTPSamplerBase sampler, SampleResult result) Create sampler children. This method can be used to add PostProcessor or ResponseAssertions by implementations ofSamplerCreator
. Return empty list if nothing to create- Parameters:
sampler
-HTTPSamplerBase
result
-SampleResult
- Returns:
- List
-
setCounter
default void setCounter(int value) Set the counter for this implementation. The counter should be incremented before creating a new sampler by the implementation.- Parameters:
value
- to be used
-