Apache JMeter

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

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

public class ProxyControl
extends GenericController

Class handles storing of generated samples, etc

See Also:
Serialized Form

Field Summary
static String ADD_ASSERTIONS
           
static String CAPTURE_HTTP_HEADERS
           
static String CONTENT_TYPE_EXCLUDE
           
static String CONTENT_TYPE_INCLUDE
           
static int DEFAULT_PORT
           
static String DEFAULT_PORT_S
           
static String EXCLUDE_LIST
           
static int GROUPING_ADD_SEPARATORS
           
static int GROUPING_IN_CONTROLLERS
           
static String GROUPING_MODE
           
static int GROUPING_NO_GROUPS
           
static int GROUPING_STORE_FIRST_ONLY
           
static String HTTPS_SPOOF
           
static String INCLUDE_LIST
           
static String PORT
           
static String REGEX_MATCH
           
static String SAMPLER_DOWNLOAD_IMAGES
           
static String SAMPLER_FOLLOW_REDIRECTS
           
static String SAMPLER_REDIRECT_AUTOMATICALLY
           
static int SAMPLER_TYPE_HTTP_SAMPLER
           
static int SAMPLER_TYPE_HTTP_SAMPLER2
           
static String SAMPLER_TYPE_NAME
           
static String USE_KEEPALIVE
           
 
Fields inherited from class org.apache.jmeter.control.GenericController
current, iterationListeners, subControllersAndSamplers
 
Fields inherited from interface org.apache.jmeter.testelement.TestElement
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. param serverResponse to be added to allow saving of the server's response while recording.
 boolean getAssertions()
           
 boolean getCaptureHttpHeaders()
           
 String getClassLabel()
           
 String getContentTypeExclude()
           
 String getContentTypeInclude()
           
 int getDefaultPort()
           
 CollectionProperty getExcludePatterns()
           
 int getGroupingMode()
           
 Class getGuiClass()
           
 boolean getHttpsSpoof()
           
 CollectionProperty getIncludePatterns()
           
 int getPort()
           
 String getPortString()
           
 boolean getRegexMatch()
           
 boolean getSamplerDownloadImages()
           
 boolean getSamplerFollowRedirects()
           
 boolean getSamplerRedirectAutomatically()
           
 int getSamplerTypeName()
           
 JMeterTreeNode getTarget()
           
 boolean getUseKeepalive()
           
 void setAssertions(boolean b)
           
 void setCaptureHttpHeaders(boolean capture)
           
 void setContentTypeExclude(String contentTypeExclude)
           
 void setContentTypeInclude(String contentTypeInclude)
           
 void setExcludeList(Collection list)
           
 void setGroupingMode(int grouping)
           
 void setHttpsSpoof(boolean b)
           
 void setIncludeList(Collection list)
           
 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)
           
 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, currentReturnedNull, fireIterationStart, fireIterEvents, getCurrentElement, getIterCount, getSubControllers, incrementCurrent, incrementIterCount, initialize, isDone, isFirst, next, nextIsAController, nextIsASampler, nextIsNull, reInitialize, removeCurrentElement, resetCurrent, resetIterCount, setCurrentElement, setDone, setFirst
 
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addProperty, clear, clearTemporary, clone, emptyTemporary, equals, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setName, 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, clone, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setName, 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

PORT

public static final String PORT
See Also:
Constant Field Values

EXCLUDE_LIST

public static final String EXCLUDE_LIST
See Also:
Constant Field Values

INCLUDE_LIST

public static final String INCLUDE_LIST
See Also:
Constant Field Values

CAPTURE_HTTP_HEADERS

public static final String CAPTURE_HTTP_HEADERS
See Also:
Constant Field Values

ADD_ASSERTIONS

public static final String ADD_ASSERTIONS
See Also:
Constant Field Values

GROUPING_MODE

public static final String GROUPING_MODE
See Also:
Constant Field Values

