org.apache.jmeter.samplers

## Class SampleResult

- java.lang.Object
- - org.apache.jmeter.samplers.SampleResult

- All Implemented Interfaces:
    Serializable, Cloneable, Searchable
  Direct Known Subclasses:
    HTTPSampleResult, StatisticalSampleResult

      public class SampleResult
      extends Object
      implements Serializable, Cloneable, Searchable

  This is a nice packaging for the various information returned from taking a sample of an entry.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `BINARY` Data type value ("bin") indicating that the response data is binary.
    `protected static String` | `DEFAULT_ENCODING` The default encoding to be used to decode the responseData byte array.
    `static String` | `DEFAULT_HTTP_ENCODING` The default encoding to be used if not overridden.
    `static String` | `TEXT` Data type value ("text") indicating that the response data is text.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `SampleResult()`
    `protected` | `SampleResult(long elapsed, boolean atend)` Create a sample with a specific elapsed time but don't allow the times to be changed later (only used by HTTPSampleResult)
    `` | `SampleResult(long stamp, long elapsed)` Allow users to create a sample with specific timestamp and elapsed times for cloning purposes, but don't allow the times to be changed later Currently used by CSVSaveService and StatisticalSampleResult
    `` | `SampleResult(SampleResult res)` Copy constructor.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAssertionResult(AssertionResult assertResult)`
    `void` | `addRawSubResult(SampleResult subResult)` Add a subresult to the collection without updating any parent fields.
    `void` | `addSubResult(SampleResult subResult)` Add a subresult and adjust the parent byte count and end-time.
    `void` | `addSubResult(SampleResult subResult, boolean renameSubResults)` Add a subresult and adjust the parent byte count and end-time.
    `void` | `cleanAfterSample()` Clean up cached data
    `Object` | `clone()`
    `void` | `connectEnd()` Set the time to the end of connecting
    `static SampleResult` | `createTestSample(long elapsed)` Create a sample with a specific elapsed time for test purposes, but don't allow the times to be changed later
    `static SampleResult` | `createTestSample(long start, long end)` Create a sample with specific start and end times for test purposes, but don't allow the times to be changed later (used by StatVisualizerModel.Test)
    `long` | `currentTimeInMillis()` Helper method to get 1 ms resolution timing.
    `int` | `getAllThreads()`
    `AssertionResult[]` | `getAssertionResults()` Gets the assertion results associated with this sample.
    `int` | `getBodySize()` Deprecated. replaced by getBodySizeAsLong()
    `long` | `getBodySizeAsLong()`
    `int` | `getBytes()` Deprecated. use getBytesAsLong
    `long` | `getBytesAsLong()` return the bytes returned by the response.
    `long` | `getConnectTime()`
    `String` | `getContentType()`
    `String` | `getDataEncodingNoDefault()` Returns the dataEncoding.
    `String` | `getDataEncodingWithDefault()` Returns the dataEncoding or the default if no dataEncoding was provided.
    `protected String` | `getDataEncodingWithDefault(String defaultEncoding)` Returns the dataEncoding or the default if no dataEncoding was provided.
    `String` | `getDataType()` Returns the data type of the sample.
    `long` | `getEndTime()`
    `int` | `getErrorCount()` Returns the count of errors.
    `String` | `getFirstAssertionFailureMessage()`
    `int` | `getGroupThreads()`
    `int` | `getHeadersSize()` Get the headers size in bytes
    `long` | `getIdleTime()`
    `long` | `getLatency()`
    `String` | `getMediaType()` Get the media type from the Content Type
    `SampleResult` | `getParent()`
    `String` | `getRequestHeaders()`
    `String` | `getResponseCode()`
    `byte[]` | `getResponseData()` Gets the responseData attribute of the SampleResult object.
    `String` | `getResponseDataAsString()` Gets the responseData of the SampleResult object as a String
    `String` | `getResponseHeaders()`
    `String` | `getResponseMessage()`
    `String` | `getResultFileName()`
    `int` | `getSampleCount()` return the sample count.
    `String` | `getSampleLabel()`
    `String` | `getSampleLabel(boolean includeGroup)` Get the sample label for use in summary reports etc.
    `String` | `getSamplerData()`
    `SampleSaveConfiguration` | `getSaveConfig()`
    `List<String>` | `getSearchableTokens()` Get a list of all tokens that should be visible to searching
    `long` | `getSentBytes()`
    `long` | `getStartTime()`
    `SampleResult[]` | `getSubResults()` Gets the subresults associated with this sample.
    `JMeterContext.TestLogicalAction` | `getTestLogicalAction()`
    `String` | `getThreadName()`
    `long` | `getTime()` Get the time it took this sample to occur.
    `long` | `getTimeStamp()` Get the sample timestamp, which may be either the start time or the end time.
    `URL` | `getURL()`
    `String` | `getUrlAsString()` Get a String representation of the URL (if defined).
    `static boolean` | `isBinaryType(String ct)`
    `boolean` | `isIgnore()`
    `boolean` | `isMonitor()` Deprecated. since 3.2 always return false
    `static boolean` | `isRenameSampleLabel()` see https://bz.apache.org/bugzilla/show_bug.cgi?id=63055
    `boolean` | `isResponseCodeOK()`
    `boolean` | `isStampedAtStart()`
    `boolean` | `isStartNextThreadLoop()` Deprecated. use `getTestLogicalAction()`
    `boolean` | `isStopTest()`
    `boolean` | `isStopTestNow()`
    `boolean` | `isStopThread()`
    `boolean` | `isSuccessful()`
    `void` | `latencyEnd()` Set the time to the first response
    `boolean` | `markFile(String filename)` Set the "marked" flag to show that the result has been written to the file.
    `void` | `removeAssertionResults()` Allow custom SampleSenders to drop unwanted assertionResults
    `void` | `removeSubResults()` Allow custom SampleSenders to drop unwanted subResults
    `void` | `sampleEnd()` Record the end time of a sample and calculate the elapsed time
    `void` | `samplePause()` Pause a sample
    `void` | `sampleResume()` Resume a sample
    `void` | `sampleStart()` Record the start time of a sample
    `void` | `setAllThreads(int n)`
    `void` | `setBodySize(int bodySize)` Deprecated. use setBodySize(long)
    `void` | `setBodySize(long bodySize)`
    `void` | `setBytes(int length)` Deprecated. use setBytes(long)
    `void` | `setBytes(long length)` In the event the sampler does want to pass back the actual contents, we still want to calculate the throughput.
    `void` | `setConnectTime(long time)` This is only intended for use by SampleResultConverter!
    `void` | `setContentType(String string)` Stores the content-type string, e.g.
    `void` | `setDataEncoding(String dataEncoding)` Sets the dataEncoding.
    `void` | `setDataType(String dataType)` Sets the data type of the sample.
    `void` | `setEncodingAndType(String ct)` Extract and save the DataEncoding and DataType from the parameter provided.
    `void` | `setEndTime(long end)`
    `void` | `setErrorCount(int i)`
    `void` | `setGroupThreads(int n)`
    `void` | `setHeadersSize(int size)` Set the headers size in bytes
    `void` | `setIdleTime(long idle)` Set idle time pause.
    `void` | `setIgnore()` Call this method to tell JMeter to ignore this SampleResult by Listeners
    `void` | `setLatency(long latency)` This is only intended for use by SampleResultConverter!
    `void` | `setMonitor(boolean monitor)` Deprecated. since 3.2 NOOP
    `void` | `setParent(SampleResult parent)`
    `void` | `setRequestHeaders(String string)`
    `void` | `setResponseCode(String code)`
    `void` | `setResponseCodeOK()` Set response code to OK, i.e.
    `void` | `setResponseData(byte[] response)` Sets the responseData attribute of the SampleResult object.
    `void` | `setResponseData(String response)` Deprecated. - only intended for use from BeanShell code
    `void` | `setResponseData(String response, String encoding)` Sets the encoding and responseData attributes of the SampleResult object.
    `void` | `setResponseHeaders(String string)`
    `void` | `setResponseMessage(String msg)`
    `void` | `setResponseMessageOK()`
    `void` | `setResponseOK()` Set result statuses OK - shorthand method to set: ResponseCode ResponseMessage Successful status
    `void` | `setResultFileName(String resultFileName)`
    `void` | `setSampleCount(int count)` The statistical sample sender aggregates several samples to save on transmission costs.
    `void` | `setSampleLabel(String label)`
    `void` | `setSamplerData(String s)`
    `void` | `setSaveConfig(SampleSaveConfiguration propertiesToSave)`
    `void` | `setSentBytes(long sentBytesCount)`
    `void` | `setStampAndTime(long stamp, long elapsed)` For use by SaveService only.
    `void` | `setStartNextThreadLoop(boolean startNextThreadLoop)` Deprecated. use SampleResult#setTestLogicalAction(TestLogicalAction)
    `protected void` | `setStartTime(long start)`
    `void` | `setStopTest(boolean b)`
    `void` | `setStopTestNow(boolean b)`
    `void` | `setStopThread(boolean b)`
    `void` | `setSuccessful(boolean success)` Sets the successful attribute of the SampleResult object.
    `void` | `setTestLogicalAction(JMeterContext.TestLogicalAction testLogicalAction)`
    `void` | `setThreadName(String threadName)`
    `void` | `setTimeStamp(long timeStamp)` This is only intended for use by SampleResultConverter!
    `void` | `setURL(URL location)`
    `void` | `storeSubResult(SampleResult subResult)` Add a subresult read from a results file.
    `String` | `toString()` Returns the display name.

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_HTTP_ENCODING

          public static final String DEFAULT_HTTP_ENCODING

      The default encoding to be used if not overridden. The value is ISO-8859-1.

    - #### DEFAULT_ENCODING

          protected static final String DEFAULT_ENCODING

      The default encoding to be used to decode the responseData byte array. The value is defined by the property "sampleresult.default.encoding" with a default of DEFAULT_HTTP_ENCODING if that is not defined.

    - #### TEXT

          public static final String TEXT

      Data type value ("text") indicating that the response data is text.
      See Also:
        `getDataType()`, `setDataType(java.lang.String)`, Constant Field Values

    - #### BINARY

          public static final String BINARY

      Data type value ("bin") indicating that the response data is binary.
      See Also:
        `getDataType()`, `setDataType(java.lang.String)`, Constant Field Values

  - ### Constructor Detail

    - #### SampleResult

          public SampleResult()

    - #### SampleResult

          public SampleResult(SampleResult res)

      Copy constructor.
      Parameters:
        `res` - existing sample result

    - #### SampleResult

          protected SampleResult(long elapsed,
                                 boolean atend)

      Create a sample with a specific elapsed time but don't allow the times to be changed later (only used by HTTPSampleResult)
      Parameters:
        `elapsed` - time
        `atend` - create the sample finishing now, else starting now

    - #### SampleResult

          public SampleResult(long stamp,
                              long elapsed)

      Allow users to create a sample with specific timestamp and elapsed times for cloning purposes, but don't allow the times to be changed later Currently used by CSVSaveService and StatisticalSampleResult
      Parameters:
        `stamp` - this may be a start time or an end time (both in milliseconds)
        `elapsed` - time in milliseconds

  - ### Method Detail

    - #### setSaveConfig

          public void setSaveConfig(SampleSaveConfiguration propertiesToSave)

      Parameters:
        `propertiesToSave` - The propertiesToSave to set.

    - #### getSaveConfig

          public SampleSaveConfiguration getSaveConfig()

    - #### isStampedAtStart

          public boolean isStampedAtStart()

    - #### createTestSample

          public static SampleResult createTestSample(long start,
                                                      long end)

      Create a sample with specific start and end times for test purposes, but don't allow the times to be changed later (used by StatVisualizerModel.Test)
      Parameters:
        `start` - start time in milliseconds since unix epoch
        `end` - end time in milliseconds since unix epoch
      Returns:
        sample with given start and end time

    - #### createTestSample

          public static SampleResult createTestSample(long elapsed)

      Create a sample with a specific elapsed time for test purposes, but don't allow the times to be changed later
      Parameters:
        `elapsed` - - desired elapsed time in milliseconds
      Returns:
        sample that starts 'now' and ends `elapsed` milliseconds later

    - #### currentTimeInMillis

          public long currentTimeInMillis()

      Helper method to get 1 ms resolution timing.
      Returns:
        the current time in milliseconds
      Throws:
        `RuntimeException` - when `useNanoTime` is `true` but `nanoTimeOffset` is not set

    - #### setStampAndTime

          public void setStampAndTime(long stamp,
                                      long elapsed)

      For use by SaveService only.
      Parameters:
        `stamp` - this may be a start time or an end time (both in milliseconds)
        `elapsed` - time in milliseconds
      Throws:
        `RuntimeException` - when `startTime` or `endTime` has been set already

    - #### markFile

          public boolean markFile(String filename)

      Set the "marked" flag to show that the result has been written to the file.
      Parameters:
        `filename` - the name of the file
      Returns:
        `true` if the result was previously marked

    - #### getResponseCode

          public String getResponseCode()

    - #### setResponseCodeOK

          public void setResponseCodeOK()

      Set response code to OK, i.e. "200"

    - #### setResponseCode

          public void setResponseCode(String code)

    - #### isResponseCodeOK

          public boolean isResponseCodeOK()

    - #### getResponseMessage

          public String getResponseMessage()

    - #### setResponseMessage

          public void setResponseMessage(String msg)

    - #### setResponseMessageOK

          public void setResponseMessageOK()

    - #### setResponseOK

          public void setResponseOK()

      Set result statuses OK - shorthand method to set:
      - ResponseCode
      - ResponseMessage
      - Successful status

    - #### getThreadName

          public String getThreadName()

    - #### setThreadName

          public void setThreadName(String threadName)

    - #### getTimeStamp

          public long getTimeStamp()

      Get the sample timestamp, which may be either the start time or the end time.
      Returns:
        timeStamp in milliseconds
      See Also:
        `getStartTime()`, `getEndTime()`

    - #### getSampleLabel

          public String getSampleLabel()

    - #### getSampleLabel

          public String getSampleLabel(boolean includeGroup)

      Get the sample label for use in summary reports etc.
      Parameters:
        `includeGroup` - whether to include the thread group name
      Returns:
        the label

    - #### setSampleLabel

          public void setSampleLabel(String label)

    - #### addAssertionResult

          public void addAssertionResult(AssertionResult assertResult)

    - #### getAssertionResults

          public AssertionResult[] getAssertionResults()

      Gets the assertion results associated with this sample.
      Returns:
        an array containing the assertion results for this sample. Returns empty array if there are no assertion results.

    - #### addSubResult

          public void addSubResult(SampleResult subResult)

      Add a subresult and adjust the parent byte count and end-time.
      Parameters:
        `subResult` - the `SampleResult` to be added

    - #### isRenameSampleLabel

          public static boolean isRenameSampleLabel()

      see https://bz.apache.org/bugzilla/show_bug.cgi?id=63055
      Returns:
        true if TestPlan is in functional mode or property subresults.disable_renaming is true

    - #### addSubResult

          public void addSubResult(SampleResult subResult,
                                   boolean renameSubResults)

      Add a subresult and adjust the parent byte count and end-time.
      Parameters:
        `subResult` - the `SampleResult` to be added
        `renameSubResults` - boolean do we rename subResults based on position

    - #### addRawSubResult

          public void addRawSubResult(SampleResult subResult)

      Add a subresult to the collection without updating any parent fields.
      Parameters:
        `subResult` - the `SampleResult` to be added

    - #### storeSubResult

          public void storeSubResult(SampleResult subResult)

      Add a subresult read from a results file.

      As for `addSubResult(SampleResult)`, except that the fields don't need to be accumulated

      Parameters:
        `subResult` - the `SampleResult` to be added

    - #### getSubResults

          public SampleResult[] getSubResults()

      Gets the subresults associated with this sample.
      Returns:
        an array containing the subresults for this sample. Returns an empty array if there are no subresults.

    - #### setResponseData

          public void setResponseData(byte[] response)

      Sets the responseData attribute of the SampleResult object. If the parameter is null, then the responseData is set to an empty byte array. This ensures that getResponseData() can never be null.
      Parameters:
        `response` - the new responseData value

    - #### setResponseData

          @Deprecated
          public void setResponseData(String response)

      Deprecated. - only intended for use from BeanShell code
      Sets the responseData attribute of the SampleResult object. Should only be called after setting the dataEncoding (if necessary)
      Parameters:
        `response` - the new responseData value (String)

    - #### setResponseData

          public void setResponseData(String response,
                                      String encoding)

      Sets the encoding and responseData attributes of the SampleResult object.
      Parameters:
        `response` - the new responseData value (String)
        `encoding` - the encoding to set and then use (if null, use platform default)

    - #### getResponseData

          public byte[] getResponseData()

      Gets the responseData attribute of the SampleResult object.

      Note that some samplers may not store all the data, in which case getResponseData().length will be incorrect. Instead, always use `getBytes()` to obtain the sample result byte count.

      Returns:
        the responseData value (cannot be null)

    - #### getResponseDataAsString

          public String getResponseDataAsString()

      Gets the responseData of the SampleResult object as a String
      Returns:
        the responseData value as a String, converted according to the encoding

    - #### setSamplerData

          public void setSamplerData(String s)

    - #### getSamplerData

          public String getSamplerData()

    - #### getTime

          public long getTime()

      Get the time it took this sample to occur.
      Returns:
        elapsed time in milliseconds

    - #### isSuccessful

          public boolean isSuccessful()

    - #### setDataType

          public void setDataType(String dataType)

      Sets the data type of the sample.
      Parameters:
        `dataType` - String containing `BINARY` or `TEXT`
      See Also:
        `BINARY`, `TEXT`

    - #### getDataType

          public String getDataType()

      Returns the data type of the sample.
      Returns:
        String containing `BINARY` or `TEXT` or the empty string
      See Also:
        `BINARY`, `TEXT`

    - #### setEncodingAndType

          public void setEncodingAndType(String ct)

      Extract and save the DataEncoding and DataType from the parameter provided. Does not save the full content Type.
      Parameters:
        `ct` - - content type (may be null)
      See Also:
        `which should be used to save the full content-type string`

    - #### isBinaryType

          public static boolean isBinaryType(String ct)

    - #### setSuccessful

          public void setSuccessful(boolean success)

      Sets the successful attribute of the SampleResult object.
      Parameters:
        `success` - the new successful value

    - #### toString

          public String toString()

      Returns the display name.
      Overrides:
        `toString` in class `Object`
      Returns:
        display name of this sample result

    - #### getDataEncodingWithDefault

          public String getDataEncodingWithDefault()

      Returns the dataEncoding or the default if no dataEncoding was provided.
      Returns:
        the value of the dataEncoding or DEFAULT_ENCODING

    - #### getDataEncodingWithDefault

          protected String getDataEncodingWithDefault(String defaultEncoding)

      Returns the dataEncoding or the default if no dataEncoding was provided.
      Parameters:
        `defaultEncoding` - the default to be applied
      Returns:
        the value of the dataEncoding or the provided default

    - #### getDataEncodingNoDefault

          public String getDataEncodingNoDefault()

      Returns the dataEncoding. May be null or the empty String.
      Returns:
        the value of the dataEncoding

    - #### setDataEncoding

          public void setDataEncoding(String dataEncoding)

      Sets the dataEncoding.
      Parameters:
        `dataEncoding` - the dataEncoding to set, e.g. ISO-8895-1, UTF-8

    - #### isStopTest

          public boolean isStopTest()

      Returns:
        whether to stop the test waiting for current running Sampler to end

    - #### isStopTestNow

          public boolean isStopTestNow()

      Returns:
        whether to stop the test now interrupting current running samplers

    - #### isStopThread

          public boolean isStopThread()

      Returns:
        whether to stop this thread

    - #### setStopTest

          public void setStopTest(boolean b)

    - #### setStopTestNow

          public void setStopTestNow(boolean b)

    - #### setStopThread

          public void setStopThread(boolean b)

    - #### getRequestHeaders

          public String getRequestHeaders()

      Returns:
        the request headers

    - #### getResponseHeaders

          public String getResponseHeaders()

      Returns:
        the response headers

    - #### setRequestHeaders

          public void setRequestHeaders(String string)

      Parameters:
        `string` - - request headers

    - #### setResponseHeaders

          public void setResponseHeaders(String string)

      Parameters:
        `string` - - response headers

    - #### getContentType

          public String getContentType()

      Returns:
        the full content type - e.g. text/html [;charset=utf-8 ]

    - #### getMediaType

          public String getMediaType()

      Get the media type from the Content Type
      Returns:
        the media type - e.g. text/html (without charset, if any)

    - #### setContentType

          public void setContentType(String string)

      Stores the content-type string, e.g. `text/xml; charset=utf-8`
      Parameters:
        `string` - the content-type to be set
      See Also:
        `which can be used to extract the charset.`

    - #### getIdleTime

          public long getIdleTime()

      Returns:
        idleTime

    - #### getEndTime

          public long getEndTime()

      Returns:
        the end time

    - #### getStartTime

          public long getStartTime()

      Returns:
        the start time

    - #### setStartTime

          protected final void setStartTime(long start)

    - #### setEndTime

          public void setEndTime(long end)

    - #### setIdleTime

          public void setIdleTime(long idle)

      Set idle time pause. For use by SampleResultConverter/CSVSaveService.
      Parameters:
        `idle` - long

    - #### sampleStart

          public void sampleStart()

      Record the start time of a sample

    - #### sampleEnd

          public void sampleEnd()

      Record the end time of a sample and calculate the elapsed time

    - #### samplePause

          public void samplePause()

      Pause a sample

    - #### sampleResume

          public void sampleResume()

      Resume a sample

    - #### setMonitor

          @Deprecated
          public void setMonitor(boolean monitor)

      Deprecated. since 3.2 NOOP
      When a Sampler is working as a monitor
      Parameters:
        `monitor` - flag whether this sampler is working as a monitor

    - #### isMonitor

          @Deprecated
          public boolean isMonitor()

      Deprecated. since 3.2 always return false
      If the sampler is a monitor, method will return true.
      Returns:
        true if the sampler is a monitor

    - #### setSampleCount

          public void setSampleCount(int count)

      The statistical sample sender aggregates several samples to save on transmission costs.
      Parameters:
        `count` - number of samples represented by this instance

    - #### getSampleCount

          public int getSampleCount()

      return the sample count. by default, the value is 1.
      Returns:
        the sample count

    - #### getErrorCount

          public int getErrorCount()

      Returns the count of errors.
      Returns:
        0 - or 1 if the sample failed TODO do we need allow for nested samples?

    - #### setErrorCount

          public void setErrorCount(int i)

    - #### setBytes

          public void setBytes(long length)

      In the event the sampler does want to pass back the actual contents, we still want to calculate the throughput. The bytes are the bytes of the response data.
      Parameters:
        `length` - the number of bytes of the response data for this sample

    - #### setBytes

          @Deprecated
          public void setBytes(int length)

      Deprecated. use setBytes(long)
      In the event the sampler does want to pass back the actual contents, we still want to calculate the throughput. The bytes are the bytes of the response data.
      Parameters:
        `length` - the number of bytes of the response data for this sample

    - #### setSentBytes

          public void setSentBytes(long sentBytesCount)

      Parameters:
        `sentBytesCount` - long sent bytes

    - #### getSentBytes

          public long getSentBytes()

      Returns:
        the sentBytes

    - #### getBytes

          @Deprecated
          public int getBytes()

      Deprecated. use getBytesAsLong
      return the bytes returned by the response.
      Returns:
        byte count

    - #### getBytesAsLong

          public long getBytesAsLong()

      return the bytes returned by the response.
      Returns:
        byte count

    - #### getLatency

          public long getLatency()

      Returns:
        Returns the latency.

    - #### latencyEnd

          public void latencyEnd()

      Set the time to the first response

    - #### setLatency

          public void setLatency(long latency)

      This is only intended for use by SampleResultConverter!
      Parameters:
        `latency` - The latency to set.

    - #### getConnectTime

          public long getConnectTime()

      Returns:
        Returns the connect time.

    - #### connectEnd

          public void connectEnd()

      Set the time to the end of connecting

    - #### setConnectTime

          public void setConnectTime(long time)

      This is only intended for use by SampleResultConverter!
      Parameters:
        `time` - The connect time to set.

    - #### setTimeStamp

          public void setTimeStamp(long timeStamp)

      This is only intended for use by SampleResultConverter!
      Parameters:
        `timeStamp` - The timeStamp to set.

    - #### setURL

          public void setURL(URL location)

    - #### getURL

          public URL getURL()

    - #### getUrlAsString

          public String getUrlAsString()

      Get a String representation of the URL (if defined).
      Returns:
        ExternalForm of URL, or empty string if url is null

    - #### getParent

          public SampleResult getParent()

      Returns:
        Returns the parent.

    - #### setParent

          public void setParent(SampleResult parent)

      Parameters:
        `parent` - The parent to set.

    - #### getResultFileName

          public String getResultFileName()

    - #### setResultFileName

          public void setResultFileName(String resultFileName)

    - #### getGroupThreads

          public int getGroupThreads()

    - #### setGroupThreads

          public void setGroupThreads(int n)

    - #### getAllThreads

          public int getAllThreads()

    - #### setAllThreads

          public void setAllThreads(int n)

    - #### removeAssertionResults

          public void removeAssertionResults()

      Allow custom SampleSenders to drop unwanted assertionResults

    - #### removeSubResults

          public void removeSubResults()

      Allow custom SampleSenders to drop unwanted subResults

    - #### setHeadersSize

          public void setHeadersSize(int size)

      Set the headers size in bytes
      Parameters:
        `size` - the number of bytes of the header

    - #### getHeadersSize

          public int getHeadersSize()

      Get the headers size in bytes
      Returns:
        the headers size

    - #### getBodySize

          @Deprecated
          public int getBodySize()

      Deprecated. replaced by getBodySizeAsLong()
      Returns:
        the body size in bytes

    - #### getBodySizeAsLong

          public long getBodySizeAsLong()

      Returns:
        the body size in bytes

    - #### setBodySize

          public void setBodySize(long bodySize)

      Parameters:
        `bodySize` - the body size to set

    - #### setBodySize

          @Deprecated
          public void setBodySize(int bodySize)

      Deprecated. use setBodySize(long)
      Parameters:
        `bodySize` - the body size to set

    - #### isStartNextThreadLoop

          @Deprecated
          public boolean isStartNextThreadLoop()

      Deprecated. use `getTestLogicalAction()`
      Returns:
        the startNextThreadLoop

    - #### setStartNextThreadLoop

          @Deprecated
          public void setStartNextThreadLoop(boolean startNextThreadLoop)

      Deprecated. use SampleResult#setTestLogicalAction(TestLogicalAction)
      Parameters:
        `startNextThreadLoop` - the startNextLoop to set

    - #### cleanAfterSample

          public void cleanAfterSample()

      Clean up cached data

    - #### clone

          public Object clone()

      Overrides:
        `clone` in class `Object`

    - #### getSearchableTokens

          public List<String> getSearchableTokens()
                                           throws Exception

      Description copied from interface: `Searchable`
      Get a list of all tokens that should be visible to searching
      Specified by:
        `getSearchableTokens` in interface `Searchable`
      Returns:
        List of searchable tokens
      Throws:
        `Exception` - when something fails while getting the searchable tokens

    - #### isIgnore

          public boolean isIgnore()

      Returns:
        boolean true if this SampleResult should not be sent to Listeners

    - #### setIgnore

          public void setIgnore()

      Call this method to tell JMeter to ignore this SampleResult by Listeners

    - #### getFirstAssertionFailureMessage

          public String getFirstAssertionFailureMessage()

      Returns:
        String first non null assertion failure message if assertionResults is not null, null otherwise

    - #### getTestLogicalAction

          public JMeterContext.TestLogicalAction getTestLogicalAction()

      Returns:
        the testLogicalAction

    - #### setTestLogicalAction

          public void setTestLogicalAction(JMeterContext.TestLogicalAction testLogicalAction)

      Parameters:
        `testLogicalAction` - the testLogicalAction to set

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