Class SessionFilter

  • All Implemented Interfaces:
    java.io.Serializable , java.lang.Cloneable , org.apache.jmeter.protocol.http.util.accesslog.Filter , org.apache.jmeter.testelement.TestCloneable , org.apache.jmeter.testelement.ThreadListener

    @AutoService(value = Filter.class) 
    public class SessionFilter
     implements Filter, Serializable, TestCloneable, ThreadListener
                        

    Provides Session Filtering for the AccessLog Sampler.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void reset() Tell the filter when the parsing has reached the end of the log file and is about to begin again.
      Object clone()
      void excludeFiles(Array<String> filenames) Exclude all files in the array
      void excludePattern(Array<String> regexp) Exclude any log entry that contains the following regular expression pattern.
      String filter(String text) In case the user wants to replace the file extension, log parsers should call this method.
      void includeFiles(Array<String> filenames) Include all files in the array.
      void includePattern(Array<String> regexp) Include any log entry that contains the following regular expression pattern.
      boolean isFiltered(String path, TestElement sampler) Log parser will call this method to see if a particular entry should be filtered or not.
      void setReplaceExtension(String oldextension, String newextension)
      void threadFinished()
      void threadStarted()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SessionFilter

        SessionFilter()
        Creates a new SessionFilter and initializes its fields to new collections
      • SessionFilter

        SessionFilter(Map<String, CookieManager> cookieManagers, Set<CookieManager> managersInUse)
        Creates a new SessionFilter, but re-uses the given collections
        Parameters:
        cookieManagers - CookieManagers to be used for the different IPs
        managersInUse - CookieManagers currently in use by other threads
    • Method Detail

      • reset

         void reset()

        Tell the filter when the parsing has reached the end of the log file and is about to begin again. Gives the filter a chance to adjust it's values, if needed.

      • excludePattern

         void excludePattern(Array<String> regexp)

        Exclude any log entry that contains the following regular expression pattern.

      • filter

         String filter(String text)

        In case the user wants to replace the file extension, log parsers should call this method. This is useful for regression test plans. If a website is migrating from one platform to another and the file extension changes, the filter provides an easy way to do it without spending a lot of time.

      • includePattern

         void includePattern(Array<String> regexp)

        Include any log entry that contains the following regular expression pattern.

      • isFiltered

         boolean isFiltered(String path, TestElement sampler)

        Log parser will call this method to see if a particular entry should be filtered or not.