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.
-
-
Constructor Summary
Constructors Constructor Description SessionFilter()Creates a new SessionFilter and initializes its fields to new collections SessionFilter(Map<String, CookieManager> cookieManagers, Set<CookieManager> managersInUse)Creates a new SessionFilter, but re-uses the given collections
-
Method Summary
Modifier and Type Method Description voidreset()Tell the filter when the parsing has reached the end of the log file and is about to begin again. Objectclone()voidexcludeFiles(Array<String> filenames)Exclude all files in the array voidexcludePattern(Array<String> regexp)Exclude any log entry that contains the following regular expression pattern. Stringfilter(String text)In case the user wants to replace the file extension, log parsers should call this method. voidincludeFiles(Array<String> filenames)Include all files in the array. voidincludePattern(Array<String> regexp)Include any log entry that contains the following regular expression pattern. booleanisFiltered(String path, TestElement sampler)Log parser will call this method to see if a particular entry should be filtered or not. voidsetReplaceExtension(String oldextension, String newextension)voidthreadFinished()voidthreadStarted()-
-
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 IPsmanagersInUse- 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.
-
excludeFiles
void excludeFiles(Array<String> filenames)
Exclude all files in the array
-
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.
-
includeFiles
void includeFiles(Array<String> filenames)
Include all files in the array.
-
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.
-
setReplaceExtension
void setReplaceExtension(String oldextension, String newextension)
-
threadFinished
void threadFinished()
-
threadStarted
void threadStarted()
-
-
-
-