Class AbstractSamplerCreator
- java.lang.Object
-
- org.apache.jmeter.protocol.http.proxy.AbstractSamplerCreator
-
- All Implemented Interfaces:
SamplerCreator
- Direct Known Subclasses:
DefaultSamplerCreator
public abstract class AbstractSamplerCreator extends Object implements SamplerCreator
Base class for SamplerCreator
-
-
Constructor Summary
Constructors Constructor Description AbstractSamplerCreator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description HTTPSamplerBasecreateAndPopulateSampler(HttpRequestHdr request, Map<String,String> pageEncodings, Map<String,String> formEncodings)List<TestElement>createChildren(HTTPSamplerBase sampler, SampleResult result)Default implementation returns an empty listprotected StringgetBinaryDirectory()protected StringgetBinaryFileSuffix()protected static intgetRequestNumber()protected static voidincrementRequestNumber()Increment request numberprotected booleanisBinaryContent(String contentType)protected static booleanisNumberRequests()voidpostProcessSampler(HTTPSamplerBase sampler, SampleResult result)Post process sampler Called after sampling-
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 Detail
-
HTTP
protected static final String HTTP
- See Also:
- Constant Field Values
-
HTTPS
protected static final String HTTPS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getRequestNumber
protected static int getRequestNumber()
- Returns:
- int request number
-
incrementRequestNumber
protected static void incrementRequestNumber()
Increment request number
-
isNumberRequests
protected static boolean isNumberRequests()
- Returns:
- boolean is numbering requests is required
-
isBinaryContent
protected boolean isBinaryContent(String contentType)
- Parameters:
contentType- String content type- Returns:
- true if contentType is part of binary declared types
-
getBinaryFileSuffix
protected String getBinaryFileSuffix()
- Returns:
- String binary file suffix
-
getBinaryDirectory
protected String getBinaryDirectory()
- Returns:
- String binary directory
-
postProcessSampler
public void postProcessSampler(HTTPSamplerBase sampler, SampleResult result)
Description copied from interface:SamplerCreatorPost process sampler Called after sampling- Specified by:
postProcessSamplerin interfaceSamplerCreator- Parameters:
sampler- HTTPSamplerBaseresult- SampleResult- See Also:
SamplerCreator.postProcessSampler(org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase, org.apache.jmeter.samplers.SampleResult)
-
createAndPopulateSampler
public HTTPSamplerBase createAndPopulateSampler(HttpRequestHdr request, Map<String,String> pageEncodings, Map<String,String> formEncodings) throws Exception
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:
SamplerCreator.createAndPopulateSampler(org.apache.jmeter.protocol.http.proxy.HttpRequestHdr, java.util.Map, java.util.Map)
-
createChildren
public List<TestElement> createChildren(HTTPSamplerBase sampler, SampleResult result)
Default implementation returns an empty list- Specified by:
createChildrenin interfaceSamplerCreator- Parameters:
sampler-HTTPSamplerBaseresult-SampleResult- Returns:
- List
- See Also:
SamplerCreator.createChildren(HTTPSamplerBase, SampleResult)
-
-