class ReportPublisherFactory {

  public ReportPublisher getPublisherFor(
      Class<? extends GeneratedMessage> report) {
    Class<? extends ReportPublisher> publisherClass =
        report2publisher.get(report);
    if (publisherClass == null) {
      throw new RuntimeException("No publisher found for report " + report);
    }
    try {
      ReportPublisher reportPublisher = publisherClass.newInstance();
      reportPublisher.setConf(conf);
      return reportPublisher;
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }

  public  ReportPublisherFactory(ConfigurationSource conf);

}