Interface SampleConsumer
-
- All Implemented Interfaces:
-
org.apache.jmeter.report.processor.SampleProcessor
public interface SampleConsumer implements SampleProcessor
Defines a sample consumer
A sample consumer is meant to consume samples in order to process them.
A sample consumer can consume samples on different channels and each channel is assigned a single metadata structure.
A sample consumer is passive, meaning that its
consume()
service must be called by a third party object.Sample metadata must be provided to the consumer before
startConsuming()
is called.The following sequence must be observed when consuming samples :
- Call
setConsumedMetadata()
for each channel that will consume samples - Call
startConsuming()
before any call toconsume()
- Call
consume()
for each sample to be consumed by the consumer, specify the channel on which to consume - Call
stopConsuming()
after every sample has been consumed
- Since:
3.0
-
-
Method Summary
Modifier and Type Method Description abstract void
setConsumedMetadata(SampleMetadata sampleMetadata, int channel)
Set the metadata of samples that will be consumed on the specified channel. abstract void
startConsuming()
Start the sample consuming. abstract void
consume(Sample s, int channel)
Consumes the specified sample ton the specified channel. abstract void
stopConsuming()
Stops the consuming process. -
-
Method Detail
-
setConsumedMetadata
abstract void setConsumedMetadata(SampleMetadata sampleMetadata, int channel)
Set the metadata of samples that will be consumed on the specified channel.
- Parameters:
sampleMetadata
- The sample metadata that are being consumed for the associated channelchannel
- The channel whose sample metadata are being defined
-
startConsuming
abstract void startConsuming()
Start the sample consuming. This step is used by consumer to initialize their process.
-
consume
abstract void consume(Sample s, int channel)
Consumes the specified sample ton the specified channel.
- Parameters:
s
- The sample to be consumedchannel
- The channel on which the sample is consumed
-
stopConsuming
abstract void stopConsuming()
Stops the consuming process. No sample will be processed after this service has been called.
-
-
-
-