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 String
USERNAME
public final static String
PASSWORD
public transient JMeterContext
threadContext
public transient String
threadName
public final static TestElement.Companion
Companion
public final static String
NAME
public final static String
GUI_CLASS
public final static String
ENABLED
public final static String
TEST_CLASS
public final static String
COMMENTS
-
Constructor Summary
Constructors Constructor Description HTTPFileArgs()
Create a new HTTPFileArgs object with no files.
-
Method Summary
Modifier and Type Method Description HTTPFileArgsSchema
getSchema()
PropertiesAccessor<out HTTPFileArgs, out HTTPFileArgsSchema>
getProps()
CollectionProperty
getHTTPFileArgsCollection()
Get the files. void
clear()
Clear the files. void
setHTTPFileArgs(List<HTTPFileArg> files)
Set the list of files. void
addHTTPFileArg(String path)
Add a new file with the given path. void
addHTTPFileArg(HTTPFileArg file)
Add a new file. void
addHTTPFileArg(String path, String param, String mime)
adds a new File to the HTTPFileArgs list to be uploaded with http request. PropertyIterator
iterator()
Get a PropertyIterator of the files. Array<HTTPFileArg>
asArray()
Get the current arguments as an array. String
toString()
Create a string representation of the files. void
removeHTTPFileArg(int row)
Remove the specified file from the list. void
removeHTTPFileArg(HTTPFileArg file)
Remove the specified file from the list. void
removeHTTPFileArg(String filePath)
Remove the file with the specified path. void
removeAllHTTPFileArgs()
Remove all files from the list. void
addEmptyHTTPFileArg()
Add a new empty file to the list. int
getHTTPFileArgCount()
Get the number of files in the list. HTTPFileArg
getHTTPFileArg(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.
-
-
-
-