Class HTTPFileArgs
-
- All Implemented Interfaces:
-
java.io.Serializable,java.lang.Cloneable,org.apache.jmeter.config.ConfigElement,org.apache.jmeter.gui.Searchable,org.apache.jmeter.testelement.TestElement
public class HTTPFileArgs extends ConfigTestElement implements Serializable
A set of HTTPFileArg objects.
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringUSERNAMEpublic final static StringPASSWORDpublic transient JMeterContextthreadContextpublic transient StringthreadNamepublic final static TestElement.CompanionCompanionpublic final static StringNAMEpublic final static StringGUI_CLASSpublic final static StringENABLEDpublic final static StringTEST_CLASSpublic final static StringCOMMENTS
-
Constructor Summary
Constructors Constructor Description HTTPFileArgs()Create a new HTTPFileArgs object with no files.
-
Method Summary
Modifier and Type Method Description HTTPFileArgsSchemagetSchema()PropertiesAccessor<out HTTPFileArgs, out HTTPFileArgsSchema>getProps()CollectionPropertygetHTTPFileArgsCollection()Get the files. voidclear()Clear the files. voidsetHTTPFileArgs(List<HTTPFileArg> files)Set the list of files. voidaddHTTPFileArg(String path)Add a new file with the given path. voidaddHTTPFileArg(HTTPFileArg file)Add a new file. voidaddHTTPFileArg(String path, String param, String mime)adds a new File to the HTTPFileArgs list to be uploaded with http request. PropertyIteratoriterator()Get a PropertyIterator of the files. Array<HTTPFileArg>asArray()Get the current arguments as an array. StringtoString()Create a string representation of the files. voidremoveHTTPFileArg(int row)Remove the specified file from the list. voidremoveHTTPFileArg(HTTPFileArg file)Remove the specified file from the list. voidremoveHTTPFileArg(String filePath)Remove the file with the specified path. voidremoveAllHTTPFileArgs()Remove all files from the list. voidaddEmptyHTTPFileArg()Add a new empty file to the list. intgetHTTPFileArgCount()Get the number of files in the list. HTTPFileArggetHTTPFileArg(int row)Get a single file. -
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
canRemove, clearTestElementChildren, clone, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse -
Methods inherited from class org.apache.jmeter.config.ConfigTestElement
addConfigElement, addTestElement, expectsModification -
Methods inherited from class org.apache.jmeter.testelement.TestElement
get, get, get, get, get, get, get, get, get, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getProps, getSchema, getString, removed, set -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getSchema
HTTPFileArgsSchema getSchema()
-
getProps
PropertiesAccessor<out HTTPFileArgs, out HTTPFileArgsSchema> getProps()
-
getHTTPFileArgsCollection
CollectionProperty getHTTPFileArgsCollection()
Get the files.
-
clear
void clear()
Clear the files.
-
setHTTPFileArgs
void setHTTPFileArgs(List<HTTPFileArg> files)
Set the list of files. Any existing files will be lost.
- Parameters:
files- the new files
-
addHTTPFileArg
void addHTTPFileArg(String path)
Add a new file with the given path.
- Parameters:
path- the path of the file
-
addHTTPFileArg
void addHTTPFileArg(HTTPFileArg file)
Add a new file.
- Parameters:
file- the new file
-
addHTTPFileArg
void addHTTPFileArg(String path, String param, String mime)
adds a new File to the HTTPFileArgs list to be uploaded with http request.
- Parameters:
path- file full path.param- http parameter name.mime- mime type of file.
-
iterator
PropertyIterator iterator()
Get a PropertyIterator of the files.
-
asArray
Array<HTTPFileArg> asArray()
Get the current arguments as an array.
-
removeHTTPFileArg
void removeHTTPFileArg(int row)
Remove the specified file from the list.
- Parameters:
row- the index of the file to remove
-
removeHTTPFileArg
void removeHTTPFileArg(HTTPFileArg file)
Remove the specified file from the list.
- Parameters:
file- the file to remove
-
removeHTTPFileArg
void removeHTTPFileArg(String filePath)
Remove the file with the specified path.
- Parameters:
filePath- the path of the file to remove
-
removeAllHTTPFileArgs
void removeAllHTTPFileArgs()
Remove all files from the list.
-
addEmptyHTTPFileArg
void addEmptyHTTPFileArg()
Add a new empty file to the list. The new file will have the empty string as its path.
-
getHTTPFileArgCount
int getHTTPFileArgCount()
Get the number of files in the list.
-
getHTTPFileArg
HTTPFileArg getHTTPFileArg(int row)
Get a single file.
- Parameters:
row- the index of the file to return.
-
-
-
-