Apache JMeter

org.apache.jmeter.extractor
Class RegexExtractor

java.lang.Object
  extended by org.apache.jmeter.testelement.AbstractTestElement
      extended by org.apache.jmeter.extractor.RegexExtractor
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, PostProcessor, TestElement

public class RegexExtractor
extends AbstractTestElement
implements PostProcessor, java.io.Serializable

See Also:
Serialized Form

Field Summary
static java.lang.String USE_BODY
           
static java.lang.String USE_BODY_UNESCAPED
           
static java.lang.String USE_CODE
           
static java.lang.String USE_HDRS
           
static java.lang.String USE_MESSAGE
           
static java.lang.String USE_URL
           
 
Fields inherited from interface org.apache.jmeter.testelement.TestElement
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS
 
Constructor Summary
RegexExtractor()
           
 
Method Summary
 java.lang.Object clone()
           
 java.lang.String getDefaultValue()
           
 int getMatchNumber()
           
 java.lang.String getMatchNumberAsString()
           
 java.lang.String getRefName()
           
 java.lang.String getRegex()
           
 java.lang.String getTemplate()
           
 void process()
          Parses the response data using regular expressions and saving the results into variables for use later in the test.
 void setDefaultValue(java.lang.String defaultValue)
          Sets the value of the variable if no matches are found
 void setMatchNumber(int matchNumber)
          Set which Match to use.
 void setMatchNumber(java.lang.String matchNumber)
           
 void setRefName(java.lang.String refName)
           
 void setRegex(java.lang.String regex)
           
 void setTemplate(java.lang.String template)
           
 void setUseField(java.lang.String actionCommand)
           
 boolean useBody()
           
 boolean useCode()
           
 boolean useHeaders()
           
 boolean useMessage()
           
 boolean useUnescapedBody()
           
 boolean useUrl()
           
 
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addProperty, addTestElement, canRemove, clear, clearTemporary, 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
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USE_HDRS

public static final java.lang.String USE_HDRS
See Also:
Constant Field Values

USE_BODY

public static final java.lang.String USE_BODY
See Also:
Constant Field Values

USE_BODY_UNESCAPED

public static final java.lang.String USE_BODY_UNESCAPED
See Also:
Constant Field Values

USE_URL

public static final java.lang.String USE_URL
See Also:
Constant Field Values

USE_CODE

public static final java.lang.String USE_CODE
See Also:
Constant Field Values

USE_MESSAGE

public static final java.lang.String USE_MESSAGE
See Also:
Constant Field Values
Constructor Detail

RegexExtractor

public RegexExtractor()
Method Detail

process

public void process()
Parses the response data using regular expressions and saving the results into variables for use later in the test.

Specified by:
process in interface PostProcessor
See Also:
PostProcessor.process()

clone

public java.lang.Object clone()
Specified by:
clone in interface TestElement
Overrides:
clone in class AbstractTestElement

setRegex

public void setRegex(java.lang.String regex)

getRegex

public java.lang.String getRegex()

setRefName

public void setRefName(java.lang.String refName)

getRefName

public java.lang.String getRefName()

setMatchNumber

public void setMatchNumber(int matchNumber)
Set which Match to use. This can be any positive number, indicating the exact match to use, or 0, which is interpreted as meaning random.

Parameters:
matchNumber -

setMatchNumber

public void setMatchNumber(java.lang.String matchNumber)

getMatchNumber

public int getMatchNumber()

getMatchNumberAsString

public java.lang.String getMatchNumberAsString()

setDefaultValue

public void setDefaultValue(java.lang.String defaultValue)
Sets the value of the variable if no matches are found

Parameters:
defaultValue -

getDefaultValue

public java.lang.String getDefaultValue()

setTemplate

public void setTemplate(java.lang.String template)

getTemplate

public java.lang.String getTemplate()

useHeaders

public boolean useHeaders()

useBody

public boolean useBody()

useUnescapedBody

public boolean useUnescapedBody()

useUrl

public boolean useUrl()

useCode

public boolean useCode()

useMessage

public boolean useMessage()

setUseField

public void setUseField(java.lang.String actionCommand)

Apache JMeter

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