Class ProxyControl
java.lang.Object
org.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.control.GenericController
org.apache.jmeter.protocol.http.proxy.ProxyControl
- All Implemented Interfaces:
- Serializable,- Cloneable,- Controller,- Searchable,- NonTestElement,- org.apache.jmeter.testelement.TestElement,- TestCompilerHelper
Class handles storing of generated samples etc.
- See Also:
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from interface org.apache.jmeter.testelement.TestElementorg.apache.jmeter.testelement.TestElement.Companion
- 
Field SummaryFieldsFields inherited from class org.apache.jmeter.control.GenericControllercurrent, subControllersAndSamplersFields inherited from interface org.apache.jmeter.testelement.TestElementCOMMENTS, Companion, ENABLED, GUI_CLASS, NAME, TEST_CLASS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddConfigElement(ConfigElement config) voidaddExcludedPattern(String pattern) voidaddIncludedPattern(String pattern) booleanvoidvoidvoiddeliverSampler(HTTPSamplerBase sampler, org.apache.jmeter.testelement.TestElement[] testElements, SampleResult result) Receives the recorded sampler from the proxy server for placing in the test tree; this is skipped if the sampler is null (e.g.Finds the controller where samplers have to be stored, that is: The controller specified by thetargetproperty.booleanbooleanString[]intbooleanintintbooleanintgetPort()booleanbooleanbooleanbooleanbooleanstatic booleanvoidsetAssertions(boolean b) voidsetCaptureHttpHeaders(boolean capture) voidsetContentTypeExclude(String contentTypeExclude) voidsetContentTypeInclude(String contentTypeInclude) voidsetDefaultEncoding(String defaultEncoding) voidsetDetectGraphQLRequest(boolean b) voidsetExcludeList(Collection<String> list) voidsetGroupingMode(int grouping) voidvoidsetHTTPSampleNamingMode(int httpNamingMode) voidsetIncludeList(Collection<String> list) voidsetNonGuiTreeModel(JMeterTreeModel treeModel) Set aJMeterTreeModelto be used by the ProxyControl, when used in a non-GUI environment, where theJMeterTreeModelcan't be acquired throughGuiPackage.getTreeModel()voidvoidsetPort(int port) voidvoidsetPrefixHTTPSampleName(String prefixHTTPSampleName) voidsetProxyPauseHTTPSample(String proxyPauseHTTPSample) voidsetRegexMatch(boolean b) voidsetSamplerDownloadImages(boolean b) voidsetSamplerFollowRedirects(boolean b) voidsetSamplerRedirectAutomatically(boolean b) voidsetSamplerTypeName(String samplerTypeName) voidsetSslDomains(String domains) voidsetTarget(JMeterTreeNode target) Sets the target node where samples generated by the proxy are to be stored.voidsetUseKeepAlive(boolean b) voidvoidMethods inherited from class org.apache.jmeter.control.GenericControlleraddIterationListener, addTestElement, addTestElementOnce, currentReturnedNull, fireIterationStart, fireIterEvents, getCurrentElement, getIterCount, getProps, getSchema, getSubControllers, incrementCurrent, incrementIterCount, initialize, initializeSubControllers, isDone, isFirst, next, nextIsAController, nextIsASampler, nextIsNull, readResolve, reInitialize, removeCurrentElement, removeIterationListener, resetCurrent, resetIterCount, setCurrentElement, setDone, setFirst, triggerEndOfLoopMethods inherited from class org.apache.jmeter.testelement.AbstractTestElementaddPropertiesValues, addProperty, addProperty, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traversePropertyMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.jmeter.testelement.TestElementclear, clearTestElementChildren, clone, get, get, get, get, get, get, get, get, get, getComment, getName, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getPropertyOrNull, getString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removed, removeProperty, removeProperty, set, set, set, set, set, set, set, set, set, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
- 
Field Details- 
DEFAULT_PORTpublic static final int DEFAULT_PORT- See Also:
 
- 
DEFAULT_PORT_S
- 
CERT_VALIDITYpublic static final int CERT_VALIDITY
 
- 
- 
Constructor Details- 
ProxyControlpublic ProxyControl()
 
- 
- 
Method Details- 
setNonGuiTreeModelSet aJMeterTreeModelto be used by the ProxyControl, when used in a non-GUI environment, where theJMeterTreeModelcan't be acquired throughGuiPackage.getTreeModel()- Parameters:
- treeModel- the- JMeterTreeModelto be used, or- nullwhen the GUI model should be used
 
- 
setPortpublic void setPort(int port) 
- 
setPort
- 
setSslDomains
- 
getSslDomains
- 
setCaptureHttpHeaderspublic void setCaptureHttpHeaders(boolean capture) 
- 
setGroupingModepublic void setGroupingMode(int grouping) 
- 
setAssertionspublic void setAssertions(boolean b) 
- 
setSamplerTypeName
- 
setSamplerRedirectAutomaticallypublic void setSamplerRedirectAutomatically(boolean b) 
- 
setSamplerFollowRedirectspublic void setSamplerFollowRedirects(boolean b) 
- 
setUseKeepAlivepublic void setUseKeepAlive(boolean b) 
- 
setDetectGraphQLRequestpublic void setDetectGraphQLRequest(boolean b) 
- 
setSamplerDownloadImagespublic void setSamplerDownloadImages(boolean b) 
- 
setHTTPSampleNamingModepublic void setHTTPSampleNamingMode(int httpNamingMode) 
- 
getDefaultEncoding
- 
setDefaultEncoding
- 
setPrefixHTTPSampleName
- 
setProxyPauseHTTPSample
- 
setNotifyChildSamplerListenerOfFilteredSamplerspublic void setNotifyChildSamplerListenerOfFilteredSamplers(boolean b) 
- 
setIncludeList
- 
setExcludeList
- 
setRegexMatchpublic void setRegexMatch(boolean b) 
- 
setContentTypeExclude
- 
setContentTypeInclude
- 
getAssertionspublic boolean getAssertions()
- 
getGroupingModepublic int getGroupingMode()
- 
getPortpublic int getPort()
- 
getPortString
- 
getDefaultPortpublic int getDefaultPort()
- 
getCaptureHttpHeaderspublic boolean getCaptureHttpHeaders()
- 
getSamplerTypeName
- 
getSamplerRedirectAutomaticallypublic boolean getSamplerRedirectAutomatically()
- 
getSamplerFollowRedirectspublic boolean getSamplerFollowRedirects()
- 
getUseKeepalivepublic boolean getUseKeepalive()
- 
getDetectGraphQLRequestpublic boolean getDetectGraphQLRequest()
- 
getSamplerDownloadImagespublic boolean getSamplerDownloadImages()
- 
getHTTPSampleNamingModepublic int getHTTPSampleNamingMode()
- 
getPrefixHTTPSampleName
- 
getProxyPauseHTTPSample
- 
getNotifyChildSamplerListenerOfFilteredSamplerspublic boolean getNotifyChildSamplerListenerOfFilteredSamplers()
- 
getRegexMatchpublic boolean getRegexMatch()
- 
getContentTypeExclude
- 
getContentTypeInclude
- 
setHttpSampleNameFormat
- 
getHttpSampleNameFormat
- 
getNonGuiTreeModel- Returns:
- the JMeterTreeModelused when run in non-GUI mode, ornullwhen run in GUI mode
 
- 
addConfigElement
- 
startProxy- Throws:
- IOException
 
- 
addExcludedPattern
- 
getExcludePatterns
- 
addIncludedPattern
- 
getIncludePatterns
- 
clearExcludedPatternspublic void clearExcludedPatterns()
- 
clearIncludedPatternspublic void clearIncludedPatterns()
- 
getTarget- Returns:
- the target controller node
 
- 
setTargetSets the target node where samples generated by the proxy are to be stored.- Parameters:
- target- target node to store generated samples
 
- 
deliverSamplerpublic void deliverSampler(HTTPSamplerBase sampler, org.apache.jmeter.testelement.TestElement[] testElements, SampleResult result) Receives the recorded sampler from the proxy server for placing in the test tree; this is skipped if the sampler is null (e.g. for recording SSL errors) Always sends the result to any registered sample listeners.- Parameters:
- sampler- the sampler, may be null
- testElements- the test elements to be added (e.g. header manager) under the Sampler
- result- the sample result, not null TODO param serverResponse to be added to allow saving of the server's response while recording.
 
- 
stopProxypublic void stopProxy()
- 
getCertificateDetails
- 
findTargetControllerNodeFinds the controller where samplers have to be stored, that is:- The controller specified by the targetproperty.
- If none was specified, the first RecordingController in the tree.
- If none is found, the first AbstractThreadGroup in the tree.
 - Returns:
- the tree node for the controller where the proxy must store the generated samplers.
 
- The controller specified by the 
- 
canRemovepublic boolean canRemove()Description copied from class:AbstractTestElement- Specified by:
- canRemovein interface- org.apache.jmeter.testelement.TestElement
- Overrides:
- canRemovein class- AbstractTestElement
 
- 
isDynamicModepublic static boolean isDynamicMode()
 
-