Class SampleResultConverter
java.lang.Object
com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter
org.apache.jmeter.save.converters.SampleResultConverter
- All Implemented Interfaces:
- com.thoughtworks.xstream.converters.Converter,- com.thoughtworks.xstream.converters.ConverterMatcher
- Direct Known Subclasses:
- HTTPResultConverter
public class SampleResultConverter
extends com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter
XStream Converter for the SampleResult class
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final String
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanConvert(Class arg0) static StringReturns the converter version; used to check for possible incompatibilitiesvoidmarshal(Object obj, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context) protected voidreadFile(String resultFileName, SampleResult res) protected voidretrieveAttributes(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, SampleResult res) protected booleanretrieveItem(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, SampleResult res, Object subItem) protected voidsaveAssertions(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, SampleResult res, SampleSaveConfiguration save) Save assertion results from the sample result into the streamprotected voidsaveRequestHeaders(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, SampleResult res, SampleSaveConfiguration save) Save request headers from the sample result into the streamprotected voidsaveResponseData(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, SampleResult res, SampleSaveConfiguration save) Save the response from the sample result into the streamprotected voidsaveResponseHeaders(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, SampleResult res, SampleSaveConfiguration save) Save response headers from sample result into the streamprotected voidsaveSamplerData(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, SampleResult res, SampleSaveConfiguration save) Save the data of the sample result to a streamprotected voidsaveSubResults(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, SampleResult res, SampleSaveConfiguration save) Save sub results from sample result into the streamprotected voidsetAttributes(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, SampleResult res, SampleSaveConfiguration save) Save attributes of the sample result to the streamunmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context) protected voidwriteString(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, String tag, String value) Write a tag with a content ofvalueto thewriterMethods inherited from class com.thoughtworks.xstream.converters.collections.AbstractCollectionConvertercreateCollection, mapper, readBareItem, readCompleteItem, readItem, writeBareItem, writeCompleteItem, writeItem, writeNullItem
- 
Field Details- 
TAG_COOKIES- See Also:
 
- 
TAG_METHOD- See Also:
 
- 
TAG_QUERY_STRING- See Also:
 
- 
TAG_REDIRECT_LOCATION- See Also:
 
- 
TAG_REQUEST_HEADER- See Also:
 
- 
TAG_RESPONSE_DATA- See Also:
 
- 
TAG_RESPONSE_HEADER- See Also:
 
- 
TAG_SAMPLER_DATA- See Also:
 
- 
TAG_RESPONSE_FILE- See Also:
 
 
- 
- 
Constructor Details- 
SampleResultConverterpublic SampleResultConverter(com.thoughtworks.xstream.mapper.Mapper arg0) - Parameters:
- arg0- the mapper
 
 
- 
- 
Method Details- 
getVersionReturns the converter version; used to check for possible incompatibilities- Returns:
- the version of this converter
 
- 
canConvert- Specified by:
- canConvertin interface- com.thoughtworks.xstream.converters.ConverterMatcher
- Specified by:
- canConvertin class- com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter
 
- 
marshalpublic void marshal(Object obj, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context) - Specified by:
- marshalin interface- com.thoughtworks.xstream.converters.Converter
- Specified by:
- marshalin class- com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter
 
- 
saveSamplerDataprotected void saveSamplerData(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, SampleResult res, SampleSaveConfiguration save) Save the data of the sample result to a stream- Parameters:
- writer- stream to save objects into
- context- context for xstream to allow nested objects
- res- sample to be saved
- save- configuration telling us what to save
 
- 
saveResponseDataprotected void saveResponseData(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, SampleResult res, SampleSaveConfiguration save) Save the response from the sample result into the stream- Parameters:
- writer- stream to save objects into
- context- context for xstream to allow nested objects
- res- sample to be saved
- save- configuration telling us what to save
 
- 
saveRequestHeadersprotected void saveRequestHeaders(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, SampleResult res, SampleSaveConfiguration save) Save request headers from the sample result into the stream- Parameters:
- writer- stream to save objects into
- context- context for xstream to allow nested objects
- res- sample to be saved
- save- configuration telling us what to save
 
- 
saveResponseHeadersprotected void saveResponseHeaders(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, SampleResult res, SampleSaveConfiguration save) Save response headers from sample result into the stream- Parameters:
- writer- stream to save objects into
- context- context for xstream to allow nested objects
- res- sample to be saved
- save- configuration telling us what to save
 
- 
saveSubResultsprotected void saveSubResults(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, SampleResult res, SampleSaveConfiguration save) Save sub results from sample result into the stream- Parameters:
- writer- stream to save objects into
- context- context for xstream to allow nested objects
- res- sample to be saved
- save- configuration telling us what to save
 
- 
saveAssertionsprotected void saveAssertions(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, SampleResult res, SampleSaveConfiguration save) Save assertion results from the sample result into the stream- Parameters:
- writer- stream to save objects into
- context- context for xstream to allow nested objects
- res- sample to be saved
- save- configuration telling us what to save
 
- 
setAttributesprotected void setAttributes(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, SampleResult res, SampleSaveConfiguration save) Save attributes of the sample result to the stream- Parameters:
- writer- stream to save objects into
- context- context for xstream to allow nested objects
- res- sample to be saved
- save- configuration telling us what to save
 
- 
writeStringprotected void writeString(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, String tag, String value) Write a tag with a content ofvalueto thewriter- Parameters:
- writer- writer to write the tag into
- tag- name of the tag to use
- value- content for tag
 
- 
unmarshalpublic Object unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context) - Specified by:
- unmarshalin interface- com.thoughtworks.xstream.converters.Converter
- Specified by:
- unmarshalin class- com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter
 
- 
retrieveItemprotected boolean retrieveItem(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, SampleResult res, Object subItem) - Parameters:
- reader- stream from which the objects should be read
- context- context for xstream to allow nested objects
- res- sample result into which the information should be retrieved
- subItem- sub item which should be added into- res
- Returns:
- trueif the item was processed (for HTTPResultConverter)
 
- 
retrieveAttributesprotected void retrieveAttributes(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, SampleResult res) - Parameters:
- reader- stream to read objects from
- context- context for xstream to allow nested objects
- res- sample result on which the attributes should be set
 
- 
readFile
 
-