Class AbstractSamplerCreator
java.lang.Object
org.apache.jmeter.protocol.http.proxy.AbstractSamplerCreator
- All Implemented Interfaces:
SamplerCreator
- Direct Known Subclasses:
DefaultSamplerCreator
Base class for SamplerCreator
-
Field Summary
Fields -
Constructor Summary
Constructors -
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) Default implementation returns an empty listprotected Stringprotected Stringprotected static intprotected static voidIncrement request numberprotected static intIncrement request numberprotected booleanisBinaryContent(String contentType) protected static booleanvoidpostProcessSampler(HTTPSamplerBase sampler, SampleResult result) Post process sampler Called after samplingvoidsetCounter(int value) Set the counter for this implementation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.jmeter.protocol.http.proxy.SamplerCreator
createSampler, getManagedContentTypes, populateSampler
-
Field Details
-
HTTP
- See Also:
-
HTTPS
- See Also:
-
DEFAULT_ENCODING_KEY
- See Also:
-
-
Constructor Details
-
AbstractSamplerCreator
protected AbstractSamplerCreator()
-
-
Method Details
-
getRequestNumber
protected static int getRequestNumber()- Returns:
- int request number
-
incrementRequestNumber
protected static void incrementRequestNumber()Increment request number -
setCounter
public void setCounter(int value) Description copied from interface:SamplerCreatorSet the counter for this implementation. The counter should be incremented before creating a new sampler by the implementation.- Specified by:
setCounterin interfaceSamplerCreator- Parameters:
value- to be used
-
incrementRequestNumberAndGet
protected static int incrementRequestNumberAndGet()Increment request number- Returns:
- int number for created sampler
-
isNumberRequests
protected static boolean isNumberRequests()- Returns:
- boolean is numbering requests is required
-
isBinaryContent
- Parameters:
contentType- String content type- Returns:
- true if contentType is part of binary declared types
-
getBinaryFileSuffix
- Returns:
- String binary file suffix
-
getBinaryDirectory
- Returns:
- String binary directory
-
postProcessSampler
Description copied from interface:SamplerCreatorPost process sampler Called after sampling- Specified by:
postProcessSamplerin interfaceSamplerCreator- Parameters:
sampler- HTTPSamplerBaseresult- SampleResult- See Also:
-
createAndPopulateSampler
public HTTPSamplerBase createAndPopulateSampler(HttpRequestHdr request, Map<String, String> pageEncodings, Map<String, throws ExceptionString> formEncodings) Description copied from interface:SamplerCreatorDefault implementation calls:- Specified by:
createAndPopulateSamplerin interfaceSamplerCreator- Parameters:
request-HttpRequestHdrpageEncodings- Map of page encodingsformEncodings- Map of form encodings- Returns:
HTTPSamplerBase- Throws:
Exception- when something fails- See Also:
-
createChildren
public List<org.apache.jmeter.testelement.TestElement> createChildren(HTTPSamplerBase sampler, SampleResult result) Default implementation returns an empty list- Specified by:
createChildrenin interfaceSamplerCreator- Parameters:
sampler-HTTPSamplerBaseresult-SampleResult- Returns:
- List
- See Also:
-