Apache JMeter

org.apache.jmeter.protocol.http.proxy
Class ProxyControl

java.lang.Object
  extended by org.apache.jmeter.testelement.AbstractTestElement
      extended by org.apache.jmeter.control.GenericController
          extended by org.apache.jmeter.protocol.http.proxy.ProxyControl
All Implemented Interfaces:
Serializable, Cloneable, Controller, Searchable, TestElement, TestCompilerHelper

public class ProxyControl
extends GenericController

Class handles storing of generated samples, etc

See Also:
Serialized Form

Nested Class Summary
static class ProxyControl.KeystoreMode
           
 
Field Summary
static int DEFAULT_PORT
           
static String DEFAULT_PORT_S
           
 
Fields inherited from class org.apache.jmeter.control.GenericController
current, subControllersAndSamplers
 
Fields inherited from interface org.apache.jmeter.testelement.TestElement
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS
 
Constructor Summary
ProxyControl()
           
 
Method Summary
 void addConfigElement(ConfigElement config)
           
 void addExcludedPattern(String pattern)
           
 void addIncludedPattern(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[] subConfigs, 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.
 boolean getAssertions()
           
 boolean getCaptureHttpHeaders()
           
 String[] getCertificateDetails()
           
 String getContentTypeExclude()
           
 String getContentTypeInclude()
           
 int getDefaultPort()
           
 CollectionProperty getExcludePatterns()
           
 int getGroupingMode()
           
 CollectionProperty getIncludePatterns()
           
 boolean getNotifyChildSamplerListenerOfFilteredSamplers()
           
 int getPort()
           
 String getPortString()
           
 boolean getRegexMatch()
           
 boolean getSamplerDownloadImages()
           
 boolean getSamplerFollowRedirects()
           
 boolean getSamplerRedirectAutomatically()
           
 String getSamplerTypeName()
           
 String getSslDomains()
           
 JMeterTreeNode getTarget()
           
 boolean getUseKeepalive()
           
static boolean isDynamicMode()
           
 void setAssertions(boolean b)
           
 void setCaptureHttpHeaders(boolean capture)
           
 void setContentTypeExclude(String contentTypeExclude)
           
 void setContentTypeInclude(String contentTypeInclude)
           
 void setExcludeList(Collection<String> list)
           
 void setGroupingMode(int grouping)
           
 void setIncludeList(Collection<String> list)
           
 void setNotifyChildSamplerListenerOfFilteredSamplers(boolean b)
           
 void setPort(int port)
           
 void setPort(String port)
           
 void setRegexMatch(boolean b)
           
 void setSamplerDownloadImages(boolean b)
           
 void setSamplerFollowRedirects(boolean b)
           
 void setSamplerRedirectAutomatically(boolean b)
           
 void setSamplerTypeName(int samplerTypeName)
          Deprecated. 
 void setSamplerTypeName(String samplerTypeName)
           
 void setSslDomains(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()
           
 
Methods inherited from class org.apache.jmeter.control.GenericController
addIterationListener, addTestElement, addTestElementOnce, currentReturnedNull, fireIterationStart, fireIterEvents, getCurrentElement, getIterCount, getSubControllers, incrementCurrent, incrementIterCount, initialize, initializeSubControllers, isDone, isFirst, next, nextIsAController, nextIsASampler, nextIsNull, readResolve, reInitialize, reInitializeSubController, removeCurrentElement, removeIterationListener, resetCurrent, resetIterCount, setCurrentElement, setDone, setFirst, triggerEndOfLoop
 
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
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
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.jmeter.testelement.TestElement
clear, clearTestElementChildren, clone, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
 

Field Detail

DEFAULT_PORT

public static final int DEFAULT_PORT
See Also:
Constant Field Values

DEFAULT_PORT_S

public static final String DEFAULT_PORT_S
Constructor Detail

ProxyControl

public ProxyControl()
Method Detail

setPort

public void setPort(int port)

setPort

public void setPort(String port)

setSslDomains

public void setSslDomains(String domains)

getSslDomains

public String getSslDomains()

setCaptureHttpHeaders

public void setCaptureHttpHeaders(boolean capture)

setGroupingMode

public void setGroupingMode(int grouping)

setAssertions

public void setAssertions(boolean b)

setSamplerTypeName

@Deprecated
public void setSamplerTypeName(int samplerTypeName)
Deprecated. 


setSamplerTypeName

public void setSamplerTypeName(String samplerTypeName)

setSamplerRedirectAutomatically

public void setSamplerRedirectAutomatically(boolean b)

setSamplerFollowRedirects

public void setSamplerFollowRedirects(boolean b)

setUseKeepAlive

public void setUseKeepAlive(boolean b)
Parameters:
b -

setSamplerDownloadImages

public void setSamplerDownloadImages(boolean b)

setNotifyChildSamplerListenerOfFilteredSamplers

public void setNotifyChildSamplerListenerOfFilteredSamplers(boolean b)

setIncludeList

public void setIncludeList(Collection<String> list)

setExcludeList

public void setExcludeList(Collection<String> list)

setRegexMatch

public void setRegexMatch(boolean b)
Parameters:
b -

setContentTypeExclude

public void setContentTypeExclude(String contentTypeExclude)

setContentTypeInclude

public void setContentTypeInclude(String contentTypeInclude)

getAssertions

public boolean getAssertions()

getGroupingMode

public int getGroupingMode()

getPort

public int getPort()

getPortString

public String getPortString()

getDefaultPort

public int getDefaultPort()

getCaptureHttpHeaders

public boolean getCaptureHttpHeaders()

getSamplerTypeName

public String getSamplerTypeName()

getSamplerRedirectAutomatically

public boolean getSamplerRedirectAutomatically()

getSamplerFollowRedirects

public boolean getSamplerFollowRedirects()

getUseKeepalive

public boolean getUseKeepalive()

getSamplerDownloadImages

public boolean getSamplerDownloadImages()

getNotifyChildSamplerListenerOfFilteredSamplers

public boolean getNotifyChildSamplerListenerOfFilteredSamplers()

getRegexMatch

public boolean getRegexMatch()

getContentTypeExclude

public String getContentTypeExclude()

getContentTypeInclude

public String getContentTypeInclude()

addConfigElement

public void addConfigElement(ConfigElement config)

startProxy

public void startProxy()
                throws IOException
Throws:
IOException

addExcludedPattern

public void addExcludedPattern(String pattern)

getExcludePatterns

public CollectionProperty getExcludePatterns()

addIncludedPattern

public void addIncludedPattern(String pattern)

getIncludePatterns

public CollectionProperty getIncludePatterns()

clearExcludedPatterns

public void clearExcludedPatterns()

clearIncludedPatterns

public void clearIncludedPatterns()

getTarget

public JMeterTreeNode getTarget()
Returns:
the target controller node

setTarget

public void setTarget(JMeterTreeNode target)
Sets the target node where the samples generated by the proxy have to be stored.


deliverSampler

public void deliverSampler(HTTPSamplerBase sampler,
                           TestElement[] subConfigs,
                           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
subConfigs - the configuration elements to be added (e.g. header namager)
result - the sample result, not null TODO param serverResponse to be added to allow saving of the server's response while recording.

stopProxy

public void stopProxy()

getCertificateDetails

public String[] getCertificateDetails()

canRemove

public boolean canRemove()
Description copied from class: AbstractTestElement
Called by Remove to determine if it is safe to remove the element. The element can either clean itself up, and return true, or the element can return false.

Specified by:
canRemove in interface TestElement
Overrides:
canRemove in class AbstractTestElement
Returns:
true if safe to remove the element

isDynamicMode

public static boolean isDynamicMode()

Apache JMeter

Copyright © 1998-2014 Apache Software Foundation. All Rights Reserved.