Class SessionFilter

    • Constructor Detail

      • SessionFilter

        public SessionFilter()
    • Method Detail

      • hasExcPattern

        protected boolean hasExcPattern​(String text)
      • getIpAddress

        protected String getIpAddress​(String logLine)
      • reset

        public 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.
        Specified by:
        reset in interface Filter
      • excludeFiles

        public void excludeFiles​(String[] filenames)
        Exclude all files in the array
        Specified by:
        excludeFiles in interface Filter
        Parameters:
        filenames - names of files to exclude
      • excludePattern

        public void excludePattern​(String[] regexp)
        Exclude any log entry that contains the following regular expression pattern.
        Specified by:
        excludePattern in interface Filter
        Parameters:
        regexp - list of regexp that match entries that should be excluded
      • filter

        public 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.
        Specified by:
        filter in interface Filter
        Parameters:
        text - log line to be filtered
        Returns:
        String
      • includeFiles

        public void includeFiles​(String[] filenames)
        Include all files in the array.
        Specified by:
        includeFiles in interface Filter
        Parameters:
        filenames - names of files to include
      • includePattern

        public void includePattern​(String[] regexp)
        Include any log entry that contains the following regular expression pattern.
        Specified by:
        includePattern in interface Filter
        Parameters:
        regexp - list of regexp that match entries that should be included
      • isFiltered

        public boolean isFiltered​(String path,
                                  TestElement sampler)
        Log parser will call this method to see if a particular entry should be filtered or not.
        Specified by:
        isFiltered in interface Filter
        Parameters:
        path - log line that should be checked if it should to be filtered out
        sampler - TestElement in which the line would be added
        Returns:
        boolean true if line should be filtered out, false otherwise
      • setReplaceExtension

        public void setReplaceExtension​(String oldextension,
                                        String newextension)
        Specified by:
        setReplaceExtension in interface Filter
        Parameters:
        oldextension - old extension
        newextension - new extension
      • threadStarted

        public void threadStarted()
        Called for each thread before starting sampling. WARNING: this is called before any Config test elements are processed, so any properties they define will not have been merged in yet.
        Specified by:
        threadStarted in interface ThreadListener
        See Also:
        JMeterThread.threadStarted()