Apache JMeter
2.0.1.20050615

org.apache.jmeter.save
Interface DataSource


public interface DataSource

TODO - does not appear to be used ...

Version:
$Revision: 1.6 $

Field Summary
static int APPEND
           
static int ASSERTION_RESULTS_MASK
          Content mask indicating that assertion messages should be recorded.
static int BASE_INFO_MASK
          Content mask indicating the basic data points (label, time, success).
static int EXTRA_INFO_MASK
          Content mask indicating various miscellenous data (thread_name, timstamp, response code, response message, data type).
static int OVERWRITE
           
static int REQUEST_DATA_MASK
          Content mask indicating that request data should be recorded.
static int RESPONSE_MASK
          Content mask indicating that response data should be recorded.
static int SUB_RESULTS_MASK
          Content mask indicating that sub results should be included.
 
Method Summary
 void closeSource()
          Closes a file that had been opened for recording.
 Collection loadLog()
          Load a file of previously recorded sample results and return them all in a collection.
 Collection loadLog(int length)
          Load a number of samples from the data source, starting from the next sample.
 void openSource(int mode, int contentMask)
          Opens a file for recording sample results.
 void recordSample(SampleResult result)
          Save a SampleResult object to the specified file.
 

Field Detail

BASE_INFO_MASK

public static final int BASE_INFO_MASK
Content mask indicating the basic data points (label, time, success).

See Also:
Constant Field Values

EXTRA_INFO_MASK

public static final int EXTRA_INFO_MASK
Content mask indicating various miscellenous data (thread_name, timstamp, response code, response message, data type).

See Also:
Constant Field Values

SUB_RESULTS_MASK

public static final int SUB_RESULTS_MASK
Content mask indicating that sub results should be included. The level of detail of the sub results will match that chosen for the main result.

See Also:
Constant Field Values

RESPONSE_MASK

public static final int RESPONSE_MASK
Content mask indicating that response data should be recorded.

See Also:
Constant Field Values

REQUEST_DATA_MASK

public static final int REQUEST_DATA_MASK
Content mask indicating that request data should be recorded.

See Also:
Constant Field Values

ASSERTION_RESULTS_MASK

public static final int ASSERTION_RESULTS_MASK
Content mask indicating that assertion messages should be recorded.

See Also:
Constant Field Values

APPEND

public static final int APPEND
See Also:
Constant Field Values

OVERWRITE

public static final int OVERWRITE
See Also:
Constant Field Values
Method Detail

openSource

public void openSource(int mode,
                       int contentMask)
                throws IOException
Opens a file for recording sample results.

Parameters:
mode - indicates whether the file is opened for appending data to the end of the file or overwriting the file contents.
contentMask - mask defining what data is recorded. This is a combination of one or more of the content mask constants defined in this class (combined with bitwise 'or').
Throws:
IOException

closeSource

public void closeSource()
                 throws IOException
Closes a file that had been opened for recording.

Throws:
IOException

loadLog

public Collection loadLog()
                   throws IOException
Load a file of previously recorded sample results and return them all in a collection.

Throws:
IOException

loadLog

public Collection loadLog(int length)
                   throws IOException
Load a number of samples from the data source, starting from the next sample.

Throws:
IOException

recordSample

public void recordSample(SampleResult result)
                  throws IOException
Save a SampleResult object to the specified file. The file must have been initialized with a (link beginRecording(String,int,int,int)) call.

Throws:
IOException

Apache JMeter
2.0.1.20050615

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