public class ProxyControl extends GenericController implements NonTestElement
Modifier and Type | Class and Description |
---|---|
static class |
ProxyControl.KeystoreMode |
Modifier and Type | Field and Description |
---|---|
static int |
CERT_VALIDITY |
static int |
DEFAULT_PORT |
static java.lang.String |
DEFAULT_PORT_S |
current, subControllersAndSamplers
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS
Constructor and Description |
---|
ProxyControl() |
Modifier and Type | Method and Description |
---|---|
void |
addConfigElement(ConfigElement config) |
void |
addExcludedPattern(java.lang.String pattern) |
void |
addIncludedPattern(java.lang.String pattern) |
boolean |
canRemove()
Called by Remove to determine if it is safe to remove the element.
|
void |
clearExcludedPatterns() |
void |
clearIncludedPatterns() |
void |
deliverSampler(HTTPSamplerBase sampler,
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.
|
JMeterTreeNode |
findTargetControllerNode()
Finds the controller where samplers have to be stored, that is:
The controller specified by the
target property. |
boolean |
getAssertions() |
boolean |
getCaptureHttpHeaders() |
java.lang.String[] |
getCertificateDetails() |
java.lang.String |
getContentTypeExclude() |
java.lang.String |
getContentTypeInclude() |
int |
getDefaultPort() |
CollectionProperty |
getExcludePatterns() |
int |
getGroupingMode() |
int |
getHTTPSampleNamingMode() |
CollectionProperty |
getIncludePatterns() |
JMeterTreeModel |
getNonGuiTreeModel() |
boolean |
getNotifyChildSamplerListenerOfFilteredSamplers() |
int |
getPort() |
java.lang.String |
getPortString() |
java.lang.String |
getPrefixHTTPSampleName() |
java.lang.String |
getProxyPauseHTTPSample() |
boolean |
getRegexMatch() |
boolean |
getSamplerDownloadImages() |
boolean |
getSamplerFollowRedirects() |
boolean |
getSamplerRedirectAutomatically() |
java.lang.String |
getSamplerTypeName() |
java.lang.String |
getSslDomains() |
JMeterTreeNode |
getTarget() |
boolean |
getUseKeepalive() |
static boolean |
isDynamicMode() |
void |
setAssertions(boolean b) |
void |
setCaptureHttpHeaders(boolean capture) |
void |
setContentTypeExclude(java.lang.String contentTypeExclude) |
void |
setContentTypeInclude(java.lang.String contentTypeInclude) |
void |
setExcludeList(java.util.Collection<java.lang.String> list) |
void |
setGroupingMode(int grouping) |
void |
setHTTPSampleNamingMode(int httpNamingMode) |
void |
setIncludeList(java.util.Collection<java.lang.String> list) |
void |
setNonGuiTreeModel(JMeterTreeModel treeModel)
Set a
JMeterTreeModel to be used by the ProxyControl, when used
in a non-GUI environment, where the JMeterTreeModel can't be
acquired through GuiPackage.getTreeModel() |
void |
setNotifyChildSamplerListenerOfFilteredSamplers(boolean b) |
void |
setPort(int port) |
void |
setPort(java.lang.String port) |
void |
setPrefixHTTPSampleName(java.lang.String prefixHTTPSampleName) |
void |
setProxyPauseHTTPSample(java.lang.String proxyPauseHTTPSample) |
void |
setRegexMatch(boolean b) |
void |
setSamplerDownloadImages(boolean b) |
void |
setSamplerFollowRedirects(boolean b) |
void |
setSamplerRedirectAutomatically(boolean b) |
void |
setSamplerTypeName(java.lang.String samplerTypeName) |
void |
setSslDomains(java.lang.String domains) |
void |
setTarget(JMeterTreeNode target)
Sets the target node where the samples generated by the proxy have to be
stored.
|
void |
setUseKeepAlive(boolean b) |
void |
startProxy() |
void |
stopProxy() |
addIterationListener, addTestElement, addTestElementOnce, currentReturnedNull, fireIterationStart, fireIterEvents, getCurrentElement, getIterCount, getSubControllers, incrementCurrent, incrementIterCount, initialize, initializeSubControllers, isDone, isFirst, next, nextIsAController, nextIsASampler, nextIsNull, readResolve, reInitialize, removeCurrentElement, removeIterationListener, resetCurrent, resetIterCount, setCurrentElement, setDone, setFirst, triggerEndOfLoop
addPropertiesValues, addProperty, addProperty, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, 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, traverseProperty
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
clear, clearTestElementChildren, clone, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removed, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
public static final int DEFAULT_PORT
public static final java.lang.String DEFAULT_PORT_S
public static final int CERT_VALIDITY
public void setNonGuiTreeModel(JMeterTreeModel treeModel)
JMeterTreeModel
to be used by the ProxyControl, when used
in a non-GUI environment, where the JMeterTreeModel
can't be
acquired through GuiPackage.getTreeModel()
treeModel
- the JMeterTreeModel
to be used, or null
when
the GUI model should be usedpublic void setPort(int port)
public void setPort(java.lang.String port)
public void setSslDomains(java.lang.String domains)
public java.lang.String getSslDomains()
public void setCaptureHttpHeaders(boolean capture)
public void setGroupingMode(int grouping)
public void setAssertions(boolean b)
public void setSamplerTypeName(java.lang.String samplerTypeName)
public void setSamplerRedirectAutomatically(boolean b)
public void setSamplerFollowRedirects(boolean b)
public void setUseKeepAlive(boolean b)
b
- flag whether keep alive should be usedpublic void setSamplerDownloadImages(boolean b)
public void setHTTPSampleNamingMode(int httpNamingMode)
public void setPrefixHTTPSampleName(java.lang.String prefixHTTPSampleName)
public void setProxyPauseHTTPSample(java.lang.String proxyPauseHTTPSample)
public void setNotifyChildSamplerListenerOfFilteredSamplers(boolean b)
public void setIncludeList(java.util.Collection<java.lang.String> list)
public void setExcludeList(java.util.Collection<java.lang.String> list)
public void setRegexMatch(boolean b)
b
- flag whether regex matching should be usedpublic void setContentTypeExclude(java.lang.String contentTypeExclude)
public void setContentTypeInclude(java.lang.String contentTypeInclude)
public boolean getAssertions()
public int getGroupingMode()
public int getPort()
public java.lang.String getPortString()
public int getDefaultPort()
public boolean getCaptureHttpHeaders()
public java.lang.String getSamplerTypeName()
public boolean getSamplerRedirectAutomatically()
public boolean getSamplerFollowRedirects()
public boolean getUseKeepalive()
public boolean getSamplerDownloadImages()
public int getHTTPSampleNamingMode()
public java.lang.String getPrefixHTTPSampleName()
public java.lang.String getProxyPauseHTTPSample()
public boolean getNotifyChildSamplerListenerOfFilteredSamplers()
public boolean getRegexMatch()
public java.lang.String getContentTypeExclude()
public java.lang.String getContentTypeInclude()
public JMeterTreeModel getNonGuiTreeModel()
JMeterTreeModel
used when run in non-GUI mode, or null
when run in GUI modepublic void addConfigElement(ConfigElement config)
public void startProxy() throws java.io.IOException
java.io.IOException
public void addExcludedPattern(java.lang.String pattern)
public CollectionProperty getExcludePatterns()
public void addIncludedPattern(java.lang.String pattern)
public CollectionProperty getIncludePatterns()
public void clearExcludedPatterns()
public void clearIncludedPatterns()
public JMeterTreeNode getTarget()
public void setTarget(JMeterTreeNode target)
target
- target node to store generated samplespublic void deliverSampler(HTTPSamplerBase sampler, TestElement[] testElements, SampleResult result)
sampler
- the sampler, may be nulltestElements
- the test elements to be added (e.g. header manager) under the Samplerresult
- the sample result, not null
TODO param serverResponse to be added to allow saving of the
server's response while recording.public void stopProxy()
public java.lang.String[] getCertificateDetails()
public JMeterTreeNode findTargetControllerNode()
target
property.
public boolean canRemove()
AbstractTestElement
canRemove
in interface TestElement
canRemove
in class AbstractTestElement
public static boolean isDynamicMode()
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.