blob: d144cc48bd68218200b1478ea1dd67b3b8852d20 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>TCLogParser (Apache JMeter dist API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.jmeter.protocol.http.util.accesslog, class: TCLogParser">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../../../script-dir/jquery-3.6.1.min.js"></script>
<script type="text/javascript" src="../../../../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../../../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<div class="about-language"><b>Apache JMeter</b></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">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#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<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="sub-nav-list">
<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>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.jmeter.protocol.http.util.accesslog</a></div>
<h1 title="Class TCLogParser" class="title">Class TCLogParser</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance">org.apache.jmeter.protocol.http.util.accesslog.TCLogParser</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="LogParser.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">LogParser</a></code></dd>
</dl>
<dl class="notes">
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="SharedTCLogParser.html" title="class in org.apache.jmeter.protocol.http.util.accesslog">SharedTCLogParser</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="annotations">@AutoService(<a href="LogParser.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">LogParser.class</a>)
</span><span class="modifiers">public class </span><span class="element-name type-name-label">TCLogParser</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>
implements <a href="LogParser.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">LogParser</a></span></div>
<div class="block">Description:<br>
<br>
Currently the parser only handles GET/POST requests. It's easy enough to add
support for other request methods by changing checkMethod. The is a complete
rewrite of a tool I wrote for myself earlier. The older algorithm was basic
and did not provide the same level of flexibility I want, so I wrote a new
one using a totally new algorithm. This implementation reads one line at a
time using BufferedReader. When it gets to the end of the file and the
sampler needs to get more requests, the parser will re-initialize the
BufferedReader. The implementation uses StringTokenizer to create tokens.
<p>
The parse algorithm is the following:
<ol>
<li> cleans the entry by looking for backslash "\"
<li> looks to see if GET or POST is in the line
<li> tokenizes using quotes "
<li> finds the token with the request method
<li> gets the string of the token and tokenizes it using space
<li> finds the first token beginning with slash character
<li> tokenizes the string using question mark "?"
<li> get the path from the first token
<li> returns the second token and checks it for parameters
<li> tokenizes the string using ampersand "&amp;"
<li> parses each token to name/value pairs
</ol>
<p>
Extending this class is fairly simple. Most access logs use the same format
starting from the request method. Therefore, changing the implementation of
cleanURL(string) method should be sufficient to support new log formats.
Tomcat uses common log format, so any webserver that uses the format should
work with this parser. Servers that are known to use non standard formats are
IIS and Netscape.</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>protected boolean</code></div>
<div class="col-second even-row-color"><code><a href="#decode" class="member-name-link">decode</a></code></div>
<div class="col-last even-row-color">
<div class="block">by default, we probably should decode the parameter values</div>
</div>
<div class="col-first odd-row-color"><code>protected <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second odd-row-color"><code><a href="#FILENAME" class="member-name-link">FILENAME</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>protected <a href="Filter.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">Filter</a></code></div>
<div class="col-second even-row-color"><code><a href="#FILTER" class="member-name-link">FILTER</a></code></div>
<div class="col-last even-row-color">
<div class="block">Handles to supporting classes</div>
</div>
<div class="col-first odd-row-color"><code>static final <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second odd-row-color"><code><a href="#GET" class="member-name-link">GET</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>static final <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color"><code><a href="#HEAD" class="member-name-link">HEAD</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>protected static final org.slf4j.Logger</code></div>
<div class="col-second odd-row-color"><code><a href="#log" class="member-name-link">log</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>static final <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color"><code><a href="#POST" class="member-name-link">POST</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>protected <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/BufferedReader.html" title="class or interface in java.io" class="external-link">BufferedReader</a></code></div>
<div class="col-second odd-row-color"><code><a href="#READER" class="member-name-link">READER</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>protected <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color"><code><a href="#RMETHOD" class="member-name-link">RMETHOD</a></code></div>
<div class="col-last even-row-color">
<div class="block">protected members *</div>
</div>
<div class="col-first odd-row-color"><code>protected <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html" title="class or interface in java.io" class="external-link">File</a></code></div>
<div class="col-second odd-row-color"><code><a href="#SOURCE" class="member-name-link">SOURCE</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>protected <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color"><code><a href="#URL_PATH" class="member-name-link">URL_PATH</a></code></div>
<div class="col-last even-row-color">
<div class="block">The path to the access log file</div>
</div>
<div class="col-first odd-row-color"><code>protected boolean</code></div>
<div class="col-second odd-row-color"><code><a href="#useFILE" class="member-name-link">useFILE</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
</div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">TCLogParser</a>()</code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(java.lang.String)" class="member-name-link">TCLogParser</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;source)</code></div>
<div class="col-last odd-row-color">&nbsp;</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#checkMethod(java.lang.String)" class="member-name-link">checkMethod</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;text)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">The method checks for <code>POST</code>, <code>GET</code> and <code>HEAD</code> methods currently.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#checkParamFormat(java.lang.String)" class="member-name-link">checkParamFormat</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;text)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Checks the string to see if it contains "&amp;" and "=".</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#checkURL(java.lang.String)" class="member-name-link">checkURL</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;url)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Checks the string to make sure it has <code>/path/file?name=value</code> format.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#cleanURL(java.lang.String)" class="member-name-link">cleanURL</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;entry)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">The method cleans the URL using the following algorithm.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#close()" class="member-name-link">close</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">close the any streams or readers.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#convertStringToJMRequest(java.lang.String,org.apache.jmeter.testelement.TestElement)" class="member-name-link">convertStringToJMRequest</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;text,
org.apache.jmeter.testelement.TestElement&nbsp;el)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Convert a single line into XML</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="NVPair.html" title="class in org.apache.jmeter.protocol.http.util.accesslog">NVPair</a>[]</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#convertStringtoNVPair(java.lang.String)" class="member-name-link">convertStringtoNVPair</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;stringparams)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Parse the string parameters into NVPair[] array.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#decodeParameterValue()" class="member-name-link">decodeParameterValue</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">decode the parameter values is to true by default</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#parse(java.io.BufferedReader,org.apache.jmeter.testelement.TestElement,int)" class="member-name-link">parse</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/BufferedReader.html" title="class or interface in java.io" class="external-link">BufferedReader</a>&nbsp;breader,
org.apache.jmeter.testelement.TestElement&nbsp;el,
int&nbsp;parseCount)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">The method is responsible for reading each line, and breaking out of the
while loop if a set number of lines is given.<br>
Note: empty lines will not be counted</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#parse(org.apache.jmeter.testelement.TestElement,int)" class="member-name-link">parse</a><wbr>(org.apache.jmeter.testelement.TestElement&nbsp;el,
int&nbsp;parseCount)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">parse the entire file.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#parseAndConfigure(int,org.apache.jmeter.testelement.TestElement)" class="member-name-link">parseAndConfigure</a><wbr>(int&nbsp;count,
org.apache.jmeter.testelement.TestElement&nbsp;el)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">parse a set number of lines from the access log.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#parseLine(java.lang.String,org.apache.jmeter.testelement.TestElement)" class="member-name-link">parseLine</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;line,
org.apache.jmeter.testelement.TestElement&nbsp;el)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">parseLine calls the other parse methods to parse the given text.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected <a href="NVPair.html" title="class in org.apache.jmeter.protocol.http.util.accesslog">NVPair</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#parseOneParameter(java.lang.String)" class="member-name-link">parseOneParameter</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;parameter)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Method expects name and value to be separated by an equal sign "=".</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#parseParameters(java.lang.String)" class="member-name-link">parseParameters</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;parameters)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Method uses StringTokenizer to convert the string into single pairs.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setDecodeParameterValues(boolean)" class="member-name-link">setDecodeParameterValues</a><wbr>(boolean&nbsp;decodeparams)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">by default decode is set to true.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setFilter(org.apache.jmeter.protocol.http.util.accesslog.Filter)" class="member-name-link">setFilter</a><wbr>(<a href="Filter.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">Filter</a>&nbsp;filter)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Use the filter to include/exclude files in the access logs.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setSourceFile(java.lang.String)" class="member-name-link">setSourceFile</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;source)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the source file.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setUseParsedFile(boolean)" class="member-name-link">setUseParsedFile</a><wbr>(boolean&nbsp;file)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Calls this method to set whether or not to use the path in the log.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#stripFile(java.lang.String,org.apache.jmeter.testelement.TestElement)" class="member-name-link">stripFile</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;url,
org.apache.jmeter.testelement.TestElement&nbsp;el)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Tokenize the URL into two tokens.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/StringTokenizer.html" title="class or interface in java.util" class="external-link">StringTokenizer</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#tokenize(java.lang.String,java.lang.String)" class="member-name-link">tokenize</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;line,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;delim)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Parses the line using java.util.StringTokenizer.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="log">
<h3>log</h3>
<div class="member-signature"><span class="modifiers">protected static final</span>&nbsp;<span class="return-type">org.slf4j.Logger</span>&nbsp;<span class="element-name">log</span></div>
</section>
</li>
<li>
<section class="detail" id="GET">
<h3>GET</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">GET</span></div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../../../../../../../constant-values.html#org.apache.jmeter.protocol.http.util.accesslog.TCLogParser.GET">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="POST">
<h3>POST</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">POST</span></div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../../../../../../../constant-values.html#org.apache.jmeter.protocol.http.util.accesslog.TCLogParser.POST">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="HEAD">
<h3>HEAD</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">HEAD</span></div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../../../../../../../constant-values.html#org.apache.jmeter.protocol.http.util.accesslog.TCLogParser.HEAD">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="RMETHOD">
<h3>RMETHOD</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">RMETHOD</span></div>
<div class="block">protected members *</div>
</section>
</li>
<li>
<section class="detail" id="URL_PATH">
<h3>URL_PATH</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">URL_PATH</span></div>
<div class="block">The path to the access log file</div>
</section>
</li>
<li>
<section class="detail" id="useFILE">
<h3>useFILE</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">useFILE</span></div>
</section>
</li>
<li>
<section class="detail" id="SOURCE">
<h3>SOURCE</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html" title="class or interface in java.io" class="external-link">File</a></span>&nbsp;<span class="element-name">SOURCE</span></div>
</section>
</li>
<li>
<section class="detail" id="FILENAME">
<h3>FILENAME</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">FILENAME</span></div>
</section>
</li>
<li>
<section class="detail" id="READER">
<h3>READER</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/BufferedReader.html" title="class or interface in java.io" class="external-link">BufferedReader</a></span>&nbsp;<span class="element-name">READER</span></div>
</section>
</li>
<li>
<section class="detail" id="FILTER">
<h3>FILTER</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type"><a href="Filter.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">Filter</a></span>&nbsp;<span class="element-name">FILTER</span></div>
<div class="block">Handles to supporting classes</div>
</section>
</li>
<li>
<section class="detail" id="decode">
<h3>decode</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">decode</span></div>
<div class="block">by default, we probably should decode the parameter values</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>TCLogParser</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">TCLogParser</span>()</div>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(java.lang.String)">
<h3>TCLogParser</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">TCLogParser</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;source)</span></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>source</code> - name of the source file</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="setDecodeParameterValues(boolean)">
<h3>setDecodeParameterValues</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setDecodeParameterValues</span><wbr><span class="parameters">(boolean&nbsp;decodeparams)</span></div>
<div class="block">by default decode is set to true. if the parameters shouldn't be
decoded, call the method with false</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>decodeparams</code> - flag whether parameters should be decoded</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="decodeParameterValue()">
<h3>decodeParameterValue</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">decodeParameterValue</span>()</div>
<div class="block">decode the parameter values is to true by default</div>
<dl class="notes">
<dt>Returns:</dt>
<dd><code>true</code> if parameter values should be decoded, <code>false</code> otherwise</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setUseParsedFile(boolean)">
<h3>setUseParsedFile</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setUseParsedFile</span><wbr><span class="parameters">(boolean&nbsp;file)</span></div>
<div class="block">Calls this method to set whether or not to use the path in the log. We
may want to provide the ability to filter the log file later on. By
default, the parser uses the file in the log.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>file</code> - flag whether to use the path from the log</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setFilter(org.apache.jmeter.protocol.http.util.accesslog.Filter)">
<h3>setFilter</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setFilter</span><wbr><span class="parameters">(<a href="Filter.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">Filter</a>&nbsp;filter)</span></div>
<div class="block">Use the filter to include/exclude files in the access logs. This is
provided as a convenience and reduce the need to spend hours cleaning up
log files.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="LogParser.html#setFilter(org.apache.jmeter.protocol.http.util.accesslog.Filter)">setFilter</a></code>&nbsp;in interface&nbsp;<code><a href="LogParser.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">LogParser</a></code></dd>
<dt>Parameters:</dt>
<dd><code>filter</code> - <a href="Filter.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog"><code>Filter</code></a> to be used while reading the log lines</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setSourceFile(java.lang.String)">
<h3>setSourceFile</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setSourceFile</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;source)</span></div>
<div class="block">Sets the source file.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="LogParser.html#setSourceFile(java.lang.String)">setSourceFile</a></code>&nbsp;in interface&nbsp;<code><a href="LogParser.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">LogParser</a></code></dd>
<dt>Parameters:</dt>
<dd><code>source</code> - name of the source file</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="parse(org.apache.jmeter.testelement.TestElement,int)">
<h3>parse</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">parse</span><wbr><span class="parameters">(org.apache.jmeter.testelement.TestElement&nbsp;el,
int&nbsp;parseCount)</span></div>
<div class="block">parse the entire file.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>el</code> - TestElement to read the lines into</dd>
<dd><code>parseCount</code> - number of max lines to read</dd>
<dt>Returns:</dt>
<dd>number of read lines, or <code>-1</code> if an error occurred while reading</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="parseAndConfigure(int,org.apache.jmeter.testelement.TestElement)">
<h3>parseAndConfigure</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">parseAndConfigure</span><wbr><span class="parameters">(int&nbsp;count,
org.apache.jmeter.testelement.TestElement&nbsp;el)</span></div>
<div class="block">parse a set number of lines from the access log. Keep in mind the number
of lines parsed will depend on the filter and number of lines in the log.
The method returns the actual number of lines parsed.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="LogParser.html#parseAndConfigure(int,org.apache.jmeter.testelement.TestElement)">parseAndConfigure</a></code>&nbsp;in interface&nbsp;<code><a href="LogParser.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">LogParser</a></code></dd>
<dt>Parameters:</dt>
<dd><code>count</code> - number of lines to read</dd>
<dd><code>el</code> - <code>TestElement</code> to read lines into</dd>
<dt>Returns:</dt>
<dd>lines parsed</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="parse(java.io.BufferedReader,org.apache.jmeter.testelement.TestElement,int)">
<h3>parse</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">parse</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/BufferedReader.html" title="class or interface in java.io" class="external-link">BufferedReader</a>&nbsp;breader,
org.apache.jmeter.testelement.TestElement&nbsp;el,
int&nbsp;parseCount)</span></div>
<div class="block">The method is responsible for reading each line, and breaking out of the
while loop if a set number of lines is given.<br>
Note: empty lines will not be counted</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>breader</code> - <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/BufferedReader.html" title="class or interface in java.io" class="external-link"><code>BufferedReader</code></a> to read lines from</dd>
<dd><code>el</code> - <code>TestElement</code> to read lines into</dd>
<dd><code>parseCount</code> - number of lines to read</dd>
<dt>Returns:</dt>
<dd>number of lines parsed</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="parseLine(java.lang.String,org.apache.jmeter.testelement.TestElement)">
<h3>parseLine</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">parseLine</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;line,
org.apache.jmeter.testelement.TestElement&nbsp;el)</span></div>
<div class="block">parseLine calls the other parse methods to parse the given text.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>line</code> - single line to be parsed</dd>
<dd><code>el</code> - <code>TestElement</code> in which the line will be added</dd>
<dt>Returns:</dt>
<dd>number of lines parsed (zero or one, actually)</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="cleanURL(java.lang.String)">
<h3>cleanURL</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">cleanURL</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;entry)</span></div>
<div class="block">The method cleans the URL using the following algorithm.
<ol>
<li> check for double quotes
<li> check the request method
<li> tokenize using double quotes
<li> find first token containing request method
<li> tokenize string using space
<li> find first token that begins with "/"
</ol>
Example Tomcat log entry:
<p>
127.0.0.1 - - [08/Jan/2003:07:03:54 -0500] "GET /addrbook/ HTTP/1.1" 200
1981
<p>
would result in the extracted url <code>/addrbook/</code></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>entry</code> - line from which the url is to be extracted</dd>
<dt>Returns:</dt>
<dd>cleaned url</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="checkMethod(java.lang.String)">
<h3>checkMethod</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">checkMethod</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;text)</span></div>
<div class="block">The method checks for <code>POST</code>, <code>GET</code> and <code>HEAD</code> methods currently.
The other methods aren't supported yet.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>text</code> - text to be checked for HTTP method</dd>
<dt>Returns:</dt>
<dd><code>true</code> if method is supported, <code>false</code> otherwise</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="stripFile(java.lang.String,org.apache.jmeter.testelement.TestElement)">
<h3>stripFile</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">stripFile</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;url,
org.apache.jmeter.testelement.TestElement&nbsp;el)</span></div>
<div class="block">Tokenize the URL into two tokens. If the URL has more than one "?", the
parse may fail. Only the first two tokens are used. The first token is
automatically parsed and set at TCLogParser#URL_PATH.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>url</code> - url which should be stripped from parameters</dd>
<dd><code>el</code> - <code>TestElement</code> to parse url into</dd>
<dt>Returns:</dt>
<dd>String presenting the parameters, or <code>null</code> when none where found</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="checkURL(java.lang.String)">
<h3>checkURL</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">checkURL</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;url)</span></div>
<div class="block">Checks the string to make sure it has <code>/path/file?name=value</code> format. If
the string doesn't contains a "?", it will return <code>false</code>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>url</code> - url to check for parameters</dd>
<dt>Returns:</dt>
<dd><code>true</code> if url contains a <code>?</code>,
<code>false</code> otherwise</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="checkParamFormat(java.lang.String)">
<h3>checkParamFormat</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">checkParamFormat</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;text)</span></div>
<div class="block">Checks the string to see if it contains "&amp;" and "=". If it does, return
<code>true</code>, so that it can be parsed.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>text</code> - text to be checked for <code>&amp;</code> and <code>=</code></dd>
<dt>Returns:</dt>
<dd><code>true</code> if <code>text</code> contains both <code>&amp;</code>
and <code>=</code>, <code>false</code> otherwise</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="convertStringToJMRequest(java.lang.String,org.apache.jmeter.testelement.TestElement)">
<h3>convertStringToJMRequest</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">convertStringToJMRequest</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;text,
org.apache.jmeter.testelement.TestElement&nbsp;el)</span></div>
<div class="block">Convert a single line into XML</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>text</code> - to be converted</dd>
<dd><code>el</code> - <a href="../../sampler/HTTPSamplerBase.html" title="class in org.apache.jmeter.protocol.http.sampler"><code>HTTPSamplerBase</code></a> which consumes the <code>text</code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="convertStringtoNVPair(java.lang.String)">
<h3>convertStringtoNVPair</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="NVPair.html" title="class in org.apache.jmeter.protocol.http.util.accesslog">NVPair</a>[]</span>&nbsp;<span class="element-name">convertStringtoNVPair</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;stringparams)</span></div>
<div class="block">Parse the string parameters into NVPair[] array. Once they are parsed, it
is returned. The method uses parseOneParameter(string) to convert each
pair.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>stringparams</code> - String with parameters to be parsed</dd>
<dt>Returns:</dt>
<dd>array of <a href="NVPair.html" title="class in org.apache.jmeter.protocol.http.util.accesslog"><code>NVPair</code></a>s</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="parseOneParameter(java.lang.String)">
<h3>parseOneParameter</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type"><a href="NVPair.html" title="class in org.apache.jmeter.protocol.http.util.accesslog">NVPair</a></span>&nbsp;<span class="element-name">parseOneParameter</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;parameter)</span></div>
<div class="block">Method expects name and value to be separated by an equal sign "=". The
method uses StringTokenizer to make a NVPair object. If there happens to
be more than one "=" sign, the others are ignored. The chance of a string
containing more than one is unlikely and would not conform to HTTP spec.
I should double check the protocol spec to make sure this is accurate.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>parameter</code> - to be parsed</dd>
<dt>Returns:</dt>
<dd><a href="NVPair.html" title="class in org.apache.jmeter.protocol.http.util.accesslog"><code>NVPair</code></a> with the parsed name and value of the parameter</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="parseParameters(java.lang.String)">
<h3>parseParameters</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&gt;</span>&nbsp;<span class="element-name">parseParameters</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;parameters)</span></div>
<div class="block">Method uses StringTokenizer to convert the string into single pairs. The
string should conform to HTTP protocol spec, which means the name/value
pairs are separated by the ampersand symbol "&amp;". Someone could write the
querystrings by hand, but that would be round about and go against the
purpose of this utility.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>parameters</code> - string to be parsed</dd>
<dt>Returns:</dt>
<dd>List of name/value pairs</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="tokenize(java.lang.String,java.lang.String)">
<h3>tokenize</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/StringTokenizer.html" title="class or interface in java.util" class="external-link">StringTokenizer</a></span>&nbsp;<span class="element-name">tokenize</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;line,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;delim)</span></div>
<div class="block">Parses the line using java.util.StringTokenizer.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>line</code> - line to be parsed</dd>
<dd><code>delim</code> - delimiter</dd>
<dt>Returns:</dt>
<dd>StringTokenizer constructed with <code>line</code> and <code>delim</code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="close()">
<h3>close</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">close</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="LogParser.html#close()">LogParser</a></code></span></div>
<div class="block">close the any streams or readers.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="LogParser.html#close()">close</a></code>&nbsp;in interface&nbsp;<code><a href="LogParser.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">LogParser</a></code></dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &copy; 1998-2024 Apache Software Foundation. All Rights Reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>