Class AbstractSampleProcessor
-
- All Implemented Interfaces:
-
org.apache.jmeter.report.processor.SampleProcessor
public class AbstractSampleProcessor implements SampleProcessor
Base for sample processor implementations Implements basic logic for setting sample context and handling channel attributes.
- Since:
3.0
-
-
Field Summary
Fields Modifier and Type Field Description public SampleContext
sampleContext
-
Constructor Summary
Constructors Constructor Description AbstractSampleProcessor()
-
Method Summary
Modifier and Type Method Description SampleContext
getSampleContext()
Gets the sample context. void
setSampleContext(SampleContext sampleContext)
Set sample context that this consumer should rely on. void
setChannelAttribute(int channel, String key, Object value)
Associate an attribute to the specified channel for this sample processor If the attribute already exist, it is replaced. Object
getChannelAttribute(int channel, String key)
Return an attribute value associated on a channel on this sample processor -
-
Method Detail
-
getSampleContext
SampleContext getSampleContext()
Gets the sample context.
- Returns:
the sample context
-
setSampleContext
void setSampleContext(SampleContext sampleContext)
Set sample context that this consumer should rely on.
-
setChannelAttribute
void setChannelAttribute(int channel, String key, Object value)
Associate an attribute to the specified channel for this sample processor If the attribute already exist, it is replaced.
- Parameters:
channel
- The channel number to associate the attribute onkey
- The attribute keyvalue
- The attribute value to be set
-
getChannelAttribute
Object getChannelAttribute(int channel, String key)
Return an attribute value associated on a channel on this sample processor
- Parameters:
channel
- The channel on which the attribute is associatedkey
- The attribute key to be retrieved- Returns:
The attribute value or null if none is found for the specified key
-
-
-
-