Class HTTPFileArg
java.lang.Object
org.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.protocol.http.util.HTTPFileArg
- All Implemented Interfaces:
- Serializable,- Cloneable,- Searchable,- org.apache.jmeter.testelement.TestElement
Class representing a file parameter for http upload.
 Consists of a http parameter name/file path pair with (optional) mimetype.
 Also provides temporary storage for the headers which are sent with files.
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.jmeter.testelement.TestElementorg.apache.jmeter.testelement.TestElement.Companion
- 
Field SummaryFields inherited from interface org.apache.jmeter.testelement.TestElementCOMMENTS, Companion, ENABLED, GUI_CLASS, NAME, TEST_CLASS
- 
Constructor SummaryConstructorsConstructorDescriptionConstructor for an empty HTTPFileArg objectHTTPFileArg(String path) Constructor for the HTTPFileArg object with given path.HTTPFileArg(String path, String paramname, String mimetype) Constructor for the HTTPFileArg object with full information.HTTPFileArg(HTTPFileArg file) Copy Constructor.HTTPFileArg(JMeterProperty path, JMeterProperty paramname, JMeterProperty mimetype) Constructor for the HTTPFileArg object with full information, using existing properties
- 
Method SummaryModifier and TypeMethodDescriptionGets the saved body header for the HTTPFileArg object.Get the mimetype of the File.Get the http parameter name of the File.getPath()Get the path of the File.org.apache.jmeter.testelement.schema.PropertiesAccessor<? extends HTTPFileArg,? extends org.apache.jmeter.protocol.http.util.HTTPFileArgSchema> getProps()org.apache.jmeter.protocol.http.util.HTTPFileArgSchemabooleanCheck if the entry is not empty.voidSets the body header for the HTTPFileArg object.voidsetMimeType(String newMimeType) Set the mimetype of the File.voidsetParamName(String newParamName) Set the http parameter name of the File.voidSet the path of the File.toString()returns path, param name, mime type information of HTTPFileArg object.Methods inherited from class org.apache.jmeter.testelement.AbstractTestElementaddPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traversePropertyMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.jmeter.testelement.TestElementget, get, get, get, get, get, get, get, get, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getPropertyOrNull, getString, removed, removeProperty, set, set, set, set, set, set, set, set, set
- 
Constructor Details- 
HTTPFileArgpublic HTTPFileArg()Constructor for an empty HTTPFileArg object
- 
HTTPFileArgConstructor for the HTTPFileArg object with given path.- Parameters:
- path- path to the file to use
- Throws:
- IllegalArgumentException- if- pathis- null
 
- 
HTTPFileArgConstructor for the HTTPFileArg object with full information.- Parameters:
- path- path of the file to use
- paramname- name of the http parameter to use for the file
- mimetype- mimetype of the file
- Throws:
- IllegalArgumentException- if any parameter is- null
 
- 
HTTPFileArgConstructor for the HTTPFileArg object with full information, using existing properties- Parameters:
- path- path of the file to use
- paramname- name of the http parameter to use for the file
- mimetype- mimetype of the file
- Throws:
- IllegalArgumentException- if any parameter is- null
 
- 
HTTPFileArgCopy Constructor.- Parameters:
- file-- HTTPFileArgto get information about the path, http parameter name and mimetype of the file
- Throws:
- IllegalArgumentException- if any of those retrieved information is- null
 
 
- 
- 
Method Details- 
getSchemapublic org.apache.jmeter.protocol.http.util.HTTPFileArgSchema getSchema()- Specified by:
- getSchemain interface- org.apache.jmeter.testelement.TestElement
 
- 
getPropspublic org.apache.jmeter.testelement.schema.PropertiesAccessor<? extends HTTPFileArg,? extends org.apache.jmeter.protocol.http.util.HTTPFileArgSchema> getProps()- Specified by:
- getPropsin interface- org.apache.jmeter.testelement.TestElement
 
- 
setParamNameSet the http parameter name of the File.- Parameters:
- newParamName- the new http parameter name
 
- 
getParamNameGet the http parameter name of the File.- Returns:
- the http parameter name
 
- 
setMimeTypeSet the mimetype of the File.- Parameters:
- newMimeType- the new mimetype
 
- 
getMimeTypeGet the mimetype of the File.- Returns:
- the http parameter mimetype
 
- 
setPathSet the path of the File.- Parameters:
- newPath- the new path
 
- 
getPathGet the path of the File.- Returns:
- the file's path
 
- 
setHeaderSets the body header for the HTTPFileArg object. Header contains path, parameter name and mime type information. This is only intended for use by methods which need to store information temporarily whilst creating the HTTP body.- Parameters:
- newHeader- the new Header value
 
- 
getHeaderGets the saved body header for the HTTPFileArg object.- Returns:
- saved body header
 
- 
toStringreturns path, param name, mime type information of HTTPFileArg object.
- 
isNotEmptypublic boolean isNotEmpty()Check if the entry is not empty.- Returns:
- true if Path, name or mimetype fields are not the empty string
 
 
-