Examples of accept()


Examples of com.dianping.cat.configuration.server.entity.ServerConfig.accept()

      String xml = Files.forIO().readFrom(configFile, "utf-8");
      ServerConfig config = DefaultSaxParser.parse(xml);

      // do validation
      config.accept(new ServerConfigValidator());
      m_config = config;
    } else {
      if (configFile != null) {
        m_logger.warn(String.format("Configuration file(%s) not found, IGNORED.", configFile.getCanonicalPath()));
      }
View Full Code Here

Examples of com.dianping.cat.consumer.cross.model.entity.CrossReport.accept()

    for (; startTime < endTime; startTime += TimeHelper.ONE_DAY) {
      try {
        CrossReport reportModel = m_reportService.queryCrossReport(domain, new Date(startTime), new Date(startTime
              + TimeHelper.ONE_DAY));
        reportModel.accept(merger);
      } catch (Exception e) {
        Cat.logError(e);
      }
    }
    CrossReport crossReport = merger.getCrossReport();
View Full Code Here

Examples of com.dianping.cat.consumer.dependency.model.entity.DependencyReport.accept()

    DependencyReport reportNew = DefaultSaxParser.parse(newXml);
    String expected = Files.forIO().readFrom(getClass().getResourceAsStream("dependency_analyzer_merger.xml"), "utf-8");
    DependencyReportMerger merger = new DependencyReportMerger(new DependencyReport(reportOld.getDomain()));

    reportOld.accept(merger);
    reportNew.accept(merger);

    Assert.assertEquals("Check the merge result!", expected.replace("\r", ""), merger.getDependencyReport().toString()
          .replace("\r", ""));
    Assert.assertEquals("Source report is changed!", newXml.replace("\r", ""), reportNew.toString().replace("\r", ""));
  }
View Full Code Here

Examples of com.dianping.cat.consumer.event.model.entity.EventReport.accept()

    for (; startTime < endTime; startTime += TimeHelper.ONE_DAY) {
      try {
        EventReport reportModel = m_reportService.queryEventReport(domain, new Date(startTime), new Date(startTime
              + TimeHelper.ONE_DAY));
        reportModel.accept(merger);
      } catch (Exception e) {
        Cat.logError(e);
      }
    }
    EventReport eventReport = merger.getEventReport();
View Full Code Here

Examples of com.dianping.cat.consumer.heartbeat.model.entity.HeartbeatReport.accept()

          try {
            if (xml != null && xml.length() > 0) {
              HeartbeatReport reportModel = com.dianping.cat.consumer.heartbeat.model.transform.DefaultSaxParser
                    .parse(xml);
              reportModel.accept(merger);
            } else {
              HeartbeatReport reportModel = queryFromHourlyBinary(report.getId(), domain);
              reportModel.accept(merger);
            }
          } catch (DalNotFoundException e) {
View Full Code Here

Examples of com.dianping.cat.consumer.matrix.model.entity.MatrixReport.accept()

              DailyReportEntity.READSET_FULL);
        String xml = report.getContent();

        if (xml != null && xml.length() > 0) {
          MatrixReport reportModel = com.dianping.cat.consumer.matrix.model.transform.DefaultSaxParser.parse(xml);
          reportModel.accept(merger);
        } else {
          MatrixReport reportModel = queryFromDailyBinary(report.getId(), domain);

          reportModel.accept(merger);
        }
View Full Code Here

Examples of com.dianping.cat.consumer.metric.model.entity.MetricReport.accept()

        byte[] content = report.getContent();

        try {
          MetricReport reportModel = DefaultNativeParser.parse(content);

          reportModel.accept(merger);
        } catch (Exception e) {
          Cat.logError(e);
          Cat.getProducer().logEvent("ErrorXML", MetricAnalyzer.ID, Event.SUCCESS,
                report.getProductLine() + " " + report.getPeriod() + " " + report.getId());
        }
View Full Code Here

Examples of com.dianping.cat.consumer.problem.model.entity.ProblemReport.accept()

    for (; startTime < endTime; startTime += TimeHelper.ONE_DAY) {
      try {
        ProblemReport reportModel = m_reportService.queryProblemReport(domain, new Date(startTime), new Date(
              startTime + TimeHelper.ONE_DAY));
        reportModel.accept(merger);
      } catch (Exception e) {
        Cat.logError(e);
      }
    }
    ProblemReport problemReport = merger.getProblemReport();
View Full Code Here

Examples of com.dianping.cat.consumer.state.model.entity.StateReport.accept()

    for (; startTime < endTime; startTime += TimeHelper.ONE_DAY) {
      try {
        StateReport reportModel = m_reportService.queryStateReport(domain, new Date(startTime), new Date(startTime
              + TimeHelper.ONE_DAY));

        reportModel.accept(merger);
      } catch (Exception e) {
        Cat.logError(e);
      }
    }
    StateReport stateReport = merger.getStateReport();
View Full Code Here

Examples of com.dianping.cat.consumer.top.model.entity.TopReport.accept()

          String xml = report.getContent();

          try {
            if (xml != null && xml.length() > 0) {
              TopReport reportModel = com.dianping.cat.consumer.top.model.transform.DefaultSaxParser.parse(xml);
              reportModel.accept(merger);
            } else {
              TopReport reportModel = queryFromHourlyBinary(report.getId(), domain);
              reportModel.accept(merger);
            }
          } catch (DalNotFoundException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.