SAMPLER_TYPE_NAME

public static final String SAMPLER_TYPE_NAME
See Also:
Constant Field Values

SAMPLER_REDIRECT_AUTOMATICALLY

public static final String SAMPLER_REDIRECT_AUTOMATICALLY
See Also:
Constant Field Values

SAMPLER_FOLLOW_REDIRECTS

public static final String SAMPLER_FOLLOW_REDIRECTS
See Also:
Constant Field Values

USE_KEEPALIVE

public static final String USE_KEEPALIVE
See Also:
Constant Field Values

SAMPLER_DOWNLOAD_IMAGES

public static final String SAMPLER_DOWNLOAD_IMAGES
See Also:
Constant Field Values

REGEX_MATCH

public static final String REGEX_MATCH
See Also:
Constant Field Values

HTTPS_SPOOF

public static final String HTTPS_SPOOF
See Also:
Constant Field Values

CONTENT_TYPE_EXCLUDE

public static final String CONTENT_TYPE_EXCLUDE
See Also:
Constant Field Values

CONTENT_TYPE_INCLUDE

public static final String CONTENT_TYPE_INCLUDE
See Also:
Constant Field Values

GROUPING_NO_GROUPS

public static final int GROUPING_NO_GROUPS
See Also:
Constant Field Values

GROUPING_ADD_SEPARATORS

public static final int GROUPING_ADD_SEPARATORS
See Also:
Constant Field Values

GROUPING_IN_CONTROLLERS

public static final int GROUPING_IN_CONTROLLERS
See Also:
Constant Field Values

GROUPING_STORE_FIRST_ONLY

public static final int GROUPING_STORE_FIRST_ONLY
See Also:
Constant Field Values

SAMPLER_TYPE_HTTP_SAMPLER

public static final int SAMPLER_TYPE_HTTP_SAMPLER
See Also:
Constant Field Values

SAMPLER_TYPE_HTTP_SAMPLER2

public static final int SAMPLER_TYPE_HTTP_SAMPLER2
See Also:
Constant Field Values
Constructor Detail

ProxyControl

public ProxyControl()
Method Detail

setPort

public void setPort(int port)

setPort

public void setPort(String port)

setCaptureHttpHeaders

public void setCaptureHttpHeaders(boolean capture)

setGroupingMode

public void setGroupingMode(int grouping)

setAssertions

public void setAssertions(boolean b)

setSamplerTypeName

public void setSamplerTypeName(int 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)

setIncludeList

public void setIncludeList(Collection list)

setExcludeList

public void setExcludeList(Collection list)

setRegexMatch

public void setRegexMatch(boolean b)
Parameters:
b -

setHttpsSpoof

public void setHttpsSpoof(boolean b)
Parameters:
b -

setContentTypeExclude

public void setContentTypeExclude(String contentTypeExclude)

setContentTypeInclude

public void setContentTypeInclude(String contentTypeInclude)

getClassLabel

public String getClassLabel()

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 int getSamplerTypeName()

getSamplerRedirectAutomatically

public boolean getSamplerRedirectAutomatically()

getSamplerFollowRedirects

public boolean getSamplerFollowRedirects()

getUseKeepalive

public boolean getUseKeepalive()

getSamplerDownloadImages

public boolean getSamplerDownloadImages()

getRegexMatch

public boolean getRegexMatch()

getHttpsSpoof

public boolean getHttpsSpoof()

getContentTypeExclude

public String getContentTypeExclude()

getContentTypeInclude

public String getContentTypeInclude()

getGuiClass

public Class getGuiClass()

addConfigElement

public void addConfigElement(ConfigElement config)

startProxy

public void startProxy()

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. param serverResponse to be added to allow saving of the server's response while recording. A future consideration.


stopProxy

public void stopProxy()

canRemove

public boolean canRemove()
Description copied from interface: TestElement
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

Apache JMeter

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