| org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase org.apache.jmeter.protocol.http.sampler.HTTPSampler2
All known Subclasses: org.apache.jmeter.protocol.http.sampler.SoapSampler,
HTTPSampler2 | public class HTTPSampler2 extends HTTPSamplerBase (Code) | | A sampler which understands all the parts necessary to read statistics about
HTTP requests, including cookies and authentication.
|
Constructor Summary | |
public | HTTPSampler2() Constructor for the HTTPSampler2 object. |
Method Summary | |
protected String | getResponseHeaders(HttpMethod method) | protected HTTPSampleResult | sample(URL url, String method, boolean areFollowingRedirect, int frameDepth) Samples the URL passed in and stores the result in
HTTPSampleResult , following redirects and downloading
page resources as appropriate.
When getting a redirect target, redirects are not followed and resources
are not downloaded. | protected void | saveConnectionCookies(HttpMethod method, URL u, CookieManager cookieManager) From the HttpMethod , store all the "set-cookie" key-pair
values in the cookieManager of the UrlConfig . | protected void | setDefaultRequestHeaders(HttpMethod httpMethod) | protected HttpClient | setupConnection(URL u, HttpMethodBase httpMethod, HTTPSampleResult res) Returns an HttpConnection fully ready to attempt
connection. | public void | threadFinished() | public void | threadStarted() |
PROXY_PORT | final static int PROXY_PORT(Code) | | |
HTTPSampler2 | public HTTPSampler2()(Code) | | Constructor for the HTTPSampler2 object.
Consider using HTTPSamplerFactory.newInstance() instead
|
getResponseHeaders | protected String getResponseHeaders(HttpMethod method)(Code) | | Gets the ResponseHeaders
Parameters: method - connection from which the headers are read string containing the headers, one per line |
sample | protected HTTPSampleResult sample(URL url, String method, boolean areFollowingRedirect, int frameDepth)(Code) | | Samples the URL passed in and stores the result in
HTTPSampleResult , following redirects and downloading
page resources as appropriate.
When getting a redirect target, redirects are not followed and resources
are not downloaded. The caller will take care of this.
Parameters: url - URL to sample Parameters: method - HTTP method: GET, POST,... Parameters: areFollowingRedirect - whether we're getting a redirect target Parameters: frameDepth - Depth of this target in the frame structure. Used only toprevent infinite recursion. results of the sampling |
saveConnectionCookies | protected void saveConnectionCookies(HttpMethod method, URL u, CookieManager cookieManager)(Code) | | From the HttpMethod , store all the "set-cookie" key-pair
values in the cookieManager of the UrlConfig .
Parameters: method - HttpMethod which represents the request Parameters: u - URL of the URL request Parameters: cookieManager - the CookieManager containing all the cookies |
setDefaultRequestHeaders | protected void setDefaultRequestHeaders(HttpMethod httpMethod)(Code) | | Set any default request headers to include
Parameters: httpMethod - the HttpMethod used for the request |
setupConnection | protected HttpClient setupConnection(URL u, HttpMethodBase httpMethod, HTTPSampleResult res) throws IOException(Code) | | Returns an HttpConnection fully ready to attempt
connection. This means it sets the request method (GET or POST), headers,
cookies, and authorization for the URL request.
The request infos are saved into the sample result if one is provided.
Parameters: u - URL of the URL request Parameters: httpMethod - GET/PUT/HEAD etc Parameters: res - sample result to save request infos to HttpConnection ready for .connect exception: IOException - if an I/O Exception occurs |
threadFinished | public void threadFinished()(Code) | | |
threadStarted | public void threadStarted()(Code) | | |
Methods inherited from org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase | public void addArgument(String name, String value)(Code)(Java Doc) public void addArgument(String name, String value, String metadata)(Code)(Java Doc) public void addEncodedArgument(String name, String value)(Code)(Java Doc) public void addEncodedArgument(String name, String value, String metaData, String contentEncoding)(Code)(Java Doc) public void addEncodedArgument(String name, String value, String metaData)(Code)(Java Doc) public void addNonEncodedArgument(String name, String value, String metadata)(Code)(Java Doc) public void addTestElement(TestElement el)(Code)(Java Doc) public Object clone()(Code)(Java Doc) protected HTTPSampleResult downloadPageResources(HTTPSampleResult res, HTTPSampleResult container, int frameDepth)(Code)(Java Doc) protected static String encodeBackSlashes(String value)(Code)(Java Doc) protected String encodeSpaces(String path)(Code)(Java Doc) protected HTTPSampleResult errorResult(Throwable e, HTTPSampleResult res)(Code)(Java Doc) protected HTTPSampleResult followRedirects(HTTPSampleResult res, int frameDepth)(Code)(Java Doc) public Arguments getArguments()(Code)(Java Doc) public AuthManager getAuthManager()(Code)(Java Doc) public boolean getAutoRedirects()(Code)(Java Doc) public String getClient()(Code)(Java Doc) public String getContentEncoding()(Code)(Java Doc) public CookieManager getCookieManager()(Code)(Java Doc) public static int getDefaultPort(String protocol, int port)(Code)(Java Doc) public boolean getDoMultipartPost()(Code)(Java Doc) public String getDomain()(Code)(Java Doc) public String getEmbeddedUrlRE()(Code)(Java Doc) public String getFileField()(Code)(Java Doc) public String getFilename()(Code)(Java Doc) public boolean getFollowRedirects()(Code)(Java Doc) public HeaderManager getHeaderManager()(Code)(Java Doc) public String getImplementation()(Code)(Java Doc) public String getMethod()(Code)(Java Doc) public String getMimetype()(Code)(Java Doc) public String getMonitor()(Code)(Java Doc) public String getPath()(Code)(Java Doc) public int getPort()(Code)(Java Doc) public String getProtocol()(Code)(Java Doc) public String getQueryString()(Code)(Java Doc) public String getQueryString(String contentEncoding)(Code)(Java Doc) public boolean getSendFileAsPostBody()(Code)(Java Doc) public boolean getSendParameterValuesAsPostBody()(Code)(Java Doc) public URL getUrl() throws MalformedURLException(Code)(Java Doc) public boolean getUseKeepAlive()(Code)(Java Doc) public boolean getUseMultipartForPost()(Code)(Java Doc) public static String[] getValidMethodsAsArray()(Code)(Java Doc) public boolean hasArguments()(Code)(Java Doc) protected boolean hasUploadableFiles()(Code)(Java Doc) public boolean isImageParser()(Code)(Java Doc) public boolean isMonitor()(Code)(Java Doc) public boolean isProtocolDefaultPort()(Code)(Java Doc) public static boolean isSecure(String protocol)(Code)(Java Doc) public static boolean isSecure(URL url)(Code)(Java Doc) protected boolean isSuccessCode(int code)(Code)(Java Doc) public void parseArguments(String queryString, String contentEncoding)(Code)(Java Doc) public void parseArguments(String queryString)(Code)(Java Doc) protected HTTPSampleResult resultProcessing(boolean areFollowingRedirect, int frameDepth, HTTPSampleResult res)(Code)(Java Doc) public SampleResult sample(Entry e)(Code)(Java Doc) public SampleResult sample()(Code)(Java Doc) abstract protected HTTPSampleResult sample(URL u, String method, boolean areFollowingRedirect, int depth)(Code)(Java Doc) public void setArguments(Arguments value)(Code)(Java Doc) public void setAuthManager(AuthManager value)(Code)(Java Doc) public void setAutoRedirects(boolean value)(Code)(Java Doc) public void setClient(String client)(Code)(Java Doc) public void setContentEncoding(String value)(Code)(Java Doc) public void setCookieManager(CookieManager value)(Code)(Java Doc) public void setDoMultipartPost(boolean value)(Code)(Java Doc) public void setDomain(String value)(Code)(Java Doc) public void setEmbeddedUrlRE(String regex)(Code)(Java Doc) public void setFileField(String value)(Code)(Java Doc) public void setFilename(String value)(Code)(Java Doc) public void setFollowRedirects(boolean value)(Code)(Java Doc) public void setHeaderManager(HeaderManager value)(Code)(Java Doc) public void setImageParser(boolean parseImages)(Code)(Java Doc) public void setImplementation(String value)(Code)(Java Doc) public void setMethod(String value)(Code)(Java Doc) public void setMimetype(String value)(Code)(Java Doc) public void setMonitor(String value)(Code)(Java Doc) public void setMonitor(boolean truth)(Code)(Java Doc) public void setPath(String path)(Code)(Java Doc) public void setPath(String path, String contentEncoding)(Code)(Java Doc) public void setPort(int value)(Code)(Java Doc) public void setProtocol(String value)(Code)(Java Doc) public void setUseKeepAlive(boolean value)(Code)(Java Doc) public void testEnded()(Code)(Java Doc) public void testEnded(String host)(Code)(Java Doc) public void testIterationStart(LoopIterationEvent event)(Code)(Java Doc) public void testStarted()(Code)(Java Doc) public void testStarted(String host)(Code)(Java Doc) public void threadFinished()(Code)(Java Doc) public void threadStarted()(Code)(Java Doc) public String toString()(Code)(Java Doc)
|
|
|