org.apache.jmeter.protocol.http.sampler

Class HTTPSampleResult

Implemented Interfaces:
Serializable

public class HTTPSampleResult
extends SampleResult

This is a specialisation of the SampleResult class for the HTTP protocol.

Field Summary

Fields inherited from class org.apache.jmeter.samplers.SampleResult

BINARY, DEFAULT_HTTP_ENCODING, TEXT

Constructor Summary

HTTPSampleResult()
HTTPSampleResult(long elapsed)
HTTPSampleResult(HTTPSampleResult res)
Construct a 'parent' result for an already-existing result, essentially cloning it

Method Summary

String
getCookies()
String
getDataEncodingWithDefault()
Overrides the method from SampleResult - so the encoding can be extracted from the Meta content-type if necessary.
String
getHTTPMethod()
String
getQueryString()
Fetch the query string
String
getRedirectLocation()
String
getSamplerData()
boolean
isRedirect()
Determine whether this result is a redirect.
void
setCookies(String string)
void
setHTTPMethod(String method)
void
setQueryString(String string)
Save the query string
void
setRedirectLocation(String redirectLocation)

Methods inherited from class org.apache.jmeter.samplers.SampleResult

addAssertionResult, addSubResult, configure, createTestSample, createTestSample, currentTimeInMs, getAllThreads, getAssertionResults, getBytes, getContentType, getDataEncoding, getDataEncodingNoDefault, getDataEncodingWithDefault, getDataType, getEndTime, getErrorCount, getGroupThreads, getIdleTime, getLatency, getMediaType, getParent, getRequestHeaders, getResponseCode, getResponseData, getResponseDataAsString, getResponseHeaders, getResponseMessage, getResultFileName, getSampleCount, getSampleLabel, getSampleLabel, getSamplerData, getSaveConfig, getStartTime, getSubResults, getThreadName, getTime, getTimeStamp, getURL, getUrlAsString, isMonitor, isResponseCodeOK, isStampedAtStart, isStopTest, isStopTestNow, isStopThread, isSuccessful, latencyEnd, markFile, sampleEnd, samplePause, sampleResume, sampleStart, setAllThreads, setBytes, setContentType, setDataEncoding, setDataType, setEncodingAndType, setEndTime, setErrorCount, setGroupThreads, setLatency, setMonitor, setParent, setRequestHeaders, setResponseCode, setResponseCodeOK, setResponseData, setResponseData, setResponseHeaders, setResponseMessage, setResponseMessageOK, setResultFileName, setSampleCount, setSampleLabel, setSamplerData, setSaveConfig, setStampAndTime, setStartTime, setStopTest, setStopTestNow, setStopThread, setSuccessful, setThreadName, setTime, setTimeStamp, setURL, storeSubResult, toString

Constructor Details

HTTPSampleResult

public HTTPSampleResult()

HTTPSampleResult

public HTTPSampleResult(long elapsed)

HTTPSampleResult

public HTTPSampleResult(HTTPSampleResult res)
Construct a 'parent' result for an already-existing result, essentially cloning it
Parameters:
res - existing sample result

Method Details

getCookies

public String getCookies()
Returns:
cookies as a string

getDataEncodingWithDefault

public String getDataEncodingWithDefault()
Overrides the method from SampleResult - so the encoding can be extracted from the Meta content-type if necessary. Updates the dataEncoding field if the content-type is found.
Overrides:
getDataEncodingWithDefault in interface SampleResult
Returns:
the dataEncoding value as a String

getHTTPMethod

public String getHTTPMethod()

getQueryString

public String getQueryString()
Fetch the query string
Returns:
the query string

getRedirectLocation

public String getRedirectLocation()

getSamplerData

public String getSamplerData()
Overrides:
getSamplerData in interface SampleResult

isRedirect

public boolean isRedirect()
Determine whether this result is a redirect.
Returns:
true iif res is an HTTP redirect response

setCookies

public void setCookies(String string)
Parameters:
string - representing the cookies

setHTTPMethod

public void setHTTPMethod(String method)

setQueryString

public void setQueryString(String string)
Save the query string
Parameters:
string - the query string

setRedirectLocation

public void setRedirectLocation(String redirectLocation)

Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.