| org.apache.jmeter.samplers.AbstractSampler org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase
All known Subclasses: org.apache.jmeter.protocol.http.sampler.WebServiceSampler, org.apache.jmeter.protocol.http.sampler.HTTPNullSampler, org.apache.jmeter.protocol.http.sampler.AjpSampler, org.apache.jmeter.protocol.http.sampler.HTTPSampler2, org.apache.jmeter.protocol.http.sampler.HTTPSampler,
Method Summary | |
public void | addArgument(String name, String value) | public void | addArgument(String name, String value, String metadata) | public void | addEncodedArgument(String name, String value) | public void | addEncodedArgument(String name, String value, String metaData, String contentEncoding) | public void | addEncodedArgument(String name, String value, String metaData) | public void | addNonEncodedArgument(String name, String value, String metadata) | public void | addTestElement(TestElement el) | public Object | clone() | protected HTTPSampleResult | downloadPageResources(HTTPSampleResult res, HTTPSampleResult container, int frameDepth) Download the resources of an HTML page.
If createContainerResult is true, the returned result will contain one
subsample for each request issued, including the original one that was
passed in. | protected static String | encodeBackSlashes(String value) | protected String | encodeSpaces(String path) | protected HTTPSampleResult | errorResult(Throwable e, HTTPSampleResult res) Obtain a result that will help inform the user that an error has occured
during sampling, and how long it took to detect the error. | protected HTTPSampleResult | followRedirects(HTTPSampleResult res, int frameDepth) Iteratively download the redirect targets of a redirect response.
The returned result will contain one subsample for each request issued,
including the original one that was passed in. | public Arguments | getArguments() | public AuthManager | getAuthManager() | public boolean | getAutoRedirects() | public String | getClient() | public String | getContentEncoding() | public CookieManager | getCookieManager() | public static int | getDefaultPort(String protocol, int port) | public boolean | getDoMultipartPost() | public String | getDomain() | public String | getEmbeddedUrlRE() Get the regular expression URLs must match. | public String | getFileField() | public String | getFilename() | public boolean | getFollowRedirects() | public HeaderManager | getHeaderManager() | public String | getImplementation() | public String | getMethod() | public String | getMimetype() | public String | getMonitor() | public String | getPath() | public int | getPort() | public String | getProtocol() | public String | getQueryString() | public String | getQueryString(String contentEncoding) | public boolean | getSendFileAsPostBody() Determine if the file should be sent as the entire Post body,
i.e. | public boolean | getSendParameterValuesAsPostBody() | public URL | getUrl() Get the URL, built from its component parts. | public boolean | getUseKeepAlive() | public boolean | getUseMultipartForPost() | public static String[] | getValidMethodsAsArray() | public boolean | hasArguments() | protected boolean | hasUploadableFiles() | public boolean | isImageParser() | public boolean | isMonitor() | public boolean | isProtocolDefaultPort() | public static boolean | isSecure(String protocol) | public static boolean | isSecure(URL url) | protected boolean | isSuccessCode(int code) Determine if the HTTP status code is successful or not
i.e. | public void | parseArguments(String queryString, String contentEncoding) This method allows a proxy server to send over the raw text from a
browser's output stream to be parsed and stored correctly into the
UrlConfig object.
For each name found, addArgument() is called
Parameters: queryString - -the query string Parameters: contentEncoding - -the content encoding of the query string. | public void | parseArguments(String queryString) | protected HTTPSampleResult | resultProcessing(boolean areFollowingRedirect, int frameDepth, HTTPSampleResult res) Follow redirects and download page resources if appropriate. | public SampleResult | sample(Entry e) Do a sampling and return its results. | public SampleResult | sample() | abstract protected HTTPSampleResult | sample(URL u, String method, boolean areFollowingRedirect, int depth) 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. | public void | setArguments(Arguments value) | public void | setAuthManager(AuthManager value) | public void | setAutoRedirects(boolean value) | public void | setClient(String client) | public void | setContentEncoding(String value) | public void | setCookieManager(CookieManager value) | public void | setDoMultipartPost(boolean value) | public void | setDomain(String value) | public void | setEmbeddedUrlRE(String regex) | public void | setFileField(String value) | public void | setFilename(String value) | public void | setFollowRedirects(boolean value) | public void | setHeaderManager(HeaderManager value) | public void | setImageParser(boolean parseImages) | public void | setImplementation(String value) | public void | setMethod(String value) | public void | setMimetype(String value) | public void | setMonitor(String value) | public void | setMonitor(boolean truth) | public void | setPath(String path) | public void | setPath(String path, String contentEncoding) | public void | setPort(int value) | public void | setProtocol(String value) | public void | setUseKeepAlive(boolean value) | public void | testEnded() | public void | testEnded(String host) | public void | testIterationStart(LoopIterationEvent event) | public void | testStarted() | public void | testStarted(String host) | public void | threadFinished() | public void | threadStarted() | public String | toString() |
AUTO_REDIRECTS | final public static String AUTO_REDIRECTS(Code) | | |
CONTENT_ENCODING | final public static String CONTENT_ENCODING(Code) | | |
COOKIE_MANAGER | final public static String COOKIE_MANAGER(Code) | | |
DEFAULT_METHOD | final public static String DEFAULT_METHOD(Code) | | |
DO_MULTIPART_POST | final public static String DO_MULTIPART_POST(Code) | | |
EMBEDDED_URL_RE | final public static String EMBEDDED_URL_RE(Code) | | |
FOLLOW_REDIRECTS | final public static String FOLLOW_REDIRECTS(Code) | | |
HEADER_MANAGER | final public static String HEADER_MANAGER(Code) | | |
IMPLEMENTATION | final public static String IMPLEMENTATION(Code) | | |
MAX_FRAME_DEPTH | final protected static int MAX_FRAME_DEPTH(Code) | | |
MAX_REDIRECTS | final protected static int MAX_REDIRECTS(Code) | | |
NON_HTTP_RESPONSE_CODE | final protected static String NON_HTTP_RESPONSE_CODE(Code) | | |
NON_HTTP_RESPONSE_MESSAGE | final protected static String NON_HTTP_RESPONSE_MESSAGE(Code) | | |
UNSPECIFIED_PORT | final public static int UNSPECIFIED_PORT(Code) | | A number to indicate that the port has not been set. *
|
UNSPECIFIED_PORT_AS_STRING | final public static String UNSPECIFIED_PORT_AS_STRING(Code) | | |
HTTPSamplerBase | public HTTPSamplerBase()(Code) | | |
addEncodedArgument | public void addEncodedArgument(String name, String value)(Code) | | Add an argument which has already been encoded
|
downloadPageResources | protected HTTPSampleResult downloadPageResources(HTTPSampleResult res, HTTPSampleResult container, int frameDepth)(Code) | | Download the resources of an HTML page.
If createContainerResult is true, the returned result will contain one
subsample for each request issued, including the original one that was
passed in. It will otherwise look exactly like that original one.
If createContainerResult is false, one subsample will be added to the
provided result for each requests issued.
Parameters: res - result of the initial request - must contain an HTML response Parameters: container - for storing the results Parameters: frameDepth - Depth of this target in the frame structure. Used only toprevent infinite recursion. "Container" result with one subsample per request issued |
errorResult | protected HTTPSampleResult errorResult(Throwable e, HTTPSampleResult res)(Code) | | Obtain a result that will help inform the user that an error has occured
during sampling, and how long it took to detect the error.
Parameters: e - Exception representing the error. Parameters: res - SampleResult a sampling result useful to inform the user about the exception. |
followRedirects | protected HTTPSampleResult followRedirects(HTTPSampleResult res, int frameDepth)(Code) | | Iteratively download the redirect targets of a redirect response.
The returned result will contain one subsample for each request issued,
including the original one that was passed in. It will be an
HTTPSampleResult that should mostly look as if the final destination of
the redirect chain had been obtained in a single shot.
Parameters: res - result of the initial request - must be a redirect response Parameters: frameDepth - Depth of this target in the frame structure. Used only toprevent infinite recursion. "Container" result with one subsample per request issued |
getAutoRedirects | public boolean getAutoRedirects()(Code) | | |
getDefaultPort | public static int getDefaultPort(String protocol, int port)(Code) | | |
getDoMultipartPost | public boolean getDoMultipartPost()(Code) | | |
getEmbeddedUrlRE | public String getEmbeddedUrlRE()(Code) | | Get the regular expression URLs must match.
regular expression (or empty) string |
getFileField | public String getFileField()(Code) | | The name parameter to be applied to the file
|
getFilename | public String getFilename()(Code) | | The actual name of the file to POST
|
getFollowRedirects | public boolean getFollowRedirects()(Code) | | |
getPort | public int getPort()(Code) | | |
getQueryString | public String getQueryString()(Code) | | Gets the QueryString attribute of the UrlConfig object, using
UTF-8 to encode the URL
the QueryString value |
getQueryString | public String getQueryString(String contentEncoding)(Code) | | Gets the QueryString attribute of the UrlConfig object, using the
specified encoding to encode the parameter values put into the URL
Parameters: contentEncoding - the encoding to use for encoding parameter values the QueryString value |
getSendFileAsPostBody | public boolean getSendFileAsPostBody()(Code) | | Determine if the file should be sent as the entire Post body,
i.e. without any additional wrapping
true if specified file is to be sent as the body,i.e. FileField is blank |
getSendParameterValuesAsPostBody | public boolean getSendParameterValuesAsPostBody()(Code) | | Determine if none of the parameters have a name, and if that
is the case, it means that the parameter values should be sent
as the post body
true if none of the parameters have a name specified |
getUseKeepAlive | public boolean getUseKeepAlive()(Code) | | |
getUseMultipartForPost | public boolean getUseMultipartForPost()(Code) | | Determine if we should use multipart/form-data or
application/x-www-form-urlencoded for the post
true if multipart/form-data should be used and method is POST |
getValidMethodsAsArray | public static String[] getValidMethodsAsArray()(Code) | | |
hasArguments | public boolean hasArguments()(Code) | | |
hasUploadableFiles | protected boolean hasUploadableFiles()(Code) | | Method to tell if the request has any files to be uploaded
|
isImageParser | public boolean isImageParser()(Code) | | |
isMonitor | public boolean isMonitor()(Code) | | |
isProtocolDefaultPort | public boolean isProtocolDefaultPort()(Code) | | Tell whether the default port for the specified protocol is used
true if the default port number for the protocol is used, false otherwise |
isSecure | public static boolean isSecure(String protocol)(Code) | | |
isSecure | public static boolean isSecure(URL url)(Code) | | |
isSuccessCode | protected boolean isSuccessCode(int code)(Code) | | Determine if the HTTP status code is successful or not
i.e. in range 200 to 399 inclusive
whether in range 200-399 or not |
parseArguments | public void parseArguments(String queryString, String contentEncoding)(Code) | | This method allows a proxy server to send over the raw text from a
browser's output stream to be parsed and stored correctly into the
UrlConfig object.
For each name found, addArgument() is called
Parameters: queryString - -the query string Parameters: contentEncoding - -the content encoding of the query string. The query string mightactually be the post body of a http post request. |
parseArguments | public void parseArguments(String queryString)(Code) | | |
resultProcessing | protected HTTPSampleResult resultProcessing(boolean areFollowingRedirect, int frameDepth, HTTPSampleResult res)(Code) | | Follow redirects and download page resources if appropriate. this works,
but the container stuff here is what's doing it. followRedirects() is
actually doing the work to make sure we have only one container to make
this work more naturally, I think this method - sample() - needs to take
an HTTPSamplerResult container parameter instead of a
boolean:areFollowingRedirect.
Parameters: areFollowingRedirect - Parameters: frameDepth - Parameters: res - the sample result |
sample | public SampleResult sample(Entry e)(Code) | | Do a sampling and return its results.
Parameters: e - Entry to be sampled results of the sampling |
sample | public SampleResult sample()(Code) | | Perform a sample, and return the results
results of the sampling |
sample | abstract protected HTTPSampleResult sample(URL u, String method, boolean areFollowingRedirect, int depth)(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: u - URL to sample Parameters: method - HTTP method: GET, POST,... Parameters: areFollowingRedirect - whether we're getting a redirect target Parameters: depth - Depth of this target in the frame structure. Used only toprevent infinite recursion. results of the sampling |
setAutoRedirects | public void setAutoRedirects(boolean value)(Code) | | |
setContentEncoding | public void setContentEncoding(String value)(Code) | | |
setDoMultipartPost | public void setDoMultipartPost(boolean value)(Code) | | |
setEmbeddedUrlRE | public void setEmbeddedUrlRE(String regex)(Code) | | |
setFileField | public void setFileField(String value)(Code) | | The name parameter to be applied to the file
|
setFilename | public void setFilename(String value)(Code) | | The actual name of the file to POST
|
setFollowRedirects | public void setFollowRedirects(boolean value)(Code) | | |
setImageParser | public void setImageParser(boolean parseImages)(Code) | | |
setImplementation | public void setImplementation(String value)(Code) | | |
setMonitor | public void setMonitor(boolean truth)(Code) | | |
setPath | public void setPath(String path)(Code) | | Sets the Path attribute of the UrlConfig object Also calls parseArguments
to extract and store any query arguments
Parameters: path - The new Path value |
setPath | public void setPath(String path, String contentEncoding)(Code) | | Sets the Path attribute of the UrlConfig object Also calls parseArguments
to extract and store any query arguments
Parameters: path - The new Path value Parameters: contentEncoding - The encoding used for the querystring parameter values |
setPort | public void setPort(int value)(Code) | | |
setUseKeepAlive | public void setUseKeepAlive(boolean value)(Code) | | |
testEnded | public void testEnded()(Code) | | |
testStarted | public void testStarted()(Code) | | |
threadFinished | public void threadFinished()(Code) | | |
threadStarted | public void threadStarted()(Code) | | |
|
|