Apache JMeter

org.apache.jmeter.protocol.http.util
Class HTTPArgument

java.lang.Object
  extended by org.apache.jmeter.testelement.AbstractTestElement
      extended by org.apache.jmeter.config.Argument
          extended by org.apache.jmeter.protocol.http.util.HTTPArgument
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, TestElement

public class HTTPArgument
extends Argument
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.jmeter.config.Argument
ARG_NAME, METADATA, VALUE
 
Fields inherited from interface org.apache.jmeter.testelement.TestElement
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS
 
Constructor Summary
HTTPArgument()
          Constructor for the Argument object
HTTPArgument(Argument arg)
           
HTTPArgument(java.lang.String name, java.lang.String value)
          Constructor for the Argument object.
HTTPArgument(java.lang.String name, java.lang.String value, boolean alreadyEncoded)
           
HTTPArgument(java.lang.String name, java.lang.String value, boolean alreadyEncoded, java.lang.String contentEncoding)
          Construct a new HTTPArgument instance
HTTPArgument(java.lang.String name, java.lang.String value, java.lang.String metadata)
          Constructor for the Argument object.
HTTPArgument(java.lang.String name, java.lang.String value, java.lang.String metaData, boolean alreadyEncoded)
           
HTTPArgument(java.lang.String name, java.lang.String value, java.lang.String metaData, boolean alreadyEncoded, java.lang.String contentEncoding)
          Construct a new HTTPArgument instance
 
Method Summary
static void convertArgumentsToHTTP(Arguments args)
           
 java.lang.String getEncodedName()
           
 java.lang.String getEncodedValue()
          Get the argument value encoded using UTF-8
 java.lang.String getEncodedValue(java.lang.String contentEncoding)
          Get the argument value encoded in the specified encoding
 boolean isAlwaysEncoded()
           
 boolean isUseEquals()
           
 void setAlwaysEncoded(boolean ae)
           
 void setName(java.lang.String newName)
          Sets the Name attribute of the Argument object.
 void setUseEquals(boolean ue)
           
 
Methods inherited from class org.apache.jmeter.config.Argument
getMetaData, getName, getValue, isSkippable, setMetaData, setValue, toString
 
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addProperty, addTestElement, canRemove, clear, clearTemporary, clone, emptyTemporary, equals, getComment, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, 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, wait, wait, wait
 

Constructor Detail

HTTPArgument

public HTTPArgument(java.lang.String name,
                    java.lang.String value,
                    java.lang.String metadata)
Constructor for the Argument object.


HTTPArgument

public HTTPArgument(java.lang.String name,
                    java.lang.String value)
Constructor for the Argument object.


HTTPArgument

public HTTPArgument(java.lang.String name,
                    java.lang.String value,
                    boolean alreadyEncoded)

HTTPArgument

public HTTPArgument(java.lang.String name,
                    java.lang.String value,
                    boolean alreadyEncoded,
                    java.lang.String contentEncoding)
Construct a new HTTPArgument instance

Parameters:
name - the name of the parameter
value - the value of the parameter
alreadyEncoded - true if the name and value is already encoded
contentEncoding - the encoding used for the parameter value

HTTPArgument

public HTTPArgument(java.lang.String name,
                    java.lang.String value,
                    java.lang.String metaData,
                    boolean alreadyEncoded)

HTTPArgument

public HTTPArgument(java.lang.String name,
                    java.lang.String value,
                    java.lang.String metaData,
                    boolean alreadyEncoded,
                    java.lang.String contentEncoding)
Construct a new HTTPArgument instance

Parameters:
name - the name of the parameter
value - the value of the parameter
metaData - the separator to use between name and value
alreadyEncoded - true if the name and value is already encoded
contentEncoding - the encoding used for the parameter value

HTTPArgument

public HTTPArgument(Argument arg)

HTTPArgument

public HTTPArgument()
Constructor for the Argument object

Method Detail

setUseEquals

public void setUseEquals(boolean ue)

isUseEquals

public boolean isUseEquals()

setAlwaysEncoded

public void setAlwaysEncoded(boolean ae)

isAlwaysEncoded

public boolean isAlwaysEncoded()

setName

public void setName(java.lang.String newName)
Sets the Name attribute of the Argument object.

Specified by:
setName in interface TestElement
Overrides:
setName in class Argument
Parameters:
newName - the new Name value

getEncodedValue

public java.lang.String getEncodedValue()
Get the argument value encoded using UTF-8

Returns:
the argument value encoded in UTF-8

getEncodedValue

public java.lang.String getEncodedValue(java.lang.String contentEncoding)
                                 throws java.io.UnsupportedEncodingException
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:
java.io.UnsupportedEncodingException

getEncodedName

public java.lang.String getEncodedName()

convertArgumentsToHTTP

public static void convertArgumentsToHTTP(Arguments args)

Apache JMeter

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