org.apache.jmeter.protocol.http.proxy

Class ProxyControl

Implemented Interfaces:
Cloneable, Controller, Serializable, TestElement

public class ProxyControl
extends GenericController

Class handles storing of generated samples, etc

Field Summary

static int
DEFAULT_PORT
static String
DEFAULT_PORT_S
static int
GROUPING_ADD_SEPARATORS
static int
GROUPING_IN_CONTROLLERS
static int
GROUPING_NO_GROUPS
static int
GROUPING_STORE_FIRST_ONLY
static int
SAMPLER_TYPE_HTTP_SAMPLER
static int
SAMPLER_TYPE_HTTP_SAMPLER2

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()
Creates a Generic Controller

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
getContentTypeExclude()
String
getContentTypeInclude()
int
getDefaultPort()
CollectionProperty
getExcludePatterns()
int
getGroupingMode()
Class
getGuiClass()
boolean
getHttpsSpoof()
String
getHttpsSpoofMatch()
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
setHttpsSpoofMatch(String s)
void
setIncludeList(Collection list)
void
setPort(String port)
void
setPort(int 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, fireIterEvents, fireIterationStart, 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, addTestElement, canRemove, clear, clearTemporary, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty

Field Details

DEFAULT_PORT

public static final int DEFAULT_PORT
Field Value:
8080

DEFAULT_PORT_S

public static final String DEFAULT_PORT_S

GROUPING_ADD_SEPARATORS

public static final int GROUPING_ADD_SEPARATORS
Field Value:
1

GROUPING_IN_CONTROLLERS

public static final int GROUPING_IN_CONTROLLERS
Field Value:
2

GROUPING_NO_GROUPS

public static final int GROUPING_NO_GROUPS
Field Value:
0

GROUPING_STORE_FIRST_ONLY

public static final int GROUPING_STORE_FIRST_ONLY
Field Value:
3

SAMPLER_TYPE_HTTP_SAMPLER

public static final int SAMPLER_TYPE_HTTP_SAMPLER
Field Value:
0

SAMPLER_TYPE_HTTP_SAMPLER2

public static final int SAMPLER_TYPE_HTTP_SAMPLER2
Field Value:
1

Constructor Details

ProxyControl

public ProxyControl()
Creates a Generic Controller

Method Details

addConfigElement

public void addConfigElement(ConfigElement config)

addExcludedPattern

public void addExcludedPattern(String pattern)

addIncludedPattern

public void addIncludedPattern(String pattern)

canRemove

public boolean canRemove()
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 interface AbstractTestElement
Returns:
true if safe to remove the element

clearExcludedPatterns

public void clearExcludedPatterns()

clearIncludedPatterns

public void clearIncludedPatterns()

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.

getAssertions

public boolean getAssertions()

getCaptureHttpHeaders

public boolean getCaptureHttpHeaders()

getContentTypeExclude

public String getContentTypeExclude()

getContentTypeInclude

public String getContentTypeInclude()

getDefaultPort

public int getDefaultPort()

getExcludePatterns

public CollectionProperty getExcludePatterns()

getGroupingMode

public int getGroupingMode()

getGuiClass

public Class getGuiClass()

getHttpsSpoof

public boolean getHttpsSpoof()

getHttpsSpoofMatch

public String getHttpsSpoofMatch()

getIncludePatterns

public CollectionProperty getIncludePatterns()

getPort

public int getPort()

getPortString

public String getPortString()

getRegexMatch

public boolean getRegexMatch()

getSamplerDownloadImages

public boolean getSamplerDownloadImages()

getSamplerFollowRedirects

public boolean getSamplerFollowRedirects()

getSamplerRedirectAutomatically

public boolean getSamplerRedirectAutomatically()

getSamplerTypeName

public int getSamplerTypeName()

getTarget

public JMeterTreeNode getTarget()
Returns:
the target controller node

getUseKeepalive

public boolean getUseKeepalive()

setAssertions

public void setAssertions(boolean b)

setCaptureHttpHeaders

public void setCaptureHttpHeaders(boolean capture)

setContentTypeExclude

public void setContentTypeExclude(String contentTypeExclude)

setContentTypeInclude

public void setContentTypeInclude(String contentTypeInclude)

setExcludeList

public void setExcludeList(Collection list)

setGroupingMode

public void setGroupingMode(int grouping)

setHttpsSpoof

public void setHttpsSpoof(boolean b)

setHttpsSpoofMatch

public void setHttpsSpoofMatch(String s)

setIncludeList

public void setIncludeList(Collection list)

setPort

public void setPort(String port)

setPort

public void setPort(int port)

setRegexMatch

public void setRegexMatch(boolean b)
Parameters:
b -

setSamplerDownloadImages

public void setSamplerDownloadImages(boolean b)

setSamplerFollowRedirects

public void setSamplerFollowRedirects(boolean b)

setSamplerRedirectAutomatically

public void setSamplerRedirectAutomatically(boolean b)

setSamplerTypeName

public void setSamplerTypeName(int samplerTypeName)

setTarget

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

setUseKeepAlive

public void setUseKeepAlive(boolean b)
Parameters:
b -

startProxy

public void startProxy()
            throws IOException

stopProxy

public void stopProxy()

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