Examples of TransactionReport


Examples of com.dianping.cat.consumer.transaction.model.entity.TransactionReport

      Date next = new Date(current.getTime() + TimeHelper.ONE_HOUR);
      Set<String> domains = queryDomains(current);
      System.out.println("Process " + m_sdf.format(current));

      for (String domain : domains) {
        TransactionReport report = m_reportService.queryTransactionReport(domain, current, next);
        ReportVisitor visitor = new ReportVisitor();

        visitor.visitTransactionReport(report);
        Index index = visitor.getIndex();
        findOrCreate(domain).add(getMonthStart(start), index);
View Full Code Here

Examples of com.dianping.cat.consumer.transaction.model.entity.TransactionReport

    }
    return report;
  }

  public TransactionReport mergerAllName(TransactionReport report, String ipAddress, String allName) {
    TransactionReport temp = mergerAllIp(report, ipAddress);

    return mergerAllName(temp, allName);
  }
View Full Code Here

Examples of com.dianping.cat.consumer.transaction.model.entity.TransactionReport

    super.visitRange(range);
  }

  @Override
  public void visitTransactionReport(TransactionReport transactionReport) {
    m_report = new TransactionReport(transactionReport.getDomain());
    m_report.setStartTime(transactionReport.getStartTime());
    m_report.setEndTime(transactionReport.getEndTime());
    m_report.getDomainNames().addAll(transactionReport.getDomainNames());
    m_report.getIps().addAll(transactionReport.getIps());
View Full Code Here

Examples of com.dianping.cat.consumer.transaction.model.entity.TransactionReport

import com.dianping.cat.report.ReportPage;

public class XmlViewer implements Viewer<ReportPage, Action, Context, Model> {
  @Override
  public void view(Context ctx, Model model) throws ServletException, IOException {
    TransactionReport report = model.getReport();
    HttpServletResponse res = ctx.getHttpServletResponse();

    if (report != null) {
      ServletOutputStream out = res.getOutputStream();

      res.setContentType("text/xml");
      out.print(report.toString());
    } else {
      res.sendError(404, "Not found!");
    }
  }
View Full Code Here

Examples of com.dianping.cat.consumer.transaction.model.entity.TransactionReport

    super.visitRange(range);
  }

  @Override
  public void visitTransactionReport(TransactionReport transactionReport) {
    m_report = new TransactionReport(transactionReport.getDomain());
    m_report.setStartTime(transactionReport.getStartTime());
    m_report.setEndTime(transactionReport.getEndTime());
    m_report.getDomainNames().addAll(transactionReport.getDomainNames());
    m_report.getIps().addAll(transactionReport.getIps());
View Full Code Here

Examples of com.dianping.cat.consumer.transaction.model.entity.TransactionReport

public class TransactionReportService extends AbstractReportService<TransactionReport> {

  @Override
  public TransactionReport makeReport(String domain, Date start, Date end) {
    TransactionReport report = new TransactionReport(domain);

    report.setStartTime(start);
    report.setEndTime(end);
    return report;
  }
View Full Code Here

Examples of com.dianping.cat.consumer.transaction.model.entity.TransactionReport

    return report;
  }

  @Override
  public TransactionReport queryDailyReport(String domain, Date start, Date end) {
    TransactionReportMerger merger = new TransactionReportMerger(new TransactionReport(domain));
    long startTime = start.getTime();
    long endTime = end.getTime();
    String name = TransactionAnalyzer.ID;

    for (; startTime < endTime; startTime = startTime + TimeHelper.ONE_DAY) {
      try {
        DailyReport report = m_dailyReportDao.findByDomainNamePeriod(domain, name, new Date(startTime),
              DailyReportEntity.READSET_FULL);
        String xml = report.getContent();

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

          reportModel.accept(merger);
        }
      } catch (DalNotFoundException e) {
        // ignore
      } catch (Exception e) {
        Cat.logError(e);
      }
    }
    TransactionReport transactionReport = merger.getTransactionReport();

    transactionReport.setStartTime(start);
    transactionReport.setEndTime(end);
    return transactionReport;
  }
View Full Code Here

Examples of sg.edu.nus.iss.se07.bc.TransactionReport

        public String printTransactionReport() throws AppException {
                boolean success = true;
                String reportfilename = "";

                TransactionReport transactionReport = new TransactionReport();
                try {
                        success = transactionReport.generateReport();
                        if (success) {
                                reportfilename = transactionReport.getFileOutputName();
                        }
                } catch (AppException ex) {
                        success = false;
                        Logger.getLogger(AppController.class.getName()).log(Level.SEVERE, ex.getMessage(), ex);
                        throw ex;
View Full Code Here

Examples of sg.edu.nus.iss.se07.bc.TransactionReport

        public String printTransactionReport(Date start, Date finish) throws AppException {
                boolean success = true;
                String reportfilename = "";

                TransactionReport transactionReport = new TransactionReport();
                try {
                        success = transactionReport.generateReport(start, finish);
                        if (success) {
                                reportfilename = transactionReport.getFileOutputName();
                        }
                } catch (AppException ex) {
                        success = false;
                        Logger.getLogger(AppController.class.getName()).log(Level.SEVERE, ex.getMessage(), ex);
                        throw ex;
View Full Code Here

Examples of sg.edu.nus.iss.se07.bc.TransactionReport

                transactionReport = reportfolder;
        }

        public void testReport(String outputfilename, boolean header, String headertitle, boolean footer, String footertitle) {

                TransactionReport dataObjectReport = new TransactionReport("Transaction Report", transactionDBFormat, transactionDB, outputfilename, header, footer);
                dataObjectReport.setHeader(headertitle);
                dataObjectReport.setFooter(footertitle);

                        try {                                dataObjectReport.generateReport();                        } catch (AppException ex) {                                Logger.getLogger(TestTransaction.class.getName()).log(Level.SEVERE, ex.getMessage(), ex);                        }
                dataObjectReport = null;

        }
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.