org.apache.jmeter.samplers

Class SampleEvent

Implemented Interfaces:
Serializable

public class SampleEvent
extends Object
implements Serializable

Packages information regarding the target of a sample event, such as the result from that event and the thread group it ran in.

Field Summary

static String
HOSTNAME
static String
SAMPLE_VARIABLES

Constructor Summary

SampleEvent()
SampleEvent(SampleResult result, String threadGroup)
Creates SampleEvent without saving any variables.
SampleEvent(SampleResult result, String threadGroup, String hostname)
Only intended for use when loading results from a file.
SampleEvent(SampleResult result, String threadGroup, JMeterVariables jmvars)
Contructor used for normal samples, saves variable values if any are defined.

Method Summary

String
getHostname()
SampleResult
getResult()
String
getThreadGroup()
static int
getVarCount()
Return the number of variables defined
static String
getVarName(int i)
Get the nth variable name (zero-based)
String
getVarValue(int i)
Get the nth variable value (zero-based)

Field Details

HOSTNAME

public static final String HOSTNAME

SAMPLE_VARIABLES

public static final String SAMPLE_VARIABLES

Constructor Details

SampleEvent

public SampleEvent()

SampleEvent

public SampleEvent(SampleResult result,
                   String threadGroup)
Creates SampleEvent without saving any variables. Use by Proxy and StatisticalSampleSender.
Parameters:
result - SampleResult
threadGroup - name

SampleEvent

public SampleEvent(SampleResult result,
                   String threadGroup,
                   String hostname)
Only intended for use when loading results from a file.
Parameters:
result -
threadGroup -
hostname -

SampleEvent

public SampleEvent(SampleResult result,
                   String threadGroup,
                   JMeterVariables jmvars)
Contructor used for normal samples, saves variable values if any are defined.
Parameters:
result -
threadGroup - name
jmvars - Jmeter variables

Method Details

getHostname

public String getHostname()

getResult

public SampleResult getResult()

getThreadGroup

public String getThreadGroup()

getVarCount

public static int getVarCount()
Return the number of variables defined

getVarName

public static String getVarName(int i)
Get the nth variable name (zero-based)

getVarValue

public String getVarValue(int i)
Get the nth variable value (zero-based)

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