Author: sebb
Date: Fri Oct 14 01:44:54 2011
New Revision: 1183195
URL: http://svn.apache.org/viewvc?rev=1183195&view=rev
Log:
Make AsynchSample static in preparation for possible clone of sampler
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java?rev=1183195&r1=1183194&r2=1183195&view=diff
==============================================================================
---
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
(original)
+++
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
Fri Oct 14 01:44:54 2011
@@ -1137,7 +1137,7 @@ public abstract class HTTPSamplerBase ex
if (isConcurrentDwn()) {
// if concurrent download emb. resources, add to a
list for async gets later
- liste.add(new ASyncSample(url, GET, false,
frameDepth + 1));
+ liste.add(new ASyncSample(url, GET, false,
frameDepth + 1, this));
} else {
// default: serial download embedded resources
HTTPSampleResult binRes = sample(url, GET, false,
frameDepth + 1);
@@ -1674,22 +1674,24 @@ public abstract class HTTPSamplerBase ex
* Callable class to sample asynchronously resources embedded
*
*/
- public class ASyncSample implements Callable<HTTPSampleResult> {
+ private static class ASyncSample implements Callable<HTTPSampleResult> {
final private URL url;
final private String method;
final private boolean areFollowingRedirect;
final private int depth;
+ private final HTTPSamplerBase base;
- public ASyncSample(URL url, String method,
- boolean areFollowingRedirect, int depth){
+ ASyncSample(URL url, String method,
+ boolean areFollowingRedirect, int depth, HTTPSamplerBase
base){
this.url = url;
this.method = method;
this.areFollowingRedirect = areFollowingRedirect;
this.depth = depth;
+ this.base = base;
}
public HTTPSampleResult call() {
- return sample(url, method, areFollowingRedirect, depth);
+ return base.sample(url, method, areFollowingRedirect, depth);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]