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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      HTTPFileArgs() Create a new HTTPFileArgs object with no files.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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
    • Constructor Detail

      • HTTPFileArgs

        HTTPFileArgs()
        Create a new HTTPFileArgs object with no files.
    • Method Detail

      • 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(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.

        Returns:

        an iteration of the files

      • toString

         String toString()

        Create a string representation of the files.

        Returns:

        the string representation of the files

      • 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
      • 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.

        Returns:

        the number of files

      • getHTTPFileArg

         HTTPFileArg getHTTPFileArg(int row)

        Get a single file.

        Parameters:
        row - the index of the file to return.
        Returns:

        the file at the specified index, or null if no file exists at that index.