Package org.eurekaj.api.enumtypes

Examples of org.eurekaj.api.enumtypes.UnitType


        }
    return statList;
  }

    private UnitType getUnitType(String param) {
        UnitType unitType = UnitType.N;

        if (param.equalsIgnoreCase("n")) {
            unitType = UnitType.N;
        } else if (param.equalsIgnoreCase("ns")) {
            unitType = UnitType.NS;
View Full Code Here


      String value = params[2];
     
      String timestampStr = "";
      String count = "1";
     
      UnitType unitType = UnitType.N;
            ValueType valueType = ValueType.VALUE;
           
      if (params.length == 4) {
        timestampStr = params[3];
      } else {
        unitType = getUnitType(params[3]);
              valueType = getValueType(params[4]);
              count = params[5];
              timestampStr = params[6];
      }
   
      Long timeperiod = 0l;
      try {
        timeperiod = Long.parseLong(timestampStr);
        timeperiod = ((long)(timeperiod / 15000));
      } catch (NumberFormatException nfe) {
        log.error("Unable to read in timestamp");
      }
     
      StringBuilder sb = new StringBuilder();
      sb.append(agentName)
        .append(":")
        .append(path);
     
      StoreIncomingStatisticsElement statElem = new StoreIncomingStatisticsElement();
      statElem.setGuiPath(sb.toString());
      statElem.setTimeperiod(timeperiod);
      statElem.setValue(value);
            statElem.setValueType(valueType.value());
            statElem.setUnitType((unitType.value()));
            statElem.setCount(count);
      statList.add(statElem);
    }
    return statList;
  }
View Full Code Here

TOP

Related Classes of org.eurekaj.api.enumtypes.UnitType

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.