org.apache.jmeter.save
Class SaveService
java.lang.Object
org.apache.jmeter.save.SaveService
- public class SaveService
- extends Object
Handles setting up XStream serialisation.
The class reads alias definitions from saveservice.properties.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SAMPLE_EVENT_OBJECT
public static final String SAMPLE_EVENT_OBJECT
- See Also:
- Constant Field Values
TESTPLAN_FORMAT
public static final String TESTPLAN_FORMAT
TESTLOG_FORMAT
public static final String TESTLOG_FORMAT
SaveService
public SaveService()
loadProperties
public static Properties loadProperties()
throws IOException
- Throws:
IOException
aliasToClass
public static String aliasToClass(String s)
classToAlias
public static String classToAlias(String s)
saveTree
public static void saveTree(HashTree tree,
OutputStream out)
throws IOException
- Throws:
IOException
saveElement
public static void saveElement(Object el,
OutputStream out)
throws IOException
- Throws:
IOException
loadElement
public static Object loadElement(InputStream in)
throws IOException
- Throws:
IOException
saveSampleResult
public static void saveSampleResult(SampleEvent evt,
Writer writer)
throws IOException
- Save a sampleResult to an XML output file using XStream.
- Parameters:
evt
- sampleResult wrapped in a sampleEventwriter
- output stream which must be created using getFileEncoding(String)
- Throws:
IOException
saveTestElement
public static void saveTestElement(TestElement elem,
Writer writer)
throws IOException
- Parameters:
elem
- test elementwriter
- output stream which must be created using getFileEncoding(String)
- Throws:
IOException
loadTestResults
public static TestResultWrapper loadTestResults(InputStream reader)
throws Exception
- Throws:
Exception
loadTree
public static HashTree loadTree(InputStream reader)
throws Exception
- Throws:
Exception
getFileEncoding
public static String getFileEncoding(String dflt)
- Returns the file Encoding specified in saveservice.properties or the default
- Parameters:
dflt
- value to return if file encoding was not provided
- Returns:
- file encoding or default
isSaveTestPlanFormat20
public static boolean isSaveTestPlanFormat20()
isSaveTestLogFormat20
public static boolean isSaveTestLogFormat20()
isSaveTestPlanFormat22
public static boolean isSaveTestPlanFormat22()
CEtoString
public static String CEtoString(com.thoughtworks.xstream.converters.ConversionException ce)
- Simplify getMessage() output from XStream ConversionException
- Parameters:
ce
- - ConversionException to analyse
- Returns:
- string with details of error
getPropertiesVersion
public static String getPropertiesVersion()
getVERSION
public static String getVERSION()
Copyright © 1998-2008 Apache Software Foundation. All Rights Reserved.