blob: 6cba8590ae3457100ba1488f8628beaa2a3b43bf [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>Generator (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="Generator (Apache JMeter dist API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract 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/Filter.html" title="interface 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/LogFilter.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/Generator.html" target="_top">Frames</a></li>
<li><a href="Generator.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>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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="Interface Generator" class="title">Interface Generator</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.html" title="class in org.apache.jmeter.protocol.http.util.accesslog">StandardGenerator</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">Generator</span></pre>
<div class="block">Description:<br>
<br>
Generator is a base interface that defines the minimum methods needed to
implement a concrete generator. The reason for creating this interface is
eventually JMeter could use the logs directly rather than pre- process the
logs into a JMeter .jmx file. In situations where a test plan simulates load
from production logs, it is more efficient for JMeter to use the logs
directly.
<p>
From first hand experience, loading a test plan with 10K or more Requests
requires a lot of memory. It's important to keep in mind this type of testing
is closer to functional and regression testing than the typical stress tests.
Typically, this kind of testing is most useful for search sites that get a
large number of requests per day, but the request parameters vary
dramatically. E-commerce sites typically have limited inventory, therefore it
is better to design test plans that use data from the database.
</p></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== 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="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract 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/Generator.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/Generator.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>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Generator.html#reset--">reset</a></span>()</code>
<div class="block">The purpose of the reset is so Samplers can explicitly call reset to
create a new instance of HTTPSampler.</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/Generator.html#save--">save</a></span>()</code>
<div class="block">If the generator is converting the logs to a .jmx file, save should be
called.</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/Generator.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="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/Generator.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="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/Generator.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="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/Generator.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="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/Generator.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="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/Generator.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="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/Generator.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="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/Generator.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="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/Generator.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>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="close--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>void&nbsp;close()</pre>
<div class="block">close the generator</div>
</li>
</ul>
<a name="setHost-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setHost</h4>
<pre>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="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>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="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>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="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>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="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>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="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>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="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>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="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>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="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>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="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><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="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>void&nbsp;save()</pre>
<div class="block">If the generator is converting the logs to a .jmx file, save should be
called.</div>
</li>
</ul>
<a name="reset--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>reset</h4>
<pre>void&nbsp;reset()</pre>
<div class="block">The purpose of the reset is so Samplers can explicitly call reset to
create a new instance of HTTPSampler.</div>
</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/Filter.html" title="interface 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/LogFilter.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/Generator.html" target="_top">Frames</a></li>
<li><a href="Generator.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>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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>