javasamplercontext.html

来自「测试工具jmeter可用来进行性能测试」· HTML 代码 · 共 466 行 · 第 1/2 页

HTML
466
字号
<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="JavaSamplerContext(org.apache.jmeter.config.Arguments)"><!-- --></A><H3>
JavaSamplerContext</H3>
<PRE>
public <B>JavaSamplerContext</B>(<A HREF="../../../../../../org/apache/jmeter/config/Arguments.html" title="class in org.apache.jmeter.config">Arguments</A>&nbsp;args)</PRE>
<DL>
<DD>Create a new JavaSampler with the specified initialization parameters.
<P>
<DT><B>Parameters:</B><DD><CODE>args</CODE> - the initialization parameters.</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="containsParameter(java.lang.String)"><!-- --></A><H3>
containsParameter</H3>
<PRE>
public boolean <B>containsParameter</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>&nbsp;name)</PRE>
<DL>
<DD>Determine whether or not a value has been specified for the parameter
 with this name.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the parameter to test
<DT><B>Returns:</B><DD>true if the parameter value has been specified, false otherwise.</DL>
</DD>
</DL>
<HR>

<A NAME="getParameterNamesIterator()"><!-- --></A><H3>
getParameterNamesIterator</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A> <B>getParameterNamesIterator</B>()</PRE>
<DL>
<DD>Get an iterator of the parameter names. Each entry in the Iterator is a
 String.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>an Iterator of Strings listing the names of the parameters which
         have been specified for this test.</DL>
</DD>
</DL>
<HR>

<A NAME="getParameter(java.lang.String)"><!-- --></A><H3>
getParameter</H3>
<PRE>
public <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>getParameter</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>&nbsp;name)</PRE>
<DL>
<DD>Get the value of a specific parameter as a String, or null if the value
 was not specified.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the parameter whose value should be retrieved
<DT><B>Returns:</B><DD>the value of the parameter, or null if the value was not
         specified</DL>
</DD>
</DL>
<HR>

<A NAME="getParameter(java.lang.String, java.lang.String)"><!-- --></A><H3>
getParameter</H3>
<PRE>
public <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>getParameter</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>&nbsp;name,
                           <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>&nbsp;defaultValue)</PRE>
<DL>
<DD>Get the value of a specified parameter as a String, or return the
 specified default value if the value was not specified.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the parameter whose value should be retrieved<DD><CODE>defaultValue</CODE> - the default value to return if the value of this parameter was
            not specified
<DT><B>Returns:</B><DD>the value of the parameter, or the default value if the parameter
         was not specified</DL>
</DD>
</DL>
<HR>

<A NAME="getIntParameter(java.lang.String)"><!-- --></A><H3>
getIntParameter</H3>
<PRE>
public int <B>getIntParameter</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>&nbsp;name)
                    throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/NumberFormatException.html" title="class or interface in java.lang">NumberFormatException</A></PRE>
<DL>
<DD>Get the value of a specified parameter as an integer. An exception will
 be thrown if the parameter is not specified or if it is not an integer.
 The value may be specified in decimal, hexadecimal, or octal, as defined
 by Integer.decode().
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the parameter whose value should be retrieved
<DT><B>Returns:</B><DD>the value of the parameter
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/NumberFormatException.html" title="class or interface in java.lang">NumberFormatException</A></CODE> - if the parameter is not specified or is not an integer<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Integer.html#decode(java.lang.String)" title="class or interface in java.lang"><CODE>Integer.decode(java.lang.String)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getIntParameter(java.lang.String, int)"><!-- --></A><H3>
getIntParameter</H3>
<PRE>
public int <B>getIntParameter</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>&nbsp;name,
                           int&nbsp;defaultValue)</PRE>
<DL>
<DD>Get the value of a specified parameter as an integer, or return the
 specified default value if the value was not specified or is not an
 integer. A warning will be logged if the value is not an integer. The
 value may be specified in decimal, hexadecimal, or octal, as defined by
 Integer.decode().
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the parameter whose value should be retrieved<DD><CODE>defaultValue</CODE> - the default value to return if the value of this parameter was
            not specified
<DT><B>Returns:</B><DD>the value of the parameter, or the default value if the parameter
         was not specified<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Integer.html#decode(java.lang.String)" title="class or interface in java.lang"><CODE>Integer.decode(java.lang.String)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getLongParameter(java.lang.String)"><!-- --></A><H3>
getLongParameter</H3>
<PRE>
public long <B>getLongParameter</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>&nbsp;name)
                      throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/NumberFormatException.html" title="class or interface in java.lang">NumberFormatException</A></PRE>
<DL>
<DD>Get the value of a specified parameter as a long. An exception will be
 thrown if the parameter is not specified or if it is not a long. The
 value may be specified in decimal, hexadecimal, or octal, as defined by
 Long.decode().
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the parameter whose value should be retrieved
<DT><B>Returns:</B><DD>the value of the parameter
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/NumberFormatException.html" title="class or interface in java.lang">NumberFormatException</A></CODE> - if the parameter is not specified or is not a long<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Long.html#decode(java.lang.String)" title="class or interface in java.lang"><CODE>Long.decode(String)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getLongParameter(java.lang.String, long)"><!-- --></A><H3>
getLongParameter</H3>
<PRE>
public long <B>getLongParameter</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>&nbsp;name,
                             long&nbsp;defaultValue)</PRE>
<DL>
<DD>Get the value of a specified parameter as along, or return the specified
 default value if the value was not specified or is not a long. A warning
 will be logged if the value is not a long. The value may be specified in
 decimal, hexadecimal, or octal, as defined by Long.decode().
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the parameter whose value should be retrieved<DD><CODE>defaultValue</CODE> - the default value to return if the value of this parameter was
            not specified
<DT><B>Returns:</B><DD>the value of the parameter, or the default value if the parameter
         was not specified<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Long.html#decode(java.lang.String)" title="class or interface in java.lang"><CODE>Long.decode(String)</CODE></A></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<b>Apache JMeter</b></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../../org/apache/jmeter/protocol/java/sampler/JavaSampler.html" title="class in org.apache.jmeter.protocol.java.sampler"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/jmeter/protocol/java/sampler/JUnitSampler.html" title="class in org.apache.jmeter.protocol.java.sampler"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="JavaSamplerContext.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>

</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright &#xA9; 1998-2008 Apache Software Foundation. All Rights Reserved.
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?