Esempio n. 1
0
 protected void updateStats(double ad[], String as[], Monitor monitor, int i) {
   Enumeration enumeration = monitor.getStatePropertyObjects();
   do {
     if (!enumeration.hasMoreElements()) {
       break;
     }
     StringProperty stringproperty = (StringProperty) enumeration.nextElement();
     if (stringproperty.getName().equals("snmpValue")
         || stringproperty.getName().equals("result")
         || stringproperty.getName().equals("value")
         || stringproperty.getName().equals("value0")
         || stringproperty.getName().equals("column1")) {
       String s = monitor.getProperty(stringproperty);
       if (!s.equals("n/a")) {
         ad[i] = TextUtils.toDouble(s);
       } else {
         ad[i] = -999D;
       }
       as[i] = monitor.getProperty("_name");
     }
   } while (true);
 }