public class SessionFilter extends Object implements Filter, Serializable, TestCloneable, ThreadListener
| Constructor and 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
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
void |
excludeFiles(String[] filenames)
Exclude all files in the array
|
void |
excludePattern(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.
|
protected CookieManager |
getCookieManager(String ipAddr) |
protected String |
getIpAddress(String logLine) |
protected boolean |
hasExcPattern(String text) |
void |
includeFiles(String[] filenames)
Include all files in the array.
|
void |
includePattern(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 |
reset()
Tell the filter when the parsing has reached the end of the log file and
is about to begin again.
|
void |
setReplaceExtension(String oldextension,
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(Map<String,CookieManager> cookieManagers, Set<CookieManager> managersInUse)
cookieManagers - CookieManagers to be used for the different IPsmanagersInUse - CookieManagers currently in use by other threadsprotected boolean hasExcPattern(String text)
public void reset()
public Object clone()
clone in interface TestCloneableclone in class Objectpublic void excludeFiles(String[] filenames)
excludeFiles in interface Filterfilenames - names of files to excludepublic void excludePattern(String[] regexp)
excludePattern in interface Filterregexp - list of regexp that match entries that should be excludedpublic String filter(String text)
public void includeFiles(String[] filenames)
includeFiles in interface Filterfilenames - names of files to includepublic void includePattern(String[] regexp)
includePattern in interface Filterregexp - list of regexp that match entries that should be includedpublic boolean isFiltered(String path, TestElement sampler)
isFiltered in interface Filterpath - 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(String ipAddr)
public void setReplaceExtension(String oldextension, String newextension)
setReplaceExtension in interface Filteroldextension - old extensionnewextension - new extensionpublic void threadFinished()
threadFinished in interface ThreadListenerpublic void threadStarted()
threadStarted in interface ThreadListenerCopyright © 1998-2021 Apache Software Foundation. All Rights Reserved.