Package org.rhq.core.domain.measurement

Examples of org.rhq.core.domain.measurement.MeasurementDataTrait


            MeasurementDataNumeric res = constructNumericMeasure(att.getTypeClass(), att.getValue(), req);
            report.addData(res);
         } else if (type == DataType.TRAIT) {
            String value = (String) bean.getAttribute(req.getName()).getValue();
            if (trace) log.tracef("Metric (%s) is trait with value %s", req.getName(), value);
            MeasurementDataTrait res = new MeasurementDataTrait(req, value);
            report.addData(res);
         }
      }
   }
View Full Code Here


                        if (log.isDebugEnabled()) log.debugf("Metric (%s) has null value, do not add to report", req.getName());
                     }
                  } else if (type == DataType.TRAIT) {
                     String value = (String) o;
                     if (trace) log.tracef("Metric (%s) is trait with value %s", req.getName(), value);
                     MeasurementDataTrait res = new MeasurementDataTrait(req, value);
                     report.addData(res);
                  }
               } else {
                  log.attributeNotFound(attName);
               }
View Full Code Here

            MeasurementDataNumeric res = new MeasurementDataNumeric(req, val);
            report.addData(res);
         } else if (type == DataType.TRAIT) {
            String value = (String) bean.getAttribute(req.getName()).getValue();
            if (trace) log.trace("Metric (%s) is trait with value %s", req.getName(), value);
            MeasurementDataTrait res = new MeasurementDataTrait(req, value);
            report.addData(res);
         }
      }
   }
View Full Code Here

                        if (log.isDebugEnabled()) log.debug("Metric (%s) has null value, do not add to report", req.getName());
                     }
                  } else if (type == DataType.TRAIT) {
                     String value = (String) o;
                     if (trace) log.trace("Metric (%s) is trait with value %s", req.getName(), value);
                     MeasurementDataTrait res = new MeasurementDataTrait(req, value);
                     report.addData(res);
                  }
               } else {
                  log.warn("Attribute %s not found", attName);
               }
View Full Code Here

                        if (log.isDebugEnabled()) log.debugf("Metric (%s) has null value, do not add to report", req.getName());
                     }
                  } else if (type == DataType.TRAIT) {
                     String value = (String) o;
                     if (trace) log.tracef("Metric (%s) is trait with value %s", req.getName(), value);
                     MeasurementDataTrait res = new MeasurementDataTrait(req, value);
                     report.addData(res);
                  }
               } else {
                  log.attributeNotFound(attName);
               }
View Full Code Here

            MeasurementDataNumeric res = new MeasurementDataNumeric(req, val);
            report.addData(res);
         } else if (type == DataType.TRAIT) {
            String value = (String) bean.getAttribute(req.getName()).getValue();
            if (trace) log.tracef("Metric (%s) is trait with value %s", req.getName(), value);
            MeasurementDataTrait res = new MeasurementDataTrait(req, value);
            report.addData(res);
         }
      }
   }
View Full Code Here

      for (MeasurementScheduleRequest measurementScheduleRequest : measurementScheduleRequests)
      {
         if ("provider".equalsIgnoreCase(measurementScheduleRequest.getName()))
         {
            measurementReport.addData(new MeasurementDataTrait(measurementScheduleRequest, "HornetQ"));
         }
         else if ("started".equalsIgnoreCase(measurementScheduleRequest.getName()))
         {
            ManagementView managementView = getProfileService();
            ManagedOperation operation = ManagementSupport.getOperation(managementView, "JMSServerMO", "isStarted", new ComponentType("JMSManage", "ServerManage"));
            SimpleValueSupport support = (SimpleValueSupport) operation.invoke();
            measurementReport.addData(new MeasurementDataTrait(measurementScheduleRequest, support.getValue().toString()));
         }
      }

   }
View Full Code Here

               }
            } else if (req.getDataType() == DataType.TRAIT) {

               String realVal = getStringValue(val);

               MeasurementDataTrait data = new MeasurementDataTrait(req, realVal);
               report.addData(data);
            }
         }
      }
   }
View Full Code Here

        Set<MeasurementScheduleRequest> requests = metrics;
        Set<MeasurementScheduleRequest> todo = new HashSet<MeasurementScheduleRequest>();
        for (MeasurementScheduleRequest req : requests) {
            if (req.getName().equals("__flavor")) {
                String flavor = getCacheFlavorFromPath();
                MeasurementDataTrait trait = new MeasurementDataTrait(req, flavor);
                report.addData(trait);
            } else {
                todo.add(req);
            }
        }
View Full Code Here

            MeasurementDataNumeric res = new MeasurementDataNumeric(req, val);
            report.addData(res);
         } else if (type == DataType.TRAIT) {
            String value = (String) bean.getAttribute(req.getName()).getValue();
            if (trace) log.trace("Metric ({0}) is trait with value {1}", req.getName(), value);
            MeasurementDataTrait res = new MeasurementDataTrait(req, value);
            report.addData(res);
         }
      }
   }
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.measurement.MeasurementDataTrait

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.