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
-
Constructor Summary
-
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 String
protected String
protected static int
protected static void
Increment request numberprotected static int
Increment request numberprotected boolean
isBinaryContent
(String contentType) protected static boolean
void
postProcessSampler
(HTTPSamplerBase sampler, SampleResult result) Post process sampler Called after samplingvoid
setCounter
(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, wait
Methods 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:SamplerCreator
Set the counter for this implementation. The counter should be incremented before creating a new sampler by the implementation.- Specified by:
setCounter
in 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:SamplerCreator
Post process sampler Called after sampling- Specified by:
postProcessSampler
in 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:SamplerCreator
Default implementation calls:- Specified by:
createAndPopulateSampler
in interfaceSamplerCreator
- Parameters:
request
-HttpRequestHdr
pageEncodings
- 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:
createChildren
in interfaceSamplerCreator
- Parameters:
sampler
-HTTPSamplerBase
result
-SampleResult
- Returns:
- List
- See Also:
-