blob: 7b3c67e244da7ef5ebf91285a24c080352997f0c [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>HTTPJavaImpl (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="HTTPJavaImpl (Apache JMeter dist API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":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/sampler/HTTPHCAbstractImpl.html" title="class in org.apache.jmeter.protocol.http.sampler"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPSampler.html" title="class in org.apache.jmeter.protocol.http.sampler"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/jmeter/protocol/http/sampler/HTTPJavaImpl.html" target="_top">Frames</a></li>
<li><a href="HTTPJavaImpl.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="#fields.inherited.from.class.org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl">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>Field&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.sampler</div>
<h2 title="Class HTTPJavaImpl" class="title">Class HTTPJavaImpl</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><a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html" title="class in org.apache.jmeter.protocol.http.sampler">org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl</a></li>
<li>
<ul class="inheritance">
<li>org.apache.jmeter.protocol.http.sampler.HTTPJavaImpl</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html" title="interface in org.apache.jmeter.protocol.http.util">HTTPConstantsInterface</a>, <a href="../../../../../../org/apache/jmeter/samplers/Interruptible.html" title="interface in org.apache.jmeter.samplers">Interruptible</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">HTTPJavaImpl</span>
extends <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html" title="class in org.apache.jmeter.protocol.http.sampler">HTTPAbstractImpl</a></pre>
<div class="block">A sampler which understands all the parts necessary to read statistics about
HTTP requests, including cookies and authentication.</div>
</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>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.jmeter.protocol.http.sampler.<a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html" title="class in org.apache.jmeter.protocol.http.sampler">HTTPAbstractImpl</a></h3>
<code><a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#ADD_CONTENT_TYPE_TO_POST_IF_MISSING">ADD_CONTENT_TYPE_TO_POST_IF_MISSING</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#ALL_EXCEPT_COOKIE">ALL_EXCEPT_COOKIE</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#ONLY_COOKIE">ONLY_COOKIE</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#testElement">testElement</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.org.apache.jmeter.protocol.http.util.HTTPConstantsInterface">
<!-- -->
</a>
<h3>Fields inherited from interface&nbsp;org.apache.jmeter.protocol.http.util.<a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html" title="interface in org.apache.jmeter.protocol.http.util">HTTPConstantsInterface</a></h3>
<code><a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#APPLICATION_X_WWW_FORM_URLENCODED">APPLICATION_X_WWW_FORM_URLENCODED</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#CACHE_CONTROL">CACHE_CONTROL</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#CONNECT">CONNECT</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#CONNECTION_CLOSE">CONNECTION_CLOSE</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#COPY">COPY</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#DATE">DATE</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#DEFAULT_HTTP_PORT">DEFAULT_HTTP_PORT</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#DEFAULT_HTTP_PORT_STRING">DEFAULT_HTTP_PORT_STRING</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#DEFAULT_HTTPS_PORT">DEFAULT_HTTPS_PORT</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#DEFAULT_HTTPS_PORT_STRING">DEFAULT_HTTPS_PORT_STRING</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#DELETE">DELETE</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#ENCODING_BROTLI">ENCODING_BROTLI</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#ENCODING_DEFLATE">ENCODING_DEFLATE</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#ENCODING_GZIP">ENCODING_GZIP</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#ETAG">ETAG</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#EXPIRES">EXPIRES</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#GET">GET</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#HEAD">HEAD</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#HEADER_AUTHORIZATION">HEADER_AUTHORIZATION</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#HEADER_CONNECTION">HEADER_CONNECTION</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#HEADER_CONTENT_DISPOSITION">HEADER_CONTENT_DISPOSITION</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#HEADER_CONTENT_ENCODING">HEADER_CONTENT_ENCODING</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#HEADER_CONTENT_LENGTH">HEADER_CONTENT_LENGTH</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#HEADER_CONTENT_TYPE">HEADER_CONTENT_TYPE</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#HEADER_COOKIE">HEADER_COOKIE</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#HEADER_COOKIE_IN_REQUEST">HEADER_COOKIE_IN_REQUEST</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#HEADER_HOST">HEADER_HOST</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#HEADER_LOCAL_ADDRESS">HEADER_LOCAL_ADDRESS</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#HEADER_LOCATION">HEADER_LOCATION</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#HEADER_SET_COOKIE">HEADER_SET_COOKIE</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#HTTP_1_1">HTTP_1_1</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#IF_MODIFIED_SINCE">IF_MODIFIED_SINCE</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#IF_NONE_MATCH">IF_NONE_MATCH</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#KEEP_ALIVE">KEEP_ALIVE</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#LAST_MODIFIED">LAST_MODIFIED</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#LOCK">LOCK</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#MKCALENDAR">MKCALENDAR</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#MKCOL">MKCOL</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#MOVE">MOVE</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#MULTIPART_FORM_DATA">MULTIPART_FORM_DATA</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#OPTIONS">OPTIONS</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#PATCH">PATCH</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#POST">POST</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#PROPFIND">PROPFIND</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#PROPPATCH">PROPPATCH</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#PROTOCOL_HTTP">PROTOCOL_HTTP</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#PROTOCOL_HTTPS">PROTOCOL_HTTPS</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#PUT">PUT</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#REPORT">REPORT</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#SC_MOVED_PERMANENTLY">SC_MOVED_PERMANENTLY</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#SC_MOVED_TEMPORARILY">SC_MOVED_TEMPORARILY</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#SC_PERMANENT_REDIRECT">SC_PERMANENT_REDIRECT</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#SC_SEE_OTHER">SC_SEE_OTHER</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#SC_TEMPORARY_REDIRECT">SC_TEMPORARY_REDIRECT</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#SEARCH">SEARCH</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#TRACE">TRACE</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#TRANSFER_ENCODING">TRANSFER_ENCODING</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#UNLOCK">UNLOCK</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.html#VARY">VARY</a></code></li>
</ul>
</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="colFirst" scope="col">Modifier</th>
<th class="colLast" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPJavaImpl.html#HTTPJavaImpl-org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase-">HTTPJavaImpl</a></span>(<a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.html" title="class in org.apache.jmeter.protocol.http.sampler">HTTPSamplerBase</a>&nbsp;base)</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>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPJavaImpl.html#disconnect-java.net.HttpURLConnection-">disconnect</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/HttpURLConnection.html?is-external=true" title="class or interface in java.net">HttpURLConnection</a>&nbsp;conn)</code>&nbsp;</td>
</tr>
<tr id="i1" 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/sampler/HTTPJavaImpl.html#getResponseHeaders-java.net.HttpURLConnection-">getResponseHeaders</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/HttpURLConnection.html?is-external=true" title="class or interface in java.net">HttpURLConnection</a>&nbsp;conn)</code>
<div class="block">Gets the ResponseHeaders from the URLConnection</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPJavaImpl.html#interrupt--">interrupt</a></span>()</code>
<div class="block">Interrupt the current operation if possible.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPJavaImpl.html#readResponse-java.net.HttpURLConnection-org.apache.jmeter.samplers.SampleResult-">readResponse</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/HttpURLConnection.html?is-external=true" title="class or interface in java.net">HttpURLConnection</a>&nbsp;conn,
<a href="../../../../../../org/apache/jmeter/samplers/SampleResult.html" title="class in org.apache.jmeter.samplers">SampleResult</a>&nbsp;res)</code>
<div class="block">Reads the response from the URL connection.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>protected <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.html" title="class in org.apache.jmeter.protocol.http.sampler">HTTPSampleResult</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPJavaImpl.html#sample-java.net.URL-java.lang.String-boolean-int-">sample</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url,
<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;method,
boolean&nbsp;areFollowingRedirect,
int&nbsp;frameDepth)</code>
<div class="block">Samples the URL passed in and stores the result in
<code>HTTPSampleResult</code>, following redirects and downloading
page resources as appropriate.</div>
</td>
</tr>
<tr id="i5" 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/sampler/HTTPJavaImpl.html#sendPostData-java.net.URLConnection-">sendPostData</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URLConnection.html?is-external=true" title="class or interface in java.net">URLConnection</a>&nbsp;connection)</code>
<div class="block">Send POST data from <code>Entry</code> to the open connection.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPJavaImpl.html#setPostHeaders-java.net.URLConnection-">setPostHeaders</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URLConnection.html?is-external=true" title="class or interface in java.net">URLConnection</a>&nbsp;conn)</code>
<div class="block">Set request headers in preparation to opening a connection.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/net/HttpURLConnection.html?is-external=true" title="class or interface in java.net">HttpURLConnection</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPJavaImpl.html#setupConnection-java.net.URL-java.lang.String-org.apache.jmeter.protocol.http.sampler.HTTPSampleResult-">setupConnection</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;u,
<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;method,
<a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.html" title="class in org.apache.jmeter.protocol.http.sampler">HTTPSampleResult</a>&nbsp;res)</code>
<div class="block">Returns an <code>HttpURLConnection</code> fully ready to attempt
connection.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.jmeter.protocol.http.sampler.<a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html" title="class in org.apache.jmeter.protocol.http.sampler">HTTPAbstractImpl</a></h3>
<code><a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#configureSampleLabel-org.apache.jmeter.samplers.SampleResult-java.net.URL-">configureSampleLabel</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#errorResult-java.lang.Throwable-org.apache.jmeter.protocol.http.sampler.HTTPSampleResult-">errorResult</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getArguments--">getArguments</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getAuthManager--">getAuthManager</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getAutoRedirects--">getAutoRedirects</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getCacheManager--">getCacheManager</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getConnectTimeout--">getConnectTimeout</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getContentEncoding--">getContentEncoding</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getCookieManager--">getCookieManager</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getDoBrowserCompatibleMultipart--">getDoBrowserCompatibleMultipart</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getHeaderManager--">getHeaderManager</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getHTTPFiles--">getHTTPFiles</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getIpSource--">getIpSource</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getIpSourceAddress--">getIpSourceAddress</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getProxyHost--">getProxyHost</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getProxyPass--">getProxyPass</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getProxyPortInt--">getProxyPortInt</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getProxyScheme--">getProxyScheme</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getProxyUser--">getProxyUser</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getResponseTimeout--">getResponseTimeout</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getSendFileAsPostBody--">getSendFileAsPostBody</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getSendParameterValuesAsPostBody--">getSendParameterValuesAsPostBody</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getUseKeepAlive--">getUseKeepAlive</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getUseMultipart--">getUseMultipart</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#getUseMultipartForPost--">getUseMultipartForPost</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#hasArguments--">hasArguments</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#isMonitor--">isMonitor</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#isSuccessCode-int-">isSuccessCode</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#notifyFirstSampleAfterLoopRestart--">notifyFirstSampleAfterLoopRestart</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#notifySSLContextWasReset--">notifySSLContextWasReset</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#readResponse-org.apache.jmeter.samplers.SampleResult-java.io.BufferedInputStream-int-">readResponse</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#readResponse-org.apache.jmeter.samplers.SampleResult-java.io.BufferedInputStream-long-">readResponse</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#readResponse-org.apache.jmeter.samplers.SampleResult-java.io.InputStream-int-">readResponse</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#readResponse-org.apache.jmeter.samplers.SampleResult-java.io.InputStream-long-">readResponse</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#resultProcessing-boolean-int-org.apache.jmeter.protocol.http.sampler.HTTPSampleResult-">resultProcessing</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#setUseKeepAlive-boolean-">setUseKeepAlive</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#threadFinished--">threadFinished</a>, <a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#updateSampleResultForResourceInCache-org.apache.jmeter.protocol.http.sampler.HTTPSampleResult-">updateSampleResultForResourceInCache</a></code></li>
</ul>
<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">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="HTTPJavaImpl-org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>HTTPJavaImpl</h4>
<pre>protected&nbsp;HTTPJavaImpl(<a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.html" title="class in org.apache.jmeter.protocol.http.sampler">HTTPSamplerBase</a>&nbsp;base)</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="setPostHeaders-java.net.URLConnection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPostHeaders</h4>
<pre>protected&nbsp;void&nbsp;setPostHeaders(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URLConnection.html?is-external=true" title="class or interface in java.net">URLConnection</a>&nbsp;conn)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Set request headers in preparation to opening a connection.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>conn</code> - <code>URLConnection</code> to set headers on</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs</dd>
</dl>
</li>
</ul>
<a name="sendPostData-java.net.URLConnection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendPostData</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>&nbsp;sendPostData(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URLConnection.html?is-external=true" title="class or interface in java.net">URLConnection</a>&nbsp;connection)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Send POST data from <code>Entry</code> to the open connection.
This also handles sending data for PUT requests</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>connection</code> - <code>URLConnection</code> where POST data should be sent</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a String show what was posted. Will not contain actual file upload content</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs</dd>
</dl>
</li>
</ul>
<a name="setupConnection-java.net.URL-java.lang.String-org.apache.jmeter.protocol.http.sampler.HTTPSampleResult-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setupConnection</h4>
<pre>protected&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/net/HttpURLConnection.html?is-external=true" title="class or interface in java.net">HttpURLConnection</a>&nbsp;setupConnection(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;u,
<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;method,
<a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.html" title="class in org.apache.jmeter.protocol.http.sampler">HTTPSampleResult</a>&nbsp;res)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Returns an <code>HttpURLConnection</code> fully ready to attempt
connection. This means it sets the request method (GET or POST), headers,
cookies, and authorization for the URL request.
<p>
The request infos are saved into the sample result if one is provided.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>u</code> - <code>URL</code> of the URL request</dd>
<dd><code>method</code> - GET, POST etc</dd>
<dd><code>res</code> - sample result to save request infos to</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>HttpURLConnection</code> ready for .connect</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O Exception occurs</dd>
</dl>
</li>
</ul>
<a name="readResponse-java.net.HttpURLConnection-org.apache.jmeter.samplers.SampleResult-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readResponse</h4>
<pre>protected&nbsp;byte[]&nbsp;readResponse(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/HttpURLConnection.html?is-external=true" title="class or interface in java.net">HttpURLConnection</a>&nbsp;conn,
<a href="../../../../../../org/apache/jmeter/samplers/SampleResult.html" title="class in org.apache.jmeter.samplers">SampleResult</a>&nbsp;res)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Reads the response from the URL connection.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>conn</code> - URL from which to read response</dd>
<dd><code>res</code> - <a href="../../../../../../org/apache/jmeter/samplers/SampleResult.html" title="class in org.apache.jmeter.samplers"><code>SampleResult</code></a> to read response into</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>response content</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O exception occurs</dd>
</dl>
</li>
</ul>
<a name="getResponseHeaders-java.net.HttpURLConnection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getResponseHeaders</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>&nbsp;getResponseHeaders(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/HttpURLConnection.html?is-external=true" title="class or interface in java.net">HttpURLConnection</a>&nbsp;conn)</pre>
<div class="block">Gets the ResponseHeaders from the URLConnection</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>conn</code> - connection from which the headers are read</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>string containing the headers, one per line</dd>
</dl>
</li>
</ul>
<a name="sample-java.net.URL-java.lang.String-boolean-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sample</h4>
<pre>protected&nbsp;<a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.html" title="class in org.apache.jmeter.protocol.http.sampler">HTTPSampleResult</a>&nbsp;sample(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url,
<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;method,
boolean&nbsp;areFollowingRedirect,
int&nbsp;frameDepth)</pre>
<div class="block">Samples the URL passed in and stores the result in
<code>HTTPSampleResult</code>, following redirects and downloading
page resources as appropriate.
<p>
When getting a redirect target, redirects are not followed and resources
are not downloaded. The caller will take care of this.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html#sample-java.net.URL-java.lang.String-boolean-int-">sample</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.html" title="class in org.apache.jmeter.protocol.http.sampler">HTTPAbstractImpl</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>url</code> - URL to sample</dd>
<dd><code>method</code> - HTTP method: GET, POST,...</dd>
<dd><code>areFollowingRedirect</code> - whether we're getting a redirect target</dd>
<dd><code>frameDepth</code> - Depth of this target in the frame structure. Used only to
prevent infinite recursion.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>results of the sampling</dd>
</dl>
</li>
</ul>
<a name="disconnect-java.net.HttpURLConnection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>disconnect</h4>
<pre>protected&nbsp;void&nbsp;disconnect(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/HttpURLConnection.html?is-external=true" title="class or interface in java.net">HttpURLConnection</a>&nbsp;conn)</pre>
</li>
</ul>
<a name="interrupt--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>interrupt</h4>
<pre>public&nbsp;boolean&nbsp;interrupt()</pre>
<div class="block">Interrupt the current operation if possible.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if there was an operation to interrupt.</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/sampler/HTTPHCAbstractImpl.html" title="class in org.apache.jmeter.protocol.http.sampler"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../org/apache/jmeter/protocol/http/sampler/HTTPSampler.html" title="class in org.apache.jmeter.protocol.http.sampler"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/jmeter/protocol/http/sampler/HTTPJavaImpl.html" target="_top">Frames</a></li>
<li><a href="HTTPJavaImpl.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="#fields.inherited.from.class.org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl">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>Field&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-2022 Apache Software Foundation. All Rights Reserved.</small></p>
</body>
</html>