Interface IExporterRegistry

All Known Implementing Classes:
ExporterRegistry

public interface IExporterRegistry
Defines the contract for a registry that manages associations between export formats and their corresponding exporters. This interface allows for the registration of different exporters based on the ExportFormat, and for retrieving an exporter given a specific format. Implementing this interface facilitates the support of multiple types of export operations, enabling dynamic handling of various export requirements.
  • Method Details

    • registerExporter

      void registerExporter(ExportFormat format, IStatisticsExporter exporter)
      Registers an IStatisticsExporter to be associated with a specific ExportFormat. Implementations should ensure that the exporter is stored in such a way that it can be retrieved when required based on the format. If an exporter for a given format is already registered, the behavior (whether to replace the existing exporter or not) is left to the implementation.
      Parameters:
      format - The export format with which the exporter is to be associated. Must not be null.
      exporter - The exporter to be registered. Must not be null.
    • getExporter

      IStatisticsExporter getExporter(ExportFormat format)
      Retrieves an IStatisticsExporter associated with the specified ExportFormat. Implementations should return the corresponding exporter if one is registered for the given format. If no exporter is registered for the specified format, the behavior (such as returning null or throwing an exception) is left to the implementation.
      Parameters:
      format - The export format for which to retrieve the exporter. Must not be null.
      Returns:
      The exporter associated with the specified format, or null or throw an exception if no exporter is registered for that format.