standardgenerator.html
来自「测试工具jmeter可用来进行性能测试」· HTML 代码 · 共 737 行 · 第 1/3 页
HTML
737 行
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#save()">save</A></B>()</CODE>
<BR>
save must be called to write the jmx file, otherwise it will not be
saved.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#setHost(java.lang.String)">setHost</A></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> host)</CODE>
<BR>
The host is the name of the server.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#setLabel(java.lang.String)">setLabel</A></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> label)</CODE>
<BR>
This is the label for the request, which is used in the logs and results.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#setMethod(java.lang.String)">setMethod</A></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> post_get)</CODE>
<BR>
The method is the HTTP request method. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#setParams(org.apache.jmeter.protocol.http.util.accesslog.NVPair[])">setParams</A></B>(<A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/NVPair.html" title="class in org.apache.jmeter.protocol.http.util.accesslog">NVPair</A>[] params)</CODE>
<BR>
Set the request parameters</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#setPath(java.lang.String)">setPath</A></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)</CODE>
<BR>
The path is the web page you want to test.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#setPort(int)">setPort</A></B>(int port)</CODE>
<BR>
The default port for HTTP is 80, but not all servers run on that port.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#setQueryString(java.lang.String)">setQueryString</A></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> querystring)</CODE>
<BR>
Set the querystring for the request if the method is GET.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#setSourceLogs(java.lang.String)">setSourceLogs</A></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> sourcefile)</CODE>
<BR>
The source logs is the location where the access log resides.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#setTarget(java.lang.Object)">setTarget</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> target)</CODE>
<BR>
The target can be either a java.io.File or a Sampler. </TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="SAMPLE"><!-- --></A><H3>
SAMPLE</H3>
<PRE>
protected <A HREF="../../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.html" title="class in org.apache.jmeter.protocol.http.sampler">HTTPSamplerBase</A> <B>SAMPLE</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="WRITER"><!-- --></A><H3>
WRITER</H3>
<PRE>
protected transient <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileWriter.html" title="class or interface in java.io">FileWriter</A> <B>WRITER</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="OUTPUT"><!-- --></A><H3>
OUTPUT</H3>
<PRE>
protected transient <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A> <B>OUTPUT</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="FILENAME"><!-- --></A><H3>
FILENAME</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>FILENAME</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="FILE"><!-- --></A><H3>
FILE</H3>
<PRE>
protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html" title="class or interface in java.io">File</A> <B>FILE</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="StandardGenerator()"><!-- --></A><H3>
StandardGenerator</H3>
<PRE>
public <B>StandardGenerator</B>()</PRE>
<DL>
<DD>The constructor is used by GUI and samplers to generate request objects.
<P>
</DL>
<HR>
<A NAME="StandardGenerator(java.lang.String)"><!-- --></A><H3>
StandardGenerator</H3>
<PRE>
public <B>StandardGenerator</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>
<DT><B>Parameters:</B><DD><CODE>file</CODE> - </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="initStream()"><!-- --></A><H3>
initStream</H3>
<PRE>
protected void <B>initStream</B>()</PRE>
<DL>
<DD>Create the FileWriter to save the JMX file.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="close()"><!-- --></A><H3>
close</H3>
<PRE>
public void <B>close</B>()</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">Generator</A></CODE></B></DD>
<DD>close the generator
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html#close()">close</A></CODE> in interface <CODE><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">Generator</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setHost(java.lang.String)"><!-- --></A><H3>
setHost</H3>
<PRE>
public void <B>setHost</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> host)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">Generator</A></CODE></B></DD>
<DD>The host is the name of the server.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html#setHost(java.lang.String)">setHost</A></CODE> in interface <CODE><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">Generator</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>host</CODE> - </DL>
</DD>
</DL>
<HR>
<A NAME="setLabel(java.lang.String)"><!-- --></A><H3>
setLabel</H3>
<PRE>
public void <B>setLabel</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> label)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">Generator</A></CODE></B></DD>
<DD>This is the label for the request, which is used in the logs and results.
<P>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?