Class HTTPArgument
java.lang.Object
org.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.config.Argument
org.apache.jmeter.protocol.http.util.HTTPArgument
- All Implemented Interfaces:
Serializable, Cloneable, Searchable, TestElement
- See Also:
-
Field Summary
Fields inherited from class Argument
ARG_NAME, DESCRIPTION, METADATA, VALUEFields inherited from interface TestElement
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for the Argument objectHTTPArgument(String name, String value) Constructor for the Argument object.HTTPArgument(String name, String value, boolean alreadyEncoded) HTTPArgument(String name, String value, boolean alreadyEncoded, String contentEncoding) Construct a new HTTPArgument instance; alwaysEncoded is set to true.HTTPArgument(String name, String value, String metadata) Constructor for the Argument object.HTTPArgument(String name, String value, String metaData, boolean alreadyEncoded) Construct a new HTTPArgument instanceHTTPArgument(String name, String value, String metaData, boolean alreadyEncoded, String contentEncoding) Construct a new HTTPArgument instanceHTTPArgument(Argument arg) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidConverts allArgumententries in the collection toHTTPArgumententries.Get the argument value encoded using UTF-8getEncodedValue(String contentEncoding) Get the argument value encoded in the specified encodingbooleanbooleanvoidsetAlwaysEncoded(boolean ae) voidSets the Name attribute of the Argument object.voidsetUseEquals(boolean ue) Methods inherited from class Argument
getDescription, getMetaData, getName, getValue, isSkippable, setDescription, setMetaData, setValue, toStringMethods inherited from class AbstractTestElement
addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, 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, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty
-
Constructor Details
-
HTTPArgument
-
HTTPArgument
-
HTTPArgument
-
HTTPArgument
Construct a new HTTPArgument instance; alwaysEncoded is set to true.- Parameters:
name- the name of the parametervalue- the value of the parameteralreadyEncoded- true if the name and value is already encoded, in which case they are decoded before storage.contentEncoding- the encoding used for the parameter value
-
HTTPArgument
Construct a new HTTPArgument instance- Parameters:
name- the name of the parametervalue- the value of the parametermetaData- the separator to use between name and valuealreadyEncoded- true if the name and value is already encoded
-
HTTPArgument
public HTTPArgument(String name, String value, String metaData, boolean alreadyEncoded, String contentEncoding) Construct a new HTTPArgument instance- Parameters:
name- the name of the parametervalue- the value of the parametermetaData- the separator to use between name and valuealreadyEncoded- true if the name and value is already encodedcontentEncoding- the encoding used for the parameter value
-
HTTPArgument
-
HTTPArgument
public HTTPArgument()Constructor for the Argument object
-
-
Method Details
-
setUseEquals
public void setUseEquals(boolean ue) -
isUseEquals
public boolean isUseEquals() -
setAlwaysEncoded
public void setAlwaysEncoded(boolean ae) -
isAlwaysEncoded
public boolean isAlwaysEncoded() -
setName
Sets the Name attribute of the Argument object.- Specified by:
setNamein interfaceTestElement- Overrides:
setNamein classArgument- Parameters:
newName- the new Name value
-
getEncodedValue
Get the argument value encoded using UTF-8- Returns:
- the argument value encoded in UTF-8
-
getEncodedValue
Get the argument value encoded in the specified encoding- Parameters:
contentEncoding- the encoding to use when encoding the argument value- Returns:
- the argument value encoded in the specified encoding
- Throws:
UnsupportedEncodingException- of the encoding is not supported
-
getEncodedName
-
convertArgumentsToHTTP
Converts allArgumententries in the collection toHTTPArgumententries.- Parameters:
args- collection ofArgumentand/orHTTPArgumententries
-