logfilter.html
来自「测试工具jmeter可用来进行性能测试」· HTML 代码 · 共 973 行 · 第 1/4 页
HTML
973 行
<A NAME="EXCFILE"><!-- --></A><H3>
EXCFILE</H3>
<PRE>
protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] <B>EXCFILE</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="FILEFILTER"><!-- --></A><H3>
FILEFILTER</H3>
<PRE>
protected boolean <B>FILEFILTER</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="USEFILE"><!-- --></A><H3>
USEFILE</H3>
<PRE>
protected boolean <B>USEFILE</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="INCPTRN"><!-- --></A><H3>
INCPTRN</H3>
<PRE>
protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] <B>INCPTRN</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="EXCPTRN"><!-- --></A><H3>
EXCPTRN</H3>
<PRE>
protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] <B>EXCPTRN</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="PTRNFILTER"><!-- --></A><H3>
PTRNFILTER</H3>
<PRE>
protected boolean <B>PTRNFILTER</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="EXCPATTERNS"><!-- --></A><H3>
EXCPATTERNS</H3>
<PRE>
protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/ArrayList.html" title="class or interface in java.util">ArrayList</A> <B>EXCPATTERNS</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="INCPATTERNS"><!-- --></A><H3>
INCPATTERNS</H3>
<PRE>
protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/ArrayList.html" title="class or interface in java.util">ArrayList</A> <B>INCPATTERNS</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="NEWFILE"><!-- --></A><H3>
NEWFILE</H3>
<PRE>
protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>NEWFILE</B></PRE>
<DL>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="LogFilter()"><!-- --></A><H3>
LogFilter</H3>
<PRE>
public <B>LogFilter</B>()</PRE>
<DL>
<DD>The default constructor is empty
<P>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="setReplaceExtension(java.lang.String, java.lang.String)"><!-- --></A><H3>
setReplaceExtension</H3>
<PRE>
public void <B>setReplaceExtension</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> oldext,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> newext)</PRE>
<DL>
<DD>The method will replace the file extension with the new one. You can
either provide the extension without the period ".", or with. The method
will check for period and add it if it isn't present.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Filter.html#setReplaceExtension(java.lang.String, java.lang.String)">setReplaceExtension</A></CODE> in interface <CODE><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Filter.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">Filter</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>oldext</CODE> - <DD><CODE>newext</CODE> - <DT><B>See Also:</B><DD><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Filter.html#setReplaceExtension(java.lang.String, java.lang.String)"><CODE>Filter.setReplaceExtension(java.lang.String,
java.lang.String)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="includeFiles(java.lang.String[])"><!-- --></A><H3>
includeFiles</H3>
<PRE>
public void <B>includeFiles</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] filenames)</PRE>
<DL>
<DD>Give the filter a list of files to include
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Filter.html#includeFiles(java.lang.String[])">includeFiles</A></CODE> in interface <CODE><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Filter.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">Filter</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>filenames</CODE> - <DT><B>See Also:</B><DD><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Filter.html#includeFiles(java.lang.String[])"><CODE>Filter.includeFiles(java.lang.String[])</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="excludeFiles(java.lang.String[])"><!-- --></A><H3>
excludeFiles</H3>
<PRE>
public void <B>excludeFiles</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] filenames)</PRE>
<DL>
<DD>Give the filter a list of files to exclude
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Filter.html#excludeFiles(java.lang.String[])">excludeFiles</A></CODE> in interface <CODE><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Filter.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">Filter</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>filenames</CODE> - <DT><B>See Also:</B><DD><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Filter.html#excludeFiles(java.lang.String[])"><CODE>Filter.excludeFiles(java.lang.String[])</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="includePattern(java.lang.String[])"><!-- --></A><H3>
includePattern</H3>
<PRE>
public void <B>includePattern</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] regexp)</PRE>
<DL>
<DD>Give the filter a set of regular expressions to filter with for
inclusion. This method hasn't been fully implemented and test yet. The
implementation is not complete.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Filter.html#includePattern(java.lang.String[])">includePattern</A></CODE> in interface <CODE><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Filter.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">Filter</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>regexp</CODE> - <DT><B>See Also:</B><DD><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Filter.html#includePattern(java.lang.String[])"><CODE>Filter.includePattern(String[])</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="excludePattern(java.lang.String[])"><!-- --></A><H3>
excludePattern</H3>
<PRE>
public void <B>excludePattern</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] regexp)</PRE>
<DL>
<DD>Give the filter a set of regular expressions to filter with for
exclusion. This method hasn't been fully implemented and test yet. The
implementation is not complete.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Filter.html#excludePattern(java.lang.String[])">excludePattern</A></CODE> in interface <CODE><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Filter.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">Filter</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>regexp</CODE> - <DT><B>See Also:</B><DD><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Filter.html#excludePattern(java.lang.String[])"><CODE>Filter.excludePattern(String[])</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="isFiltered(java.lang.String, org.apache.jmeter.testelement.TestElement)"><!-- --></A><H3>
isFiltered</H3>
<PRE>
public boolean <B>isFiltered</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> path,
<A HREF="../../../../../../../org/apache/jmeter/testelement/TestElement.html" title="interface in org.apache.jmeter.testelement">TestElement</A> el)</PRE>
<DL>
<DD>In the case of log filtering the important thing is whether the log entry
should be used. Therefore, the method will only return true if the entry
should be used. Since the interface defines both inclusion and exclusion,
that means by default inclusion filtering assumes all entries are
excluded unless it matches. In the case of exlusion filtering, it assumes
all entries are included unless it matches, which means it should be
excluded.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Filter.html#isFiltered(java.lang.String, org.apache.jmeter.testelement.TestElement)">isFiltered</A></CODE> in interface <CODE><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Filter.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">Filter</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>path</CODE> -
<DT><B>Returns:</B><DD>boolean<DT><B>See Also:</B><DD><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Filter.html#isFiltered(java.lang.String, org.apache.jmeter.testelement.TestElement)"><CODE>Filter.isFiltered(String, TestElement)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="filterFile(java.lang.String)"><!-- --></A><H3>
filterFile</H3>
<PRE>
protected boolean <B>filterFile</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> file)</PRE>
<DL>
<DD>Filter the file. The implementation performs the exclusion first before
the inclusion. This means if a file name is in both string arrays, the
exclusion will take priority. Depending on how users expect this to work,
we may want to change the priority so that inclusion is performed first
and exclusion second. Another possible alternative is to perform both
inclusion and exclusion. Doing so would make the most sense if the method
throws an exception and tells the user the same filename is in both the
include and exclude array.
<P>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?