Class AbstractSummaryConsumer<TData>

Type Parameters:
TData - the type of data to process
All Implemented Interfaces:
SampleConsumer, SampleProcessor, SampleProducer
Direct Known Subclasses:
ApdexSummaryConsumer, ErrorsSummaryConsumer, StatisticsSummaryConsumer, Top5ErrorsBySamplerConsumer

public abstract class AbstractSummaryConsumer<TData> extends AbstractSampleConsumer
The class AbstractSummaryConsumer provides a base class for data of the dashboard page.
Since:
3.0
  • Field Details

  • Constructor Details

    • AbstractSummaryConsumer

      protected AbstractSummaryConsumer(boolean supportsControllersDiscrimination)
      Instantiates a new abstract summary consumer.
      Parameters:
      supportsControllersDiscrimination - indicates whether this summary can discriminate controller samples
  • Method Details

    • hasOverallResult

      public final boolean hasOverallResult()
      Defines whether the result contains an overall item.
      Returns:
      true, if the result contains an overall item
    • setHasOverallResult

      public final void setHasOverallResult(boolean hasOverallResult)
      Defines whether the result contains an overall item.
      Parameters:
      hasOverallResult - true, if the result contains an overall item; false otherwise
    • suppportsControllersDiscrimination

      public final boolean suppportsControllersDiscrimination()
      Indicates whether this summary can discriminate controller samples
      Returns:
      true, if this summary can discriminate controller samples; false otherwise.
    • getOverallInfo

      protected final AbstractSummaryConsumer<TData>.SummaryInfo getOverallInfo()
      Gets the overall info.
      Returns:
      the overall info
    • getSummaryInfos

      protected final Map<String,AbstractSummaryConsumer<TData>.SummaryInfo> getSummaryInfos()
      Gets the summary infos.
      Returns:
      the summary infos
    • getKeyFromSample

      protected abstract String getKeyFromSample(Sample sample)
      Gets the identifier key from sample.
      This key is use identify the SummaryInfo linked with the sample
      Parameters:
      sample - the sample
      Returns:
      the key identifying the sample
    • createDataResult

      protected abstract ListResultData createDataResult(String key, TData data)
      Creates a result item for information identified by the specified key.
      Parameters:
      key - the key
      data - the data
      Returns:
      the list result data
    • createResultTitles

      protected abstract ListResultData createResultTitles()
      Creates the result containing titles of columns.
      Returns:
      the list of titles
    • updateData

      protected abstract void updateData(AbstractSummaryConsumer<TData>.SummaryInfo info, Sample sample)
      Update the stored data with the data from the specified sample.
      Parameters:
      info - SummaryInfo
      sample - the sample
    • startConsuming

      public void startConsuming()
      Description copied from interface: SampleConsumer
      Start the sample consuming. This step is used by consumer to initialize their process.
    • consume

      public void consume(Sample sample, int channel)
      Description copied from interface: SampleConsumer
      Consumes the specified sample ton the specified channel.
      Parameters:
      sample - The sample to be consumed
      channel - The channel on which the sample is consumed
    • stopConsuming

      public void stopConsuming()
      Description copied from interface: SampleConsumer
      Stops the consuming process. No sample will be processed after this service has been called.