blob: aa586d23e4d76ca824a8709123ef3f09eb00f76e [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>StandardGenerator (Apache JMeter dist API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="StandardGenerator (Apache JMeter dist API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><b>Apache JMeter</b></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/SharedTCLogParser.html" title="class in org.apache.jmeter.protocol.http.util.accesslog"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html" title="class in org.apache.jmeter.protocol.http.util.accesslog"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html" target="_top">Frames</a></li>
<li><a href="StandardGenerator.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.jmeter.protocol.http.util.accesslog</div>
<h2 title="Class StandardGenerator" class="title">Class StandardGenerator</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.jmeter.protocol.http.util.accesslog.StandardGenerator</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">Generator</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">StandardGenerator</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">Generator</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></pre>
<div class="block">Description:<br>
<br>
StandardGenerator will be the default generator used to pre-process logs. It
uses JMeter classes to generate the .jmx file. The first version of the
utility only generated the HTTP requests as XML, but it required users to
copy and paste it into a blank jmx file. Doing that way isn't flexible and
would require changes to keep the format in sync.
<p>
This version is a completely new class with a totally different
implementation, since generating the XML is no longer handled by the
generator. The generator is only responsible for handling the parsed results
and passing it to the appropriate JMeter class.
<p>
Notes:<br>
the class needs to first create a thread group and add it to the HashTree.
Then the samplers should be added to the thread group. Listeners shouldn't be
added and should be left up to the user. One option is to provide parameters,
so the user can pass the desired listener to the tool.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../serialized-form.html#org.apache.jmeter.protocol.http.util.accesslog.StandardGenerator">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#FILE">FILE</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#FILENAME">FILENAME</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#OUTPUT">OUTPUT</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.html" title="class in org.apache.jmeter.protocol.http.sampler">HTTPSamplerBase</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#SAMPLE">SAMPLE</a></span></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#StandardGenerator--">StandardGenerator</a></span>()</code>
<div class="block">The constructor is used by GUI and samplers to generate request objects.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#StandardGenerator-java.lang.String-">StandardGenerator</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;file)</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#close--">close</a></span>()</code>
<div class="block">close the generator</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#generateRequest--">generateRequest</a></span>()</code>
<div class="block">The method is responsible for calling the necessary methods to generate a
valid request.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#initStream--">initStream</a></span>()</code>
<div class="block">Create the OutputStream to save the JMX file.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#reset--">reset</a></span>()</code>
<div class="block">Reset the HTTPSampler to make sure it is a new instance.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#save--">save</a></span>()</code>
<div class="block">save must be called to write the jmx file, otherwise it will not be
saved.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#setHost-java.lang.String-">setHost</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;host)</code>
<div class="block">The host is the name of the server.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#setLabel-java.lang.String-">setLabel</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;label)</code>
<div class="block">This is the label for the request, which is used in the logs and results.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#setMethod-java.lang.String-">setMethod</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;post_get)</code>
<div class="block">The method is the HTTP request method.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#setParams-org.apache.jmeter.protocol.http.util.accesslog.NVPair:A-">setParams</a></span>(<a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/NVPair.html" title="class in org.apache.jmeter.protocol.http.util.accesslog">NVPair</a>[]&nbsp;params)</code>
<div class="block">Set the request parameters</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#setPath-java.lang.String-">setPath</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;path)</code>
<div class="block">The path is the web page you want to test.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#setPort-int-">setPort</a></span>(int&nbsp;port)</code>
<div class="block">The default port for HTTP is 80, but not all servers run on that port.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#setQueryString-java.lang.String-">setQueryString</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;querystring)</code>
<div class="block">Set the querystring for the request if the method is GET.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#setSourceLogs-java.lang.String-">setSourceLogs</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;sourcefile)</code>
<div class="block">The source logs is the location where the access log resides.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html#setTarget-java.lang.Object-">setTarget</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;target)</code>
<div class="block">The target can be either a java.io.File or a Sampler.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="SAMPLE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SAMPLE</h4>
<pre>protected&nbsp;<a href="../../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.html" title="class in org.apache.jmeter.protocol.http.sampler">HTTPSamplerBase</a> SAMPLE</pre>
</li>
</ul>
<a name="OUTPUT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>OUTPUT</h4>
<pre>protected transient&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> OUTPUT</pre>
</li>
</ul>
<a name="FILENAME">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FILENAME</h4>
<pre>protected&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> FILENAME</pre>
</li>
</ul>
<a name="FILE">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>FILE</h4>
<pre>protected&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> FILE</pre>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="StandardGenerator--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>StandardGenerator</h4>
<pre>public&nbsp;StandardGenerator()</pre>
<div class="block">The constructor is used by GUI and samplers to generate request objects.</div>
</li>
</ul>
<a name="StandardGenerator-java.lang.String-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>StandardGenerator</h4>
<pre>public&nbsp;StandardGenerator(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;file)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>file</code> - name of a file (TODO seems not to be used anywhere)</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="initStream--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>initStream</h4>
<pre>protected&nbsp;void&nbsp;initStream()</pre>
<div class="block">Create the OutputStream to save the JMX file.</div>
</li>
</ul>
<a name="close--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>public&nbsp;void&nbsp;close()</pre>
<div class="block">close the generator</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html#close--">close</a></code>&nbsp;in interface&nbsp;<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></dd>
</dl>
</li>
</ul>
<a name="setHost-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setHost</h4>
<pre>public&nbsp;void&nbsp;setHost(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;host)</pre>
<div class="block">The host is the name of the server.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html#setHost-java.lang.String-">setHost</a></code>&nbsp;in interface&nbsp;<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></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>host</code> - name of the server</dd>
</dl>
</li>
</ul>
<a name="setLabel-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLabel</h4>
<pre>public&nbsp;void&nbsp;setLabel(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;label)</pre>
<div class="block">This is the label for the request, which is used in the logs and results.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html#setLabel-java.lang.String-">setLabel</a></code>&nbsp;in interface&nbsp;<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></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>label</code> - label of the request</dd>
</dl>
</li>
</ul>
<a name="setMethod-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMethod</h4>
<pre>public&nbsp;void&nbsp;setMethod(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;post_get)</pre>
<div class="block">The method is the HTTP request method. It's normally POST or GET.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html#setMethod-java.lang.String-">setMethod</a></code>&nbsp;in interface&nbsp;<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></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>post_get</code> - method of the HTTP request</dd>
</dl>
</li>
</ul>
<a name="setParams-org.apache.jmeter.protocol.http.util.accesslog.NVPair:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setParams</h4>
<pre>public&nbsp;void&nbsp;setParams(<a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/NVPair.html" title="class in org.apache.jmeter.protocol.http.util.accesslog">NVPair</a>[]&nbsp;params)</pre>
<div class="block">Set the request parameters</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html#setParams-org.apache.jmeter.protocol.http.util.accesslog.NVPair:A-">setParams</a></code>&nbsp;in interface&nbsp;<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></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>params</code> - request parameter</dd>
</dl>
</li>
</ul>
<a name="setPath-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPath</h4>
<pre>public&nbsp;void&nbsp;setPath(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;path)</pre>
<div class="block">The path is the web page you want to test.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html#setPath-java.lang.String-">setPath</a></code>&nbsp;in interface&nbsp;<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></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>path</code> - path of the web page</dd>
</dl>
</li>
</ul>
<a name="setPort-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPort</h4>
<pre>public&nbsp;void&nbsp;setPort(int&nbsp;port)</pre>
<div class="block">The default port for HTTP is 80, but not all servers run on that port.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html#setPort-int-">setPort</a></code>&nbsp;in interface&nbsp;<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></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>port</code> - -
port number</dd>
</dl>
</li>
</ul>
<a name="setQueryString-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setQueryString</h4>
<pre>public&nbsp;void&nbsp;setQueryString(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;querystring)</pre>
<div class="block">Set the querystring for the request if the method is GET.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html#setQueryString-java.lang.String-">setQueryString</a></code>&nbsp;in interface&nbsp;<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></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>querystring</code> - query string of the request</dd>
</dl>
</li>
</ul>
<a name="setSourceLogs-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSourceLogs</h4>
<pre>public&nbsp;void&nbsp;setSourceLogs(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;sourcefile)</pre>
<div class="block">The source logs is the location where the access log resides.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html#setSourceLogs-java.lang.String-">setSourceLogs</a></code>&nbsp;in interface&nbsp;<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></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>sourcefile</code> - path to the access log file</dd>
</dl>
</li>
</ul>
<a name="setTarget-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setTarget</h4>
<pre>public&nbsp;void&nbsp;setTarget(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;target)</pre>
<div class="block">The target can be either a java.io.File or a Sampler. We make it generic,
so that later on we can use these classes directly from a HTTPSampler.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html#setTarget-java.lang.Object-">setTarget</a></code>&nbsp;in interface&nbsp;<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></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>target</code> - target to generate into</dd>
</dl>
</li>
</ul>
<a name="generateRequest--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>generateRequest</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;generateRequest()</pre>
<div class="block">The method is responsible for calling the necessary methods to generate a
valid request. If the generator is used to pre-process access logs, the
method wouldn't return anything. If the generator is used by a control
element, it should return the correct Sampler class with the required
fields set.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html#generateRequest--">generateRequest</a></code>&nbsp;in interface&nbsp;<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></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>prefilled sampler</dd>
</dl>
</li>
</ul>
<a name="save--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>save</h4>
<pre>public&nbsp;void&nbsp;save()</pre>
<div class="block">save must be called to write the jmx file, otherwise it will not be
saved.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html#save--">save</a></code>&nbsp;in interface&nbsp;<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></dd>
</dl>
</li>
</ul>
<a name="reset--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>reset</h4>
<pre>public&nbsp;void&nbsp;reset()</pre>
<div class="block">Reset the HTTPSampler to make sure it is a new instance.
<p>
The purpose of the reset is so Samplers can explicitly call reset to
create a new instance of HTTPSampler.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html#reset--">reset</a></code>&nbsp;in interface&nbsp;<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></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><b>Apache JMeter</b></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/SharedTCLogParser.html" title="class in org.apache.jmeter.protocol.http.util.accesslog"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html" title="class in org.apache.jmeter.protocol.http.util.accesslog"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html" target="_top">Frames</a></li>
<li><a href="StandardGenerator.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright © 1998-2021 Apache Software Foundation. All Rights Reserved.</small></p>
</body>
</html>