Package net.sourceforge.stat4j

Examples of net.sourceforge.stat4j.Alert


    return c;
  }

  public Alert createAlert(String name) {
    String prefix = "alert." + name + ".";
    Alert a = new Alert();
    Properties p = Util.createProperties(prefix);
    a.init(name, p);
    return a;
  }
View Full Code Here


        int dot = key.indexOf('.', prefix.length());
        String name = key.substring(prefix.length(), dot);

        if (!alerts.containsKey(name)) {

          Alert a = createAlert(name);
          alerts.put(name, a);
        }
      } //fi
    } // end while
    return (Alert[]) alerts.values().toArray(new Alert[0]);
View Full Code Here

   
    // load alerts
    Alert[] alerts = factory.loadAlerts();
   
    for (int i = 0; i < alerts.length; ++i) {
      Alert a = alerts[i];

      this.alerts.put(a.getStatisticName(), a);
    }
   

    HashMap filterMap = new HashMap();
View Full Code Here

  }

  protected void calculateStatistic(Calculator calculator, Metric metric) {
    calculator.applyMetric(metric);
 
    Alert a = (Alert) alerts.get(metric.getStatisticName());
   
    if (a != null) {
      a.evaluateAlert(calculator.getResult());
    }
   
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.stat4j.Alert

Copyright © 2018 www.massapicom. 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.