Examples of AlertMessageEntity


Examples of com.dianping.cat.report.task.alert.sender.AlertMessageEntity

      try {
        String names = String.valueOf(report.getNames());
        String content = renderContent(names, domain, period);
        String title = renderTitle(names, domain);
        List<String> emails = m_scheduledManager.queryEmailsBySchReportId(report.getId());
        AlertMessageEntity message = new AlertMessageEntity(domain, title, "ScheduledJob", content, emails);
        boolean result = m_sendManager.sendAlert(AlertChannel.MAIL, message);

        insertMailLog(report.getId(), content, title, result, emails);
        t.addData(emails.toString());
        t.setStatus(Transaction.SUCCESS);
View Full Code Here

Examples of com.dianping.cat.report.task.alert.sender.AlertMessageEntity

  }

  private void notify(Date yesterday, List<AppDataComparisonResult> results, List<String> emails) {
    String title = renderTitle();
    String content = m_render.renderReport(yesterday, results);
    AlertMessageEntity message = new AlertMessageEntity("", title, "AppDataComparison", content, emails);

    try {
      boolean result = m_sendManager.sendAlert(AlertChannel.MAIL, message);
      int reportId = Integer.parseInt(new SimpleDateFormat("yyyyMMdd").format(yesterday));
View Full Code Here

Examples of com.dianping.cat.report.task.alert.sender.AlertMessageEntity

    case ALERT:
      List<String> receivers = Splitters.by(",").noEmptyItem().split(payload.getReceivers());
      if (receivers == null || receivers.size() == 0) {
        setAlertResult(model, 0);
      } else {
        AlertMessageEntity message = new AlertMessageEntity(payload.getGroup(), payload.getTitle(),
              payload.getType(), payload.getContent(), receivers);

        try {
          boolean result = m_senderManager.sendAlert(AlertChannel.findByName(payload.getChannel()), message);
          if (result) {
View Full Code Here

Examples of com.dianping.cat.report.task.alert.sender.AlertMessageEntity

    if (content == null || "".equals(content)) {
      return null;
    } else {
      String title = buildMailTitle(domain, date);
      List<String> receivers = builderReceivers(receiverStr);
      AlertMessageEntity message = new AlertMessageEntity(domain, title, "alertSummary", content, receivers);

      m_sendManager.sendAlert(AlertChannel.MAIL, message);
    }

    return content;
View Full Code Here

Examples of com.dianping.cat.report.task.alert.sender.AlertMessageEntity

    SenderManager manager = lookup(SenderManager.class);
    String content = Files.forIO().readFrom(new File("/tmp/html.html"), "utf-8");
    List<String> receivers = new ArrayList<String>();

    receivers.add("yong.you@dianping.com");
    AlertMessageEntity message = new AlertMessageEntity("Test", "test", "test", content, receivers);
    boolean result = manager.sendAlert(AlertChannel.MAIL, message);

    System.out.println(result);
  }
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.