Interface SampleProducer

  • All Implemented Interfaces:
    org.apache.jmeter.report.processor.SampleProcessor

    
    public interface SampleProducer
     implements SampleProcessor
                        

    Defines a sample producer

    A sample producer is able to produce sample on different channels.

    Typically, a SampleProducer can be connected to SampleConsumer where it will produced sample that will be consumed by the sample consumer.

    A sample producer can produce samples of different metadata for reach channel/

    The following production sequence must be observed:

    • Call setProducedMetadata() for each produced channel
    • Call startProducing()
    • Call produce() for each sample to produce for every channel
    • Call stopProducing()
    Since:

    3.0

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract void setProducedMetadata(SampleMetadata metadata, int channel) Set the metadata associated with the specified channel
      abstract void startProducing() Start producing samples, must be invoked before any call to produce()
      abstract void produce(Sample s, int channel) Produce a single sample on the specified channel
      abstract void stopProducing() Stop producing samples, no produce() call should occur after this service has been called.
      • Methods inherited from class org.apache.jmeter.report.processor.SampleProcessor

        getChannelAttribute, getSampleContext, setChannelAttribute, setSampleContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • setProducedMetadata

         abstract void setProducedMetadata(SampleMetadata metadata, int channel)

        Set the metadata associated with the specified channel

        Parameters:
        metadata - The metadata to be associated to the specified channel
        channel - The channel whoses metadata are being associated with
      • startProducing

         abstract void startProducing()

        Start producing samples, must be invoked before any call to produce()

      • produce

         abstract void produce(Sample s, int channel)

        Produce a single sample on the specified channel

        Parameters:
        s - The sample produced
        channel - The channel on which is produced the sample
      • stopProducing

         abstract void stopProducing()

        Stop producing samples, no produce() call should occur after this service has been called.