public class SessionFilter extends java.lang.Object implements Filter, java.io.Serializable, TestCloneable, ThreadListener
Constructor and Description |
---|
SessionFilter()
Creates a new SessionFilter and initializes its fields to new collections
|
SessionFilter(java.util.Map<java.lang.String,CookieManager> cookieManagers,
java.util.Set<CookieManager> managersInUse)
Creates a new SessionFilter, but re-uses the given collections
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
void |
excludeFiles(java.lang.String[] filenames)
Exclude all files in the array
|
void |
excludePattern(java.lang.String[] regexp)
Exclude any log entry that contains the following regular expression
pattern.
|
java.lang.String |
filter(java.lang.String text)
In case the user wants to replace the file extension, log parsers should
call this method.
|
protected CookieManager |
getCookieManager(java.lang.String ipAddr) |
protected java.lang.String |
getIpAddress(java.lang.String logLine) |
protected boolean |
hasExcPattern(java.lang.String text) |
void |
includeFiles(java.lang.String[] filenames)
Include all files in the array.
|
void |
includePattern(java.lang.String[] regexp)
Include any log entry that contains the following regular expression
pattern.
|
boolean |
isFiltered(java.lang.String path,
TestElement sampler)
Log parser will call this method to see if a particular entry should be
filtered or not.
|
void |
reset()
Tell the filter when the parsing has reached the end of the log file and
is about to begin again.
|
void |
setReplaceExtension(java.lang.String oldextension,
java.lang.String newextension) |
void |
threadFinished()
Called for each thread after all samples have been processed.
|
void |
threadStarted()
Called for each thread before starting sampling.
|
public SessionFilter()
public SessionFilter(java.util.Map<java.lang.String,CookieManager> cookieManagers, java.util.Set<CookieManager> managersInUse)
cookieManagers
- CookieManager
s to be used for the different IPsmanagersInUse
- CookieManagers currently in use by other threadsprotected boolean hasExcPattern(java.lang.String text)
protected java.lang.String getIpAddress(java.lang.String logLine)
public void reset()
public java.lang.Object clone()
clone
in interface TestCloneable
clone
in class java.lang.Object
public void excludeFiles(java.lang.String[] filenames)
excludeFiles
in interface Filter
filenames
- names of files to excludepublic void excludePattern(java.lang.String[] regexp)
excludePattern
in interface Filter
regexp
- list of regexp that match entries that should be excludedpublic java.lang.String filter(java.lang.String text)
public void includeFiles(java.lang.String[] filenames)
includeFiles
in interface Filter
filenames
- names of files to includepublic void includePattern(java.lang.String[] regexp)
includePattern
in interface Filter
regexp
- list of regexp that match entries that should be includedpublic boolean isFiltered(java.lang.String path, TestElement sampler)
isFiltered
in interface Filter
path
- log line that should be checked if it should to be filtered
outsampler
- TestElement
in which the line would be addedtrue
if line should be filtered out,
false
otherwiseprotected CookieManager getCookieManager(java.lang.String ipAddr)
public void setReplaceExtension(java.lang.String oldextension, java.lang.String newextension)
setReplaceExtension
in interface Filter
oldextension
- old extensionnewextension
- new extensionpublic void threadFinished()
threadFinished
in interface ThreadListener
public void threadStarted()
threadStarted
in interface ThreadListener
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.